semantic-ui-sass 2.1.8.0 → 2.2.0.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 +8 -1
- data/app/assets/javascripts/semantic-ui.js +21465 -24
- data/app/assets/javascripts/semantic-ui/accordion.js +20 -6
- data/app/assets/javascripts/semantic-ui/api.js +41 -16
- data/app/assets/javascripts/semantic-ui/checkbox.js +31 -9
- data/app/assets/javascripts/semantic-ui/colorize.js +233 -227
- data/app/assets/javascripts/semantic-ui/dimmer.js +27 -9
- data/app/assets/javascripts/semantic-ui/dropdown.js +485 -207
- data/app/assets/javascripts/semantic-ui/embed.js +50 -13
- data/app/assets/javascripts/semantic-ui/form.js +58 -23
- data/app/assets/javascripts/semantic-ui/modal.js +28 -13
- data/app/assets/javascripts/semantic-ui/nag.js +28 -7
- data/app/assets/javascripts/semantic-ui/popup.js +136 -76
- data/app/assets/javascripts/semantic-ui/progress.js +177 -62
- data/app/assets/javascripts/semantic-ui/rating.js +41 -8
- data/app/assets/javascripts/semantic-ui/search.js +109 -56
- data/app/assets/javascripts/semantic-ui/shape.js +52 -19
- data/app/assets/javascripts/semantic-ui/sidebar.js +21 -7
- data/app/assets/javascripts/semantic-ui/site.js +2 -2
- data/app/assets/javascripts/semantic-ui/state.js +20 -7
- data/app/assets/javascripts/semantic-ui/sticky.js +48 -19
- data/app/assets/javascripts/semantic-ui/tab.js +57 -27
- data/app/assets/javascripts/semantic-ui/transition.js +24 -8
- data/app/assets/javascripts/semantic-ui/video.js +6 -14
- data/app/assets/javascripts/semantic-ui/visibility.js +89 -22
- data/app/assets/javascripts/semantic-ui/visit.js +13 -5
- data/app/assets/stylesheets/semantic-ui/collections/_breadcrumb.scss +4 -5
- data/app/assets/stylesheets/semantic-ui/collections/_form.scss +91 -85
- data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +41 -37
- data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +138 -94
- data/app/assets/stylesheets/semantic-ui/collections/_message.scss +74 -55
- data/app/assets/stylesheets/semantic-ui/collections/_table.scss +80 -68
- data/app/assets/stylesheets/semantic-ui/elements/_button.scss +458 -305
- data/app/assets/stylesheets/semantic-ui/elements/_container.scss +1 -2
- data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +2 -4
- data/app/assets/stylesheets/semantic-ui/elements/_flag.scss +2 -3
- data/app/assets/stylesheets/semantic-ui/elements/_header.scss +46 -46
- data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +812 -252
- data/app/assets/stylesheets/semantic-ui/elements/_image.scss +7 -3
- data/app/assets/stylesheets/semantic-ui/elements/_input.scss +35 -35
- data/app/assets/stylesheets/semantic-ui/elements/_label.scss +127 -127
- data/app/assets/stylesheets/semantic-ui/elements/_list.scss +37 -25
- data/app/assets/stylesheets/semantic-ui/elements/_loader.scss +101 -38
- data/app/assets/stylesheets/semantic-ui/elements/_rail.scss +24 -4
- data/app/assets/stylesheets/semantic-ui/elements/_reveal.scss +9 -6
- data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +92 -51
- data/app/assets/stylesheets/semantic-ui/elements/_step.scss +42 -23
- data/app/assets/stylesheets/semantic-ui/globals/_reset.scss +1 -6
- data/app/assets/stylesheets/semantic-ui/globals/_site.scss +7 -9
- data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +7 -6
- data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +40 -37
- data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +7 -8
- data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +107 -88
- data/app/assets/stylesheets/semantic-ui/modules/_embed.scss +6 -7
- data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +9 -10
- data/app/assets/stylesheets/semantic-ui/modules/_nag.scss +6 -7
- data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +415 -36
- data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +47 -48
- data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +12 -13
- data/app/assets/stylesheets/semantic-ui/modules/_search.scss +21 -21
- data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +11 -8
- data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +31 -14
- data/app/assets/stylesheets/semantic-ui/modules/_sticky.scss +2 -3
- data/app/assets/stylesheets/semantic-ui/modules/_tab.scss +1 -2
- data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +1 -2
- data/app/assets/stylesheets/semantic-ui/views/_ad.scss +2 -2
- data/app/assets/stylesheets/semantic-ui/views/_card.scss +62 -42
- data/app/assets/stylesheets/semantic-ui/views/_comment.scss +2 -3
- data/app/assets/stylesheets/semantic-ui/views/_feed.scss +5 -6
- data/app/assets/stylesheets/semantic-ui/views/_item.scss +11 -12
- data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +44 -45
- data/app/helpers/semantic_icon_helper.rb +6 -3
- data/lib/semantic/ui/sass/engine.rb +5 -1
- data/lib/semantic/ui/sass/version.rb +2 -2
- data/spec/helpers/semantic_icon_helper_spec.rb +22 -10
- metadata +3 -3
@@ -3,16 +3,22 @@
|
|
3
3
|
* http://github.com/semantic-org/semantic-ui/
|
4
4
|
*
|
5
5
|
*
|
6
|
-
* Copyright 2015 Contributors
|
7
6
|
* Released under the MIT license
|
8
7
|
* http://opensource.org/licenses/MIT
|
9
8
|
*
|
10
9
|
*/
|
11
10
|
|
12
|
-
;(function (
|
11
|
+
;(function ($, window, document, undefined) {
|
13
12
|
|
14
13
|
"use strict";
|
15
14
|
|
15
|
+
window = (typeof window != 'undefined' && window.Math == Math)
|
16
|
+
? window
|
17
|
+
: (typeof self != 'undefined' && self.Math == Math)
|
18
|
+
? self
|
19
|
+
: Function('return this')()
|
20
|
+
;
|
21
|
+
|
16
22
|
$.fn.shape = function(parameters) {
|
17
23
|
var
|
18
24
|
$allModules = $(this),
|
@@ -238,26 +244,34 @@ $.fn.shape = function(parameters) {
|
|
238
244
|
var
|
239
245
|
$clone = $module.clone().addClass(className.loading),
|
240
246
|
$activeSide = $clone.find('.' + settings.className.active),
|
247
|
+
newWidth = (settings.width == 'next')
|
248
|
+
? $nextSide.outerWidth(true)
|
249
|
+
: (settings.width == 'initial')
|
250
|
+
? $module.width()
|
251
|
+
: settings.width,
|
252
|
+
newHeight = (settings.height == 'next')
|
253
|
+
? $nextSide.outerHeight(true)
|
254
|
+
: (settings.height == 'initial')
|
255
|
+
? $module.height()
|
256
|
+
: settings.height,
|
241
257
|
$nextSide = (nextIndex)
|
242
258
|
? $clone.find(selector.side).eq(nextIndex)
|
243
259
|
: ( $activeSide.next(selector.side).length > 0 )
|
244
260
|
? $activeSide.next(selector.side)
|
245
|
-
: $clone.find(selector.side).first()
|
246
|
-
newSize = {}
|
261
|
+
: $clone.find(selector.side).first()
|
247
262
|
;
|
248
|
-
module.set.currentStageSize();
|
249
263
|
$activeSide.removeClass(className.active);
|
250
264
|
$nextSide.addClass(className.active);
|
251
265
|
$clone.insertAfter($module);
|
252
|
-
newSize = {
|
253
|
-
width : $nextSide.outerWidth(true),
|
254
|
-
height : $nextSide.outerHeight(true)
|
255
|
-
};
|
256
266
|
$clone.remove();
|
257
|
-
|
258
|
-
.css(
|
259
|
-
|
260
|
-
|
267
|
+
if(settings.width != 'auto') {
|
268
|
+
$module.css('width', newWidth + settings.jitter);
|
269
|
+
module.verbose('Specifying width during animation', newWidth);
|
270
|
+
}
|
271
|
+
if(settings.height != 'auto') {
|
272
|
+
$module.css('height', newHeight + settings.jitter);
|
273
|
+
module.verbose('Specifying height during animation', newHeight);
|
274
|
+
}
|
261
275
|
},
|
262
276
|
|
263
277
|
nextSide: function(selector) {
|
@@ -650,7 +664,12 @@ $.fn.shape = function(parameters) {
|
|
650
664
|
$.extend(true, settings, name);
|
651
665
|
}
|
652
666
|
else if(value !== undefined) {
|
653
|
-
settings[name]
|
667
|
+
if($.isPlainObject(settings[name])) {
|
668
|
+
$.extend(true, settings[name], value);
|
669
|
+
}
|
670
|
+
else {
|
671
|
+
settings[name] = value;
|
672
|
+
}
|
654
673
|
}
|
655
674
|
else {
|
656
675
|
return settings[name];
|
@@ -668,7 +687,7 @@ $.fn.shape = function(parameters) {
|
|
668
687
|
}
|
669
688
|
},
|
670
689
|
debug: function() {
|
671
|
-
if(settings.debug) {
|
690
|
+
if(!settings.silent && settings.debug) {
|
672
691
|
if(settings.performance) {
|
673
692
|
module.performance.log(arguments);
|
674
693
|
}
|
@@ -679,7 +698,7 @@ $.fn.shape = function(parameters) {
|
|
679
698
|
}
|
680
699
|
},
|
681
700
|
verbose: function() {
|
682
|
-
if(settings.verbose && settings.debug) {
|
701
|
+
if(!settings.silent && settings.verbose && settings.debug) {
|
683
702
|
if(settings.performance) {
|
684
703
|
module.performance.log(arguments);
|
685
704
|
}
|
@@ -690,8 +709,10 @@ $.fn.shape = function(parameters) {
|
|
690
709
|
}
|
691
710
|
},
|
692
711
|
error: function() {
|
693
|
-
|
694
|
-
|
712
|
+
if(!settings.silent) {
|
713
|
+
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
|
714
|
+
module.error.apply(console, arguments);
|
715
|
+
}
|
695
716
|
},
|
696
717
|
performance: {
|
697
718
|
log: function(message) {
|
@@ -828,18 +849,30 @@ $.fn.shape.settings = {
|
|
828
849
|
// module info
|
829
850
|
name : 'Shape',
|
830
851
|
|
852
|
+
// hide all debug content
|
853
|
+
silent : false,
|
854
|
+
|
831
855
|
// debug content outputted to console
|
832
856
|
debug : false,
|
833
857
|
|
834
858
|
// verbose debug output
|
835
859
|
verbose : false,
|
836
860
|
|
861
|
+
// fudge factor in pixels when swapping from 2d to 3d (can be useful to correct rounding errors)
|
862
|
+
jitter : 0,
|
863
|
+
|
837
864
|
// performance data output
|
838
865
|
performance: true,
|
839
866
|
|
840
867
|
// event namespace
|
841
868
|
namespace : 'shape',
|
842
869
|
|
870
|
+
// width during animation, can be set to 'auto', initial', 'next' or pixel amount
|
871
|
+
width: 'initial',
|
872
|
+
|
873
|
+
// height during animation, can be set to 'auto', 'initial', 'next' or pixel amount
|
874
|
+
height: 'initial',
|
875
|
+
|
843
876
|
// callback occurs on side change
|
844
877
|
beforeChange : function() {},
|
845
878
|
onChange : function() {},
|
@@ -873,4 +906,4 @@ $.fn.shape.settings = {
|
|
873
906
|
};
|
874
907
|
|
875
908
|
|
876
|
-
})( jQuery, window, document );
|
909
|
+
})( jQuery, window, document );
|
@@ -3,16 +3,22 @@
|
|
3
3
|
* http://github.com/semantic-org/semantic-ui/
|
4
4
|
*
|
5
5
|
*
|
6
|
-
* Copyright 2015 Contributors
|
7
6
|
* Released under the MIT license
|
8
7
|
* http://opensource.org/licenses/MIT
|
9
8
|
*
|
10
9
|
*/
|
11
10
|
|
12
|
-
;(function (
|
11
|
+
;(function ($, window, document, undefined) {
|
13
12
|
|
14
13
|
"use strict";
|
15
14
|
|
15
|
+
window = (typeof window != 'undefined' && window.Math == Math)
|
16
|
+
? window
|
17
|
+
: (typeof self != 'undefined' && self.Math == Math)
|
18
|
+
? self
|
19
|
+
: Function('return this')()
|
20
|
+
;
|
21
|
+
|
16
22
|
$.fn.sidebar = function(parameters) {
|
17
23
|
var
|
18
24
|
$allModules = $(this),
|
@@ -766,7 +772,12 @@ $.fn.sidebar = function(parameters) {
|
|
766
772
|
$.extend(true, settings, name);
|
767
773
|
}
|
768
774
|
else if(value !== undefined) {
|
769
|
-
settings[name]
|
775
|
+
if($.isPlainObject(settings[name])) {
|
776
|
+
$.extend(true, settings[name], value);
|
777
|
+
}
|
778
|
+
else {
|
779
|
+
settings[name] = value;
|
780
|
+
}
|
770
781
|
}
|
771
782
|
else {
|
772
783
|
return settings[name];
|
@@ -784,7 +795,7 @@ $.fn.sidebar = function(parameters) {
|
|
784
795
|
}
|
785
796
|
},
|
786
797
|
debug: function() {
|
787
|
-
if(settings.debug) {
|
798
|
+
if(!settings.silent && settings.debug) {
|
788
799
|
if(settings.performance) {
|
789
800
|
module.performance.log(arguments);
|
790
801
|
}
|
@@ -795,7 +806,7 @@ $.fn.sidebar = function(parameters) {
|
|
795
806
|
}
|
796
807
|
},
|
797
808
|
verbose: function() {
|
798
|
-
if(settings.verbose && settings.debug) {
|
809
|
+
if(!settings.silent && settings.verbose && settings.debug) {
|
799
810
|
if(settings.performance) {
|
800
811
|
module.performance.log(arguments);
|
801
812
|
}
|
@@ -806,8 +817,10 @@ $.fn.sidebar = function(parameters) {
|
|
806
817
|
}
|
807
818
|
},
|
808
819
|
error: function() {
|
809
|
-
|
810
|
-
|
820
|
+
if(!settings.silent) {
|
821
|
+
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
|
822
|
+
module.error.apply(console, arguments);
|
823
|
+
}
|
811
824
|
},
|
812
825
|
performance: {
|
813
826
|
log: function(message) {
|
@@ -942,6 +955,7 @@ $.fn.sidebar.settings = {
|
|
942
955
|
name : 'Sidebar',
|
943
956
|
namespace : 'sidebar',
|
944
957
|
|
958
|
+
silent : false,
|
945
959
|
debug : false,
|
946
960
|
verbose : false,
|
947
961
|
performance : true,
|
@@ -3,12 +3,12 @@
|
|
3
3
|
* http://github.com/semantic-org/semantic-ui/
|
4
4
|
*
|
5
5
|
*
|
6
|
-
* Copyright 2015 Contributors
|
7
6
|
* Released under the MIT license
|
8
7
|
* http://opensource.org/licenses/MIT
|
9
8
|
*
|
10
9
|
*/
|
11
|
-
|
10
|
+
|
11
|
+
;(function ($, window, document, undefined) {
|
12
12
|
|
13
13
|
$.site = $.fn.site = function(parameters) {
|
14
14
|
var
|
@@ -3,16 +3,22 @@
|
|
3
3
|
* http://github.com/semantic-org/semantic-ui/
|
4
4
|
*
|
5
5
|
*
|
6
|
-
* Copyright 2015 Contributors
|
7
6
|
* Released under the MIT license
|
8
7
|
* http://opensource.org/licenses/MIT
|
9
8
|
*
|
10
9
|
*/
|
11
10
|
|
12
|
-
;(function (
|
11
|
+
;(function ($, window, document, undefined) {
|
13
12
|
|
14
13
|
"use strict";
|
15
14
|
|
15
|
+
window = (typeof window != 'undefined' && window.Math == Math)
|
16
|
+
? window
|
17
|
+
: (typeof self != 'undefined' && self.Math == Math)
|
18
|
+
? self
|
19
|
+
: Function('return this')()
|
20
|
+
;
|
21
|
+
|
16
22
|
$.fn.state = function(parameters) {
|
17
23
|
var
|
18
24
|
$allModules = $(this),
|
@@ -409,7 +415,12 @@ $.fn.state = function(parameters) {
|
|
409
415
|
$.extend(true, settings, name);
|
410
416
|
}
|
411
417
|
else if(value !== undefined) {
|
412
|
-
settings[name]
|
418
|
+
if($.isPlainObject(settings[name])) {
|
419
|
+
$.extend(true, settings[name], value);
|
420
|
+
}
|
421
|
+
else {
|
422
|
+
settings[name] = value;
|
423
|
+
}
|
413
424
|
}
|
414
425
|
else {
|
415
426
|
return settings[name];
|
@@ -427,7 +438,7 @@ $.fn.state = function(parameters) {
|
|
427
438
|
}
|
428
439
|
},
|
429
440
|
debug: function() {
|
430
|
-
if(settings.debug) {
|
441
|
+
if(!settings.silent && settings.debug) {
|
431
442
|
if(settings.performance) {
|
432
443
|
module.performance.log(arguments);
|
433
444
|
}
|
@@ -438,7 +449,7 @@ $.fn.state = function(parameters) {
|
|
438
449
|
}
|
439
450
|
},
|
440
451
|
verbose: function() {
|
441
|
-
if(settings.verbose && settings.debug) {
|
452
|
+
if(!settings.silent && settings.verbose && settings.debug) {
|
442
453
|
if(settings.performance) {
|
443
454
|
module.performance.log(arguments);
|
444
455
|
}
|
@@ -449,8 +460,10 @@ $.fn.state = function(parameters) {
|
|
449
460
|
}
|
450
461
|
},
|
451
462
|
error: function() {
|
452
|
-
|
453
|
-
|
463
|
+
if(!settings.silent) {
|
464
|
+
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
|
465
|
+
module.error.apply(console, arguments);
|
466
|
+
}
|
454
467
|
},
|
455
468
|
performance: {
|
456
469
|
log: function(message) {
|
@@ -3,16 +3,22 @@
|
|
3
3
|
* http://github.com/semantic-org/semantic-ui/
|
4
4
|
*
|
5
5
|
*
|
6
|
-
* Copyright 2015 Contributors
|
7
6
|
* Released under the MIT license
|
8
7
|
* http://opensource.org/licenses/MIT
|
9
8
|
*
|
10
9
|
*/
|
11
10
|
|
12
|
-
;(function (
|
11
|
+
;(function ($, window, document, undefined) {
|
13
12
|
|
14
13
|
"use strict";
|
15
14
|
|
15
|
+
window = (typeof window != 'undefined' && window.Math == Math)
|
16
|
+
? window
|
17
|
+
: (typeof self != 'undefined' && self.Math == Math)
|
18
|
+
? self
|
19
|
+
: Function('return this')()
|
20
|
+
;
|
21
|
+
|
16
22
|
$.fn.sticky = function(parameters) {
|
17
23
|
var
|
18
24
|
$allModules = $(this),
|
@@ -57,6 +63,8 @@ $.fn.sticky = function(parameters) {
|
|
57
63
|
|| function(callback) { setTimeout(callback, 0); },
|
58
64
|
|
59
65
|
element = this,
|
66
|
+
|
67
|
+
documentObserver,
|
60
68
|
observer,
|
61
69
|
module
|
62
70
|
;
|
@@ -90,6 +98,9 @@ $.fn.sticky = function(parameters) {
|
|
90
98
|
destroy: function() {
|
91
99
|
module.verbose('Destroying previous instance');
|
92
100
|
module.reset();
|
101
|
+
if(documentObserver) {
|
102
|
+
documentObserver.disconnect();
|
103
|
+
}
|
93
104
|
if(observer) {
|
94
105
|
observer.disconnect();
|
95
106
|
}
|
@@ -104,22 +115,18 @@ $.fn.sticky = function(parameters) {
|
|
104
115
|
},
|
105
116
|
|
106
117
|
observeChanges: function() {
|
107
|
-
var
|
108
|
-
context = $context[0]
|
109
|
-
;
|
110
118
|
if('MutationObserver' in window) {
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
}, 100);
|
119
|
+
documentObserver = new MutationObserver(module.event.documentChanged);
|
120
|
+
observer = new MutationObserver(module.event.changed);
|
121
|
+
documentObserver.observe(document, {
|
122
|
+
childList : true,
|
123
|
+
subtree : true
|
117
124
|
});
|
118
125
|
observer.observe(element, {
|
119
126
|
childList : true,
|
120
127
|
subtree : true
|
121
128
|
});
|
122
|
-
observer.observe(context, {
|
129
|
+
observer.observe($context[0], {
|
123
130
|
childList : true,
|
124
131
|
subtree : true
|
125
132
|
});
|
@@ -171,6 +178,25 @@ $.fn.sticky = function(parameters) {
|
|
171
178
|
},
|
172
179
|
|
173
180
|
event: {
|
181
|
+
changed: function(mutations) {
|
182
|
+
clearTimeout(module.timer);
|
183
|
+
module.timer = setTimeout(function() {
|
184
|
+
module.verbose('DOM tree modified, updating sticky menu', mutations);
|
185
|
+
module.refresh();
|
186
|
+
}, 100);
|
187
|
+
},
|
188
|
+
documentChanged: function(mutations) {
|
189
|
+
[].forEach.call(mutations, function(mutation) {
|
190
|
+
if(mutation.removedNodes) {
|
191
|
+
[].forEach.call(mutation.removedNodes, function(node) {
|
192
|
+
if(node == element || $(node).find(element).length > 0) {
|
193
|
+
module.debug('Element removed from DOM, tearing down events');
|
194
|
+
module.destroy();
|
195
|
+
}
|
196
|
+
});
|
197
|
+
}
|
198
|
+
});
|
199
|
+
},
|
174
200
|
load: function() {
|
175
201
|
module.verbose('Page contents finished loading');
|
176
202
|
requestAnimationFrame(module.refresh);
|
@@ -643,7 +669,7 @@ $.fn.sticky = function(parameters) {
|
|
643
669
|
},
|
644
670
|
|
645
671
|
reset: function() {
|
646
|
-
module.debug('
|
672
|
+
module.debug('Resetting elements position');
|
647
673
|
module.unbind();
|
648
674
|
module.unfix();
|
649
675
|
module.resetCSS();
|
@@ -688,7 +714,7 @@ $.fn.sticky = function(parameters) {
|
|
688
714
|
}
|
689
715
|
},
|
690
716
|
debug: function() {
|
691
|
-
if(settings.debug) {
|
717
|
+
if(!settings.silent && settings.debug) {
|
692
718
|
if(settings.performance) {
|
693
719
|
module.performance.log(arguments);
|
694
720
|
}
|
@@ -699,7 +725,7 @@ $.fn.sticky = function(parameters) {
|
|
699
725
|
}
|
700
726
|
},
|
701
727
|
verbose: function() {
|
702
|
-
if(settings.verbose && settings.debug) {
|
728
|
+
if(!settings.silent && settings.verbose && settings.debug) {
|
703
729
|
if(settings.performance) {
|
704
730
|
module.performance.log(arguments);
|
705
731
|
}
|
@@ -710,8 +736,10 @@ $.fn.sticky = function(parameters) {
|
|
710
736
|
}
|
711
737
|
},
|
712
738
|
error: function() {
|
713
|
-
|
714
|
-
|
739
|
+
if(!settings.silent) {
|
740
|
+
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
|
741
|
+
module.error.apply(console, arguments);
|
742
|
+
}
|
715
743
|
},
|
716
744
|
performance: {
|
717
745
|
log: function(message) {
|
@@ -845,6 +873,7 @@ $.fn.sticky.settings = {
|
|
845
873
|
name : 'Sticky',
|
846
874
|
namespace : 'sticky',
|
847
875
|
|
876
|
+
silent : false,
|
848
877
|
debug : false,
|
849
878
|
verbose : true,
|
850
879
|
performance : true,
|
@@ -888,7 +917,7 @@ $.fn.sticky.settings = {
|
|
888
917
|
|
889
918
|
error : {
|
890
919
|
container : 'Sticky element must be inside a relative container',
|
891
|
-
visible : 'Element is hidden, you must call refresh after element becomes visible',
|
920
|
+
visible : 'Element is hidden, you must call refresh after element becomes visible. Use silent setting to surpress this warning in production.',
|
892
921
|
method : 'The method you called is not defined.',
|
893
922
|
invalidContext : 'Context specified does not exist',
|
894
923
|
elementSize : 'Sticky element is larger than its container, cannot create sticky.'
|
@@ -904,4 +933,4 @@ $.fn.sticky.settings = {
|
|
904
933
|
|
905
934
|
};
|
906
935
|
|
907
|
-
})( jQuery, window, document );
|
936
|
+
})( jQuery, window, document );
|