semantic-ui-sass 1.7.0.0 → 1.7.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/app/assets/javascripts/semantic-ui/accordion.js +100 -47
  4. data/app/assets/javascripts/semantic-ui/api.js +9 -9
  5. data/app/assets/javascripts/semantic-ui/checkbox.js +14 -13
  6. data/app/assets/javascripts/semantic-ui/dimmer.js +9 -9
  7. data/app/assets/javascripts/semantic-ui/dropdown.js +98 -58
  8. data/app/assets/javascripts/semantic-ui/form.js +23 -23
  9. data/app/assets/javascripts/semantic-ui/modal.js +14 -14
  10. data/app/assets/javascripts/semantic-ui/popup.js +91 -40
  11. data/app/assets/javascripts/semantic-ui/progress.js +12 -6
  12. data/app/assets/javascripts/semantic-ui/rating.js +6 -6
  13. data/app/assets/javascripts/semantic-ui/search.js +217 -206
  14. data/app/assets/javascripts/semantic-ui/shape.js +8 -8
  15. data/app/assets/javascripts/semantic-ui/sidebar.js +116 -93
  16. data/app/assets/javascripts/semantic-ui/site.js +2 -2
  17. data/app/assets/javascripts/semantic-ui/state.js +6 -6
  18. data/app/assets/javascripts/semantic-ui/sticky.js +11 -11
  19. data/app/assets/javascripts/semantic-ui/tab.js +12 -12
  20. data/app/assets/javascripts/semantic-ui/transition.js +9 -9
  21. data/app/assets/javascripts/semantic-ui/video.js +4 -4
  22. data/app/assets/javascripts/semantic-ui/visibility.js +3 -3
  23. data/app/assets/javascripts/semantic-ui/visit.js +7 -7
  24. data/app/assets/stylesheets/semantic-ui/collections/_breadcrumb.scss +1 -1
  25. data/app/assets/stylesheets/semantic-ui/collections/_form.scss +1 -1
  26. data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +118 -14
  27. data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +23 -9
  28. data/app/assets/stylesheets/semantic-ui/collections/_message.scss +4 -4
  29. data/app/assets/stylesheets/semantic-ui/collections/_table.scss +1 -1
  30. data/app/assets/stylesheets/semantic-ui/elements/_button.scss +127 -126
  31. data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +1 -1
  32. data/app/assets/stylesheets/semantic-ui/elements/_flag.scss +1 -2
  33. data/app/assets/stylesheets/semantic-ui/elements/_header.scss +1 -1
  34. data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +2 -2
  35. data/app/assets/stylesheets/semantic-ui/elements/_image.scss +1 -1
  36. data/app/assets/stylesheets/semantic-ui/elements/_input.scss +1 -1
  37. data/app/assets/stylesheets/semantic-ui/elements/_label.scss +5 -5
  38. data/app/assets/stylesheets/semantic-ui/elements/_list.scss +4 -3
  39. data/app/assets/stylesheets/semantic-ui/elements/_loader.scss +1 -1
  40. data/app/assets/stylesheets/semantic-ui/elements/_rail.scss +1 -1
  41. data/app/assets/stylesheets/semantic-ui/elements/_reveal.scss +13 -1
  42. data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +1 -7
  43. data/app/assets/stylesheets/semantic-ui/elements/_step.scss +36 -35
  44. data/app/assets/stylesheets/semantic-ui/globals/_reset.scss +1 -1
  45. data/app/assets/stylesheets/semantic-ui/globals/_site.scss +23 -4
  46. data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +3 -3
  47. data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +1 -1
  48. data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +1 -1
  49. data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +115 -29
  50. data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +1 -1
  51. data/app/assets/stylesheets/semantic-ui/modules/_nag.scss +1 -1
  52. data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +1 -6
  53. data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +13 -1
  54. data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +1 -1
  55. data/app/assets/stylesheets/semantic-ui/modules/_search.scss +1 -1
  56. data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +1 -1
  57. data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +134 -16
  58. data/app/assets/stylesheets/semantic-ui/modules/_sticky.scss +1 -1
  59. data/app/assets/stylesheets/semantic-ui/modules/_tab.scss +1 -1
  60. data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +1 -1
  61. data/app/assets/stylesheets/semantic-ui/modules/_video.scss +1 -1
  62. data/app/assets/stylesheets/semantic-ui/views/_ad.scss +13 -1
  63. data/app/assets/stylesheets/semantic-ui/views/_card.scss +1 -1
  64. data/app/assets/stylesheets/semantic-ui/views/_comment.scss +1 -1
  65. data/app/assets/stylesheets/semantic-ui/views/_feed.scss +1 -1
  66. data/app/assets/stylesheets/semantic-ui/views/_item.scss +1 -1
  67. data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +1 -1
  68. data/lib/semantic/ui/sass/version.rb +2 -2
  69. metadata +2 -2
@@ -51,7 +51,7 @@ $.fn.dropdown = function(parameters) {
51
51
  $search = $module.find(selector.search),
52
52
  $input = $module.find(selector.input),
53
53
 
54
- $combo = ($module.prev().find(selector.text).size() > 0)
54
+ $combo = ($module.prev().find(selector.text).length > 0)
55
55
  ? $module.prev().find(selector.text)
56
56
  : $module.prev(),
57
57
 
@@ -138,12 +138,9 @@ $.fn.dropdown = function(parameters) {
138
138
  query = $search.val();
139
139
 
140
140
  module.verbose('Searching for query', query);
141
-
142
- if(module.is.searchSelection()) {
143
- module.filter(query);
144
- if( module.can.show() ) {
145
- module.show();
146
- }
141
+ module.filter(query);
142
+ if(module.is.searchSelection() && module.can.show() ) {
143
+ module.show();
147
144
  }
148
145
  },
149
146
 
@@ -170,10 +167,10 @@ $.fn.dropdown = function(parameters) {
170
167
  module.debug('Dropdown initialized on a select', selectValues);
171
168
  // see if select exists inside a dropdown
172
169
  $input = $module;
173
- if($input.parents(selector.dropdown).size() > 0) {
170
+ if($input.parents(selector.dropdown).length > 0) {
174
171
  module.debug('Creating dropdown menu only from template');
175
172
  $module = $input.closest(selector.dropdown);
176
- if($module.find('.' + className.dropdown).size() === 0) {
173
+ if($module.find('.' + className.dropdown).length === 0) {
177
174
  $('<div />')
178
175
  .addClass(className.menu)
179
176
  .html( settings.templates.menu( selectValues ))
@@ -222,16 +219,16 @@ $.fn.dropdown = function(parameters) {
222
219
  ? callback
223
220
  : function(){}
224
221
  ;
225
- if( !module.is.active() && !module.is.allFiltered() ) {
222
+ if( module.can.show() && !module.is.active() && !module.is.allFiltered() ) {
226
223
  module.debug('Showing dropdown');
227
224
  module.animate.show(function() {
228
225
  if( module.can.click() ) {
229
226
  module.bind.intent();
230
227
  }
231
228
  module.set.visible();
232
- $.proxy(callback, element)();
229
+ callback.call(element);
233
230
  });
234
- $.proxy(settings.onShow, element)();
231
+ settings.onShow.call(element);
235
232
  }
236
233
  },
237
234
 
@@ -244,9 +241,9 @@ $.fn.dropdown = function(parameters) {
244
241
  module.debug('Hiding dropdown');
245
242
  module.animate.hide(function() {
246
243
  module.remove.visible();
247
- $.proxy(callback, element)();
244
+ callback.call(element);
248
245
  });
249
- $.proxy(settings.onHide, element)();
246
+ settings.onHide.call(element);
250
247
  }
251
248
  },
252
249
 
@@ -302,6 +299,7 @@ $.fn.dropdown = function(parameters) {
302
299
  .on('click' + eventNamespace, selector.search, module.show)
303
300
  .on('focus' + eventNamespace, selector.search, module.event.searchFocus)
304
301
  .on('blur' + eventNamespace, selector.search, module.event.searchBlur)
302
+ .on('click' + eventNamespace, selector.text, module.event.searchTextFocus)
305
303
  ;
306
304
  }
307
305
  else {
@@ -366,8 +364,9 @@ $.fn.dropdown = function(parameters) {
366
364
  filter: function(searchTerm) {
367
365
  var
368
366
  $results = $(),
369
- exactRegExp = new RegExp('^' + searchTerm, 'igm'),
370
- fullTextRegExp = new RegExp(searchTerm, 'ig'),
367
+ escapedTerm = module.escape.regExp(searchTerm),
368
+ exactRegExp = new RegExp('^' + escapedTerm, 'igm'),
369
+ fullTextRegExp = new RegExp(escapedTerm, 'ig'),
371
370
  allItemsFiltered
372
371
  ;
373
372
  module.verbose('Searching for matching values');
@@ -375,8 +374,8 @@ $.fn.dropdown = function(parameters) {
375
374
  .each(function(){
376
375
  var
377
376
  $choice = $(this),
378
- text = module.get.choiceText($choice, false),
379
- value = module.get.choiceValue($choice, text)
377
+ text = String(module.get.choiceText($choice, false)),
378
+ value = String(module.get.choiceValue($choice, text))
380
379
  ;
381
380
  if( text.match(exactRegExp) || value.match(exactRegExp) ) {
382
381
  $results = $results.add($choice);
@@ -405,8 +404,10 @@ $.fn.dropdown = function(parameters) {
405
404
  ;
406
405
  if( module.is.allFiltered() ) {
407
406
  module.debug('All items filtered, hiding dropdown', searchTerm);
408
- module.hide();
409
- $.proxy(settings.onNoResults, element)(searchTerm);
407
+ if(module.is.searchSelection()) {
408
+ module.hide();
409
+ }
410
+ settings.onNoResults.call(element, searchTerm);
410
411
  }
411
412
  },
412
413
 
@@ -451,8 +452,14 @@ $.fn.dropdown = function(parameters) {
451
452
  module.hide();
452
453
  }
453
454
  },
455
+ searchTextFocus: function(event) {
456
+ activated = true;
457
+ $search.focus();
458
+ },
454
459
  input: function(event) {
455
- module.set.filtered();
460
+ if(module.is.searchSelection()) {
461
+ module.set.filtered();
462
+ }
456
463
  clearTimeout(module.timer);
457
464
  module.timer = setTimeout(module.search, settings.delay.search);
458
465
  },
@@ -469,14 +476,14 @@ $.fn.dropdown = function(parameters) {
469
476
  },
470
477
  selectedClass = className.selected,
471
478
  currentIndex = $visibleItems.index( $selectedItem ),
472
- hasSelectedItem = ($selectedItem.size() > 0),
479
+ hasSelectedItem = ($selectedItem.length > 0),
473
480
  $nextItem,
474
481
  newIndex
475
482
  ;
476
483
  // default to activated choice if no selection present
477
484
  if(!hasSelectedItem) {
478
485
  $selectedItem = $item.filter('.' + className.active).eq(0);
479
- hasSelectedItem = ($selectedItem.size() > 0);
486
+ hasSelectedItem = ($selectedItem.length > 0);
480
487
  }
481
488
  // close shortcuts
482
489
  if(pressedKey == keys.escape) {
@@ -492,7 +499,7 @@ $.fn.dropdown = function(parameters) {
492
499
  if(module.is.visible()) {
493
500
  if(pressedKey == keys.enter && hasSelectedItem) {
494
501
  module.verbose('Enter key pressed, choosing selected item');
495
- $.proxy(module.event.item.click, $selectedItem)(event);
502
+ module.event.item.click.call($selectedItem, event);
496
503
  event.preventDefault();
497
504
  return false;
498
505
  }
@@ -522,7 +529,7 @@ $.fn.dropdown = function(parameters) {
522
529
  else {
523
530
  $nextItem = $selectedItem.nextAll(selector.item + ':not(.' + className.filtered + ')').eq(0);
524
531
  }
525
- if(currentIndex + 1 < $visibleItems.size() ) {
532
+ if(currentIndex + 1 < $visibleItems.length ) {
526
533
  module.verbose('Down key pressed, changing active item');
527
534
  $item
528
535
  .removeClass(selectedClass)
@@ -577,7 +584,7 @@ $.fn.dropdown = function(parameters) {
577
584
  $currentMenu = $(this).children(selector.menu),
578
585
  $otherMenus = $(this).siblings(selector.item).children(selector.menu)
579
586
  ;
580
- if( $currentMenu.size() > 0 ) {
587
+ if( $currentMenu.length > 0 ) {
581
588
  clearTimeout(module.itemTimer);
582
589
  module.itemTimer = setTimeout(function() {
583
590
  $.each($otherMenus, function() {
@@ -594,7 +601,7 @@ $.fn.dropdown = function(parameters) {
594
601
  var
595
602
  $currentMenu = $(this).children(selector.menu)
596
603
  ;
597
- if($currentMenu.size() > 0) {
604
+ if($currentMenu.length > 0) {
598
605
  clearTimeout(module.itemTimer);
599
606
  module.itemTimer = setTimeout(function() {
600
607
  module.verbose('Hiding sub-menu', $currentMenu);
@@ -614,8 +621,8 @@ $.fn.dropdown = function(parameters) {
614
621
  module.remove.searchTerm();
615
622
  module.determine.selectAction(text, value);
616
623
  },
617
- openingSubMenu = ($subMenu.size() > 0),
618
- isSubItem = ($subMenu.find($target).size() > 0)
624
+ openingSubMenu = ($subMenu.length > 0),
625
+ isSubItem = ($subMenu.find($target).length > 0)
619
626
  ;
620
627
  if(isSubItem) {
621
628
  return false;
@@ -653,7 +660,7 @@ $.fn.dropdown = function(parameters) {
653
660
  ? callback
654
661
  : function(){}
655
662
  ;
656
- if( $(event.target).closest($module).size() === 0 ) {
663
+ if( $(event.target).closest($module).length === 0 ) {
657
664
  module.verbose('Triggering event', callback);
658
665
  callback();
659
666
  return true;
@@ -668,7 +675,7 @@ $.fn.dropdown = function(parameters) {
668
675
  ? callback
669
676
  : function(){}
670
677
  ;
671
- if( $(event.target).closest($menu).size() === 0 ) {
678
+ if( $(event.target).closest($menu).length === 0 ) {
672
679
  module.verbose('Triggering event', callback);
673
680
  callback();
674
681
  return true;
@@ -733,7 +740,7 @@ $.fn.dropdown = function(parameters) {
733
740
  return $text.text();
734
741
  },
735
742
  value: function() {
736
- return ($input.size() > 0)
743
+ return ($input.length > 0)
737
744
  ? $input.val()
738
745
  : $module.data(metadata.value)
739
746
  ;
@@ -744,7 +751,7 @@ $.fn.dropdown = function(parameters) {
744
751
  : settings.preserveHTML
745
752
  ;
746
753
  if($choice !== undefined) {
747
- if($choice.find(selector.menu).size() > 0) {
754
+ if($choice.find(selector.menu).length > 0) {
748
755
  module.verbose('Retreiving text of element with sub-menu');
749
756
  $choice = $choice.clone();
750
757
  $choice.find(selector.menu).remove();
@@ -753,8 +760,8 @@ $.fn.dropdown = function(parameters) {
753
760
  return ($choice.data(metadata.text) !== undefined)
754
761
  ? $choice.data(metadata.text)
755
762
  : (preserveHTML)
756
- ? $choice.html()
757
- : $choice.text()
763
+ ? $choice.html().trim()
764
+ : $choice.text().trim()
758
765
  ;
759
766
  }
760
767
  },
@@ -763,8 +770,8 @@ $.fn.dropdown = function(parameters) {
763
770
  return ($choice.data(metadata.value) !== undefined)
764
771
  ? $choice.data(metadata.value)
765
772
  : (typeof choiceText === 'string')
766
- ? choiceText.toLowerCase()
767
- : choiceText
773
+ ? choiceText.toLowerCase().trim()
774
+ : choiceText.trim()
768
775
  ;
769
776
  },
770
777
  inputEvent: function() {
@@ -893,6 +900,7 @@ $.fn.dropdown = function(parameters) {
893
900
  ;
894
901
  module.debug('Restoring default text', defaultText);
895
902
  module.set.text(defaultText);
903
+ $text.addClass(settings.className.placeholder);
896
904
  },
897
905
  defaultValue: function() {
898
906
  var
@@ -900,8 +908,14 @@ $.fn.dropdown = function(parameters) {
900
908
  ;
901
909
  if(defaultValue !== undefined) {
902
910
  module.debug('Restoring default value', defaultValue);
903
- module.set.selected(defaultValue);
904
- module.set.value(defaultValue);
911
+ if(defaultValue.length) {
912
+ module.set.selected(defaultValue);
913
+ module.set.value(defaultValue);
914
+ }
915
+ else {
916
+ module.remove.activeItem();
917
+ module.remove.selectedItem();
918
+ }
905
919
  }
906
920
  }
907
921
  },
@@ -970,7 +984,7 @@ $.fn.dropdown = function(parameters) {
970
984
  ;
971
985
 
972
986
  $item = $item || module.get.activeItem();
973
- hasActive = ($item && $item.size() > 0);
987
+ hasActive = ($item && $item.length > 0);
974
988
  forceScroll = (forceScroll !== undefined)
975
989
  ? forceScroll
976
990
  : false
@@ -1025,7 +1039,7 @@ $.fn.dropdown = function(parameters) {
1025
1039
  },
1026
1040
  value: function(value) {
1027
1041
  module.debug('Adding selected value to hidden input', value, $input);
1028
- if($input.size() > 0) {
1042
+ if($input.length > 0) {
1029
1043
  $input
1030
1044
  .val(value)
1031
1045
  .trigger('change')
@@ -1060,7 +1074,7 @@ $.fn.dropdown = function(parameters) {
1060
1074
 
1061
1075
  selectedText = module.get.choiceText($selectedItem);
1062
1076
  module.set.text(selectedText);
1063
- $.proxy(settings.onChange, element)(value, selectedText, $selectedItem);
1077
+ settings.onChange.call(element, value, selectedText, $selectedItem);
1064
1078
  }
1065
1079
  }
1066
1080
  },
@@ -1117,7 +1131,7 @@ $.fn.dropdown = function(parameters) {
1117
1131
  ;
1118
1132
  },
1119
1133
  allFiltered: function() {
1120
- return ($item.filter('.' + className.filtered).size() === $item.size());
1134
+ return ($item.filter('.' + className.filtered).length === $item.length);
1121
1135
  },
1122
1136
  hidden: function($subMenu) {
1123
1137
  return ($subMenu)
@@ -1129,7 +1143,7 @@ $.fn.dropdown = function(parameters) {
1129
1143
  return $module.hasClass(className.search);
1130
1144
  },
1131
1145
  searchable: function() {
1132
- return ($search.size() > 0);
1146
+ return ($search.length > 0);
1133
1147
  },
1134
1148
  searchSelection: function() {
1135
1149
  return ( module.is.searchable() && $search.parent().is($module) );
@@ -1137,6 +1151,9 @@ $.fn.dropdown = function(parameters) {
1137
1151
  selection: function() {
1138
1152
  return $module.hasClass(className.selection);
1139
1153
  },
1154
+ upward: function() {
1155
+ return $module.hasClass(className.upward);
1156
+ },
1140
1157
  visible: function($subMenu) {
1141
1158
  return ($subMenu)
1142
1159
  ? $subMenu.is(':visible')
@@ -1173,8 +1190,16 @@ $.fn.dropdown = function(parameters) {
1173
1190
  module.set.scrollPosition(module.get.activeItem(), true);
1174
1191
  module.verbose('Doing menu show animation', $currentMenu);
1175
1192
  if( module.is.hidden($currentMenu) || module.is.animating($currentMenu) ) {
1193
+
1194
+ if(settings.transition == 'auto') {
1195
+ settings.transition = module.is.upward()
1196
+ ? 'slide up'
1197
+ : 'slide down'
1198
+ ;
1199
+ }
1200
+
1176
1201
  if(settings.transition == 'none') {
1177
- $.proxy(callback, element)();
1202
+ callback.call(element);
1178
1203
  }
1179
1204
  else if($.fn.transition !== undefined && $module.transition('is supported')) {
1180
1205
  $currentMenu
@@ -1186,7 +1211,7 @@ $.fn.dropdown = function(parameters) {
1186
1211
  queue : true,
1187
1212
  onStart : start,
1188
1213
  onComplete : function() {
1189
- $.proxy(callback, element)();
1214
+ callback.call(element);
1190
1215
  }
1191
1216
  })
1192
1217
  ;
@@ -1205,8 +1230,8 @@ $.fn.dropdown = function(parameters) {
1205
1230
  }, settings.duration, 'easeOutQuad', module.event.resetStyle)
1206
1231
  .end()
1207
1232
  .slideDown(100, 'easeOutQuad', function() {
1208
- $.proxy(module.event.resetStyle, this)();
1209
- $.proxy(callback, element)();
1233
+ module.event.resetStyle.call(this);
1234
+ callback.call(element);
1210
1235
  })
1211
1236
  ;
1212
1237
  }
@@ -1216,8 +1241,8 @@ $.fn.dropdown = function(parameters) {
1216
1241
  .hide()
1217
1242
  .clearQueue()
1218
1243
  .fadeIn(settings.duration, function() {
1219
- $.proxy(module.event.resetStyle, this)();
1220
- $.proxy(callback, element)();
1244
+ module.event.resetStyle.call(this);
1245
+ callback.call(element);
1221
1246
  })
1222
1247
  ;
1223
1248
  }
@@ -1249,8 +1274,15 @@ $.fn.dropdown = function(parameters) {
1249
1274
  if( module.is.visible($currentMenu) || module.is.animating($currentMenu) ) {
1250
1275
  module.verbose('Doing menu hide animation', $currentMenu);
1251
1276
 
1277
+ if(settings.transition == 'auto') {
1278
+ settings.transition = module.is.upward()
1279
+ ? 'slide up'
1280
+ : 'slide down'
1281
+ ;
1282
+ }
1283
+
1252
1284
  if(settings.transition == 'none') {
1253
- $.proxy(callback, element)();
1285
+ callback.call(element);
1254
1286
  }
1255
1287
  else if($.fn.transition !== undefined && $module.transition('is supported')) {
1256
1288
  $currentMenu
@@ -1262,7 +1294,7 @@ $.fn.dropdown = function(parameters) {
1262
1294
  queue : true,
1263
1295
  onStart : start,
1264
1296
  onComplete : function() {
1265
- $.proxy(callback, element)();
1297
+ callback.call(element);
1266
1298
  }
1267
1299
  })
1268
1300
  ;
@@ -1281,8 +1313,8 @@ $.fn.dropdown = function(parameters) {
1281
1313
  .end()
1282
1314
  .delay(50)
1283
1315
  .slideUp(100, 'easeOutQuad', function() {
1284
- $.proxy(module.event.resetStyle, this)();
1285
- $.proxy(callback, element)();
1316
+ module.event.resetStyle.call(this);
1317
+ callback.call(element);
1286
1318
  })
1287
1319
  ;
1288
1320
  }
@@ -1292,8 +1324,8 @@ $.fn.dropdown = function(parameters) {
1292
1324
  .show()
1293
1325
  .clearQueue()
1294
1326
  .fadeOut(150, function() {
1295
- $.proxy(module.event.resetStyle, this)();
1296
- $.proxy(callback, element)();
1327
+ module.event.resetStyle.call(this);
1328
+ callback.call(element);
1297
1329
  })
1298
1330
  ;
1299
1331
  }
@@ -1317,6 +1349,13 @@ $.fn.dropdown = function(parameters) {
1317
1349
  }
1318
1350
  },
1319
1351
 
1352
+ escape: {
1353
+ regExp: function(text) {
1354
+ text = String(text);
1355
+ return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
1356
+ }
1357
+ },
1358
+
1320
1359
  setting: function(name, value) {
1321
1360
  module.debug('Changing setting', name, value);
1322
1361
  if( $.isPlainObject(name) ) {
@@ -1517,7 +1556,7 @@ $.fn.dropdown.settings = {
1517
1556
  touch : 50
1518
1557
  },
1519
1558
 
1520
- transition : 'slide down',
1559
+ transition : 'auto',
1521
1560
  duration : 250,
1522
1561
 
1523
1562
  /* Callbacks */
@@ -1566,6 +1605,7 @@ $.fn.dropdown.settings = {
1566
1605
  search : 'search',
1567
1606
  selected : 'selected',
1568
1607
  selection : 'selection',
1608
+ upward : 'upward',
1569
1609
  visible : 'visible'
1570
1610
  }
1571
1611
 
@@ -1615,4 +1655,4 @@ $.extend( $.easing, {
1615
1655
  });
1616
1656
 
1617
1657
 
1618
- })( jQuery, window , document );
1658
+ })( jQuery, window , document );
@@ -161,7 +161,7 @@ $.fn.form = function(fields, parameters) {
161
161
  .blur()
162
162
  ;
163
163
  }
164
- if(!event.ctrlKey && key == keyCode.enter && $field.is(selector.input) && $field.not(selector.checkbox).size() > 0 ) {
164
+ if(!event.ctrlKey && key == keyCode.enter && $field.is(selector.input) && $field.not(selector.checkbox).length > 0 ) {
165
165
  module.debug('Enter key pressed, submitting form');
166
166
  $submit
167
167
  .addClass(className.down)
@@ -222,13 +222,13 @@ $.fn.form = function(fields, parameters) {
222
222
  },
223
223
  field: function(identifier) {
224
224
  module.verbose('Finding field with identifier', identifier);
225
- if( $field.filter('#' + identifier).size() > 0 ) {
225
+ if( $field.filter('#' + identifier).length > 0 ) {
226
226
  return $field.filter('#' + identifier);
227
227
  }
228
- else if( $field.filter('[name="' + identifier +'"]').size() > 0 ) {
228
+ else if( $field.filter('[name="' + identifier +'"]').length > 0 ) {
229
229
  return $field.filter('[name="' + identifier +'"]');
230
230
  }
231
- else if( $field.filter('[data-' + metadata.validate + '="'+ identifier +'"]').size() > 0 ) {
231
+ else if( $field.filter('[data-' + metadata.validate + '="'+ identifier +'"]').length > 0 ) {
232
232
  return $field.filter('[data-' + metadata.validate + '="'+ identifier +'"]');
233
233
  }
234
234
  return $('<input/>');
@@ -250,13 +250,13 @@ $.fn.form = function(fields, parameters) {
250
250
 
251
251
  field: function(identifier) {
252
252
  module.verbose('Checking for existence of a field with identifier', identifier);
253
- if( $field.filter('#' + identifier).size() > 0 ) {
253
+ if( $field.filter('#' + identifier).length > 0 ) {
254
254
  return true;
255
255
  }
256
- else if( $field.filter('[name="' + identifier +'"]').size() > 0 ) {
256
+ else if( $field.filter('[name="' + identifier +'"]').length > 0 ) {
257
257
  return true;
258
258
  }
259
- else if( $field.filter('[data-' + metadata.validate + '="'+ identifier +'"]').size() > 0 ) {
259
+ else if( $field.filter('[data-' + metadata.validate + '="'+ identifier +'"]').length > 0 ) {
260
260
  return true;
261
261
  }
262
262
  return false;
@@ -269,8 +269,8 @@ $.fn.form = function(fields, parameters) {
269
269
  var
270
270
  $field = module.get.field(identifier),
271
271
  $fieldGroup = $field.closest($group),
272
- $prompt = $fieldGroup.find(selector.prompt),
273
- promptExists = ($prompt.size() !== 0)
272
+ $prompt = $fieldGroup.children(selector.prompt),
273
+ promptExists = ($prompt.length !== 0)
274
274
  ;
275
275
  errors = (typeof errors == 'string')
276
276
  ? [errors]
@@ -320,7 +320,7 @@ $.fn.form = function(fields, parameters) {
320
320
  var
321
321
  $field = module.get.field(field.identifier),
322
322
  $fieldGroup = $field.closest($group),
323
- $prompt = $fieldGroup.find(selector.prompt)
323
+ $prompt = $fieldGroup.children(selector.prompt)
324
324
  ;
325
325
  $fieldGroup
326
326
  .removeClass(className.error)
@@ -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, element)(event);
378
+ return settings.onSuccess.call(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, element)(formErrors);
390
+ return settings.onFailure.call(element, formErrors);
391
391
  }
392
392
  },
393
393
 
@@ -417,12 +417,12 @@ $.fn.form = function(fields, parameters) {
417
417
  }
418
418
  if(fieldValid) {
419
419
  module.remove.prompt(field, fieldErrors);
420
- $.proxy(settings.onValid, $field)();
420
+ settings.onValid.call($field);
421
421
  }
422
422
  else {
423
423
  formErrors = formErrors.concat(fieldErrors);
424
424
  module.add.prompt(field.identifier, fieldErrors);
425
- $.proxy(settings.onInvalid, $field)(fieldErrors);
425
+ settings.onInvalid.call($field, fieldErrors);
426
426
  return false;
427
427
  }
428
428
  return true;
@@ -445,11 +445,11 @@ $.fn.form = function(fields, parameters) {
445
445
  if(bracket !== undefined && bracket !== null) {
446
446
  ancillary = '' + bracket[1];
447
447
  functionType = type.replace(bracket[0], '');
448
- isValid = $.proxy(settings.rules[functionType], element)(value, ancillary);
448
+ isValid = settings.rules[functionType].call(element, value, ancillary);
449
449
  }
450
450
  // normal notation
451
451
  else {
452
- isValid = $.proxy(settings.rules[type], $field)(value);
452
+ isValid = settings.rules[type].call($field, value);
453
453
  }
454
454
  return isValid;
455
455
  }
@@ -539,8 +539,8 @@ $.fn.form = function(fields, parameters) {
539
539
  if(moduleSelector) {
540
540
  title += ' \'' + moduleSelector + '\'';
541
541
  }
542
- if($allModules.size() > 1) {
543
- title += ' ' + '(' + $allModules.size() + ')';
542
+ if($allModules.length > 1) {
543
+ title += ' ' + '(' + $allModules.length + ')';
544
544
  }
545
545
  if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
546
546
  console.groupCollapsed(title);
@@ -669,7 +669,7 @@ $.fn.form.settings = {
669
669
  group : '.field',
670
670
  checkbox: 'input[type="checkbox"], input[type="radio"]',
671
671
  input : 'input',
672
- prompt : '.prompt',
672
+ prompt : '.prompt.label',
673
673
  submit : '.submit'
674
674
  },
675
675
 
@@ -707,7 +707,7 @@ $.fn.form.settings = {
707
707
 
708
708
  // checkbox checked
709
709
  checked: function() {
710
- return ($(this).filter(':checked').size() > 0);
710
+ return ($(this).filter(':checked').length > 0);
711
711
  },
712
712
 
713
713
  // value contains (text)
@@ -781,13 +781,13 @@ $.fn.form.settings = {
781
781
  $form = $(this),
782
782
  matchingValue
783
783
  ;
784
- if($form.find('#' + fieldIdentifier).size() > 0) {
784
+ if($form.find('#' + fieldIdentifier).length > 0) {
785
785
  matchingValue = $form.find('#' + fieldIdentifier).val();
786
786
  }
787
- else if($form.find('[name="' + fieldIdentifier +'"]').size() > 0) {
787
+ else if($form.find('[name="' + fieldIdentifier +'"]').length > 0) {
788
788
  matchingValue = $form.find('[name="' + fieldIdentifier + '"]').val();
789
789
  }
790
- else if( $form.find('[data-validate="'+ fieldIdentifier +'"]').size() > 0 ) {
790
+ else if( $form.find('[data-validate="'+ fieldIdentifier +'"]').length > 0 ) {
791
791
  matchingValue = $form.find('[data-validate="'+ fieldIdentifier +'"]').val();
792
792
  }
793
793
  return (matchingValue !== undefined)