mui_app_rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +34 -0
  3. data/app/assets/fonts/mui.ttf +0 -0
  4. data/app/assets/javascripts/mui_app_rails/actions.js +26 -0
  5. data/app/assets/javascripts/mui_app_rails/ajax.plugin.js +3 -0
  6. data/app/assets/javascripts/mui_app_rails/input.plugin.js +232 -0
  7. data/app/assets/javascripts/mui_app_rails/modals.js +37 -0
  8. data/app/assets/javascripts/mui_app_rails/mui.active.js +30 -0
  9. data/app/assets/javascripts/mui_app_rails/mui.ajax.5+.js +27 -0
  10. data/app/assets/javascripts/mui_app_rails/mui.ajax.js +277 -0
  11. data/app/assets/javascripts/mui_app_rails/mui.animation.js +39 -0
  12. data/app/assets/javascripts/mui_app_rails/mui.animationframe.js +72 -0
  13. data/app/assets/javascripts/mui_app_rails/mui.back.5+.js +108 -0
  14. data/app/assets/javascripts/mui_app_rails/mui.back.js +56 -0
  15. data/app/assets/javascripts/mui_app_rails/mui.class.js +40 -0
  16. data/app/assets/javascripts/mui_app_rails/mui.class.scroll.js +894 -0
  17. data/app/assets/javascripts/mui_app_rails/mui.class.scroll.pullrefresh.js +150 -0
  18. data/app/assets/javascripts/mui_app_rails/mui.class.scroll.slider.js +361 -0
  19. data/app/assets/javascripts/mui_app_rails/mui.class.scroll.slider.old.js +332 -0
  20. data/app/assets/javascripts/mui_app_rails/mui.detect.5+.js +18 -0
  21. data/app/assets/javascripts/mui_app_rails/mui.detect.js +50 -0
  22. data/app/assets/javascripts/mui_app_rails/mui.dialog.alert.js +27 -0
  23. data/app/assets/javascripts/mui_app_rails/mui.dialog.confirm.js +27 -0
  24. data/app/assets/javascripts/mui_app_rails/mui.dialog.prompt.js +33 -0
  25. data/app/assets/javascripts/mui_app_rails/mui.dialog.toast.js +20 -0
  26. data/app/assets/javascripts/mui_app_rails/mui.event.js +160 -0
  27. data/app/assets/javascripts/mui_app_rails/mui.fixed.animation.js +22 -0
  28. data/app/assets/javascripts/mui_app_rails/mui.fixed.classlist.js +50 -0
  29. data/app/assets/javascripts/mui_app_rails/mui.fixed.fastclick.js +64 -0
  30. data/app/assets/javascripts/mui_app_rails/mui.fixed.js +40 -0
  31. data/app/assets/javascripts/mui_app_rails/mui.fixed.keyboard.js +56 -0
  32. data/app/assets/javascripts/mui_app_rails/mui.gestures.drag.js +48 -0
  33. data/app/assets/javascripts/mui_app_rails/mui.gestures.flick.js +30 -0
  34. data/app/assets/javascripts/mui_app_rails/mui.gestures.hold.js +41 -0
  35. data/app/assets/javascripts/mui_app_rails/mui.gestures.js +207 -0
  36. data/app/assets/javascripts/mui_app_rails/mui.gestures.longtap.js +43 -0
  37. data/app/assets/javascripts/mui_app_rails/mui.gestures.swipe.js +29 -0
  38. data/app/assets/javascripts/mui_app_rails/mui.gestures.tap.js +40 -0
  39. data/app/assets/javascripts/mui_app_rails/mui.init.5+.js +441 -0
  40. data/app/assets/javascripts/mui_app_rails/mui.init.js +100 -0
  41. data/app/assets/javascripts/mui_app_rails/mui.init.pullrefresh.js +57 -0
  42. data/app/assets/javascripts/mui_app_rails/mui.js +396 -0
  43. data/app/assets/javascripts/mui_app_rails/mui.jsonp.js +108 -0
  44. data/app/assets/javascripts/mui_app_rails/mui.layout.js +22 -0
  45. data/app/assets/javascripts/mui_app_rails/mui.namespace.js +35 -0
  46. data/app/assets/javascripts/mui_app_rails/mui.number.js +93 -0
  47. data/app/assets/javascripts/mui_app_rails/mui.offcanvas.js +497 -0
  48. data/app/assets/javascripts/mui_app_rails/mui.pullrefresh.js +157 -0
  49. data/app/assets/javascripts/mui_app_rails/mui.target.js +58 -0
  50. data/app/assets/javascripts/mui_app_rails/mui.view.js +172 -0
  51. data/app/assets/javascripts/mui_app_rails/popovers.js +278 -0
  52. data/app/assets/javascripts/mui_app_rails/pullrefresh.5+.js +238 -0
  53. data/app/assets/javascripts/mui_app_rails/push.js +479 -0
  54. data/app/assets/javascripts/mui_app_rails/segmented-controllers.js +99 -0
  55. data/app/assets/javascripts/mui_app_rails/sliders.js +362 -0
  56. data/app/assets/javascripts/mui_app_rails/switches.js +165 -0
  57. data/app/assets/javascripts/mui_app_rails/tableviews.js +512 -0
  58. data/app/assets/javascripts/mui_app_rails.js +1 -0
  59. data/app/assets/stylesheets/mui_app_rails/badges.scss +88 -0
  60. data/app/assets/stylesheets/mui_app_rails/bars.scss +312 -0
  61. data/app/assets/stylesheets/mui_app_rails/base.scss +196 -0
  62. data/app/assets/stylesheets/mui_app_rails/buttons.scss +205 -0
  63. data/app/assets/stylesheets/mui_app_rails/cards.scss +62 -0
  64. data/app/assets/stylesheets/mui_app_rails/forms.scss +452 -0
  65. data/app/assets/stylesheets/mui_app_rails/fullscreen.scss +35 -0
  66. data/app/assets/stylesheets/mui_app_rails/grid.scss +75 -0
  67. data/app/assets/stylesheets/mui_app_rails/hack.scss +14 -0
  68. data/app/assets/stylesheets/mui_app_rails/icon.scss +170 -0
  69. data/app/assets/stylesheets/mui_app_rails/iscroll.scss +43 -0
  70. data/app/assets/stylesheets/mui_app_rails/loadings.scss +111 -0
  71. data/app/assets/stylesheets/mui_app_rails/mixins.scss +212 -0
  72. data/app/assets/stylesheets/mui_app_rails/modals.scss +34 -0
  73. data/app/assets/stylesheets/mui_app_rails/mui.scss +46 -0
  74. data/app/assets/stylesheets/mui_app_rails/normalize.scss +425 -0
  75. data/app/assets/stylesheets/mui_app_rails/number.scss +70 -0
  76. data/app/assets/stylesheets/mui_app_rails/off-canvas.scss +84 -0
  77. data/app/assets/stylesheets/mui_app_rails/os.scss +12 -0
  78. data/app/assets/stylesheets/mui_app_rails/pagination.scss +155 -0
  79. data/app/assets/stylesheets/mui_app_rails/popovers.scss +198 -0
  80. data/app/assets/stylesheets/mui_app_rails/pullrefreshs.scss +98 -0
  81. data/app/assets/stylesheets/mui_app_rails/push.scss +63 -0
  82. data/app/assets/stylesheets/mui_app_rails/scroll.scss +95 -0
  83. data/app/assets/stylesheets/mui_app_rails/segmented-controls.scss +150 -0
  84. data/app/assets/stylesheets/mui_app_rails/slider-cell.scss +20 -0
  85. data/app/assets/stylesheets/mui_app_rails/sliders.scss +133 -0
  86. data/app/assets/stylesheets/mui_app_rails/switches.scss +115 -0
  87. data/app/assets/stylesheets/mui_app_rails/table-views.scss +482 -0
  88. data/app/assets/stylesheets/mui_app_rails/toast.scss +16 -0
  89. data/app/assets/stylesheets/mui_app_rails/type.scss +23 -0
  90. data/app/assets/stylesheets/mui_app_rails/variables.scss +64 -0
  91. data/app/assets/stylesheets/mui_app_rails.css +3 -0
  92. data/lib/mui_app_rails/engine.rb +5 -0
  93. data/lib/mui_app_rails/version.rb +3 -0
  94. data/lib/mui_app_rails.rb +5 -0
  95. metadata +179 -0
@@ -0,0 +1,150 @@
1
+ //
2
+ // Segmented controllers
3
+ // --------------------------------------------------
4
+
5
+ .#{$namespace}segmented-control {
6
+ position: relative;
7
+ display: table;
8
+ table-layout: fixed;
9
+ width: 100%;
10
+ overflow: hidden;
11
+ font-size: 15px;
12
+ font-weight: $font-weight-light;
13
+ background-color: transparent;
14
+ border: 1px solid $primary-color;
15
+ border-radius: 3px;
16
+ -webkit-touch-callout: none;//(iOS平台)分段选择禁止长按弹出菜单;
17
+
18
+ &.#{$namespace}scroll-wrapper{
19
+ height: 38px;
20
+ .#{$namespace}scroll{
21
+ height: 40px;
22
+ width: auto;
23
+ white-space: nowrap;
24
+ }
25
+ .#{$namespace}control-item{
26
+ display: inline-block;
27
+ width: auto;
28
+ padding: 0 20px;
29
+ border: 0;
30
+ }
31
+ }
32
+ // Section within controller
33
+ .#{$namespace}control-item {
34
+ display: table-cell;
35
+ width: 1%;
36
+ // padding-top: 6px;
37
+ // padding-bottom: 7px;
38
+ overflow: hidden;
39
+ line-height: 38px;
40
+ text-align: center;
41
+ text-overflow: ellipsis;
42
+ white-space: nowrap;
43
+ border-left: 1px solid $primary-color;
44
+ color: $primary-color;
45
+ border-color: $primary-color;
46
+ @include transition(background-color .1s linear);
47
+ // Remove border-left and shadow from first section
48
+ &:first-child {
49
+ border-left-width: 0;
50
+ }
51
+ // &:active {
52
+ // background-color: lighten($primary-color, 35%);
53
+ // }
54
+ // Selected state of segmented controller
55
+ &.#{$namespace}active {
56
+ color: #fff;
57
+ background-color: $primary-color;
58
+ }
59
+ }
60
+ &.#{$namespace}segmented-control-inverted{
61
+ width:100%;
62
+ border:0;
63
+ border-radius:0;
64
+ .#{$namespace}control-item {
65
+ border:0;
66
+ color: inherit;
67
+ &.#{$namespace}active {
68
+ color: $primary-color;
69
+ background: none;
70
+ border-bottom:2px solid $primary-color;
71
+ }
72
+ }
73
+ ~ .#{$namespace}slider-progress-bar{
74
+ background-color:$primary-color;
75
+ }
76
+ }
77
+ }
78
+
79
+ // Other segmented controller types
80
+ // --------------------------------------------------
81
+
82
+ // Positive
83
+ .#{$namespace}segmented-control-positive {
84
+ border: 1px solid $positive-color;
85
+
86
+ .#{$namespace}control-item {
87
+ color: $positive-color;
88
+ border-color: inherit;
89
+
90
+ // &:active {
91
+ // background-color: lighten($positive-color, 35%);
92
+ // }
93
+ &.#{$namespace}active {
94
+ color: #fff;
95
+ background-color: $positive-color;
96
+ }
97
+ }
98
+ &.#{$namespace}segmented-control-inverted{
99
+ .#{$namespace}control-item {
100
+ &.#{$namespace}active {
101
+ color: $positive-color;
102
+ background: none;
103
+ border-bottom:2px solid $positive-color;
104
+ }
105
+ }
106
+ ~ .#{$namespace}slider-progress-bar{
107
+ background-color:$positive-color;
108
+ }
109
+ }
110
+ }
111
+
112
+ // Negative
113
+ .#{$namespace}segmented-control-negative {
114
+ border: 1px solid $negative-color;
115
+
116
+ .#{$namespace}control-item {
117
+ color: $negative-color;
118
+ border-color: inherit;
119
+
120
+ // &:active {
121
+ // background-color: lighten($negative-color, 35%);
122
+ // }
123
+ &.#{$namespace}active {
124
+ color: #fff;
125
+ background-color: $negative-color;
126
+ }
127
+ }
128
+ &.#{$namespace}segmented-control-inverted{
129
+ .#{$namespace}control-item {
130
+ &.#{$namespace}active {
131
+ color: $negative-color;
132
+ background: none;
133
+ border-bottom:2px solid $negative-color;
134
+ }
135
+ }
136
+ ~ .#{$namespace}slider-progress-bar{
137
+ background-color:$negative-color;
138
+ }
139
+ }
140
+ }
141
+
142
+ // This is used to by the js to show and hide content tide to the segmented control.
143
+ .#{$namespace}control-content {
144
+ position: relative;
145
+ display: none;
146
+
147
+ &.#{$namespace}active {
148
+ display: block;
149
+ }
150
+ }
@@ -0,0 +1,20 @@
1
+ .#{$namespace}slider-cell{
2
+ position:relative;
3
+ >.#{$namespace}slider-handle{
4
+ z-index:z("default");
5
+ }
6
+ >.#{$namespace}slider-left,>.#{$namespace}slider-right{
7
+ z-index:0;
8
+ position:absolute;
9
+ top:0;
10
+ bottom:0;
11
+ }
12
+ >.#{$namespace}slider-left{
13
+ left:0;
14
+ }
15
+ >.#{$namespace}slider-right{
16
+ right:z("default")-1;
17
+ }
18
+ }
19
+
20
+
@@ -0,0 +1,133 @@
1
+ //
2
+ // Slider styles (to be used with galleries.js)
3
+ // --------------------------------------------------
4
+
5
+ // Outer wrapper for slider
6
+ .#{$namespace}slider {
7
+ //-webkit-backface-visibility: hidden;
8
+ overflow: hidden;
9
+ width: 100%;
10
+ position:relative;
11
+ .#{$namespace}segmented-control.#{$namespace}segmented-control-inverted{
12
+ .#{$namespace}control-item {
13
+ &.#{$namespace}active {
14
+ border-bottom:0;
15
+ }
16
+ }
17
+ ~ .#{$namespace}slider-group{
18
+ .#{$namespace}slider-item{
19
+ //@include hairline(double, #c8c7cc, 0); // double grey border.
20
+ border-top: 1px solid #c8c7cc;
21
+ border-bottom: 1px solid #c8c7cc;
22
+ }
23
+ }
24
+ }
25
+ // Inner wrapper for slider (width of all sliders together)
26
+ .#{$namespace}slider-group {
27
+ //加上后好像内嵌轮播时,第一张图片显示有问题
28
+ // -webkit-backface-visibility: hidden;
29
+ position: relative;
30
+ font-size: 0; // Remove spaces from inline-block children
31
+ white-space: nowrap;
32
+ @include transition(all 0s linear);
33
+
34
+ // Individual slider
35
+ .#{$namespace}slider-item {
36
+ // -webkit-backface-visibility: hidden;
37
+ position: relative;
38
+ display: inline-block;
39
+ width: 100%;
40
+ height: 100%;
41
+ font-size: 14px;
42
+ vertical-align: top; // Ensure that li always aligns to top
43
+ >a:not(.#{$namespace}control-item){
44
+ position: relative;
45
+ line-height: 0;
46
+ display: block;
47
+ }
48
+ img{
49
+ width: 100%;
50
+ }
51
+ .#{$namespace}table-view:before,.#{$namespace}table-view:after{
52
+ height:0;
53
+ }
54
+ // .#{$namespace}table-view-cell:last-child:after{
55
+ // height: 0;
56
+ // }
57
+ }
58
+ &.#{$namespace}slider-loop{
59
+ @include transform(translate(-100%, 0px));
60
+ }
61
+ // &.#{$namespace}slider-loop .#{$namespace}slider-item{
62
+ // &:first-child{
63
+ // margin-left: -100%;
64
+ // }
65
+ // &:last-child{
66
+ // margin-right: -100%;
67
+ // }
68
+ // }
69
+ }
70
+ }
71
+ .#{$namespace}slider-title{
72
+ position: absolute;
73
+ left: 0;
74
+ bottom: 0;
75
+ height: 30px;
76
+ line-height: 30px;
77
+ width: 100%;
78
+ text-align: left;
79
+ text-indent: 12px;
80
+ background-color: #000;
81
+ opacity: 0.8;
82
+ margin: 0;
83
+ }
84
+ .#{$namespace}slider-indicator{
85
+ position: absolute;
86
+ bottom: 8px;
87
+ width: 100%;
88
+ text-align:center;
89
+ background:none;
90
+ &.#{$namespace}segmented-control{
91
+ position:relative;
92
+ bottom:auto;
93
+ // .#{$namespace}control-item{
94
+ // line-height: 40px;
95
+ // }
96
+ }
97
+ .#{$namespace}indicator{
98
+ display: inline-block;
99
+ cursor: pointer;
100
+ background: #aaa;
101
+ width: 6px;
102
+ height: 6px;
103
+ margin: 1px 6px;
104
+ border-radius: 50%;
105
+ @include box-shadow(0 0 1px 1px rgba(130,130,130,.7));
106
+ }
107
+ .#{$namespace}active.#{$namespace}indicator{
108
+ background: #fff;
109
+ }
110
+ .#{$namespace}icon{
111
+ width: 40px;
112
+ height: 30px;
113
+ margin: 3px;
114
+ font-size: 20px;
115
+ line-height: 30px;
116
+ text-align: center;
117
+ border: 1px solid #dddddd;
118
+ }
119
+ .#{$namespace}number{
120
+ display: inline-block;
121
+ line-height: 32px;
122
+ width: 58px;
123
+ span{
124
+ color: #ff5053;
125
+ }
126
+ }
127
+ }
128
+ .#{$namespace}slider-progress-bar{
129
+ -webkit-backface-visibility: hidden;
130
+ @include transform(translateZ(0));
131
+ height:2px;
132
+ z-index:z("default");
133
+ }
@@ -0,0 +1,115 @@
1
+ //
2
+ // switch styles (to be used with switchs.js)
3
+ // --------------------------------------------------
4
+
5
+ .#{$namespace}switch {
6
+ position: relative;
7
+ display: block;
8
+ width: 74px;
9
+ height: 30px;
10
+ background-color: #fff;
11
+ background-clip: padding-box;
12
+ border: 2px solid #ddd;
13
+ border-radius: 20px;
14
+ -webkit-transition-timing-function: ease-in-out;
15
+ transition-timing-function: ease-in-out;
16
+ -webkit-transition-duration: 0.2s;
17
+ transition-duration: 0.2s;
18
+ -webkit-transition-property: background-color, border;
19
+ transition-property: background-color, border;
20
+ &.#{$namespace}disabled {
21
+ opacity: .3;
22
+ }
23
+ // Sliding handle
24
+ .#{$namespace}switch-handle {
25
+ position: absolute;
26
+ top: -1px;
27
+ left: -1px;
28
+ z-index: z("default");
29
+ width: 28px;
30
+ height: 28px;
31
+ background-color: #fff;
32
+ background-clip: padding-box;
33
+ // border: 1px solid #ddd;
34
+ -webkit-box-shadow: 0 2px 5px rgba(0,0,0,.4);
35
+ box-shadow: 0 2px 5px rgba(0,0,0,.4);
36
+ border-radius: 16px;
37
+ -webkit-transition-property: -webkit-transform, width,left;
38
+ transition-property: transform, width,left;
39
+ -webkit-transition: 0.2s ease-in-out;
40
+ transition: 0.2s ease-in-out;
41
+ }
42
+ &:before {
43
+ position: absolute;
44
+ top: 3px;
45
+ right: 11px;
46
+ font-size: 13px;
47
+ color: #999;
48
+ text-transform: uppercase;
49
+ content: "Off";
50
+ }
51
+ &.#{$namespace}dragging {
52
+ background-color: $chrome-color;
53
+ border-color: $chrome-color;
54
+ .#{$namespace}switch-handle {
55
+ width: 38px;
56
+ }
57
+ &.#{$namespace}active{
58
+ .#{$namespace}switch-handle {
59
+ width: 38px;
60
+ left:-11px;
61
+ }
62
+ }
63
+ }
64
+ // Active state for switchborder: 2px solid $positive-color;
65
+ &.#{$namespace}active {
66
+ background-color: $positive-color;
67
+ border-color: $positive-color;
68
+ // @include box-shadow(inset 0 0 0 13px $positive-color);
69
+ .#{$namespace}switch-handle {
70
+ // border-color: $positive-color;
71
+ @include transform(translate3d(43px,0,0));
72
+ }
73
+ &:before {
74
+ right: auto;
75
+ left: 15px;
76
+ color: #fff;
77
+ content: "On";
78
+ }
79
+ }
80
+ // Hide the checkbox
81
+ input[type="checkbox"] {
82
+ display: none;
83
+ }
84
+ }
85
+
86
+ .#{$namespace}switch-mini{
87
+ width: 47px;
88
+ &:before {
89
+ display: none;
90
+ }
91
+ // Active state for switch
92
+ &.#{$namespace}active {
93
+ .#{$namespace}switch-handle {
94
+ @include transform(translate3d(16px,0,0));
95
+ }
96
+ }
97
+ }
98
+
99
+ //增加蓝色开关
100
+ .#{$namespace}switch-blue {
101
+ // Sliding handle
102
+ .#{$namespace}switch-handle {
103
+ // border: 1px solid rgba(0, 0, 0, .2);
104
+ // @include box-shadow(0 3px 3px rgba(0,0,0,.08));
105
+ }
106
+ // Active state for switch
107
+ &.#{$namespace}active {
108
+ background-color: $primary-color;
109
+ border: 2px solid $primary-color;
110
+ // @include box-shadow(inset 0 0 0 13px $primary-color);
111
+ // .#{$namespace}switch-handle {
112
+ // border-color: $primary-color;
113
+ // }
114
+ }
115
+ }