Created
August 8, 2012 00:01
-
-
Save sdesai/3290740 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var MS = function(config) { | |
// Since you won't be mixing in Y.ModelSync.REST | |
// as a separate extensions | |
Y.ModelSync.REST.apply(this, arguments); | |
}; | |
Y.mix(MS, Y.ModelSync.REST); // Mainly to pull over ModelSync.REST.ATTRS, but maybe other stuff also. | |
Y.mix(MS.prototype, Y.ModelSync.REST.prototype); | |
MS.prototype.getURL : function (action, options) { | |
if (Lang.isArray(this._shelves)) { | |
return this.root; | |
} | |
// other conditions here | |
return Y.ModelSync.REST.prototype.getURL.apply(this, arguments); | |
}; | |
MS.prototype.sync = function() { | |
if (someoverridecondition) { | |
// new logic | |
} else { | |
Y.ModelSync.REST.prototype.sync.apply(this, arguments); | |
} | |
}; | |
Y.GalleryModelSync = MS; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment