Advertisement
nlozovan

Untitled

Jul 22nd, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.96 KB | None | 0 0
  1. (function ()
  2. {
  3. tinymce.PluginManager.add('wpsynergyShortcodes', function(ed, url) {
  4. ed.addCommand("wpsynergyPopup", function ( a, params )
  5. {
  6. //var popup = 'shortcode-generator';
  7.  
  8. if(typeof params != 'undefined' && params.identifier) {
  9. popup = params.identifier;
  10. }
  11.  
  12. jQuery('#TB_window').hide();
  13.  
  14. // load thickbox
  15. tb_show("Insert wpsynergy Shortcode", url + "/popup.php?popup=" + popup + "&width=" + 800);
  16. });
  17.  
  18. // Add a button that opens a window
  19. ed.addButton('wpsynergy_button', {
  20. text: '',
  21. icon: false,
  22. image: wpsynergyShortcodes.plugin_folder +"/tinymce/images/icon.png",
  23. cmd: 'wpsynergyPopup',
  24. type: 'splitbutton',
  25. onclick : function(e) {},
  26. menu: [
  27. {text: 'List posts',onclick:function(){
  28. ed.execCommand("wpsynergyPopup", false, {title: 'List posts',identifier: 'list-posts'})
  29. }},
  30. {text: 'List categories',onclick:function(){
  31. ed.execCommand("wpsynergyPopup", false, {title: 'List categories',identifier: 'list-categories'})
  32. }},
  33. {text: 'Team members',onclick:function(){
  34. ed.execCommand("wpsynergyPopup", false, {title: 'Team members',identifier: 'team_member'})
  35. }},
  36. {text: 'Testimonials',onclick:function(){
  37. ed.execCommand("wpsynergyPopup", false, {title: 'Testimonials',identifier: 'testimonials'})
  38. }},
  39. {text: 'Capabilities',onclick:function(){
  40. ed.execCommand("wpsynergyPopup", false, {title: 'Capabilities',identifier: 'capabilities'})
  41. }},
  42. {text: 'Service Boxes',onclick:function(){
  43. ed.execCommand("wpsynergyPopup", false, {title: 'Service Boxes',identifier: 'services'})
  44. }},
  45. {text: 'Price table',onclick:function(){
  46. ed.execCommand("wpsynergyPopup", false, {title: 'Price table',identifier: 'price_table'})
  47. }},
  48. {text: 'Row',onclick:function(){
  49. ed.execCommand("wpsynergyPopup", false, {title: 'Row',identifier: 'row'})
  50. }},
  51. {text: 'Contact form',onclick:function(){
  52. ed.execCommand("wpsynergyPopup", false, {title: 'Contact form',identifier: 'contact_form'})
  53. }},
  54. {text: 'Alerts',onclick:function(){
  55. ed.execCommand("wpsynergyPopup", false, {title: 'Alerts',identifier: 'alert'})
  56. }},
  57. {text: 'Buttons',onclick:function(){
  58. ed.execCommand("wpsynergyPopup", false, {title: 'Buttons',identifier: 'button'})
  59. }},
  60. {text: 'Columns',onclick:function(){
  61. ed.execCommand("wpsynergyPopup", false, {title: 'Columns',identifier: 'columns'})
  62. }},
  63. {text: 'Tabs',onclick:function(){
  64. ed.execCommand("wpsynergyPopup", false, {title: 'Tabs',identifier: 'tabs'})
  65. }},
  66. {text: 'Accordion',onclick:function(){
  67. ed.execCommand("wpsynergyPopup", false, {title: 'Accordion',identifier: 'accordion'})
  68. }},
  69. {text: 'Toggle',onclick:function(){
  70. ed.execCommand("wpsynergyPopup", false, {title: 'Toggle',identifier: 'toggle'})
  71. }},
  72. {text: 'Font Icon',onclick:function(){
  73. ed.execCommand("wpsynergyPopup", false, {title: 'Font Icon',identifier: 'font-icon'})
  74. }},
  75.  
  76. ]
  77. });
  78.  
  79. });
  80. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement