Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

changing log method

  • Loading branch information...
commit 8f342d1de17da8e66850b5e617a3bc6d3a9c2590 1 parent fa38675
@anutron anutron authored
View
6 Class/Class.js
@@ -1,5 +1,5 @@
Class.empty = function(){
- MooCompat.log('1.1 > 1.2: replace Class.empty with $empty');
+ MooTools.upgradeLog('1.1 > 1.2: replace Class.empty with $empty');
return $empty;
};
@@ -15,7 +15,7 @@ Class.empty = function(){
};
Class.prototype.extend = function(properties){
- MooCompat.log('1.1 > 1.2: Class.extend is deprecated. See the class Extend mutator.');
+ MooTools.upgradeLog('1.1 > 1.2: Class.extend is deprecated. See the class Extend mutator.');
var maker = proto(properties);
var made = new maker();
made.Extends = this;
@@ -25,7 +25,7 @@ Class.empty = function(){
var __implement = Class.prototype.implement;
Class.prototype.implement = function(){
if (arguments.length > 1 && Array.every(arguments, Object.type)){
- MooCompat.log('1.1 > 1.2: Class.implement no longer takes more than one thing at a time, either MyClass.implement(key, value) or MyClass.implement(object) but NOT MyClass.implement(new Foo, new Bar, new Baz). See also: the class Implements mutator.');
+ MooTools.upgradeLog('1.1 > 1.2: Class.implement no longer takes more than one thing at a time, either MyClass.implement(key, value) or MyClass.implement(object) but NOT MyClass.implement(new Foo, new Bar, new Baz). See also: the class Implements mutator.');
Array.each(arguments, function(argument){
__implement.call(this, argument);
}, this);
View
16 Core/Browser.js
@@ -7,35 +7,35 @@ if (Browser.__defineGetter__) {
if(Browser.hasGetter){ // webkit, gecko, opera support
window.__defineGetter__('ie',function(){
- MooCompat.log('1.1 > 1.2: window.ie is deprecated. Use Browser.Engine.trident');
+ MooTools.upgradeLog('1.1 > 1.2: window.ie is deprecated. Use Browser.Engine.trident');
return (Browser.Engine.name == 'trident') ? true : false;
});
window.__defineGetter__('ie6',function(){
- MooCompat.log('1.1 > 1.2: window.ie6 is deprecated. Use Browser.Engine.trident and Browser.Engine.version');
+ MooTools.upgradeLog('1.1 > 1.2: window.ie6 is deprecated. Use Browser.Engine.trident and Browser.Engine.version');
return (Browser.Engine.name == 'trident' && Browser.Engine.version == 4) ? true : false;
});
window.__defineGetter__('ie7',function(){
- MooCompat.log('1.1 > 1.2: window.ie7 is deprecated. Use Browser.Engine.trident and Browser.Engine.version');
+ MooTools.upgradeLog('1.1 > 1.2: window.ie7 is deprecated. Use Browser.Engine.trident and Browser.Engine.version');
return (Browser.Engine.name == 'trident' && Browser.Engine.version == 5) ? true : false;
});
window.__defineGetter__('gecko',function(){
- MooCompat.log('1.1 > 1.2: window.gecko is deprecated. Use Browser.Engine.gecko');
+ MooTools.upgradeLog('1.1 > 1.2: window.gecko is deprecated. Use Browser.Engine.gecko');
return (Browser.Engine.name == 'gecko') ? true : false;
});
window.__defineGetter__('webkit',function(){
- MooCompat.log('1.1 > 1.2: window.webkit is deprecated. Use Browser.Engine.webkit');
+ MooTools.upgradeLog('1.1 > 1.2: window.webkit is deprecated. Use Browser.Engine.webkit');
return (Browser.Engine.name == 'webkit') ? true : false;
});
window.__defineGetter__('webkit419',function(){
- MooCompat.log('1.1 > 1.2: window.webkit is deprecated. Use Browser.Engine.webkit and Browser.Engine.version');
+ MooTools.upgradeLog('1.1 > 1.2: window.webkit is deprecated. Use Browser.Engine.webkit and Browser.Engine.version');
return (Browser.Engine.name == 'webkit' && Browser.Engine.version == 419) ? true : false;
});
window.__defineGetter__('webkit420',function(){
- MooCompat.log('1.1 > 1.2: window.webkit is deprecated. Use Browser.Engine.webkit and Browser.Engine.version');
+ MooTools.upgradeLog('1.1 > 1.2: window.webkit is deprecated. Use Browser.Engine.webkit and Browser.Engine.version');
return (Browser.Engine.name == 'webkit' && Browser.Engine.version == 420) ? true : false;
});
window.__defineGetter__('opera',function(){
- MooCompat.log('1.1 > 1.2: window.opera is deprecated. Use Browser.Engine.presto');
+ MooTools.upgradeLog('1.1 > 1.2: window.opera is deprecated. Use Browser.Engine.presto');
return (Browser.Engine.name == 'presto') ? true : false;
});
} else {
View
11 Core/Core.js
@@ -3,18 +3,15 @@ if(!console.log) console.log = function(){};
if(!console.warn) console.warn = console.log;
if(!console.error) console.error = console.warn;
-var MooCompat = {
- log: function() {
- if (console[this.logging]) console[this.logging].apply(console, arguments);
- },
- logging: 'warn'
+MooTools.upgradeLog = function() {
+ if (console[this.upgradeLogLevel]) console[this.upgradeLogLevel].apply(console, arguments);
};
(function(){
oldA = $A;
window.$A = function(iterable, start, length){
if (start != undefined && length != undefined) {
- MooCompat.log('1.1 > 1.2: $A no longer takes start and length arguments.');
+ MooTools.upgradeLog('1.1 > 1.2: $A no longer takes start and length arguments.');
if (Browser.Engine.trident && $type(iterable) == 'collection'){
start = start || 0;
if (start < 0) start = iterable.length + start;
@@ -38,7 +35,7 @@ var MooCompat = {
if (natv) {
var extend = natv.extend;
natv.extend = function(props){
- MooCompat.log('1.1 > 1.2: native types no longer use .extend to add methods to prototypes but instead use .implement. NOTE: YOUR METHODS WERE NOT IMPLEMENTED ON THE NATIVE ' + type.toUpperCase() + ' PROTOTYPE.');
+ MooTools.upgradeLog('1.1 > 1.2: native types no longer use .extend to add methods to prototypes but instead use .implement. NOTE: YOUR METHODS WERE NOT IMPLEMENTED ON THE NATIVE ' + type.toUpperCase() + ' PROTOTYPE.');
return extend.apply(this, arguments);
};
}
View
8 Element/Element.Dimensions.js
@@ -12,7 +12,7 @@
Element.implement({
getSize: function(){
- MooCompat.log('1.1 > 1.2: NOTE: getSize is different in 1.2; it no longer returns values for size, scroll, and scrollSize, but instead just returns x/y values for the dimensions of the element.');
+ MooTools.upgradeLog('1.1 > 1.2: NOTE: getSize is different in 1.2; it no longer returns values for size, scroll, and scrollSize, but instead just returns x/y values for the dimensions of the element.');
var size = getSize.apply(this, arguments);
return $merge(size, {
size: size,
@@ -23,7 +23,7 @@
getPosition: function(relative){
if (relative && $type(relative) == "array") {
- MooCompat.log('1.1 > 1.2: Element.getPosition no longer accepts an array of overflown elements but rather, optionally, a single element to get relative coordinates.');
+ MooTools.upgradeLog('1.1 > 1.2: Element.getPosition no longer accepts an array of overflown elements but rather, optionally, a single element to get relative coordinates.');
relative = null;
}
return getPosition.apply(this, [relative]);
@@ -31,7 +31,7 @@
getCoordinates: function(relative){
if (relative && $type(relative) == "array") {
- MooCompat.log('1.1 > 1.2: Element.getCoordinates no longer accepts an array of overflown elements but rather, optionally, a single element to get relative coordinates.');
+ MooTools.upgradeLog('1.1 > 1.2: Element.getCoordinates no longer accepts an array of overflown elements but rather, optionally, a single element to get relative coordinates.');
relative = null;
}
return getCoordinates.apply(this, [relative]);
@@ -42,7 +42,7 @@
Native.implement([Document, Window], {
getSize: function(){
- MooCompat.log('1.1 > 1.2: NOTE: getSize is different in 1.2; it no longer returns values for size, scroll, and scrollSize, but instead just returns x/y values for the dimensions of the element.');
+ MooTools.upgradeLog('1.1 > 1.2: NOTE: getSize is different in 1.2; it no longer returns values for size, scroll, and scrollSize, but instead just returns x/y values for the dimensions of the element.');
var size;
var win = this.getWindow();
var doc = this.getDocument();
View
4 Element/Element.Style.js
@@ -1,7 +1,7 @@
Element.implement({
setOpacity: function(op){
- MooCompat.log('1.1 > 1.2: Element.setOpacity is deprecated; use Element.setStyle("opacity", value).');
+ MooTools.upgradeLog('1.1 > 1.2: Element.setOpacity is deprecated; use Element.setStyle("opacity", value).');
return this.setStyle('opacity', op);
}
@@ -10,7 +10,7 @@ Element.implement({
Element.Properties.styles = {
set: function(styles){
- MooCompat.log('1.1 > 1.2: Element.set("styles") no longer accepts a string as an argument. Pass an object instead.');
+ MooTools.upgradeLog('1.1 > 1.2: Element.set("styles") no longer accepts a string as an argument. Pass an object instead.');
if ($type(styles) == 'string'){
styles.split(";").each(function(style){
this.setStyle(style.split(":")[0], style.split(":")[1]);
View
22 Element/Element.js
@@ -5,49 +5,49 @@
Element.implement({
getFormElements: function(){
- MooCompat.log('1.1 > 1.2: Element.getFormElements is deprecated, use Element.getElements("input, textarea, select");');
+ MooTools.upgradeLog('1.1 > 1.2: Element.getFormElements is deprecated, use Element.getElements("input, textarea, select");');
return this.getElements('input, textarea, select');
},
replaceWith: function(el){
- MooCompat.log('1.1 > 1.2: Element.replaceWith is deprecated, use Element.replaces instead.');
+ MooTools.upgradeLog('1.1 > 1.2: Element.replaceWith is deprecated, use Element.replaces instead.');
el = $(el);
this.parentNode.replaceChild(el, this);
return el;
},
remove: function() {
- MooCompat.log('1.1 > 1.2: Element.remove is deprecated - use Element.dispose.');
+ MooTools.upgradeLog('1.1 > 1.2: Element.remove is deprecated - use Element.dispose.');
return this.dispose.apply(this, arguments);
},
getText: function(){
- MooCompat.log('1.1 > 1.2: Element.getText is deprecated - use Element.get("text").');
+ MooTools.upgradeLog('1.1 > 1.2: Element.getText is deprecated - use Element.get("text").');
return this.get('text');
},
setText: function(text){
- MooCompat.log('1.1 > 1.2: Element.setText is deprecated - use Element.set("text", text).');
+ MooTools.upgradeLog('1.1 > 1.2: Element.setText is deprecated - use Element.set("text", text).');
return this.set('text', text);
},
setHTML: function(){
- MooCompat.log('1.1 > 1.2: Element.setHTML is deprecated - use Element.set("html", HTML).');
+ MooTools.upgradeLog('1.1 > 1.2: Element.setHTML is deprecated - use Element.set("html", HTML).');
return this.set('html', arguments);
},
getHTML: function(){
- MooCompat.log('1.1 > 1.2: Element.getHTML is deprecated - use Element.get("html").');
+ MooTools.upgradeLog('1.1 > 1.2: Element.getHTML is deprecated - use Element.get("html").');
return this.get('html');
},
getTag: function(){
- MooCompat.log('1.1 > 1.2: Element.getTag is deprecated - use Element.get("tag").');
+ MooTools.upgradeLog('1.1 > 1.2: Element.getTag is deprecated - use Element.get("tag").');
return this.get('tag');
},
getValue: function(){
- MooCompat.log('1.1 > 1.2: Element.getValue is deprecated - use Element.get("value").');
+ MooTools.upgradeLog('1.1 > 1.2: Element.getValue is deprecated - use Element.get("value").');
switch(this.getTag()){
case 'select':
var values = [];
@@ -62,7 +62,7 @@
},
toQueryString: function(){
- MooCompat.log('1.1 > 1.2: warning Element.toQueryString is slightly different; inputs without names are excluded, inputs with type == submit, reset, and file are excluded, and inputs with undefined values are excluded.');
+ MooTools.upgradeLog('1.1 > 1.2: warning Element.toQueryString is slightly different; inputs without names are excluded, inputs with type == submit, reset, and file are excluded, and inputs with undefined values are excluded.');
return toQueryString.apply(this, arguments);
}
});
@@ -71,7 +71,7 @@
Element.Properties.properties = {
set: function(props){
- MooCompat.log('1.1 > 1.2: Element.set({properties: {}}) is deprecated; instead of properties, just name the values at the root of the object (Element.set({src: url})).');
+ MooTools.upgradeLog('1.1 > 1.2: Element.set({properties: {}}) is deprecated; instead of properties, just name the values at the root of the object (Element.set({src: url})).');
$H(props).each(function(value, property){
this.set(property, value);
}, this);
View
4 Fx/Fx.Morph.js
@@ -1,7 +1,7 @@
Fx.Styles = new Class({
Extends: Fx.Morph,
initialize: function(){
- MooCompat.log('1.1 > 1.2: Fx.Styles is deprecated. use Fx.Morph.');
+ MooTools.upgradeLog('1.1 > 1.2: Fx.Styles is deprecated. use Fx.Morph.');
this.parent.apply(this, arguments);
}
});
@@ -9,7 +9,7 @@ Fx.Styles = new Class({
Element.implement({
effects: function(options){
- MooCompat.log('1.1 > 1.2: Element.effects is deprecated; use Fx.Morph or Element.morph.');
+ MooTools.upgradeLog('1.1 > 1.2: Element.effects is deprecated; use Fx.Morph or Element.morph.');
return new Fx.Morph(this, options);
}
View
2  Fx/Fx.Scroll.js
@@ -1,7 +1,7 @@
Fx.Scroll.implement({
scrollTo: function(y, x){
- MooCompat.log('1.1 > 1.2: Fx.Scroll\'s .scrollTo is deprecated; use .start.');
+ MooTools.upgradeLog('1.1 > 1.2: Fx.Scroll\'s .scrollTo is deprecated; use .start.');
return this.start(y, x);
}
View
6 Fx/Fx.Tween.js
@@ -1,7 +1,7 @@
Fx.Style = new Class({
Extends: Fx.Tween,
initialize: function(element, property, options){
- MooCompat.log('1.1 > 1.2: Fx.Style is deprecated. use Fx.Tween.');
+ MooTools.upgradeLog('1.1 > 1.2: Fx.Style is deprecated. use Fx.Tween.');
this.property = property;
this.parent(element, options);
},
@@ -15,7 +15,7 @@ Fx.Style = new Class({
},
hide: function(){
- MooCompat.log('1.1 > 1.2: Fx.Style .hide() is deprecated; use Fx.Tween .set(0) instead');
+ MooTools.upgradeLog('1.1 > 1.2: Fx.Style .hide() is deprecated; use Fx.Tween .set(0) instead');
return this.set(0);
}
@@ -24,7 +24,7 @@ Fx.Style = new Class({
Element.implement({
effect: function(property, options){
- MooCompat.log('1.1 > 1.2: Element.effect is deprecated; use Fx.Tween or Element.tween.');
+ MooTools.upgradeLog('1.1 > 1.2: Element.effect is deprecated; use Fx.Tween or Element.tween.');
return new Fx.Style(this, property, options);
}
View
8 Fx/Fx.js
@@ -1,17 +1,17 @@
Fx.implement({
custom: function(from, to){
- MooCompat.log('1.1 > 1.2: Fx.custom is deprecated. use Fx.start.');
+ MooTools.upgradeLog('1.1 > 1.2: Fx.custom is deprecated. use Fx.start.');
return this.start(from, to);
},
clearTimer: function(){
- MooCompat.log('1.1 > 1.2: Fx.clearTimer is deprecated. use Fx.cancel.');
+ MooTools.upgradeLog('1.1 > 1.2: Fx.clearTimer is deprecated. use Fx.cancel.');
return this.cancel();
},
stop: function(){
- MooCompat.log('1.1 > 1.2: Fx.stop is deprecated. use Fx.cancel.');
+ MooTools.upgradeLog('1.1 > 1.2: Fx.stop is deprecated. use Fx.cancel.');
return this.cancel();
}
@@ -20,7 +20,7 @@ Fx.implement({
Fx.Base = new Class({
Extends: Fx,
initialize: function(){
- MooCompat.log('1.1 > 1.2: Fx.Base is deprecated. use Fx.');
+ MooTools.upgradeLog('1.1 > 1.2: Fx.Base is deprecated. use Fx.');
this.parent.apply(this, arguments);
}
});
View
6 Native/Array.js
@@ -1,17 +1,17 @@
Array.implement({
copy: function(start, length){
- MooCompat.log('1.1 > 1.2: Array.copy is deprecated. Use Array.splice');
+ MooTools.upgradeLog('1.1 > 1.2: Array.copy is deprecated. Use Array.splice');
return $A(this, start, length);
},
remove : function(item){
- MooCompat.log('1.1 > 1.2: Array.remove is deprecated. Use Array.erase');
+ MooTools.upgradeLog('1.1 > 1.2: Array.remove is deprecated. Use Array.erase');
return this.erase(item);
},
merge : function(array){
- MooCompat.log('1.1 > 1.2: Array.merge is deprecated. Use Array.combine');
+ MooTools.upgradeLog('1.1 > 1.2: Array.merge is deprecated. Use Array.combine');
return this.combine(array);
}
View
4 Native/Function.js
@@ -1,12 +1,12 @@
Function.implement({
bindAsEventListener: function(bind, args){
- MooCompat.log('1.1 > 1.2: Function.bindAsEventListener is deprecated. Use bindWithEvent.');
+ MooTools.upgradeLog('1.1 > 1.2: Function.bindAsEventListener is deprecated. Use bindWithEvent.');
return this.bindWithEvent.call(this, bind, args);
}
});
Function.empty = function(){
- MooCompat.log('1.1 > 1.2: Function.empty is now just $empty.');
+ MooTools.upgradeLog('1.1 > 1.2: Function.empty is now just $empty.');
};
View
14 Native/Hash.js
@@ -1,34 +1,34 @@
Hash.implement({
keys : function(){
- MooCompat.log('1.1 > 1.2: Hash.keys is deprecated. Use Hash.getKeys');
+ MooTools.upgradeLog('1.1 > 1.2: Hash.keys is deprecated. Use Hash.getKeys');
return this.getKeys();
},
values : function(){
- MooCompat.log('1.1 > 1.2: Hash.values is deprecated. Use Hash.getValues');
+ MooTools.upgradeLog('1.1 > 1.2: Hash.values is deprecated. Use Hash.getValues');
return this.getValues();
},
hasKey : function(item){
- MooCompat.log('1.1 > 1.2: Hash.hasKey is deprecated. Use Hash.has');
+ MooTools.upgradeLog('1.1 > 1.2: Hash.hasKey is deprecated. Use Hash.has');
return this.has(item);
},
merge : function(properties){
- MooCompat.log('1.1 > 1.2: Hash.merge is deprecated. Use Hash.combine');
+ MooTools.upgradeLog('1.1 > 1.2: Hash.merge is deprecated. Use Hash.combine');
return this.extend(properties);
},
remove: function(key){
- MooCompat.log('1.1 > 1.2: Hash.remove is deprecated. use Hash.erase');
+ MooTools.upgradeLog('1.1 > 1.2: Hash.remove is deprecated. use Hash.erase');
return this.erase(key);
}
});
Object.toQueryString = function(obj){
- MooCompat.log('1.1 > 1.2: Object.toQueryString() is deprecated. use Hash.toQueryString() instead');
+ MooTools.upgradeLog('1.1 > 1.2: Object.toQueryString() is deprecated. use Hash.toQueryString() instead');
$H(obj).each(function(item, key){
if ($type(item) == 'object' || $type(item) == 'array'){
obj[key] = item.toString();
@@ -38,6 +38,6 @@ Object.toQueryString = function(obj){
};
var Abstract = function(obj){
- MooCompat.log('1.1 > 1.2: Abstract is deprecated. Use Hash');
+ MooTools.upgradeLog('1.1 > 1.2: Abstract is deprecated. Use Hash');
return new Hash(obj);
};
View
6 Plugins/Tips.js
@@ -4,11 +4,11 @@
Tips.implement({
initialize: function(){
- MooCompat.log('1.1 > 1.2: Tips DOM element layout has changed and your CSS classes may need to change.');
+ MooTools.upgradeLog('1.1 > 1.2: Tips DOM element layout has changed and your CSS classes may need to change.');
var params = Array.link(arguments, {options: Object.type, elements: $defined});
this.setOptions(params.options);
if (this.options.offsets) {
- MooCompat.log('1.1 > 1.2: Tips no longer have an "offsets" option; use "offset".');
+ MooTools.upgradeLog('1.1 > 1.2: Tips no longer have an "offsets" option; use "offset".');
this.options.offset = this.options.offsets;
}
document.id(this);
@@ -25,7 +25,7 @@
elements.each(function(element){
var title = element.get('title');
if (title.test('::')) {
- MooCompat.log('1.1 > 1.2: Tips no longer parse the title attribute for "::" for title/caption; use title and rel attributes instead.');
+ MooTools.upgradeLog('1.1 > 1.2: Tips no longer parse the title attribute for "::" for title/caption; use title and rel attributes instead.');
element.store('tip:title', title.split('::')[0]);
element.store('tip:text', title.split('::')[1]);
element.set('title', '');
View
4 README.md
@@ -20,6 +20,10 @@ The "error" option uses the *console.error* method which, in Firebug at least, p
The "none" option hides all warnings. This essentially means you are using the upgrade helper as a compatibility script. It is not really recommended.
+Set it by assigning "error", "warn", or "none" to *MooTools.upgradeLogLevel*.
+
+ MooTools.upgradeLogLevel = 'warn';
+
Breaking Changes in MooTools 1.1 > 1.2
--------------------------------------
View
2  Request/Request.JSON.js
@@ -7,7 +7,7 @@ JSON.Remote = new Class({
Extends: Request.JSON,
initialize: function(url, options){
- MooCompat.log('JSON.Remote is deprecated. Use Request.JSON');
+ MooTools.upgradeLog('JSON.Remote is deprecated. Use Request.JSON');
this.parent(options);
this.onComplete = $empty;
this.url = url;
View
8 Request/Request.js
@@ -7,13 +7,13 @@ var XHR = new Class({
},
initialize: function(options){
- MooCompat.log('1.1 > 1.2: XHR is deprecated. Use Request.');
+ MooTools.upgradeLog('1.1 > 1.2: XHR is deprecated. Use Request.');
this.parent(options);
this.transport = this.xhr;
},
request: function(data){
- MooCompat.log('1.1 > 1.2: XHR.request() is deprecated. Use Request.send() instead.');
+ MooTools.upgradeLog('1.1 > 1.2: XHR.request() is deprecated. Use Request.send() instead.');
return this.send(this.url, data || this.options.data);
},
@@ -40,7 +40,7 @@ var Ajax = new Class({
Extends: XHR,
initialize: function(url, options){
- MooCompat.log('1.1 > 1.2: Ajax is deprecated. Use Request.');
+ MooTools.upgradeLog('1.1 > 1.2: Ajax is deprecated. Use Request.');
this.url = url;
this.parent(options);
},
@@ -66,7 +66,7 @@ var Ajax = new Class({
send: function(url) {
if ($type(url) == "string") return send.apply(this, arguments);
if ($type(url) == "object") {
- MooCompat.log('1.1 > 1.2: Element.send no longer takes an options argument as its object but rather a url. See docs.');
+ MooTools.upgradeLog('1.1 > 1.2: Element.send no longer takes an options argument as its object but rather a url. See docs.');
this.set('send', url);
send.call(this);
}
View
6 Utilities/Cookie.js
@@ -1,15 +1,15 @@
Cookie.set = function(key, value, options){
- MooCompat.log('1.1 > 1.2: Cookie.set is deprecated. Use Cookie.write');
+ MooTools.upgradeLog('1.1 > 1.2: Cookie.set is deprecated. Use Cookie.write');
return new Cookie(key, options).write(value);
};
Cookie.get = function(key){
- MooCompat.log('1.1 > 1.2: Cookie.get is deprecated. Use Cookie.read');
+ MooTools.upgradeLog('1.1 > 1.2: Cookie.get is deprecated. Use Cookie.read');
return new Cookie(key).read();
};
Cookie.remove = function(key, options){
- MooCompat.log('1.1 > 1.2: Cookie.remove is deprecated. Use Cookie.dispose');
+ MooTools.upgradeLog('1.1 > 1.2: Cookie.remove is deprecated. Use Cookie.dispose');
return new Cookie(key, options).dispose();
};
View
4 Utilities/JSON.js
@@ -1,9 +1,9 @@
JSON.toString = function(obj){
- MooCompat.log('1.1 > 1.2: JSON.toString is deprecated. Use JSON.encode');
+ MooTools.upgradeLog('1.1 > 1.2: JSON.toString is deprecated. Use JSON.encode');
return JSON.encode(obj);
}
JSON.evaluate = function(str){
- MooCompat.log('1.1 > 1.2: JSON.evaluate is deprecated. Use JSON.decode');
+ MooTools.upgradeLog('1.1 > 1.2: JSON.evaluate is deprecated. Use JSON.decode');
return JSON.decode(str);
}
var Json = JSON;
View
16 Utilities/Selectors.js
@@ -1,13 +1,13 @@
Native.implement([Element, Document], {
getElementsByClassName: function(className){
- MooCompat.log('1.1 > 1.2: Element.filterByTag is deprecated.');
+ MooTools.upgradeLog('1.1 > 1.2: Element.filterByTag is deprecated.');
return this.getElements('.' + className);
},
getElementsBySelector: function(selector){
- MooCompat.log('1.1 > 1.2: Element.getElementsBySelector is deprecated. Use getElements()');
+ MooTools.upgradeLog('1.1 > 1.2: Element.getElementsBySelector is deprecated. Use getElements()');
return this.getElements(selector);
}
@@ -16,22 +16,22 @@ Native.implement([Element, Document], {
Elements.implement({
filterByTag: function(tag){
- MooCompat.log('1.1 > 1.2: Elements.filterByTag is deprecated. Use Elements.filter.');
+ MooTools.upgradeLog('1.1 > 1.2: Elements.filterByTag is deprecated. Use Elements.filter.');
return this.filter(tag);
},
filterByClass: function(className){
- MooCompat.log('1.1 > 1.2: Elements.filterByClass is deprecated. Use Elements.filter.');
+ MooTools.upgradeLog('1.1 > 1.2: Elements.filterByClass is deprecated. Use Elements.filter.');
return this.filter('.' + className);
},
filterById: function(id){
- MooCompat.log('1.1 > 1.2: Elements.filterById is deprecated. Use Elements.filter.');
+ MooTools.upgradeLog('1.1 > 1.2: Elements.filterById is deprecated. Use Elements.filter.');
return this.filter('#' + id);
},
filterByAttribute: function(name, operator, value){
- MooCompat.log('1.1 > 1.2: Elements.filterByAttribute is deprecated. Use Elements.filter.');
+ MooTools.upgradeLog('1.1 > 1.2: Elements.filterByAttribute is deprecated. Use Elements.filter.');
var filtered = this.filter('[' + name + (operator || '') + (value || '') + ']');
if (value) filtered = filtered.filter('[' + name + ']');
return filtered;
@@ -40,11 +40,11 @@ Elements.implement({
});
var $E = function(selector, filter){
- MooCompat.log('1.1 > 1.2: $E is deprecated, use document.getElement.');
+ MooTools.upgradeLog('1.1 > 1.2: $E is deprecated, use document.getElement.');
return ($(filter) || document).getElement(selector);
};
var $ES = function(selector, filter){
- MooCompat.log('1.1 > 1.2: $ES is deprecated. Use $$.');
+ MooTools.upgradeLog('1.1 > 1.2: $ES is deprecated. Use $$.');
return ($(filter) || document).getElements(selector);
};
Please sign in to comment.
Something went wrong with that request. Please try again.