semantic-ui-rails 0.14.0 → 0.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/semantic-ui/modules/accordion.js +1 -1
- data/app/assets/javascripts/semantic-ui/modules/behavior/form.js +2 -4
- data/app/assets/javascripts/semantic-ui/modules/chatroom.js +1 -2
- data/app/assets/javascripts/semantic-ui/modules/checkbox.js +8 -6
- data/app/assets/javascripts/semantic-ui/modules/dimmer.js +1 -1
- data/app/assets/javascripts/semantic-ui/modules/dropdown.js +50 -20
- data/app/assets/javascripts/semantic-ui/modules/modal.js +21 -4
- data/app/assets/javascripts/semantic-ui/modules/nag.js +1 -1
- data/app/assets/javascripts/semantic-ui/modules/popup.js +1 -1
- data/app/assets/javascripts/semantic-ui/modules/rating.js +1 -1
- data/app/assets/javascripts/semantic-ui/modules/search.js +1 -1
- data/app/assets/javascripts/semantic-ui/modules/shape.js +1 -1
- data/app/assets/javascripts/semantic-ui/modules/sidebar.js +1 -1
- data/app/assets/javascripts/semantic-ui/modules/tab.js +1 -1
- data/app/assets/javascripts/semantic-ui/modules/transition.js +2 -2
- data/app/assets/javascripts/semantic-ui/modules/video.js +1 -1
- data/app/assets/stylesheets/semantic-ui/collections/form.less +87 -11
- data/app/assets/stylesheets/semantic-ui/collections/menu.less +2 -5
- data/app/assets/stylesheets/semantic-ui/collections/message.less +17 -7
- data/app/assets/stylesheets/semantic-ui/collections/table.less +4 -1
- data/app/assets/stylesheets/semantic-ui/elements/basic.icon.less +2 -2
- data/app/assets/stylesheets/semantic-ui/elements/icon.less +8 -3
- data/app/assets/stylesheets/semantic-ui/elements/input.less +10 -6
- data/app/assets/stylesheets/semantic-ui/elements/reveal.less +54 -20
- data/app/assets/stylesheets/semantic-ui/elements/segment.less +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/step.less +51 -34
- data/app/assets/stylesheets/semantic-ui/modules/checkbox.less +20 -19
- data/app/assets/stylesheets/semantic-ui/modules/dropdown.less +12 -6
- data/app/assets/stylesheets/semantic-ui/modules/modal.less +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/rating.less +0 -21
- data/app/assets/stylesheets/semantic-ui/modules/sidebar.less +10 -5
- data/app/assets/stylesheets/semantic-ui/modules/transition.less +1 -1
- data/app/assets/stylesheets/semantic-ui/views/item.less +1 -1
- data/lib/semantic/ui/rails/version.rb +1 -1
- data/semantic.thor +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a5c7efdc48c48fbbc6a8ccff466c45b5475c7cc
|
4
|
+
data.tar.gz: a5510dd4526e13ed7fde423f2493314be8b666c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a4ee41d4f0f787f44234765fa9e4a5acebebcf3deabff51d59ac18c3bfd67fb075374d0abd6fc2fe2657f768e87db80770858f115732d535e0da5b8ddb29668
|
7
|
+
data.tar.gz: 91b9978260abdb8fdf79538fe1a77538b2166b3557dc2692ea5a5967b7d68335e0269a9df3eb2c921e7729f14a9372f1504ecb09faa6c19635ee5446060c8f8b
|
@@ -107,12 +107,10 @@ $.fn.form = function(fields, parameters) {
|
|
107
107
|
;
|
108
108
|
$field
|
109
109
|
.each(function() {
|
110
|
-
var
|
110
|
+
var
|
111
111
|
type = $(this).prop('type'),
|
112
112
|
inputEvent = module.get.changeEvent(type)
|
113
113
|
;
|
114
|
-
if(settings.inline == true) {
|
115
|
-
}
|
116
114
|
$(this)
|
117
115
|
.on(inputEvent + eventNamespace, module.event.field.change)
|
118
116
|
;
|
@@ -201,7 +199,7 @@ $.fn.form = function(fields, parameters) {
|
|
201
199
|
|
202
200
|
get: {
|
203
201
|
changeEvent: function(type) {
|
204
|
-
if(type == 'checkbox' || type == 'radio') {
|
202
|
+
if(type == 'checkbox' || type == 'radio' || type == 'hidden') {
|
205
203
|
return 'change';
|
206
204
|
}
|
207
205
|
else {
|
@@ -130,11 +130,13 @@ $.fn.checkbox = function(parameters) {
|
|
130
130
|
|
131
131
|
toggle: function(event) {
|
132
132
|
module.verbose('Determining new checkbox state');
|
133
|
-
if(
|
134
|
-
module.
|
135
|
-
|
136
|
-
|
137
|
-
module.disable()
|
133
|
+
if( !$input.prop('disabled') ) {
|
134
|
+
if( module.is.disabled() ) {
|
135
|
+
module.enable();
|
136
|
+
}
|
137
|
+
else if( module.is.enabled() && module.can.disable() ) {
|
138
|
+
module.disable();
|
139
|
+
}
|
138
140
|
}
|
139
141
|
},
|
140
142
|
setting: function(name, value) {
|
@@ -317,8 +319,8 @@ $.fn.checkbox.settings = {
|
|
317
319
|
name : 'Checkbox',
|
318
320
|
namespace : 'checkbox',
|
319
321
|
|
322
|
+
debug : false,
|
320
323
|
verbose : true,
|
321
|
-
debug : true,
|
322
324
|
performance : true,
|
323
325
|
|
324
326
|
// delegated event context
|
@@ -181,17 +181,22 @@ $.fn.dropdown = function(parameters) {
|
|
181
181
|
|
182
182
|
mouseenter: function(event) {
|
183
183
|
var
|
184
|
-
$currentMenu = $(this).find(selector.
|
184
|
+
$currentMenu = $(this).find(selector.submenu),
|
185
185
|
$otherMenus = $(this).siblings(selector.item).children(selector.menu)
|
186
186
|
;
|
187
|
-
if(
|
187
|
+
if($currentMenu.length > 0 || $otherMenus.length > 0) {
|
188
188
|
clearTimeout(module.itemTimer);
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
189
|
+
module.itemTimer = setTimeout(function() {
|
190
|
+
if($otherMenus.length > 0) {
|
191
|
+
module.animate.hide(false, $otherMenus.filter(':visible'));
|
192
|
+
}
|
193
|
+
if($currentMenu.length > 0) {
|
194
|
+
module.verbose('Showing sub-menu', $currentMenu);
|
195
|
+
module.animate.show(false, $currentMenu);
|
196
|
+
}
|
193
197
|
}, settings.delay.show * 2);
|
194
198
|
event.preventDefault();
|
199
|
+
event.stopPropagation();
|
195
200
|
}
|
196
201
|
},
|
197
202
|
|
@@ -216,7 +221,9 @@ $.fn.dropdown = function(parameters) {
|
|
216
221
|
: $choice.text(),
|
217
222
|
value = ( $choice.data(metadata.value) !== undefined)
|
218
223
|
? $choice.data(metadata.value)
|
219
|
-
: text
|
224
|
+
: (typeof text === 'string')
|
225
|
+
? text.toLowerCase()
|
226
|
+
: text,
|
220
227
|
callback = function() {
|
221
228
|
module.determine.selectAction(text, value);
|
222
229
|
$.proxy(settings.onChange, element)(value, text);
|
@@ -332,7 +339,7 @@ $.fn.dropdown = function(parameters) {
|
|
332
339
|
: $module.data(metadata.value)
|
333
340
|
;
|
334
341
|
},
|
335
|
-
item: function(value) {
|
342
|
+
item: function(value, strict) {
|
336
343
|
var
|
337
344
|
$selectedItem = false
|
338
345
|
;
|
@@ -342,6 +349,13 @@ $.fn.dropdown = function(parameters) {
|
|
342
349
|
? module.get.value()
|
343
350
|
: module.get.text()
|
344
351
|
;
|
352
|
+
if(strict === undefined && value === '') {
|
353
|
+
module.debug('Ambiguous dropdown value using strict type check', value);
|
354
|
+
strict = true;
|
355
|
+
}
|
356
|
+
else {
|
357
|
+
strict = strict || false;
|
358
|
+
}
|
345
359
|
if(value !== undefined) {
|
346
360
|
$item
|
347
361
|
.each(function() {
|
@@ -352,13 +366,25 @@ $.fn.dropdown = function(parameters) {
|
|
352
366
|
: $choice.text(),
|
353
367
|
optionValue = ( $choice.data(metadata.value) !== undefined )
|
354
368
|
? $choice.data(metadata.value)
|
355
|
-
: optionText
|
369
|
+
: (typeof optionText === 'string')
|
370
|
+
? optionText.toLowerCase()
|
371
|
+
: optionText
|
356
372
|
;
|
357
|
-
if(
|
358
|
-
|
373
|
+
if(strict) {
|
374
|
+
if( optionValue === value ) {
|
375
|
+
$selectedItem = $(this);
|
376
|
+
}
|
377
|
+
else if( !$selectedItem && optionText === value ) {
|
378
|
+
$selectedItem = $(this);
|
379
|
+
}
|
359
380
|
}
|
360
|
-
else
|
361
|
-
|
381
|
+
else {
|
382
|
+
if( optionValue == value ) {
|
383
|
+
$selectedItem = $(this);
|
384
|
+
}
|
385
|
+
else if( !$selectedItem && optionText == value ) {
|
386
|
+
$selectedItem = $(this);
|
387
|
+
}
|
362
388
|
}
|
363
389
|
})
|
364
390
|
;
|
@@ -416,7 +442,10 @@ $.fn.dropdown = function(parameters) {
|
|
416
442
|
value: function(value) {
|
417
443
|
module.debug('Adding selected value to hidden input', value, $input);
|
418
444
|
if($input.size() > 0) {
|
419
|
-
$input
|
445
|
+
$input
|
446
|
+
.val(value)
|
447
|
+
.trigger('change')
|
448
|
+
;
|
420
449
|
}
|
421
450
|
else {
|
422
451
|
$module.data(metadata.value, value);
|
@@ -830,7 +859,7 @@ $.fn.dropdown = function(parameters) {
|
|
830
859
|
})
|
831
860
|
;
|
832
861
|
|
833
|
-
return (returnedValue)
|
862
|
+
return (returnedValue !== undefined)
|
834
863
|
? returnedValue
|
835
864
|
: this
|
836
865
|
;
|
@@ -841,8 +870,8 @@ $.fn.dropdown.settings = {
|
|
841
870
|
name : 'Dropdown',
|
842
871
|
namespace : 'dropdown',
|
843
872
|
|
873
|
+
debug : false,
|
844
874
|
verbose : true,
|
845
|
-
debug : true,
|
846
875
|
performance : true,
|
847
876
|
|
848
877
|
on : 'click',
|
@@ -875,10 +904,11 @@ $.fn.dropdown.settings = {
|
|
875
904
|
},
|
876
905
|
|
877
906
|
selector : {
|
878
|
-
menu
|
879
|
-
|
880
|
-
|
881
|
-
|
907
|
+
menu : '.menu',
|
908
|
+
submenu : '> .menu',
|
909
|
+
item : '.menu > .item',
|
910
|
+
text : '> .text',
|
911
|
+
input : '> input[type="hidden"]'
|
882
912
|
},
|
883
913
|
|
884
914
|
className : {
|
@@ -25,6 +25,12 @@ $.fn.modal = function(parameters) {
|
|
25
25
|
methodInvoked = (typeof query == 'string'),
|
26
26
|
queryArguments = [].slice.call(arguments, 1),
|
27
27
|
|
28
|
+
requestAnimationFrame = window.requestAnimationFrame
|
29
|
+
|| window.mozRequestAnimationFrame
|
30
|
+
|| window.webkitRequestAnimationFrame
|
31
|
+
|| window.msRequestAnimationFrame
|
32
|
+
|| function(callback) { setTimeout(callback, 0); },
|
33
|
+
|
28
34
|
returnedValue
|
29
35
|
;
|
30
36
|
|
@@ -237,7 +243,9 @@ $.fn.modal = function(parameters) {
|
|
237
243
|
: function(){}
|
238
244
|
;
|
239
245
|
if( !module.is.active() ) {
|
240
|
-
module.
|
246
|
+
if(module.cache === undefined) {
|
247
|
+
module.cacheSizes();
|
248
|
+
}
|
241
249
|
module.set.position();
|
242
250
|
module.set.screenHeight();
|
243
251
|
module.set.type();
|
@@ -247,10 +255,12 @@ $.fn.modal = function(parameters) {
|
|
247
255
|
module.hideOthers(module.showModal);
|
248
256
|
}
|
249
257
|
else {
|
258
|
+
$.proxy(settings.onShow, element)();
|
250
259
|
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
|
251
260
|
module.debug('Showing modal with css animations');
|
252
261
|
$module
|
253
262
|
.transition(settings.transition + ' in', settings.duration, function() {
|
263
|
+
$.proxy(settings.onVisible, element)();
|
254
264
|
module.set.active();
|
255
265
|
callback();
|
256
266
|
})
|
@@ -260,12 +270,12 @@ $.fn.modal = function(parameters) {
|
|
260
270
|
module.debug('Showing modal with javascript');
|
261
271
|
$module
|
262
272
|
.fadeIn(settings.duration, settings.easing, function() {
|
273
|
+
$.proxy(settings.onVisible, element)();
|
263
274
|
module.set.active();
|
264
275
|
callback();
|
265
276
|
})
|
266
277
|
;
|
267
278
|
}
|
268
|
-
$.proxy(settings.onShow, element)();
|
269
279
|
}
|
270
280
|
}
|
271
281
|
else {
|
@@ -327,9 +337,11 @@ $.fn.modal = function(parameters) {
|
|
327
337
|
}
|
328
338
|
module.debug('Hiding modal');
|
329
339
|
module.remove.keyboardShortcuts();
|
340
|
+
$.proxy(settings.onHide, element)();
|
330
341
|
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
|
331
342
|
$module
|
332
343
|
.transition(settings.transition + ' out', settings.duration, function() {
|
344
|
+
$.proxy(settings.onHidden, element)();
|
333
345
|
module.remove.active();
|
334
346
|
module.restore.focus();
|
335
347
|
callback();
|
@@ -339,13 +351,13 @@ $.fn.modal = function(parameters) {
|
|
339
351
|
else {
|
340
352
|
$module
|
341
353
|
.fadeOut(settings.duration, settings.easing, function() {
|
354
|
+
$.proxy(settings.onHidden, element)();
|
342
355
|
module.remove.active();
|
343
356
|
module.restore.focus();
|
344
357
|
callback();
|
345
358
|
})
|
346
359
|
;
|
347
360
|
}
|
348
|
-
$.proxy(settings.onHide, element)();
|
349
361
|
},
|
350
362
|
|
351
363
|
hideAll: function(callback) {
|
@@ -509,6 +521,7 @@ $.fn.modal = function(parameters) {
|
|
509
521
|
},
|
510
522
|
|
511
523
|
setting: function(name, value) {
|
524
|
+
module.debug('Changing setting', name, value);
|
512
525
|
if( $.isPlainObject(name) ) {
|
513
526
|
$.extend(true, settings, name);
|
514
527
|
}
|
@@ -688,7 +701,7 @@ $.fn.modal.settings = {
|
|
688
701
|
name : 'Modal',
|
689
702
|
namespace : 'modal',
|
690
703
|
|
691
|
-
debug :
|
704
|
+
debug : false,
|
692
705
|
verbose : true,
|
693
706
|
performance : true,
|
694
707
|
|
@@ -706,6 +719,10 @@ $.fn.modal.settings = {
|
|
706
719
|
|
707
720
|
onShow : function(){},
|
708
721
|
onHide : function(){},
|
722
|
+
|
723
|
+
onVisible : function(){},
|
724
|
+
onHidden : function(){},
|
725
|
+
|
709
726
|
onApprove : function(){ return true; },
|
710
727
|
onDeny : function(){ return true; },
|
711
728
|
|
@@ -226,7 +226,7 @@ $.fn.transition = function() {
|
|
226
226
|
var
|
227
227
|
displayType = module.get.displayType()
|
228
228
|
;
|
229
|
-
if(displayType !== 'block') {
|
229
|
+
if(displayType !== 'block' && displayType !== 'none') {
|
230
230
|
module.verbose('Setting final visibility to', displayType);
|
231
231
|
$module
|
232
232
|
.css({
|
@@ -460,7 +460,7 @@ $.fn.transition = function() {
|
|
460
460
|
animations = {
|
461
461
|
'animation' :'animationend',
|
462
462
|
'OAnimation' :'oAnimationEnd',
|
463
|
-
'MozAnimation' :'
|
463
|
+
'MozAnimation' :'animationend',
|
464
464
|
'WebkitAnimation' :'webkitAnimationEnd'
|
465
465
|
},
|
466
466
|
animation
|
@@ -85,8 +85,8 @@
|
|
85
85
|
.ui.form input[type="tel"] {
|
86
86
|
|
87
87
|
margin: 0em;
|
88
|
-
padding: 0.
|
89
|
-
font-size:
|
88
|
+
padding: 0.65em 1em;
|
89
|
+
font-size: 1em;
|
90
90
|
|
91
91
|
background-color: #FFFFFF;
|
92
92
|
border: 1px solid rgba(0, 0, 0, 0.15);
|
@@ -556,6 +556,75 @@
|
|
556
556
|
padding-right: 1%;
|
557
557
|
}
|
558
558
|
|
559
|
+
.ui.form .fields .field:first-child {
|
560
|
+
padding-left: 0%;
|
561
|
+
}
|
562
|
+
.ui.form .fields .field:last-child {
|
563
|
+
padding-right: 0%;
|
564
|
+
}
|
565
|
+
|
566
|
+
|
567
|
+
/* Fields grid support */
|
568
|
+
.ui.form .fields .wide.field {
|
569
|
+
width: 6.25%;
|
570
|
+
padding-left: 1%;
|
571
|
+
padding-right: 1%;
|
572
|
+
}
|
573
|
+
.ui.form .fields .wide.field:first-child {
|
574
|
+
padding-left: 0%;
|
575
|
+
}
|
576
|
+
.ui.form .fields .wide.field:last-child {
|
577
|
+
padding-right: 0%;
|
578
|
+
}
|
579
|
+
.ui.form .fields > .one.wide.field {
|
580
|
+
width: 6.25%;
|
581
|
+
}
|
582
|
+
.ui.form .fields > .two.wide.field {
|
583
|
+
width: 12.5%;
|
584
|
+
}
|
585
|
+
.ui.form .fields > .three.wide.field {
|
586
|
+
width: 18.75%;
|
587
|
+
}
|
588
|
+
.ui.form .fields > .four.wide.field {
|
589
|
+
width: 25%;
|
590
|
+
}
|
591
|
+
.ui.form .fields > .five.wide.field {
|
592
|
+
width: 31.25%;
|
593
|
+
}
|
594
|
+
.ui.form .fields > .six.wide.field {
|
595
|
+
width: 37.5%;
|
596
|
+
}
|
597
|
+
.ui.form .fields > .seven.wide.field {
|
598
|
+
width: 43.75%;
|
599
|
+
}
|
600
|
+
.ui.form .fields > .eight.wide.field {
|
601
|
+
width: 50%;
|
602
|
+
}
|
603
|
+
.ui.form .fields > .nine.wide.field {
|
604
|
+
width: 56.25%;
|
605
|
+
}
|
606
|
+
.ui.form .fields > .ten.wide.field {
|
607
|
+
width: 62.5%;
|
608
|
+
}
|
609
|
+
.ui.form .fields > .eleven.wide.field {
|
610
|
+
width: 68.75%;
|
611
|
+
}
|
612
|
+
.ui.form .fields > .twelve.wide.field {
|
613
|
+
width: 75%;
|
614
|
+
}
|
615
|
+
.ui.form .fields > .thirteen.wide.field {
|
616
|
+
width: 81.25%;
|
617
|
+
}
|
618
|
+
.ui.form .fields > .fourteen.wide.field {
|
619
|
+
width: 87.5%;
|
620
|
+
}
|
621
|
+
.ui.form .fields > .fifteen.wide.field {
|
622
|
+
width: 93.75%;
|
623
|
+
}
|
624
|
+
.ui.form .fields > .sixteen.wide.field {
|
625
|
+
width: 100%;
|
626
|
+
}
|
627
|
+
|
559
628
|
/* Swap to full width on mobile */
|
560
629
|
@media only screen and (max-width : 767px) {
|
561
630
|
.ui.form .two.fields > .fields,
|
@@ -565,21 +634,28 @@
|
|
565
634
|
.ui.form .four.fields > .fields,
|
566
635
|
.ui.form .four.fields > .field,
|
567
636
|
.ui.form .five.fields > .fields,
|
568
|
-
.ui.form .five.fields > .field
|
637
|
+
.ui.form .five.fields > .field,
|
638
|
+
.ui.form .fields > .two.wide.field,
|
639
|
+
.ui.form .fields > .three.wide.field,
|
640
|
+
.ui.form .fields > .four.wide.field,
|
641
|
+
.ui.form .fields > .five.wide.field,
|
642
|
+
.ui.form .fields > .six.wide.field,
|
643
|
+
.ui.form .fields > .seven.wide.field,
|
644
|
+
.ui.form .fields > .eight.wide.field,
|
645
|
+
.ui.form .fields > .nine.wide.field,
|
646
|
+
.ui.form .fields > .ten.wide.field,
|
647
|
+
.ui.form .fields > .eleven.wide.field,
|
648
|
+
.ui.form .fields > .twelve.wide.field,
|
649
|
+
.ui.form .fields > .thirteen.wide.field,
|
650
|
+
.ui.form .fields > .fourteen.wide.field,
|
651
|
+
.ui.form .fields > .fifteen.wide.field,
|
652
|
+
.ui.form .fields > .sixteen.wide.field {
|
569
653
|
width: 100%;
|
570
654
|
padding-left: 0%;
|
571
655
|
padding-right: 0%;
|
572
656
|
}
|
573
657
|
}
|
574
658
|
|
575
|
-
.ui.form .fields .field:first-child {
|
576
|
-
padding-left: 0%;
|
577
|
-
}
|
578
|
-
.ui.form .fields .field:last-child {
|
579
|
-
padding-right: 0%;
|
580
|
-
}
|
581
|
-
|
582
|
-
|
583
659
|
/*--------------------
|
584
660
|
Inline Fields
|
585
661
|
---------------------*/
|