| 1 |
var tabs={ |
| 2 |
title:"Tabs Shortcode", |
| 3 |
id :'oscitas-form-osctabs', |
| 4 |
pluginName: 'tabs', |
| 5 |
showprobtn: false |
| 6 |
}; |
| 7 |
(function() { |
| 8 |
_create_tinyMCE_options(tabs); |
| 9 |
})(); |
| 10 |
|
| 11 |
function ebs_return_html_tabs(pluginObj){ |
| 12 |
var form = jQuery('<div id="'+pluginObj.id+'" class="oscitas-container" title="'+pluginObj.title+'">\ |
| 13 |
<p class="submit">\ |
| 14 |
<input type="button" id="oscitas-oscitastoggles-submit" class="button-primary" value="'+ebsjstrans.insert+' '+ebsjstrans.tab+'" name="submit" />\ |
| 15 |
</p><br/>\ |
| 16 |
<table id="oscitas-table" class="form-table">\ |
| 17 |
<tr>\ |
| 18 |
<th class="aligncenter"><img src="'+ebs_url+'shortcode/tabs/screenshot.jpg" /></th>\ |
| 19 |
</tr>\ |
| 20 |
</table>\ |
| 21 |
</div>'); |
| 22 |
return form; |
| 23 |
} |
| 24 |
|
| 25 |
|
| 26 |
function create_oscitas_tabs(pluginObj){ |
| 27 |
|
| 28 |
var form = jQuery(pluginObj.hashId); |
| 29 |
|
| 30 |
var table = form.find('table'); |
| 31 |
|
| 32 |
//ebs_color_picker(form.find('.color')); |
| 33 |
|
| 34 |
// handles the click event of the submit button |
| 35 |
form.find('#oscitas-oscitastoggles-submit').click(function(){ |
| 36 |
var shortcode = '['+$ebs_prefix+'tabs class="yourcustomclass"]<br/>['+$ebs_prefix+'tab title="'+ebsjstrans.tabnum+' 1" active="active"]'+ebsjstrans.tab+' 1 '+ebsjstrans.content+' '+ebsjstrans.goes+' '+ebsjstrans.here+'.[/'+$ebs_prefix+'tab]<br/>['+$ebs_prefix+'tab title="'+ebsjstrans.tabnum+' 2"]'+ebsjstrans.tab+' 2 '+ebsjstrans.content+' '+ebsjstrans.goes+' '+ebsjstrans.here+'.[/'+$ebs_prefix+'tab]<br/>['+$ebs_prefix+'tab title="'+ebsjstrans.tabnum+' 3"]'+ebsjstrans.tab+' 3 '+ebsjstrans.content+' '+ebsjstrans.goes+' '+ebsjstrans.here+'.[/'+$ebs_prefix+'tab]<br/>['+$ebs_prefix+'tab title="'+ebsjstrans.tabnum+' 4"]'+ebsjstrans.tab+' 4 '+ebsjstrans.content+' '+ebsjstrans.goes+' '+ebsjstrans.here+'.[/'+$ebs_prefix+'tab]<br/>[/'+$ebs_prefix+'tabs]'; |
| 37 |
|
| 38 |
// inserts the shortcode into the active editor |
| 39 |
ebsInsertShortcode(shortcode); |
| 40 |
|
| 41 |
// closes fancybox |
| 42 |
close_dialogue(pluginObj.hashId); |
| 43 |
}); |
| 44 |
} |
| 45 |
|
| 46 |
// |
| 47 |
// |
| 48 |
//(function() { |
| 49 |
// tinymce.create('tinymce.plugins.oscitasTabs', { |
| 50 |
// init : function(ed, url) { |
| 51 |
// ed.addButton('oscitastabs', { |
| 52 |
// title : 'Tabs Shortcode', |
| 53 |
// image : url+'/icon.png', |
| 54 |
// onclick : function() { |
| 55 |
// ed.selection.setContent('['+$ebs_prefix+'tabs class="yourcustomclass"]<br/>['+$ebs_prefix+'tab title="'+ebsjstrans.tabnum+' 1" active="active"]'+ebsjstrans.tab+' 1 '+ebsjstrans.content+' '+ebsjstrans.goes+' '+ebsjstrans.here+'.[/'+$ebs_prefix+'tab]<br/>['+$ebs_prefix+'tab title="'+ebsjstrans.tabnum+' 2"]'+ebsjstrans.tab+' 2 '+ebsjstrans.content+' '+ebsjstrans.goes+' '+ebsjstrans.here+'.[/'+$ebs_prefix+'tab]<br/>['+$ebs_prefix+'tab title="'+ebsjstrans.tabnum+' 3"]'+ebsjstrans.tab+' 3 '+ebsjstrans.content+' '+ebsjstrans.goes+' '+ebsjstrans.here+'.[/'+$ebs_prefix+'tab]<br/>['+$ebs_prefix+'tab title="'+ebsjstrans.tabnum+' 4"]'+ebsjstrans.tab+' 4 '+ebsjstrans.content+' '+ebsjstrans.goes+' '+ebsjstrans.here+'.[/'+$ebs_prefix+'tab]<br/>[/'+$ebs_prefix+'tabs]'); |
| 56 |
// } |
| 57 |
// }); |
| 58 |
// }, |
| 59 |
// createControl : function(n, cm) { |
| 60 |
// return null; |
| 61 |
// }, |
| 62 |
// getInfo : function() { |
| 63 |
// return { |
| 64 |
// longname : "Tabs Shortcode", |
| 65 |
// author : 'Oscitas Themes', |
| 66 |
// authorurl : 'http://www.oscitasthemes.in/', |
| 67 |
// infourl : 'http://www.oscitasthemes.in/', |
| 68 |
// version : "2.0.0" |
| 69 |
// }; |
| 70 |
// } |
| 71 |
// }); |
| 72 |
// tinymce.PluginManager.add('oscitastabs', tinymce.plugins.oscitasTabs); |
| 73 |
//})(); |
| 74 |
|