Browse Source

Fixes issue with extending settings with

api-progress
Jack Lukic 8 years ago
parent
commit
d4ecfa12ff
16 changed files with 93 additions and 20 deletions
  1. 1
      RELEASE-NOTES.md
  2. 7
      src/definitions/behaviors/api.js
  3. 7
      src/definitions/behaviors/state.js
  4. 7
      src/definitions/modules/accordion.js
  5. 7
      src/definitions/modules/checkbox.js
  6. 9
      src/definitions/modules/dimmer.js
  7. 7
      src/definitions/modules/dropdown.js
  8. 7
      src/definitions/modules/embed.js
  9. 7
      src/definitions/modules/modal.js
  10. 7
      src/definitions/modules/nag.js
  11. 7
      src/definitions/modules/progress.js
  12. 7
      src/definitions/modules/rating.js
  13. 9
      src/definitions/modules/shape.js
  14. 7
      src/definitions/modules/sidebar.js
  15. 10
      src/definitions/modules/tab.js
  16. 7
      src/definitions/modules/transition.js

1
RELEASE-NOTES.md

@ -5,6 +5,7 @@
**Major Enhancements**
- **Progress** - Progress now uses a polling interval for updates. Rapidly updating the progress bar over a period quicker than the animation duration (for example with xhr `onprogress` events say every 50ms) will now appear smooth as butter.
- **Modules** - Added new setting `silent` to all modules which allows you to disable **all** console output including errors. This can be useful for preventing known errors, like a popup which cannot place itself on screen, or `sticky` content which initializes before it is visible #3713
- **Modules** - Using `setting` on a setting that is an object literal, for example `error: {}` will now extend the existing object instead of replacing it.
- **Dropdown** - All dropdowns, not just `selection dropdown`, will now select the first `menu item` that starts with a pressed keyboard key, for example "N" will select "New"
- **Build Tools** - Added new `autoInstall` option to allow for Semantic to be installed without user interaction. See [docs explanation](http://www.semantic-ui.com/introduction/advanced-usage.html#Auto-Install) for how to use. #3616 **Thanks @algorithme**

7
src/definitions/behaviors/api.js

@ -830,7 +830,12 @@ $.api = $.fn.api = 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];

7
src/definitions/behaviors/state.js

@ -409,7 +409,12 @@ $.fn.state = 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];

7
src/definitions/modules/accordion.js

@ -367,7 +367,12 @@ $.fn.accordion = 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];

7
src/definitions/modules/checkbox.js

@ -584,7 +584,12 @@ $.fn.checkbox = 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];

9
src/definitions/modules/dimmer.js

@ -446,7 +446,12 @@ $.fn.dimmer = 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];
@ -694,4 +699,4 @@ $.fn.dimmer.settings = {
};
})( jQuery, window, document );
})( jQuery, window, document );

7
src/definitions/modules/dropdown.js

@ -3058,7 +3058,12 @@ $.fn.dropdown = 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];

7
src/definitions/modules/embed.js

@ -359,7 +359,12 @@ $.fn.embed = 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];

7
src/definitions/modules/modal.js

@ -645,7 +645,12 @@ $.fn.modal = 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];

7
src/definitions/modules/nag.js

@ -255,7 +255,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];

7
src/definitions/modules/progress.js

@ -607,7 +607,12 @@ $.fn.progress = 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];

7
src/definitions/modules/rating.js

@ -263,7 +263,12 @@ $.fn.rating = 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];

9
src/definitions/modules/shape.js

@ -650,7 +650,12 @@ $.fn.shape = 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];
@ -878,4 +883,4 @@ $.fn.shape.settings = {
};
})( jQuery, window, document );
})( jQuery, window, document );

7
src/definitions/modules/sidebar.js

@ -766,7 +766,12 @@ $.fn.sidebar = 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];

10
src/definitions/modules/tab.js

@ -263,9 +263,6 @@ $.fn.tab = function(parameters) {
},
set: {
activeTab($tab) {
},
auto: function() {
var
url = (typeof settings.path == 'string')
@ -667,7 +664,12 @@ $.fn.tab = 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];

7
src/definitions/modules/transition.js

@ -828,7 +828,12 @@ $.fn.transition = function() {
$.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];

Loading…
Cancel
Save