| 1 |
(function() { |
| 2 |
var is_epy_pro = (epprokey && epprokey.length > 0); |
| 3 |
tinymce.create('tinymce.plugins.Embedpluswiz_youtubeprefs', { |
| 4 |
init : function(ed, url) { |
| 5 |
var plep = new Image(); |
| 6 |
plep.src = url+'/../images/wizbutton.png'; |
| 7 |
ed.addButton('embedpluswiz_youtubeprefs', { |
| 8 |
title : is_epy_pro ? 'Visual YouTube Wizard - An easier embedding option' : "YouTube Settings Shortcut (Opens new tab)", |
| 9 |
onclick : function(ev) { |
| 10 |
|
| 11 |
if (is_epy_pro) |
| 12 |
{ |
| 13 |
modalw = Math.round(jQuery(window).width() *.9); |
| 14 |
modalh = Math.round(jQuery(window).height() *.8); |
| 15 |
ed.windowManager.open({ |
| 16 |
title : "Visual YouTube Wizard - An easier embedding option", |
| 17 |
file : epbasesite + '/wpembedcode-simple.aspx?blogwidth=' + epblogwidth + '&domain=' + escape(window.location.toString()) + '&prokey=' + escape(epprokey) + '&myytdefaults=' + escape(myytdefaults), |
| 18 |
width : 950, |
| 19 |
height : modalh, |
| 20 |
inline : true, |
| 21 |
resizable: true, |
| 22 |
scrollbars: true |
| 23 |
}, { |
| 24 |
plugin_url : url, // Plugin absolute URL |
| 25 |
some_custom_arg : '' // Custom argument |
| 26 |
}); |
| 27 |
} |
| 28 |
else |
| 29 |
{ |
| 30 |
window.open(eppluginadminurl); |
| 31 |
} |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
} |
| 36 |
}); |
| 37 |
}, |
| 38 |
createControl : function(n, cm) { |
| 39 |
return null; |
| 40 |
}, |
| 41 |
getInfo : function() { |
| 42 |
return { |
| 43 |
longname : "Visual YouTube Wizard - An easier embedding option", |
| 44 |
author : 'EmbedPlus', |
| 45 |
authorurl : 'http://www.embedplus.com/', |
| 46 |
infourl : 'http://www.embedplus.com/', |
| 47 |
version : epversion |
| 48 |
}; |
| 49 |
} |
| 50 |
}); |
| 51 |
tinymce.PluginManager.add('embedpluswiz_youtubeprefs', tinymce.plugins.Embedpluswiz_youtubeprefs); |
| 52 |
|
| 53 |
|
| 54 |
})(); |