Created
January 16, 2013 15:36
-
-
Save Sigmus/4548026 to your computer and use it in GitHub Desktop.
This file contains 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
define(['modal/standard', 'belongs'], function(Modal, Belongs) { | |
return function(params) { | |
params.onCreate = params.onCreate || function(json, child) { | |
if (json.status !== 1) { | |
alert('Ocorreu um erro!'); | |
return; | |
} | |
$.get(params[child.name].url + child.id, function(response) { | |
params[child.name].$el.append(response); | |
}); | |
}; | |
Belongs(params) | |
.listen( | |
Modal(params) | |
.hijack() | |
); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment