Created
October 5, 2016 10:51
-
-
Save brusch/7530948ee5c1265bd7ee790778aa412c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
pimcore.registerNS("pimcore.plugin.test"); | |
pimcore.plugin.test = Class.create(pimcore.plugin.admin, { | |
getClassName: function() { | |
return "pimcore.plugin.test"; | |
}, | |
initialize: function() { | |
pimcore.plugin.broker.registerPlugin(this); | |
}, | |
pimcoreReady: function (params,broker){ | |
// alert("Test Plugin Ready!"); | |
}, | |
postOpenDocument: function (document, type) { | |
if(document["type"] == "page" || document["type"] == "snippet") { | |
var leftToolbar = document.edit.getLayout().getDockedItems('toolbar[dock="left"]').first(); | |
leftToolbar.add({ | |
tooltip: t("Add Widget to Top"), | |
iconCls: "pimcore_icon_add", | |
handler: function (el) { | |
alert("test"); | |
} | |
}); | |
} | |
} | |
}); | |
var testPlugin = new pimcore.plugin.test(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment