semantic-ui-sass 2.1.4.0 → 2.1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/app/assets/javascripts/semantic-ui/accordion.js +1 -1
- data/app/assets/javascripts/semantic-ui/api.js +1 -1
- data/app/assets/javascripts/semantic-ui/checkbox.js +9 -4
- data/app/assets/javascripts/semantic-ui/colorize.js +1 -1
- data/app/assets/javascripts/semantic-ui/dimmer.js +2 -2
- data/app/assets/javascripts/semantic-ui/dropdown.js +77 -52
- data/app/assets/javascripts/semantic-ui/embed.js +1 -1
- data/app/assets/javascripts/semantic-ui/form.js +6 -4
- data/app/assets/javascripts/semantic-ui/modal.js +6 -3
- data/app/assets/javascripts/semantic-ui/nag.js +1 -1
- data/app/assets/javascripts/semantic-ui/popup.js +12 -3
- data/app/assets/javascripts/semantic-ui/progress.js +2 -1
- data/app/assets/javascripts/semantic-ui/rating.js +1 -1
- data/app/assets/javascripts/semantic-ui/search.js +22 -9
- data/app/assets/javascripts/semantic-ui/shape.js +1 -1
- data/app/assets/javascripts/semantic-ui/sidebar.js +1 -1
- data/app/assets/javascripts/semantic-ui/site.js +1 -1
- data/app/assets/javascripts/semantic-ui/state.js +1 -1
- data/app/assets/javascripts/semantic-ui/sticky.js +40 -20
- data/app/assets/javascripts/semantic-ui/tab.js +1 -1
- data/app/assets/javascripts/semantic-ui/transition.js +3 -1
- data/app/assets/javascripts/semantic-ui/visibility.js +1 -1
- data/app/assets/javascripts/semantic-ui/visit.js +1 -1
- data/app/assets/stylesheets/semantic-ui/collections/_breadcrumb.scss +2 -2
- data/app/assets/stylesheets/semantic-ui/collections/_form.scss +55 -51
- data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +42 -42
- data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +73 -73
- data/app/assets/stylesheets/semantic-ui/collections/_message.scss +50 -50
- data/app/assets/stylesheets/semantic-ui/collections/_table.scss +81 -64
- data/app/assets/stylesheets/semantic-ui/elements/_button.scss +284 -284
- data/app/assets/stylesheets/semantic-ui/elements/_container.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +2 -2
- data/app/assets/stylesheets/semantic-ui/elements/_flag.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_header.scss +42 -41
- data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +58 -55
- data/app/assets/stylesheets/semantic-ui/elements/_image.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_input.scss +13 -13
- data/app/assets/stylesheets/semantic-ui/elements/_label.scss +115 -115
- data/app/assets/stylesheets/semantic-ui/elements/_list.scss +3 -3
- data/app/assets/stylesheets/semantic-ui/elements/_loader.scss +3 -3
- data/app/assets/stylesheets/semantic-ui/elements/_rail.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_reveal.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +52 -47
- data/app/assets/stylesheets/semantic-ui/elements/_step.scss +13 -13
- data/app/assets/stylesheets/semantic-ui/globals/_reset.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/globals/_site.scss +6 -6
- data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +2 -2
- data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +19 -19
- data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +3 -3
- data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +20 -20
- data/app/assets/stylesheets/semantic-ui/modules/_embed.scss +4 -4
- data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +12 -12
- data/app/assets/stylesheets/semantic-ui/modules/_nag.scss +4 -4
- data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +38 -8
- data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +45 -45
- data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +9 -9
- data/app/assets/stylesheets/semantic-ui/modules/_search.scss +13 -13
- data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +2 -2
- data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +2 -2
- data/app/assets/stylesheets/semantic-ui/modules/_sticky.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_tab.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/views/_ad.scss +2 -2
- data/app/assets/stylesheets/semantic-ui/views/_card.scss +35 -35
- data/app/assets/stylesheets/semantic-ui/views/_comment.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/views/_feed.scss +3 -3
- data/app/assets/stylesheets/semantic-ui/views/_item.scss +5 -5
- data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +26 -26
- 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: 40d464b0f50394dfa0064c0636816c7d09b84861
|
4
|
+
data.tar.gz: 7860ea682de494c55e771f77e89398ac627b0013
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c01d67087abf0a97ec968f95f1ec23ed231ad5eff8ba9af084d247b9ea75f0520fe795dd5d2361ebb092524487d141c0bf1e1d113a0fbb5988844ca56fbd7f31
|
7
|
+
data.tar.gz: 0b1ce2cdaf1ffbaa713f0eb29dc60833e3a944291ce06f740b67928b913257005c41fd1b9f071df05fb03a9215ab8db824e7918a0e5fe3eaad6c7c256cd8c991
|
data/CHANGELOG.md
CHANGED
@@ -502,10 +502,15 @@ $.fn.checkbox = function(parameters) {
|
|
502
502
|
|
503
503
|
trigger: {
|
504
504
|
change: function() {
|
505
|
-
|
506
|
-
|
507
|
-
|
505
|
+
var
|
506
|
+
events = document.createEvent('HTMLEvents'),
|
507
|
+
inputElement = $input[0]
|
508
508
|
;
|
509
|
+
if(inputElement) {
|
510
|
+
module.verbose('Triggering native change event');
|
511
|
+
events.initEvent('change', true, false);
|
512
|
+
inputElement.dispatchEvent(events);
|
513
|
+
}
|
509
514
|
}
|
510
515
|
},
|
511
516
|
|
@@ -801,4 +806,4 @@ $.fn.checkbox.settings = {
|
|
801
806
|
|
802
807
|
};
|
803
808
|
|
804
|
-
})( jQuery, window
|
809
|
+
})( jQuery, window, document );
|
@@ -385,7 +385,7 @@ $.fn.dimmer = function(parameters) {
|
|
385
385
|
colorArray = color.split(','),
|
386
386
|
isRGBA = (colorArray && colorArray.length == 4)
|
387
387
|
;
|
388
|
-
opacity = settings.opacity || opacity;
|
388
|
+
opacity = settings.opacity === 0 ? 0 : settings.opacity || opacity;
|
389
389
|
if(isRGBA) {
|
390
390
|
colorArray[3] = opacity + ')';
|
391
391
|
color = colorArray.join(',');
|
@@ -690,4 +690,4 @@ $.fn.dimmer.settings = {
|
|
690
690
|
|
691
691
|
};
|
692
692
|
|
693
|
-
})( jQuery, window
|
693
|
+
})( jQuery, window, document );
|
@@ -40,6 +40,7 @@ $.fn.dropdown = function(parameters) {
|
|
40
40
|
className = settings.className,
|
41
41
|
message = settings.message,
|
42
42
|
fields = settings.fields,
|
43
|
+
keys = settings.keys,
|
43
44
|
metadata = settings.metadata,
|
44
45
|
namespace = settings.namespace,
|
45
46
|
regExp = settings.regExp,
|
@@ -280,6 +281,7 @@ $.fn.dropdown = function(parameters) {
|
|
280
281
|
module.verbose('Adding search input');
|
281
282
|
$search = $('<input />')
|
282
283
|
.addClass(className.search)
|
284
|
+
.prop('autocomplete', 'off')
|
283
285
|
.insertBefore($text)
|
284
286
|
;
|
285
287
|
}
|
@@ -411,7 +413,7 @@ $.fn.dropdown = function(parameters) {
|
|
411
413
|
if(module.is.multiple() && !module.has.search() && module.is.allFiltered()) {
|
412
414
|
return true;
|
413
415
|
}
|
414
|
-
if(module.has.message() && !module.has.maxSelections()) {
|
416
|
+
if(module.has.message() && !(module.has.maxSelections() || module.has.allResultsFiltered()) ) {
|
415
417
|
module.remove.message();
|
416
418
|
}
|
417
419
|
if(settings.onShow.call(element) !== false) {
|
@@ -666,7 +668,7 @@ $.fn.dropdown = function(parameters) {
|
|
666
668
|
onSuccess : function(response) {
|
667
669
|
module.remove.message();
|
668
670
|
module.setup.menu({
|
669
|
-
values: response.
|
671
|
+
values: response[fields.remoteValues]
|
670
672
|
});
|
671
673
|
callback();
|
672
674
|
}
|
@@ -687,15 +689,14 @@ $.fn.dropdown = function(parameters) {
|
|
687
689
|
searchTerm = (query !== undefined)
|
688
690
|
? query
|
689
691
|
: module.get.query(),
|
690
|
-
|
692
|
+
results = null,
|
691
693
|
escapedTerm = module.escape.regExp(searchTerm),
|
692
694
|
beginsWithRegExp = new RegExp('^' + escapedTerm, 'igm')
|
693
695
|
;
|
694
696
|
// avoid loop if we're matching nothing
|
695
|
-
if(
|
696
|
-
|
697
|
-
|
698
|
-
else {
|
697
|
+
if( module.has.query() ) {
|
698
|
+
results = [];
|
699
|
+
|
699
700
|
module.verbose('Searching for matching values', searchTerm);
|
700
701
|
$item
|
701
702
|
.each(function(){
|
@@ -707,11 +708,11 @@ $.fn.dropdown = function(parameters) {
|
|
707
708
|
if(settings.match == 'both' || settings.match == 'text') {
|
708
709
|
text = String(module.get.choiceText($choice, false));
|
709
710
|
if(text.search(beginsWithRegExp) !== -1) {
|
710
|
-
|
711
|
+
results.push(this);
|
711
712
|
return true;
|
712
713
|
}
|
713
714
|
else if(settings.fullTextSearch && module.fuzzySearch(searchTerm, text)) {
|
714
|
-
|
715
|
+
results.push(this);
|
715
716
|
return true;
|
716
717
|
}
|
717
718
|
}
|
@@ -719,11 +720,11 @@ $.fn.dropdown = function(parameters) {
|
|
719
720
|
value = String(module.get.choiceValue($choice, text));
|
720
721
|
|
721
722
|
if(value.search(beginsWithRegExp) !== -1) {
|
722
|
-
|
723
|
+
results.push(this);
|
723
724
|
return true;
|
724
725
|
}
|
725
726
|
else if(settings.fullTextSearch && module.fuzzySearch(searchTerm, value)) {
|
726
|
-
|
727
|
+
results.push(this);
|
727
728
|
return true;
|
728
729
|
}
|
729
730
|
}
|
@@ -732,10 +733,12 @@ $.fn.dropdown = function(parameters) {
|
|
732
733
|
}
|
733
734
|
module.debug('Showing only matched items', searchTerm);
|
734
735
|
module.remove.filteredItem();
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
736
|
+
if(results) {
|
737
|
+
$item
|
738
|
+
.not(results)
|
739
|
+
.addClass(className.filtered)
|
740
|
+
;
|
741
|
+
}
|
739
742
|
},
|
740
743
|
|
741
744
|
fuzzySearch: function(query, term) {
|
@@ -788,13 +791,17 @@ $.fn.dropdown = function(parameters) {
|
|
788
791
|
: $activeItem,
|
789
792
|
hasSelected = ($selectedItem.size() > 0)
|
790
793
|
;
|
791
|
-
if(
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
794
|
+
if( module.has.query() ) {
|
795
|
+
if(hasSelected) {
|
796
|
+
module.debug('Forcing partial selection to selected item', $selectedItem);
|
797
|
+
module.event.item.click.call($selectedItem);
|
798
|
+
return;
|
799
|
+
}
|
800
|
+
else {
|
801
|
+
module.remove.searchTerm();
|
802
|
+
}
|
797
803
|
}
|
804
|
+
module.hide();
|
798
805
|
},
|
799
806
|
|
800
807
|
event: {
|
@@ -839,6 +846,7 @@ $.fn.dropdown = function(parameters) {
|
|
839
846
|
module.remove.activeLabel();
|
840
847
|
}
|
841
848
|
if(settings.showOnFocus) {
|
849
|
+
module.search();
|
842
850
|
module.show();
|
843
851
|
}
|
844
852
|
},
|
@@ -1019,7 +1027,6 @@ $.fn.dropdown = function(parameters) {
|
|
1019
1027
|
keydown: function(event) {
|
1020
1028
|
var
|
1021
1029
|
pressedKey = event.which,
|
1022
|
-
keys = module.get.shortcutKeys(),
|
1023
1030
|
isShortcutKey = module.is.inObject(pressedKey, keys)
|
1024
1031
|
;
|
1025
1032
|
if(isShortcutKey) {
|
@@ -1133,7 +1140,6 @@ $.fn.dropdown = function(parameters) {
|
|
1133
1140
|
keydown: function(event) {
|
1134
1141
|
var
|
1135
1142
|
pressedKey = event.which,
|
1136
|
-
keys = module.get.shortcutKeys(),
|
1137
1143
|
isShortcutKey = module.is.inObject(pressedKey, keys)
|
1138
1144
|
;
|
1139
1145
|
if(isShortcutKey) {
|
@@ -1157,7 +1163,6 @@ $.fn.dropdown = function(parameters) {
|
|
1157
1163
|
isSubMenuItem,
|
1158
1164
|
newIndex
|
1159
1165
|
;
|
1160
|
-
|
1161
1166
|
// visible menu keyboard shortcuts
|
1162
1167
|
if( module.is.visible() ) {
|
1163
1168
|
|
@@ -1298,6 +1303,20 @@ $.fn.dropdown = function(parameters) {
|
|
1298
1303
|
}
|
1299
1304
|
},
|
1300
1305
|
|
1306
|
+
trigger: {
|
1307
|
+
change: function() {
|
1308
|
+
var
|
1309
|
+
events = document.createEvent('HTMLEvents'),
|
1310
|
+
inputElement = $input[0]
|
1311
|
+
;
|
1312
|
+
if(inputElement) {
|
1313
|
+
module.verbose('Triggering native change event');
|
1314
|
+
events.initEvent('change', true, false);
|
1315
|
+
inputElement.dispatchEvent(events);
|
1316
|
+
}
|
1317
|
+
}
|
1318
|
+
},
|
1319
|
+
|
1301
1320
|
determine: {
|
1302
1321
|
selectAction: function(text, value) {
|
1303
1322
|
module.verbose('Determining action', settings.action);
|
@@ -1479,21 +1498,6 @@ $.fn.dropdown = function(parameters) {
|
|
1479
1498
|
return range.text.length - rangeLength;
|
1480
1499
|
}
|
1481
1500
|
},
|
1482
|
-
shortcutKeys: function() {
|
1483
|
-
return {
|
1484
|
-
backspace : 8,
|
1485
|
-
delimiter : 188, // comma
|
1486
|
-
deleteKey : 46,
|
1487
|
-
enter : 13,
|
1488
|
-
escape : 27,
|
1489
|
-
pageUp : 33,
|
1490
|
-
pageDown : 34,
|
1491
|
-
leftArrow : 37,
|
1492
|
-
upArrow : 38,
|
1493
|
-
rightArrow : 39,
|
1494
|
-
downArrow : 40
|
1495
|
-
};
|
1496
|
-
},
|
1497
1501
|
value: function() {
|
1498
1502
|
var
|
1499
1503
|
value = ($input.length > 0)
|
@@ -2011,7 +2015,7 @@ $.fn.dropdown = function(parameters) {
|
|
2011
2015
|
}
|
2012
2016
|
else {
|
2013
2017
|
module.debug('Added tabindex to dropdown');
|
2014
|
-
if(
|
2018
|
+
if( $module.attr('tabindex') === undefined) {
|
2015
2019
|
$module
|
2016
2020
|
.attr('tabindex', 0)
|
2017
2021
|
;
|
@@ -2184,7 +2188,7 @@ $.fn.dropdown = function(parameters) {
|
|
2184
2188
|
module.debug('Input native change event ignored on initial load');
|
2185
2189
|
}
|
2186
2190
|
else {
|
2187
|
-
|
2191
|
+
module.trigger.change();
|
2188
2192
|
}
|
2189
2193
|
internalChange = false;
|
2190
2194
|
}
|
@@ -2642,12 +2646,17 @@ $.fn.dropdown = function(parameters) {
|
|
2642
2646
|
$labels
|
2643
2647
|
.each(function(){
|
2644
2648
|
var
|
2645
|
-
|
2649
|
+
$label = $(this),
|
2650
|
+
value = $label.data(metadata.value),
|
2646
2651
|
stringValue = (value !== undefined)
|
2647
2652
|
? String(value)
|
2648
2653
|
: value,
|
2649
2654
|
isUserValue = module.is.userValue(stringValue)
|
2650
2655
|
;
|
2656
|
+
if(settings.onLabelRemove.call($label, value) === false) {
|
2657
|
+
module.debug('Label remove callback cancelled removal');
|
2658
|
+
return;
|
2659
|
+
}
|
2651
2660
|
if(isUserValue) {
|
2652
2661
|
module.remove.value(stringValue);
|
2653
2662
|
module.remove.label(stringValue);
|
@@ -2663,19 +2672,19 @@ $.fn.dropdown = function(parameters) {
|
|
2663
2672
|
if( module.has.search() ) {
|
2664
2673
|
module.debug('Searchable dropdown initialized');
|
2665
2674
|
$search
|
2666
|
-
.
|
2675
|
+
.removeAttr('tabindex')
|
2667
2676
|
;
|
2668
2677
|
$menu
|
2669
|
-
.
|
2678
|
+
.removeAttr('tabindex')
|
2670
2679
|
;
|
2671
2680
|
}
|
2672
2681
|
else {
|
2673
2682
|
module.debug('Simple selection dropdown initialized');
|
2674
2683
|
$module
|
2675
|
-
.
|
2684
|
+
.removeAttr('tabindex')
|
2676
2685
|
;
|
2677
2686
|
$menu
|
2678
|
-
.
|
2687
|
+
.removeAttr('tabindex')
|
2679
2688
|
;
|
2680
2689
|
}
|
2681
2690
|
}
|
@@ -3269,6 +3278,7 @@ $.fn.dropdown.settings = {
|
|
3269
3278
|
|
3270
3279
|
onLabelSelect : function($selectedLabels){},
|
3271
3280
|
onLabelCreate : function(value, text) { return $(this); },
|
3281
|
+
onLabelRemove : function(value) { return true; },
|
3272
3282
|
onNoResults : function(searchTerm) { return true; },
|
3273
3283
|
onShow : function(){},
|
3274
3284
|
onHide : function(){},
|
@@ -3310,9 +3320,24 @@ $.fn.dropdown.settings = {
|
|
3310
3320
|
|
3311
3321
|
// property names for remote query
|
3312
3322
|
fields: {
|
3313
|
-
|
3314
|
-
|
3315
|
-
|
3323
|
+
remoteValues : 'results', // grouping for api results
|
3324
|
+
values : 'values', // grouping for all dropdown values
|
3325
|
+
name : 'name', // displayed dropdown text
|
3326
|
+
value : 'value' // actual dropdown value
|
3327
|
+
},
|
3328
|
+
|
3329
|
+
keys : {
|
3330
|
+
backspace : 8,
|
3331
|
+
delimiter : 188, // comma
|
3332
|
+
deleteKey : 46,
|
3333
|
+
enter : 13,
|
3334
|
+
escape : 27,
|
3335
|
+
pageUp : 33,
|
3336
|
+
pageDown : 34,
|
3337
|
+
leftArrow : 37,
|
3338
|
+
upArrow : 38,
|
3339
|
+
rightArrow : 39,
|
3340
|
+
downArrow : 40
|
3316
3341
|
},
|
3317
3342
|
|
3318
3343
|
selector : {
|
@@ -3387,10 +3412,10 @@ $.fn.dropdown.settings.templates = {
|
|
3387
3412
|
// generates just menu from select
|
3388
3413
|
menu: function(response, fields) {
|
3389
3414
|
var
|
3390
|
-
values = response.values || {},
|
3415
|
+
values = response[fields.values] || {},
|
3391
3416
|
html = ''
|
3392
3417
|
;
|
3393
|
-
$.each(
|
3418
|
+
$.each(values, function(index, option) {
|
3394
3419
|
html += '<div class="item" data-value="' + option[fields.value] + '">' + option[fields.name] + '</div>';
|
3395
3420
|
});
|
3396
3421
|
return html;
|
@@ -3414,4 +3439,4 @@ $.fn.dropdown.settings.templates = {
|
|
3414
3439
|
|
3415
3440
|
};
|
3416
3441
|
|
3417
|
-
})( jQuery, window
|
3442
|
+
})( jQuery, window, document );
|
@@ -299,7 +299,9 @@ $.fn.form = function(parameters) {
|
|
299
299
|
module.validate.form.call(module, event, true);
|
300
300
|
}
|
301
301
|
else if(settings.on == 'blur' || settings.on == 'change') {
|
302
|
-
|
302
|
+
if(validationRules) {
|
303
|
+
module.validate.field( validationRules );
|
304
|
+
}
|
303
305
|
}
|
304
306
|
},
|
305
307
|
change: function(event) {
|
@@ -1048,7 +1050,7 @@ $.fn.form.settings = {
|
|
1048
1050
|
|
1049
1051
|
regExp: {
|
1050
1052
|
bracket : /\[(.*)\]/i,
|
1051
|
-
decimal :
|
1053
|
+
decimal : /^\d*(\.)\d+/,
|
1052
1054
|
email : "[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?",
|
1053
1055
|
escape : /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,
|
1054
1056
|
flags : /^\/(.*)\/(.*)?/,
|
@@ -1196,7 +1198,7 @@ $.fn.form.settings = {
|
|
1196
1198
|
max,
|
1197
1199
|
parts
|
1198
1200
|
;
|
1199
|
-
if(range
|
1201
|
+
if( !range || ['', '..'].indexOf(range) !== -1) {
|
1200
1202
|
// do nothing
|
1201
1203
|
}
|
1202
1204
|
else if(range.indexOf('..') == -1) {
|
@@ -1512,4 +1514,4 @@ $.fn.form.settings = {
|
|
1512
1514
|
|
1513
1515
|
};
|
1514
1516
|
|
1515
|
-
})( jQuery, window
|
1517
|
+
})( jQuery, window, document );
|
@@ -365,7 +365,10 @@ $.fn.modal = function(parameters) {
|
|
365
365
|
: function(){}
|
366
366
|
;
|
367
367
|
module.debug('Hiding modal');
|
368
|
-
settings.onHide.call(element)
|
368
|
+
if(settings.onHide.call(element, $(this)) === false) {
|
369
|
+
module.verbose('Hide callback returned false cancelling hide');
|
370
|
+
return;
|
371
|
+
}
|
369
372
|
|
370
373
|
if( module.is.animating() || module.is.active() ) {
|
371
374
|
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
|
@@ -854,7 +857,7 @@ $.fn.modal.settings = {
|
|
854
857
|
onVisible : function(){},
|
855
858
|
|
856
859
|
// called before hide animation
|
857
|
-
onHide : function(){},
|
860
|
+
onHide : function(){ return true; },
|
858
861
|
|
859
862
|
// called after hide animation
|
860
863
|
onHidden : function(){},
|
@@ -886,4 +889,4 @@ $.fn.modal.settings = {
|
|
886
889
|
};
|
887
890
|
|
888
891
|
|
889
|
-
})( jQuery, window
|
892
|
+
})( jQuery, window, document );
|