tao_ui 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/assets/icons/{Loading.svg → loading.svg} +0 -0
- data/lib/assets/javascripts/tao/ui/index.coffee +1 -0
- data/lib/assets/javascripts/tao/ui/mobile/index.coffee +1 -0
- data/lib/assets/javascripts/tao/ui/ujs.coffee +28 -0
- data/lib/assets/stylesheets/tao/ui/buttons.scss +4 -7
- data/lib/assets/stylesheets/tao/ui/icons.scss +2 -2
- data/lib/assets/stylesheets/tao/ui/variables/_buttons.scss +3 -3
- data/lib/assets/stylesheets/tao/ui/variables/_tables.scss +2 -2
- data/lib/tao_ui/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b88a6a39098b20aa0f10643b591d5ccfb8f0a369
|
4
|
+
data.tar.gz: 21051f04bdf01faa0d570d7537458054645256fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e44337766dca61ff03b13763c70dd3a3b540f3108be6557fc7c839adb2179801d3ec9c37929a4f453b6e1eefd33c41b34a11bd2ed07f99d4dbaeefd2670ac53
|
7
|
+
data.tar.gz: 0ee13fefb88aed8d2d5b1fda1dedbe06375eb50fba00d9c584435724ee7ebf4f4c7417e6eec6d82e1a8f45d03b09de9fa3b2c427611e4c11d9359608e36ed53f
|
File without changes
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# hack ujs for adding loading icon on disabled buttons/links
|
2
|
+
|
3
|
+
prependLoadingIcon = (element) ->
|
4
|
+
$(element).prepend Tao.ui.iconTag('loading', class: 'spin')
|
5
|
+
|
6
|
+
# jquery-ujs
|
7
|
+
if $.rails?
|
8
|
+
originDisableElement = $.rails.disableElement
|
9
|
+
$.rails.disableElement = (element) ->
|
10
|
+
originDisableElement element
|
11
|
+
prependLoadingIcon element
|
12
|
+
|
13
|
+
originDisableFormElement = $.rails.disableFormElement
|
14
|
+
$.rails.disableFormElement = (element) ->
|
15
|
+
originDisableFormElement element
|
16
|
+
prependLoadingIcon element
|
17
|
+
|
18
|
+
# rails-ujs
|
19
|
+
else if Rails?
|
20
|
+
originDisableElement = Rails.disableElement
|
21
|
+
Rails.disableElement = (e) ->
|
22
|
+
originDisableElement e
|
23
|
+
element = if e instanceof Event then e.target else e
|
24
|
+
if Rails.matches(element, Rails.formSubmitSelector)
|
25
|
+
Rails.formElements(element, Rails.formDisableSelector).forEach (el) ->
|
26
|
+
prependLoadingIcon el
|
27
|
+
else
|
28
|
+
prependLoadingIcon element
|
@@ -1,9 +1,7 @@
|
|
1
1
|
@import 'tao/ui/globals';
|
2
2
|
|
3
3
|
.button {
|
4
|
-
display: inline-
|
5
|
-
align-items: center;
|
6
|
-
justify-content: center;
|
4
|
+
display: inline-block;
|
7
5
|
padding: $button-padding;
|
8
6
|
font-size: $button-font-size;
|
9
7
|
line-height: $button-line-height;
|
@@ -18,9 +16,8 @@
|
|
18
16
|
@include button-colors($default-button-colors);
|
19
17
|
|
20
18
|
.icon {
|
21
|
-
|
22
|
-
|
23
|
-
margin: 0 0.4em 0 0;
|
19
|
+
vertical-align: text-top;
|
20
|
+
margin-right: 0.4em;
|
24
21
|
}
|
25
22
|
|
26
23
|
&:focus, &.focus {
|
@@ -57,7 +54,7 @@
|
|
57
54
|
}
|
58
55
|
|
59
56
|
&.button-block {
|
60
|
-
display:
|
57
|
+
display: block;
|
61
58
|
width: 100%;
|
62
59
|
}
|
63
60
|
}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
$button-font-size: $font-size !default;
|
2
|
-
$button-line-height: 1.
|
2
|
+
$button-line-height: 1.5 !default;
|
3
3
|
$button-padding: 0.5em 1em !default;
|
4
4
|
|
5
|
-
$small-button-font-size: $font-size-
|
6
|
-
$small-button-line-height: 1.
|
5
|
+
$small-button-font-size: $font-size-xs !default;
|
6
|
+
$small-button-line-height: 1.5 !default;
|
7
7
|
$small-button-padding: 0.25em 0.5em !default;
|
8
8
|
|
9
9
|
$default-button-colors: (
|
@@ -1,2 +1,2 @@
|
|
1
|
-
$table-border-color: #eeeeee;
|
2
|
-
$table-row-hover-color: $lighter-grey-bg-color;
|
1
|
+
$table-border-color: #eeeeee !default;
|
2
|
+
$table-row-hover-color: $lighter-grey-bg-color !default;
|
data/lib/tao_ui/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tao_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- farthinker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -68,11 +68,12 @@ files:
|
|
68
68
|
- LICENSE
|
69
69
|
- README.md
|
70
70
|
- Rakefile
|
71
|
-
- lib/assets/icons/
|
71
|
+
- lib/assets/icons/loading.svg
|
72
72
|
- lib/assets/javascripts/tao/ui/icons/basic.coffee
|
73
73
|
- lib/assets/javascripts/tao/ui/icons/index.coffee
|
74
74
|
- lib/assets/javascripts/tao/ui/index.coffee
|
75
75
|
- lib/assets/javascripts/tao/ui/mobile/index.coffee
|
76
|
+
- lib/assets/javascripts/tao/ui/ujs.coffee
|
76
77
|
- lib/assets/stylesheets/tao/ui/_custom.scss
|
77
78
|
- lib/assets/stylesheets/tao/ui/_globals.scss
|
78
79
|
- lib/assets/stylesheets/tao/ui/_mixins.scss
|