Skip to content

Instantly share code, notes, and snippets.

@Sigmus
Last active December 11, 2015 11:08
Show Gist options
  • Save Sigmus/4591791 to your computer and use it in GitHub Desktop.
Save Sigmus/4591791 to your computer and use it in GitHub Desktop.
define(['modal', 'hijack', 'belongs', 'operation'],
function(Modal, Hijack, Belongs, Operation) {
return function(parent) {
var relations = {};
Operation('js_operation',
_.extend(
Belongs({
parent: parent,
relations: relations
}),
{after: Hijack(Modal()).close}
)
);
return {
add: function(name, data) {
relations[name] = data;
}
};
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment