Skip to content

Commit

Permalink
fixing spacing, console.warn calls now use MooCompat.log
Browse files Browse the repository at this point in the history
  • Loading branch information
anutron committed Dec 28, 2009
1 parent 7cb345e commit 81755bf
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 32 deletions.
2 changes: 1 addition & 1 deletion Class/Class.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Class.empty = function(){
console.warn('1.1 > 1.2: replace Class.empty with $empty');
MooCompat.log('1.1 > 1.2: replace Class.empty with $empty');
return $empty;
};

Expand Down
2 changes: 1 addition & 1 deletion Element/Element.Style.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Element.implement({
Element.Properties.styles = {

set: function(styles){
console.warn('1.1 > 1.2: Element.set("styles") no longer accepts a string as an argument. Pass an object instead.');
MooCompat.log('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]);
Expand Down
4 changes: 2 additions & 2 deletions Native/Function.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Function.extend({

bindAsEventListener: function(bind, args){
MooCompat.log('Function.bindAsEventListener is deprecated.');
return this.create({'bind': bind, 'event': true, 'arguments': args});
MooCompat.log('1.1 > 1.2: Function.bindAsEventListener is deprecated. Use bindWithEvent.');
return this.bindWithEvent.call(this, bind, args);
}

});
Expand Down
35 changes: 17 additions & 18 deletions Request/Request.JSON.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
JSON.Remote = new Class({

options: {
key: 'json'
},
options: {
key: 'json'
},

Extends: Request.JSON,
Extends: Request.JSON,

initialize: function(url, options){
initialize: function(url, options){
MooCompat.log('JSON.Remote is deprecated. Use Request.JSON');
this.parent(options);
this.onComplete = $empty;
this.url = url;
},
this.parent(options);
this.onComplete = $empty;
this.url = url;
},

send: function(data){
if (!this.check(arguments.callee, data)) return this;
return this.parent({url: this.url, data: {json: Json.encode(data)}});
},

failure: function(){
this.fireEvent('failure', this.xhr);
}
send: function(data){
if (!this.check(arguments.callee, data)) return this;
return this.parent({url: this.url, data: {json: Json.encode(data)}});
},

});
failure: function(){
this.fireEvent('failure', this.xhr);
}

});
12 changes: 6 additions & 6 deletions Utilities/Cookie.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

Cookie.set = function(key, value, options){
console.warn('1.1 > 1.2: Cookie.set is deprecated. Use Cookie.write');
return new Cookie(key, options).write(value);
MooCompat.log('1.1 > 1.2: Cookie.set is deprecated. Use Cookie.write');
return new Cookie(key, options).write(value);
};

Cookie.get = function(key){
console.warn('1.1 > 1.2: Cookie.get is deprecated. Use Cookie.read');
return new Cookie(key).read();
MooCompat.log('1.1 > 1.2: Cookie.get is deprecated. Use Cookie.read');
return new Cookie(key).read();
};

Cookie.remove = function(key, options){
console.warn('1.1 > 1.2: Cookie.remove is deprecated. Use Cookie.dispose');
return new Cookie(key, options).dispose();
MooCompat.log('1.1 > 1.2: Cookie.remove is deprecated. Use Cookie.dispose');
return new Cookie(key, options).dispose();
};
5 changes: 2 additions & 3 deletions Utilities/JSON.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

JSON.toString = function(obj){
console.warn('1.1 > 1.2: JSON.toString is deprecated. Use JSON.encode');
MooCompat.log('1.1 > 1.2: JSON.toString is deprecated. Use JSON.encode');
return JSON.encode(obj);
}
JSON.evaluate = function(str){
console.warn('1.1 > 1.2: JSON.evaluate is deprecated. Use JSON.decode');
MooCompat.log('1.1 > 1.2: JSON.evaluate is deprecated. Use JSON.decode');
return JSON.decode(str);
}
var Json = JSON;
Expand Down
2 changes: 1 addition & 1 deletion Utilities/Selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Native.implement([Element, Document], {
},

getElementsBySelector: function(selector){
console.warn('1.1 > 1.2: Element.getElementsBySelector is deprecated. Use getElements()');
MooCompat.log('1.1 > 1.2: Element.getElementsBySelector is deprecated. Use getElements()');
return this.getElements(selector);
}

Expand Down

0 comments on commit 81755bf

Please sign in to comment.