less-rails-semantic_ui 1.2.0.0 → 1.3.1.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.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/assets/javascripts/semantic_ui/definitions/behaviors/api.js +1 -0
  3. data/assets/javascripts/semantic_ui/definitions/behaviors/form.js +8 -4
  4. data/assets/javascripts/semantic_ui/definitions/behaviors/visibility.js +36 -17
  5. data/assets/javascripts/semantic_ui/definitions/behaviors/visit.js +2 -2
  6. data/assets/javascripts/semantic_ui/definitions/modules/accordion.js +2 -1
  7. data/assets/javascripts/semantic_ui/definitions/modules/checkbox.js +2 -1
  8. data/assets/javascripts/semantic_ui/definitions/modules/dimmer.js +1 -0
  9. data/assets/javascripts/semantic_ui/definitions/modules/dropdown.js +206 -108
  10. data/assets/javascripts/semantic_ui/definitions/modules/modal.js +79 -61
  11. data/assets/javascripts/semantic_ui/definitions/modules/sidebar.js +41 -5
  12. data/assets/javascripts/semantic_ui/definitions/modules/transition.js +1 -1
  13. data/assets/javascripts/semantic_ui/definitions/modules/video.js +1 -0
  14. data/assets/stylesheets/semantic_ui/definitions/collections/form.less +6 -4
  15. data/assets/stylesheets/semantic_ui/definitions/collections/grid.less +104 -99
  16. data/assets/stylesheets/semantic_ui/definitions/collections/table.less +155 -40
  17. data/assets/stylesheets/semantic_ui/definitions/elements/button.less +3 -2
  18. data/assets/stylesheets/semantic_ui/definitions/elements/image.less +28 -2
  19. data/assets/stylesheets/semantic_ui/definitions/elements/label.less +17 -1
  20. data/assets/stylesheets/semantic_ui/definitions/elements/segment.less +0 -4
  21. data/assets/stylesheets/semantic_ui/definitions/elements/step.less +82 -10
  22. data/assets/stylesheets/semantic_ui/definitions/modules/dropdown.less +31 -3
  23. data/assets/stylesheets/semantic_ui/definitions/modules/modal.less +0 -6
  24. data/assets/stylesheets/semantic_ui/definitions/modules/sidebar.less +6 -2
  25. data/assets/stylesheets/semantic_ui/themes/default/collections/table.variables +2 -2
  26. data/assets/stylesheets/semantic_ui/themes/default/elements/button.variables +1 -1
  27. data/assets/stylesheets/semantic_ui/themes/default/elements/step.variables +8 -3
  28. data/assets/stylesheets/semantic_ui/themes/default/globals/site.variables +1 -0
  29. data/assets/stylesheets/semantic_ui/themes/default/modules/dropdown.overrides +5 -0
  30. data/assets/stylesheets/semantic_ui/themes/default/modules/dropdown.variables +9 -0
  31. data/assets/stylesheets/semantic_ui/themes/default/modules/modal.variables +0 -3
  32. data/less-rails-semantic_ui.gemspec +2 -2
  33. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c67e7f81931898989959fe03c57a3bbb3d419456
4
- data.tar.gz: ff263f25b36c3b9ecba87e5c0f78427e041d2437
3
+ metadata.gz: 82ce8b225641bbd0e9c4c49ea5a780e388ef7e93
4
+ data.tar.gz: ec560e50cd89ad77def4893abf6ed3bc74b2b342
5
5
  SHA512:
6
- metadata.gz: 2b4659771cff917502d5510281ccfed93361a953a354dedfd1bbdcab528fa1e706dc3272ad1727df8d43091305d2b89d5eebd03f4d87b438a503a7b00311ed69
7
- data.tar.gz: 848a2a23361e230b1c9cd68d52ad6d1705407baeab00c38305fd9994b5cf0b408cbc8ce43f235448ddbf839096ad5814a6916fa4c4c71cf4a525802f05099a0e
6
+ metadata.gz: b5411e1275286ffc2f6728990161d0f2b31b07dcf1b1da165c7b9f41236670ad127f09a2345fe517149e8796a8f8868b86351c830dcef0bacec997d697226504
7
+ data.tar.gz: 2ac091b025b69aada0296eb41bd38639d15db5a2013ac989e5a2a34d902843941926b46e0f6f0d00c387925ca820cdc75bce02c4fb2b76c7b81f05df7d3a875f
@@ -801,6 +801,7 @@ $.api.settings = {
801
801
  exitConditions : 'API Request Aborted. Exit conditions met',
802
802
  JSONParse : 'JSON could not be parsed during error handling',
803
803
  legacyParameters : 'You are using legacy API success callback names',
804
+ method : 'The method you called is not defined',
804
805
  missingAction : 'API action used but no url was defined',
805
806
  missingSerialize : 'Required dependency jquery-serialize-object missing, using basic serialize',
806
807
  missingURL : 'No URL specified for api event',
@@ -375,7 +375,7 @@ $.fn.form = function(fields, parameters) {
375
375
  if(allValid) {
376
376
  module.debug('Form has no validation errors, submitting');
377
377
  module.set.success();
378
- return $.proxy(settings.onSuccess, this)(event);
378
+ return $.proxy(settings.onSuccess, element)(event);
379
379
  }
380
380
  else {
381
381
  module.debug('Form has errors');
@@ -387,7 +387,7 @@ $.fn.form = function(fields, parameters) {
387
387
  if($module.data('moduleApi') !== undefined) {
388
388
  event.stopImmediatePropagation();
389
389
  }
390
- return $.proxy(settings.onFailure, this)(formErrors);
390
+ return $.proxy(settings.onFailure, element)(formErrors);
391
391
  }
392
392
  },
393
393
 
@@ -398,7 +398,11 @@ $.fn.form = function(fields, parameters) {
398
398
  fieldValid = true,
399
399
  fieldErrors = []
400
400
  ;
401
- if(field.optional && $.trim($field.val()) === ''){
401
+ if($field.prop('disabled')) {
402
+ module.debug('Field is disabled. Skipping', field.identifier);
403
+ fieldValid = true;
404
+ }
405
+ else if(field.optional && $.trim($field.val()) === ''){
402
406
  module.debug('Field is optional and empty. Skipping', field.identifier);
403
407
  fieldValid = true;
404
408
  }
@@ -441,7 +445,7 @@ $.fn.form = function(fields, parameters) {
441
445
  if(bracket !== undefined && bracket !== null) {
442
446
  ancillary = '' + bracket[1];
443
447
  functionType = type.replace(bracket[0], '');
444
- isValid = $.proxy(settings.rules[functionType], $module)(value, ancillary);
448
+ isValid = $.proxy(settings.rules[functionType], element)(value, ancillary);
445
449
  }
446
450
  // normal notation
447
451
  else {
@@ -62,17 +62,18 @@ $.fn.visibility = function(parameters) {
62
62
 
63
63
  module.setup.cache();
64
64
  module.save.position();
65
- module.bindEvents();
66
- module.instantiate();
67
65
 
68
- if(settings.type == 'image') {
69
- module.setup.image();
70
- }
71
- if(settings.type == 'fixed') {
72
- module.setup.fixed();
66
+ if( module.should.trackChanges() ) {
67
+ module.bindEvents();
68
+ if(settings.type == 'image') {
69
+ module.setup.image();
70
+ }
71
+ if(settings.type == 'fixed') {
72
+ module.setup.fixed();
73
+ }
73
74
  }
74
-
75
- requestAnimationFrame(module.checkVisibility);
75
+ module.checkVisibility();
76
+ module.instantiate();
76
77
  },
77
78
 
78
79
  instantiate: function() {
@@ -144,6 +145,19 @@ $.fn.visibility = function(parameters) {
144
145
  }
145
146
  },
146
147
 
148
+ should: {
149
+
150
+ trackChanges: function() {
151
+ if(methodInvoked && queryArguments.length > 0) {
152
+ module.debug('One time query, no need to bind events');
153
+ return false;
154
+ }
155
+ module.debug('Query is attaching callbacks, watching for changes with scroll');
156
+ return true;
157
+ }
158
+
159
+ },
160
+
147
161
  setup: {
148
162
  cache: function() {
149
163
  module.cache = {
@@ -208,7 +222,7 @@ $.fn.visibility = function(parameters) {
208
222
  .attr('src', src)
209
223
  ;
210
224
  if(offScreen) {
211
- module.verbose('Image outside browser, avoiding animation')
225
+ module.verbose('Image outside browser, no show animation');
212
226
  $module.show();
213
227
  }
214
228
  else {
@@ -240,10 +254,7 @@ $.fn.visibility = function(parameters) {
240
254
 
241
255
  checkVisibility: function() {
242
256
  module.verbose('Checking visibility of element', module.cache.element);
243
- module.save.scroll();
244
- module.save.direction();
245
- module.save.screenCalculations();
246
- module.save.elementCalculations();
257
+ module.save.calculations();
247
258
 
248
259
  // percentage
249
260
  module.passed();
@@ -368,7 +379,7 @@ $.fn.visibility = function(parameters) {
368
379
  module.remove.occurred(callbackName);
369
380
  }
370
381
  if(newCallback === undefined) {
371
- return calculations.onTopPassed;
382
+ return calculations.topPassed;
372
383
  }
373
384
  },
374
385
 
@@ -543,6 +554,13 @@ $.fn.visibility = function(parameters) {
543
554
  },
544
555
 
545
556
  save: {
557
+ calculations: function() {
558
+ module.verbose('Saving all calculations necessary to determine positioning');
559
+ module.save.scroll();
560
+ module.save.direction();
561
+ module.save.screenCalculations();
562
+ module.save.elementCalculations();
563
+ },
546
564
  occurred: function(callback) {
547
565
  if(callback) {
548
566
  if(module.cache.occurred[callback] === undefined || (module.cache.occurred[callback] !== true)) {
@@ -846,6 +864,7 @@ $.fn.visibility = function(parameters) {
846
864
  return false;
847
865
  }
848
866
  else {
867
+ module.error(error.method, query);
849
868
  return false;
850
869
  }
851
870
  });
@@ -914,7 +933,7 @@ $.fn.visibility.settings = {
914
933
  // special visibility type (image, fixed)
915
934
  type : false,
916
935
 
917
- // image only settings
936
+ // image only animation settings
918
937
  transition : false,
919
938
  duration : 500,
920
939
 
@@ -943,7 +962,7 @@ $.fn.visibility.settings = {
943
962
  onScroll : function(){},
944
963
 
945
964
  error : {
946
- method : 'The method you called is not defined.'
965
+ method : 'The method you called is not defined.'
947
966
  }
948
967
 
949
968
  };
@@ -233,10 +233,10 @@ $.visit = $.fn.visit = function(parameters) {
233
233
  if(settings.limit) {
234
234
  if(value >= settings.limit) {
235
235
  module.debug('Pages viewed exceeded limit, firing callback', value, settings.limit);
236
- $.proxy(settings.onLimit, this)(value);
236
+ $.proxy(settings.onLimit, element)(value);
237
237
  }
238
238
  module.debug('Limit not reached', value, settings.limit);
239
- $.proxy(settings.onChange, this)(value);
239
+ $.proxy(settings.onChange, element)(value);
240
240
  }
241
241
  module.update.display(value);
242
242
  }
@@ -414,6 +414,7 @@ $.fn.accordion = function(parameters) {
414
414
  return false;
415
415
  }
416
416
  else {
417
+ module.error(error.method, query);
417
418
  return false;
418
419
  }
419
420
  });
@@ -477,7 +478,7 @@ $.fn.accordion.settings = {
477
478
  onChange : function(){},
478
479
 
479
480
  error: {
480
- method : 'The method you called is not defined'
481
+ method : 'The method you called is not defined'
481
482
  },
482
483
 
483
484
  className : {
@@ -421,6 +421,7 @@ $.fn.checkbox = function(parameters) {
421
421
  return false;
422
422
  }
423
423
  else {
424
+ module.error(error.method, query);
424
425
  return false;
425
426
  }
426
427
  });
@@ -492,7 +493,7 @@ $.fn.checkbox.settings = {
492
493
  },
493
494
 
494
495
  error : {
495
- method : 'The method you called is not defined.'
496
+ method : 'The method you called is not defined'
496
497
  },
497
498
 
498
499
  selector : {
@@ -523,6 +523,7 @@ $.fn.dimmer = function(parameters) {
523
523
  return false;
524
524
  }
525
525
  else {
526
+ module.error(error.method, query);
526
527
  return false;
527
528
  }
528
529
  });