Skip to content

Commit

Permalink
Updated component to version 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Semantic-Pusher-Robot committed Jun 26, 2016
1 parent bda1494 commit 3b68409
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 26 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"framework"
],
"license": "MIT",
"version": "2.1.7"
"version": "2.2.0"
}
37 changes: 29 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/*!
* # Semantic UI 2.1.7 - Nag
* # Semantic UI 2.2.0 - Nag
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2015 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
Expand All @@ -13,6 +12,13 @@

"use strict";

window = (typeof window != 'undefined' && window.Math == Math)
? window
: (typeof self != 'undefined' && self.Math == Math)
? self
: Function('return this')()
;

var _module = module;
module.exports = function(parameters) {
var
Expand Down Expand Up @@ -256,7 +262,12 @@ module.exports = function(parameters) {
$.extend(true, settings, name);
}
else if(value !== undefined) {
settings[name] = value;
if($.isPlainObject(settings[name])) {
$.extend(true, settings[name], value);
}
else {
settings[name] = value;
}
}
else {
return settings[name];
Expand All @@ -274,7 +285,7 @@ module.exports = function(parameters) {
}
},
debug: function() {
if(settings.debug) {
if(!settings.silent && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -285,7 +296,7 @@ module.exports = 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 @@ -296,8 +307,10 @@ module.exports = 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 @@ -431,13 +444,14 @@ _module.exports.settings = {

name : 'Nag',

silent : false,
debug : false,
verbose : false,
performance : true,

namespace : 'Nag',

// allows cookie to be overriden
// allows cookie to be overridden
persist : false,

// set to zero to require manually dismissal, otherwise hides on its own
Expand Down Expand Up @@ -484,4 +498,11 @@ _module.exports.settings = {

};

// Adds easing
$.extend( $.easing, {
easeOutQuad: function (x, t, b, c, d) {
return -c *(t/=d)*(t-2) + b;
}
});

})( require("jquery"), window, document );
3 changes: 1 addition & 2 deletions nag.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/*!
* # Semantic UI 2.1.7 - Nag
* # Semantic UI 2.2.0 - Nag
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2015 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
Expand Down
37 changes: 29 additions & 8 deletions nag.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/*!
* # Semantic UI 2.1.7 - Nag
* # Semantic UI 2.2.0 - Nag
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2015 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
Expand All @@ -13,6 +12,13 @@

"use strict";

window = (typeof window != 'undefined' && window.Math == Math)
? window
: (typeof self != 'undefined' && self.Math == Math)
? self
: Function('return this')()
;

$.fn.nag = function(parameters) {
var
$allModules = $(this),
Expand Down Expand Up @@ -255,7 +261,12 @@ $.fn.nag = function(parameters) {
$.extend(true, settings, name);
}
else if(value !== undefined) {
settings[name] = value;
if($.isPlainObject(settings[name])) {
$.extend(true, settings[name], value);
}
else {
settings[name] = value;
}
}
else {
return settings[name];
Expand All @@ -273,7 +284,7 @@ $.fn.nag = function(parameters) {
}
},
debug: function() {
if(settings.debug) {
if(!settings.silent && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
Expand All @@ -284,7 +295,7 @@ $.fn.nag = 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 @@ -295,8 +306,10 @@ $.fn.nag = 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 @@ -430,13 +443,14 @@ $.fn.nag.settings = {

name : 'Nag',

silent : false,
debug : false,
verbose : false,
performance : true,

namespace : 'Nag',

// allows cookie to be overriden
// allows cookie to be overridden
persist : false,

// set to zero to require manually dismissal, otherwise hides on its own
Expand Down Expand Up @@ -483,4 +497,11 @@ $.fn.nag.settings = {

};

// Adds easing
$.extend( $.easing, {
easeOutQuad: function (x, t, b, c, d) {
return -c *(t/=d)*(t-2) + b;
}
});

})( jQuery, window, document );
3 changes: 1 addition & 2 deletions nag.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions nag.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Package.describe({
name : 'semantic:ui-nag',
summary : 'Semantic UI - Nag: Single component release',
version : '2.1.7',
version : '2.2.0',
git : 'git://github.com/Semantic-Org/UI-Nag.git',
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "semantic-ui-nag",
"version": "2.1.7",
"version": "2.2.0",
"title": "Semantic UI - Nag",
"description": "Single component release of nag",
"homepage": "http://www.semantic-ui.com",
Expand Down

0 comments on commit 3b68409

Please sign in to comment.