Created
September 11, 2015 18:45
-
-
Save betobaz/587662ead1fdf5d5dad4 to your computer and use it in GitHub Desktop.
SugarCRM: Sidecar: Open create-actions layout in a drawer on demand
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
({ | |
events:{ | |
'click button': '_handlerClick', | |
}, | |
_handlerClick: function(evt, el){ | |
var modelPrefil = app.data.createBean("Accounts"); | |
modelPrefil.set({ | |
name: "Account name", | |
assigned_user_name: 1 | |
}); | |
self.drawer = app.drawer.open({ | |
layout: "create-actions", | |
context:{ | |
create: true, | |
model: modelPrefil | |
} | |
}, function(){ | |
console.log("After save", arguments); | |
}); | |
app.once("app:view:change", function(name, attributes){ | |
console.log('After drawer display'); | |
}); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment