summaryrefslogtreecommitdiff
path: root/views/js/mce_plugin.js
diff options
context:
space:
mode:
authorDaniel Schmitzer <noreply@maennchen1.de>2016-01-14 14:55:36 +0000
committerDaniel Schmitzer <noreply@maennchen1.de>2016-01-14 14:55:36 +0000
commitad405c7045c6e242080ec9d3ce4c9e586b517c4f (patch)
treeb41905f4d27f3eaaabd5bad3a39f8d3873540b46 /views/js/mce_plugin.js
- Testweise 4
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5261 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/js/mce_plugin.js')
-rw-r--r--views/js/mce_plugin.js45
1 files changed, 45 insertions, 0 deletions
diff --git a/views/js/mce_plugin.js b/views/js/mce_plugin.js
new file mode 100644
index 0000000..ed5289d
--- /dev/null
+++ b/views/js/mce_plugin.js
@@ -0,0 +1,45 @@
+(function() {
+
+ tinymce.create('tinymce.plugins.wpsgPlugin', {
+
+ init : function(ed, url) {
+
+ ed.addCommand('mcewpsg', function() {
+ ed.windowManager.open({
+ file : 'admin.php?page=wpsg-Produkt&action=select&noheader=1',
+ width : 350,
+ height : 235,
+ inline : 1
+ }, {
+ plugin_url : url
+ });
+ });
+
+ ed.addButton('wpsg', {
+ title : 'Produkt aus dem Produktkatalog einfügen',
+ cmd : 'mcewpsg',
+ image : url + '/../gfx/basket_select.png'
+ });
+
+ ed.onNodeChange.add(function(ed, cm, n) {
+ cm.setActive('wpsg', n.nodeName == 'IMG');
+ });
+ },
+
+ createControl : function(n, cm) {
+ return null;
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'wpShopGermany Produktauswahl',
+ author : 'maennchen1.de',
+ authorurl : 'http://maennchen1.de',
+ version : "3.0"
+ };
+ }
+ });
+
+ tinymce.PluginManager.add('wpsg', tinymce.plugins.wpsgPlugin);
+
+})();