Skip to content

Instantly share code, notes, and snippets.

@preaction
Created April 23, 2010 16:43
Show Gist options
  • Save preaction/376779 to your computer and use it in GitHub Desktop.
Save preaction/376779 to your computer and use it in GitHub Desktop.
/**
* makeEditAsset( url )
* Create a callback to edit an asset. Use when attaching to event listeners
*/
WebGUI.Admin.prototype.makeEditAsset
= function (url) {
var self = this; // Scope correction
return function() {
self.editAsset( url );
};
};
/**
* makeGotoAsset( url )
* Create a callback to view an asset. Use when attaching to event listeners
*/
WebGUI.Admin.prototype.makeGotoAsset
= function ( url ) {
var self = this; // Scope correction
return function() {
self.gotoAsset( url );
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment