public/rails_ext/rails_ext.js in rails-ext-0.3.2 vs public/rails_ext/rails_ext.js in rails-ext-0.3.3

- old
+ new

@@ -8,14 +8,22 @@ railsExt = 'defined'; // // JavaScript Extension // -Array.prototype.size = function () { +String.prototype.blank = function() { + return this.replace(/[\s\n\r]+/, '').length == 0; +}; + +String.prototype.size = function() { return this.length; }; +Array.prototype.size = function() { + return this.length; +}; + function Hash(hash) { hash = hash || {}; var _this = this; $.each(hash, function(key){_this[key] = this}); }; @@ -43,22 +51,18 @@ // // jQuery Extension // $.extend({ infoMessage: function(message){ - try{ - this.jGrowl(message); - }catch(e){console.log(e)}; + log(message); }, message: function(msg){ $.infoMessage(msg) }, errorMessage: function(message){ - try{ - this.jGrowl(message); - }catch(e){console.log(e)}; + log(message); }, checkForMessages: function(json){ if(json['info']) $.infoMessage(json['info']); if(json['error']) $.errorMessage(json['error']); \ No newline at end of file