| @@ -6,9 +6,9 @@ | ||
| 6 | 6 | ed.addCommand('mcekadcolumns', function() { |
| 7 | 7 | ed.windowManager.open({ |
| 8 | 8 | file: ajaxurl + '?action=kadcolumns_tinymce', |
| 9 | 9 | width : 350 + parseInt(ed.getLang('button.delta_width', 0)), // size of our window |
| 10 | - height : 420 + parseInt(ed.getLang('button.delta_height', 0)), // size of our window | |
| 10 | + height : 380 + parseInt(ed.getLang('button.delta_height', 0)), // size of our window | |
| 11 | 11 | inline : 1 |
| 12 | 12 | }, { |
| 13 | 13 | plugin_url : url |
| 14 | 14 | }); |
| @@ -16,15 +16,15 @@ | ||
| 16 | 16 | |
| 17 | 17 | // Register buttons |
| 18 | 18 | ed.addButton('kadcolumns', {title : 'Insert Columns', cmd : 'mcekadcolumns', image: url + '/img/columns.png' }); |
| 19 | 19 | ed.onBeforeSetContent.add(function(ed, o) { |
| 20 | - o.content = t._do_column(o.content); | |
| 20 | + o.content = t._do_column(o.content, url); | |
| 21 | 21 | }); |
| 22 | 22 | ed.onBeforeSetContent.add(function(ed, o) { |
| 23 | - o.content = t._do_columnstart(o.content); | |
| 23 | + o.content = t._do_columnstart(o.content, url); | |
| 24 | 24 | }); |
| 25 | 25 | ed.onBeforeSetContent.add(function(ed, o) { |
| 26 | - o.content = t._do_columnend(o.content); | |
| 26 | + o.content = t._do_columnend(o.content, url); | |
| 27 | 27 | }); |
| 28 | 28 | |
| 29 | 29 | ed.onPostProcess.add(function(ed, o) { |
| 30 | 30 | if (o.get) |
| @@ -38,21 +38,21 @@ | ||
| 38 | 38 | if (o.get) |
| 39 | 39 | o.content = t._get_columnend(o.content); |
| 40 | 40 | }); |
| 41 | 41 | }, |
| 42 | - _do_column : function(co) { | |
| 42 | + _do_column : function(co, url) { | |
| 43 | 43 | return co.replace(/\[columnhelper([^\]]*)\]/g, function(a,b){ |
| 44 | - return '<img src="'+tinymce.baseURL+'/plugins/wpgallery/img/t.gif" class="columnhelper '+tinymce.DOM.encode(b)+' mceItem" title="columnhelper'+tinymce.DOM.encode(b)+'" />'; | |
| 44 | + return '<img src="'+url+'/img/t.gif" class="columnhelper '+tinymce.DOM.encode(b)+' mceItem" title="columnhelper'+tinymce.DOM.encode(b)+'" />'; | |
| 45 | 45 | }); |
| 46 | 46 | }, |
| 47 | - _do_columnstart : function(co) { | |
| 47 | + _do_columnstart : function(co, url) { | |
| 48 | 48 | return co.replace(/\[hcolumns([^\]]*)\]/g, function(a,b){ |
| 49 | - return '<img src="'+tinymce.baseURL+'/plugins/wpgallery/img/t.gif" class="columnstart mceItem" title="hcolumns" />'; | |
| 49 | + return '<img src="'+url+'/img/t.gif" class="columnstart mceItem" title="hcolumns" />'; | |
| 50 | 50 | }); |
| 51 | 51 | }, |
| 52 | - _do_columnend : function(co) { | |
| 52 | + _do_columnend : function(co, url) { | |
| 53 | 53 | return co.replace(/\[\/hcolumns([^\]]*)\]/g, function(a,b){ |
| 54 | - return '<img src="'+tinymce.baseURL+'/plugins/wpgallery/img/t.gif" class="columnend mceItem" title="/hcolumns" />'; | |
| 54 | + return '<img src="'+url+'/img/t.gif" class="columnend mceItem" title="/hcolumns" />'; | |
| 55 | 55 | }); |
| 56 | 56 | }, |
| 57 | 57 | |
| 58 | 58 | _get_column : function(co) { |