PluginProbe
Customify / 2.1.1
Customify v2.1.1
2.10.9 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.7.1 1.3.0 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.6.0 1.6.0.1 1.6.5 1.7.0 1.7.1 All 77 releases
← All changes | js/jquery.cssUpdate.js +6 -25 1.4.12.1.1 View file →
@@ -75,15 +75,15 @@
75 75 * @param settings
76 76 * @param selectorText
77 77 * @returns {string}
78 78 */
79 - updateCssRule: function(property_name, settings, selectorText ){
79 + updateCssRule: function(property_name, settings, selectorText){
80 80
81 81 var self = this,
82 82 properties = settings.properties,
83 83 new_value = settings.propertyValue,
84 - // if there is a negative property ... keep it negative
85 - is_negative = self.is_negative_property(property_name, properties, selectorText );
84 + // if there is a negative property ... keep it negative
85 + sign = settings['negative_value'] ? '-' : '';
86 86
87 87 var unit = '';
88 88
89 89 if ( typeof this.settings.unit !== 'undefined' ) {
@@ -94,33 +94,14 @@
94 94 unit = 'px';
95 95 }
96 96
97 97 if ( typeof window[settings.properties.callback] === "function" ) {
98 - window[settings.properties.callback](new_value, selectorText, property_name, unit );
98 + window[settings.properties.callback](new_value, selectorText, property_name, unit);
99 + return '';
99 100 }
100 101
101 - return is_negative + new_value + unit;
102 + return sign + new_value + unit;
102 103 },
103 -
104 - /**
105 - * Check is the current property has a negative selector in our config
106 - * if this is true return the sign "-" which will be put in front of the value
107 - * @param property
108 - * @param current_properties
109 - * @param selectorText
110 - * @returns {string}
111 - */
112 - is_negative_property: function(property, current_properties, selectorText){
113 - if ( current_properties.hasOwnProperty(property) ) {
114 -
115 - if ( current_properties[property].hasOwnProperty('negative_selector') )
116 -
117 - if ( current_properties[property].negative_selector == selectorText)
118 - return '-';
119 - }
120 -
121 - return '';
122 - }
123 104 };
124 105
125 106 // Plugin wrapper
126 107 $.fn[ pluginName ] = function ( options ) {