Advertisement
Guest User

Untitled

a guest
Sep 29th, 2015
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. onOptionAdd: function (value, data) {
  2. if (modelRef != undefined && typeof data.Id == "string") {
  3. if (modelRef == "organisations") {
  4. var newModel = m.prop();
  5. Organisation.individual(-1).then(newModel).then(function () {
  6. newModel().Name(data.Name);
  7. var modalForm = m.component(miniOrganisationForm, { model: newModel })
  8. var modalCtrl = new modalForm.controller();
  9. var modal = new modalForm.view(modalCtrl);
  10.  
  11. m.mount(document.getElementById("append-area"), m.component(modal))
  12. })
  13. }
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement