Skip to content

Commit

Permalink
#3713 - adds silent option to all modules
Browse files Browse the repository at this point in the history
  • Loading branch information
jlukic committed Feb 19, 2016
1 parent c46c170 commit 7040acd
Show file tree
Hide file tree
Showing 22 changed files with 153 additions and 84 deletions.
7 changes: 7 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@
**Bugs**
- **Dropdown** - Fixed issue where `apiSettings` was not defaulting to use `cache: 'local'` as specified in the docs
- **Dropdown** - Fixed issue where dropdowns with sub-menus would not properly activate on mobile #3183
- **Form** - Fixed issue where grouped `fields` and `field` would cause different margin collapse, making `fields` include larger gaps between content #3717
- **Menu** - Fixed issue with `stackable` menu where `left/right` `menu` or `item` would incorrectly be floated when stacked. #3604
- **Modal** - Fixes issue where RGB values set for dimmer `background-color` werent being correctly interpreted #3665 **Thanks @larsbo**
- **Form** - Fixed use of deprecated `size()` method in `prompt` #3655 **Thanks @SimonArdrey**
- **List** - Fixed issue where `relaxed` and `very relaxed` lists included unnecessary padding on the first and last items #3710
- **List** - Fixed issue where divided lists had unnecessary padding on first and last items, in both horizontal and vertical layouts #3710
- **List** - Fixed issue where bullets would be affected by font weight #3715
- **Rating** - Fixed issue where rating would fire `onRate` when rating is initialized #3712
-**Table** - Fixed issue where `striped selectable` table would not correctly show hover color on striped rows
-**Segment/Message** - Fixed issue where `top attached message` would have no border when attached to `segment` #3619
-**Popup** - Fixed issue where checking `instanceof SVGGraphicsElement` caused error in IE11 #3043
Expand All @@ -25,6 +31,7 @@

**Enhancements**
-**Dropdown** - Using API with dropdown will now
-**Rating** - Added new setting `fireOnInit` for rating, which defaults to `false`. When set to true `onRate` will fire when rating is initialized #3712
-**Site** `@px` and `@relativepx` i.e. `@relative12px` which can be used to return EM value of pixels are now extended to `@relative40px`
-**Tabs** - Added option `deactivate`, defaults to `siblings` which will only deactivate tab activators that are DOM siblings elements to the activating element. Setting it to <code>'all'</code> will deactivate any other tab element initialized at the same time.
-**Table** - Added more granular variablaes for controlling style on first column in a `definition table`
Expand Down
10 changes: 6 additions & 4 deletions src/definitions/behaviors/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ $.api = $.fn.api = function(parameters) {
}
},
debug: function() {
if(settings.debug) {
if(!settings.silent && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -859,7 +859,7 @@ $.api = $.fn.api = function(parameters) {
}
},
verbose: function() {
if(settings.verbose && settings.debug) {
if(!settings.silent && settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -870,8 +870,10 @@ $.api = $.fn.api = function(parameters) {
}
},
error: function() {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
if(!settings.silent) {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
}
},
performance: {
log: function(message) {
Expand Down
10 changes: 6 additions & 4 deletions src/definitions/behaviors/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ $.fn.form = function(parameters) {
}
},
debug: function() {
if(settings.debug) {
if(!settings.silent && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -888,7 +888,7 @@ $.fn.form = function(parameters) {
}
},
verbose: function() {
if(settings.verbose && settings.debug) {
if(!settings.silent && settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -899,8 +899,10 @@ $.fn.form = function(parameters) {
}
},
error: function() {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
if(!settings.silent) {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
}
},
performance: {
log: function(message) {
Expand Down
10 changes: 6 additions & 4 deletions src/definitions/behaviors/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ $.fn.state = function(parameters) {
}
},
debug: function() {
if(settings.debug) {
if(!settings.silent && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -438,7 +438,7 @@ $.fn.state = function(parameters) {
}
},
verbose: function() {
if(settings.verbose && settings.debug) {
if(!settings.silent && settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -449,8 +449,10 @@ $.fn.state = function(parameters) {
}
},
error: function() {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
if(!settings.silent) {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
}
},
performance: {
log: function(message) {
Expand Down
10 changes: 6 additions & 4 deletions src/definitions/behaviors/visibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ $.fn.visibility = function(parameters) {
}
},
debug: function() {
if(settings.debug) {
if(!settings.silent && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -981,7 +981,7 @@ $.fn.visibility = function(parameters) {
}
},
verbose: function() {
if(settings.verbose && settings.debug) {
if(!settings.silent && settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -992,8 +992,10 @@ $.fn.visibility = function(parameters) {
}
},
error: function() {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
if(!settings.silent) {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
}
},
performance: {
log: function(message) {
Expand Down
10 changes: 6 additions & 4 deletions src/definitions/behaviors/visit.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ $.visit = $.fn.visit = function(parameters) {
}
},
debug: function() {
if(settings.debug) {
if(!settings.silent && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -333,7 +333,7 @@ $.visit = $.fn.visit = function(parameters) {
}
},
verbose: function() {
if(settings.verbose && settings.debug) {
if(!settings.silent && settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -344,8 +344,10 @@ $.visit = $.fn.visit = function(parameters) {
}
},
error: function() {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
if(!settings.silent) {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
}
},
performance: {
log: function(message) {
Expand Down
11 changes: 7 additions & 4 deletions src/definitions/modules/accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ $.fn.accordion = function(parameters) {
}
},
debug: function() {
if(settings.debug) {
if(!settings.silent && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -399,7 +399,7 @@ $.fn.accordion = function(parameters) {
}
},
verbose: function() {
if(settings.verbose && settings.debug) {
if(!settings.silent && settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -410,8 +410,10 @@ $.fn.accordion = function(parameters) {
}
},
error: function() {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
if(!settings.silent) {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
}
},
performance: {
log: function(message) {
Expand Down Expand Up @@ -544,6 +546,7 @@ $.fn.accordion.settings = {
name : 'Accordion',
namespace : 'accordion',

silent : false,
debug : false,
verbose : false,
performance : true,
Expand Down
11 changes: 7 additions & 4 deletions src/definitions/modules/checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ $.fn.checkbox = function(parameters) {
}
},
debug: function() {
if(settings.debug) {
if(!settings.silent && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -613,7 +613,7 @@ $.fn.checkbox = function(parameters) {
}
},
verbose: function() {
if(settings.verbose && settings.debug) {
if(!settings.silent && settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -624,8 +624,10 @@ $.fn.checkbox = function(parameters) {
}
},
error: function() {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
if(!settings.silent) {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
}
},
performance: {
log: function(message) {
Expand Down Expand Up @@ -760,6 +762,7 @@ $.fn.checkbox.settings = {
name : 'Checkbox',
namespace : 'checkbox',

silent : false,
debug : false,
verbose : true,
performance : true,
Expand Down
11 changes: 7 additions & 4 deletions src/definitions/modules/dimmer.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ $.fn.dimmer = function(parameters) {
}
},
debug: function() {
if(settings.debug) {
if(!settings.silent && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -475,7 +475,7 @@ $.fn.dimmer = function(parameters) {
}
},
verbose: function() {
if(settings.verbose && settings.debug) {
if(!settings.silent && settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -486,8 +486,10 @@ $.fn.dimmer = function(parameters) {
}
},
error: function() {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
if(!settings.silent) {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
}
},
performance: {
log: function(message) {
Expand Down Expand Up @@ -627,6 +629,7 @@ $.fn.dimmer.settings = {
name : 'Dimmer',
namespace : 'dimmer',

silent : false,
debug : false,
verbose : false,
performance : true,
Expand Down
11 changes: 7 additions & 4 deletions src/definitions/modules/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -3070,7 +3070,7 @@ $.fn.dropdown = function(parameters) {
}
},
debug: function() {
if(settings.debug) {
if(!settings.silent && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -3081,7 +3081,7 @@ $.fn.dropdown = function(parameters) {
}
},
verbose: function() {
if(settings.verbose && settings.debug) {
if(!settings.silent && settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -3092,8 +3092,10 @@ $.fn.dropdown = function(parameters) {
}
},
error: function() {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
if(!settings.silent) {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
}
},
performance: {
log: function(message) {
Expand Down Expand Up @@ -3224,6 +3226,7 @@ $.fn.dropdown = function(parameters) {

$.fn.dropdown.settings = {

silent : false,
debug : false,
verbose : false,
performance : true,
Expand Down
11 changes: 7 additions & 4 deletions src/definitions/modules/embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ $.fn.embed = function(parameters) {
}
},
debug: function() {
if(settings.debug) {
if(!settings.silent && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -388,7 +388,7 @@ $.fn.embed = function(parameters) {
}
},
verbose: function() {
if(settings.verbose && settings.debug) {
if(!settings.silent && settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -399,8 +399,10 @@ $.fn.embed = function(parameters) {
}
},
error: function() {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
if(!settings.silent) {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
}
},
performance: {
log: function(message) {
Expand Down Expand Up @@ -537,6 +539,7 @@ $.fn.embed.settings = {
name : 'Embed',
namespace : 'embed',

silent : false,
debug : false,
verbose : false,
performance : true,
Expand Down
Loading

0 comments on commit 7040acd

Please sign in to comment.