Skip to content

Instantly share code, notes, and snippets.

@betobaz
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save betobaz/ea52ef1a8447d2c70606 to your computer and use it in GitHub Desktop.
Save betobaz/ea52ef1a8447d2c70606 to your computer and use it in GitHub Desktop.
SugarCRM :: create-actions :: dashlet :: add drawer close callback
({
plugins:['Dashlet'],
initialize: function(argument) {
this._super('initialize', arguments);
var self = this;
this.model.on('sync', _.bind(this._handlerSaveDependents, this))
self.saved = false;
this.layout.layout.layout.layout.onCloseCallback.push(function(){
if(self.saved){
// Haz lo que quieras aqui despues de que se cierra la ventana de una
// drawer
}
});
},
_handlerSaveDependents: function(argument) {
var self = this;
self.saved = true;
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment