semantic-ui-sass 0.8.2.0 → 0.8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/app/assets/javascripts/semantic-ui/behavior/form.js +3 -2
- data/app/assets/javascripts/semantic-ui/dimmer.js +4 -4
- data/app/assets/javascripts/semantic-ui/modal.js +136 -64
- data/app/assets/stylesheets/semantic-ui/collections/_form.scss +9 -1
- data/app/assets/stylesheets/semantic-ui/elements/_label.scss +14 -0
- data/lib/semantic/ui/sass/version.rb +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: 4ec316c7e4a2d3d5b5add10dd55c077668e00597
|
4
|
+
data.tar.gz: d8e85bbde5a89f7053254973345530c06298735d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c78da212afb13d9efe088a4b8aa5af3b1eb2cd38a297006123cfb000dfdca2fcd89bad1ba0fa55f8566c69923d93336dbd7b6f988287cfcd000724d5b00fa474
|
7
|
+
data.tar.gz: 372bfb459e06db35b768cf5ecedd6640ba347a5eb98eed4e68d5323d41f0480f8b84a78ba0b14d8f7540a8ca16627cb19c0107ba23f7b5f550dfbe2c2145e379
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -360,7 +360,7 @@ $.fn.form = function(fields, parameters) {
|
|
360
360
|
var
|
361
361
|
$field = module.get.field(field.identifier),
|
362
362
|
type = validation.type,
|
363
|
-
value = $field.val(),
|
363
|
+
value = $field.val() + '',
|
364
364
|
|
365
365
|
bracketRegExp = /\[(.*?)\]/i,
|
366
366
|
bracket = bracketRegExp.exec(type),
|
@@ -370,7 +370,7 @@ $.fn.form = function(fields, parameters) {
|
|
370
370
|
;
|
371
371
|
// if bracket notation is used, pass in extra parameters
|
372
372
|
if(bracket !== undefined && bracket !== null) {
|
373
|
-
ancillary = bracket[1];
|
373
|
+
ancillary = '' + bracket[1];
|
374
374
|
functionType = type.replace(bracket[0], '');
|
375
375
|
isValid = $.proxy(settings.rules[functionType], $module)(value, ancillary);
|
376
376
|
}
|
@@ -652,6 +652,7 @@ $.fn.form.settings = {
|
|
652
652
|
return (value != notValue);
|
653
653
|
},
|
654
654
|
contains: function(value, text) {
|
655
|
+
text = text.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
655
656
|
return (value.search(text) !== -1);
|
656
657
|
},
|
657
658
|
is: function(value, text) {
|
@@ -476,12 +476,12 @@ $.fn.dimmer = function(parameters) {
|
|
476
476
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
477
477
|
: query
|
478
478
|
;
|
479
|
-
if( $.isPlainObject( instance[
|
480
|
-
instance = instance[value];
|
481
|
-
}
|
482
|
-
else if( $.isPlainObject( instance[camelCaseValue] ) && (depth != maxDepth) ) {
|
479
|
+
if( $.isPlainObject( instance[camelCaseValue] ) && (depth != maxDepth) ) {
|
483
480
|
instance = instance[camelCaseValue];
|
484
481
|
}
|
482
|
+
else if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
|
483
|
+
instance = instance[value];
|
484
|
+
}
|
485
485
|
else if( instance[value] !== undefined ) {
|
486
486
|
found = instance[value];
|
487
487
|
return false;
|
@@ -46,9 +46,10 @@ $.fn.modal = function(parameters) {
|
|
46
46
|
|
47
47
|
$module = $(this),
|
48
48
|
$context = $(settings.context),
|
49
|
-
$otherModals = $allModules.not($module),
|
50
49
|
$close = $module.find(selector.close),
|
51
50
|
|
51
|
+
$allModals,
|
52
|
+
$otherModals,
|
52
53
|
$focusedElement,
|
53
54
|
$dimmable,
|
54
55
|
$dimmer,
|
@@ -80,12 +81,15 @@ $.fn.modal = function(parameters) {
|
|
80
81
|
.dimmer('get dimmer')
|
81
82
|
;
|
82
83
|
|
84
|
+
$otherModals = $module.siblings(selector.modal);
|
85
|
+
$allModals = $otherModals.add($module);
|
86
|
+
|
83
87
|
module.verbose('Attaching close events', $close);
|
84
88
|
$close
|
85
89
|
.on('click' + eventNamespace, module.event.close)
|
86
90
|
;
|
87
91
|
$window
|
88
|
-
.on('resize', function() {
|
92
|
+
.on('resize' + eventNamespace, function() {
|
89
93
|
module.event.debounce(module.refresh, 50);
|
90
94
|
})
|
91
95
|
;
|
@@ -165,9 +169,9 @@ $.fn.modal = function(parameters) {
|
|
165
169
|
}
|
166
170
|
},
|
167
171
|
click: function(event) {
|
168
|
-
|
169
|
-
|
170
|
-
module.
|
172
|
+
if( $(event.target).closest(selector.modal).size() === 0 ) {
|
173
|
+
module.debug('Dimmer clicked, hiding all modals');
|
174
|
+
module.hideAll();
|
171
175
|
event.stopImmediatePropagation();
|
172
176
|
}
|
173
177
|
},
|
@@ -207,79 +211,145 @@ $.fn.modal = function(parameters) {
|
|
207
211
|
}
|
208
212
|
},
|
209
213
|
|
210
|
-
show: function() {
|
214
|
+
show: function(callback) {
|
215
|
+
callback = $.isFunction(callback)
|
216
|
+
? callback
|
217
|
+
: function(){}
|
218
|
+
;
|
211
219
|
module.showDimmer();
|
212
|
-
module.
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
220
|
+
module.showModal(callback);
|
221
|
+
},
|
222
|
+
|
223
|
+
showModal: function(callback) {
|
224
|
+
callback = $.isFunction(callback)
|
225
|
+
? callback
|
226
|
+
: function(){}
|
227
|
+
;
|
228
|
+
if( !module.is.active() ) {
|
229
|
+
module.debug('Showing modal');
|
230
|
+
module.cacheSizes();
|
231
|
+
module.set.position();
|
232
|
+
|
233
|
+
if( $otherModals.filter(':visible').size() > 0 ) {
|
234
|
+
module.debug('Other modals visible, queueing show animation');
|
235
|
+
module.hideOthers(module.showModal);
|
236
|
+
}
|
237
|
+
else {
|
238
|
+
if(settings.transition && $.fn.transition !== undefined) {
|
239
|
+
$module
|
240
|
+
.transition(settings.transition + ' in', settings.duration, function() {
|
241
|
+
module.set.active();
|
242
|
+
callback();
|
243
|
+
})
|
244
|
+
;
|
245
|
+
}
|
246
|
+
else {
|
247
|
+
$module
|
248
|
+
.fadeIn(settings.duration, settings.easing, function() {
|
249
|
+
module.set.active();
|
250
|
+
callback();
|
251
|
+
})
|
252
|
+
;
|
253
|
+
}
|
254
|
+
$.proxy(settings.onShow, element)();
|
255
|
+
}
|
219
256
|
}
|
220
257
|
else {
|
221
|
-
|
222
|
-
.fadeIn(settings.duration, settings.easing, module.set.active)
|
223
|
-
;
|
258
|
+
module.debug('Modal is already visible');
|
224
259
|
}
|
225
|
-
module.debug('Triggering dimmer');
|
226
|
-
$.proxy(settings.onShow, element)();
|
227
260
|
},
|
228
261
|
|
229
262
|
showDimmer: function() {
|
230
|
-
|
231
|
-
|
263
|
+
if( !$dimmable.dimmer('is active') ) {
|
264
|
+
module.debug('Showing dimmer');
|
265
|
+
$dimmable.dimmer('show');
|
266
|
+
}
|
267
|
+
else {
|
268
|
+
module.debug('Dimmer already visible');
|
269
|
+
}
|
232
270
|
},
|
233
271
|
|
234
|
-
hide: function() {
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
272
|
+
hide: function(callback) {
|
273
|
+
callback = $.isFunction(callback)
|
274
|
+
? callback
|
275
|
+
: function(){}
|
276
|
+
;
|
277
|
+
module.hideDimmer();
|
278
|
+
module.hideModal(callback);
|
279
|
+
},
|
280
|
+
|
281
|
+
hideDimmer: function() {
|
240
282
|
if( $dimmable.dimmer('is active') ) {
|
283
|
+
module.debug('Hiding dimmer');
|
284
|
+
if(settings.closable) {
|
285
|
+
$dimmer
|
286
|
+
.off('click' + eventNamespace)
|
287
|
+
;
|
288
|
+
}
|
241
289
|
$dimmable.dimmer('hide');
|
242
290
|
}
|
243
|
-
if( module.is.active() ) {
|
244
|
-
module.hideModal();
|
245
|
-
$.proxy(settings.onHide, element)();
|
246
|
-
}
|
247
291
|
else {
|
248
|
-
module.debug('
|
292
|
+
module.debug('Dimmer is not visible cannot hide');
|
249
293
|
}
|
250
294
|
},
|
251
295
|
|
252
|
-
|
253
|
-
|
254
|
-
|
296
|
+
hideModal: function(callback) {
|
297
|
+
callback = $.isFunction(callback)
|
298
|
+
? callback
|
299
|
+
: function(){}
|
300
|
+
;
|
301
|
+
if( module.is.active() ) {
|
302
|
+
module.debug('Hiding modal');
|
303
|
+
module.remove.keyboardShortcuts();
|
304
|
+
if(settings.transition && $.fn.transition !== undefined) {
|
305
|
+
$module
|
306
|
+
.transition(settings.transition + ' out', settings.duration, function() {
|
307
|
+
module.remove.active();
|
308
|
+
module.restore.focus();
|
309
|
+
callback();
|
310
|
+
})
|
311
|
+
;
|
312
|
+
}
|
313
|
+
else {
|
314
|
+
$module
|
315
|
+
.fadeOut(settings.duration, settings.easing, function() {
|
316
|
+
module.remove.active();
|
317
|
+
module.restore.focus();
|
318
|
+
callback();
|
319
|
+
})
|
320
|
+
;
|
321
|
+
}
|
322
|
+
$.proxy(settings.onHide, element)();
|
323
|
+
}
|
255
324
|
},
|
256
325
|
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
else {
|
269
|
-
$module
|
270
|
-
.fadeOut(settings.duration, settings.easing, function() {
|
271
|
-
module.remove.active();
|
272
|
-
module.restore.focus();
|
273
|
-
})
|
326
|
+
hideAll: function(callback) {
|
327
|
+
callback = $.isFunction(callback)
|
328
|
+
? callback
|
329
|
+
: function(){}
|
330
|
+
;
|
331
|
+
if( $allModals.is(':visible') ) {
|
332
|
+
module.debug('Hiding all visible modals');
|
333
|
+
module.hideDimmer();
|
334
|
+
$allModals
|
335
|
+
.filter(':visible')
|
336
|
+
.modal('hide modal', callback)
|
274
337
|
;
|
275
338
|
}
|
276
339
|
},
|
277
340
|
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
341
|
+
hideOthers: function(callback) {
|
342
|
+
callback = $.isFunction(callback)
|
343
|
+
? callback
|
344
|
+
: function(){}
|
282
345
|
;
|
346
|
+
if( $otherModals.is(':visible') ) {
|
347
|
+
module.debug('Hiding other modals');
|
348
|
+
$otherModals
|
349
|
+
.filter(':visible')
|
350
|
+
.modal('hide modal', callback)
|
351
|
+
;
|
352
|
+
}
|
283
353
|
},
|
284
354
|
|
285
355
|
add: {
|
@@ -357,6 +427,7 @@ $.fn.modal = function(parameters) {
|
|
357
427
|
;
|
358
428
|
if(settings.closable) {
|
359
429
|
$dimmer
|
430
|
+
.off('click' + eventNamespace)
|
360
431
|
.on('click' + eventNamespace, module.event.click)
|
361
432
|
;
|
362
433
|
}
|
@@ -511,20 +582,20 @@ $.fn.modal = function(parameters) {
|
|
511
582
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
512
583
|
: query
|
513
584
|
;
|
514
|
-
if( $.isPlainObject( instance[
|
515
|
-
instance = instance[value];
|
516
|
-
}
|
517
|
-
else if( $.isPlainObject( instance[camelCaseValue] ) && (depth != maxDepth) ) {
|
585
|
+
if( $.isPlainObject( instance[camelCaseValue] ) && (depth != maxDepth) ) {
|
518
586
|
instance = instance[camelCaseValue];
|
519
587
|
}
|
520
|
-
else if( instance[value] !== undefined ) {
|
521
|
-
found = instance[value];
|
522
|
-
return false;
|
523
|
-
}
|
524
588
|
else if( instance[camelCaseValue] !== undefined ) {
|
525
589
|
found = instance[camelCaseValue];
|
526
590
|
return false;
|
527
591
|
}
|
592
|
+
else if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
|
593
|
+
instance = instance[value];
|
594
|
+
}
|
595
|
+
else if( instance[value] !== undefined ) {
|
596
|
+
found = instance[value];
|
597
|
+
return false;
|
598
|
+
}
|
528
599
|
else {
|
529
600
|
module.error(error.method);
|
530
601
|
return false;
|
@@ -595,7 +666,8 @@ $.fn.modal.settings = {
|
|
595
666
|
selector : {
|
596
667
|
close : '.close, .actions .button',
|
597
668
|
approve : '.actions .positive, .actions .approve',
|
598
|
-
deny : '.actions .negative, .actions .cancel'
|
669
|
+
deny : '.actions .negative, .actions .cancel',
|
670
|
+
modal : '.ui.modal'
|
599
671
|
},
|
600
672
|
error : {
|
601
673
|
dimmer : 'UI Dimmer, a required component is not included in this page',
|
@@ -214,10 +214,18 @@
|
|
214
214
|
/* On Field(s) */
|
215
215
|
|
216
216
|
.ui.form .fields.error .field label,
|
217
|
-
.ui.form .field.error label
|
217
|
+
.ui.form .field.error label,
|
218
|
+
.ui.form .fields.error .field .input,
|
219
|
+
.ui.form .field.error .input {
|
218
220
|
color: #D95C5C;
|
219
221
|
}
|
220
222
|
|
223
|
+
.ui.form .fields.error .field .corner.label,
|
224
|
+
.ui.form .field.error .corner.label {
|
225
|
+
border-color: #D95C5C;
|
226
|
+
color: #FFFFFF;
|
227
|
+
}
|
228
|
+
|
221
229
|
.ui.form .fields.error .field textarea,
|
222
230
|
.ui.form .fields.error .field input[type="text"],
|
223
231
|
.ui.form .fields.error .field input[type="email"],
|
@@ -46,6 +46,20 @@ a.ui.label {
|
|
46
46
|
cursor: pointer;
|
47
47
|
}
|
48
48
|
|
49
|
+
/* Inside Link */
|
50
|
+
|
51
|
+
.ui.label a {
|
52
|
+
cursor: pointer;
|
53
|
+
color: inherit;
|
54
|
+
opacity: 0.8;
|
55
|
+
-webkit-transition: 0.2s opacity ease;
|
56
|
+
transition: 0.2s opacity ease;
|
57
|
+
}
|
58
|
+
|
59
|
+
.ui.label a:hover {
|
60
|
+
opacity: 1;
|
61
|
+
}
|
62
|
+
|
49
63
|
/* Detail */
|
50
64
|
|
51
65
|
.ui.label .detail {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: semantic-ui-sass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- doabit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|