Closed GoogleCodeExporter closed 9 years ago
Mollify sure does use HTML, but it's dynamic so the DOM is injected runtime.
Adding your own content must be done using client plugins, for example adding
your own action into the popup would be something like this:
function MyPlugin() {
var that = this;
this.getPluginInfo = function() { return { id: "myplugin" }; }
this.initialize = function(env) {
that.env = env;
env.addItemContextProvider(function(item, details) {
return {
components : [],
actions : {
primary : [
{
title: "My action",
callback: that.onMyAction
}
],
secondary: []
}
}
});
}
this.onMyAction = function(id, item, details) {
// do whatever your action
}
}
Of course you need to register this plugin in the mollify init.
Original comment by samuli.j...@gmail.com
on 21 Nov 2011 at 5:04
One note, in the example you can see primary actions and secondary actions
(they should be in same level, badly indented). The difference is that primary
actions are rendered with buttons, secondary actions are listed in the actions
dropdown.
Original comment by samuli.j...@gmail.com
on 21 Nov 2011 at 5:09
Original comment by samuli.j...@gmail.com
on 21 Nov 2011 at 5:09
Original issue reported on code.google.com by
bhts...@gmail.com
on 18 Nov 2011 at 5:47