semantic-ui-rails 0.10.3 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/semantic-ui/modules/accordion.js +10 -10
  3. data/app/assets/javascripts/semantic-ui/modules/behavior/api.js +11 -11
  4. data/app/assets/javascripts/semantic-ui/modules/behavior/form.js +10 -10
  5. data/app/assets/javascripts/semantic-ui/modules/behavior/state.js +10 -10
  6. data/app/assets/javascripts/semantic-ui/modules/checkbox.js +10 -10
  7. data/app/assets/javascripts/semantic-ui/modules/dimmer.js +11 -11
  8. data/app/assets/javascripts/semantic-ui/modules/dropdown.js +10 -10
  9. data/app/assets/javascripts/semantic-ui/modules/modal.js +56 -48
  10. data/app/assets/javascripts/semantic-ui/modules/nag.js +10 -10
  11. data/app/assets/javascripts/semantic-ui/modules/popup.js +30 -20
  12. data/app/assets/javascripts/semantic-ui/modules/rating.js +10 -10
  13. data/app/assets/javascripts/semantic-ui/modules/search.js +10 -10
  14. data/app/assets/javascripts/semantic-ui/modules/shape.js +10 -10
  15. data/app/assets/javascripts/semantic-ui/modules/sidebar.js +10 -10
  16. data/app/assets/javascripts/semantic-ui/modules/tab.js +11 -11
  17. data/app/assets/javascripts/semantic-ui/modules/transition.js +233 -110
  18. data/app/assets/javascripts/semantic-ui/modules/video.js +10 -10
  19. data/app/assets/stylesheets/semantic-ui/modules/accordion.less +0 -1
  20. data/app/assets/stylesheets/semantic-ui/modules/dimmer.less +1 -11
  21. data/app/assets/stylesheets/semantic-ui/modules/popup.less +1 -0
  22. data/app/assets/stylesheets/semantic-ui/modules/transition.less +5 -4
  23. data/lib/semantic/ui/rails/version.rb +1 -1
  24. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 640b5cb091f35adaf403b2e3d512b58884fb775b
4
- data.tar.gz: ba5b5cc20f740dee4aad8deb72bf3c8a97536fba
3
+ metadata.gz: cab5036ffec4486fce505b51df41cb468e363d51
4
+ data.tar.gz: b20a43e6556b586ca7aa6cf941d57fa3ea1c13af
5
5
  SHA512:
6
- metadata.gz: 900745d5988f71834195fb270f1888b2a34a09ecd67bebeb7078a2550bddee48b4aa53ad5ec9ed3320ff44bc8eec2ab6b8ad50928a1ff6d33c454c61ccc732cb
7
- data.tar.gz: cd9b2ca81dd466924abdd56157730aac74122c5677aca23f93a553ffb31f2ab2e9eb7b7842f16b62e30495a05ac99275d6e4ba904443287f9f9a5f285d1b0d61
6
+ metadata.gz: 671da5c38cf30ec6550ac6ea81379018e3921fa84a1999efef65a6b3d071336df02861d818e8cf54590f842bfd9192f9d00cae3ff6182f8894dcde72a351d652
7
+ data.tar.gz: 4a5e0a34a8e948a39e3988fe159289af6724e91cf940583314378e5175740730294052ec69b0e3fb0258a7414d1336e340add0a5a02015a7c77f70d93b0b82bb
@@ -305,13 +305,14 @@ $.fn.accordion = function(parameters) {
305
305
  },
306
306
  invoke: function(query, passedArguments, context) {
307
307
  var
308
+ object = instance,
308
309
  maxDepth,
309
310
  found,
310
311
  response
311
312
  ;
312
313
  passedArguments = passedArguments || queryArguments;
313
314
  context = element || context;
314
- if(typeof query == 'string' && instance !== undefined) {
315
+ if(typeof query == 'string' && object !== undefined) {
315
316
  query = query.split(/[\. ]/);
316
317
  maxDepth = query.length - 1;
317
318
  $.each(query, function(depth, value) {
@@ -319,22 +320,21 @@ $.fn.accordion = function(parameters) {
319
320
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
320
321
  : query
321
322
  ;
322
- if( $.isPlainObject( instance[camelCaseValue] ) && (depth != maxDepth) ) {
323
- instance = instance[camelCaseValue];
323
+ if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
324
+ object = object[camelCaseValue];
324
325
  }
325
- else if( instance[camelCaseValue] !== undefined ) {
326
- found = instance[camelCaseValue];
326
+ else if( object[camelCaseValue] !== undefined ) {
327
+ found = object[camelCaseValue];
327
328
  return false;
328
329
  }
329
- else if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
330
- instance = instance[value];
330
+ else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
331
+ object = object[value];
331
332
  }
332
- else if( instance[value] !== undefined ) {
333
- found = instance[value];
333
+ else if( object[value] !== undefined ) {
334
+ found = object[value];
334
335
  return false;
335
336
  }
336
337
  else {
337
- module.error(error.method, query);
338
338
  return false;
339
339
  }
340
340
  });
@@ -450,13 +450,14 @@
450
450
  },
451
451
  invoke: function(query, passedArguments, context) {
452
452
  var
453
+ object = instance,
453
454
  maxDepth,
454
455
  found,
455
456
  response
456
457
  ;
457
458
  passedArguments = passedArguments || queryArguments;
458
459
  context = element || context;
459
- if(typeof query == 'string' && instance !== undefined) {
460
+ if(typeof query == 'string' && object !== undefined) {
460
461
  query = query.split(/[\. ]/);
461
462
  maxDepth = query.length - 1;
462
463
  $.each(query, function(depth, value) {
@@ -464,22 +465,21 @@
464
465
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
465
466
  : query
466
467
  ;
467
- if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
468
- instance = instance[value];
468
+ if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
469
+ object = object[camelCaseValue];
469
470
  }
470
- else if( $.isPlainObject( instance[camelCaseValue] ) && (depth != maxDepth) ) {
471
- instance = instance[camelCaseValue];
472
- }
473
- else if( instance[value] !== undefined ) {
474
- found = instance[value];
471
+ else if( object[camelCaseValue] !== undefined ) {
472
+ found = object[camelCaseValue];
475
473
  return false;
476
474
  }
477
- else if( instance[camelCaseValue] !== undefined ) {
478
- found = instance[camelCaseValue];
475
+ else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
476
+ object = object[value];
477
+ }
478
+ else if( object[value] !== undefined ) {
479
+ found = object[value];
479
480
  return false;
480
481
  }
481
482
  else {
482
- module.error(error.method, query);
483
483
  return false;
484
484
  }
485
485
  });
@@ -486,13 +486,14 @@ $.fn.form = function(fields, parameters) {
486
486
  },
487
487
  invoke: function(query, passedArguments, context) {
488
488
  var
489
+ object = instance,
489
490
  maxDepth,
490
491
  found,
491
492
  response
492
493
  ;
493
494
  passedArguments = passedArguments || queryArguments;
494
495
  context = element || context;
495
- if(typeof query == 'string' && instance !== undefined) {
496
+ if(typeof query == 'string' && object !== undefined) {
496
497
  query = query.split(/[\. ]/);
497
498
  maxDepth = query.length - 1;
498
499
  $.each(query, function(depth, value) {
@@ -500,22 +501,21 @@ $.fn.form = function(fields, parameters) {
500
501
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
501
502
  : query
502
503
  ;
503
- if( $.isPlainObject( instance[camelCaseValue] ) && (depth != maxDepth) ) {
504
- instance = instance[camelCaseValue];
504
+ if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
505
+ object = object[camelCaseValue];
505
506
  }
506
- else if( instance[camelCaseValue] !== undefined ) {
507
- found = instance[camelCaseValue];
507
+ else if( object[camelCaseValue] !== undefined ) {
508
+ found = object[camelCaseValue];
508
509
  return false;
509
510
  }
510
- else if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
511
- instance = instance[value];
511
+ else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
512
+ object = object[value];
512
513
  }
513
- else if( instance[value] !== undefined ) {
514
- found = instance[value];
514
+ else if( object[value] !== undefined ) {
515
+ found = object[value];
515
516
  return false;
516
517
  }
517
518
  else {
518
- module.error(error.method, query);
519
519
  return false;
520
520
  }
521
521
  });
@@ -542,13 +542,14 @@ $.fn.state = function(parameters) {
542
542
  },
543
543
  invoke: function(query, passedArguments, context) {
544
544
  var
545
+ object = instance,
545
546
  maxDepth,
546
547
  found,
547
548
  response
548
549
  ;
549
550
  passedArguments = passedArguments || queryArguments;
550
551
  context = element || context;
551
- if(typeof query == 'string' && instance !== undefined) {
552
+ if(typeof query == 'string' && object !== undefined) {
552
553
  query = query.split(/[\. ]/);
553
554
  maxDepth = query.length - 1;
554
555
  $.each(query, function(depth, value) {
@@ -556,22 +557,21 @@ $.fn.state = function(parameters) {
556
557
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
557
558
  : query
558
559
  ;
559
- if( $.isPlainObject( instance[camelCaseValue] ) && (depth != maxDepth) ) {
560
- instance = instance[camelCaseValue];
560
+ if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
561
+ object = object[camelCaseValue];
561
562
  }
562
- else if( instance[camelCaseValue] !== undefined ) {
563
- found = instance[camelCaseValue];
563
+ else if( object[camelCaseValue] !== undefined ) {
564
+ found = object[camelCaseValue];
564
565
  return false;
565
566
  }
566
- else if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
567
- instance = instance[value];
567
+ else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
568
+ object = object[value];
568
569
  }
569
- else if( instance[value] !== undefined ) {
570
- found = instance[value];
570
+ else if( object[value] !== undefined ) {
571
+ found = object[value];
571
572
  return false;
572
573
  }
573
574
  else {
574
- module.error(error.method, query);
575
575
  return false;
576
576
  }
577
577
  });
@@ -236,13 +236,14 @@ $.fn.checkbox = function(parameters) {
236
236
  },
237
237
  invoke: function(query, passedArguments, context) {
238
238
  var
239
+ object = instance,
239
240
  maxDepth,
240
241
  found,
241
242
  response
242
243
  ;
243
244
  passedArguments = passedArguments || queryArguments;
244
245
  context = element || context;
245
- if(typeof query == 'string' && instance !== undefined) {
246
+ if(typeof query == 'string' && object !== undefined) {
246
247
  query = query.split(/[\. ]/);
247
248
  maxDepth = query.length - 1;
248
249
  $.each(query, function(depth, value) {
@@ -250,22 +251,21 @@ $.fn.checkbox = function(parameters) {
250
251
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
251
252
  : query
252
253
  ;
253
- if( $.isPlainObject( instance[camelCaseValue] ) && (depth != maxDepth) ) {
254
- instance = instance[camelCaseValue];
254
+ if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
255
+ object = object[camelCaseValue];
255
256
  }
256
- else if( instance[camelCaseValue] !== undefined ) {
257
- found = instance[camelCaseValue];
257
+ else if( object[camelCaseValue] !== undefined ) {
258
+ found = object[camelCaseValue];
258
259
  return false;
259
260
  }
260
- else if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
261
- instance = instance[value];
261
+ else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
262
+ object = object[value];
262
263
  }
263
- else if( instance[value] !== undefined ) {
264
- found = instance[value];
264
+ else if( object[value] !== undefined ) {
265
+ found = object[value];
265
266
  return false;
266
267
  }
267
268
  else {
268
- module.error(error.method, query);
269
269
  return false;
270
270
  }
271
271
  });
@@ -462,13 +462,14 @@ $.fn.dimmer = function(parameters) {
462
462
  },
463
463
  invoke: function(query, passedArguments, context) {
464
464
  var
465
+ object = instance,
465
466
  maxDepth,
466
467
  found,
467
468
  response
468
469
  ;
469
470
  passedArguments = passedArguments || queryArguments;
470
471
  context = element || context;
471
- if(typeof query == 'string' && instance !== undefined) {
472
+ if(typeof query == 'string' && object !== undefined) {
472
473
  query = query.split(/[\. ]/);
473
474
  maxDepth = query.length - 1;
474
475
  $.each(query, function(depth, value) {
@@ -476,22 +477,21 @@ $.fn.dimmer = function(parameters) {
476
477
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
477
478
  : query
478
479
  ;
479
- if( $.isPlainObject( instance[camelCaseValue] ) && (depth != maxDepth) ) {
480
- instance = instance[camelCaseValue];
480
+ if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
481
+ object = object[camelCaseValue];
481
482
  }
482
- else if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
483
- instance = instance[value];
484
- }
485
- else if( instance[value] !== undefined ) {
486
- found = instance[value];
483
+ else if( object[camelCaseValue] !== undefined ) {
484
+ found = object[camelCaseValue];
487
485
  return false;
488
486
  }
489
- else if( instance[camelCaseValue] !== undefined ) {
490
- found = instance[camelCaseValue];
487
+ else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
488
+ object = object[value];
489
+ }
490
+ else if( object[value] !== undefined ) {
491
+ found = object[value];
491
492
  return false;
492
493
  }
493
494
  else {
494
- module.error(error.method, query);
495
495
  return false;
496
496
  }
497
497
  });
@@ -464,7 +464,6 @@ $.fn.dropdown = function(parameters) {
464
464
  queue : false
465
465
  })
466
466
  ;
467
- $currentMenu.transition('force repaint');
468
467
  }
469
468
  else if(settings.transition == 'slide down') {
470
469
  $currentMenu
@@ -712,13 +711,14 @@ $.fn.dropdown = function(parameters) {
712
711
  },
713
712
  invoke: function(query, passedArguments, context) {
714
713
  var
714
+ object = instance,
715
715
  maxDepth,
716
716
  found,
717
717
  response
718
718
  ;
719
719
  passedArguments = passedArguments || queryArguments;
720
720
  context = element || context;
721
- if(typeof query == 'string' && instance !== undefined) {
721
+ if(typeof query == 'string' && object !== undefined) {
722
722
  query = query.split(/[\. ]/);
723
723
  maxDepth = query.length - 1;
724
724
  $.each(query, function(depth, value) {
@@ -726,18 +726,18 @@ $.fn.dropdown = function(parameters) {
726
726
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
727
727
  : query
728
728
  ;
729
- if( $.isPlainObject( instance[camelCaseValue] ) && (depth != maxDepth) ) {
730
- instance = instance[camelCaseValue];
729
+ if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
730
+ object = object[camelCaseValue];
731
731
  }
732
- else if( instance[camelCaseValue] !== undefined ) {
733
- found = instance[camelCaseValue];
732
+ else if( object[camelCaseValue] !== undefined ) {
733
+ found = object[camelCaseValue];
734
734
  return false;
735
735
  }
736
- else if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
737
- instance = instance[value];
736
+ else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
737
+ object = object[value];
738
738
  }
739
- else if( instance[value] !== undefined ) {
740
- found = instance[value];
739
+ else if( object[value] !== undefined ) {
740
+ found = object[value];
741
741
  return false;
742
742
  }
743
743
  else {
@@ -71,9 +71,11 @@ $.fn.modal = function(parameters) {
71
71
  $dimmable = $context
72
72
  .dimmer({
73
73
  closable : false,
74
- useCSS : module.is.modernBrowser(),
75
- show : settings.duration * 0.9,
76
- hide : settings.duration * 1.1
74
+ useCSS : true,
75
+ duration: {
76
+ show : settings.duration * 0.9,
77
+ hide : settings.duration * 1.1
78
+ }
77
79
  })
78
80
  .dimmer('add content', $module)
79
81
  ;
@@ -281,18 +283,22 @@ $.fn.modal = function(parameters) {
281
283
  },
282
284
 
283
285
  hideDimmer: function() {
284
- if( $dimmable.dimmer('is active') ) {
285
- module.debug('Hiding dimmer');
286
- if(settings.closable) {
287
- $dimmer
288
- .off('click' + eventNamespace)
289
- ;
290
- }
291
- $dimmable.dimmer('hide');
292
- }
293
- else {
286
+ if( !module.is.active() ) {
294
287
  module.debug('Dimmer is not visible cannot hide');
288
+ return;
289
+ }
290
+ module.debug('Hiding dimmer');
291
+ if(settings.closable) {
292
+ $dimmer
293
+ .off('click' + eventNamespace)
294
+ ;
295
295
  }
296
+ $dimmable.dimmer('hide', function() {
297
+ $module
298
+ .transition('reset')
299
+ ;
300
+ module.remove.active();
301
+ });
296
302
  },
297
303
 
298
304
  hideModal: function(callback) {
@@ -300,29 +306,31 @@ $.fn.modal = function(parameters) {
300
306
  ? callback
301
307
  : function(){}
302
308
  ;
303
- if( module.is.active() ) {
304
- module.debug('Hiding modal');
305
- module.remove.keyboardShortcuts();
306
- if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
307
- $module
308
- .transition(settings.transition + ' out', settings.duration, function() {
309
- module.remove.active();
310
- module.restore.focus();
311
- callback();
312
- })
313
- ;
314
- }
315
- else {
316
- $module
317
- .fadeOut(settings.duration, settings.easing, function() {
318
- module.remove.active();
319
- module.restore.focus();
320
- callback();
321
- })
322
- ;
323
- }
324
- $.proxy(settings.onHide, element)();
309
+ if( !module.is.active() ) {
310
+ module.debug('Cannot hide modal it is not active');
311
+ return;
312
+ }
313
+ module.debug('Hiding modal');
314
+ module.remove.keyboardShortcuts();
315
+ if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
316
+ $module
317
+ .transition(settings.transition + ' out', settings.duration, function() {
318
+ module.remove.active();
319
+ module.restore.focus();
320
+ callback();
321
+ })
322
+ ;
323
+ }
324
+ else {
325
+ $module
326
+ .fadeOut(settings.duration, settings.easing, function() {
327
+ module.remove.active();
328
+ module.restore.focus();
329
+ callback();
330
+ })
331
+ ;
325
332
  }
333
+ $.proxy(settings.onHide, element)();
326
334
  },
327
335
 
328
336
  hideAll: function(callback) {
@@ -414,8 +422,8 @@ $.fn.modal = function(parameters) {
414
422
  return $module.hasClass(className.active);
415
423
  },
416
424
  modernBrowser: function() {
417
- // lol
418
- return (navigator.appName !== 'Microsoft Internet Explorer');
425
+ // appName for IE11 reports 'Netscape' can no longer use
426
+ return !(window.ActiveXObject || "ActiveXObject" in window);
419
427
  }
420
428
  },
421
429
 
@@ -569,13 +577,14 @@ $.fn.modal = function(parameters) {
569
577
  },
570
578
  invoke: function(query, passedArguments, context) {
571
579
  var
580
+ object = instance,
572
581
  maxDepth,
573
582
  found,
574
583
  response
575
584
  ;
576
585
  passedArguments = passedArguments || queryArguments;
577
586
  context = element || context;
578
- if(typeof query == 'string' && instance !== undefined) {
587
+ if(typeof query == 'string' && object !== undefined) {
579
588
  query = query.split(/[\. ]/);
580
589
  maxDepth = query.length - 1;
581
590
  $.each(query, function(depth, value) {
@@ -583,22 +592,21 @@ $.fn.modal = function(parameters) {
583
592
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
584
593
  : query
585
594
  ;
586
- if( $.isPlainObject( instance[camelCaseValue] ) && (depth != maxDepth) ) {
587
- instance = instance[camelCaseValue];
595
+ if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
596
+ object = object[camelCaseValue];
588
597
  }
589
- else if( instance[camelCaseValue] !== undefined ) {
590
- found = instance[camelCaseValue];
598
+ else if( object[camelCaseValue] !== undefined ) {
599
+ found = object[camelCaseValue];
591
600
  return false;
592
601
  }
593
- else if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
594
- instance = instance[value];
602
+ else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
603
+ object = object[value];
595
604
  }
596
- else if( instance[value] !== undefined ) {
597
- found = instance[value];
605
+ else if( object[value] !== undefined ) {
606
+ found = object[value];
598
607
  return false;
599
608
  }
600
609
  else {
601
- module.error(error.method, query);
602
610
  return false;
603
611
  }
604
612
  });
@@ -648,7 +656,7 @@ $.fn.modal.settings = {
648
656
  name : 'Modal',
649
657
  namespace : 'modal',
650
658
 
651
- debug : true,
659
+ debug : false,
652
660
  verbose : true,
653
661
  performance : true,
654
662