| 1 |
var well={ |
| 2 |
title:"Well Shortcode", |
| 3 |
id :'oscitas-form-well', |
| 4 |
pluginName: 'well' |
| 5 |
}; |
| 6 |
(function() { |
| 7 |
_create_tinyMCE_options(well); |
| 8 |
})(); |
| 9 |
|
| 10 |
function ebs_return_html_well(pluginObj){ |
| 11 |
var form = jQuery('<div id="'+pluginObj.id+'" class="oscitas-container" title="'+pluginObj.title+'"><table id="oscitas-table" class="form-table ebs-default-options">\ |
| 12 |
<tr>\ |
| 13 |
<th><label for="oscitas-well-type">'+ebsjstrans.well+' '+ebsjstrans.type+':</label></th>\ |
| 14 |
<td><select name="type" id="oscitas-well-type">\ |
| 15 |
<option value="">'+ebsjstrans.default+'</option>\ |
| 16 |
<option value="well-lg">'+ebsjstrans.large+'</option>\ |
| 17 |
<option value="well-sm">'+ebsjstrans.small+'</option>\ |
| 18 |
</select><br />\ |
| 19 |
</td>\ |
| 20 |
</tr>\ |
| 21 |
<tr>\ |
| 22 |
<th><label for="oscitas-well-content">'+ebsjstrans.well+' '+ebsjstrans.content+':</label></th>\ |
| 23 |
<td><textarea name="well" id="oscitas-well-content">'+ebsjstrans.your+' '+ebsjstrans.content+'</textarea><br />\ |
| 24 |
</td>\ |
| 25 |
</tr>\ |
| 26 |
<tr>\ |
| 27 |
<th><label for="oscitas-well-class">'+ebsjstrans.customclass+':</label></th>\ |
| 28 |
<td><input type="text" name="line" id="oscitas-well-class" value=""/><br />\ |
| 29 |
</td>\ |
| 30 |
</tr>\ |
| 31 |
</table>\ |
| 32 |
<p class="submit ebs-default-options">\ |
| 33 |
<input type="button" id="oscitas-well-submit" class="button-primary" value="'+ebsjstrans.insert+' '+ebsjstrans.well+'" name="submit" />\ |
| 34 |
</p>\ |
| 35 |
<div class="pro-version-image aligncenter" style="display: none;"><img src="'+ebs_url+'shortcode/well/screenshot.jpg"/></div>\ |
| 36 |
</div>'); |
| 37 |
|
| 38 |
return form; |
| 39 |
} |
| 40 |
function create_oscitas_well(pluginObj){ |
| 41 |
var form=jQuery(pluginObj.hashId); |
| 42 |
|
| 43 |
var table = form.find('table'); |
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
// handles the click event of the submit button |
| 50 |
form.find('#oscitas-well-submit').click(function(){ |
| 51 |
var cusclass=''; |
| 52 |
if(table.find('#oscitas-well-class').val()!=''){ |
| 53 |
cusclass= ' class="'+table.find('#oscitas-well-class').val()+'"'; |
| 54 |
} |
| 55 |
var shortcode = '['+$ebs_prefix+'well type="'+jQuery('#oscitas-well-type').val()+'"'+cusclass+']<br class="osc"/>'; |
| 56 |
shortcode += jQuery('#oscitas-well-content').val()+'<br class="osc"/>'; |
| 57 |
shortcode += '[/'+$ebs_prefix+'well]'; |
| 58 |
|
| 59 |
// inserts the shortcode into the active editor |
| 60 |
ebsInsertShortcode(shortcode); |
| 61 |
|
| 62 |
// closes fancybox |
| 63 |
close_dialogue(pluginObj.hashId); |
| 64 |
}); |
| 65 |
} |
| 66 |
|
| 67 |
|