Version Description
Download this release
Release Info
Developer | oscitas |
Plugin | Easy Bootstrap Shortcode |
Version | 3.6 |
Comparing to | |
See all releases |
Code changes from version 3.5 to 3.6
- README.txt +58 -32
- ebs_settings.php +52 -0
- images/Thumbs.db +0 -0
- images/colorpicker_background.png +0 -0
- images/colorpicker_hex.png +0 -0
- images/colorpicker_hsb_b.png +0 -0
- images/colorpicker_hsb_h.png +0 -0
- images/colorpicker_hsb_s.png +0 -0
- images/colorpicker_indic.gif +0 -0
- images/colorpicker_overlay.png +0 -0
- images/colorpicker_rgb_b.png +0 -0
- images/colorpicker_rgb_g.png +0 -0
- images/colorpicker_rgb_r.png +0 -0
- images/colorpicker_select.gif +0 -0
- images/colorpicker_submit.png +0 -0
- images/custom_background.png +0 -0
- images/custom_hex.png +0 -0
- images/custom_hsb_b.png +0 -0
- images/custom_hsb_h.png +0 -0
- images/custom_hsb_s.png +0 -0
- images/custom_indic.gif +0 -0
- images/custom_rgb_b.png +0 -0
- images/custom_rgb_g.png +0 -0
- images/custom_rgb_r.png +0 -0
- images/custom_submit.png +0 -0
- images/icon.png +0 -0
- images/select.png +0 -0
- images/select2.png +0 -0
- images/slider.png +0 -0
- osc_bootstrap_shortcode.php +81 -6
- shortcode/buttons/buttons_plugin.js +423 -170
- shortcode/buttons/plugin_shortcode.php +37 -23
- shortcode/dropdown/dropdown_plugin.js +190 -0
- shortcode/dropdown/icon.png +0 -0
- shortcode/dropdown/plugin_shortcode.php +77 -0
- shortcode/functions.php +68 -61
- shortcode/icon/icon.png +0 -0
- shortcode/icon/icon_plugin.js +318 -0
- shortcode/icon/plugin_shortcode.php +17 -0
- shortcode/iconhead/iconhead_plugin.js +333 -306
- shortcode/iconhead/plugin_shortcode.php +22 -14
- shortcode/image/icon.png +0 -0
- shortcode/image/image_plugin.js +124 -0
- shortcode/image/plugin_shortcode.php +22 -0
- shortcode/labels/icon.png +0 -0
- shortcode/labels/labels_plugin.js +97 -0
- shortcode/labels/plugin_shortcode.php +20 -0
- shortcode/lists/lists_plugin.js +115 -102
- shortcode/lists/plugin_shortcode.php +26 -24
- shortcode/notifications/notifications_plugin.js +106 -93
- shortcode/notifications/plugin_shortcode.php +28 -23
- shortcode/panel/panel_plugin.js +99 -86
- shortcode/panel/plugin_shortcode.php +44 -43
- shortcode/popover/plugin_shortcode.php +27 -27
- shortcode/popover/popover_plugin.js +166 -154
- shortcode/progressbar/icon.png +0 -0
- shortcode/progressbar/plugin_shortcode.php +24 -0
- shortcode/progressbar/progressbar_plugin.js +143 -0
- shortcode/tables/plugin_shortcode.php +61 -53
- shortcode/tables/tables_plugin.js +151 -139
- shortcode/tabs/plugin_shortcode.php +47 -43
- shortcode/tabs/tabs_plugin.js +26 -26
- shortcode/thumbnail/icon.png +0 -0
- shortcode/thumbnail/plugin_shortcode.php +38 -0
- shortcode/thumbnail/thumbnail_plugin.js +132 -0
- shortcode/toggles/plugin_shortcode.php +55 -49
- shortcode/toggles/toggles_plugin.js +26 -26
- shortcode/tooltip/plugin_shortcode.php +36 -35
- shortcode/tooltip/tooltip_plugin.js +143 -132
- shortcode/well/icon.png +0 -0
- shortcode/well/plugin_shortcode.php +20 -0
- shortcode/well/well_plugin.js +94 -0
- shortcode/wpcolumns/plugin_shortcode.php +542 -495
- shortcode/wpcolumns/wpcolumns_plugin.js +324 -211
- styles/bootstrap-icon.css +5 -5
- styles/bootstrap_admin.css +68 -3
- styles/ebs-setting.css +56 -0
README.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: osCitas Websolution Pvt. Ltd.
|
|
3 |
Link: http://www.osCitasthemes.com
|
4 |
Tags: Wordpress Shortcodes, Wordpress Bootstrap, Wordpress Bootstrap Shortcode, Bootstrap, Responsive pages, Editor plugin, Bootstrap Shortcode, TinyMCE
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to: 3.6
|
7 |
-
Stable tag: 3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -14,43 +14,52 @@ Easy Bootstrap Shortcode enable you to add bootstrap 3.0 styles in your pages, p
|
|
14 |
|
15 |
Easy Bootstrap Shortcode is bootstrap 3.0 compatible plugin which add icons to wordpress editor (tinyMCE Shortcode Buttons) and one can add bootstrap style to their website just by clicking on tinyMCE editor icon.
|
16 |
|
17 |
-
|
18 |
|
19 |
-
|
20 |
-
* Bootstrap 3.0 compatible
|
21 |
-
* No need to paste shortcode in editor
|
22 |
-
* Add icons to editor
|
23 |
-
* Shortcode added to editor by clicking on icon
|
24 |
-
* Customize grid size on small, extra-small and medium sized screens
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
Typography
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
|
|
|
|
37 |
|
38 |
-
Grid
|
39 |
|
40 |
-
|
41 |
-
2. Choose desired column width
|
42 |
-
3. Add offset to columns
|
43 |
-
4. Provide facility to customize a column according to medium, small and extra-small sized screens.
|
44 |
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
-
1. Accordion (Collapsible Menus)
|
48 |
-
2. Tabs
|
49 |
-
3. List
|
50 |
-
4. Notification
|
51 |
-
5. Popover
|
52 |
-
6. Tooltip
|
53 |
-
7. Panel
|
54 |
|
55 |
If you'd like to contribute to this plugin, you can find it [hosted on GitHub](https://github.com/oscitasthemes/Easy-Bootstrap-Shortcode).
|
56 |
|
@@ -73,9 +82,26 @@ It's that simple ... just what the name suggests
|
|
73 |
2. different shortcode options this plugin provides
|
74 |
3. columns shortcode
|
75 |
4. table shortcode
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
== Changelog ==
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
= 1.1 =
|
80 |
* fixed columns alternate color issue in admin panel
|
81 |
|
3 |
Link: http://www.osCitasthemes.com
|
4 |
Tags: Wordpress Shortcodes, Wordpress Bootstrap, Wordpress Bootstrap Shortcode, Bootstrap, Responsive pages, Editor plugin, Bootstrap Shortcode, TinyMCE
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 3.6.1
|
7 |
+
Stable tag: 3.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
14 |
|
15 |
Easy Bootstrap Shortcode is bootstrap 3.0 compatible plugin which add icons to wordpress editor (tinyMCE Shortcode Buttons) and one can add bootstrap style to their website just by clicking on tinyMCE editor icon.
|
16 |
|
17 |
+
http://www.youtube.com/watch?v=8T0IC1PsdTw
|
18 |
|
19 |
+
= For best results use with bootstrap 3.0 responsive theme =
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
+
= Features: =
|
|
|
|
|
22 |
|
23 |
+
* simplest bootstrap style plugin ever.
|
24 |
+
* Bootstrap 3.0 compatible.
|
25 |
+
* No need to paste shortcode in editor.
|
26 |
+
* Add icons to editor.
|
27 |
+
* Shortcode added to editor by clicking on icon.
|
28 |
+
* Customize grid size on small, extra-small and medium sized screens.
|
29 |
+
* More control over the css, you can add your own custom class to shortcodes.
|
30 |
+
* Now you can use js file from CDN or disable the plugin js.
|
31 |
+
* You can use your own css file by disabling the plugin css, which gives you more flexibility over styling.
|
32 |
|
|
|
33 |
|
34 |
+
Easy Bootstrap Shortcode provides following styles
|
|
|
|
|
|
|
35 |
|
36 |
+
= Grid Columns =
|
37 |
+
1. Add multiple columns in a row
|
38 |
+
2. Choose desired column width
|
39 |
+
3. Add offset to columns
|
40 |
+
4. Provide facility to customize a column according to medium, small and extra-small sized screens.
|
41 |
+
5. Responsive columns
|
42 |
+
|
43 |
+
= Shortcodes for =
|
44 |
+
|
45 |
+
1. Accordion (Collapsible Menus)
|
46 |
+
2. Tabs
|
47 |
+
3. List
|
48 |
+
4. Notification
|
49 |
+
5. Popover
|
50 |
+
6. Tooltip
|
51 |
+
7. Panel
|
52 |
+
8. Progress Bars
|
53 |
+
9. Icons
|
54 |
+
10. Labels
|
55 |
+
11. Buttons
|
56 |
+
12. Icon Heading
|
57 |
+
13. Tables
|
58 |
+
14. Responsive Image
|
59 |
+
15. Image Effects (Round, Thumbnail, Square)
|
60 |
+
16. Well
|
61 |
+
17. Button Dropdown
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
If you'd like to contribute to this plugin, you can find it [hosted on GitHub](https://github.com/oscitasthemes/Easy-Bootstrap-Shortcode).
|
65 |
|
82 |
2. different shortcode options this plugin provides
|
83 |
3. columns shortcode
|
84 |
4. table shortcode
|
85 |
+
5. You can create this kind of page content very easily.
|
86 |
+
6. mobile view
|
87 |
+
7. few samples which can be created using this plugin
|
88 |
+
8. sample 2 I
|
89 |
+
9. sample 2 II
|
90 |
+
10. sample 3
|
91 |
+
11. sample 4 I
|
92 |
+
12. sample 4 II
|
93 |
+
|
94 |
|
95 |
== Changelog ==
|
96 |
|
97 |
+
= 2.0.0 =
|
98 |
+
|
99 |
+
* [New] New shortcodes for labels, progressbar, image effect, responsive image, well, dropdown button, icons
|
100 |
+
* [New] Settings option to add bootstrap.js from CDN, disable plugin js/css file.
|
101 |
+
* [Update] More control over the css, you can add your own custom class to shortcodes.
|
102 |
+
* [Update] In columns shortcode now you can add different offsets for different columns for different screen sizes such as medium, small, ex-small.
|
103 |
+
|
104 |
+
|
105 |
= 1.1 =
|
106 |
* fixed columns alternate color issue in admin panel
|
107 |
|
ebs_settings.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="ebs_page_settings">
|
2 |
+
<h1>Easy Bootstrap Shortcodes Settings for js/css files</h1><form name="ebs_setting" id="ebs_setting" method="post" action="">
|
3 |
+
<div class="ebs_details">
|
4 |
+
<label class="ebs_setting_label">bootstrap.js file</label>
|
5 |
+
<p>
|
6 |
+
<input type="radio" name="b_js" id="b_js_plugin" class="check_cdn" value="plugin" <?php echo ($js == 'plugin') ? 'checked=checked' : '' ?>>
|
7 |
+
<label for="b_js_plugin">Use from EBS Plugin</label>
|
8 |
+
<input type="radio" name="b_js" id="b_js_theme" class="check_cdn" value="theme" <?php echo ($js == 'theme') ? 'checked=checked' : '' ?>><label for="b_js_theme">Use from theme or any other plugin</label>
|
9 |
+
<input type="radio" name="b_js" class="check_cdn" id="b_js_cdn" <?php echo ($js == 'cdn') ? 'checked=checked' : '' ?> value="cdn"><label for="b_js_cdn">Load from CDN</label>
|
10 |
+
</div>
|
11 |
+
<div class="ebs_details show_cdn" ><label class="ebs_setting_label">bootstrap.js CDN Path</label><input type="text" name="cdn_path" id="cdn_path" value="<?php echo $cdn; ?>">
|
12 |
+
</p>
|
13 |
+
</div>
|
14 |
+
<div class="ebs_details">
|
15 |
+
|
16 |
+
<label class="ebs_setting_label">bootstrap.css file</label>
|
17 |
+
<p><input type="radio" name="b_css" id="b_css_plugin" value="plugin" <?php echo ($css == 'plugin') ? 'checked=checked' : '' ?>>
|
18 |
+
<label for="b_css_plugin" >Use from EBS Plugin</label>
|
19 |
+
<input type="radio" name="b_css" id="b_css_theme" value="theme" <?php echo ($css == 'theme') ? 'checked=checked' : '' ?>><label for="b_css_theme">Use from theme or any other plugin</label>
|
20 |
+
</p>
|
21 |
+
</div>
|
22 |
+
<div class="ebs_btn"><input type="submit" name="ebs_submit" value="Update Settings"></div>
|
23 |
+
<div style="clear: both;"></div>
|
24 |
+
<br /><br /><br />
|
25 |
+
<b>CDN Links for bootstrap.js, you can use any of these</b>
|
26 |
+
<ul>
|
27 |
+
<li>
|
28 |
+
//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js
|
29 |
+
</li>
|
30 |
+
<li>
|
31 |
+
//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.0/js/bootstrap.min.js
|
32 |
+
</li>
|
33 |
+
</ul>
|
34 |
+
|
35 |
+
</form>
|
36 |
+
</div>
|
37 |
+
<script type="text/javascript">
|
38 |
+
function show_cdn(){
|
39 |
+
if(jQuery('#b_js_cdn').prop('checked')){
|
40 |
+
jQuery('.show_cdn').show();
|
41 |
+
} else{
|
42 |
+
jQuery('.show_cdn').hide();
|
43 |
+
}
|
44 |
+
}
|
45 |
+
jQuery(document).ready(function(){
|
46 |
+
show_cdn();
|
47 |
+
jQuery('.check_cdn').click(function(){
|
48 |
+
show_cdn();
|
49 |
+
})
|
50 |
+
})
|
51 |
+
|
52 |
+
</script>
|
images/Thumbs.db
DELETED
Binary file
|
images/colorpicker_background.png
DELETED
Binary file
|
images/colorpicker_hex.png
DELETED
Binary file
|
images/colorpicker_hsb_b.png
DELETED
Binary file
|
images/colorpicker_hsb_h.png
DELETED
Binary file
|
images/colorpicker_hsb_s.png
DELETED
Binary file
|
images/colorpicker_indic.gif
DELETED
Binary file
|
images/colorpicker_overlay.png
DELETED
Binary file
|
images/colorpicker_rgb_b.png
DELETED
Binary file
|
images/colorpicker_rgb_g.png
DELETED
Binary file
|
images/colorpicker_rgb_r.png
DELETED
Binary file
|
images/colorpicker_select.gif
DELETED
Binary file
|
images/colorpicker_submit.png
DELETED
Binary file
|
images/custom_background.png
DELETED
Binary file
|
images/custom_hex.png
DELETED
Binary file
|
images/custom_hsb_b.png
DELETED
Binary file
|
images/custom_hsb_h.png
DELETED
Binary file
|
images/custom_hsb_s.png
DELETED
Binary file
|
images/custom_indic.gif
DELETED
Binary file
|
images/custom_rgb_b.png
DELETED
Binary file
|
images/custom_rgb_g.png
DELETED
Binary file
|
images/custom_rgb_r.png
DELETED
Binary file
|
images/custom_submit.png
DELETED
Binary file
|
images/icon.png
ADDED
Binary file
|
images/select.png
DELETED
Binary file
|
images/select2.png
DELETED
Binary file
|
images/slider.png
DELETED
Binary file
|
osc_bootstrap_shortcode.php
CHANGED
@@ -4,23 +4,81 @@
|
|
4 |
Plugin Name: Easy Bootstrap Shortcode
|
5 |
Plugin URI: http://www.oscitasthemes.com
|
6 |
Description: Add bootstrap 3.0 styles to your theme by wordpress editor shortcode buttons.
|
7 |
-
Version: 1.
|
8 |
Author: Oscitas Themes
|
9 |
Author URI: http://www.oscitasthemes.com
|
10 |
License: Under the GPL v2 or later
|
11 |
*/
|
12 |
-
|
|
|
13 |
add_action('admin_enqueue_scripts', 'osc_add_admin_shortcode_scripts');
|
14 |
add_action('wp_enqueue_scripts', 'osc_add_frontend_shortcode_scripts');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
function osc_add_admin_shortcode_scripts() {
|
17 |
global $pagenow;
|
|
|
|
|
|
|
|
|
18 |
if ('post-new.php' == $pagenow || 'post.php' == $pagenow) {
|
19 |
wp_enqueue_script('jquery');
|
20 |
-
|
|
|
|
|
21 |
wp_enqueue_script('jquery.fancybox', plugins_url('/js/jquery.fancybox.js', __FILE__));
|
22 |
wp_enqueue_style('fancyboxcss', plugins_url('/styles/jquery.fancybox.css', __FILE__));
|
23 |
-
wp_enqueue_style('colorpickercss', plugins_url('/styles/colorpicker.css', __FILE__));
|
24 |
wp_enqueue_style('bootstrap-icon', plugins_url('/styles/bootstrap-icon.css', __FILE__));
|
25 |
wp_enqueue_style('bootstrap_admin', plugins_url('/styles/bootstrap_admin.css', __FILE__));
|
26 |
}
|
@@ -28,9 +86,26 @@ function osc_add_admin_shortcode_scripts() {
|
|
28 |
|
29 |
function osc_add_frontend_shortcode_scripts() {
|
30 |
wp_enqueue_script('jquery');
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
}
|
34 |
|
35 |
// Shortcodes
|
36 |
include('shortcode/functions.php');
|
|
|
|
4 |
Plugin Name: Easy Bootstrap Shortcode
|
5 |
Plugin URI: http://www.oscitasthemes.com
|
6 |
Description: Add bootstrap 3.0 styles to your theme by wordpress editor shortcode buttons.
|
7 |
+
Version: 2.1.0
|
8 |
Author: Oscitas Themes
|
9 |
Author URI: http://www.oscitasthemes.com
|
10 |
License: Under the GPL v2 or later
|
11 |
*/
|
12 |
+
register_activation_hook(__FILE__, 'ebs_activate_plugin');
|
13 |
+
register_deactivation_hook(__FILE__, 'ebs_deactivate_plugin');
|
14 |
add_action('admin_enqueue_scripts', 'osc_add_admin_shortcode_scripts');
|
15 |
add_action('wp_enqueue_scripts', 'osc_add_frontend_shortcode_scripts');
|
16 |
+
add_action('admin_menu', 'ebs_add_admin_menu');
|
17 |
+
|
18 |
+
function ebs_activate_plugin() {
|
19 |
+
global $wpdb;
|
20 |
+
$sqlebs = "CREATE TABLE IF NOT EXISTS " . $wpdb->prefix . "ebs_settings (
|
21 |
+
id int(10) unsigned NOT NULL AUTO_INCREMENT,
|
22 |
+
ebs_js varchar(100),
|
23 |
+
ebs_css varchar(100),
|
24 |
+
ebs_cdn_path varchar(500),
|
25 |
+
PRIMARY KEY (id)
|
26 |
+
)";
|
27 |
+
|
28 |
+
$wpdb->query($sqlebs);
|
29 |
+
$wpdb->insert(
|
30 |
+
$wpdb->prefix . 'ebs_settings', array(
|
31 |
+
'ebs_js' => 'plugin',
|
32 |
+
'ebs_css' => 'plugin',
|
33 |
+
'ebs_cdn_path' => 'http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js'
|
34 |
+
), array(
|
35 |
+
'%s',
|
36 |
+
'%s',
|
37 |
+
'%s'
|
38 |
+
)
|
39 |
+
);
|
40 |
+
}
|
41 |
+
|
42 |
+
function ebs_deactivate_plugin() {
|
43 |
+
global $wpdb;
|
44 |
+
$wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "ebs_settings");
|
45 |
+
}
|
46 |
+
|
47 |
+
function ebs_add_admin_menu() {
|
48 |
+
add_menu_page('EBS Settings', ' EBS Settings', 'manage_options', 'ebs/ebs-settings.php', 'ebs_setting_page', plugins_url('/images/icon.png', __FILE__));
|
49 |
+
}
|
50 |
|
51 |
+
function ebs_setting_page() {
|
52 |
+
global $wpdb;
|
53 |
+
$result = $wpdb->get_results('SELECT * from ' . $wpdb->prefix . "ebs_settings where id=1");
|
54 |
+
foreach ($result as $res) {
|
55 |
+
$js = $res->ebs_js;
|
56 |
+
$css = $res->ebs_css;
|
57 |
+
$cdn = $res->ebs_cdn_path;
|
58 |
+
}
|
59 |
+
include 'ebs_settings.php';
|
60 |
+
if (isset($_POST['ebs_submit'])) {
|
61 |
+
// $cdnins = ($_POST['b_js'] == 'cdn') ? $_POST['cdn_path'] : '';
|
62 |
+
$sqlins = 'UPDATE ' . $wpdb->prefix . 'ebs_settings set ebs_js="' . $_POST['b_js'] . '", ebs_css="' . $_POST['b_css'] . '", ebs_cdn_path="' . $_POST['cdn_path'] . '" where id=1';
|
63 |
+
$wpdb->query($sqlins);
|
64 |
+
echo ' <script type="text/javascript">window.location=document.URL;</script>';
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
// add_submenu_page('optine
|
69 |
function osc_add_admin_shortcode_scripts() {
|
70 |
global $pagenow;
|
71 |
+
$screen = get_current_screen();
|
72 |
+
if ($screen->id == 'toplevel_page_ebs/ebs-settings') {
|
73 |
+
wp_enqueue_style('ebs-setting', plugins_url('/styles/ebs-setting.css', __FILE__));
|
74 |
+
}
|
75 |
if ('post-new.php' == $pagenow || 'post.php' == $pagenow) {
|
76 |
wp_enqueue_script('jquery');
|
77 |
+
wp_enqueue_style('thickbox');
|
78 |
+
wp_enqueue_script('media-upload');
|
79 |
+
wp_enqueue_script('thickbox');
|
80 |
wp_enqueue_script('jquery.fancybox', plugins_url('/js/jquery.fancybox.js', __FILE__));
|
81 |
wp_enqueue_style('fancyboxcss', plugins_url('/styles/jquery.fancybox.css', __FILE__));
|
|
|
82 |
wp_enqueue_style('bootstrap-icon', plugins_url('/styles/bootstrap-icon.css', __FILE__));
|
83 |
wp_enqueue_style('bootstrap_admin', plugins_url('/styles/bootstrap_admin.css', __FILE__));
|
84 |
}
|
86 |
|
87 |
function osc_add_frontend_shortcode_scripts() {
|
88 |
wp_enqueue_script('jquery');
|
89 |
+
global $wpdb;
|
90 |
+
$result = $wpdb->get_results('SELECT * from ' . $wpdb->prefix . "ebs_settings where id=1");
|
91 |
+
foreach ($result as $res) {
|
92 |
+
$js = $res->ebs_js;
|
93 |
+
$css = $res->ebs_css;
|
94 |
+
$cdn = $res->ebs_cdn_path;
|
95 |
+
}
|
96 |
+
if ($js == 'plugin') {
|
97 |
+
wp_enqueue_script('bootstrap', plugins_url('/js/bootstrap.js', __FILE__));
|
98 |
+
} elseif ($js == 'cdn') {
|
99 |
+
wp_enqueue_script('bootstrap', $cdn);
|
100 |
+
}
|
101 |
+
if ($css == 'plugin') {
|
102 |
+
wp_enqueue_style('bootstrap', plugins_url('/styles/bootstrap.css', __FILE__));
|
103 |
+
} else {
|
104 |
+
wp_enqueue_style('bootstrap-icon', plugins_url('/styles/bootstrap-icon.css', __FILE__));
|
105 |
+
}
|
106 |
}
|
107 |
|
108 |
// Shortcodes
|
109 |
include('shortcode/functions.php');
|
110 |
+
|
111 |
+
|
shortcode/buttons/buttons_plugin.js
CHANGED
@@ -1,170 +1,423 @@
|
|
1 |
-
(function() {
|
2 |
-
tinymce.create('tinymce.plugins.oscitasButtons', {
|
3 |
-
init : function(ed, url) {
|
4 |
-
ed.addButton('oscitasbuttons', {
|
5 |
-
title : '
|
6 |
-
image : url+'/icon.png',
|
7 |
-
onclick : function() {
|
8 |
-
|
9 |
-
|
10 |
-
'
|
11 |
-
'
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
<option value="btn-
|
59 |
-
<option value="btn-
|
60 |
-
<option value="btn-
|
61 |
-
|
62 |
-
</
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
<
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
</
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
<
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function() {
|
2 |
+
tinymce.create('tinymce.plugins.oscitasButtons', {
|
3 |
+
init : function(ed, url) {
|
4 |
+
ed.addButton('oscitasbuttons', {
|
5 |
+
title : 'Button Shortcode',
|
6 |
+
image : url+'/icon.png',
|
7 |
+
onclick : function() {
|
8 |
+
create_oscitas_button();
|
9 |
+
jQuery.fancybox({
|
10 |
+
'autoSize':false,
|
11 |
+
'autoWidth':false,
|
12 |
+
'fitToView':false,
|
13 |
+
'height':'auto',
|
14 |
+
'topRatio':0.1,
|
15 |
+
'width':800,
|
16 |
+
'type' : 'inline',
|
17 |
+
'title' : 'Button Shortcode',
|
18 |
+
'href' : '#oscitas-form-button',
|
19 |
+
helpers: {
|
20 |
+
title : {
|
21 |
+
type : 'over',
|
22 |
+
position:'top'
|
23 |
+
}
|
24 |
+
}
|
25 |
+
});
|
26 |
+
}
|
27 |
+
});
|
28 |
+
},
|
29 |
+
createControl : function(n, cm) {
|
30 |
+
return null;
|
31 |
+
},
|
32 |
+
getInfo : function() {
|
33 |
+
return {
|
34 |
+
longname : "Button Shortcode",
|
35 |
+
author : 'Oscitas Themes',
|
36 |
+
authorurl : 'http://www.oscitasthemes.com/',
|
37 |
+
infourl : 'http://www.oscitasthemes.com/',
|
38 |
+
version : "2.0.0"
|
39 |
+
};
|
40 |
+
}
|
41 |
+
});
|
42 |
+
tinymce.PluginManager.add('oscitasbuttons', tinymce.plugins.oscitasButtons);
|
43 |
+
})();
|
44 |
+
|
45 |
+
function create_oscitas_button(){
|
46 |
+
if(jQuery('#oscitas-form-button').length){
|
47 |
+
jQuery('#oscitas-form-button').remove();
|
48 |
+
}
|
49 |
+
// creates a form to be displayed everytime the button is clicked
|
50 |
+
// you should achieve this using AJAX instead of direct html code like this
|
51 |
+
var form = jQuery('<div id="oscitas-form-button"><table id="oscitas-table" class="form-table">\
|
52 |
+
<tr>\
|
53 |
+
<th><label for="oscitas-button-style">Style:</label></th>\
|
54 |
+
<td><select name="type" id="oscitas-button-style">\
|
55 |
+
<option value="btn-default">Simple</option>\
|
56 |
+
<option value="btn-primary">Primary</option>\
|
57 |
+
<option value="btn-success">Success</option>\
|
58 |
+
<option value="btn-info">Information</option>\
|
59 |
+
<option value="btn-warning">Warning</option>\
|
60 |
+
<option value="btn-danger">Danger</option>\
|
61 |
+
<option value="btn-link">Link</option>\
|
62 |
+
</select><br />\
|
63 |
+
</td>\
|
64 |
+
</tr>\
|
65 |
+
<tr>\
|
66 |
+
<th><label for="oscitas-button-size">Size:</label></th>\
|
67 |
+
<td><select name="type" id="oscitas-button-size">\
|
68 |
+
<option value="btn-lg">Large</option>\
|
69 |
+
<option value="btn-sm">Small</option>\
|
70 |
+
<option value="btn-xs">Ex-small</option>\
|
71 |
+
</select><br />\
|
72 |
+
</td>\
|
73 |
+
</tr>\
|
74 |
+
<tr>\
|
75 |
+
<th><label for="oscitas-button-type">Type:</label></th>\
|
76 |
+
<td><select name="type" id="oscitas-button-type">\
|
77 |
+
<option value="link">Link</option>\
|
78 |
+
<option value="button">Button</option>\
|
79 |
+
</select><br />\
|
80 |
+
</td>\
|
81 |
+
</tr>\
|
82 |
+
<tr>\
|
83 |
+
<th><label for="oscitas-heading-icon">Select Icon:</label></th>\
|
84 |
+
<td><div id="click_icon_list_button" class="oscitas-icon-div"><span id="osc_show_icon_button"></span><span class="show-drop"></span></div><input type="hidden" id="osc_icon_class_val_button" value="">\
|
85 |
+
<div id="osc_show_iconlist_button" class="oscitas-icon" style="display:none;width:100%"><ul name="oscitas-heading-icon_button" id="oscitas-heading-icon_button" class="oscitas-icon-ul">\
|
86 |
+
<li data-value="" class="glyphicon">N</li>\
|
87 |
+
<li data-value="glyphicon-adjust" class="glyphicon glyphicon-adjust"> </li>\
|
88 |
+
<li data-value="glyphicon-align-center" class="glyphicon glyphicon-align-center"> </li>\
|
89 |
+
<li data-value="glyphicon-align-justify" class="glyphicon glyphicon-align-justify"> </li>\
|
90 |
+
<li data-value="glyphicon-align-left" class="glyphicon glyphicon-align-left"> </li>\
|
91 |
+
<li data-value="glyphicon-align-right" class="glyphicon glyphicon-align-right"> </li>\
|
92 |
+
<li data-value="glyphicon-arrow-down" class="glyphicon glyphicon-arrow-down"> </li>\
|
93 |
+
<li data-value="glyphicon-arrow-left" class="glyphicon glyphicon-arrow-left"> </li>\
|
94 |
+
<li data-value="glyphicon-arrow-right" class="glyphicon glyphicon-arrow-right"> </li>\
|
95 |
+
<li data-value="glyphicon-arrow-up" class="glyphicon glyphicon-arrow-up"> </li>\
|
96 |
+
<li data-value="glyphicon-asterisk" class="glyphicon glyphicon-asterisk"> </li>\
|
97 |
+
<li data-value="glyphicon-backward" class="glyphicon glyphicon-backward"> </li>\
|
98 |
+
<li data-value="glyphicon-ban-circle" class="glyphicon glyphicon-ban-circle"> </li>\
|
99 |
+
<li data-value="glyphicon-barcode" class="glyphicon glyphicon-barcode"> </li>\
|
100 |
+
<li data-value="glyphicon-bell" class="glyphicon glyphicon-bell"> </li>\
|
101 |
+
<li data-value="glyphicon-bold" class="glyphicon glyphicon-bold"> </li>\
|
102 |
+
<li data-value="glyphicon-book" class="glyphicon glyphicon-book"> </li>\
|
103 |
+
<li data-value="glyphicon-bookmark" class="glyphicon glyphicon-bookmark"> </li>\
|
104 |
+
<li data-value="glyphicon-briefcase" class="glyphicon glyphicon-briefcase"> </li>\
|
105 |
+
<li data-value="glyphicon-bullhorn" class="glyphicon glyphicon-bullhorn"> </li>\
|
106 |
+
<li data-value="glyphicon-calendar" class="glyphicon glyphicon-calendar"> </li>\
|
107 |
+
<li data-value="glyphicon-camera" class="glyphicon glyphicon-camera"> </li>\
|
108 |
+
<li data-value="glyphicon-certificate" class="glyphicon glyphicon-certificate"> </li>\
|
109 |
+
<li data-value="glyphicon-check" class="glyphicon glyphicon-check"> </li>\
|
110 |
+
<li data-value="glyphicon-chevron-down" class="glyphicon glyphicon-chevron-down"> </li>\
|
111 |
+
<li data-value="glyphicon-chevron-left" class="glyphicon glyphicon-chevron-left"> </li>\
|
112 |
+
<li data-value="glyphicon-chevron-right" class="glyphicon glyphicon-chevron-right"> </li>\
|
113 |
+
<li data-value="glyphicon-chevron-up" class="glyphicon glyphicon-chevron-up"> </li>\
|
114 |
+
<li data-value="glyphicon-circle-arrow-down" class="glyphicon glyphicon-circle-arrow-down"> </li>\
|
115 |
+
<li data-value="glyphicon-circle-arrow-left" class="glyphicon glyphicon-circle-arrow-left"> </li>\
|
116 |
+
<li data-value="glyphicon-circle-arrow-right" class="glyphicon glyphicon-circle-arrow-right"> </li>\
|
117 |
+
<li data-value="glyphicon-circle-arrow-up" class="glyphicon glyphicon-circle-arrow-up"> </li>\
|
118 |
+
<li data-value="glyphicon-cloud" class="glyphicon glyphicon-cloud"> </li>\
|
119 |
+
<li data-value="glyphicon-cloud-download" class="glyphicon glyphicon-cloud-download"> </li>\
|
120 |
+
<li data-value="glyphicon-cloud-upload" class="glyphicon glyphicon-cloud-upload"> </li>\
|
121 |
+
<li data-value="glyphicon-cog" class="glyphicon glyphicon-cog"> </li>\
|
122 |
+
<li data-value="glyphicon-collapse-down" class="glyphicon glyphicon-collapse-down"> </li>\
|
123 |
+
<li data-value="glyphicon-collapse-up" class="glyphicon glyphicon-collapse-up"> </li>\
|
124 |
+
<li data-value="glyphicon-comment" class="glyphicon glyphicon-comment"> </li>\
|
125 |
+
<li data-value="glyphicon-compressed" class="glyphicon glyphicon-compressed"> </li>\
|
126 |
+
<li data-value="glyphicon-copyright-mark" class="glyphicon glyphicon-copyright-mark"> </li>\
|
127 |
+
<li data-value="glyphicon-credit-card" class="glyphicon glyphicon-credit-card"> </li>\
|
128 |
+
<li data-value="glyphicon-cutlery" class="glyphicon glyphicon-cutlery"> </li>\
|
129 |
+
<li data-value="glyphicon-dashboard" class="glyphicon glyphicon-dashboard"> </li>\
|
130 |
+
<li data-value="glyphicon-download" class="glyphicon glyphicon-download"> </li>\
|
131 |
+
<li data-value="glyphicon-download-alt" class="glyphicon glyphicon-download-alt"> </li>\
|
132 |
+
<li data-value="glyphicon-earphone" class="glyphicon glyphicon-earphone"> </li>\
|
133 |
+
<li data-value="glyphicon-edit" class="glyphicon glyphicon-edit"> </li>\
|
134 |
+
<li data-value="glyphicon-eject" class="glyphicon glyphicon-eject"> </li>\
|
135 |
+
<li data-value="glyphicon-envelope" class="glyphicon glyphicon-envelope"> </li>\
|
136 |
+
<li data-value="glyphicon-euro" class="glyphicon glyphicon-euro"> </li>\
|
137 |
+
<li data-value="glyphicon-exclamation-sign" class="glyphicon glyphicon-exclamation-sign"> </li>\
|
138 |
+
<li data-value="glyphicon-exclamation-sign" class="glyphicon glyphicon-exclamation-sign"> </li>\
|
139 |
+
<li data-value="glyphicon-expand" class="glyphicon glyphicon-expand"> </li>\
|
140 |
+
<li data-value="glyphicon-export" class="glyphicon glyphicon-export"> </li>\
|
141 |
+
<li data-value="glyphicon-eye-close" class="glyphicon glyphicon-eye-close"> </li>\
|
142 |
+
<li data-value="glyphicon-eye-open" class="glyphicon glyphicon-eye-open"> </li>\
|
143 |
+
<li data-value="glyphicon-facetime-video" class="glyphicon glyphicon-facetime-video"> </li>\
|
144 |
+
<li data-value="glyphicon-fast-backward" class="glyphicon glyphicon-fast-backward"> </li>\
|
145 |
+
<li data-value="glyphicon-fast-forward" class="glyphicon glyphicon-fast-forward"> </li>\
|
146 |
+
<li data-value="glyphicon-file" class="glyphicon glyphicon-file"> </li>\
|
147 |
+
<li data-value="glyphicon-film" class="glyphicon glyphicon-film"> </li>\
|
148 |
+
<li data-value="glyphicon-filter" class="glyphicon glyphicon-filter"> </li>\
|
149 |
+
<li data-value="glyphicon-fire" class="glyphicon glyphicon-fire"> </li>\
|
150 |
+
<li data-value="glyphicon-flag" class="glyphicon glyphicon-flag"> </li>\
|
151 |
+
<li data-value="glyphicon-floppy-disk" class="glyphicon glyphicon-floppy-disk"> </li>\
|
152 |
+
<li data-value="glyphicon-floppy-open" class="glyphicon glyphicon-floppy-open"> </li>\
|
153 |
+
<li data-value="glyphicon-floppy-remove" class="glyphicon glyphicon-floppy-remove"> </li>\
|
154 |
+
<li data-value="glyphicon-floppy-save" class="glyphicon glyphicon-floppy-save"> </li>\
|
155 |
+
<li data-value="glyphicon-floppy-saved" class="glyphicon glyphicon-floppy-saved"> </li>\
|
156 |
+
<li data-value="glyphicon-folder-close" class="glyphicon glyphicon-folder-close"> </li>\
|
157 |
+
<li data-value="glyphicon-folder-open" class="glyphicon glyphicon-folder-open"> </li>\
|
158 |
+
<li data-value="glyphicon-font" class="glyphicon glyphicon-font"> </li>\
|
159 |
+
<li data-value="glyphicon-forward" class="glyphicon glyphicon-forward"> </li>\
|
160 |
+
<li data-value="glyphicon-fullscreen" class="glyphicon glyphicon-fullscreen"> </li>\
|
161 |
+
<li data-value="glyphicon-gbp" class="glyphicon glyphicon-gbp"> </li>\
|
162 |
+
<li data-value="glyphicon-gift" class="glyphicon glyphicon-gift"> </li>\
|
163 |
+
<li data-value="glyphicon-glass" class="glyphicon glyphicon-glass"> </li>\
|
164 |
+
<li data-value="glyphicon-globe" class="glyphicon glyphicon-globe"> </li>\
|
165 |
+
<li data-value="glyphicon-hand-down" class="glyphicon glyphicon-hand-down"> </li>\
|
166 |
+
<li data-value="glyphicon-hand-left" class="glyphicon glyphicon-hand-left"> </li>\
|
167 |
+
<li data-value="glyphicon-hand-right" class="glyphicon glyphicon-hand-right"> </li>\
|
168 |
+
<li data-value="glyphicon-hand-up" class="glyphicon glyphicon-hand-up"> </li>\
|
169 |
+
<li data-value="glyphicon-hd-video" class="glyphicon glyphicon-hd-video"> </li>\
|
170 |
+
<li data-value="glyphicon-hdd" class="glyphicon glyphicon-hdd"> </li>\
|
171 |
+
<li data-value="glyphicon-header" class="glyphicon glyphicon-header"> </li>\
|
172 |
+
<li data-value="glyphicon-headphones" class="glyphicon glyphicon-headphones"> </li>\
|
173 |
+
<li data-value="glyphicon-heart" class="glyphicon glyphicon-heart"> </li>\
|
174 |
+
<li data-value="glyphicon-heart-empty" class="glyphicon glyphicon-heart-empty"> </li>\
|
175 |
+
<li data-value="glyphicon-home" class="glyphicon glyphicon-home"> </li>\
|
176 |
+
<li data-value="glyphicon-import" class="glyphicon glyphicon-import"> </li>\
|
177 |
+
<li data-value="glyphicon-inbox" class="glyphicon glyphicon-inbox"> </li>\
|
178 |
+
<li data-value="glyphicon-indent-left" class="glyphicon glyphicon-indent-left"> </li>\
|
179 |
+
<li data-value="glyphicon-indent-right" class="glyphicon glyphicon-indent-right"> </li>\
|
180 |
+
<li data-value="glyphicon-info-sign" class="glyphicon glyphicon-info-sign"> </li>\
|
181 |
+
<li data-value="glyphicon-italic" class="glyphicon glyphicon-italic"> </li>\
|
182 |
+
<li data-value="glyphicon-leaf" class="glyphicon glyphicon-leaf"> </li>\
|
183 |
+
<li data-value="glyphicon-link" class="glyphicon glyphicon-link"> </li>\
|
184 |
+
<li data-value="glyphicon-list" class="glyphicon glyphicon-list"> </li>\
|
185 |
+
<li data-value="glyphicon-list-alt" class="glyphicon glyphicon-list-alt"> </li>\
|
186 |
+
<li data-value="glyphicon-lock" class="glyphicon glyphicon-lock"> </li>\
|
187 |
+
<li data-value="glyphicon-log-in" class="glyphicon glyphicon-log-in"> </li>\
|
188 |
+
<li data-value="glyphicon-log-out" class="glyphicon glyphicon-log-out"> </li>\
|
189 |
+
<li data-value="glyphicon-magnet" class="glyphicon glyphicon-magnet"> </li>\
|
190 |
+
<li data-value="glyphicon-map-marker" class="glyphicon glyphicon-map-marker"> </li>\
|
191 |
+
<li data-value="glyphicon-minus" class="glyphicon glyphicon-minus"> </li>\
|
192 |
+
<li data-value="glyphicon-minus-sign" class="glyphicon glyphicon-minus-sign"> </li>\
|
193 |
+
<li data-value="glyphicon-move" class="glyphicon glyphicon-move"> </li>\
|
194 |
+
<li data-value="glyphicon-music" class="glyphicon glyphicon-music"> </li>\
|
195 |
+
<li data-value="glyphicon-new-window" class="glyphicon glyphicon-new-window"> </li>\
|
196 |
+
<li data-value="glyphicon-off" class="glyphicon glyphicon-off"> </li>\
|
197 |
+
<li data-value="glyphicon-ok" class="glyphicon glyphicon-ok"> </li>\
|
198 |
+
<li data-value="glyphicon-ok-circle" class="glyphicon glyphicon-ok-circle"> </li>\
|
199 |
+
<li data-value="glyphicon-ok-sign" class="glyphicon glyphicon-ok-sign"> </li>\
|
200 |
+
<li data-value="glyphicon-open" class="glyphicon glyphicon-open"> </li>\
|
201 |
+
<li data-value="glyphicon-paperclip" class="glyphicon glyphicon-paperclip"> </li>\
|
202 |
+
<li data-value="glyphicon-pause" class="glyphicon glyphicon-pause"> </li>\
|
203 |
+
<li data-value="glyphicon-pencil" class="glyphicon glyphicon-pencil"> </li>\
|
204 |
+
<li data-value="glyphicon-phone" class="glyphicon glyphicon-phone"> </li>\
|
205 |
+
<li data-value="glyphicon-phone-alt" class="glyphicon glyphicon-phone-alt"> </li>\
|
206 |
+
<li data-value="glyphicon-picture" class="glyphicon glyphicon-picture"> </li>\
|
207 |
+
<li data-value="glyphicon-plane" class="glyphicon glyphicon-plane"> </li>\
|
208 |
+
<li data-value="glyphicon-play" class="glyphicon glyphicon-play"> </li>\
|
209 |
+
<li data-value="glyphicon-play-circle" class="glyphicon glyphicon-play-circle"> </li>\
|
210 |
+
<li data-value="glyphicon-plus" class="glyphicon glyphicon-plus"> </li>\
|
211 |
+
<li data-value="glyphicon-plus-sign" class="glyphicon glyphicon-plus-sign"> </li>\
|
212 |
+
<li data-value="glyphicon-print" class="glyphicon glyphicon-print"> </li>\
|
213 |
+
<li data-value="glyphicon-pushpin" class="glyphicon glyphicon-pushpin"> </li>\
|
214 |
+
<li data-value="glyphicon-qrcode" class="glyphicon glyphicon-qrcode"> </li>\
|
215 |
+
<li data-value="glyphicon-question-sign" class="glyphicon glyphicon-question-sign"> </li>\
|
216 |
+
<li data-value="glyphicon-random" class="glyphicon glyphicon-random"> </li>\
|
217 |
+
<li data-value="glyphicon-record" class="glyphicon glyphicon-record"> </li>\
|
218 |
+
<li data-value="glyphicon-refresh" class="glyphicon glyphicon-refresh"> </li>\
|
219 |
+
<li data-value="glyphicon-registration-mark" class="glyphicon glyphicon-registration-mark"> </li>\
|
220 |
+
<li data-value="glyphicon-remove" class="glyphicon glyphicon-remove"> </li>\
|
221 |
+
<li data-value="glyphicon-remove-circle" class="glyphicon glyphicon-remove-circle"> </li>\
|
222 |
+
<li data-value="glyphicon-remove-sign" class="glyphicon glyphicon-remove-sign"> </li>\
|
223 |
+
<li data-value="glyphicon-repeat" class="glyphicon glyphicon-repeat"> </li>\
|
224 |
+
<li data-value="glyphicon-resize-full" class="glyphicon glyphicon-resize-full"> </li>\
|
225 |
+
<li data-value="glyphicon-resize-horizontal" class="glyphicon glyphicon-resize-horizontal"> </li>\
|
226 |
+
<li data-value="glyphicon-resize-small" class="glyphicon glyphicon-resize-small"> </li>\
|
227 |
+
<li data-value="glyphicon-resize-vertical" class="glyphicon glyphicon-resize-vertical"> </li>\
|
228 |
+
<li data-value="glyphicon-retweet" class="glyphicon glyphicon-retweet"> </li>\
|
229 |
+
<li data-value="glyphicon-road" class="glyphicon glyphicon-road"> </li>\
|
230 |
+
<li data-value="glyphicon-save" class="glyphicon glyphicon-save"> </li>\
|
231 |
+
<li data-value="glyphicon-saved" class="glyphicon glyphicon-saved"> </li>\
|
232 |
+
<li data-value="glyphicon-screenshot" class="glyphicon glyphicon-screenshot"> </li>\
|
233 |
+
<li data-value="glyphicon-sd-video" class="glyphicon glyphicon-sd-video"> </li>\
|
234 |
+
<li data-value="glyphicon-search" class="glyphicon glyphicon-search"> </li>\
|
235 |
+
<li data-value="glyphicon-send" class="glyphicon glyphicon-send"> </li>\
|
236 |
+
<li data-value="glyphicon-share" class="glyphicon glyphicon-share"> </li>\
|
237 |
+
<li data-value="glyphicon-share-alt" class="glyphicon glyphicon-share-alt"> </li>\
|
238 |
+
<li data-value="glyphicon-shopping-cart" class="glyphicon glyphicon-shopping-cart"> </li>\
|
239 |
+
<li data-value="glyphicon-signal" class="glyphicon glyphicon-signal"> </li>\
|
240 |
+
<li data-value="glyphicon-sort" class="glyphicon glyphicon-sort"> </li>\
|
241 |
+
<li data-value="glyphicon-sort-by-alphabet" class="glyphicon glyphicon-sort-by-alphabet"> </li>\
|
242 |
+
<li data-value="glyphicon-sort-by-alphabet-alt" class="glyphicon glyphicon-sort-by-alphabet-alt"> </li>\
|
243 |
+
<li data-value="glyphicon-sort-by-attributes" class="glyphicon glyphicon-sort-by-attributes"> </li>\
|
244 |
+
<li data-value="glyphicon-sort-by-attributes-alt" class="glyphicon glyphicon-sort-by-attributes-alt"> </li>\
|
245 |
+
<li data-value="glyphicon-sort-by-order" class="glyphicon glyphicon-sort-by-order"> </li>\
|
246 |
+
<li data-value="glyphicon-sort-by-order-alt" class="glyphicon glyphicon-sort-by-order-alt"> </li>\
|
247 |
+
<li data-value="glyphicon-sound--" class="glyphicon glyphicon-sound-5-1"> </li>\
|
248 |
+
<li data-value="glyphicon-sound--" class="glyphicon glyphicon-sound-6-1"> </li>\
|
249 |
+
<li data-value="glyphicon-sound--" class="glyphicon glyphicon-sound-7-1"> </li>\
|
250 |
+
<li data-value="glyphicon-sound-dolby" class="glyphicon glyphicon-sound-dolby"> </li>\
|
251 |
+
<li data-value="glyphicon-sound-stereo" class="glyphicon glyphicon-sound-stereo"> </li>\
|
252 |
+
<li data-value="glyphicon-star" class="glyphicon glyphicon-star"> </li>\
|
253 |
+
<li data-value="glyphicon-star-empty" class="glyphicon glyphicon-star-empty"> </li>\
|
254 |
+
<li data-value="glyphicon-stats" class="glyphicon glyphicon-stats"> </li>\
|
255 |
+
<li data-value="glyphicon-step-backward" class="glyphicon glyphicon-step-backward"> </li>\
|
256 |
+
<li data-value="glyphicon-step-forward" class="glyphicon glyphicon-step-forward"> </li>\
|
257 |
+
<li data-value="glyphicon-stop" class="glyphicon glyphicon-stop"> </li>\
|
258 |
+
<li data-value="glyphicon-subtitles" class="glyphicon glyphicon-subtitles"> </li>\
|
259 |
+
<li data-value="glyphicon-tag" class="glyphicon glyphicon-tag"> </li>\
|
260 |
+
<li data-value="glyphicon-tags" class="glyphicon glyphicon-tags"> </li>\
|
261 |
+
<li data-value="glyphicon-tasks" class="glyphicon glyphicon-tasks"> </li>\
|
262 |
+
<li data-value="glyphicon-text-height" class="glyphicon glyphicon-text-height"> </li>\
|
263 |
+
<li data-value="glyphicon-text-width" class="glyphicon glyphicon-text-width"> </li>\
|
264 |
+
<li data-value="glyphicon-th" class="glyphicon glyphicon-th"> </li>\
|
265 |
+
<li data-value="glyphicon-th-large" class="glyphicon glyphicon-th-large"> </li>\
|
266 |
+
<li data-value="glyphicon-th-list" class="glyphicon glyphicon-th-list"> </li>\
|
267 |
+
<li data-value="glyphicon-thumbs-down" class="glyphicon glyphicon-thumbs-down"> </li>\
|
268 |
+
<li data-value="glyphicon-thumbs-up" class="glyphicon glyphicon-thumbs-up"> </li>\
|
269 |
+
<li data-value="glyphicon-time" class="glyphicon glyphicon-time"> </li>\
|
270 |
+
<li data-value="glyphicon-tint" class="glyphicon glyphicon-tint"> </li>\
|
271 |
+
<li data-value="glyphicon-tower" class="glyphicon glyphicon-tower"> </li>\
|
272 |
+
<li data-value="glyphicon-transfer" class="glyphicon glyphicon-transfer"> </li>\
|
273 |
+
<li data-value="glyphicon-trash" class="glyphicon glyphicon-trash"> </li>\
|
274 |
+
<li data-value="glyphicon-tree-conifer" class="glyphicon glyphicon-tree-conifer"> </li>\
|
275 |
+
<li data-value="glyphicon-tree-deciduous" class="glyphicon glyphicon-tree-deciduous"> </li>\
|
276 |
+
<li data-value="glyphicon-unchecked" class="glyphicon glyphicon-unchecked"> </li>\
|
277 |
+
<li data-value="glyphicon-upload" class="glyphicon glyphicon-upload"> </li>\
|
278 |
+
<li data-value="glyphicon-usd" class="glyphicon glyphicon-usd"> </li>\
|
279 |
+
<li data-value="glyphicon-user" class="glyphicon glyphicon-user"> </li>\
|
280 |
+
<li data-value="glyphicon-volume-down" class="glyphicon glyphicon-volume-down"> </li>\
|
281 |
+
<li data-value="glyphicon-volume-off" class="glyphicon glyphicon-volume-off"> </li>\
|
282 |
+
<li data-value="glyphicon-volume-up" class="glyphicon glyphicon-volume-up"> </li>\
|
283 |
+
<li data-value="glyphicon-warning-sign" class="glyphicon glyphicon-warning-sign"> </li>\
|
284 |
+
<li data-value="glyphicon-wrench" class="glyphicon glyphicon-wrench"> </li>\
|
285 |
+
<li data-value="glyphicon-zoom-in" class="glyphicon glyphicon-zoom-in"> </li>\
|
286 |
+
<li data-value="glyphicon-zoom-out" class="glyphicon glyphicon-zoom-out"> </li>\
|
287 |
+
</ul></div>\
|
288 |
+
</td>\
|
289 |
+
</tr>\
|
290 |
+
<tr>\
|
291 |
+
<th><label for="oscitas-button-iconalign">Icon Alignment:</label></th>\
|
292 |
+
<td><select name="type" id="oscitas-button-iconalign">\
|
293 |
+
<option value="left">Left</option>\
|
294 |
+
<option value="right">Right</option>\
|
295 |
+
</select><br />\
|
296 |
+
</td>\
|
297 |
+
</tr>\
|
298 |
+
<tr>\
|
299 |
+
<th><label for="oscitas-table-rows">Make block</label></th>\
|
300 |
+
<td>\
|
301 |
+
<input type="checkbox" id="oscitas-button-block">\
|
302 |
+
<br />\
|
303 |
+
</td>\
|
304 |
+
</tr>\
|
305 |
+
<tr>\
|
306 |
+
<th><label for="oscitas-button-title">Title:</label></th>\
|
307 |
+
<td><input type="text" name="title" id="oscitas-button-title" value="Button"/><br />\
|
308 |
+
</td>\
|
309 |
+
</tr>\
|
310 |
+
<tr id="tr-button-link">\
|
311 |
+
<th><label for="oscitas-button-link">Link</label></th>\
|
312 |
+
<td><input type="text" name="link" id="oscitas-button-link" value="http://www.yoursitename.com" /><br />\
|
313 |
+
</td>\
|
314 |
+
</tr>\
|
315 |
+
<tr id="tr-button-newwindow">\
|
316 |
+
<th><label for="oscitas-table-rows">Open in new window</label></th>\
|
317 |
+
<td>\
|
318 |
+
<input type="checkbox" id="oscitas-button-target">\
|
319 |
+
<br />\
|
320 |
+
</td>\
|
321 |
+
</tr>\
|
322 |
+
<tr>\
|
323 |
+
<th><label for="oscitas-button-class">Custom Class:</label></th>\
|
324 |
+
<td><input type="text" name="line" id="oscitas-button-class" value=""/><br />\
|
325 |
+
</td>\
|
326 |
+
</tr>\
|
327 |
+
</table>\
|
328 |
+
<p class="submit">\
|
329 |
+
<input type="button" id="oscitas-button-submit" class="button-primary" value="Insert Button" name="submit" />\
|
330 |
+
</p>\
|
331 |
+
</div>');
|
332 |
+
|
333 |
+
var table = form.find('table');
|
334 |
+
jQuery('.glyphicon').css('display','inline');
|
335 |
+
form.appendTo('body').hide();
|
336 |
+
table.find('#click_icon_list_button').click(function(){
|
337 |
+
if(!jQuery(this).hasClass('osc_icon_showing_button')){
|
338 |
+
jQuery(this).addClass('osc_icon_showing_button')
|
339 |
+
table.find('#osc_show_iconlist_button').show();
|
340 |
+
} else{
|
341 |
+
jQuery(this).removeClass('osc_icon_showing_button')
|
342 |
+
table.find('#osc_show_iconlist_button').hide();
|
343 |
+
}
|
344 |
+
});
|
345 |
+
table.find('#oscitas-heading-icon_button li').click(function(){
|
346 |
+
var val=jQuery(this).attr('data-value');
|
347 |
+
table.find('#oscitas-heading-icon_button li').removeClass('osc_icon_selected_button');
|
348 |
+
jQuery(this).addClass('osc_icon_selected_button');
|
349 |
+
table.find('#osc_show_iconlist_button').hide();
|
350 |
+
table.find('#osc_show_icon_button').removeClass().addClass('glyphicon').addClass(val);
|
351 |
+
table.find('#osc_icon_class_val_button').val(val);
|
352 |
+
})
|
353 |
+
|
354 |
+
table.find('#oscitas-button-type').change(function(){
|
355 |
+
var abc = jQuery(this).val();
|
356 |
+
if('link' == abc){
|
357 |
+
jQuery("#tr-button-link").show();
|
358 |
+
jQuery("#tr-button-newwindow").show();
|
359 |
+
}else{
|
360 |
+
jQuery("#tr-button-link").hide();
|
361 |
+
jQuery("#tr-button-newwindow").hide();
|
362 |
+
}
|
363 |
+
jQuery('#oscitas-form-button table tr:visible:even').css('background', '#F0F0F0');
|
364 |
+
jQuery('#oscitas-form-button table tr:visible:odd').css('background', '#DADADD');
|
365 |
+
});
|
366 |
+
|
367 |
+
|
368 |
+
|
369 |
+
|
370 |
+
// handles the click event of the submit button
|
371 |
+
form.find('#oscitas-button-submit').click(function(){
|
372 |
+
// defines the options and their default values
|
373 |
+
// again, this is not the most elegant way to do this
|
374 |
+
// but well, this gets the job done nonetheless
|
375 |
+
var options;
|
376 |
+
var type = table.find('#oscitas-button-type').val();
|
377 |
+
if(type=='button'){
|
378 |
+
options = {
|
379 |
+
'title' : 'osCitas'
|
380 |
+
};
|
381 |
+
}
|
382 |
+
else{
|
383 |
+
options = {
|
384 |
+
'title' : 'osCitas',
|
385 |
+
'link' : ''
|
386 |
+
};
|
387 |
+
}
|
388 |
+
var cusclass='',icon='';
|
389 |
+
if(table.find('#oscitas-button-class').val()!=''){
|
390 |
+
cusclass= ' class="'+table.find('#oscitas-button-class').val()+'"';
|
391 |
+
}
|
392 |
+
if(table.find('#osc_icon_class_val_button').val()!=''){
|
393 |
+
icon= ' icon="'+table.find('#osc_icon_class_val_button').val()+'" ';
|
394 |
+
}
|
395 |
+
|
396 |
+
var shortcode = '[button'+cusclass;
|
397 |
+
|
398 |
+
shortcode += ' style="'+table.find('#oscitas-button-style').val();
|
399 |
+
shortcode += ' '+table.find('#oscitas-button-size').val();
|
400 |
+
shortcode += table.find('#oscitas-button-block').prop('checked')? ' btn-block': '';
|
401 |
+
shortcode += '" ';
|
402 |
+
shortcode += icon;
|
403 |
+
shortcode += ' align="'+table.find('#oscitas-button-iconalign').val()+'" ';
|
404 |
+
shortcode += ' type="'+type+'" ';
|
405 |
+
if(type!='button'){
|
406 |
+
shortcode += ' target="'+(table.find('#oscitas-button-block').prop('checked')? 'true': 'false')+ '" ';
|
407 |
+
}
|
408 |
+
for( var index in options) {
|
409 |
+
var value = table.find('#oscitas-button-' + index).val();
|
410 |
+
// var value = table.find('#oscitas-button-' + index).val();
|
411 |
+
shortcode += ' ' + index + '="' + value + '"';
|
412 |
+
}
|
413 |
+
|
414 |
+
shortcode += ']';
|
415 |
+
|
416 |
+
// inserts the shortcode into the active editor
|
417 |
+
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
418 |
+
|
419 |
+
// closes fancybox
|
420 |
+
jQuery.fancybox.close();
|
421 |
+
});
|
422 |
+
}
|
423 |
+
|
shortcode/buttons/plugin_shortcode.php
CHANGED
@@ -1,23 +1,37 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
*
|
4 |
-
*
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* * *********************************************************
|
4 |
+
* BUTTONS
|
5 |
+
* ********************************************************* */
|
6 |
+
|
7 |
+
function osc_theme_button($params, $content = null) {
|
8 |
+
extract(shortcode_atts(array(
|
9 |
+
'title' => 'osCitas',
|
10 |
+
'link' => '',
|
11 |
+
'type' => 'link',
|
12 |
+
'style' => '',
|
13 |
+
'align' => '',
|
14 |
+
'target' => '',
|
15 |
+
'icon' => '',
|
16 |
+
'class' => ''
|
17 |
+
), $params));
|
18 |
+
$out = '';
|
19 |
+
if($icon!=''){
|
20 |
+
if($align=='right'){
|
21 |
+
$value=$title.' <i class="glyphicon '.$icon.'"></i>';
|
22 |
+
} else{
|
23 |
+
$value='<i class="glyphicon '.$icon.'"></i> '.$title;
|
24 |
+
}
|
25 |
+
}else{
|
26 |
+
$value=$title;
|
27 |
+
}
|
28 |
+
if ($type == 'link') {
|
29 |
+
$out = '<a class="btn ' . $style . ' ' . $class . '" href="' . $link . '" target="' . ($target) . '">' . $value . '</a>';
|
30 |
+
} elseif ($type == 'button') {
|
31 |
+
$out = '<button class="btn ' . $style . ' ' . $class . '" >' . $value . '</button>';
|
32 |
+
}
|
33 |
+
return $out;
|
34 |
+
}
|
35 |
+
|
36 |
+
add_shortcode('button', 'osc_theme_button');
|
37 |
+
|
shortcode/dropdown/dropdown_plugin.js
ADDED
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function() {
|
2 |
+
tinymce.create('tinymce.plugins.oscitasDropdown', {
|
3 |
+
init : function(ed, url) {
|
4 |
+
ed.addButton('oscitasdropdown', {
|
5 |
+
title : 'Button Dropdown Shortcode',
|
6 |
+
image : url+'/icon.png',
|
7 |
+
onclick : function() {
|
8 |
+
create_oscitas_dropdown();
|
9 |
+
jQuery.fancybox({
|
10 |
+
'type' : 'inline',
|
11 |
+
'title' : 'Button Dropdown Shortcode',
|
12 |
+
'href' : '#oscitas-form-dropdown',
|
13 |
+
helpers: {
|
14 |
+
title : {
|
15 |
+
type : 'over',
|
16 |
+
position:'top'
|
17 |
+
}
|
18 |
+
}
|
19 |
+
});
|
20 |
+
}
|
21 |
+
});
|
22 |
+
},
|
23 |
+
createControl : function(n, cm) {
|
24 |
+
return null;
|
25 |
+
},
|
26 |
+
getInfo : function() {
|
27 |
+
return {
|
28 |
+
longname : "Button Dropdown Shortcode",
|
29 |
+
author : 'Oscitas Themes',
|
30 |
+
authorurl : 'http://www.oscitasthemes.com/',
|
31 |
+
infourl : 'http://www.oscitasthemes.com/',
|
32 |
+
version : "2.0.0"
|
33 |
+
};
|
34 |
+
}
|
35 |
+
});
|
36 |
+
tinymce.PluginManager.add('oscitasdropdown', tinymce.plugins.oscitasDropdown);
|
37 |
+
})();
|
38 |
+
|
39 |
+
|
40 |
+
function create_oscitas_dropdown(){
|
41 |
+
if(jQuery('#oscitas-form-dropdown').length){
|
42 |
+
jQuery('#oscitas-form-dropdown').remove();
|
43 |
+
}
|
44 |
+
// creates a form to be displayed everytime the button is clicked
|
45 |
+
// you should achieve this using AJAX instead of direct html code like this
|
46 |
+
var form = jQuery('<div id="oscitas-form-dropdown"><table id="oscitas-table" class="form-table">\
|
47 |
+
<tr>\
|
48 |
+
<th class="main_dp_th"><label for="oscitas-dropdown-heading" >Dropdown Button Features</label></th>\
|
49 |
+
<td><table class="tb_multiple_column_upper">\
|
50 |
+
<thead>\
|
51 |
+
<tr><th>Text</th><th>Size</th><th>Style</th><th>Split</th><th>Dropup</th></tr>\
|
52 |
+
</thead>\
|
53 |
+
<tbody>\
|
54 |
+
<tr>\
|
55 |
+
<td><input type="text" name="dropdown-heading" id="oscitas-dropdown-heading" value="Dropdown"/></td>\
|
56 |
+
<td><select name="type" id="oscitas-dropdown-size">\
|
57 |
+
<option value="">Default</option>\
|
58 |
+
<option value="btn-lg">Large</option>\
|
59 |
+
<option value="btn-sm">Small</option>\
|
60 |
+
<option value="btn-xs">Ex-small</option>\
|
61 |
+
</select><br /></td>\
|
62 |
+
<td><select name="type" id="oscitas-dropdown-style">\
|
63 |
+
<option value="btn-default">Simple</option>\
|
64 |
+
<option value="btn-primary">Primary</option>\
|
65 |
+
<option value="btn-success">Success</option>\
|
66 |
+
<option value="btn-info">Information</option>\
|
67 |
+
<option value="btn-warning">Warning</option>\
|
68 |
+
<option value="btn-danger">Danger</option>\
|
69 |
+
<option value="btn-link">Link</option>\
|
70 |
+
</select><br /></td>\
|
71 |
+
<td><input type="checkbox" name="dropdown-split" id="oscitas-dropdown-split" value="split"/></td>\
|
72 |
+
<td><select name="type" id="oscitas-dropdown-dropup">\
|
73 |
+
<option value="dropdown">Drop Down</option>\
|
74 |
+
<option value="dropup">Drop Up</option>\
|
75 |
+
</select></td>\
|
76 |
+
</tr>\
|
77 |
+
</tbody>\
|
78 |
+
</table></td>\
|
79 |
+
</tr>\
|
80 |
+
<tr>\
|
81 |
+
<th class="main_dp_th"><label for="oscitas-line">Dropdown Items</label></th>\
|
82 |
+
<td><table class="tb_multiple_column">\
|
83 |
+
<thead>\
|
84 |
+
<tr><th>Type</th><th>Link</th><th>Title</th><th>Disabled</th><th>Option</th></tr>\
|
85 |
+
</thead>\
|
86 |
+
<tbody id="oscitas-append-dropdownitem">\
|
87 |
+
<tr class="osc_dropdown_list_item">\
|
88 |
+
<td><input type="hidden" class="oscitas-dropdownitem-type" value="menuitem"><span>Menu Item</span></td>\
|
89 |
+
<td><input type="text" name="dropdown-item-link[]" class="oscitas-dropdownitem-link" value="#"/></td>\
|
90 |
+
<td><input type="text" name="dropdown-item-title[]" class="oscitas-dropdownitem-title" value="Dropdown Item"/></td>\
|
91 |
+
<td><input type="checkbox" name="dropdown-item-disabled[]" class="oscitas-dropdownitem-disabled" value="disabled"/></td><td></td>\
|
92 |
+
</tr>\
|
93 |
+
</tbody>\
|
94 |
+
<tfoot>\
|
95 |
+
<tr><td colspan="5"><a id="osc_add_new_dditem" href="javascript:;" style="text-decoration:none;"><i class="glyphicon glyphicon-plus-sign"></i> Add New Item</a></td></tr>\
|
96 |
+
</tfoot>\
|
97 |
+
</table></td>\
|
98 |
+
</tr>\
|
99 |
+
<tr>\
|
100 |
+
<th><label for="oscitas-dropdown-class">Custom Class:</label></th>\
|
101 |
+
<td><input type="text" name="line" id="oscitas-dropdown-class" value=""/><br />\
|
102 |
+
</td>\
|
103 |
+
</tr>\
|
104 |
+
</table>\
|
105 |
+
<p class="submit">\
|
106 |
+
<input type="button" id="oscitas-dropdown-submit" class="button-primary" value="Insert Dropdown" name="submit" />\
|
107 |
+
</p>\
|
108 |
+
</div>');
|
109 |
+
|
110 |
+
var table = form.find('table');
|
111 |
+
form.appendTo('body').hide();
|
112 |
+
form.find('#osc_add_new_dditem').click(function(){
|
113 |
+
var item='<tr class="osc_dropdown_list_item"><td class="osc_type_change"><select name="dropdown-item-type[]" class="oscitas-dropdownitem-type"><option value="menuitem">Menu Item</option><option value="divider">Divider</option></select></td><td class="osc_hide"><input type="text" name="dropdown-item-link[]" class="oscitas-dropdownitem-link" value="#"/></td><td class="osc_hide"><input type="text" name="dropdown-item-title[]" class="oscitas-dropdownitem-title" value="Dropdown Item"/></td><td class="osc_hide"><input type="checkbox" name="dropdown-item-disabled[]" class="oscitas-dropdownitem-disabled" value="disabled"/></td><td><a class="osc_remove_dditem" href="javascript:;" style="text-decoration:none;"><i class="glyphicon glyphicon-remove"></i></a></td></tr>';
|
114 |
+
form.find('#oscitas-append-dropdownitem').append(item);
|
115 |
+
|
116 |
+
});
|
117 |
+
jQuery('.osc_remove_dditem').live('click',function(){
|
118 |
+
jQuery(this).parent().parent().remove();
|
119 |
+
})
|
120 |
+
jQuery('.osc_type_change').live('change',function(){
|
121 |
+
var par=jQuery(this).parent();
|
122 |
+
var item=jQuery(this);
|
123 |
+
var val=item.find('.oscitas-dropdownitem-type').val();
|
124 |
+
if(val=='divider'){
|
125 |
+
jQuery(par).find('.osc_hide').hide();
|
126 |
+
item.attr('colspan',4);
|
127 |
+
} else{
|
128 |
+
jQuery(par).find('.osc_hide').show();
|
129 |
+
item.attr('colspan',0);
|
130 |
+
}
|
131 |
+
})
|
132 |
+
// handles the click event of the submit button
|
133 |
+
form.find('#oscitas-dropdown-submit').click(function(){
|
134 |
+
var split,dropup;
|
135 |
+
var type,link,title,disabled;
|
136 |
+
var heading= jQuery('#oscitas-dropdown-heading').val();
|
137 |
+
|
138 |
+
if(jQuery('#oscitas-dropdown-split').is(":checked")==true){
|
139 |
+
split= jQuery('#oscitas-dropdown-split').val();
|
140 |
+
} else{
|
141 |
+
split='';
|
142 |
+
}
|
143 |
+
var size= jQuery('#oscitas-dropdown-size').val();
|
144 |
+
var style= jQuery('#oscitas-dropdown-style').val();
|
145 |
+
dropup= 'dropup="'+jQuery('#oscitas-dropdown-dropup').val()+'"';
|
146 |
+
|
147 |
+
var cusclass;
|
148 |
+
if(table.find('#oscitas-dropdown-class').val()!=''){
|
149 |
+
cusclass= ' class="'+table.find('#oscitas-dropdown-class').val()+'"';
|
150 |
+
}
|
151 |
+
else{
|
152 |
+
cusclass='';
|
153 |
+
}
|
154 |
+
var shortcode='';
|
155 |
+
shortcode ='[dropdown '+dropup+cusclass+']<br/>';
|
156 |
+
shortcode +='[dropdownhead style="'+style+'" size="'+size+'" split="'+split+'"]<br/>';
|
157 |
+
shortcode += heading+'<br/>';
|
158 |
+
shortcode +='[/dropdownhead]<br/>';
|
159 |
+
shortcode +='[dropdownbody]<br/>';
|
160 |
+
|
161 |
+
jQuery('tr.osc_dropdown_list_item').each(function(index){
|
162 |
+
|
163 |
+
type = jQuery(this).find('.oscitas-dropdownitem-type').val();
|
164 |
+
link = jQuery(this).find('.oscitas-dropdownitem-link').val();
|
165 |
+
title = jQuery(this).find('.oscitas-dropdownitem-title').val();
|
166 |
+
|
167 |
+
if(jQuery(this).find('.oscitas-dropdownitem-disabled').is(":checked")==true){
|
168 |
+
disabled='disabled="'+jQuery(this).find('.oscitas-dropdownitem-disabled').val()+'"';
|
169 |
+
} else{
|
170 |
+
disabled='';
|
171 |
+
}
|
172 |
+
if(type=='divider'){
|
173 |
+
shortcode +='[dropdownitem type="'+type+'"][/dropdownitem]<br/>';
|
174 |
+
} else if(type=='menuitem'){
|
175 |
+
shortcode +='[dropdownitem type="'+type+'" link="'+link+'" '+disabled+']'+title+'[/dropdownitem]<br/>';
|
176 |
+
}
|
177 |
+
|
178 |
+
});
|
179 |
+
|
180 |
+
shortcode +='[/dropdownbody]<br/>';
|
181 |
+
shortcode +='[/dropdown]';
|
182 |
+
|
183 |
+
|
184 |
+
// inserts the shortcode into the active editor
|
185 |
+
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
186 |
+
|
187 |
+
jQuery.fancybox.close();
|
188 |
+
});
|
189 |
+
}
|
190 |
+
|
shortcode/dropdown/icon.png
ADDED
Binary file
|
shortcode/dropdown/plugin_shortcode.php
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function osc_theme_dropdown($params, $content = null) {
|
4 |
+
extract(shortcode_atts(array(
|
5 |
+
'dropup' => '',
|
6 |
+
'class' => ''
|
7 |
+
), $params));
|
8 |
+
$content = str_replace("]<br />", ']', $content);
|
9 |
+
$content = str_replace("]<br />\n", ']', $content);
|
10 |
+
$content = str_replace("<br />\n[", '[', $content);
|
11 |
+
if ($dropup != 'dropup') {
|
12 |
+
$dropup = '';
|
13 |
+
}
|
14 |
+
$out = '<div class="btn-group ' . $dropup . ' ' . $class . '">' . do_shortcode($content) . '</div>';
|
15 |
+
$out .= "
|
16 |
+
<script>
|
17 |
+
jQuery(document).ready(function(){
|
18 |
+
jQuery('.dropdown-toggle').dropdown();
|
19 |
+
});
|
20 |
+
</script>
|
21 |
+
";
|
22 |
+
return $out;
|
23 |
+
}
|
24 |
+
|
25 |
+
add_shortcode('dropdown', 'osc_theme_dropdown');
|
26 |
+
|
27 |
+
function osc_theme_dropdown_head($params, $content = null) {
|
28 |
+
extract(shortcode_atts(array(
|
29 |
+
'size' => '',
|
30 |
+
'style' => '',
|
31 |
+
'split' => ''), $params));
|
32 |
+
$out = '';
|
33 |
+
if ($split == "split") {
|
34 |
+
$out = '<button type="button" class="btn ' . $size . ' ' . $style . '">' . $content . '</button>';
|
35 |
+
|
36 |
+
$out .= '<button type="button" class="btn ' . $size . ' ' . $style . ' dropdown-toggle" data-toggle="dropdown">';
|
37 |
+
$out .= '<span class="caret"></span></button>';
|
38 |
+
} else {
|
39 |
+
$out = ' <button type="button" class="btn ' . $size . ' ' . $style . ' dropdown-toggle" data-toggle="dropdown">';
|
40 |
+
$out .= $content . ' <span class="caret"></span> </button>';
|
41 |
+
}
|
42 |
+
|
43 |
+
return $out;
|
44 |
+
}
|
45 |
+
|
46 |
+
add_shortcode('dropdownhead', 'osc_theme_dropdown_head');
|
47 |
+
|
48 |
+
function osc_theme_dropdown_body($params, $content = null) {
|
49 |
+
$content = str_replace("]<br />", ']', $content);
|
50 |
+
$content = str_replace("]<br />\n", ']', $content);
|
51 |
+
$content = str_replace("<br />\n[", '[', $content);
|
52 |
+
$out = '<ul class="dropdown-menu" role="menu">' . do_shortcode($content) . '</ul>';
|
53 |
+
return $out;
|
54 |
+
}
|
55 |
+
|
56 |
+
add_shortcode('dropdownbody', 'osc_theme_dropdown_body');
|
57 |
+
|
58 |
+
function osc_theme_dropdown_items($params, $content = null) {
|
59 |
+
extract(shortcode_atts(array(
|
60 |
+
'type' => '',
|
61 |
+
'link' => '',
|
62 |
+
'disabled' => ''), $params));
|
63 |
+
$out = '';
|
64 |
+
if ($type == "divider") {
|
65 |
+
$out = '<li class="divider"></li>';
|
66 |
+
} elseif ($type == "menuitem") {
|
67 |
+
if ($disabled == 'disabled') {
|
68 |
+
$out = '<li class="disabled"><a href="' . $link . '">' . do_shortcode($content) . '</a></li>';
|
69 |
+
} else {
|
70 |
+
$out = '<li><a href="' . $link . '">' . do_shortcode($content) . '</a></li>';
|
71 |
+
}
|
72 |
+
}
|
73 |
+
return $out;
|
74 |
+
}
|
75 |
+
|
76 |
+
add_shortcode('dropdownitem', 'osc_theme_dropdown_items');
|
77 |
+
?>
|
shortcode/functions.php
CHANGED
@@ -1,61 +1,68 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// Add Shortcode buttons in TinyMCE
|
4 |
-
$elements = array(
|
5 |
-
'toggles',
|
6 |
-
'tabs',
|
7 |
-
'lists',
|
8 |
-
'buttons',
|
9 |
-
'notifications',
|
10 |
-
'wpcolumns',
|
11 |
-
'tables',
|
12 |
-
'tooltip',
|
13 |
-
'iconhead',
|
14 |
-
'panel',
|
15 |
-
'popover'
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// Add Shortcode buttons in TinyMCE
|
4 |
+
$elements = array(
|
5 |
+
'toggles',
|
6 |
+
'tabs',
|
7 |
+
'lists',
|
8 |
+
'buttons',
|
9 |
+
'notifications',
|
10 |
+
'wpcolumns',
|
11 |
+
'tables',
|
12 |
+
'tooltip',
|
13 |
+
'iconhead',
|
14 |
+
'panel',
|
15 |
+
'popover',
|
16 |
+
'dropdown',
|
17 |
+
'labels',
|
18 |
+
'well',
|
19 |
+
'thumbnail',
|
20 |
+
'icon',
|
21 |
+
'image',
|
22 |
+
'progressbar'
|
23 |
+
);
|
24 |
+
|
25 |
+
foreach ($elements as $element) {
|
26 |
+
include( $element . '/plugin_shortcode.php');
|
27 |
+
}
|
28 |
+
|
29 |
+
|
30 |
+
// --------------------------------------------------------------------------------------------------------------
|
31 |
+
|
32 |
+
add_action('init', 'add_custom_button');
|
33 |
+
|
34 |
+
function add_custom_button() {
|
35 |
+
//global $elements;
|
36 |
+
// Don't bother doing this stuff if the current user lacks permissions
|
37 |
+
if (!current_user_can('edit_posts') && !current_user_can('edit_pages'))
|
38 |
+
return;
|
39 |
+
|
40 |
+
// Add only in Rich Editor mode
|
41 |
+
if (get_user_option('rich_editing') == 'true') {
|
42 |
+
|
43 |
+
add_filter("mce_external_plugins", "add_custom_plugin");
|
44 |
+
add_filter('mce_buttons_3', 'register_custom_button');
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
function register_custom_button($buttons) {
|
49 |
+
|
50 |
+
global $elements;
|
51 |
+
foreach ($elements as $element) {
|
52 |
+
$buttons[] = 'oscitas' . $element;
|
53 |
+
}
|
54 |
+
return $buttons;
|
55 |
+
}
|
56 |
+
|
57 |
+
// Load the TinyMCE plugin : editor_plugin.js (wp2.5)
|
58 |
+
function add_custom_plugin($plugin_array) {
|
59 |
+
//print_r($elements); exit;
|
60 |
+
global $elements;
|
61 |
+
foreach ($elements as $element) {
|
62 |
+
$plugin_array['oscitas' . $element] = plugins_url('', __FILE__) . '/' . $element . '/' . $element . '_plugin.js';
|
63 |
+
}
|
64 |
+
/// return $buttons;
|
65 |
+
return $plugin_array;
|
66 |
+
}
|
67 |
+
|
68 |
+
?>
|
shortcode/icon/icon.png
ADDED
Binary file
|
shortcode/icon/icon_plugin.js
ADDED
@@ -0,0 +1,318 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function() {
|
2 |
+
tinymce.create('tinymce.plugins.oscitasIcon', {
|
3 |
+
init : function(ed, url) {
|
4 |
+
ed.addButton('oscitasicon', {
|
5 |
+
title : 'Icon Shortcode',
|
6 |
+
image : url+'/icon.png',
|
7 |
+
onclick : function() {
|
8 |
+
create_oscitas_icon();
|
9 |
+
jQuery.fancybox({
|
10 |
+
'autoSize':false,
|
11 |
+
'autoWidth':false,
|
12 |
+
'fitToView':false,
|
13 |
+
'height':'auto',
|
14 |
+
'topRatio':0.15,
|
15 |
+
'width':600,
|
16 |
+
'type' : 'inline',
|
17 |
+
'title' : 'Icon Shortcode',
|
18 |
+
'href' : '#oscitas-form-icon',
|
19 |
+
helpers: {
|
20 |
+
title : {
|
21 |
+
type : 'over',
|
22 |
+
position:'top'
|
23 |
+
}
|
24 |
+
}
|
25 |
+
});
|
26 |
+
}
|
27 |
+
});
|
28 |
+
},
|
29 |
+
createControl : function(n, cm) {
|
30 |
+
return null;
|
31 |
+
},
|
32 |
+
getInfo : function() {
|
33 |
+
return {
|
34 |
+
longname : "Icon Shortcode",
|
35 |
+
author : 'Oscitas Themes',
|
36 |
+
authorurl : 'http://www.oscitasthemes.com/',
|
37 |
+
infourl : 'http://www.oscitasthemes.com/',
|
38 |
+
version : "2.0.0"
|
39 |
+
};
|
40 |
+
}
|
41 |
+
});
|
42 |
+
tinymce.PluginManager.add('oscitasicon', tinymce.plugins.oscitasIcon);
|
43 |
+
})();
|
44 |
+
|
45 |
+
function create_oscitas_icon(){
|
46 |
+
if(jQuery('#oscitas-form-icon').length){
|
47 |
+
jQuery('#oscitas-form-icon').remove();
|
48 |
+
}
|
49 |
+
// creates a form to be displayed everytime the button is clicked
|
50 |
+
// you should achieve this using AJAX instead of direct html code like this
|
51 |
+
var form = jQuery('<div id="oscitas-form-icon"><table id="oscitas-table" class="form-table">\
|
52 |
+
<tr>\
|
53 |
+
<th><label for="oscitas-heading-icon">Select Icon:</label></th>\
|
54 |
+
<td><div id="click_icon_list_icon" class="oscitas-icon-div"><span id="osc_show_icon_icon"></span><span class="show-drop"></span></div><input type="hidden" id="osc_icon_class_val_icon" value="glyphicon-adjust">\
|
55 |
+
<div id="osc_show_iconlist_icon" class="oscitas-icon" style="display:none;width:100%"><ul name="oscitas-heading-icon_icon" id="oscitas-heading-icon_icon" class="oscitas-icon-ul">\
|
56 |
+
<li data-value="glyphicon-adjust" class="glyphicon glyphicon-adjust osc_icon_selected_button"> </li>\
|
57 |
+
<li data-value="glyphicon-align-center" class="glyphicon glyphicon-align-center"> </li>\
|
58 |
+
<li data-value="glyphicon-align-justify" class="glyphicon glyphicon-align-justify"> </li>\
|
59 |
+
<li data-value="glyphicon-align-left" class="glyphicon glyphicon-align-left"> </li>\
|
60 |
+
<li data-value="glyphicon-align-right" class="glyphicon glyphicon-align-right"> </li>\
|
61 |
+
<li data-value="glyphicon-arrow-down" class="glyphicon glyphicon-arrow-down"> </li>\
|
62 |
+
<li data-value="glyphicon-arrow-left" class="glyphicon glyphicon-arrow-left"> </li>\
|
63 |
+
<li data-value="glyphicon-arrow-right" class="glyphicon glyphicon-arrow-right"> </li>\
|
64 |
+
<li data-value="glyphicon-arrow-up" class="glyphicon glyphicon-arrow-up"> </li>\
|
65 |
+
<li data-value="glyphicon-asterisk" class="glyphicon glyphicon-asterisk"> </li>\
|
66 |
+
<li data-value="glyphicon-backward" class="glyphicon glyphicon-backward"> </li>\
|
67 |
+
<li data-value="glyphicon-ban-circle" class="glyphicon glyphicon-ban-circle"> </li>\
|
68 |
+
<li data-value="glyphicon-barcode" class="glyphicon glyphicon-barcode"> </li>\
|
69 |
+
<li data-value="glyphicon-bell" class="glyphicon glyphicon-bell"> </li>\
|
70 |
+
<li data-value="glyphicon-bold" class="glyphicon glyphicon-bold"> </li>\
|
71 |
+
<li data-value="glyphicon-book" class="glyphicon glyphicon-book"> </li>\
|
72 |
+
<li data-value="glyphicon-bookmark" class="glyphicon glyphicon-bookmark"> </li>\
|
73 |
+
<li data-value="glyphicon-briefcase" class="glyphicon glyphicon-briefcase"> </li>\
|
74 |
+
<li data-value="glyphicon-bullhorn" class="glyphicon glyphicon-bullhorn"> </li>\
|
75 |
+
<li data-value="glyphicon-calendar" class="glyphicon glyphicon-calendar"> </li>\
|
76 |
+
<li data-value="glyphicon-camera" class="glyphicon glyphicon-camera"> </li>\
|
77 |
+
<li data-value="glyphicon-certificate" class="glyphicon glyphicon-certificate"> </li>\
|
78 |
+
<li data-value="glyphicon-check" class="glyphicon glyphicon-check"> </li>\
|
79 |
+
<li data-value="glyphicon-chevron-down" class="glyphicon glyphicon-chevron-down"> </li>\
|
80 |
+
<li data-value="glyphicon-chevron-left" class="glyphicon glyphicon-chevron-left"> </li>\
|
81 |
+
<li data-value="glyphicon-chevron-right" class="glyphicon glyphicon-chevron-right"> </li>\
|
82 |
+
<li data-value="glyphicon-chevron-up" class="glyphicon glyphicon-chevron-up"> </li>\
|
83 |
+
<li data-value="glyphicon-circle-arrow-down" class="glyphicon glyphicon-circle-arrow-down"> </li>\
|
84 |
+
<li data-value="glyphicon-circle-arrow-left" class="glyphicon glyphicon-circle-arrow-left"> </li>\
|
85 |
+
<li data-value="glyphicon-circle-arrow-right" class="glyphicon glyphicon-circle-arrow-right"> </li>\
|
86 |
+
<li data-value="glyphicon-circle-arrow-up" class="glyphicon glyphicon-circle-arrow-up"> </li>\
|
87 |
+
<li data-value="glyphicon-cloud" class="glyphicon glyphicon-cloud"> </li>\
|
88 |
+
<li data-value="glyphicon-cloud-download" class="glyphicon glyphicon-cloud-download"> </li>\
|
89 |
+
<li data-value="glyphicon-cloud-upload" class="glyphicon glyphicon-cloud-upload"> </li>\
|
90 |
+
<li data-value="glyphicon-cog" class="glyphicon glyphicon-cog"> </li>\
|
91 |
+
<li data-value="glyphicon-collapse-down" class="glyphicon glyphicon-collapse-down"> </li>\
|
92 |
+
<li data-value="glyphicon-collapse-up" class="glyphicon glyphicon-collapse-up"> </li>\
|
93 |
+
<li data-value="glyphicon-comment" class="glyphicon glyphicon-comment"> </li>\
|
94 |
+
<li data-value="glyphicon-compressed" class="glyphicon glyphicon-compressed"> </li>\
|
95 |
+
<li data-value="glyphicon-copyright-mark" class="glyphicon glyphicon-copyright-mark"> </li>\
|
96 |
+
<li data-value="glyphicon-credit-card" class="glyphicon glyphicon-credit-card"> </li>\
|
97 |
+
<li data-value="glyphicon-cutlery" class="glyphicon glyphicon-cutlery"> </li>\
|
98 |
+
<li data-value="glyphicon-dashboard" class="glyphicon glyphicon-dashboard"> </li>\
|
99 |
+
<li data-value="glyphicon-download" class="glyphicon glyphicon-download"> </li>\
|
100 |
+
<li data-value="glyphicon-download-alt" class="glyphicon glyphicon-download-alt"> </li>\
|
101 |
+
<li data-value="glyphicon-earphone" class="glyphicon glyphicon-earphone"> </li>\
|
102 |
+
<li data-value="glyphicon-edit" class="glyphicon glyphicon-edit"> </li>\
|
103 |
+
<li data-value="glyphicon-eject" class="glyphicon glyphicon-eject"> </li>\
|
104 |
+
<li data-value="glyphicon-envelope" class="glyphicon glyphicon-envelope"> </li>\
|
105 |
+
<li data-value="glyphicon-euro" class="glyphicon glyphicon-euro"> </li>\
|
106 |
+
<li data-value="glyphicon-exclamation-sign" class="glyphicon glyphicon-exclamation-sign"> </li>\
|
107 |
+
<li data-value="glyphicon-exclamation-sign" class="glyphicon glyphicon-exclamation-sign"> </li>\
|
108 |
+
<li data-value="glyphicon-expand" class="glyphicon glyphicon-expand"> </li>\
|
109 |
+
<li data-value="glyphicon-export" class="glyphicon glyphicon-export"> </li>\
|
110 |
+
<li data-value="glyphicon-eye-close" class="glyphicon glyphicon-eye-close"> </li>\
|
111 |
+
<li data-value="glyphicon-eye-open" class="glyphicon glyphicon-eye-open"> </li>\
|
112 |
+
<li data-value="glyphicon-facetime-video" class="glyphicon glyphicon-facetime-video"> </li>\
|
113 |
+
<li data-value="glyphicon-fast-backward" class="glyphicon glyphicon-fast-backward"> </li>\
|
114 |
+
<li data-value="glyphicon-fast-forward" class="glyphicon glyphicon-fast-forward"> </li>\
|
115 |
+
<li data-value="glyphicon-file" class="glyphicon glyphicon-file"> </li>\
|
116 |
+
<li data-value="glyphicon-film" class="glyphicon glyphicon-film"> </li>\
|
117 |
+
<li data-value="glyphicon-filter" class="glyphicon glyphicon-filter"> </li>\
|
118 |
+
<li data-value="glyphicon-fire" class="glyphicon glyphicon-fire"> </li>\
|
119 |
+
<li data-value="glyphicon-flag" class="glyphicon glyphicon-flag"> </li>\
|
120 |
+
<li data-value="glyphicon-floppy-disk" class="glyphicon glyphicon-floppy-disk"> </li>\
|
121 |
+
<li data-value="glyphicon-floppy-open" class="glyphicon glyphicon-floppy-open"> </li>\
|
122 |
+
<li data-value="glyphicon-floppy-remove" class="glyphicon glyphicon-floppy-remove"> </li>\
|
123 |
+
<li data-value="glyphicon-floppy-save" class="glyphicon glyphicon-floppy-save"> </li>\
|
124 |
+
<li data-value="glyphicon-floppy-saved" class="glyphicon glyphicon-floppy-saved"> </li>\
|
125 |
+
<li data-value="glyphicon-folder-close" class="glyphicon glyphicon-folder-close"> </li>\
|
126 |
+
<li data-value="glyphicon-folder-open" class="glyphicon glyphicon-folder-open"> </li>\
|
127 |
+
<li data-value="glyphicon-font" class="glyphicon glyphicon-font"> </li>\
|
128 |
+
<li data-value="glyphicon-forward" class="glyphicon glyphicon-forward"> </li>\
|
129 |
+
<li data-value="glyphicon-fullscreen" class="glyphicon glyphicon-fullscreen"> </li>\
|
130 |
+
<li data-value="glyphicon-gbp" class="glyphicon glyphicon-gbp"> </li>\
|
131 |
+
<li data-value="glyphicon-gift" class="glyphicon glyphicon-gift"> </li>\
|
132 |
+
<li data-value="glyphicon-glass" class="glyphicon glyphicon-glass"> </li>\
|
133 |
+
<li data-value="glyphicon-globe" class="glyphicon glyphicon-globe"> </li>\
|
134 |
+
<li data-value="glyphicon-hand-down" class="glyphicon glyphicon-hand-down"> </li>\
|
135 |
+
<li data-value="glyphicon-hand-left" class="glyphicon glyphicon-hand-left"> </li>\
|
136 |
+
<li data-value="glyphicon-hand-right" class="glyphicon glyphicon-hand-right"> </li>\
|
137 |
+
<li data-value="glyphicon-hand-up" class="glyphicon glyphicon-hand-up"> </li>\
|
138 |
+
<li data-value="glyphicon-hd-video" class="glyphicon glyphicon-hd-video"> </li>\
|
139 |
+
<li data-value="glyphicon-hdd" class="glyphicon glyphicon-hdd"> </li>\
|
140 |
+
<li data-value="glyphicon-header" class="glyphicon glyphicon-header"> </li>\
|
141 |
+
<li data-value="glyphicon-headphones" class="glyphicon glyphicon-headphones"> </li>\
|
142 |
+
<li data-value="glyphicon-heart" class="glyphicon glyphicon-heart"> </li>\
|
143 |
+
<li data-value="glyphicon-heart-empty" class="glyphicon glyphicon-heart-empty"> </li>\
|
144 |
+
<li data-value="glyphicon-home" class="glyphicon glyphicon-home"> </li>\
|
145 |
+
<li data-value="glyphicon-import" class="glyphicon glyphicon-import"> </li>\
|
146 |
+
<li data-value="glyphicon-inbox" class="glyphicon glyphicon-inbox"> </li>\
|
147 |
+
<li data-value="glyphicon-indent-left" class="glyphicon glyphicon-indent-left"> </li>\
|
148 |
+
<li data-value="glyphicon-indent-right" class="glyphicon glyphicon-indent-right"> </li>\
|
149 |
+
<li data-value="glyphicon-info-sign" class="glyphicon glyphicon-info-sign"> </li>\
|
150 |
+
<li data-value="glyphicon-italic" class="glyphicon glyphicon-italic"> </li>\
|
151 |
+
<li data-value="glyphicon-leaf" class="glyphicon glyphicon-leaf"> </li>\
|
152 |
+
<li data-value="glyphicon-link" class="glyphicon glyphicon-link"> </li>\
|
153 |
+
<li data-value="glyphicon-list" class="glyphicon glyphicon-list"> </li>\
|
154 |
+
<li data-value="glyphicon-list-alt" class="glyphicon glyphicon-list-alt"> </li>\
|
155 |
+
<li data-value="glyphicon-lock" class="glyphicon glyphicon-lock"> </li>\
|
156 |
+
<li data-value="glyphicon-log-in" class="glyphicon glyphicon-log-in"> </li>\
|
157 |
+
<li data-value="glyphicon-log-out" class="glyphicon glyphicon-log-out"> </li>\
|
158 |
+
<li data-value="glyphicon-magnet" class="glyphicon glyphicon-magnet"> </li>\
|
159 |
+
<li data-value="glyphicon-map-marker" class="glyphicon glyphicon-map-marker"> </li>\
|
160 |
+
<li data-value="glyphicon-minus" class="glyphicon glyphicon-minus"> </li>\
|
161 |
+
<li data-value="glyphicon-minus-sign" class="glyphicon glyphicon-minus-sign"> </li>\
|
162 |
+
<li data-value="glyphicon-move" class="glyphicon glyphicon-move"> </li>\
|
163 |
+
<li data-value="glyphicon-music" class="glyphicon glyphicon-music"> </li>\
|
164 |
+
<li data-value="glyphicon-new-window" class="glyphicon glyphicon-new-window"> </li>\
|
165 |
+
<li data-value="glyphicon-off" class="glyphicon glyphicon-off"> </li>\
|
166 |
+
<li data-value="glyphicon-ok" class="glyphicon glyphicon-ok"> </li>\
|
167 |
+
<li data-value="glyphicon-ok-circle" class="glyphicon glyphicon-ok-circle"> </li>\
|
168 |
+
<li data-value="glyphicon-ok-sign" class="glyphicon glyphicon-ok-sign"> </li>\
|
169 |
+
<li data-value="glyphicon-open" class="glyphicon glyphicon-open"> </li>\
|
170 |
+
<li data-value="glyphicon-paperclip" class="glyphicon glyphicon-paperclip"> </li>\
|
171 |
+
<li data-value="glyphicon-pause" class="glyphicon glyphicon-pause"> </li>\
|
172 |
+
<li data-value="glyphicon-pencil" class="glyphicon glyphicon-pencil"> </li>\
|
173 |
+
<li data-value="glyphicon-phone" class="glyphicon glyphicon-phone"> </li>\
|
174 |
+
<li data-value="glyphicon-phone-alt" class="glyphicon glyphicon-phone-alt"> </li>\
|
175 |
+
<li data-value="glyphicon-picture" class="glyphicon glyphicon-picture"> </li>\
|
176 |
+
<li data-value="glyphicon-plane" class="glyphicon glyphicon-plane"> </li>\
|
177 |
+
<li data-value="glyphicon-play" class="glyphicon glyphicon-play"> </li>\
|
178 |
+
<li data-value="glyphicon-play-circle" class="glyphicon glyphicon-play-circle"> </li>\
|
179 |
+
<li data-value="glyphicon-plus" class="glyphicon glyphicon-plus"> </li>\
|
180 |
+
<li data-value="glyphicon-plus-sign" class="glyphicon glyphicon-plus-sign"> </li>\
|
181 |
+
<li data-value="glyphicon-print" class="glyphicon glyphicon-print"> </li>\
|
182 |
+
<li data-value="glyphicon-pushpin" class="glyphicon glyphicon-pushpin"> </li>\
|
183 |
+
<li data-value="glyphicon-qrcode" class="glyphicon glyphicon-qrcode"> </li>\
|
184 |
+
<li data-value="glyphicon-question-sign" class="glyphicon glyphicon-question-sign"> </li>\
|
185 |
+
<li data-value="glyphicon-random" class="glyphicon glyphicon-random"> </li>\
|
186 |
+
<li data-value="glyphicon-record" class="glyphicon glyphicon-record"> </li>\
|
187 |
+
<li data-value="glyphicon-refresh" class="glyphicon glyphicon-refresh"> </li>\
|
188 |
+
<li data-value="glyphicon-registration-mark" class="glyphicon glyphicon-registration-mark"> </li>\
|
189 |
+
<li data-value="glyphicon-remove" class="glyphicon glyphicon-remove"> </li>\
|
190 |
+
<li data-value="glyphicon-remove-circle" class="glyphicon glyphicon-remove-circle"> </li>\
|
191 |
+
<li data-value="glyphicon-remove-sign" class="glyphicon glyphicon-remove-sign"> </li>\
|
192 |
+
<li data-value="glyphicon-repeat" class="glyphicon glyphicon-repeat"> </li>\
|
193 |
+
<li data-value="glyphicon-resize-full" class="glyphicon glyphicon-resize-full"> </li>\
|
194 |
+
<li data-value="glyphicon-resize-horizontal" class="glyphicon glyphicon-resize-horizontal"> </li>\
|
195 |
+
<li data-value="glyphicon-resize-small" class="glyphicon glyphicon-resize-small"> </li>\
|
196 |
+
<li data-value="glyphicon-resize-vertical" class="glyphicon glyphicon-resize-vertical"> </li>\
|
197 |
+
<li data-value="glyphicon-retweet" class="glyphicon glyphicon-retweet"> </li>\
|
198 |
+
<li data-value="glyphicon-road" class="glyphicon glyphicon-road"> </li>\
|
199 |
+
<li data-value="glyphicon-save" class="glyphicon glyphicon-save"> </li>\
|
200 |
+
<li data-value="glyphicon-saved" class="glyphicon glyphicon-saved"> </li>\
|
201 |
+
<li data-value="glyphicon-screenshot" class="glyphicon glyphicon-screenshot"> </li>\
|
202 |
+
<li data-value="glyphicon-sd-video" class="glyphicon glyphicon-sd-video"> </li>\
|
203 |
+
<li data-value="glyphicon-search" class="glyphicon glyphicon-search"> </li>\
|
204 |
+
<li data-value="glyphicon-send" class="glyphicon glyphicon-send"> </li>\
|
205 |
+
<li data-value="glyphicon-share" class="glyphicon glyphicon-share"> </li>\
|
206 |
+
<li data-value="glyphicon-share-alt" class="glyphicon glyphicon-share-alt"> </li>\
|
207 |
+
<li data-value="glyphicon-shopping-cart" class="glyphicon glyphicon-shopping-cart"> </li>\
|
208 |
+
<li data-value="glyphicon-signal" class="glyphicon glyphicon-signal"> </li>\
|
209 |
+
<li data-value="glyphicon-sort" class="glyphicon glyphicon-sort"> </li>\
|
210 |
+
<li data-value="glyphicon-sort-by-alphabet" class="glyphicon glyphicon-sort-by-alphabet"> </li>\
|
211 |
+
<li data-value="glyphicon-sort-by-alphabet-alt" class="glyphicon glyphicon-sort-by-alphabet-alt"> </li>\
|
212 |
+
<li data-value="glyphicon-sort-by-attributes" class="glyphicon glyphicon-sort-by-attributes"> </li>\
|
213 |
+
<li data-value="glyphicon-sort-by-attributes-alt" class="glyphicon glyphicon-sort-by-attributes-alt"> </li>\
|
214 |
+
<li data-value="glyphicon-sort-by-order" class="glyphicon glyphicon-sort-by-order"> </li>\
|
215 |
+
<li data-value="glyphicon-sort-by-order-alt" class="glyphicon glyphicon-sort-by-order-alt"> </li>\
|
216 |
+
<li data-value="glyphicon-sound--" class="glyphicon glyphicon-sound-5-1"> </li>\
|
217 |
+
<li data-value="glyphicon-sound--" class="glyphicon glyphicon-sound-6-1"> </li>\
|
218 |
+
<li data-value="glyphicon-sound--" class="glyphicon glyphicon-sound-7-1"> </li>\
|
219 |
+
<li data-value="glyphicon-sound-dolby" class="glyphicon glyphicon-sound-dolby"> </li>\
|
220 |
+
<li data-value="glyphicon-sound-stereo" class="glyphicon glyphicon-sound-stereo"> </li>\
|
221 |
+
<li data-value="glyphicon-star" class="glyphicon glyphicon-star"> </li>\
|
222 |
+
<li data-value="glyphicon-star-empty" class="glyphicon glyphicon-star-empty"> </li>\
|
223 |
+
<li data-value="glyphicon-stats" class="glyphicon glyphicon-stats"> </li>\
|
224 |
+
<li data-value="glyphicon-step-backward" class="glyphicon glyphicon-step-backward"> </li>\
|
225 |
+
<li data-value="glyphicon-step-forward" class="glyphicon glyphicon-step-forward"> </li>\
|
226 |
+
<li data-value="glyphicon-stop" class="glyphicon glyphicon-stop"> </li>\
|
227 |
+
<li data-value="glyphicon-subtitles" class="glyphicon glyphicon-subtitles"> </li>\
|
228 |
+
<li data-value="glyphicon-tag" class="glyphicon glyphicon-tag"> </li>\
|
229 |
+
<li data-value="glyphicon-tags" class="glyphicon glyphicon-tags"> </li>\
|
230 |
+
<li data-value="glyphicon-tasks" class="glyphicon glyphicon-tasks"> </li>\
|
231 |
+
<li data-value="glyphicon-text-height" class="glyphicon glyphicon-text-height"> </li>\
|
232 |
+
<li data-value="glyphicon-text-width" class="glyphicon glyphicon-text-width"> </li>\
|
233 |
+
<li data-value="glyphicon-th" class="glyphicon glyphicon-th"> </li>\
|
234 |
+
<li data-value="glyphicon-th-large" class="glyphicon glyphicon-th-large"> </li>\
|
235 |
+
<li data-value="glyphicon-th-list" class="glyphicon glyphicon-th-list"> </li>\
|
236 |
+
<li data-value="glyphicon-thumbs-down" class="glyphicon glyphicon-thumbs-down"> </li>\
|
237 |
+
<li data-value="glyphicon-thumbs-up" class="glyphicon glyphicon-thumbs-up"> </li>\
|
238 |
+
<li data-value="glyphicon-time" class="glyphicon glyphicon-time"> </li>\
|
239 |
+
<li data-value="glyphicon-tint" class="glyphicon glyphicon-tint"> </li>\
|
240 |
+
<li data-value="glyphicon-tower" class="glyphicon glyphicon-tower"> </li>\
|
241 |
+
<li data-value="glyphicon-transfer" class="glyphicon glyphicon-transfer"> </li>\
|
242 |
+
<li data-value="glyphicon-trash" class="glyphicon glyphicon-trash"> </li>\
|
243 |
+
<li data-value="glyphicon-tree-conifer" class="glyphicon glyphicon-tree-conifer"> </li>\
|
244 |
+
<li data-value="glyphicon-tree-deciduous" class="glyphicon glyphicon-tree-deciduous"> </li>\
|
245 |
+
<li data-value="glyphicon-unchecked" class="glyphicon glyphicon-unchecked"> </li>\
|
246 |
+
<li data-value="glyphicon-upload" class="glyphicon glyphicon-upload"> </li>\
|
247 |
+
<li data-value="glyphicon-usd" class="glyphicon glyphicon-usd"> </li>\
|
248 |
+
<li data-value="glyphicon-user" class="glyphicon glyphicon-user"> </li>\
|
249 |
+
<li data-value="glyphicon-volume-down" class="glyphicon glyphicon-volume-down"> </li>\
|
250 |
+
<li data-value="glyphicon-volume-off" class="glyphicon glyphicon-volume-off"> </li>\
|
251 |
+
<li data-value="glyphicon-volume-up" class="glyphicon glyphicon-volume-up"> </li>\
|
252 |
+
<li data-value="glyphicon-warning-sign" class="glyphicon glyphicon-warning-sign"> </li>\
|
253 |
+
<li data-value="glyphicon-wrench" class="glyphicon glyphicon-wrench"> </li>\
|
254 |
+
<li data-value="glyphicon-zoom-in" class="glyphicon glyphicon-zoom-in"> </li>\
|
255 |
+
<li data-value="glyphicon-zoom-out" class="glyphicon glyphicon-zoom-out"> </li>\
|
256 |
+
</ul></div>\
|
257 |
+
</td>\
|
258 |
+
</tr>\
|
259 |
+
<tr>\
|
260 |
+
<th><label for="oscitas-icon-class">Custom Class:</label></th>\
|
261 |
+
<td><input type="text" name="line" id="oscitas-icon-class" value=""/><br />\
|
262 |
+
</td>\
|
263 |
+
</tr>\
|
264 |
+
</table>\
|
265 |
+
<p class="submit">\
|
266 |
+
<input type="button" id="oscitas-icon-submit" class="button-primary" value="Insert icon" name="submit" />\
|
267 |
+
</p>\
|
268 |
+
</div>');
|
269 |
+
|
270 |
+
var table = form.find('table');
|
271 |
+
jQuery('.glyphicon').css('display','inline');
|
272 |
+
form.appendTo('body').hide();
|
273 |
+
var t= table.find('#osc_icon_class_val_icon').val();
|
274 |
+
table.find('#osc_show_icon_icon').removeClass().addClass('glyphicon').addClass(t);
|
275 |
+
table.find('#click_icon_list_icon').click(function(){
|
276 |
+
if(!jQuery(this).hasClass('osc_icon_showing_icon')){
|
277 |
+
jQuery(this).addClass('osc_icon_showing_icon')
|
278 |
+
table.find('#osc_show_iconlist_icon').show();
|
279 |
+
} else{
|
280 |
+
jQuery(this).removeClass('osc_icon_showing_icon')
|
281 |
+
table.find('#osc_show_iconlist_icon').hide();
|
282 |
+
}
|
283 |
+
});
|
284 |
+
table.find('#oscitas-heading-icon_icon li').click(function(){
|
285 |
+
var val=jQuery(this).attr('data-value');
|
286 |
+
table.find('#oscitas-heading-icon_icon li').removeClass('osc_icon_selected_button');
|
287 |
+
jQuery(this).addClass('osc_icon_selected_button');
|
288 |
+
table.find('#osc_show_iconlist_icon').hide();
|
289 |
+
table.find('#osc_show_icon_icon').removeClass().addClass('glyphicon').addClass(val);
|
290 |
+
table.find('#osc_icon_class_val_icon').val(val);
|
291 |
+
})
|
292 |
+
|
293 |
+
|
294 |
+
|
295 |
+
|
296 |
+
|
297 |
+
|
298 |
+
// handles the click event of the submit button
|
299 |
+
form.find('#oscitas-icon-submit').click(function(){
|
300 |
+
var cusclass;
|
301 |
+
if(table.find('#oscitas-icon-class').val()!=''){
|
302 |
+
cusclass= ' class="'+table.find('#oscitas-icon-class').val()+'"';
|
303 |
+
}
|
304 |
+
else{
|
305 |
+
cusclass='';
|
306 |
+
}
|
307 |
+
var icon = table.find('#osc_icon_class_val_icon').val();
|
308 |
+
var shortcode='';
|
309 |
+
shortcode='[icon type="'+icon+'"'+cusclass+']'
|
310 |
+
|
311 |
+
// inserts the shortcode into the active editor
|
312 |
+
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
313 |
+
|
314 |
+
// closes fancybox
|
315 |
+
jQuery.fancybox.close();
|
316 |
+
});
|
317 |
+
}
|
318 |
+
|
shortcode/icon/plugin_shortcode.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* * *********************************************************
|
4 |
+
* BUTTONS
|
5 |
+
* ********************************************************* */
|
6 |
+
|
7 |
+
function osc_theme_icon($params, $content = null) {
|
8 |
+
extract(shortcode_atts(array(
|
9 |
+
'type' => '',
|
10 |
+
'class' => '',
|
11 |
+
), $params));
|
12 |
+
$out = '<i class="glyphicon ' . $type . ' ' . $class . '"></i>';
|
13 |
+
return $out;
|
14 |
+
}
|
15 |
+
|
16 |
+
add_shortcode('icon', 'osc_theme_icon');
|
17 |
+
|
shortcode/iconhead/iconhead_plugin.js
CHANGED
@@ -1,306 +1,333 @@
|
|
1 |
-
(function() {
|
2 |
-
tinymce.create('tinymce.plugins.oscitasIconhead', {
|
3 |
-
init: function(ed, url) {
|
4 |
-
ed.addButton('oscitasiconhead', {
|
5 |
-
title: 'Icon Heading Shortcode',
|
6 |
-
image: url + '/icon.png',
|
7 |
-
onclick: function() {
|
8 |
-
|
9 |
-
|
10 |
-
'
|
11 |
-
'
|
12 |
-
'
|
13 |
-
'
|
14 |
-
'
|
15 |
-
'
|
16 |
-
'
|
17 |
-
'
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
<
|
56 |
-
<li
|
57 |
-
<li data-value="glyphicon-
|
58 |
-
<li data-value="glyphicon-
|
59 |
-
<li data-value="glyphicon-
|
60 |
-
<li data-value="glyphicon-
|
61 |
-
<li data-value="glyphicon-
|
62 |
-
<li data-value="glyphicon-
|
63 |
-
<li data-value="glyphicon-
|
64 |
-
<li data-value="glyphicon-
|
65 |
-
<li data-value="glyphicon-
|
66 |
-
<li data-value="glyphicon-
|
67 |
-
<li data-value="glyphicon-
|
68 |
-
<li data-value="glyphicon-
|
69 |
-
<li data-value="glyphicon-
|
70 |
-
<li data-value="glyphicon-
|
71 |
-
<li data-value="glyphicon-
|
72 |
-
<li data-value="glyphicon-
|
73 |
-
<li data-value="glyphicon-
|
74 |
-
<li data-value="glyphicon-
|
75 |
-
<li data-value="glyphicon-
|
76 |
-
<li data-value="glyphicon-
|
77 |
-
<li data-value="glyphicon-
|
78 |
-
<li data-value="glyphicon-
|
79 |
-
<li data-value="glyphicon-
|
80 |
-
<li data-value="glyphicon-
|
81 |
-
<li data-value="glyphicon-
|
82 |
-
<li data-value="glyphicon-
|
83 |
-
<li data-value="glyphicon-
|
84 |
-
<li data-value="glyphicon-
|
85 |
-
<li data-value="glyphicon-
|
86 |
-
<li data-value="glyphicon-
|
87 |
-
<li data-value="glyphicon-
|
88 |
-
<li data-value="glyphicon-
|
89 |
-
<li data-value="glyphicon-
|
90 |
-
<li data-value="glyphicon-
|
91 |
-
<li data-value="glyphicon-
|
92 |
-
<li data-value="glyphicon-
|
93 |
-
<li data-value="glyphicon-
|
94 |
-
<li data-value="glyphicon-
|
95 |
-
<li data-value="glyphicon-
|
96 |
-
<li data-value="glyphicon-
|
97 |
-
<li data-value="glyphicon-
|
98 |
-
<li data-value="glyphicon-
|
99 |
-
<li data-value="glyphicon-
|
100 |
-
<li data-value="glyphicon-
|
101 |
-
<li data-value="glyphicon-
|
102 |
-
<li data-value="glyphicon-
|
103 |
-
<li data-value="glyphicon-
|
104 |
-
<li data-value="glyphicon-
|
105 |
-
<li data-value="glyphicon-
|
106 |
-
<li data-value="glyphicon-
|
107 |
-
<li data-value="glyphicon-
|
108 |
-
<li data-value="glyphicon-
|
109 |
-
<li data-value="glyphicon-
|
110 |
-
<li data-value="glyphicon-
|
111 |
-
<li data-value="glyphicon-
|
112 |
-
<li data-value="glyphicon-
|
113 |
-
<li data-value="glyphicon-
|
114 |
-
<li data-value="glyphicon-
|
115 |
-
<li data-value="glyphicon-
|
116 |
-
<li data-value="glyphicon-
|
117 |
-
<li data-value="glyphicon-
|
118 |
-
<li data-value="glyphicon-
|
119 |
-
<li data-value="glyphicon-
|
120 |
-
<li data-value="glyphicon-
|
121 |
-
<li data-value="glyphicon-
|
122 |
-
<li data-value="glyphicon-
|
123 |
-
<li data-value="glyphicon-
|
124 |
-
<li data-value="glyphicon-
|
125 |
-
<li data-value="glyphicon-
|
126 |
-
<li data-value="glyphicon-
|
127 |
-
<li data-value="glyphicon-
|
128 |
-
<li data-value="glyphicon-
|
129 |
-
<li data-value="glyphicon-
|
130 |
-
<li data-value="glyphicon-
|
131 |
-
<li data-value="glyphicon-
|
132 |
-
<li data-value="glyphicon-
|
133 |
-
<li data-value="glyphicon-
|
134 |
-
<li data-value="glyphicon-
|
135 |
-
<li data-value="glyphicon-
|
136 |
-
<li data-value="glyphicon-
|
137 |
-
<li data-value="glyphicon-
|
138 |
-
<li data-value="glyphicon-
|
139 |
-
<li data-value="glyphicon-
|
140 |
-
<li data-value="glyphicon-
|
141 |
-
<li data-value="glyphicon-
|
142 |
-
<li data-value="glyphicon-
|
143 |
-
<li data-value="glyphicon-
|
144 |
-
<li data-value="glyphicon-
|
145 |
-
<li data-value="glyphicon-
|
146 |
-
<li data-value="glyphicon-
|
147 |
-
<li data-value="glyphicon-
|
148 |
-
<li data-value="glyphicon-
|
149 |
-
<li data-value="glyphicon-
|
150 |
-
<li data-value="glyphicon-
|
151 |
-
<li data-value="glyphicon-
|
152 |
-
<li data-value="glyphicon-
|
153 |
-
<li data-value="glyphicon-
|
154 |
-
<li data-value="glyphicon-
|
155 |
-
<li data-value="glyphicon-
|
156 |
-
<li data-value="glyphicon-
|
157 |
-
<li data-value="glyphicon-
|
158 |
-
<li data-value="glyphicon-
|
159 |
-
<li data-value="glyphicon-
|
160 |
-
<li data-value="glyphicon-
|
161 |
-
<li data-value="glyphicon-
|
162 |
-
<li data-value="glyphicon-
|
163 |
-
<li data-value="glyphicon-
|
164 |
-
<li data-value="glyphicon-
|
165 |
-
<li data-value="glyphicon-
|
166 |
-
<li data-value="glyphicon-
|
167 |
-
<li data-value="glyphicon-
|
168 |
-
<li data-value="glyphicon-
|
169 |
-
<li data-value="glyphicon-
|
170 |
-
<li data-value="glyphicon-
|
171 |
-
<li data-value="glyphicon-
|
172 |
-
<li data-value="glyphicon-
|
173 |
-
<li data-value="glyphicon-
|
174 |
-
<li data-value="glyphicon-
|
175 |
-
<li data-value="glyphicon-
|
176 |
-
<li data-value="glyphicon-
|
177 |
-
<li data-value="glyphicon-
|
178 |
-
<li data-value="glyphicon-
|
179 |
-
<li data-value="glyphicon-
|
180 |
-
<li data-value="glyphicon-
|
181 |
-
<li data-value="glyphicon-
|
182 |
-
<li data-value="glyphicon-
|
183 |
-
<li data-value="glyphicon-
|
184 |
-
<li data-value="glyphicon-
|
185 |
-
<li data-value="glyphicon-
|
186 |
-
<li data-value="glyphicon-
|
187 |
-
<li data-value="glyphicon-
|
188 |
-
<li data-value="glyphicon-
|
189 |
-
<li data-value="glyphicon-
|
190 |
-
<li data-value="glyphicon-
|
191 |
-
<li data-value="glyphicon-
|
192 |
-
<li data-value="glyphicon-
|
193 |
-
<li data-value="glyphicon-
|
194 |
-
<li data-value="glyphicon-
|
195 |
-
<li data-value="glyphicon-
|
196 |
-
<li data-value="glyphicon-
|
197 |
-
<li data-value="glyphicon-
|
198 |
-
<li data-value="glyphicon-
|
199 |
-
<li data-value="glyphicon-
|
200 |
-
<li data-value="glyphicon-
|
201 |
-
<li data-value="glyphicon-
|
202 |
-
<li data-value="glyphicon-
|
203 |
-
<li data-value="glyphicon-
|
204 |
-
<li data-value="glyphicon-
|
205 |
-
<li data-value="glyphicon-
|
206 |
-
<li data-value="glyphicon-
|
207 |
-
<li data-value="glyphicon-
|
208 |
-
<li data-value="glyphicon-
|
209 |
-
<li data-value="glyphicon-
|
210 |
-
<li data-value="glyphicon-sort
|
211 |
-
<li data-value="glyphicon-sort-by-
|
212 |
-
<li data-value="glyphicon-
|
213 |
-
<li data-value="glyphicon-
|
214 |
-
<li data-value="glyphicon-
|
215 |
-
<li data-value="glyphicon-
|
216 |
-
<li data-value="glyphicon-
|
217 |
-
<li data-value="glyphicon-
|
218 |
-
<li data-value="glyphicon-
|
219 |
-
<li data-value="glyphicon-
|
220 |
-
<li data-value="glyphicon-
|
221 |
-
<li data-value="glyphicon-
|
222 |
-
<li data-value="glyphicon-
|
223 |
-
<li data-value="glyphicon-
|
224 |
-
<li data-value="glyphicon-
|
225 |
-
<li data-value="glyphicon-
|
226 |
-
<li data-value="glyphicon-
|
227 |
-
<li data-value="glyphicon-
|
228 |
-
<li data-value="glyphicon-
|
229 |
-
<li data-value="glyphicon-
|
230 |
-
<li data-value="glyphicon-
|
231 |
-
<li data-value="glyphicon-
|
232 |
-
<li data-value="glyphicon-
|
233 |
-
<li data-value="glyphicon-
|
234 |
-
<li data-value="glyphicon-
|
235 |
-
<li data-value="glyphicon-
|
236 |
-
<li data-value="glyphicon-
|
237 |
-
<li data-value="glyphicon-
|
238 |
-
<li data-value="glyphicon-
|
239 |
-
<li data-value="glyphicon-
|
240 |
-
<li data-value="glyphicon-
|
241 |
-
<li data-value="glyphicon-
|
242 |
-
<li data-value="glyphicon-
|
243 |
-
<li data-value="glyphicon-
|
244 |
-
<li data-value="glyphicon-
|
245 |
-
<li data-value="glyphicon-
|
246 |
-
<li data-value="glyphicon-
|
247 |
-
<li data-value="glyphicon-
|
248 |
-
<li data-value="glyphicon-
|
249 |
-
<li data-value="glyphicon-
|
250 |
-
<li data-value="glyphicon-
|
251 |
-
<li data-value="glyphicon-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
</td>\
|
259 |
-
</tr>\
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
jQuery.
|
304 |
-
|
305 |
-
|
306 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function() {
|
2 |
+
tinymce.create('tinymce.plugins.oscitasIconhead', {
|
3 |
+
init: function(ed, url) {
|
4 |
+
ed.addButton('oscitasiconhead', {
|
5 |
+
title: 'Icon Heading Shortcode',
|
6 |
+
image: url + '/icon.png',
|
7 |
+
onclick: function() {
|
8 |
+
create_oscitas_iconhead();
|
9 |
+
jQuery.fancybox({
|
10 |
+
'autoSize':false,
|
11 |
+
'autoWidth':false,
|
12 |
+
'fitToView':false,
|
13 |
+
'height':'auto',
|
14 |
+
'topRatio':0.2,
|
15 |
+
'type' : 'inline',
|
16 |
+
'title' : 'Icon Heading Shortcode',
|
17 |
+
'href' : '#oscitas-form-iconhead',
|
18 |
+
'width':600,
|
19 |
+
helpers: {
|
20 |
+
title : {
|
21 |
+
type : 'over',
|
22 |
+
position:'top'
|
23 |
+
}
|
24 |
+
}
|
25 |
+
});
|
26 |
+
}
|
27 |
+
});
|
28 |
+
},
|
29 |
+
createControl: function(n, cm) {
|
30 |
+
return null;
|
31 |
+
},
|
32 |
+
getInfo: function() {
|
33 |
+
return {
|
34 |
+
longname: "Icon Heading Shortcode",
|
35 |
+
author : 'Oscitas Themes',
|
36 |
+
authorurl : 'http://www.oscitasthemes.com/',
|
37 |
+
infourl : 'http://www.oscitasthemes.com/',
|
38 |
+
version : "."
|
39 |
+
};
|
40 |
+
}
|
41 |
+
});
|
42 |
+
tinymce.PluginManager.add('oscitasiconhead', tinymce.plugins.oscitasIconhead);
|
43 |
+
})();
|
44 |
+
|
45 |
+
function create_oscitas_iconhead(){
|
46 |
+
if(jQuery('#oscitas-form-iconhead').length){
|
47 |
+
jQuery('#oscitas-form-iconhead').remove();
|
48 |
+
}
|
49 |
+
// creates a form to be displayed everytime the button is clicked
|
50 |
+
// you should achieve this using AJAX instead of direct html code like this
|
51 |
+
var form = jQuery('<div id="oscitas-form-iconhead"><table id="oscitas-table" class="form-table">\
|
52 |
+
<tr>\
|
53 |
+
<th><label for="oscitas-heading-icon">Select Icon:</label></th>\
|
54 |
+
<td><div id="click_icon_list" class="oscitas-icon-div"><span id="osc_show_icon"></span><span class="show-drop"></span></div><input type="hidden" id="osc_icon_class_val" value="">\
|
55 |
+
<div id="osc_show_iconlist" class="oscitas-icon" style="display:none;width:100%"><ul name="oscitas-heading-icon" id="oscitas-heading-icon" class="oscitas-icon-ul">\
|
56 |
+
<li class="glyphicon" data-value="">null</li>\
|
57 |
+
<li data-value="glyphicon-adjust" class="glyphicon glyphicon-adjust"> </li>\
|
58 |
+
<li data-value="glyphicon-align-center" class="glyphicon glyphicon-align-center"> </li>\
|
59 |
+
<li data-value="glyphicon-align-justify" class="glyphicon glyphicon-align-justify"> </li>\
|
60 |
+
<li data-value="glyphicon-align-left" class="glyphicon glyphicon-align-left"> </li>\
|
61 |
+
<li data-value="glyphicon-align-right" class="glyphicon glyphicon-align-right"> </li>\
|
62 |
+
<li data-value="glyphicon-arrow-down" class="glyphicon glyphicon-arrow-down"> </li>\
|
63 |
+
<li data-value="glyphicon-arrow-left" class="glyphicon glyphicon-arrow-left"> </li>\
|
64 |
+
<li data-value="glyphicon-arrow-right" class="glyphicon glyphicon-arrow-right"> </li>\
|
65 |
+
<li data-value="glyphicon-arrow-up" class="glyphicon glyphicon-arrow-up"> </li>\
|
66 |
+
<li data-value="glyphicon-asterisk" class="glyphicon glyphicon-asterisk"> </li>\
|
67 |
+
<li data-value="glyphicon-backward" class="glyphicon glyphicon-backward"> </li>\
|
68 |
+
<li data-value="glyphicon-ban-circle" class="glyphicon glyphicon-ban-circle"> </li>\
|
69 |
+
<li data-value="glyphicon-barcode" class="glyphicon glyphicon-barcode"> </li>\
|
70 |
+
<li data-value="glyphicon-bell" class="glyphicon glyphicon-bell"> </li>\
|
71 |
+
<li data-value="glyphicon-bold" class="glyphicon glyphicon-bold"> </li>\
|
72 |
+
<li data-value="glyphicon-book" class="glyphicon glyphicon-book"> </li>\
|
73 |
+
<li data-value="glyphicon-bookmark" class="glyphicon glyphicon-bookmark"> </li>\
|
74 |
+
<li data-value="glyphicon-briefcase" class="glyphicon glyphicon-briefcase"> </li>\
|
75 |
+
<li data-value="glyphicon-bullhorn" class="glyphicon glyphicon-bullhorn"> </li>\
|
76 |
+
<li data-value="glyphicon-calendar" class="glyphicon glyphicon-calendar"> </li>\
|
77 |
+
<li data-value="glyphicon-camera" class="glyphicon glyphicon-camera"> </li>\
|
78 |
+
<li data-value="glyphicon-certificate" class="glyphicon glyphicon-certificate"> </li>\
|
79 |
+
<li data-value="glyphicon-check" class="glyphicon glyphicon-check"> </li>\
|
80 |
+
<li data-value="glyphicon-chevron-down" class="glyphicon glyphicon-chevron-down"> </li>\
|
81 |
+
<li data-value="glyphicon-chevron-left" class="glyphicon glyphicon-chevron-left"> </li>\
|
82 |
+
<li data-value="glyphicon-chevron-right" class="glyphicon glyphicon-chevron-right"> </li>\
|
83 |
+
<li data-value="glyphicon-chevron-up" class="glyphicon glyphicon-chevron-up"> </li>\
|
84 |
+
<li data-value="glyphicon-circle-arrow-down" class="glyphicon glyphicon-circle-arrow-down"> </li>\
|
85 |
+
<li data-value="glyphicon-circle-arrow-left" class="glyphicon glyphicon-circle-arrow-left"> </li>\
|
86 |
+
<li data-value="glyphicon-circle-arrow-right" class="glyphicon glyphicon-circle-arrow-right"> </li>\
|
87 |
+
<li data-value="glyphicon-circle-arrow-up" class="glyphicon glyphicon-circle-arrow-up"> </li>\
|
88 |
+
<li data-value="glyphicon-cloud" class="glyphicon glyphicon-cloud"> </li>\
|
89 |
+
<li data-value="glyphicon-cloud-download" class="glyphicon glyphicon-cloud-download"> </li>\
|
90 |
+
<li data-value="glyphicon-cloud-upload" class="glyphicon glyphicon-cloud-upload"> </li>\
|
91 |
+
<li data-value="glyphicon-cog" class="glyphicon glyphicon-cog"> </li>\
|
92 |
+
<li data-value="glyphicon-collapse-down" class="glyphicon glyphicon-collapse-down"> </li>\
|
93 |
+
<li data-value="glyphicon-collapse-up" class="glyphicon glyphicon-collapse-up"> </li>\
|
94 |
+
<li data-value="glyphicon-comment" class="glyphicon glyphicon-comment"> </li>\
|
95 |
+
<li data-value="glyphicon-compressed" class="glyphicon glyphicon-compressed"> </li>\
|
96 |
+
<li data-value="glyphicon-copyright-mark" class="glyphicon glyphicon-copyright-mark"> </li>\
|
97 |
+
<li data-value="glyphicon-credit-card" class="glyphicon glyphicon-credit-card"> </li>\
|
98 |
+
<li data-value="glyphicon-cutlery" class="glyphicon glyphicon-cutlery"> </li>\
|
99 |
+
<li data-value="glyphicon-dashboard" class="glyphicon glyphicon-dashboard"> </li>\
|
100 |
+
<li data-value="glyphicon-download" class="glyphicon glyphicon-download"> </li>\
|
101 |
+
<li data-value="glyphicon-download-alt" class="glyphicon glyphicon-download-alt"> </li>\
|
102 |
+
<li data-value="glyphicon-earphone" class="glyphicon glyphicon-earphone"> </li>\
|
103 |
+
<li data-value="glyphicon-edit" class="glyphicon glyphicon-edit"> </li>\
|
104 |
+
<li data-value="glyphicon-eject" class="glyphicon glyphicon-eject"> </li>\
|
105 |
+
<li data-value="glyphicon-envelope" class="glyphicon glyphicon-envelope"> </li>\
|
106 |
+
<li data-value="glyphicon-euro" class="glyphicon glyphicon-euro"> </li>\
|
107 |
+
<li data-value="glyphicon-exclamation-sign" class="glyphicon glyphicon-exclamation-sign"> </li>\
|
108 |
+
<li data-value="glyphicon-exclamation-sign" class="glyphicon glyphicon-exclamation-sign"> </li>\
|
109 |
+
<li data-value="glyphicon-expand" class="glyphicon glyphicon-expand"> </li>\
|
110 |
+
<li data-value="glyphicon-export" class="glyphicon glyphicon-export"> </li>\
|
111 |
+
<li data-value="glyphicon-eye-close" class="glyphicon glyphicon-eye-close"> </li>\
|
112 |
+
<li data-value="glyphicon-eye-open" class="glyphicon glyphicon-eye-open"> </li>\
|
113 |
+
<li data-value="glyphicon-facetime-video" class="glyphicon glyphicon-facetime-video"> </li>\
|
114 |
+
<li data-value="glyphicon-fast-backward" class="glyphicon glyphicon-fast-backward"> </li>\
|
115 |
+
<li data-value="glyphicon-fast-forward" class="glyphicon glyphicon-fast-forward"> </li>\
|
116 |
+
<li data-value="glyphicon-file" class="glyphicon glyphicon-file"> </li>\
|
117 |
+
<li data-value="glyphicon-film" class="glyphicon glyphicon-film"> </li>\
|
118 |
+
<li data-value="glyphicon-filter" class="glyphicon glyphicon-filter"> </li>\
|
119 |
+
<li data-value="glyphicon-fire" class="glyphicon glyphicon-fire"> </li>\
|
120 |
+
<li data-value="glyphicon-flag" class="glyphicon glyphicon-flag"> </li>\
|
121 |
+
<li data-value="glyphicon-floppy-disk" class="glyphicon glyphicon-floppy-disk"> </li>\
|
122 |
+
<li data-value="glyphicon-floppy-open" class="glyphicon glyphicon-floppy-open"> </li>\
|
123 |
+
<li data-value="glyphicon-floppy-remove" class="glyphicon glyphicon-floppy-remove"> </li>\
|
124 |
+
<li data-value="glyphicon-floppy-save" class="glyphicon glyphicon-floppy-save"> </li>\
|
125 |
+
<li data-value="glyphicon-floppy-saved" class="glyphicon glyphicon-floppy-saved"> </li>\
|
126 |
+
<li data-value="glyphicon-folder-close" class="glyphicon glyphicon-folder-close"> </li>\
|
127 |
+
<li data-value="glyphicon-folder-open" class="glyphicon glyphicon-folder-open"> </li>\
|
128 |
+
<li data-value="glyphicon-font" class="glyphicon glyphicon-font"> </li>\
|
129 |
+
<li data-value="glyphicon-forward" class="glyphicon glyphicon-forward"> </li>\
|
130 |
+
<li data-value="glyphicon-fullscreen" class="glyphicon glyphicon-fullscreen"> </li>\
|
131 |
+
<li data-value="glyphicon-gbp" class="glyphicon glyphicon-gbp"> </li>\
|
132 |
+
<li data-value="glyphicon-gift" class="glyphicon glyphicon-gift"> </li>\
|
133 |
+
<li data-value="glyphicon-glass" class="glyphicon glyphicon-glass"> </li>\
|
134 |
+
<li data-value="glyphicon-globe" class="glyphicon glyphicon-globe"> </li>\
|
135 |
+
<li data-value="glyphicon-hand-down" class="glyphicon glyphicon-hand-down"> </li>\
|
136 |
+
<li data-value="glyphicon-hand-left" class="glyphicon glyphicon-hand-left"> </li>\
|
137 |
+
<li data-value="glyphicon-hand-right" class="glyphicon glyphicon-hand-right"> </li>\
|
138 |
+
<li data-value="glyphicon-hand-up" class="glyphicon glyphicon-hand-up"> </li>\
|
139 |
+
<li data-value="glyphicon-hd-video" class="glyphicon glyphicon-hd-video"> </li>\
|
140 |
+
<li data-value="glyphicon-hdd" class="glyphicon glyphicon-hdd"> </li>\
|
141 |
+
<li data-value="glyphicon-header" class="glyphicon glyphicon-header"> </li>\
|
142 |
+
<li data-value="glyphicon-headphones" class="glyphicon glyphicon-headphones"> </li>\
|
143 |
+
<li data-value="glyphicon-heart" class="glyphicon glyphicon-heart"> </li>\
|
144 |
+
<li data-value="glyphicon-heart-empty" class="glyphicon glyphicon-heart-empty"> </li>\
|
145 |
+
<li data-value="glyphicon-home" class="glyphicon glyphicon-home"> </li>\
|
146 |
+
<li data-value="glyphicon-import" class="glyphicon glyphicon-import"> </li>\
|
147 |
+
<li data-value="glyphicon-inbox" class="glyphicon glyphicon-inbox"> </li>\
|
148 |
+
<li data-value="glyphicon-indent-left" class="glyphicon glyphicon-indent-left"> </li>\
|
149 |
+
<li data-value="glyphicon-indent-right" class="glyphicon glyphicon-indent-right"> </li>\
|
150 |
+
<li data-value="glyphicon-info-sign" class="glyphicon glyphicon-info-sign"> </li>\
|
151 |
+
<li data-value="glyphicon-italic" class="glyphicon glyphicon-italic"> </li>\
|
152 |
+
<li data-value="glyphicon-leaf" class="glyphicon glyphicon-leaf"> </li>\
|
153 |
+
<li data-value="glyphicon-link" class="glyphicon glyphicon-link"> </li>\
|
154 |
+
<li data-value="glyphicon-list" class="glyphicon glyphicon-list"> </li>\
|
155 |
+
<li data-value="glyphicon-list-alt" class="glyphicon glyphicon-list-alt"> </li>\
|
156 |
+
<li data-value="glyphicon-lock" class="glyphicon glyphicon-lock"> </li>\
|
157 |
+
<li data-value="glyphicon-log-in" class="glyphicon glyphicon-log-in"> </li>\
|
158 |
+
<li data-value="glyphicon-log-out" class="glyphicon glyphicon-log-out"> </li>\
|
159 |
+
<li data-value="glyphicon-magnet" class="glyphicon glyphicon-magnet"> </li>\
|
160 |
+
<li data-value="glyphicon-map-marker" class="glyphicon glyphicon-map-marker"> </li>\
|
161 |
+
<li data-value="glyphicon-minus" class="glyphicon glyphicon-minus"> </li>\
|
162 |
+
<li data-value="glyphicon-minus-sign" class="glyphicon glyphicon-minus-sign"> </li>\
|
163 |
+
<li data-value="glyphicon-move" class="glyphicon glyphicon-move"> </li>\
|
164 |
+
<li data-value="glyphicon-music" class="glyphicon glyphicon-music"> </li>\
|
165 |
+
<li data-value="glyphicon-new-window" class="glyphicon glyphicon-new-window"> </li>\
|
166 |
+
<li data-value="glyphicon-off" class="glyphicon glyphicon-off"> </li>\
|
167 |
+
<li data-value="glyphicon-ok" class="glyphicon glyphicon-ok"> </li>\
|
168 |
+
<li data-value="glyphicon-ok-circle" class="glyphicon glyphicon-ok-circle"> </li>\
|
169 |
+
<li data-value="glyphicon-ok-sign" class="glyphicon glyphicon-ok-sign"> </li>\
|
170 |
+
<li data-value="glyphicon-open" class="glyphicon glyphicon-open"> </li>\
|
171 |
+
<li data-value="glyphicon-paperclip" class="glyphicon glyphicon-paperclip"> </li>\
|
172 |
+
<li data-value="glyphicon-pause" class="glyphicon glyphicon-pause"> </li>\
|
173 |
+
<li data-value="glyphicon-pencil" class="glyphicon glyphicon-pencil"> </li>\
|
174 |
+
<li data-value="glyphicon-phone" class="glyphicon glyphicon-phone"> </li>\
|
175 |
+
<li data-value="glyphicon-phone-alt" class="glyphicon glyphicon-phone-alt"> </li>\
|
176 |
+
<li data-value="glyphicon-picture" class="glyphicon glyphicon-picture"> </li>\
|
177 |
+
<li data-value="glyphicon-plane" class="glyphicon glyphicon-plane"> </li>\
|
178 |
+
<li data-value="glyphicon-play" class="glyphicon glyphicon-play"> </li>\
|
179 |
+
<li data-value="glyphicon-play-circle" class="glyphicon glyphicon-play-circle"> </li>\
|
180 |
+
<li data-value="glyphicon-plus" class="glyphicon glyphicon-plus"> </li>\
|
181 |
+
<li data-value="glyphicon-plus-sign" class="glyphicon glyphicon-plus-sign"> </li>\
|
182 |
+
<li data-value="glyphicon-print" class="glyphicon glyphicon-print"> </li>\
|
183 |
+
<li data-value="glyphicon-pushpin" class="glyphicon glyphicon-pushpin"> </li>\
|
184 |
+
<li data-value="glyphicon-qrcode" class="glyphicon glyphicon-qrcode"> </li>\
|
185 |
+
<li data-value="glyphicon-question-sign" class="glyphicon glyphicon-question-sign"> </li>\
|
186 |
+
<li data-value="glyphicon-random" class="glyphicon glyphicon-random"> </li>\
|
187 |
+
<li data-value="glyphicon-record" class="glyphicon glyphicon-record"> </li>\
|
188 |
+
<li data-value="glyphicon-refresh" class="glyphicon glyphicon-refresh"> </li>\
|
189 |
+
<li data-value="glyphicon-registration-mark" class="glyphicon glyphicon-registration-mark"> </li>\
|
190 |
+
<li data-value="glyphicon-remove" class="glyphicon glyphicon-remove"> </li>\
|
191 |
+
<li data-value="glyphicon-remove-circle" class="glyphicon glyphicon-remove-circle"> </li>\
|
192 |
+
<li data-value="glyphicon-remove-sign" class="glyphicon glyphicon-remove-sign"> </li>\
|
193 |
+
<li data-value="glyphicon-repeat" class="glyphicon glyphicon-repeat"> </li>\
|
194 |
+
<li data-value="glyphicon-resize-full" class="glyphicon glyphicon-resize-full"> </li>\
|
195 |
+
<li data-value="glyphicon-resize-horizontal" class="glyphicon glyphicon-resize-horizontal"> </li>\
|
196 |
+
<li data-value="glyphicon-resize-small" class="glyphicon glyphicon-resize-small"> </li>\
|
197 |
+
<li data-value="glyphicon-resize-vertical" class="glyphicon glyphicon-resize-vertical"> </li>\
|
198 |
+
<li data-value="glyphicon-retweet" class="glyphicon glyphicon-retweet"> </li>\
|
199 |
+
<li data-value="glyphicon-road" class="glyphicon glyphicon-road"> </li>\
|
200 |
+
<li data-value="glyphicon-save" class="glyphicon glyphicon-save"> </li>\
|
201 |
+
<li data-value="glyphicon-saved" class="glyphicon glyphicon-saved"> </li>\
|
202 |
+
<li data-value="glyphicon-screenshot" class="glyphicon glyphicon-screenshot"> </li>\
|
203 |
+
<li data-value="glyphicon-sd-video" class="glyphicon glyphicon-sd-video"> </li>\
|
204 |
+
<li data-value="glyphicon-search" class="glyphicon glyphicon-search"> </li>\
|
205 |
+
<li data-value="glyphicon-send" class="glyphicon glyphicon-send"> </li>\
|
206 |
+
<li data-value="glyphicon-share" class="glyphicon glyphicon-share"> </li>\
|
207 |
+
<li data-value="glyphicon-share-alt" class="glyphicon glyphicon-share-alt"> </li>\
|
208 |
+
<li data-value="glyphicon-shopping-cart" class="glyphicon glyphicon-shopping-cart"> </li>\
|
209 |
+
<li data-value="glyphicon-signal" class="glyphicon glyphicon-signal"> </li>\
|
210 |
+
<li data-value="glyphicon-sort" class="glyphicon glyphicon-sort"> </li>\
|
211 |
+
<li data-value="glyphicon-sort-by-alphabet" class="glyphicon glyphicon-sort-by-alphabet"> </li>\
|
212 |
+
<li data-value="glyphicon-sort-by-alphabet-alt" class="glyphicon glyphicon-sort-by-alphabet-alt"> </li>\
|
213 |
+
<li data-value="glyphicon-sort-by-attributes" class="glyphicon glyphicon-sort-by-attributes"> </li>\
|
214 |
+
<li data-value="glyphicon-sort-by-attributes-alt" class="glyphicon glyphicon-sort-by-attributes-alt"> </li>\
|
215 |
+
<li data-value="glyphicon-sort-by-order" class="glyphicon glyphicon-sort-by-order"> </li>\
|
216 |
+
<li data-value="glyphicon-sort-by-order-alt" class="glyphicon glyphicon-sort-by-order-alt"> </li>\
|
217 |
+
<li data-value="glyphicon-sound--" class="glyphicon glyphicon-sound-5-1"> </li>\
|
218 |
+
<li data-value="glyphicon-sound--" class="glyphicon glyphicon-sound-6-1"> </li>\
|
219 |
+
<li data-value="glyphicon-sound--" class="glyphicon glyphicon-sound-7-1"> </li>\
|
220 |
+
<li data-value="glyphicon-sound-dolby" class="glyphicon glyphicon-sound-dolby"> </li>\
|
221 |
+
<li data-value="glyphicon-sound-stereo" class="glyphicon glyphicon-sound-stereo"> </li>\
|
222 |
+
<li data-value="glyphicon-star" class="glyphicon glyphicon-star"> </li>\
|
223 |
+
<li data-value="glyphicon-star-empty" class="glyphicon glyphicon-star-empty"> </li>\
|
224 |
+
<li data-value="glyphicon-stats" class="glyphicon glyphicon-stats"> </li>\
|
225 |
+
<li data-value="glyphicon-step-backward" class="glyphicon glyphicon-step-backward"> </li>\
|
226 |
+
<li data-value="glyphicon-step-forward" class="glyphicon glyphicon-step-forward"> </li>\
|
227 |
+
<li data-value="glyphicon-stop" class="glyphicon glyphicon-stop"> </li>\
|
228 |
+
<li data-value="glyphicon-subtitles" class="glyphicon glyphicon-subtitles"> </li>\
|
229 |
+
<li data-value="glyphicon-tag" class="glyphicon glyphicon-tag"> </li>\
|
230 |
+
<li data-value="glyphicon-tags" class="glyphicon glyphicon-tags"> </li>\
|
231 |
+
<li data-value="glyphicon-tasks" class="glyphicon glyphicon-tasks"> </li>\
|
232 |
+
<li data-value="glyphicon-text-height" class="glyphicon glyphicon-text-height"> </li>\
|
233 |
+
<li data-value="glyphicon-text-width" class="glyphicon glyphicon-text-width"> </li>\
|
234 |
+
<li data-value="glyphicon-th" class="glyphicon glyphicon-th"> </li>\
|
235 |
+
<li data-value="glyphicon-th-large" class="glyphicon glyphicon-th-large"> </li>\
|
236 |
+
<li data-value="glyphicon-th-list" class="glyphicon glyphicon-th-list"> </li>\
|
237 |
+
<li data-value="glyphicon-thumbs-down" class="glyphicon glyphicon-thumbs-down"> </li>\
|
238 |
+
<li data-value="glyphicon-thumbs-up" class="glyphicon glyphicon-thumbs-up"> </li>\
|
239 |
+
<li data-value="glyphicon-time" class="glyphicon glyphicon-time"> </li>\
|
240 |
+
<li data-value="glyphicon-tint" class="glyphicon glyphicon-tint"> </li>\
|
241 |
+
<li data-value="glyphicon-tower" class="glyphicon glyphicon-tower"> </li>\
|
242 |
+
<li data-value="glyphicon-transfer" class="glyphicon glyphicon-transfer"> </li>\
|
243 |
+
<li data-value="glyphicon-trash" class="glyphicon glyphicon-trash"> </li>\
|
244 |
+
<li data-value="glyphicon-tree-conifer" class="glyphicon glyphicon-tree-conifer"> </li>\
|
245 |
+
<li data-value="glyphicon-tree-deciduous" class="glyphicon glyphicon-tree-deciduous"> </li>\
|
246 |
+
<li data-value="glyphicon-unchecked" class="glyphicon glyphicon-unchecked"> </li>\
|
247 |
+
<li data-value="glyphicon-upload" class="glyphicon glyphicon-upload"> </li>\
|
248 |
+
<li data-value="glyphicon-usd" class="glyphicon glyphicon-usd"> </li>\
|
249 |
+
<li data-value="glyphicon-user" class="glyphicon glyphicon-user"> </li>\
|
250 |
+
<li data-value="glyphicon-volume-down" class="glyphicon glyphicon-volume-down"> </li>\
|
251 |
+
<li data-value="glyphicon-volume-off" class="glyphicon glyphicon-volume-off"> </li>\
|
252 |
+
<li data-value="glyphicon-volume-up" class="glyphicon glyphicon-volume-up"> </li>\
|
253 |
+
<li data-value="glyphicon-warning-sign" class="glyphicon glyphicon-warning-sign"> </li>\
|
254 |
+
<li data-value="glyphicon-wrench" class="glyphicon glyphicon-wrench"> </li>\
|
255 |
+
<li data-value="glyphicon-zoom-in" class="glyphicon glyphicon-zoom-in"> </li>\
|
256 |
+
<li data-value="glyphicon-zoom-out" class="glyphicon glyphicon-zoom-out"> </li>\
|
257 |
+
</ul></div>\
|
258 |
+
</td>\
|
259 |
+
</tr>\
|
260 |
+
<tr>\
|
261 |
+
<th><label for="oscitas-iconhead-headingtype">Heading Type:</label></th>\
|
262 |
+
<td><select name="oscitas-iconhead-headingtype" id="oscitas-iconhead-headingtype">\
|
263 |
+
<option value="h1">H1</option>\
|
264 |
+
<option value="h2">H2</option>\
|
265 |
+
<option value="h3">H3</option>\
|
266 |
+
<option value="h4">H4</option>\
|
267 |
+
<option value="h5">H5</option>\
|
268 |
+
<option value="h6">H6</option>\
|
269 |
+
</select><br />\
|
270 |
+
</td>\
|
271 |
+
</tr>\
|
272 |
+
<tr>\
|
273 |
+
<th><label for="oscitas-iconhead-heading">Heading:</label></th>\
|
274 |
+
<td><input type="text" name="oscitas-iconhead-heading" id="oscitas-iconhead-heading" value="Heading"/><br />\
|
275 |
+
</td>\
|
276 |
+
</tr>\
|
277 |
+
<tr>\
|
278 |
+
<th><label for="oscitas-iconhead-class">Custom Class:</label></th>\
|
279 |
+
<td><input type="text" name="line" id="oscitas-iconhead-class" value=""/><br />\
|
280 |
+
</td>\
|
281 |
+
</tr>\
|
282 |
+
</table>\
|
283 |
+
<p class="submit">\
|
284 |
+
<input type="button" id="oscitas-iconhead-submit" class="button-primary" value="Insert Icon Heading" name="submit" />\
|
285 |
+
</p>\
|
286 |
+
</div>');
|
287 |
+
|
288 |
+
var table = form.find('table');
|
289 |
+
jQuery('.glyphicon').css('display','inline');
|
290 |
+
form.appendTo('body').hide();
|
291 |
+
table.find('#click_icon_list').click(function(){
|
292 |
+
if(!jQuery(this).hasClass('osc_icon_showing')){
|
293 |
+
jQuery(this).addClass('osc_icon_showing')
|
294 |
+
jQuery('#osc_show_iconlist').show();
|
295 |
+
} else{
|
296 |
+
jQuery(this).removeClass('osc_icon_showing')
|
297 |
+
jQuery('#osc_show_iconlist').hide();
|
298 |
+
}
|
299 |
+
});
|
300 |
+
table.find('#oscitas-heading-icon li').click(function(){
|
301 |
+
var val=jQuery(this).attr('data-value');
|
302 |
+
table.find('#oscitas-heading-icon li').removeClass('osc_icon_selected');
|
303 |
+
jQuery(this).addClass('osc_icon_selected');
|
304 |
+
jQuery('#osc_show_iconlist').hide();
|
305 |
+
jQuery('#osc_show_icon').removeClass().addClass('glyphicon').addClass(val);
|
306 |
+
jQuery('#osc_icon_class_val').val(val);
|
307 |
+
})
|
308 |
+
// // handles the click event of the submit button
|
309 |
+
form.find('#oscitas-iconhead-submit').click(function() {
|
310 |
+
// defines the options and their default values
|
311 |
+
// again, this is not the most elegant way to do this
|
312 |
+
// but well, this gets the job done nonetheless
|
313 |
+
var type=jQuery('#oscitas-iconhead-headingtype').val();
|
314 |
+
var cusclass='',style='';
|
315 |
+
if(table.find('#osc_icon_class_val').val()!=''){
|
316 |
+
style=' style="' + table.find('#osc_icon_class_val').val()+'"' ;
|
317 |
+
}
|
318 |
+
if(table.find('#oscitas-iconhead-class').val()!=''){
|
319 |
+
cusclass= ' class="'+table.find('#oscitas-iconhead-class').val()+'"';
|
320 |
+
}
|
321 |
+
var shortcode = '[iconheading type="'+type+'"';
|
322 |
+
|
323 |
+
shortcode += style+cusclass ;
|
324 |
+
|
325 |
+
shortcode += ']'+table.find('#oscitas-iconhead-heading').val()+'[/iconheading]' ;
|
326 |
+
|
327 |
+
// inserts the shortcode into the active editor
|
328 |
+
tinyMCE.activeEditor.execCommand('mceInsertContent',0 , shortcode);
|
329 |
+
|
330 |
+
jQuery.fancybox.close();
|
331 |
+
});
|
332 |
+
}
|
333 |
+
|
shortcode/iconhead/plugin_shortcode.php
CHANGED
@@ -1,14 +1,22 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
function osc_theme_iconhead($params, $content = null) {
|
4 |
-
extract(shortcode_atts(array(
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function osc_theme_iconhead($params, $content = null) {
|
4 |
+
extract(shortcode_atts(array(
|
5 |
+
'class' => '',
|
6 |
+
'style' => '',
|
7 |
+
'type' => 'h1'
|
8 |
+
), $params));
|
9 |
+
$out = '';
|
10 |
+
if ($style != '') {
|
11 |
+
$style = ' <span class="glyphicon ' . $style . '"></span> ';
|
12 |
+
}
|
13 |
+
if ($class != '') {
|
14 |
+
$class = ' class="' . $class . '"';
|
15 |
+
}
|
16 |
+
$out = '<' . $type . $class . '>' . $style . do_shortcode($content) . '</' . $type . '>';
|
17 |
+
|
18 |
+
return $out;
|
19 |
+
}
|
20 |
+
|
21 |
+
add_shortcode('iconheading', 'osc_theme_iconhead');
|
22 |
+
|
shortcode/image/icon.png
ADDED
Binary file
|
shortcode/image/image_plugin.js
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function() {
|
2 |
+
tinymce.create('tinymce.plugins.oscitasImage', {
|
3 |
+
init : function(ed, url) {
|
4 |
+
ed.addButton('oscitasimage', {
|
5 |
+
title : 'Image Effects Shortcode',
|
6 |
+
image : url+'/icon.png',
|
7 |
+
onclick : function() {
|
8 |
+
create_oscitas_image();
|
9 |
+
jQuery.fancybox({
|
10 |
+
'type' : 'inline',
|
11 |
+
'title' : 'Image Effects Shortcode',
|
12 |
+
'href' : '#oscitas-form-image',
|
13 |
+
helpers: {
|
14 |
+
title : {
|
15 |
+
type : 'over',
|
16 |
+
position:'top'
|
17 |
+
}
|
18 |
+
}
|
19 |
+
|
20 |
+
});
|
21 |
+
}
|
22 |
+
});
|
23 |
+
},
|
24 |
+
createControl : function(n, cm) {
|
25 |
+
return null;
|
26 |
+
},
|
27 |
+
getInfo : function() {
|
28 |
+
return {
|
29 |
+
longname : "Image Effects Shortcode",
|
30 |
+
author : 'Oscitas Themes',
|
31 |
+
authorurl : 'http://www.oscitasthemes.com/',
|
32 |
+
infourl : 'http://www.oscitasthemes.com/',
|
33 |
+
version : "2.0.0"
|
34 |
+
};
|
35 |
+
}
|
36 |
+
});
|
37 |
+
tinymce.PluginManager.add('oscitasimage', tinymce.plugins.oscitasImage);
|
38 |
+
})();
|
39 |
+
|
40 |
+
function create_oscitas_image(){
|
41 |
+
if(jQuery('#oscitas-form-image').length){
|
42 |
+
jQuery('#oscitas-form-image').remove();
|
43 |
+
}
|
44 |
+
// creates a form to be displayed everytime the button is clicked
|
45 |
+
// you should achieve this using AJAX instead of direct html code like this
|
46 |
+
var form = jQuery('<div id="oscitas-form-image"><table id="oscitas-table" class="form-table">\
|
47 |
+
<th><label for="oscitas-label-content">Upload Image:</label></th>\
|
48 |
+
<td id="osc_image_upload"><input id="oscitas-image-src" type="hidden" name="oscitas-thumbnail-src" value="" />\
|
49 |
+
<input id="_btn" class="upload_image_button" type="button" value="Upload Image" />\
|
50 |
+
</td>\
|
51 |
+
</tr>\
|
52 |
+
<tr>\
|
53 |
+
<th><label for="oscitas-image-shape">Image Shape:</label></th>\
|
54 |
+
<td><select name="oscitas-image-shape" id="oscitas-image-shape">\
|
55 |
+
<option value="img-rounded">Rounded</option>\
|
56 |
+
<option value="img-circle">Circle</option>\
|
57 |
+
<option value="img-thumbnail">Thumbnail</option>\
|
58 |
+
</select>\
|
59 |
+
</td>\
|
60 |
+
</tr>\
|
61 |
+
<tr>\
|
62 |
+
<th><label for="oscitas-image-class">Custom Class:</label></th>\
|
63 |
+
<td><input type="text" name="line" id="oscitas-image-class" value=""/><br />\
|
64 |
+
</td>\
|
65 |
+
</tr>\
|
66 |
+
</table>\
|
67 |
+
<p class="submit">\
|
68 |
+
<input type="button" id="oscitas-image-submit" class="button-primary" value="Insert Image" name="submit" />\
|
69 |
+
</p>\
|
70 |
+
</div>');
|
71 |
+
|
72 |
+
var table = form.find('table');
|
73 |
+
form.appendTo('body').hide();
|
74 |
+
|
75 |
+
|
76 |
+
form.find('.upload_image_button').click(function() {
|
77 |
+
jQuery('.fancybox-overlay').css('z-index',100);
|
78 |
+
jQuery('html').addClass('Image');
|
79 |
+
formfield = jQuery(this).prev().attr('id');
|
80 |
+
tb_show('', 'media-upload.php?type=image&TB_iframe=true');
|
81 |
+
return false;
|
82 |
+
});
|
83 |
+
|
84 |
+
window.original_send_to_editor = window.send_to_editor;
|
85 |
+
|
86 |
+
window.send_to_editor = function(html) {
|
87 |
+
if (formfield) {
|
88 |
+
if (jQuery(html).find('img').length) {
|
89 |
+
fileurl = jQuery('img', html).attr('src');
|
90 |
+
} else if (jQuery(html).attr('src')) {
|
91 |
+
fileurl = jQuery(html).attr('src');
|
92 |
+
}
|
93 |
+
jQuery('#' + formfield).val(fileurl);
|
94 |
+
tb_remove();
|
95 |
+
form.find('#osc_image_upload img').remove();
|
96 |
+
form.find('#osc_image_upload').append('<img src="'+fileurl+'">')
|
97 |
+
jQuery('html').removeClass('Image');
|
98 |
+
|
99 |
+
} else {
|
100 |
+
window.original_send_to_editor(html);
|
101 |
+
}
|
102 |
+
|
103 |
+
};
|
104 |
+
|
105 |
+
|
106 |
+
// handles the click event of the submit button
|
107 |
+
form.find('#oscitas-image-submit').click(function(){
|
108 |
+
var shortcode='';
|
109 |
+
var shape=form.find('#oscitas-image-shape').val();
|
110 |
+
var cusclass='';
|
111 |
+
if(table.find('#oscitas-image-class').val()!=''){
|
112 |
+
cusclass= ' class="'+table.find('#oscitas-image-class').val()+'"';
|
113 |
+
}
|
114 |
+
if(form.find('#oscitas-image-src').val()!=''){
|
115 |
+
shortcode = '[image'+cusclass+' src="'+form.find('#oscitas-image-src').val()+'" shape="'+shape+'"]';
|
116 |
+
}
|
117 |
+
// inserts the shortcode into the active editor
|
118 |
+
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
119 |
+
|
120 |
+
// closes fancybox
|
121 |
+
jQuery.fancybox.close();
|
122 |
+
});
|
123 |
+
}
|
124 |
+
|
shortcode/image/plugin_shortcode.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* * *********************************************************
|
4 |
+
* BUTTONS
|
5 |
+
* ********************************************************* */
|
6 |
+
|
7 |
+
function osc_theme_image($params, $content = 'Label') {
|
8 |
+
extract(shortcode_atts(array(
|
9 |
+
'src' => '',
|
10 |
+
'class' => '',
|
11 |
+
'shape' => ''
|
12 |
+
), $params));
|
13 |
+
$out = '';
|
14 |
+
|
15 |
+
|
16 |
+
$out = '<img src="' . $src . '" class="' . $class .' '. $shape . '">';
|
17 |
+
|
18 |
+
return $out;
|
19 |
+
}
|
20 |
+
|
21 |
+
add_shortcode('image', 'osc_theme_image');
|
22 |
+
|
shortcode/labels/icon.png
ADDED
Binary file
|
shortcode/labels/labels_plugin.js
ADDED
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function() {
|
2 |
+
tinymce.create('tinymce.plugins.oscitasLabels', {
|
3 |
+
init : function(ed, url) {
|
4 |
+
ed.addButton('oscitaslabels', {
|
5 |
+
title : 'Label Shortcode',
|
6 |
+
image : url+'/icon.png',
|
7 |
+
onclick : function() {
|
8 |
+
create_oscitas_label();
|
9 |
+
jQuery.fancybox({
|
10 |
+
'type' : 'inline',
|
11 |
+
'title' : 'Label Shortcode',
|
12 |
+
'href' : '#oscitas-form-label',
|
13 |
+
helpers: {
|
14 |
+
title : {
|
15 |
+
type : 'over',
|
16 |
+
position:'top'
|
17 |
+
}
|
18 |
+
}
|
19 |
+
});
|
20 |
+
}
|
21 |
+
});
|
22 |
+
},
|
23 |
+
createControl : function(n, cm) {
|
24 |
+
return null;
|
25 |
+
},
|
26 |
+
getInfo : function() {
|
27 |
+
return {
|
28 |
+
longname : "Label Shortcode",
|
29 |
+
author : 'Oscitas Themes',
|
30 |
+
authorurl : 'http://www.oscitasthemes.com/',
|
31 |
+
infourl : 'http://www.oscitasthemes.com/',
|
32 |
+
version : "2.0.0"
|
33 |
+
};
|
34 |
+
}
|
35 |
+
});
|
36 |
+
tinymce.PluginManager.add('oscitaslabels', tinymce.plugins.oscitasLabels);
|
37 |
+
})();
|
38 |
+
|
39 |
+
function create_oscitas_label(){
|
40 |
+
if(jQuery('#oscitas-form-label').length){
|
41 |
+
jQuery('#oscitas-form-label').remove();
|
42 |
+
}
|
43 |
+
// creates a form to be displayed everytime the button is clicked
|
44 |
+
// you should achieve this using AJAX instead of direct html code like this
|
45 |
+
var form = jQuery('<div id="oscitas-form-label"><table id="oscitas-table" class="form-table">\
|
46 |
+
<tr>\
|
47 |
+
<th><label for="oscitas-label-type">Label Type:</label></th>\
|
48 |
+
<td><select name="type" id="oscitas-label-type">\
|
49 |
+
<option value="label-default">Default</option>\
|
50 |
+
<option value="label-primary">Primary</option>\
|
51 |
+
<option value="label-success">Success</option>\
|
52 |
+
<option value="label-info">Information</option>\
|
53 |
+
<option value="label-warning">Warning</option>\
|
54 |
+
<option value="label-danger">Danger</option>\
|
55 |
+
</select><br />\
|
56 |
+
</td>\
|
57 |
+
</tr>\
|
58 |
+
<tr>\
|
59 |
+
<th><label for="oscitas-label-content">Label Content:</label></th>\
|
60 |
+
<td><input type="text" name="label" id="oscitas-label-content" value="Label"/><br />\
|
61 |
+
</td>\
|
62 |
+
</tr>\
|
63 |
+
<tr>\
|
64 |
+
<th><label for="oscitas-label-class">Custom Class:</label></th>\
|
65 |
+
<td><input type="text" name="line" id="oscitas-label-class" value=""/><br />\
|
66 |
+
</td>\
|
67 |
+
</tr>\
|
68 |
+
</table>\
|
69 |
+
<p class="submit">\
|
70 |
+
<input type="button" id="oscitas-label-submit" class="button-primary" value="Insert Label" name="submit" />\
|
71 |
+
</p>\
|
72 |
+
</div>');
|
73 |
+
|
74 |
+
var table = form.find('table');
|
75 |
+
form.appendTo('body').hide();
|
76 |
+
|
77 |
+
|
78 |
+
|
79 |
+
|
80 |
+
// handles the click event of the submit button
|
81 |
+
form.find('#oscitas-label-submit').click(function(){
|
82 |
+
var cusclass='';
|
83 |
+
if(table.find('#oscitas-label-class').val()!=''){
|
84 |
+
cusclass= ' class="'+table.find('#oscitas-label-class').val()+'"';
|
85 |
+
}
|
86 |
+
var shortcode = '[label type="'+jQuery('#oscitas-label-type').val()+'"'+cusclass+']<br/>';
|
87 |
+
shortcode += jQuery('#oscitas-label-content').val()+'<br/>';
|
88 |
+
shortcode += '[/label]';
|
89 |
+
|
90 |
+
// inserts the shortcode into the active editor
|
91 |
+
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
92 |
+
|
93 |
+
// closes fancybox
|
94 |
+
jQuery.fancybox.close();
|
95 |
+
});
|
96 |
+
}
|
97 |
+
|
shortcode/labels/plugin_shortcode.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* * *********************************************************
|
4 |
+
* BUTTONS
|
5 |
+
* ********************************************************* */
|
6 |
+
|
7 |
+
function osc_theme_labels($params, $content = 'Label') {
|
8 |
+
extract(shortcode_atts(array(
|
9 |
+
'type' => 'label-default',
|
10 |
+
'class' => ''
|
11 |
+
), $params));
|
12 |
+
$out = '';
|
13 |
+
$content = str_replace("<br />", '', $content);
|
14 |
+
$content = str_replace("<br />\n", '', $content);
|
15 |
+
$out = '<span class="label ' . $type . ' ' . $class . '">' . do_shortcode($content) . '</span>';
|
16 |
+
return $out;
|
17 |
+
}
|
18 |
+
|
19 |
+
add_shortcode('label', 'osc_theme_labels');
|
20 |
+
|
shortcode/lists/lists_plugin.js
CHANGED
@@ -1,102 +1,115 @@
|
|
1 |
-
(function() {
|
2 |
-
tinymce.create('tinymce.plugins.oscitasLists', {
|
3 |
-
init : function(ed, url) {
|
4 |
-
ed.addButton('oscitaslists', {
|
5 |
-
title : '
|
6 |
-
image : url+'/icon.png',
|
7 |
-
onclick : function() {
|
8 |
-
|
9 |
-
|
10 |
-
'
|
11 |
-
'
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
if(table.find('#oscitas-
|
86 |
-
|
87 |
-
}
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function() {
|
2 |
+
tinymce.create('tinymce.plugins.oscitasLists', {
|
3 |
+
init : function(ed, url) {
|
4 |
+
ed.addButton('oscitaslists', {
|
5 |
+
title : 'List Group Shortcode',
|
6 |
+
image : url+'/icon.png',
|
7 |
+
onclick : function() {
|
8 |
+
create_oscitas_lists();
|
9 |
+
jQuery.fancybox({
|
10 |
+
'type' : 'inline',
|
11 |
+
'title' : 'List Group Shortcode',
|
12 |
+
'href' : '#oscitas-form-lists',
|
13 |
+
helpers: {
|
14 |
+
title : {
|
15 |
+
type : 'over',
|
16 |
+
position:'top'
|
17 |
+
}
|
18 |
+
}
|
19 |
+
});
|
20 |
+
}
|
21 |
+
});
|
22 |
+
},
|
23 |
+
createControl : function(n, cm) {
|
24 |
+
return null;
|
25 |
+
},
|
26 |
+
getInfo : function() {
|
27 |
+
return {
|
28 |
+
longname : "List Group Shortcode",
|
29 |
+
author : 'Oscitas Themes',
|
30 |
+
authorurl : 'http://www.oscitasthemes.com/',
|
31 |
+
infourl : 'http://www.oscitasthemes.com/',
|
32 |
+
version : "2.0.0"
|
33 |
+
};
|
34 |
+
}
|
35 |
+
});
|
36 |
+
tinymce.PluginManager.add('oscitaslists', tinymce.plugins.oscitasLists);
|
37 |
+
})();
|
38 |
+
|
39 |
+
function create_oscitas_lists(){
|
40 |
+
if(jQuery('#oscitas-form-lists').length){
|
41 |
+
jQuery('#oscitas-form-lists').remove();
|
42 |
+
}
|
43 |
+
// creates a form to be displayed everytime the button is clicked
|
44 |
+
// you should achieve this using AJAX instead of direct html code like this
|
45 |
+
var form = jQuery('<div id="oscitas-form-lists"><table id="oscitas-table" class="form-table">\
|
46 |
+
<tr>\
|
47 |
+
<th><label for="oscitas-type">Lists style</label></th>\
|
48 |
+
<td><select name="type" id="oscitas-type">\
|
49 |
+
<option value="">None</option>\
|
50 |
+
<option value="glyphicon-arrow-right">Arrow</option>\
|
51 |
+
<option value="glyphicon-ok">Check</option>\
|
52 |
+
<option value="glyphicon-plus">Plus</option>\
|
53 |
+
<option value="glyphicon-minus">Minus</option>\
|
54 |
+
</select><br />\
|
55 |
+
</td>\
|
56 |
+
</tr>\
|
57 |
+
<tr>\
|
58 |
+
<th><label for="oscitas-line">No of List Item</label></th>\
|
59 |
+
<td><input type="text" name="line" id="oscitas-list-item" value="3"/><br /><small>Enter a numeric value</small>\
|
60 |
+
</td>\
|
61 |
+
</tr>\
|
62 |
+
<tr>\
|
63 |
+
<th><label for="oscitas-list-class">Custom Class:</label></th>\
|
64 |
+
<td><input type="text" name="line" id="oscitas-list-class" value=""/><br />\
|
65 |
+
</td>\
|
66 |
+
</tr>\
|
67 |
+
</table>\
|
68 |
+
<p class="submit">\
|
69 |
+
<input type="button" id="oscitas-submit" class="button-primary" value="Insert List" name="submit" />\
|
70 |
+
</p>\
|
71 |
+
</div>');
|
72 |
+
|
73 |
+
var table = form.find('table');
|
74 |
+
form.appendTo('body').hide();
|
75 |
+
|
76 |
+
// handles the click event of the submit button
|
77 |
+
form.find('#oscitas-submit').click(function(){
|
78 |
+
// defines the options and their default values
|
79 |
+
// again, this is not the most elegant way to do this
|
80 |
+
// but well, this gets the job done nonetheless
|
81 |
+
var options = {
|
82 |
+
'type' : 'arrow'
|
83 |
+
},list=0,list_type;
|
84 |
+
var cusclass='';
|
85 |
+
if(table.find('#oscitas-list-class').val()!=''){
|
86 |
+
cusclass= ' class="'+table.find('#oscitas-list-class').val()+'"';
|
87 |
+
}
|
88 |
+
var shortcode = '[list'+cusclass;
|
89 |
+
var list_item=jQuery('#oscitas-list-item').val();
|
90 |
+
if(isNaN(list_item)==false){
|
91 |
+
list=list_item;
|
92 |
+
} else{
|
93 |
+
list=3;
|
94 |
+
}
|
95 |
+
|
96 |
+
|
97 |
+
shortcode += ']<br/>';
|
98 |
+
if(table.find('#oscitas-type').val()!=''){
|
99 |
+
list_type=' type="'+table.find('#oscitas-type').val()+'"';
|
100 |
+
}
|
101 |
+
else{
|
102 |
+
list_type='';
|
103 |
+
}
|
104 |
+
for(var i=1;i<=list;i++){
|
105 |
+
shortcode +='[li'+list_type+']your list content[/li]<br/>'
|
106 |
+
}
|
107 |
+
shortcode +='[/list]';
|
108 |
+
|
109 |
+
// inserts the shortcode into the active editor
|
110 |
+
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
111 |
+
|
112 |
+
jQuery.fancybox.close();
|
113 |
+
});
|
114 |
+
}
|
115 |
+
|
shortcode/lists/plugin_shortcode.php
CHANGED
@@ -1,25 +1,27 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
function osc_theme_list($params, $content = null) {
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
$content = str_replace("<br
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
$osc_class = '';
|
21 |
-
}
|
22 |
-
|
23 |
-
}
|
24 |
-
|
|
|
|
|
25 |
add_shortcode('li', 'osc_theme_li');
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function osc_theme_list($params, $content = null) {
|
4 |
+
extract(shortcode_atts(array(
|
5 |
+
'class' => ''
|
6 |
+
), $params));
|
7 |
+
$content = str_replace("]<br />", ']', $content);
|
8 |
+
$content = str_replace("]<br />\n", ']', $content);
|
9 |
+
$content = str_replace("<br />\n[", '[', $content);
|
10 |
+
return '<ul class="list-group ' . $class . '">' . do_shortcode($content) . '</ul>';
|
11 |
+
}
|
12 |
+
|
13 |
+
add_shortcode('list', 'osc_theme_list');
|
14 |
+
|
15 |
+
function osc_theme_li($params, $content = null) {
|
16 |
+
extract(shortcode_atts(array(
|
17 |
+
'type' => ''
|
18 |
+
), $params));
|
19 |
+
if ($type != '') {
|
20 |
+
$osc_class = '<span class="glyphicon ' . $type . '"></span> ';
|
21 |
+
} else {
|
22 |
+
$osc_class = '';
|
23 |
+
}
|
24 |
+
return '<li class="list-group-item">' . $osc_class . do_shortcode($content) . '</li>';
|
25 |
+
}
|
26 |
+
|
27 |
add_shortcode('li', 'osc_theme_li');
|
shortcode/notifications/notifications_plugin.js
CHANGED
@@ -1,93 +1,106 @@
|
|
1 |
-
(function() {
|
2 |
-
tinymce.create('tinymce.plugins.oscitasNotifications', {
|
3 |
-
init : function(ed, url) {
|
4 |
-
ed.addButton('oscitasnotifications', {
|
5 |
-
title : 'Notifications
|
6 |
-
image : url+'/icon.png',
|
7 |
-
onclick : function() {
|
8 |
-
|
9 |
-
|
10 |
-
'
|
11 |
-
'
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
}
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function() {
|
2 |
+
tinymce.create('tinymce.plugins.oscitasNotifications', {
|
3 |
+
init : function(ed, url) {
|
4 |
+
ed.addButton('oscitasnotifications', {
|
5 |
+
title : 'Notifications Shortcode',
|
6 |
+
image : url+'/icon.png',
|
7 |
+
onclick : function() {
|
8 |
+
create_oscitas_notification();
|
9 |
+
jQuery.fancybox({
|
10 |
+
'type' : 'inline',
|
11 |
+
'title' : 'Notifications Shortcode',
|
12 |
+
'href' : '#oscitas-form-notifications',
|
13 |
+
helpers: {
|
14 |
+
title : {
|
15 |
+
type : 'over',
|
16 |
+
position:'top'
|
17 |
+
}
|
18 |
+
}
|
19 |
+
});
|
20 |
+
}
|
21 |
+
});
|
22 |
+
},
|
23 |
+
createControl : function(n, cm) {
|
24 |
+
return null;
|
25 |
+
},
|
26 |
+
getInfo : function() {
|
27 |
+
return {
|
28 |
+
longname : "Notifications Shortcode",
|
29 |
+
author : 'Oscitas Themes',
|
30 |
+
authorurl : 'http://www.oscitasthemes.com/',
|
31 |
+
infourl : 'http://www.oscitasthemes.com/',
|
32 |
+
version : "2.0.0"
|
33 |
+
};
|
34 |
+
}
|
35 |
+
});
|
36 |
+
tinymce.PluginManager.add('oscitasnotifications', tinymce.plugins.oscitasNotifications);
|
37 |
+
})();
|
38 |
+
|
39 |
+
function create_oscitas_notification(){
|
40 |
+
if(jQuery('#oscitas-form-notifications').length){
|
41 |
+
jQuery('#oscitas-form-notifications').remove();
|
42 |
+
}
|
43 |
+
// creates a form to be displayed everytime the button is clicked
|
44 |
+
// you should achieve this using AJAX instead of direct html code like this
|
45 |
+
var form = jQuery('<div id="oscitas-form-notifications"><table id="oscitas-table" class="form-table">\
|
46 |
+
<tr>\
|
47 |
+
<th><label for="oscitas-type">VideoServer</label></th>\
|
48 |
+
<td><select name="type" id="oscitas-type">\
|
49 |
+
<option value="alert-warning">Warning</option>\
|
50 |
+
<option value="alert-success">Success</option>\
|
51 |
+
<option value="alert-info">Information</option>\
|
52 |
+
<option value="alert-danger">Danger</option>\
|
53 |
+
</select><br />\
|
54 |
+
</td>\
|
55 |
+
</tr>\
|
56 |
+
<tr>\
|
57 |
+
<th><label for="oscitas-line">Close link</label></th>\
|
58 |
+
<td><input type="checkbox" id="oscitas-close"/><br />\
|
59 |
+
</td>\
|
60 |
+
</tr>\
|
61 |
+
<tr>\
|
62 |
+
<th><label for="oscitas-note-class">Custom Class:</label></th>\
|
63 |
+
<td><input type="text" name="line" id="oscitas-note-class" value=""/><br />\
|
64 |
+
</td>\
|
65 |
+
</tr>\
|
66 |
+
</table>\
|
67 |
+
<p class="submit">\
|
68 |
+
<input type="button" id="oscitas-submit" class="button-primary" value="Insert Notification" name="submit" />\
|
69 |
+
</p>\
|
70 |
+
</div>');
|
71 |
+
|
72 |
+
var table = form.find('table');
|
73 |
+
form.appendTo('body').hide();
|
74 |
+
|
75 |
+
// handles the click event of the submit button
|
76 |
+
form.find('#oscitas-submit').click(function(){
|
77 |
+
// defines the options and their default values
|
78 |
+
// again, this is not the most elegant way to do this
|
79 |
+
// but well, this gets the job done nonetheless
|
80 |
+
var options = {
|
81 |
+
'type' : 'error'
|
82 |
+
};
|
83 |
+
var cusclass='';
|
84 |
+
if(table.find('#oscitas-note-class').val()!=''){
|
85 |
+
cusclass= ' class="'+table.find('#oscitas-note-class').val()+'"';
|
86 |
+
}
|
87 |
+
var shortcode = '[notification';
|
88 |
+
|
89 |
+
for( var index in options) {
|
90 |
+
var value = table.find('#oscitas-' + index).val();
|
91 |
+
|
92 |
+
// attaches the attribute to the shortcode only if it's different from the default value
|
93 |
+
//if ( value !== options[index] )
|
94 |
+
shortcode += ' ' + index + '="' + value + '"';
|
95 |
+
}
|
96 |
+
shortcode += ' close="'+(table.find('#oscitas-close').prop('checked')? 'true': 'false')+ '" ';
|
97 |
+
|
98 |
+
shortcode += cusclass+']Title: Lorem ipsum dolor sit amet...[/notification]';
|
99 |
+
|
100 |
+
// inserts the shortcode into the active editor
|
101 |
+
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
102 |
+
|
103 |
+
jQuery.fancybox.close();
|
104 |
+
});
|
105 |
+
}
|
106 |
+
|
shortcode/notifications/plugin_shortcode.php
CHANGED
@@ -1,23 +1,28 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function osc_theme_notification($atts, $content = null) {
|
4 |
+
extract(shortcode_atts(array(
|
5 |
+
'type' => '',
|
6 |
+
'close' => 'false',
|
7 |
+
'class' => ''
|
8 |
+
), $atts));
|
9 |
+
$type = ($close == 'true' ? $type . ' alert-dismissable' : $type);
|
10 |
+
|
11 |
+
|
12 |
+
$result = '<div class = "alert ' . $type . ' ' . $class . '">';
|
13 |
+
if ($close == 'true') {
|
14 |
+
$result .= '<button type = "button" class = "close" data-dismiss = "alert" aria-hidden = "true">×
|
15 |
+
</button>';
|
16 |
+
}
|
17 |
+
$result .= do_shortcode($content);
|
18 |
+
$result .= '</div>';
|
19 |
+
|
20 |
+
return $result;
|
21 |
+
}
|
22 |
+
|
23 |
+
add_shortcode('notification', 'osc_theme_notification');
|
24 |
+
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
|
shortcode/panel/panel_plugin.js
CHANGED
@@ -1,86 +1,99 @@
|
|
1 |
-
(function() {
|
2 |
-
tinymce.create('tinymce.plugins.oscitasPanel', {
|
3 |
-
init : function(ed, url) {
|
4 |
-
ed.addButton('oscitaspanel', {
|
5 |
-
title : 'Panel
|
6 |
-
image : url+'/icon.png',
|
7 |
-
onclick : function() {
|
8 |
-
|
9 |
-
|
10 |
-
'
|
11 |
-
'
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
<option value="panel-
|
50 |
-
<option value="panel-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
//
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
}
|
86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function() {
|
2 |
+
tinymce.create('tinymce.plugins.oscitasPanel', {
|
3 |
+
init : function(ed, url) {
|
4 |
+
ed.addButton('oscitaspanel', {
|
5 |
+
title : 'Panel Shortcode',
|
6 |
+
image : url+'/icon.png',
|
7 |
+
onclick : function() {
|
8 |
+
create_oscitas_panel();
|
9 |
+
jQuery.fancybox({
|
10 |
+
'type' : 'inline',
|
11 |
+
'title' : 'Panel Shortcode',
|
12 |
+
'href' : '#oscitas-form-panel',
|
13 |
+
helpers: {
|
14 |
+
title : {
|
15 |
+
type : 'over',
|
16 |
+
position:'top'
|
17 |
+
}
|
18 |
+
}
|
19 |
+
});
|
20 |
+
}
|
21 |
+
});
|
22 |
+
},
|
23 |
+
createControl : function(n, cm) {
|
24 |
+
return null;
|
25 |
+
},
|
26 |
+
getInfo : function() {
|
27 |
+
return {
|
28 |
+
longname : "Panel Shortcode",
|
29 |
+
author : 'Oscitas Themes',
|
30 |
+
authorurl : 'http://www.oscitasthemes.com/',
|
31 |
+
infourl : 'http://www.oscitasthemes.com/',
|
32 |
+
version : "2.0.0"
|
33 |
+
};
|
34 |
+
}
|
35 |
+
});
|
36 |
+
tinymce.PluginManager.add('oscitaspanel', tinymce.plugins.oscitasPanel);
|
37 |
+
})();
|
38 |
+
|
39 |
+
function create_oscitas_panel(){
|
40 |
+
if(jQuery('#oscitas-form-panel').length){
|
41 |
+
jQuery('#oscitas-form-panel').remove();
|
42 |
+
}
|
43 |
+
// creates a form to be displayed everytime the button is clicked
|
44 |
+
// you should achieve this using AJAX instead of direct html code like this
|
45 |
+
var form = jQuery('<div id="oscitas-form-panel"><table id="oscitas-table" class="form-table">\
|
46 |
+
<tr>\
|
47 |
+
<th><label for="oscitas-type">Style</label></th>\
|
48 |
+
<td><select name="type" id="oscitas-panel-type">\
|
49 |
+
<option value="panel-default">Simple</option>\
|
50 |
+
<option value="panel-primary">Primary</option>\
|
51 |
+
<option value="panel-warning">Warning</option>\
|
52 |
+
<option value="panel-success">Success</option>\
|
53 |
+
<option value="panel-info">Information</option>\
|
54 |
+
<option value="panel-danger">Danger</option>\
|
55 |
+
</select><br />\
|
56 |
+
</td>\
|
57 |
+
</tr>\
|
58 |
+
<tr>\
|
59 |
+
<th><label for="oscitas-line">Show footer</label></th>\
|
60 |
+
<td><input type="checkbox" id="oscitas-panel-footer"/><br />\
|
61 |
+
</td>\
|
62 |
+
</tr>\
|
63 |
+
<tr>\
|
64 |
+
<th><label for="oscitas-panel-class">Custom Class:</label></th>\
|
65 |
+
<td><input type="text" name="line" id="oscitas-panel-class" value=""/><br />\
|
66 |
+
</td>\
|
67 |
+
</tr>\
|
68 |
+
</table>\
|
69 |
+
<p class="submit">\
|
70 |
+
<input type="button" id="oscitas-submit" class="button-primary" value="Insert Panel" name="submit" />\
|
71 |
+
</p>\
|
72 |
+
</div>');
|
73 |
+
|
74 |
+
var table = form.find('table');
|
75 |
+
form.appendTo('body').hide();
|
76 |
+
|
77 |
+
// handles the click event of the submit button
|
78 |
+
form.find('#oscitas-submit').click(function(){
|
79 |
+
// defines the options and their default values
|
80 |
+
// again, this is not the most elegant way to do this
|
81 |
+
// but well, this gets the job done nonetheless
|
82 |
+
var cusclass='';
|
83 |
+
if(table.find('#oscitas-panel-class').val()!=''){
|
84 |
+
cusclass= ' class="'+table.find('#oscitas-panel-class').val()+'"';
|
85 |
+
}
|
86 |
+
var shortcode = '[panel style="'+table.find('#oscitas-panel-type').val()+ '"'+cusclass+']';
|
87 |
+
shortcode += '<br/>[panel-header]<br/>Heading goes here<br/>[/panel-header]';
|
88 |
+
//shortcode += (table.find('#oscitas-panel-header').prop('checked')? '[panel-header]<br/>Heading goes here<br/>[/panel-header]': '');
|
89 |
+
shortcode += '<br/>[panel-content]<br/>Content goes here<br/>[/panel-content]';
|
90 |
+
shortcode += (table.find('#oscitas-panel-footer').prop('checked')? '<br/>[panel-footer]<br/>Footer goes here<br/>[/panel-footer]': '');
|
91 |
+
shortcode += '<br/>[/panel]';
|
92 |
+
|
93 |
+
// inserts the shortcode into the active editor
|
94 |
+
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
95 |
+
|
96 |
+
jQuery.fancybox.close();
|
97 |
+
});
|
98 |
+
}
|
99 |
+
|
shortcode/panel/plugin_shortcode.php
CHANGED
@@ -1,44 +1,45 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
function osc_theme_panel($atts, $content = null) {
|
4 |
-
extract(shortcode_atts(array(
|
5 |
-
'
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
$
|
11 |
-
$result
|
12 |
-
$result .=
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
$result
|
22 |
-
$result .=
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
$result
|
31 |
-
$result .=
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
$result
|
40 |
-
$result .=
|
41 |
-
|
42 |
-
|
43 |
-
|
|
|
44 |
add_shortcode('panel-content', 'osc_theme_panel_content');
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function osc_theme_panel($atts, $content = null) {
|
4 |
+
extract(shortcode_atts(array(
|
5 |
+
'style' => '',
|
6 |
+
'class' => ''
|
7 |
+
), $atts));
|
8 |
+
$content = str_replace("]<br />", ']', $content);
|
9 |
+
|
10 |
+
$content = str_replace("<br />\n[", '[', $content);
|
11 |
+
$result = '<div class="panel ' . $style . ' ' . $class . '">';
|
12 |
+
$result .= do_shortcode($content);
|
13 |
+
$result .= '</div>';
|
14 |
+
|
15 |
+
return $result;
|
16 |
+
}
|
17 |
+
|
18 |
+
add_shortcode('panel', 'osc_theme_panel');
|
19 |
+
|
20 |
+
function osc_theme_panel_footer($atts, $content = null) {
|
21 |
+
$result = '<div class="panel-footer">';
|
22 |
+
$result .= do_shortcode($content);
|
23 |
+
$result .= '</div>';
|
24 |
+
return $result;
|
25 |
+
}
|
26 |
+
|
27 |
+
add_shortcode('panel-footer', 'osc_theme_panel_footer');
|
28 |
+
|
29 |
+
function osc_theme_panel_heading($atts, $content = null) {
|
30 |
+
$result = '<div class="panel-heading">';
|
31 |
+
$result .= do_shortcode($content);
|
32 |
+
$result .= '</div>';
|
33 |
+
return $result;
|
34 |
+
}
|
35 |
+
|
36 |
+
add_shortcode('panel-header', 'osc_theme_panel_heading');
|
37 |
+
|
38 |
+
function osc_theme_panel_content($atts, $content = null) {
|
39 |
+
$result = '<div class="panel-body">';
|
40 |
+
$result .= do_shortcode($content);
|
41 |
+
$result .= '</div>';
|
42 |
+
return $result;
|
43 |
+
}
|
44 |
+
|
45 |
add_shortcode('panel-content', 'osc_theme_panel_content');
|
shortcode/popover/plugin_shortcode.php
CHANGED
@@ -1,28 +1,28 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
'
|
7 |
-
'
|
8 |
-
'
|
9 |
-
'
|
10 |
-
'
|
11 |
-
'
|
12 |
-
), $params));
|
13 |
-
$out = '';
|
14 |
-
$out = '<button class="osc_popover btn ' . $size . ' ' . $type . '" data-content="' . $pop_content . '" data-placement="' . $style . '" data-toggle="popover" data-trigger="'
|
15 |
-
|
16 |
-
|
17 |
-
$out .= "
|
18 |
-
<script>
|
19 |
-
jQuery(document).ready(function(){
|
20 |
-
jQuery('.osc_popover').popover();
|
21 |
-
});
|
22 |
-
</script>
|
23 |
-
";
|
24 |
-
|
25 |
-
return $out;
|
26 |
-
}
|
27 |
-
|
28 |
add_shortcode('popover', 'osc_theme_popover');
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function osc_theme_popover($params, $content = 'Popover') {
|
4 |
+
extract(shortcode_atts(array(
|
5 |
+
'trigger' => '',
|
6 |
+
'title' => '',
|
7 |
+
'pop_content' => '',
|
8 |
+
'style' => '',
|
9 |
+
'size' => '',
|
10 |
+
'type' => '',
|
11 |
+
'class' => ''
|
12 |
+
), $params));
|
13 |
+
$out = '';
|
14 |
+
$out = '<button class="osc_popover btn ' . $size . ' ' . $type . ' ' . $class . '" data-content="' . $pop_content . '" data-placement="' . $style . '" data-toggle="popover" data-trigger="' . $trigger . '" data-container="body" type="button" data-title="' . $title . '"> ' . do_shortcode($content) . ' </button>';
|
15 |
+
|
16 |
+
|
17 |
+
$out .= "
|
18 |
+
<script>
|
19 |
+
jQuery(document).ready(function(){
|
20 |
+
jQuery('.osc_popover').popover();
|
21 |
+
});
|
22 |
+
</script>
|
23 |
+
";
|
24 |
+
|
25 |
+
return $out;
|
26 |
+
}
|
27 |
+
|
28 |
add_shortcode('popover', 'osc_theme_popover');
|
shortcode/popover/popover_plugin.js
CHANGED
@@ -1,154 +1,166 @@
|
|
1 |
-
(function() {
|
2 |
-
tinymce.create('tinymce.plugins.oscitasPopover', {
|
3 |
-
init: function(ed, url) {
|
4 |
-
ed.addButton('oscitaspopover', {
|
5 |
-
title: 'Popover Shortcode',
|
6 |
-
image: url + '/icon.png',
|
7 |
-
onclick: function() {
|
8 |
-
|
9 |
-
|
10 |
-
'
|
11 |
-
'
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
<
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
<
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
<
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
<option value="btn-
|
91 |
-
<option value="btn-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
<
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
shortcode += '" ';
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
shortcode += '
|
137 |
-
|
138 |
-
shortcode += '" ';
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
shortcode+=
|
145 |
-
shortcode+='
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function() {
|
2 |
+
tinymce.create('tinymce.plugins.oscitasPopover', {
|
3 |
+
init: function(ed, url) {
|
4 |
+
ed.addButton('oscitaspopover', {
|
5 |
+
title: 'Popover Shortcode',
|
6 |
+
image: url + '/icon.png',
|
7 |
+
onclick: function() {
|
8 |
+
create_oscitas_popover();
|
9 |
+
jQuery.fancybox({
|
10 |
+
'type' : 'inline',
|
11 |
+
'title' : 'Popover Shortcode',
|
12 |
+
'href' : '#oscitas-form-popover',
|
13 |
+
helpers: {
|
14 |
+
title : {
|
15 |
+
type : 'over',
|
16 |
+
position:'top'
|
17 |
+
}
|
18 |
+
}
|
19 |
+
});
|
20 |
+
}
|
21 |
+
});
|
22 |
+
},
|
23 |
+
createControl: function(n, cm) {
|
24 |
+
return null;
|
25 |
+
},
|
26 |
+
getInfo: function() {
|
27 |
+
return {
|
28 |
+
longname: "Popover Shortcode",
|
29 |
+
author : 'Oscitas Themes',
|
30 |
+
authorurl : 'http://www.oscitasthemes.com/',
|
31 |
+
infourl : 'http://www.oscitasthemes.com/',
|
32 |
+
version : "2.0.0"
|
33 |
+
};
|
34 |
+
}
|
35 |
+
});
|
36 |
+
tinymce.PluginManager.add('oscitaspopover', tinymce.plugins.oscitasPopover);
|
37 |
+
})();
|
38 |
+
|
39 |
+
function create_oscitas_popover(){
|
40 |
+
if(jQuery('#oscitas-form-popover').length){
|
41 |
+
jQuery('#oscitas-form-popover').remove();
|
42 |
+
}
|
43 |
+
// creates a form to be displayed everytime the button is clicked
|
44 |
+
// you should achieve this using AJAX instead of direct html code like this
|
45 |
+
var form = jQuery('<div id="oscitas-form-popover"><table id="oscitas-table" class="form-table">\
|
46 |
+
<tr>\
|
47 |
+
<th><label for="oscitas-popover-style">Popover Style:</label></th>\
|
48 |
+
<td><select name="oscitas-popover-style" id="oscitas-popover-style">\
|
49 |
+
<option value="top">Top</option>\
|
50 |
+
<option value="bottom">Bottom</option>\
|
51 |
+
<option value="left">Left</option>\
|
52 |
+
<option value="right">Right</option>\
|
53 |
+
<option value="auto">Auto</option>\
|
54 |
+
</select><br />\
|
55 |
+
</td>\
|
56 |
+
</tr>\
|
57 |
+
<tr>\
|
58 |
+
<th><label for="oscitas-popover-title">Popover Title Text:</label></th>\
|
59 |
+
<td><input type="text" name="popover-title" id="oscitas-popover-title" value="A title"/><br />\
|
60 |
+
</td>\
|
61 |
+
</tr>\
|
62 |
+
</tr>\
|
63 |
+
<tr>\
|
64 |
+
<th><label for="oscitas-popover-content">Popover Title Text:</label></th>\
|
65 |
+
<td><textarea " name="popover-content" id="oscitas-popover-content">Your Content</textarea><br />\
|
66 |
+
</td>\
|
67 |
+
</tr>\
|
68 |
+
<tr>\
|
69 |
+
<th><label for="oscitas-pbutton-trigger">Trigger Popover On:</label></th>\
|
70 |
+
<td><select name="tigger" id="oscitas-pbutton-trigger">\
|
71 |
+
<option value="click">Click</option>\
|
72 |
+
<option value="hover">Hover</option>\
|
73 |
+
</select><br />\
|
74 |
+
</td>\
|
75 |
+
</tr >\
|
76 |
+
<tr>\
|
77 |
+
<th><label for="oscitas-pbutton-size">Button Size:</label></th>\
|
78 |
+
<td><select name="size" id="oscitas-pbutton-size">\
|
79 |
+
<option value="">Default</option>\
|
80 |
+
<option value="btn-lg">Large</option>\
|
81 |
+
<option value="btn-sm">Small</option>\
|
82 |
+
<option value="btn-xs">X-Small</option>\
|
83 |
+
</select><br />\
|
84 |
+
</td>\
|
85 |
+
</tr >\
|
86 |
+
<tr>\
|
87 |
+
<th><label for="oscitas-pbutton-type">Button Type:</label></th>\
|
88 |
+
<td><select name="type" id="oscitas-pbutton-type">\
|
89 |
+
<option value="btn-default">Default</option>\
|
90 |
+
<option value="btn-primary">Primary</option>\
|
91 |
+
<option value="btn-success">Success</option>\
|
92 |
+
<option value="btn-info">Info</option>\
|
93 |
+
<option value="btn-warning">Warning</option>\
|
94 |
+
<option value="btn-danger">Danger</option>\
|
95 |
+
<option value="btn-link">Link</option>\
|
96 |
+
</select><br />\
|
97 |
+
</td>\
|
98 |
+
</tr >\
|
99 |
+
<tr>\
|
100 |
+
<th><label for="oscitas-popover-button-text">Button Text:</label></th>\
|
101 |
+
<td><input type="text" name="link-text" id="oscitas-popover-button-text" value="Popover"/><br />\
|
102 |
+
</td>\
|
103 |
+
</tr>\
|
104 |
+
<tr>\
|
105 |
+
<th><label for="oscitas-popover-class">Custom Class:</label></th>\
|
106 |
+
<td><input type="text" name="line" id="oscitas-popover-class" value=""/><br />\
|
107 |
+
</td>\
|
108 |
+
</tr>\
|
109 |
+
</table>\
|
110 |
+
<p class="submit">\
|
111 |
+
<input type="button" id="oscitas-popover-submit" class="button-primary" value="Insert Popover" name="submit" />\
|
112 |
+
</p>\
|
113 |
+
</div>');
|
114 |
+
|
115 |
+
var table = form.find('table');
|
116 |
+
form.appendTo('body').hide();
|
117 |
+
var colors = ['color', 'bgcolor'];
|
118 |
+
jQuery('#oscitas-table tr:visible:even').css('background', '#F0F0F0');
|
119 |
+
jQuery('#oscitas-table tr:visible:odd').css('background', '#DADADD');
|
120 |
+
|
121 |
+
|
122 |
+
// handles the click event of the submit button
|
123 |
+
form.find('#oscitas-popover-submit').click(function() {
|
124 |
+
// defines the options and their default values
|
125 |
+
// again, this is not the most elegant way to do this
|
126 |
+
// but well, this gets the job done nonetheless
|
127 |
+
var cusclass='';
|
128 |
+
if(table.find('#oscitas-popover-class').val()!=''){
|
129 |
+
cusclass= ' class="'+table.find('#oscitas-popover-class').val()+'"';
|
130 |
+
}
|
131 |
+
var shortcode = '[popover'+cusclass;
|
132 |
+
shortcode += ' title="' + table.find('#oscitas-popover-title').val();
|
133 |
+
|
134 |
+
shortcode += '" ';
|
135 |
+
|
136 |
+
shortcode += ' pop_content="' + table.find('#oscitas-popover-content').val();
|
137 |
+
|
138 |
+
shortcode += '" ';
|
139 |
+
shortcode += ' trigger="' + table.find('#oscitas-pbutton-trigger').val();
|
140 |
+
|
141 |
+
shortcode += '" ';
|
142 |
+
shortcode += ' style="' + table.find('#oscitas-popover-style').val();
|
143 |
+
|
144 |
+
shortcode += '" ';
|
145 |
+
shortcode += ' size="' + table.find('#oscitas-pbutton-size').val();
|
146 |
+
|
147 |
+
shortcode += '" ';
|
148 |
+
shortcode += ' type="' + table.find('#oscitas-pbutton-type').val();
|
149 |
+
|
150 |
+
shortcode += '" ';
|
151 |
+
//shortcode += ' btntag="'+table.find('#oscitas-button-type').val()+'" ';
|
152 |
+
|
153 |
+
|
154 |
+
|
155 |
+
shortcode += ']';
|
156 |
+
shortcode+= table.find('#oscitas-popover-button-text').val();
|
157 |
+
shortcode+='[/popover]';
|
158 |
+
|
159 |
+
// inserts the shortcode into the active editor
|
160 |
+
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
161 |
+
|
162 |
+
// closes fancybox
|
163 |
+
jQuery.fancybox.close();
|
164 |
+
});
|
165 |
+
}
|
166 |
+
|
shortcode/progressbar/icon.png
ADDED
Binary file
|
shortcode/progressbar/plugin_shortcode.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* * *********************************************************
|
4 |
+
* BUTTONS
|
5 |
+
* ********************************************************* */
|
6 |
+
|
7 |
+
function osc_theme_progressbar($params, $content = null) {
|
8 |
+
extract(shortcode_atts(array(
|
9 |
+
'value' => '50',
|
10 |
+
'barstyle' => '',
|
11 |
+
'bartype' => '',
|
12 |
+
'class' => ''
|
13 |
+
), $params));
|
14 |
+
$out = '<div class="progress ' . $barstyle . ' ' . $class . ' oscitas-progressbar">
|
15 |
+
<div class="progress-bar ' . $bartype . '" role="progressbar" aria-valuenow="' . $value . '" aria-valuemin="0" aria-valuemax="100" style="width: ' . $value . '%">
|
16 |
+
<span class="sr-only">' . $value . '% Complete</span>
|
17 |
+
</div>
|
18 |
+
</div>';
|
19 |
+
|
20 |
+
return $out;
|
21 |
+
}
|
22 |
+
|
23 |
+
add_shortcode('progressbar', 'osc_theme_progressbar');
|
24 |
+
|
shortcode/progressbar/progressbar_plugin.js
ADDED
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function() {
|
2 |
+
tinymce.create('tinymce.plugins.oscitasProgressbar', {
|
3 |
+
init : function(ed, url) {
|
4 |
+
ed.addButton('oscitasprogressbar', {
|
5 |
+
title : 'Progressbar Shortcode',
|
6 |
+
image : url+'/icon.png',
|
7 |
+
onclick : function() {
|
8 |
+
create_oscitas_progressbar();
|
9 |
+
jQuery.fancybox({
|
10 |
+
'autoSize':false,
|
11 |
+
'autoWidth':false,
|
12 |
+
'fitToView':false,
|
13 |
+
'height':'auto',
|
14 |
+
'topRatio':0.1,
|
15 |
+
'width':800,
|
16 |
+
'type' : 'inline',
|
17 |
+
'title' : 'Progressbar Shortcode',
|
18 |
+
'href' : '#oscitas-form-progressbar',
|
19 |
+
helpers: {
|
20 |
+
title : {
|
21 |
+
type : 'over',
|
22 |
+
position:'top'
|
23 |
+
}
|
24 |
+
}
|
25 |
+
});
|
26 |
+
jQuery('#oscitas-form-progressbar table tr:visible:even').css('background', '#F0F0F0');
|
27 |
+
jQuery('#oscitas-form-progressbar table tr:visible:odd').css('background', '#DADADD');
|
28 |
+
}
|
29 |
+
});
|
30 |
+
},
|
31 |
+
createControl : function(n, cm) {
|
32 |
+
return null;
|
33 |
+
},
|
34 |
+
getInfo : function() {
|
35 |
+
return {
|
36 |
+
longname : "Progressbar Shortcode",
|
37 |
+
author : 'Oscitas Themes',
|
38 |
+
authorurl : 'http://www.oscitasthemes.com/',
|
39 |
+
infourl : 'http://www.oscitasthemes.com/',
|
40 |
+
version : "2.0.0"
|
41 |
+
};
|
42 |
+
}
|
43 |
+
});
|
44 |
+
tinymce.PluginManager.add('oscitasprogressbar', tinymce.plugins.oscitasProgressbar);
|
45 |
+
})();
|
46 |
+
|
47 |
+
function create_oscitas_progressbar(){
|
48 |
+
if(jQuery('#oscitas-form-progressbar').length){
|
49 |
+
jQuery('#oscitas-form-progressbar').remove();
|
50 |
+
}
|
51 |
+
// creates a form to be displayed everytime the button is clicked
|
52 |
+
// you should achieve this using AJAX instead of direct html code like this
|
53 |
+
var form = jQuery('<div id="oscitas-form-progressbar"><table id="oscitas-table" class="form-table">\
|
54 |
+
<tr>\
|
55 |
+
<th><label for="oscitas-progressbar-style">Progress Bar Type:</label></th>\
|
56 |
+
<td><select name="type" id="oscitas-progressbar-style">\
|
57 |
+
<option value="">Default</option>\
|
58 |
+
<option value="progress-bar-success">Success</option>\
|
59 |
+
<option value="progress-bar-info">Information</option>\
|
60 |
+
<option value="progress-bar-warning">Warning</option>\
|
61 |
+
<option value="progress-bar-danger">Danger</option>\
|
62 |
+
</select><br />\
|
63 |
+
</td>\
|
64 |
+
</tr>\
|
65 |
+
<tr>\
|
66 |
+
<th><label for="oscitas-progressbar-progress">Progress Value:</label></th>\
|
67 |
+
<td><input type="text" name="title" id="oscitas-progressbar-progress" value="50"/><br />\
|
68 |
+
<small>Enter a numeric value between 0 to 100, Default value is 50</small>\
|
69 |
+
</td>\
|
70 |
+
</tr>\
|
71 |
+
<tr>\
|
72 |
+
<th><label for="oscitas-progressbar-stripped">Stripped Progress Bar:</label></th>\
|
73 |
+
<td>\
|
74 |
+
<input type="checkbox" id="oscitas-progressbar-stripped">\
|
75 |
+
</td>\
|
76 |
+
</tr>\
|
77 |
+
<tr id="osc_progress_animate" style="display: none;">\
|
78 |
+
<th><label for="oscitas-progressbar-animated">Animated Progress Bar:</label></th>\
|
79 |
+
<td>\
|
80 |
+
<input type="checkbox" id="oscitas-progressbar-animated">\
|
81 |
+
</td>\
|
82 |
+
</tr>\
|
83 |
+
<tr>\
|
84 |
+
<th><label for="oscitas-progressbar-class">Custom Class:</label></th>\
|
85 |
+
<td><input type="text" name="line" id="oscitas-progressbar-class" value=""/><br />\
|
86 |
+
</td>\
|
87 |
+
</tr>\
|
88 |
+
</table>\
|
89 |
+
<p class="submit">\
|
90 |
+
<input type="button" id="oscitas-progressbar-submit" class="button-primary" value="Insert Button" name="submit" />\
|
91 |
+
</p>\
|
92 |
+
</div>');
|
93 |
+
|
94 |
+
var table = form.find('table');
|
95 |
+
form.appendTo('body').hide();
|
96 |
+
jQuery('#oscitas-form-progressbar table tr:visible:even').css('background', '#F0F0F0');
|
97 |
+
jQuery('#oscitas-form-progressbar table tr:visible:odd').css('background', '#DADADD');
|
98 |
+
table.find('#oscitas-progressbar-stripped').click(function(){
|
99 |
+
if(jQuery(this).prop('checked')){
|
100 |
+
jQuery('#osc_progress_animate').show();
|
101 |
+
} else{
|
102 |
+
jQuery('#osc_progress_animate').hide();
|
103 |
+
}
|
104 |
+
jQuery('#oscitas-form-progressbar table tr:visible:even').css('background', '#F0F0F0');
|
105 |
+
jQuery('#oscitas-form-progressbar table tr:visible:odd').css('background', '#DADADD');
|
106 |
+
})
|
107 |
+
|
108 |
+
|
109 |
+
|
110 |
+
|
111 |
+
|
112 |
+
// handles the click event of the submit button
|
113 |
+
form.find('#oscitas-progressbar-submit').click(function(){
|
114 |
+
|
115 |
+
var cusclass='',type='',value='',stripped='';
|
116 |
+
if(jQuery('#oscitas-progressbar-stripped').prop('checked')){
|
117 |
+
stripped=' barstyle="progress-striped';
|
118 |
+
if(jQuery('#oscitas-progressbar-animated').prop('checked')){
|
119 |
+
stripped +=' active';
|
120 |
+
}
|
121 |
+
stripped +='"';
|
122 |
+
}
|
123 |
+
if(table.find('#oscitas-progressbar-class').val()!=''){
|
124 |
+
cusclass= ' class="'+table.find('#oscitas-progressbar-class').val()+'"';
|
125 |
+
}
|
126 |
+
if(table.find('#oscitas-progressbar-style').val()!=''){
|
127 |
+
type= ' bartype="'+table.find('#oscitas-progressbar-style').val()+'"';
|
128 |
+
}
|
129 |
+
if(table.find('#oscitas-progressbar-progress').val()!=''){
|
130 |
+
value= ' value="'+table.find('#oscitas-progressbar-progress').val()+'"';
|
131 |
+
}
|
132 |
+
var shortcode = '[progressbar'+value+cusclass+type+stripped;
|
133 |
+
|
134 |
+
shortcode += ']';
|
135 |
+
|
136 |
+
// inserts the shortcode into the active editor
|
137 |
+
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
138 |
+
|
139 |
+
// closes fancybox
|
140 |
+
jQuery.fancybox.close();
|
141 |
+
});
|
142 |
+
}
|
143 |
+
|
shortcode/tables/plugin_shortcode.php
CHANGED
@@ -1,53 +1,61 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* * *********************************************************
|
4 |
+
* TABLES
|
5 |
+
* ********************************************************* */
|
6 |
+
|
7 |
+
function osc_theme_os_table($params, $content = null) {
|
8 |
+
extract(shortcode_atts(array(
|
9 |
+
'width' => '100%',
|
10 |
+
'style' => '',
|
11 |
+
'responsive' => 'false',
|
12 |
+
'class' => ''
|
13 |
+
), $params));
|
14 |
+
$content = str_replace("]<br />", ']', $content);
|
15 |
+
$out = '<table width="' . $width . '" class="table ' . $style . ' '.$class.'">' . do_shortcode($content) . '</table>';
|
16 |
+
$out = strtolower($responsive) == 'true' ? '<div class="table-responsive">' . $out . '</div>' : $out;
|
17 |
+
return $out;
|
18 |
+
}
|
19 |
+
|
20 |
+
add_shortcode('table', 'osc_theme_os_table');
|
21 |
+
|
22 |
+
function osc_theme_os_table_head($params, $content = null) {
|
23 |
+
$out = '<thead><tr>' . do_shortcode($content) . '</tr></thead>';
|
24 |
+
return $out;
|
25 |
+
}
|
26 |
+
|
27 |
+
add_shortcode('table_head', 'osc_theme_os_table_head');
|
28 |
+
|
29 |
+
function osc_theme_os_table_body($params, $content = null) {
|
30 |
+
$out = '<tbody>' . do_shortcode($content) . '</tbody>';
|
31 |
+
return $out;
|
32 |
+
}
|
33 |
+
|
34 |
+
add_shortcode('table_body', 'osc_theme_os_table_body');
|
35 |
+
|
36 |
+
function osc_theme_os_table_row($params, $content = null) {
|
37 |
+
$out = '<tr>';
|
38 |
+
$out .= do_shortcode($content);
|
39 |
+
$out .= '</tr>';
|
40 |
+
return $out;
|
41 |
+
}
|
42 |
+
|
43 |
+
add_shortcode('table_row', 'osc_theme_os_table_row');
|
44 |
+
|
45 |
+
function osc_theme_os_row_column($params, $content = null) {
|
46 |
+
$out = '<td>';
|
47 |
+
$out .= do_shortcode($content);
|
48 |
+
$out .= '</td>';
|
49 |
+
return $out;
|
50 |
+
}
|
51 |
+
|
52 |
+
add_shortcode('row_column', 'osc_theme_os_row_column');
|
53 |
+
|
54 |
+
function osc_theme_os_th_column($params, $content = null) {
|
55 |
+
$out = '<th>';
|
56 |
+
$out .= do_shortcode($content);
|
57 |
+
$out .= '</th>';
|
58 |
+
return $out;
|
59 |
+
}
|
60 |
+
|
61 |
+
add_shortcode('th_column', 'osc_theme_os_th_column');
|
shortcode/tables/tables_plugin.js
CHANGED
@@ -1,139 +1,151 @@
|
|
1 |
-
(function() {
|
2 |
-
tinymce.create('tinymce.plugins.oscitasTables', {
|
3 |
-
init : function(ed, url) {
|
4 |
-
ed.addButton('oscitastables', {
|
5 |
-
title : '
|
6 |
-
image : url+'/icon.png',
|
7 |
-
onclick : function() {
|
8 |
-
|
9 |
-
|
10 |
-
'
|
11 |
-
'
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
<
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
<
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
<
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
</
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
</
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
//
|
107 |
-
var
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
shortcode += '[/
|
128 |
-
}
|
129 |
-
shortcode += '[/
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function() {
|
2 |
+
tinymce.create('tinymce.plugins.oscitasTables', {
|
3 |
+
init : function(ed, url) {
|
4 |
+
ed.addButton('oscitastables', {
|
5 |
+
title : 'Table Shortcode',
|
6 |
+
image : url+'/icon.png',
|
7 |
+
onclick : function() {
|
8 |
+
create_oscitas_table();
|
9 |
+
jQuery.fancybox({
|
10 |
+
'type' : 'inline',
|
11 |
+
'title' : 'Table Shortcode',
|
12 |
+
'href' : '#oscitas-form-table',
|
13 |
+
|
14 |
+
helpers: {
|
15 |
+
title : {
|
16 |
+
type : 'over',
|
17 |
+
position:'top'
|
18 |
+
}
|
19 |
+
}
|
20 |
+
});
|
21 |
+
}
|
22 |
+
});
|
23 |
+
},
|
24 |
+
createControl : function(n, cm) {
|
25 |
+
return null;
|
26 |
+
},
|
27 |
+
getInfo : function() {
|
28 |
+
return {
|
29 |
+
longname : "Table Shortcode",
|
30 |
+
author : 'Oscitas Themes',
|
31 |
+
authorurl : 'http://www.oscitasthemes.com/',
|
32 |
+
infourl : 'http://www.oscitasthemes.com/',
|
33 |
+
version : "2.0.0"
|
34 |
+
};
|
35 |
+
}
|
36 |
+
});
|
37 |
+
tinymce.PluginManager.add('oscitastables', tinymce.plugins.oscitasTables);
|
38 |
+
})();
|
39 |
+
|
40 |
+
function create_oscitas_table(){
|
41 |
+
if(jQuery('#oscitas-form-table').length){
|
42 |
+
jQuery('#oscitas-form-table').remove();
|
43 |
+
}
|
44 |
+
// creates a form to be displayed everytime the button is clicked
|
45 |
+
// you should achieve this using AJAX instead of direct html code like this
|
46 |
+
var form = jQuery('<div id="oscitas-form-table"><table id="oscitas-table" class="form-table">\
|
47 |
+
<tr>\
|
48 |
+
<th><label for="oscitas-table-width">Table Width</label></th>\
|
49 |
+
<td><input type="text" name="icontag" id="oscitas-table-width" value="100%" /><br />\
|
50 |
+
</td>\
|
51 |
+
</tr>\
|
52 |
+
<tr>\
|
53 |
+
<th><label for="oscitas-table-columns">Columns</label></th>\
|
54 |
+
<td><input type="text" name="link" id="oscitas-table-columns" value="4" /><br />\
|
55 |
+
</td>\
|
56 |
+
</tr>\
|
57 |
+
<tr>\
|
58 |
+
<th><label for="oscitas-table-rows">Rows</label></th>\
|
59 |
+
<td><input type="text" name="title" id="oscitas-table-rows" value="4" /><br />\
|
60 |
+
</td>\
|
61 |
+
</tr>\
|
62 |
+
<tr>\
|
63 |
+
<th><label for="oscitas-table-rows">Table style</label></th>\
|
64 |
+
<td>\
|
65 |
+
<select name="tablestyle" id="oscitas-table-style">\
|
66 |
+
<option value="">Simple</option>\
|
67 |
+
<option value="table-striped">Striped</option>\
|
68 |
+
<option value="table-bordered">Bordered</option>\
|
69 |
+
<option value="table-striped table-bordered">Striped + Bordered</option>\
|
70 |
+
</select>\
|
71 |
+
<br />\
|
72 |
+
</td>\
|
73 |
+
</tr>\
|
74 |
+
<tr>\
|
75 |
+
<th><label for="oscitas-table-rows">Show hover effect</label></th>\
|
76 |
+
<td>\
|
77 |
+
<input type="checkbox" id="oscitas-table-hover" value="table-hover">\
|
78 |
+
<br />\
|
79 |
+
</td>\
|
80 |
+
</tr>\
|
81 |
+
<tr>\
|
82 |
+
<th><label for="oscitas-table-rows">Responsive</label></th>\
|
83 |
+
<td>\
|
84 |
+
<input type="checkbox" id="oscitas-table-scroll" value="table-responsive">\
|
85 |
+
<br />\
|
86 |
+
</td>\
|
87 |
+
</tr>\
|
88 |
+
<tr>\
|
89 |
+
<th><label for="oscitas-table-class">Custom Class:</label></th>\
|
90 |
+
<td><input type="text" name="line" id="oscitas-table-class" value=""/><br />\
|
91 |
+
</td>\
|
92 |
+
</tr>\
|
93 |
+
</table>\
|
94 |
+
<p class="submit">\
|
95 |
+
<input type="button" id="oscitas-submit" class="button-primary" value="Insert Table" name="submit" />\
|
96 |
+
</p>\
|
97 |
+
</div>');
|
98 |
+
|
99 |
+
var table = form.find('table');
|
100 |
+
form.appendTo('body').hide();
|
101 |
+
|
102 |
+
// handles the click event of the submit button
|
103 |
+
form.find('#oscitas-submit').click(function(){
|
104 |
+
// defines the options and their default values
|
105 |
+
// again, this is not the most elegant way to do this
|
106 |
+
// but well, this gets the job done nonetheless
|
107 |
+
var cusclass='';
|
108 |
+
if(table.find('#oscitas-table-class').val()!=''){
|
109 |
+
cusclass= ' class="'+table.find('#oscitas-table-class').val()+'"';
|
110 |
+
}
|
111 |
+
var columns = table.find('#oscitas-table-columns').val();
|
112 |
+
var rows = table.find('#oscitas-table-rows').val();
|
113 |
+
var value = table.find('#oscitas-table-width').val();
|
114 |
+
var osStyle = table.find('#oscitas-table-style').val();
|
115 |
+
|
116 |
+
var osHover = table.find('#oscitas-table-hover').prop('checked') ? ' table-hover' : '' ;
|
117 |
+
var osScroll = table.find('#oscitas-table-scroll').prop('checked')? 'true': 'false';
|
118 |
+
//creating table
|
119 |
+
var shortcode = '[table ';
|
120 |
+
shortcode += 'width ="' + value + '"';
|
121 |
+
shortcode += ' style ="' + osStyle +osHover+ '"';
|
122 |
+
shortcode += ' responsive ="' +osScroll+ '"'+cusclass;
|
123 |
+
|
124 |
+
shortcode += ']<br/>[table_head]<br/>';
|
125 |
+
for (var i=1;i<=columns;i++)
|
126 |
+
{
|
127 |
+
shortcode += '[th_column]Heading-'+i+'[/th_column]<br/>';
|
128 |
+
}
|
129 |
+
shortcode += '[/table_head]<br/>[table_body]<br/>';
|
130 |
+
|
131 |
+
for (var j=1;j<=rows;j++)
|
132 |
+
{
|
133 |
+
shortcode += '[table_row]<br/>';
|
134 |
+
for (var i=1;i<=columns;i++)
|
135 |
+
{
|
136 |
+
shortcode += '[row_column]value-'+i+'[/row_column]<br/>';
|
137 |
+
}
|
138 |
+
|
139 |
+
shortcode += '[/table_row]<br/>';
|
140 |
+
}
|
141 |
+
shortcode += '[/table_body]<br/>[/table]';
|
142 |
+
|
143 |
+
|
144 |
+
// inserts the shortcode into the active editor
|
145 |
+
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
146 |
+
|
147 |
+
// closes fancybox
|
148 |
+
jQuery.fancybox.close();
|
149 |
+
});
|
150 |
+
}
|
151 |
+
|
shortcode/tabs/plugin_shortcode.php
CHANGED
@@ -1,43 +1,47 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
*
|
4 |
-
*
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
$
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
$
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* * *********************************************************
|
4 |
+
* jQuery UI Tabs
|
5 |
+
* ********************************************************* */
|
6 |
+
$_oscitas_tabs = array();
|
7 |
+
|
8 |
+
function osc_theme_tabs($params, $content = null) {
|
9 |
+
global $_oscitas_tabs;
|
10 |
+
extract(shortcode_atts(array(
|
11 |
+
'id' => count($_oscitas_tabs),
|
12 |
+
'class' => ''
|
13 |
+
), $params));
|
14 |
+
$_oscitas_tabs[$id] = array();
|
15 |
+
do_shortcode($content);
|
16 |
+
$scontent = '<ul class="nav nav-tabs " id="oscitas-tabs-' . $id . '">' . implode('', $_oscitas_tabs[$id]['tabs']) . '</ul><div
|
17 |
+
class="tab-content">' . implode('', $_oscitas_tabs[$id]['panes']) . '</div>';
|
18 |
+
if (trim($scontent) != "") {
|
19 |
+
$output = '<div class="' . $class . '">' . $scontent;
|
20 |
+
$output .= '</div>';
|
21 |
+
|
22 |
+
return $output;
|
23 |
+
} else {
|
24 |
+
return "";
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
+
add_shortcode('tabs', 'osc_theme_tabs');
|
29 |
+
|
30 |
+
function osc_theme_tab($params, $content = null) {
|
31 |
+
global $_oscitas_tabs;
|
32 |
+
extract(shortcode_atts(array(
|
33 |
+
'title' => 'title',
|
34 |
+
'active' => '',
|
35 |
+
), $params));
|
36 |
+
|
37 |
+
$index = count($_oscitas_tabs) - 1;
|
38 |
+
$pane_id = 'pane-' . $index . '-' . count($_oscitas_tabs[$index]['tabs']);
|
39 |
+
$_oscitas_tabs[$index]['tabs'][] = '<li class="' . $active . '"><a href="#' . $pane_id . '" data-toggle="tab">' . $title
|
40 |
+
. '</a></li>';
|
41 |
+
$_oscitas_tabs[$index]['panes'][] = '<div class="tab-pane ' . $active . '" id="'
|
42 |
+
. $pane_id . '">'
|
43 |
+
. do_shortcode
|
44 |
+
(trim($content)) . '</div>';
|
45 |
+
}
|
46 |
+
|
47 |
+
add_shortcode('tab', 'osc_theme_tab');
|
shortcode/tabs/tabs_plugin.js
CHANGED
@@ -1,26 +1,26 @@
|
|
1 |
-
(function() {
|
2 |
-
tinymce.create('tinymce.plugins.oscitasTabs', {
|
3 |
-
init : function(ed, url) {
|
4 |
-
ed.addButton('oscitastabs', {
|
5 |
-
title : 'Tabs
|
6 |
-
image : url+'/icon.png',
|
7 |
-
onclick : function() {
|
8 |
-
ed.selection.setContent('[tabs]<br/>[tab title="Tab number 1" active="active"]Tab 1 content goes here.[/tab]<br/>[tab title="Tab number 2"]Tab 2 content goes here.[/tab]<br/>[tab title="Tab number 3"]Tab 3 content goes here.[/tab]<br/>[tab title="Tab number 4"]Tab 4 content goes here.[/tab]<br/>[/tabs]');
|
9 |
-
}
|
10 |
-
});
|
11 |
-
},
|
12 |
-
createControl : function(n, cm) {
|
13 |
-
return null;
|
14 |
-
},
|
15 |
-
getInfo : function() {
|
16 |
-
return {
|
17 |
-
longname : "Tabs Shortcode",
|
18 |
-
author : 'Oscitas Themes',
|
19 |
-
authorurl : 'http://www.oscitasthemes.com/',
|
20 |
-
infourl : 'http://www.oscitasthemes.com/',
|
21 |
-
version : "
|
22 |
-
};
|
23 |
-
}
|
24 |
-
});
|
25 |
-
tinymce.PluginManager.add('oscitastabs', tinymce.plugins.oscitasTabs);
|
26 |
-
})();
|
1 |
+
(function() {
|
2 |
+
tinymce.create('tinymce.plugins.oscitasTabs', {
|
3 |
+
init : function(ed, url) {
|
4 |
+
ed.addButton('oscitastabs', {
|
5 |
+
title : 'Tabs Shortcode',
|
6 |
+
image : url+'/icon.png',
|
7 |
+
onclick : function() {
|
8 |
+
ed.selection.setContent('[tabs class="yourcustomclass"]<br/>[tab title="Tab number 1" active="active"]Tab 1 content goes here.[/tab]<br/>[tab title="Tab number 2"]Tab 2 content goes here.[/tab]<br/>[tab title="Tab number 3"]Tab 3 content goes here.[/tab]<br/>[tab title="Tab number 4"]Tab 4 content goes here.[/tab]<br/>[/tabs]');
|
9 |
+
}
|
10 |
+
});
|
11 |
+
},
|
12 |
+
createControl : function(n, cm) {
|
13 |
+
return null;
|
14 |
+
},
|
15 |
+
getInfo : function() {
|
16 |
+
return {
|
17 |
+
longname : "Tabs Shortcode",
|
18 |
+
author : 'Oscitas Themes',
|
19 |
+
authorurl : 'http://www.oscitasthemes.com/',
|
20 |
+
infourl : 'http://www.oscitasthemes.com/',
|
21 |
+
version : "2.0.0"
|
22 |
+
};
|
23 |
+
}
|
24 |
+
});
|
25 |
+
tinymce.PluginManager.add('oscitastabs', tinymce.plugins.oscitasTabs);
|
26 |
+
})();
|
shortcode/thumbnail/icon.png
ADDED
Binary file
|
shortcode/thumbnail/plugin_shortcode.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* * *********************************************************
|
4 |
+
* BUTTONS
|
5 |
+
* ********************************************************* */
|
6 |
+
|
7 |
+
function osc_theme_oscitasthumbnail($params, $content = 'Label') {
|
8 |
+
extract(shortcode_atts(array(
|
9 |
+
'src' => '',
|
10 |
+
'class' => '',
|
11 |
+
'link' => '',
|
12 |
+
'border'=>''
|
13 |
+
), $params));
|
14 |
+
$out = '';
|
15 |
+
$borderClass = '';
|
16 |
+
$imageBorderClass = 'img-responsive';
|
17 |
+
if ($border != '') {
|
18 |
+
$borderClass = 'img-thumbnail ';
|
19 |
+
$imageBorderClass = '';
|
20 |
+
}
|
21 |
+
|
22 |
+
$out = ' <div class="' . $borderClass.$class . '">';
|
23 |
+
|
24 |
+
//$out = ' <div class="img-thumbnail ' . $class . '">';
|
25 |
+
if ($link != '') {
|
26 |
+
$out .='<a href="' . $link . '">';
|
27 |
+
}
|
28 |
+
$out .= '<img src="' . $src . '" '.($imageBorderClass? ' class="'.$imageBorderClass.'"':'').'>';
|
29 |
+
if ($link != '') {
|
30 |
+
$out .='</a>';
|
31 |
+
}
|
32 |
+
|
33 |
+
$out .= '</div>';
|
34 |
+
return $out;
|
35 |
+
}
|
36 |
+
|
37 |
+
add_shortcode('thumbnail', 'osc_theme_oscitasthumbnail');
|
38 |
+
|
shortcode/thumbnail/thumbnail_plugin.js
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function() {
|
2 |
+
tinymce.create('tinymce.plugins.oscitasThumbnail', {
|
3 |
+
init : function(ed, url) {
|
4 |
+
ed.addButton('oscitasthumbnail', {
|
5 |
+
title : 'Responsive Image Shortcode',
|
6 |
+
image : url+'/icon.png',
|
7 |
+
onclick : function() {
|
8 |
+
create_oscitas_thumbnail();
|
9 |
+
jQuery.fancybox({
|
10 |
+
'type' : 'inline',
|
11 |
+
'title' : 'Responsive Image Shortcode',
|
12 |
+
'href' : '#oscitas-form-thumbnail',
|
13 |
+
helpers: {
|
14 |
+
title : {
|
15 |
+
type : 'over',
|
16 |
+
position:'top'
|
17 |
+
}
|
18 |
+
}
|
19 |
+
|
20 |
+
});
|
21 |
+
}
|
22 |
+
});
|
23 |
+
},
|
24 |
+
createControl : function(n, cm) {
|
25 |
+
return null;
|
26 |
+
},
|
27 |
+
getInfo : function() {
|
28 |
+
return {
|
29 |
+
longname : "Responsive Image Shortcode",
|
30 |
+
author : 'Oscitas Themes',
|
31 |
+
authorurl : 'http://www.oscitasthemes.com/',
|
32 |
+
infourl : 'http://www.oscitasthemes.com/',
|
33 |
+
version : "2.0.0"
|
34 |
+
};
|
35 |
+
}
|
36 |
+
});
|
37 |
+
tinymce.PluginManager.add('oscitasthumbnail', tinymce.plugins.oscitasThumbnail);
|
38 |
+
})();
|
39 |
+
|
40 |
+
function create_oscitas_thumbnail(){
|
41 |
+
if(jQuery('#oscitas-form-thumbnail').length){
|
42 |
+
jQuery('#oscitas-form-thumbnail').remove();
|
43 |
+
}
|
44 |
+
// creates a form to be displayed everytime the button is clicked
|
45 |
+
// you should achieve this using AJAX instead of direct html code like this
|
46 |
+
var form = jQuery('<div id="oscitas-form-thumbnail"><table id="oscitas-table" class="form-table">\
|
47 |
+
<th><label for="oscitas-label-content">Upload Image:</label></th>\
|
48 |
+
<td id="osc_thumbnail_upload"><input id="oscitas-thumbnail-src" type="hidden" name="oscitas-thumbnail-src" value="" />\
|
49 |
+
<input id="_btn" class="upload_image_button" type="button" value="Upload Image" />\
|
50 |
+
</td>\
|
51 |
+
</tr>\
|
52 |
+
<tr>\
|
53 |
+
<th><label for="oscitas-thumbnail-link">Link:</label></th>\
|
54 |
+
<td><input type="text" name="oscitas-thumbnail-link" id="oscitas-thumbnail-link" value=""/><br />\
|
55 |
+
</td>\
|
56 |
+
</tr>\
|
57 |
+
<tr>\
|
58 |
+
<th><label for="oscitas-thumbnail-link">Show Border:</label></th>\
|
59 |
+
<td><input type="checkbox" name="oscitas-thumbnail-border" id="oscitas-thumbnail-border" value="1"/><br />\
|
60 |
+
</td>\
|
61 |
+
</tr>\
|
62 |
+
<tr>\
|
63 |
+
<th><label for="oscitas-thumbnail-class">Custom Class:</label></th>\
|
64 |
+
<td><input type="text" name="line" id="oscitas-thumbnail-class" value=""/><br />\
|
65 |
+
</td>\
|
66 |
+
</tr>\
|
67 |
+
</table>\
|
68 |
+
<p class="submit">\
|
69 |
+
<input type="button" id="oscitas-thumbnail-submit" class="button-primary" value="Insert Thumbnail" name="submit" />\
|
70 |
+
</p>\
|
71 |
+
</div>');
|
72 |
+
|
73 |
+
var table = form.find('table');
|
74 |
+
form.appendTo('body').hide();
|
75 |
+
|
76 |
+
|
77 |
+
form.find('.upload_image_button').click(function() {
|
78 |
+
jQuery('.fancybox-overlay').css('z-index',100);
|
79 |
+
jQuery('html').addClass('Image');
|
80 |
+
formfield = jQuery(this).prev().attr('id');
|
81 |
+
tb_show('', 'media-upload.php?type=image&TB_iframe=true');
|
82 |
+
return false;
|
83 |
+
});
|
84 |
+
|
85 |
+
window.original_send_to_editor = window.send_to_editor;
|
86 |
+
|
87 |
+
window.send_to_editor = function(html) {
|
88 |
+
if (formfield) {
|
89 |
+
if (jQuery(html).find('img').length) {
|
90 |
+
fileurl = jQuery('img', html).attr('src');
|
91 |
+
} else if (jQuery(html).attr('src')) {
|
92 |
+
fileurl = jQuery(html).attr('src');
|
93 |
+
}
|
94 |
+
jQuery('#' + formfield).val(fileurl);
|
95 |
+
tb_remove();
|
96 |
+
form.find('#osc_thumbnail_upload img').remove();
|
97 |
+
form.find('#osc_thumbnail_upload').append('<img src="'+fileurl+'">')
|
98 |
+
jQuery('html').removeClass('Image');
|
99 |
+
|
100 |
+
} else {
|
101 |
+
window.original_send_to_editor(html);
|
102 |
+
}
|
103 |
+
|
104 |
+
};
|
105 |
+
|
106 |
+
|
107 |
+
// handles the click event of the submit button
|
108 |
+
form.find('#oscitas-thumbnail-submit').click(function(){
|
109 |
+
var shortcode='';
|
110 |
+
var cusclass='',link='', border='';
|
111 |
+
if(table.find('#oscitas-thumbnail-class').val()!=''){
|
112 |
+
cusclass= ' class="'+table.find('#oscitas-thumbnail-class').val()+'"';
|
113 |
+
}
|
114 |
+
if(table.find('#oscitas-thumbnail-class').val()!=''){
|
115 |
+
link= ' link="'+form.find('#oscitas-thumbnail-link').val()+'"';
|
116 |
+
}
|
117 |
+
|
118 |
+
if(table.find('#oscitas-thumbnail-border').is(':checked')){
|
119 |
+
border= ' border="1"';
|
120 |
+
}
|
121 |
+
|
122 |
+
if(form.find('#oscitas-thumbnail-src').val()!=''){
|
123 |
+
shortcode = '[thumbnail'+link+cusclass+border+' src="'+form.find('#oscitas-thumbnail-src').val()+'"]';
|
124 |
+
}
|
125 |
+
// inserts the shortcode into the active editor
|
126 |
+
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
127 |
+
|
128 |
+
// closes fancybox
|
129 |
+
jQuery.fancybox.close();
|
130 |
+
});
|
131 |
+
}
|
132 |
+
|
shortcode/toggles/plugin_shortcode.php
CHANGED
@@ -1,49 +1,55 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
*
|
4 |
-
*
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
}
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* * *********************************************************
|
4 |
+
* jQuery UI Accordion (toggles)
|
5 |
+
* ********************************************************* */
|
6 |
+
|
7 |
+
$_oscitas_accordion = array();
|
8 |
+
|
9 |
+
function osc_theme_toggles($params, $content = null) {
|
10 |
+
global $_oscitas_accordion;
|
11 |
+
extract(shortcode_atts(array(
|
12 |
+
'id' => count($_oscitas_accordion),
|
13 |
+
'class' => ''
|
14 |
+
), $params));
|
15 |
+
$_oscitas_accordion[$id] = array();
|
16 |
+
$scontent = do_shortcode($content);
|
17 |
+
|
18 |
+
$output = '';
|
19 |
+
if (trim($scontent) != '' || count($_oscitas_accordion[$id]['details'])) {
|
20 |
+
$scontent = isset($_oscitas_accordion[$id]['details']) && is_array($_oscitas_accordion[$id]['details']) ? implode('', $_oscitas_accordion[$id]['details']) : '';
|
21 |
+
$output .= '<div class="panel-group ' . $class . '" id="oscitas-accordion-' . $id . '">' . $scontent;
|
22 |
+
$output .= '</div>';
|
23 |
+
}
|
24 |
+
return $output;
|
25 |
+
}
|
26 |
+
|
27 |
+
add_shortcode('toggles', 'osc_theme_toggles');
|
28 |
+
|
29 |
+
function osc_theme_toggle($params, $content = null) {
|
30 |
+
global $_oscitas_accordion;
|
31 |
+
extract(shortcode_atts(array(
|
32 |
+
'title' => 'title'
|
33 |
+
), $params));
|
34 |
+
$con = do_shortcode($content);
|
35 |
+
$index = count($_oscitas_accordion) - 1;
|
36 |
+
$id = 'details-' . $index . '-' . count($_oscitas_accordion[$index]['details']);
|
37 |
+
$_oscitas_accordion[$index]['details'][] = <<<EOS
|
38 |
+
<div class="panel panel-default">
|
39 |
+
<div class="panel-heading">
|
40 |
+
<h4 class="panel-title">
|
41 |
+
<a class="accordion-toggle" data-toggle="collapse"
|
42 |
+
data-parent="#oscitas-accordion-{$index}"
|
43 |
+
href="#{$id}">
|
44 |
+
{$title}
|
45 |
+
</a>
|
46 |
+
</h4>
|
47 |
+
</div>
|
48 |
+
<div id="{$id}" class="panel-collapse collapse">
|
49 |
+
<div class="panel-body">{$con}</div>
|
50 |
+
</div>
|
51 |
+
</div>
|
52 |
+
EOS;
|
53 |
+
}
|
54 |
+
|
55 |
+
add_shortcode('toggle', 'osc_theme_toggle');
|
shortcode/toggles/toggles_plugin.js
CHANGED
@@ -1,26 +1,26 @@
|
|
1 |
-
(function() {
|
2 |
-
tinymce.create('tinymce.plugins.oscitasToggles', {
|
3 |
-
init : function(ed, url) {
|
4 |
-
ed.addButton('oscitastoggles', {
|
5 |
-
title : '
|
6 |
-
image : url+'/icon.png',
|
7 |
-
onclick : function() {
|
8 |
-
ed.selection.setContent('[toggles]<br/>[toggle title="Accordion number 1"]Toggle 1 content goes here.[/toggle]<br/>[toggle title="Accordion number 2"]Toggle 2 content goes here.[/toggle]<br/>[toggle title="Accordion number 3"]Toggle 3 content goes here.[/toggle]<br/>[toggle title="Accordion number 4"]Toggle 4 content goes here.[/toggle]<br/>[/toggles]');
|
9 |
-
}
|
10 |
-
});
|
11 |
-
},
|
12 |
-
createControl : function(n, cm) {
|
13 |
-
return null;
|
14 |
-
},
|
15 |
-
getInfo : function() {
|
16 |
-
return {
|
17 |
-
longname : "
|
18 |
-
author : 'Oscitas Themes',
|
19 |
-
authorurl : 'http://www.oscitasthemes.com/',
|
20 |
-
infourl : 'http://www.oscitasthemes.com/',
|
21 |
-
version : "
|
22 |
-
};
|
23 |
-
}
|
24 |
-
});
|
25 |
-
tinymce.PluginManager.add('oscitastoggles', tinymce.plugins.oscitasToggles);
|
26 |
-
})();
|
1 |
+
(function() {
|
2 |
+
tinymce.create('tinymce.plugins.oscitasToggles', {
|
3 |
+
init : function(ed, url) {
|
4 |
+
ed.addButton('oscitastoggles', {
|
5 |
+
title : 'Toggle Shortcode',
|
6 |
+
image : url+'/icon.png',
|
7 |
+
onclick : function() {
|
8 |
+
ed.selection.setContent('[toggles class="yourcustomclass"]<br/>[toggle title="Accordion number 1"]Toggle 1 content goes here.[/toggle]<br/>[toggle title="Accordion number 2"]Toggle 2 content goes here.[/toggle]<br/>[toggle title="Accordion number 3"]Toggle 3 content goes here.[/toggle]<br/>[toggle title="Accordion number 4"]Toggle 4 content goes here.[/toggle]<br/>[/toggles]');
|
9 |
+
}
|
10 |
+
});
|
11 |
+
},
|
12 |
+
createControl : function(n, cm) {
|
13 |
+
return null;
|
14 |
+
},
|
15 |
+
getInfo : function() {
|
16 |
+
return {
|
17 |
+
longname : "Toggle Shortcode",
|
18 |
+
author : 'Oscitas Themes',
|
19 |
+
authorurl : 'http://www.oscitasthemes.com/',
|
20 |
+
infourl : 'http://www.oscitasthemes.com/',
|
21 |
+
version : "2.0.0"
|
22 |
+
};
|
23 |
+
}
|
24 |
+
});
|
25 |
+
tinymce.PluginManager.add('oscitastoggles', tinymce.plugins.oscitasToggles);
|
26 |
+
})();
|
shortcode/tooltip/plugin_shortcode.php
CHANGED
@@ -1,35 +1,36 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/* * *********************************************************
|
4 |
-
* Tooltip
|
5 |
-
* ********************************************************* */
|
6 |
-
|
7 |
-
function osc_theme_tooltip($params, $content = 'Tooltip') {
|
8 |
-
extract(shortcode_atts(array(
|
9 |
-
'type' => '',
|
10 |
-
'link' => '',
|
11 |
-
'tooltip' => '',
|
12 |
-
'style' => ''
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
'
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* * *********************************************************
|
4 |
+
* Tooltip
|
5 |
+
* ********************************************************* */
|
6 |
+
|
7 |
+
function osc_theme_tooltip($params, $content = 'Tooltip') {
|
8 |
+
extract(shortcode_atts(array(
|
9 |
+
'type' => '',
|
10 |
+
'link' => '',
|
11 |
+
'tooltip' => '',
|
12 |
+
'style' => '',
|
13 |
+
'class' => ''
|
14 |
+
), $params));
|
15 |
+
$out = '';
|
16 |
+
if ($type == 'link') {
|
17 |
+
$out = '<a href="' . $link . '" data-placement="' . $style . '" title="' . $tooltip . '" class="osc_tooltip ' . $class . '">' . do_shortcode($content) . '</a>
|
18 |
+
';
|
19 |
+
} elseif ($type == 'button') {
|
20 |
+
$out = '<button type="button" data-toggle="tooltip" data-placement="' . $style . '" title="' . $tooltip . '" class="btn osc_tooltip ' . $class . '">' . do_shortcode($content) . '</button>';
|
21 |
+
}
|
22 |
+
|
23 |
+
|
24 |
+
$out .= "
|
25 |
+
<script>
|
26 |
+
jQuery(document).ready(function() {
|
27 |
+
jQuery('.osc_tooltip').tooltip();
|
28 |
+
});
|
29 |
+
</script>
|
30 |
+
";
|
31 |
+
|
32 |
+
return $out;
|
33 |
+
}
|
34 |
+
|
35 |
+
add_shortcode('tooltip', 'osc_theme_tooltip');
|
36 |
+
|
shortcode/tooltip/tooltip_plugin.js
CHANGED
@@ -1,132 +1,143 @@
|
|
1 |
-
(function() {
|
2 |
-
tinymce.create('tinymce.plugins.oscitasTooltip', {
|
3 |
-
init: function(ed, url) {
|
4 |
-
ed.addButton('oscitastooltip', {
|
5 |
-
title: 'Tooltip Shortcode',
|
6 |
-
image: url + '/icon.png',
|
7 |
-
onclick: function() {
|
8 |
-
|
9 |
-
|
10 |
-
'
|
11 |
-
'
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
<
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
<
|
59 |
-
<
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
<
|
72 |
-
<
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
jQuery(
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
shortcode
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
shortcode+= table.find('#oscitas-tooltip-link
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function() {
|
2 |
+
tinymce.create('tinymce.plugins.oscitasTooltip', {
|
3 |
+
init: function(ed, url) {
|
4 |
+
ed.addButton('oscitastooltip', {
|
5 |
+
title: 'Tooltip Shortcode',
|
6 |
+
image: url + '/icon.png',
|
7 |
+
onclick: function() {
|
8 |
+
create_oscitas_tooltip();
|
9 |
+
jQuery.fancybox({
|
10 |
+
'type' : 'inline',
|
11 |
+
'title' : 'Tooltip Shortcode',
|
12 |
+
'href' : '#oscitas-form-tooltip',
|
13 |
+
helpers: {
|
14 |
+
title : {
|
15 |
+
type : 'over',
|
16 |
+
position:'top'
|
17 |
+
}
|
18 |
+
}
|
19 |
+
});
|
20 |
+
}
|
21 |
+
});
|
22 |
+
},
|
23 |
+
createControl: function(n, cm) {
|
24 |
+
return null;
|
25 |
+
},
|
26 |
+
getInfo: function() {
|
27 |
+
return {
|
28 |
+
longname: "Tooltip Shortcode",
|
29 |
+
author : 'Oscitas Themes',
|
30 |
+
authorurl : 'http://www.oscitasthemes.com/',
|
31 |
+
infourl : 'http://www.oscitasthemes.com/',
|
32 |
+
version : "2.0.0"
|
33 |
+
};
|
34 |
+
}
|
35 |
+
});
|
36 |
+
tinymce.PluginManager.add('oscitastooltip', tinymce.plugins.oscitasTooltip);
|
37 |
+
})();
|
38 |
+
|
39 |
+
function create_oscitas_tooltip(){
|
40 |
+
if(jQuery('#oscitas-form-tooltip').length){
|
41 |
+
jQuery('#oscitas-form-tooltip').remove();
|
42 |
+
}
|
43 |
+
// creates a form to be displayed everytime the button is clicked
|
44 |
+
// you should achieve this using AJAX instead of direct html code like this
|
45 |
+
var form = jQuery('<div id="oscitas-form-tooltip"><table id="oscitas-table" class="form-table">\
|
46 |
+
<tr>\
|
47 |
+
<th><label for="oscitas-tooltip-style">Tooltip Style:</label></th>\
|
48 |
+
<td><select name="type" id="oscitas-tooltip-style">\
|
49 |
+
<option value="top">Top</option>\
|
50 |
+
<option value="bottom">Bottom</option>\
|
51 |
+
<option value="left">Left</option>\
|
52 |
+
<option value="right">Right</option>\
|
53 |
+
<option value="auto">Auto</option>\
|
54 |
+
</select><br />\
|
55 |
+
</td>\
|
56 |
+
</tr>\
|
57 |
+
<tr>\
|
58 |
+
<th><label for="oscitas-tooltip-text">Tooltip Text:</label></th>\
|
59 |
+
<td><input type="text" name="tooltip-text" id="oscitas-tooltip-text" value="Tooltip"/><br />\
|
60 |
+
</td>\
|
61 |
+
</tr>\
|
62 |
+
<tr>\
|
63 |
+
<th><label for="oscitas-tooltip-type">Type:</label></th>\
|
64 |
+
<td><select name="type" id="oscitas-tooltip-type">\
|
65 |
+
<option value="link">Link</option>\
|
66 |
+
<option value="button">Button</option>\
|
67 |
+
</select><br />\
|
68 |
+
</td>\
|
69 |
+
</tr >\
|
70 |
+
<tr id="oscitas-tooltip-link-tr">\
|
71 |
+
<th><label for="oscitas-tooltip-link">Link:</label></th>\
|
72 |
+
<td><input type="text" name="tooltip-link" id="oscitas-tooltip-link" value="#"/><br />\
|
73 |
+
</td>\
|
74 |
+
</tr>\
|
75 |
+
<tr>\
|
76 |
+
<th><label for="oscitas-tooltip-link-text">Value:</label></th>\
|
77 |
+
<td><input type="text" name="link-text" id="oscitas-tooltip-link-text" value="Hover Me"/><br />\
|
78 |
+
</td>\
|
79 |
+
</tr>\
|
80 |
+
<tr>\
|
81 |
+
<th><label for="oscitas-tooltip-class">Custom Class:</label></th>\
|
82 |
+
<td><input type="text" name="line" id="oscitas-tooltip-class" value=""/><br />\
|
83 |
+
</td>\
|
84 |
+
</tr>\
|
85 |
+
</table>\
|
86 |
+
<p class="submit">\
|
87 |
+
<input type="button" id="oscitas-tooltip-submit" class="button-primary" value="Insert Tooltip" name="submit" />\
|
88 |
+
</p>\
|
89 |
+
</div>');
|
90 |
+
|
91 |
+
var table = form.find('table');
|
92 |
+
form.appendTo('body').hide();
|
93 |
+
var colors = ['color', 'bgcolor'];
|
94 |
+
|
95 |
+
form.find('#oscitas-tooltip-type').change(function(){
|
96 |
+
if(jQuery(this).val()=='link'){
|
97 |
+
table.find('#oscitas-tooltip-link-tr').show();
|
98 |
+
table.find('#oscitas-tooltip-link').val('#');
|
99 |
+
} else{
|
100 |
+
table.find('#oscitas-tooltip-link-tr').hide();
|
101 |
+
table.find('#oscitas-tooltip-link').val('');
|
102 |
+
|
103 |
+
}
|
104 |
+
jQuery('#oscitas-table tr:visible:even').css('background', '#F0F0F0');
|
105 |
+
jQuery('#oscitas-table tr:visible:odd').css('background', '#DADADD');
|
106 |
+
})
|
107 |
+
|
108 |
+
// handles the click event of the submit button
|
109 |
+
form.find('#oscitas-tooltip-submit').click(function() {
|
110 |
+
// defines the options and their default values
|
111 |
+
// again, this is not the most elegant way to do this
|
112 |
+
// but well, this gets the job done nonetheless
|
113 |
+
var cusclass='';
|
114 |
+
if(table.find('#oscitas-tooltip-class').val()!=''){
|
115 |
+
cusclass= ' class="'+table.find('#oscitas-tooltip-class').val()+'"';
|
116 |
+
}
|
117 |
+
var shortcode = '[tooltip';
|
118 |
+
shortcode += ' type="' + table.find('#oscitas-tooltip-type').val();
|
119 |
+
|
120 |
+
shortcode += '" ';
|
121 |
+
|
122 |
+
shortcode += ' link="' + table.find('#oscitas-tooltip-link').val();
|
123 |
+
|
124 |
+
shortcode += '" ';
|
125 |
+
shortcode += ' tooltip="' + table.find('#oscitas-tooltip-text').val();
|
126 |
+
|
127 |
+
shortcode += '" ';
|
128 |
+
shortcode += ' style="' + table.find('#oscitas-tooltip-style').val();
|
129 |
+
|
130 |
+
shortcode += cusclass;
|
131 |
+
|
132 |
+
shortcode += ']';
|
133 |
+
shortcode+= table.find('#oscitas-tooltip-link-text').val();
|
134 |
+
shortcode+='[/tooltip]';
|
135 |
+
|
136 |
+
// inserts the shortcode into the active editor
|
137 |
+
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
138 |
+
|
139 |
+
// closes fancybox
|
140 |
+
jQuery.fancybox.close();
|
141 |
+
});
|
142 |
+
}
|
143 |
+
|
shortcode/well/icon.png
ADDED
Binary file
|
shortcode/well/plugin_shortcode.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* * *********************************************************
|
4 |
+
* BUTTONS
|
5 |
+
* ********************************************************* */
|
6 |
+
|
7 |
+
function osc_theme_well($params, $content = 'Label') {
|
8 |
+
extract(shortcode_atts(array(
|
9 |
+
'type' => '',
|
10 |
+
'class' => ''
|
11 |
+
), $params));
|
12 |
+
$out = '';
|
13 |
+
$content = str_replace('<br class="osc" />', '', $content);
|
14 |
+
$content = str_replace('<br class="osc" />\n', '', $content);
|
15 |
+
$out = '<div class="well ' . $type . ' ' . $class . '">' . do_shortcode($content) . '</div>';
|
16 |
+
return $out;
|
17 |
+
}
|
18 |
+
|
19 |
+
add_shortcode('well', 'osc_theme_well');
|
20 |
+
|
shortcode/well/well_plugin.js
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function() {
|
2 |
+
tinymce.create('tinymce.plugins.oscitasWell', {
|
3 |
+
init : function(ed, url) {
|
4 |
+
ed.addButton('oscitaswell', {
|
5 |
+
title : 'Well Shortcode',
|
6 |
+
image : url+'/icon.png',
|
7 |
+
onclick : function() {
|
8 |
+
create_oscitas_well();
|
9 |
+
jQuery.fancybox({
|
10 |
+
'type' : 'inline',
|
11 |
+
'title' : 'Well Shortcode',
|
12 |
+
'href' : '#oscitas-form-well',
|
13 |
+
helpers: {
|
14 |
+
title : {
|
15 |
+
type : 'over',
|
16 |
+
position:'top'
|
17 |
+
}
|
18 |
+
}
|
19 |
+
});
|
20 |
+
}
|
21 |
+
});
|
22 |
+
},
|
23 |
+
createControl : function(n, cm) {
|
24 |
+
return null;
|
25 |
+
},
|
26 |
+
getInfo : function() {
|
27 |
+
return {
|
28 |
+
longname : "Well Shortcode",
|
29 |
+
author : 'Oscitas Themes',
|
30 |
+
authorurl : 'http://www.oscitasthemes.com/',
|
31 |
+
infourl : 'http://www.oscitasthemes.com/',
|
32 |
+
version : "2.0.0"
|
33 |
+
};
|
34 |
+
}
|
35 |
+
});
|
36 |
+
tinymce.PluginManager.add('oscitaswell', tinymce.plugins.oscitasWell);
|
37 |
+
})();
|
38 |
+
|
39 |
+
function create_oscitas_well(){
|
40 |
+
if(jQuery('#oscitas-form-well').length){
|
41 |
+
jQuery('#oscitas-form-well').remove();
|
42 |
+
}
|
43 |
+
// creates a form to be displayed everytime the button is clicked
|
44 |
+
// you should achieve this using AJAX instead of direct html code like this
|
45 |
+
var form = jQuery('<div id="oscitas-form-well"><table id="oscitas-table" class="form-table">\
|
46 |
+
<tr>\
|
47 |
+
<th><label for="oscitas-well-type">Well Type:</label></th>\
|
48 |
+
<td><select name="type" id="oscitas-well-type">\
|
49 |
+
<option value="">Default</option>\
|
50 |
+
<option value="well-lg">Large</option>\
|
51 |
+
<option value="well-sm">Small</option>\
|
52 |
+
</select><br />\
|
53 |
+
</td>\
|
54 |
+
</tr>\
|
55 |
+
<tr>\
|
56 |
+
<th><label for="oscitas-well-content">Well Content:</label></th>\
|
57 |
+
<td><textarea name="well" id="oscitas-well-content">Your Content</textarea><br />\
|
58 |
+
</td>\
|
59 |
+
</tr>\
|
60 |
+
<tr>\
|
61 |
+
<th><label for="oscitas-well-class">Custom Class:</label></th>\
|
62 |
+
<td><input type="text" name="line" id="oscitas-well-class" value=""/><br />\
|
63 |
+
</td>\
|
64 |
+
</tr>\
|
65 |
+
</table>\
|
66 |
+
<p class="submit">\
|
67 |
+
<input type="button" id="oscitas-well-submit" class="button-primary" value="Insert Well" name="submit" />\
|
68 |
+
</p>\
|
69 |
+
</div>');
|
70 |
+
|
71 |
+
var table = form.find('table');
|
72 |
+
form.appendTo('body').hide();
|
73 |
+
|
74 |
+
|
75 |
+
|
76 |
+
|
77 |
+
// handles the click event of the submit button
|
78 |
+
form.find('#oscitas-well-submit').click(function(){
|
79 |
+
var cusclass='';
|
80 |
+
if(table.find('#oscitas-well-class').val()!=''){
|
81 |
+
cusclass= ' class="'+table.find('#oscitas-well-class').val()+'"';
|
82 |
+
}
|
83 |
+
var shortcode = '[well type="'+jQuery('#oscitas-well-type').val()+'"'+cusclass+']<br class="osc"/>';
|
84 |
+
shortcode += jQuery('#oscitas-well-content').val()+'<br class="osc"/>';
|
85 |
+
shortcode += '[/well]';
|
86 |
+
|
87 |
+
// inserts the shortcode into the active editor
|
88 |
+
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
89 |
+
|
90 |
+
// closes fancybox
|
91 |
+
jQuery.fancybox.close();
|
92 |
+
});
|
93 |
+
}
|
94 |
+
|
shortcode/wpcolumns/plugin_shortcode.php
CHANGED
@@ -1,495 +1,542 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/* * *********************************************************
|
4 |
-
* Row
|
5 |
-
* ********************************************************* */
|
6 |
-
|
7 |
-
function osc_theme_row($params, $content = null) {
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
$
|
12 |
-
|
13 |
-
$
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
'
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
$
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
$
|
48 |
-
|
49 |
-
|
50 |
-
}
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
$
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
}
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
$
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
}
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
$
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* * *********************************************************
|
4 |
+
* Row
|
5 |
+
* ********************************************************* */
|
6 |
+
|
7 |
+
function osc_theme_row($params, $content = null) {
|
8 |
+
extract(shortcode_atts(array(
|
9 |
+
'class' => ''
|
10 |
+
), $params));
|
11 |
+
$result = '<div class="row ' . $class . '">';
|
12 |
+
//echo '<textarea>'.$content.'</textarea>';
|
13 |
+
$content = str_replace("]<br />", ']', $content);
|
14 |
+
$content = str_replace("<br />\n[", '[', $content);
|
15 |
+
$result .= do_shortcode($content);
|
16 |
+
$result .= '</div>';
|
17 |
+
|
18 |
+
return force_balance_tags($result);
|
19 |
+
}
|
20 |
+
|
21 |
+
add_shortcode('row', 'osc_theme_row');
|
22 |
+
/* * *********************************************************
|
23 |
+
* TWO
|
24 |
+
* ********************************************************* */
|
25 |
+
|
26 |
+
function osc_theme_column_shortcode($params, $content = null) {
|
27 |
+
extract(shortcode_atts(array(
|
28 |
+
'md' => '',
|
29 |
+
'sm' => '',
|
30 |
+
'xs' => '',
|
31 |
+
'lg' => '',
|
32 |
+
'mdoff' => '',
|
33 |
+
'smoff' => '',
|
34 |
+
'xsoff' => '',
|
35 |
+
'lgoff' => '',
|
36 |
+
'off'=>''
|
37 |
+
), $params));
|
38 |
+
$arr = array('md', 'xs', 'sm');
|
39 |
+
$classes = array();
|
40 |
+
foreach ($arr as $k => $aa) {
|
41 |
+
if (${$aa} == 12 || ${$aa} == '') {
|
42 |
+
$classes[] = '';
|
43 |
+
} else {
|
44 |
+
$classes[] = 'col-' . $aa . '-' . ${$aa};
|
45 |
+
}
|
46 |
+
}
|
47 |
+
$arr2 = array('mdoff', 'smoff', 'xsoff', 'lgoff');
|
48 |
+
foreach ($arr2 as $k => $aa) {
|
49 |
+
$nn = str_replace('off', '', $aa);
|
50 |
+
if (${$aa} == 0 || ${$aa} == '') {
|
51 |
+
$classes[] = '';
|
52 |
+
} else {
|
53 |
+
$classes[] = 'col-' . $nn . '-offset-' . ${$aa};
|
54 |
+
}
|
55 |
+
}
|
56 |
+
if ($off != '') {
|
57 |
+
$classes[] = 'col-lg-offset-'.$off;
|
58 |
+
}
|
59 |
+
$result = '<div class="col-lg-' . $lg . ' ' . implode(' ', $classes) . '">';
|
60 |
+
$result .= do_shortcode($content);
|
61 |
+
$result .= '</div>';
|
62 |
+
|
63 |
+
return force_balance_tags($result);
|
64 |
+
}
|
65 |
+
|
66 |
+
add_shortcode('column', 'osc_theme_column_shortcode');
|
67 |
+
|
68 |
+
|
69 |
+
function osc_theme_one_half($params, $content = null) {
|
70 |
+
extract(shortcode_atts(array(
|
71 |
+
'md' => '',
|
72 |
+
'sm' => '',
|
73 |
+
'xs' => '',
|
74 |
+
'off' => ''
|
75 |
+
), $params));
|
76 |
+
if ($md == 12) {
|
77 |
+
$mds = '';
|
78 |
+
} else {
|
79 |
+
$mds = 'col-md-' . $md;
|
80 |
+
}
|
81 |
+
if ($sm == 12) {
|
82 |
+
$sms = '';
|
83 |
+
} else {
|
84 |
+
$sms = 'col-sm-' . $sm;
|
85 |
+
}
|
86 |
+
if ($xs == 12) {
|
87 |
+
$xss = '';
|
88 |
+
} else {
|
89 |
+
$xss = 'col-xs-' . $xs;
|
90 |
+
}
|
91 |
+
$result = '<div class="col-lg-6 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-half">';
|
92 |
+
$result .= do_shortcode($content);
|
93 |
+
$result .= '</div>';
|
94 |
+
|
95 |
+
return force_balance_tags($result);
|
96 |
+
}
|
97 |
+
|
98 |
+
add_shortcode('one_half', 'osc_theme_one_half');
|
99 |
+
|
100 |
+
function osc_theme_one_half_last($params, $content = null) {
|
101 |
+
extract(shortcode_atts(array(
|
102 |
+
'md' => '',
|
103 |
+
'sm' => '',
|
104 |
+
'xs' => '',
|
105 |
+
'off' => ''
|
106 |
+
), $params));
|
107 |
+
if ($md == 12) {
|
108 |
+
$mds = '';
|
109 |
+
} else {
|
110 |
+
$mds = 'col-md-' . $md;
|
111 |
+
}
|
112 |
+
if ($sm == 12) {
|
113 |
+
$sms = '';
|
114 |
+
} else {
|
115 |
+
$sms = 'col-sm-' . $sm;
|
116 |
+
}
|
117 |
+
if ($xs == 12) {
|
118 |
+
$xss = '';
|
119 |
+
} else {
|
120 |
+
$xss = 'col-xs-' . $xs;
|
121 |
+
}
|
122 |
+
$result = '<div class="col-lg-6 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-half-last">';
|
123 |
+
$result .= do_shortcode($content);
|
124 |
+
$result .= '</div>';
|
125 |
+
|
126 |
+
return force_balance_tags($result);
|
127 |
+
}
|
128 |
+
|
129 |
+
add_shortcode('one_half_last', 'osc_theme_one_half_last');
|
130 |
+
|
131 |
+
/* * *********************************************************
|
132 |
+
* THIRD
|
133 |
+
* ********************************************************* */
|
134 |
+
|
135 |
+
function osc_theme_one_third($params, $content = null) {
|
136 |
+
extract(shortcode_atts(array(
|
137 |
+
'md' => '',
|
138 |
+
'sm' => '',
|
139 |
+
'xs' => '',
|
140 |
+
'off' => ''
|
141 |
+
), $params));
|
142 |
+
if ($md == 12) {
|
143 |
+
$mds = '';
|
144 |
+
} else {
|
145 |
+
$mds = 'col-md-' . $md;
|
146 |
+
}
|
147 |
+
if ($sm == 12) {
|
148 |
+
$sms = '';
|
149 |
+
} else {
|
150 |
+
$sms = 'col-sm-' . $sm;
|
151 |
+
}
|
152 |
+
if ($xs == 12) {
|
153 |
+
$xss = '';
|
154 |
+
} else {
|
155 |
+
$xss = 'col-xs-' . $xs;
|
156 |
+
}
|
157 |
+
$result = '<div class="sc-column col-lg-4 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' ">'; //one-third
|
158 |
+
$result .= do_shortcode($content);
|
159 |
+
$result .= '</div>';
|
160 |
+
|
161 |
+
return force_balance_tags($result);
|
162 |
+
}
|
163 |
+
|
164 |
+
add_shortcode('one_third', 'osc_theme_one_third');
|
165 |
+
|
166 |
+
function osc_theme_one_third_last($params, $content = null) {
|
167 |
+
extract(shortcode_atts(array(
|
168 |
+
'md' => '',
|
169 |
+
'sm' => '',
|
170 |
+
'xs' => '',
|
171 |
+
'off' => ''
|
172 |
+
), $params));
|
173 |
+
if ($md == 12) {
|
174 |
+
$mds = '';
|
175 |
+
} else {
|
176 |
+
$mds = 'col-md-' . $md;
|
177 |
+
}
|
178 |
+
if ($sm == 12) {
|
179 |
+
$sms = '';
|
180 |
+
} else {
|
181 |
+
$sms = 'col-sm-' . $sm;
|
182 |
+
}
|
183 |
+
if ($xs == 12) {
|
184 |
+
$xss = '';
|
185 |
+
} else {
|
186 |
+
$xss = 'col-xs-' . $xs;
|
187 |
+
}
|
188 |
+
$result = '<div class="col-lg-4 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' column-last">'; // one-third-last
|
189 |
+
$result .= do_shortcode($content);
|
190 |
+
$result .= '</div>';
|
191 |
+
|
192 |
+
return force_balance_tags($result);
|
193 |
+
}
|
194 |
+
|
195 |
+
add_shortcode('one_third_last', 'osc_theme_one_third_last');
|
196 |
+
|
197 |
+
function osc_theme_two_third($params, $content = null) {
|
198 |
+
extract(shortcode_atts(array(
|
199 |
+
'md' => '',
|
200 |
+
'sm' => '',
|
201 |
+
'xs' => '',
|
202 |
+
'off' => ''
|
203 |
+
), $params));
|
204 |
+
if ($md == 12) {
|
205 |
+
$mds = '';
|
206 |
+
} else {
|
207 |
+
$mds = 'col-md-' . $md;
|
208 |
+
}
|
209 |
+
if ($sm == 12) {
|
210 |
+
$sms = '';
|
211 |
+
} else {
|
212 |
+
$sms = 'col-sm-' . $sm;
|
213 |
+
}
|
214 |
+
if ($xs == 12) {
|
215 |
+
$xss = '';
|
216 |
+
} else {
|
217 |
+
$xss = 'col-xs-' . $xs;
|
218 |
+
}
|
219 |
+
$result = '<div class=" col-lg-8 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' ">'; //two-third
|
220 |
+
$result .= do_shortcode($content);
|
221 |
+
$result .= '</div>';
|
222 |
+
|
223 |
+
return force_balance_tags($result);
|
224 |
+
}
|
225 |
+
|
226 |
+
add_shortcode('two_third', 'osc_theme_two_third');
|
227 |
+
|
228 |
+
function osc_theme_two_third_last($params, $content = null) {
|
229 |
+
extract(shortcode_atts(array(
|
230 |
+
'md' => '',
|
231 |
+
'sm' => '',
|
232 |
+
'xs' => '',
|
233 |
+
'off' => ''
|
234 |
+
), $params));
|
235 |
+
if ($md == 12) {
|
236 |
+
$mds = '';
|
237 |
+
} else {
|
238 |
+
$mds = 'col-md-' . $md;
|
239 |
+
}
|
240 |
+
if ($sm == 12) {
|
241 |
+
$sms = '';
|
242 |
+
} else {
|
243 |
+
$sms = 'col-sm-' . $sm;
|
244 |
+
}
|
245 |
+
if ($xs == 12) {
|
246 |
+
$xss = '';
|
247 |
+
} else {
|
248 |
+
$xss = 'col-xs-' . $xs;
|
249 |
+
}
|
250 |
+
$result = '<div class="col-lg-8 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' column-last ">'; //two-third-last
|
251 |
+
$result .= do_shortcode($content);
|
252 |
+
$result .= '</div>';
|
253 |
+
|
254 |
+
return force_balance_tags($result);
|
255 |
+
}
|
256 |
+
|
257 |
+
add_shortcode('two_third_last', 'osc_theme_two_third_last');
|
258 |
+
|
259 |
+
/* * *********************************************************
|
260 |
+
* FOURTH
|
261 |
+
* ********************************************************* */
|
262 |
+
|
263 |
+
function osc_theme_one_fourth($params, $content = null) {
|
264 |
+
extract(shortcode_atts(array(
|
265 |
+
'md' => '',
|
266 |
+
'sm' => '',
|
267 |
+
'xs' => '',
|
268 |
+
'off' => ''
|
269 |
+
), $params));
|
270 |
+
if ($md == 12) {
|
271 |
+
$mds = '';
|
272 |
+
} else {
|
273 |
+
$mds = 'col-md-' . $md;
|
274 |
+
}
|
275 |
+
if ($sm == 12) {
|
276 |
+
$sms = '';
|
277 |
+
} else {
|
278 |
+
$sms = 'col-sm-' . $sm;
|
279 |
+
}
|
280 |
+
if ($xs == 12) {
|
281 |
+
$xss = '';
|
282 |
+
} else {
|
283 |
+
$xss = 'col-xs-' . $xs;
|
284 |
+
}
|
285 |
+
$result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-fourth">';
|
286 |
+
$result .= do_shortcode($content);
|
287 |
+
$result .= '</div>';
|
288 |
+
|
289 |
+
return force_balance_tags($result);
|
290 |
+
}
|
291 |
+
|
292 |
+
add_shortcode('one_fourth', 'osc_theme_one_fourth');
|
293 |
+
|
294 |
+
function osc_theme_one_fourth_last($params, $content = null) {
|
295 |
+
extract(shortcode_atts(array(
|
296 |
+
'md' => '',
|
297 |
+
'sm' => '',
|
298 |
+
'xs' => '',
|
299 |
+
'off' => ''
|
300 |
+
), $params));
|
301 |
+
if ($md == 12) {
|
302 |
+
$mds = '';
|
303 |
+
} else {
|
304 |
+
$mds = 'col-md-' . $md;
|
305 |
+
}
|
306 |
+
if ($sm == 12) {
|
307 |
+
$sms = '';
|
308 |
+
} else {
|
309 |
+
$sms = 'col-sm-' . $sm;
|
310 |
+
}
|
311 |
+
if ($xs == 12) {
|
312 |
+
$xss = '';
|
313 |
+
} else {
|
314 |
+
$xss = 'col-xs-' . $xs;
|
315 |
+
}
|
316 |
+
$result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' column-last one-fourth-last">';
|
317 |
+
$result .= do_shortcode($content);
|
318 |
+
$result .= '</div>';
|
319 |
+
|
320 |
+
return force_balance_tags($result);
|
321 |
+
}
|
322 |
+
|
323 |
+
add_shortcode('one_fourth_last', 'osc_theme_one_fourth_last');
|
324 |
+
|
325 |
+
function osc_theme_three_fourth($params, $content = null) {
|
326 |
+
extract(shortcode_atts(array(
|
327 |
+
'md' => '',
|
328 |
+
'sm' => '',
|
329 |
+
'xs' => '',
|
330 |
+
'off' => ''
|
331 |
+
), $params));
|
332 |
+
if ($md == 12) {
|
333 |
+
$mds = '';
|
334 |
+
} else {
|
335 |
+
$mds = 'col-md-' . $md;
|
336 |
+
}
|
337 |
+
if ($sm == 12) {
|
338 |
+
$sms = '';
|
339 |
+
} else {
|
340 |
+
$sms = 'col-sm-' . $sm;
|
341 |
+
}
|
342 |
+
if ($xs == 12) {
|
343 |
+
$xss = '';
|
344 |
+
} else {
|
345 |
+
$xss = 'col-xs-' . $xs;
|
346 |
+
}
|
347 |
+
$result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' three-fourth">';
|
348 |
+
$result .= do_shortcode($content);
|
349 |
+
$result .= '</div>';
|
350 |
+
|
351 |
+
return force_balance_tags($result);
|
352 |
+
}
|
353 |
+
|
354 |
+
add_shortcode('three_fourth', 'osc_theme_three_fourth');
|
355 |
+
|
356 |
+
function osc_theme_three_fourth_last($params, $content = null) {
|
357 |
+
extract(shortcode_atts(array(
|
358 |
+
'md' => '',
|
359 |
+
'sm' => '',
|
360 |
+
'xs' => '',
|
361 |
+
'off' => ''
|
362 |
+
), $params));
|
363 |
+
if ($md == 12) {
|
364 |
+
$mds = '';
|
365 |
+
} else {
|
366 |
+
$mds = 'col-md-' . $md;
|
367 |
+
}
|
368 |
+
if ($sm == 12) {
|
369 |
+
$sms = '';
|
370 |
+
} else {
|
371 |
+
$sms = 'col-sm-' . $sm;
|
372 |
+
}
|
373 |
+
if ($xs == 12) {
|
374 |
+
$xss = '';
|
375 |
+
} else {
|
376 |
+
$xss = 'col-xs-' . $xs;
|
377 |
+
}
|
378 |
+
$result = '<div class="col-lg-6 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' column-last three-fourth-last">';
|
379 |
+
$result .= do_shortcode($content);
|
380 |
+
$result .= '</div>';
|
381 |
+
|
382 |
+
return force_balance_tags($result);
|
383 |
+
}
|
384 |
+
|
385 |
+
add_shortcode('three_fourth_last', 'osc_theme_three_fourth_last');
|
386 |
+
|
387 |
+
function osc_theme_one_fourth_second($params, $content = null) {
|
388 |
+
extract(shortcode_atts(array(
|
389 |
+
'md' => '',
|
390 |
+
'sm' => '',
|
391 |
+
'xs' => '',
|
392 |
+
'off' => ''
|
393 |
+
), $params));
|
394 |
+
if ($md == 12) {
|
395 |
+
$mds = '';
|
396 |
+
} else {
|
397 |
+
$mds = 'col-md-' . $md;
|
398 |
+
}
|
399 |
+
if ($sm == 12) {
|
400 |
+
$sms = '';
|
401 |
+
} else {
|
402 |
+
$sms = 'col-sm-' . $sm;
|
403 |
+
}
|
404 |
+
if ($xs == 12) {
|
405 |
+
$xss = '';
|
406 |
+
} else {
|
407 |
+
$xss = 'col-xs-' . $xs;
|
408 |
+
}
|
409 |
+
$result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-fourth-second">';
|
410 |
+
$result .= do_shortcode($content);
|
411 |
+
$result .= '</div>';
|
412 |
+
|
413 |
+
return force_balance_tags($result);
|
414 |
+
}
|
415 |
+
|
416 |
+
add_shortcode('one_fourth_second', 'osc_theme_one_fourth_second');
|
417 |
+
|
418 |
+
function osc_theme_one_fourth_third($params, $content = null) {
|
419 |
+
extract(shortcode_atts(array(
|
420 |
+
'md' => '',
|
421 |
+
'sm' => '',
|
422 |
+
'xs' => '',
|
423 |
+
'off' => ''
|
424 |
+
), $params));
|
425 |
+
if ($md == 12) {
|
426 |
+
$mds = '';
|
427 |
+
} else {
|
428 |
+
$mds = 'col-md-' . $md;
|
429 |
+
}
|
430 |
+
if ($sm == 12) {
|
431 |
+
$sms = '';
|
432 |
+
} else {
|
433 |
+
$sms = 'col-sm-' . $sm;
|
434 |
+
}
|
435 |
+
if ($xs == 12) {
|
436 |
+
$xss = '';
|
437 |
+
} else {
|
438 |
+
$xss = 'col-xs-' . $xs;
|
439 |
+
}
|
440 |
+
|
441 |
+
$result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-fourth-third">';
|
442 |
+
$result .= do_shortcode($content);
|
443 |
+
$result .= '</div>';
|
444 |
+
|
445 |
+
return force_balance_tags($result);
|
446 |
+
}
|
447 |
+
|
448 |
+
add_shortcode('one_fourth_third', 'osc_theme_one_fourth_third');
|
449 |
+
|
450 |
+
function osc_theme_one_half_second($params, $content = null) {
|
451 |
+
extract(shortcode_atts(array(
|
452 |
+
'md' => '',
|
453 |
+
'sm' => '',
|
454 |
+
'xs' => '',
|
455 |
+
'off' => ''
|
456 |
+
), $params));
|
457 |
+
if ($md == 12) {
|
458 |
+
$mds = '';
|
459 |
+
} else {
|
460 |
+
$mds = 'col-md-' . $md;
|
461 |
+
}
|
462 |
+
if ($sm == 12) {
|
463 |
+
$sms = '';
|
464 |
+
} else {
|
465 |
+
$sms = 'col-sm-' . $sm;
|
466 |
+
}
|
467 |
+
if ($xs == 12) {
|
468 |
+
$xss = '';
|
469 |
+
} else {
|
470 |
+
$xss = 'col-xs-' . $xs;
|
471 |
+
}
|
472 |
+
$result = '<div class="col-lg-6 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-half-second">';
|
473 |
+
$result .= do_shortcode($content);
|
474 |
+
$result .= '</div>';
|
475 |
+
|
476 |
+
return force_balance_tags($result);
|
477 |
+
}
|
478 |
+
|
479 |
+
add_shortcode('one_half_second', 'osc_theme_one_half_second');
|
480 |
+
|
481 |
+
function osc_theme_one_third_second($params, $content = null) {
|
482 |
+
extract(shortcode_atts(array(
|
483 |
+
'md' => '',
|
484 |
+
'sm' => '',
|
485 |
+
'xs' => '',
|
486 |
+
'off' => ''
|
487 |
+
), $params));
|
488 |
+
if ($md == 12) {
|
489 |
+
$mds = '';
|
490 |
+
} else {
|
491 |
+
$mds = 'col-md-' . $md;
|
492 |
+
}
|
493 |
+
if ($sm == 12) {
|
494 |
+
$sms = '';
|
495 |
+
} else {
|
496 |
+
$sms = 'col-sm-' . $sm;
|
497 |
+
}
|
498 |
+
if ($xs == 12) {
|
499 |
+
$xss = '';
|
500 |
+
} else {
|
501 |
+
$xss = 'col-xs-' . $xs;
|
502 |
+
}
|
503 |
+
$result = '<div class="col-lg-4 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-third-second">';
|
504 |
+
$result .= do_shortcode($content);
|
505 |
+
$result .= '</div>';
|
506 |
+
|
507 |
+
return force_balance_tags($result);
|
508 |
+
}
|
509 |
+
|
510 |
+
add_shortcode('one_third_second', 'osc_theme_one_third_second');
|
511 |
+
|
512 |
+
function osc_theme_one_column($params, $content = null) {
|
513 |
+
extract(shortcode_atts(array(
|
514 |
+
'md' => '',
|
515 |
+
'sm' => '',
|
516 |
+
'xs' => '',
|
517 |
+
'off' => ''
|
518 |
+
), $params));
|
519 |
+
if ($md == 12) {
|
520 |
+
$mds = '';
|
521 |
+
} else {
|
522 |
+
$mds = 'col-md-' . $md;
|
523 |
+
}
|
524 |
+
if ($sm == 12) {
|
525 |
+
$sms = '';
|
526 |
+
} else {
|
527 |
+
$sms = 'col-sm-' . $sm;
|
528 |
+
}
|
529 |
+
if ($xs == 12) {
|
530 |
+
$xss = '';
|
531 |
+
} else {
|
532 |
+
$xss = 'col-xs-' . $xs;
|
533 |
+
}
|
534 |
+
$result = '<div class="col-lg-12 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-column">';
|
535 |
+
$result .= do_shortcode($content);
|
536 |
+
$result .= '</div>';
|
537 |
+
|
538 |
+
return force_balance_tags($result);
|
539 |
+
}
|
540 |
+
|
541 |
+
add_shortcode('one_column', 'osc_theme_one_column');
|
542 |
+
|
shortcode/wpcolumns/wpcolumns_plugin.js
CHANGED
@@ -1,211 +1,324 @@
|
|
1 |
-
(function() {
|
2 |
-
tinymce.create('tinymce.plugins.oscitasWpcolumns', {
|
3 |
-
init : function(ed, url) {
|
4 |
-
ed.addButton('oscitaswpcolumns', {
|
5 |
-
title : 'Columns
|
6 |
-
image : url+'/icon.png',
|
7 |
-
onclick : function() {
|
8 |
-
|
9 |
-
|
10 |
-
'
|
11 |
-
'
|
12 |
-
'
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
<option value="
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
</
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
}
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
'
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
}
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
}
|
211 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function() {
|
2 |
+
tinymce.create('tinymce.plugins.oscitasWpcolumns', {
|
3 |
+
init : function(ed, url) {
|
4 |
+
ed.addButton('oscitaswpcolumns', {
|
5 |
+
title : 'Grid Columns Shortcode',
|
6 |
+
image : url+'/icon.png',
|
7 |
+
onclick : function() {
|
8 |
+
create_oscitas_wpcolumns();
|
9 |
+
jQuery.fancybox({
|
10 |
+
'autoSize':false,
|
11 |
+
'autoWidth':false,
|
12 |
+
'fitToView':false,
|
13 |
+
'width':1094,
|
14 |
+
'type' : 'inline',
|
15 |
+
'title' : 'Grid Columns Shortcode',
|
16 |
+
'height': 'auto',
|
17 |
+
'href' : '#oscitas-form-wpcolumns',
|
18 |
+
helpers: {
|
19 |
+
title : {
|
20 |
+
type : 'over',
|
21 |
+
position:'top'
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
});
|
26 |
+
}
|
27 |
+
});
|
28 |
+
},
|
29 |
+
createControl : function(n, cm) {
|
30 |
+
return null;
|
31 |
+
},
|
32 |
+
getInfo : function() {
|
33 |
+
return {
|
34 |
+
longname : "Grid Columns Shortcode",
|
35 |
+
author : 'Oscitas Themes',
|
36 |
+
authorurl : 'http://www.oscitasthemes.com/',
|
37 |
+
infourl : 'http://www.oscitasthemes.com/',
|
38 |
+
version : "2.0.0"
|
39 |
+
};
|
40 |
+
}
|
41 |
+
});
|
42 |
+
tinymce.PluginManager.add('oscitaswpcolumns', tinymce.plugins.oscitasWpcolumns);
|
43 |
+
})();
|
44 |
+
|
45 |
+
function create_oscitas_wpcolumns(){
|
46 |
+
if(jQuery('#oscitas-form-wpcolumns').length){
|
47 |
+
jQuery('#oscitas-form-wpcolumns').remove();
|
48 |
+
}
|
49 |
+
// creates a form to be displayed everytime the button is clicked
|
50 |
+
// you should achieve this using AJAX instead of direct html code like this
|
51 |
+
var form = jQuery('<div id="oscitas-form-wpcolumns">\
|
52 |
+
<table id="oscitas-table" class="form-table">\
|
53 |
+
<tr>\
|
54 |
+
<th><label for="oscitas-no-of-wpcolumns">Number of columns</label></th>\
|
55 |
+
<td><select name="type" id="oscitas-no-of-wpcolumns">\
|
56 |
+
<option value="1" selected="selected">One column</option>\
|
57 |
+
<option value="2">Two columns</option>\
|
58 |
+
<option value="3">Three columns</option>\
|
59 |
+
<option value="4">Four columns</option>\
|
60 |
+
</select><br />\
|
61 |
+
</td>\
|
62 |
+
</tr>\
|
63 |
+
<tr id="wptwo" style="display:none;">\
|
64 |
+
<th><label for="oscitas-two-columns">2 column division</label></th>\
|
65 |
+
<td><select name="type" id="oscitas-two-columns" class="osc-change-col">\
|
66 |
+
<option value="6$6">1/2-1/2</option>\
|
67 |
+
<option value="4$8">1/3-2/3</option>\
|
68 |
+
<option value="8$3">2/3-1/3</option>\
|
69 |
+
<option value="3$9">1/4-3/4</option>\
|
70 |
+
<option value="9$3">3/4-1/4</option>\
|
71 |
+
</select> For Large Screen<br />\
|
72 |
+
</td>\
|
73 |
+
</tr>\
|
74 |
+
<tr id="wpthree" style="display:none;">\
|
75 |
+
<th><label for="oscitas-three-columns">3 column division</label></th>\
|
76 |
+
<td><select name="type" id="oscitas-three-columns" class="osc-change-col">\
|
77 |
+
<option value="4$4$4">1/3-1/3-1/3</option>\
|
78 |
+
<option value="3$6$3">1/4-2/4-1/4</option>\
|
79 |
+
<option value="3$3$6">1/4-1/4-2/4</option>\
|
80 |
+
<option value="6$3$3">2/4-1/4-1/4</option>\
|
81 |
+
</select> For Large Screen<br />\
|
82 |
+
</tr>\
|
83 |
+
<tr id="">\
|
84 |
+
<th><label for="append_column_table">Column Specification</label></th>\
|
85 |
+
<td id="append_column_table"></td>\
|
86 |
+
</tr>\
|
87 |
+
<tr>\
|
88 |
+
<th><label for="oscitas-column-class">Custom Class:</label></th>\
|
89 |
+
<td><input type="text" name="line" id="oscitas-column-class" value=""/>\
|
90 |
+
</td>\
|
91 |
+
</tr>\
|
92 |
+
</table>\
|
93 |
+
<p class="submit">\
|
94 |
+
<input type="button" id="oscitas-submit-wp_column" class="button-primary" value="Insert Columns" name="submit" />\
|
95 |
+
</p>\
|
96 |
+
</div>');
|
97 |
+
var table = form.find('table');
|
98 |
+
form.appendTo('body').hide();
|
99 |
+
|
100 |
+
function show_table(){
|
101 |
+
|
102 |
+
var ele='',e=0,sm,smoff,md,mdoff,lg,lgoff,xs,xsoff,sel,val=0,selcol;
|
103 |
+
var col= form.find('#oscitas-no-of-wpcolumns').val();
|
104 |
+
ele = '<i>You can select different column style for different screens such as medium (), small(e.g < 768px), x-small(e.g < 480px)</i><br/>';
|
105 |
+
|
106 |
+
var option={
|
107 |
+
'lg':'Large Screen',
|
108 |
+
'md': 'Medium Screen',
|
109 |
+
'sm': 'Small Screen',
|
110 |
+
'xs':'X-small Screen'
|
111 |
+
}
|
112 |
+
ele+= '<table id="appended" class="tb_multiple_column"><thead><tr><th>Screen</th>';
|
113 |
+
|
114 |
+
for(i=1;i<=col;i++){
|
115 |
+
ele+='<th><div class="head_division">Column</div><div class="head_division right">Offset</div></th>';
|
116 |
+
}
|
117 |
+
ele+= '</tr></thead><tbody class="column_tbody">';
|
118 |
+
jQuery.each(option,function(index,val){
|
119 |
+
ele+='<tr><th class="column_td_first">'+val+'</th>';
|
120 |
+
for(var i=1;i<=col;i++){
|
121 |
+
sm='<select name="'+index+'['+i+']" id="'+index+i+'">';
|
122 |
+
for( e=1;e<=12;e++){
|
123 |
+
if(index=='lg'){
|
124 |
+
|
125 |
+
selcol=12/col;
|
126 |
+
if(e==selcol){
|
127 |
+
sel='selected=selected'
|
128 |
+
}
|
129 |
+
else{
|
130 |
+
sel='';
|
131 |
+
}
|
132 |
+
} else{
|
133 |
+
if(e==12){
|
134 |
+
sel='selected=selected'
|
135 |
+
}
|
136 |
+
else{
|
137 |
+
sel='';
|
138 |
+
}
|
139 |
+
}
|
140 |
+
sm+='<option value="'+e+'" '+sel+'>'+e+'</option>';
|
141 |
+
}
|
142 |
+
sm+='</select>';
|
143 |
+
smoff='<select name="'+index+'off['+i+']" id="'+index+'off'+i+'">';
|
144 |
+
for( e=0;e<12;e++){
|
145 |
+
|
146 |
+
smoff+='<option value="'+e+'">'+e+'</option>';
|
147 |
+
}
|
148 |
+
smoff+='</select>';
|
149 |
+
|
150 |
+
|
151 |
+
ele+='<td><div class="head_division">'+sm+'</div><div class="head_division right">'+smoff+'</div></td>';
|
152 |
+
}
|
153 |
+
ele+='</tr>';
|
154 |
+
});
|
155 |
+
ele +='</tbody></table>';
|
156 |
+
table.find('#append_column_table').html(ele);
|
157 |
+
|
158 |
+
jQuery("#oscitas-table tr:not(#appended tr):visible:even").css('background-color', '#DADADD');
|
159 |
+
jQuery("#oscitas-table tr:not(#appended tr):visible:odd").css('background-color', '#F0F0F0');
|
160 |
+
}
|
161 |
+
function chnage_col_value(){
|
162 |
+
|
163 |
+
var col= form.find('#oscitas-no-of-wpcolumns').val(),str,arr=[],i=0;
|
164 |
+
if(col==2 || col==3){
|
165 |
+
if(col==2){
|
166 |
+
str=form.find('#oscitas-two-columns').val();
|
167 |
+
} else if(col==3){
|
168 |
+
str=form.find('#oscitas-three-columns').val();
|
169 |
+
}
|
170 |
+
arr=str.split('$');
|
171 |
+
jQuery.each(arr,function(index,val){
|
172 |
+
i=parseInt(index)+1;
|
173 |
+
jQuery('#lg'+i).val(val);
|
174 |
+
})
|
175 |
+
|
176 |
+
}
|
177 |
+
}
|
178 |
+
|
179 |
+
show_table();
|
180 |
+
|
181 |
+
jQuery('#oscitas-no-of-wpcolumns').change(function(){
|
182 |
+
var noOfColumns = jQuery(this).val();
|
183 |
+
if(2 == noOfColumns){
|
184 |
+
|
185 |
+
jQuery("#wpthree").hide();
|
186 |
+
jQuery("#wptwo").show();
|
187 |
+
}
|
188 |
+
else if(3 == noOfColumns){
|
189 |
+
jQuery("#wptwo").hide();
|
190 |
+
jQuery("#wpthree").show();
|
191 |
+
}
|
192 |
+
else{
|
193 |
+
jQuery("#wptwo").hide();
|
194 |
+
jQuery("#wpthree").hide();
|
195 |
+
|
196 |
+
}
|
197 |
+
show_table();
|
198 |
+
chnage_col_value();
|
199 |
+
|
200 |
+
|
201 |
+
});
|
202 |
+
form.find('.osc-change-col').change(function(){
|
203 |
+
chnage_col_value();
|
204 |
+
})
|
205 |
+
var arr={
|
206 |
+
1:'lg',
|
207 |
+
2: 'md',
|
208 |
+
3:'sm',
|
209 |
+
4:'xs'
|
210 |
+
};
|
211 |
+
|
212 |
+
|
213 |
+
|
214 |
+
var value1 =0,valueoff=0,lastSel,previous;
|
215 |
+
jQuery.each(arr,function(i,valuenum){
|
216 |
+
jQuery.each(arr,function(tt,index){
|
217 |
+
|
218 |
+
jQuery('#'+index+i).live('focus',function(){
|
219 |
+
previous = this.value;
|
220 |
+
}).live('change',function(){
|
221 |
+
value1= parseInt(jQuery(this).val());
|
222 |
+
valueoff =parseInt(jQuery('#'+index+'off'+i).val());
|
223 |
+
value1=value1+valueoff;
|
224 |
+
if(value1<=12){
|
225 |
+
previous = this.value;
|
226 |
+
}
|
227 |
+
else{
|
228 |
+
jQuery('#'+index+i).val(previous);
|
229 |
+
alert('Can\'t Change, exceeds the limit');
|
230 |
+
}
|
231 |
+
});
|
232 |
+
|
233 |
+
jQuery('#'+index+'off'+i).live('focus',function(){
|
234 |
+
previous = this.value;
|
235 |
+
}).live('change',function(){
|
236 |
+
value1= parseInt(jQuery(this).val());
|
237 |
+
valueoff = parseInt(jQuery('#'+index+i).val());
|
238 |
+
value1=value1+valueoff;
|
239 |
+
if(value1<=12){
|
240 |
+
previous = this.value;
|
241 |
+
}
|
242 |
+
else{
|
243 |
+
jQuery('#'+index+'off'+i).val(previous);
|
244 |
+
alert('Can\'t Change, exceeds the limit');
|
245 |
+
}
|
246 |
+
})
|
247 |
+
})
|
248 |
+
});
|
249 |
+
|
250 |
+
// handles the click event of the submit button
|
251 |
+
form.find('#oscitas-submit-wp_column').click(function(){
|
252 |
+
// defines the options and their default values
|
253 |
+
// again, this is not the most elegant way to do this
|
254 |
+
// but well, this gets the job done nonetheless
|
255 |
+
var a_md=[],a_sm=[],a_xs=[],a_lg=[],j=0,a_md_off=[],a_sm_off=[],a_xs_off=[],a_lg_off=[],sm='',md='',xs='',smoff='',mdoff='',xsoff='',lgoff='';
|
256 |
+
|
257 |
+
var noOfColumns = jQuery('#oscitas-no-of-wpcolumns').val();
|
258 |
+
var shortcode = '';
|
259 |
+
var cusclass='';
|
260 |
+
if(table.find('#oscitas-column-class').val()!=''){
|
261 |
+
cusclass= ' class="'+table.find('#oscitas-column-class').val()+'"';
|
262 |
+
}
|
263 |
+
shortcode ='[row'+cusclass+']';
|
264 |
+
for(var i=1;i<=parseInt(noOfColumns);i++){
|
265 |
+
|
266 |
+
a_md[i] = jQuery('#md'+i).val();
|
267 |
+
a_sm[i] = jQuery('#sm'+i).val();
|
268 |
+
a_xs[i] = jQuery('#xs'+i).val();
|
269 |
+
a_lg[i] = jQuery('#lg'+i).val();
|
270 |
+
a_md_off[i] = jQuery('#mdoff'+i).val();
|
271 |
+
a_sm_off[i] = jQuery('#smoff'+i).val();
|
272 |
+
a_xs_off[i] = jQuery('#xsoff'+i).val();
|
273 |
+
a_lg_off[i] = jQuery('#lgoff'+i).val();
|
274 |
+
|
275 |
+
if(a_md[i]!=12){
|
276 |
+
md=' md="'+a_md[i]+'"';
|
277 |
+
} else{
|
278 |
+
md='';
|
279 |
+
}
|
280 |
+
if(a_sm[i]!=12){
|
281 |
+
sm=' sm="'+a_sm[i]+'"';
|
282 |
+
} else{
|
283 |
+
sm='';
|
284 |
+
}
|
285 |
+
if(a_xs[i]!=12){
|
286 |
+
xs=' xs="'+a_xs[i]+'"';
|
287 |
+
} else{
|
288 |
+
xs='';
|
289 |
+
}
|
290 |
+
if(a_md_off[i]!=0){
|
291 |
+
mdoff=' mdoff="'+a_md_off[i]+'"';
|
292 |
+
}
|
293 |
+
else{
|
294 |
+
mdoff='';
|
295 |
+
}
|
296 |
+
if(a_sm_off[i]!=0){
|
297 |
+
smoff=' smoff="'+a_sm_off[i]+'"';
|
298 |
+
}
|
299 |
+
else{
|
300 |
+
smoff='';
|
301 |
+
}
|
302 |
+
if(a_xs_off[i]!=0){
|
303 |
+
xsoff=' xsoff="'+a_xs_off[i]+'"';
|
304 |
+
}
|
305 |
+
else{
|
306 |
+
xsoff='';
|
307 |
+
}
|
308 |
+
if(a_lg_off[i]!=0){
|
309 |
+
lgoff=' lgoff="'+a_lg_off[i]+'"';
|
310 |
+
}
|
311 |
+
else{
|
312 |
+
lgoff='';
|
313 |
+
}
|
314 |
+
shortcode += '<br/>[column lg="'+a_lg[i]+'"'+md+sm+xs+mdoff+smoff+xsoff+lgoff+' ]<br/>text<br/>[/column]';
|
315 |
+
}
|
316 |
+
|
317 |
+
shortcode += '<br/>[/row]';
|
318 |
+
// inserts the shortcode into the active editor
|
319 |
+
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
320 |
+
// closes Thickbox
|
321 |
+
jQuery.fancybox.close();
|
322 |
+
});
|
323 |
+
}
|
324 |
+
|
styles/bootstrap-icon.css
CHANGED
@@ -816,7 +816,7 @@
|
|
816 |
content: "\1f527";
|
817 |
}
|
818 |
|
819 |
-
#icon_show{
|
820 |
margin-left: 8px;
|
821 |
background: none repeat scroll 0 0 #DBDBDB;
|
822 |
border: 1px solid #B3B3CD;
|
@@ -824,22 +824,22 @@
|
|
824 |
}
|
825 |
|
826 |
|
827 |
-
|
828 |
background: none repeat scroll 0 0 #F4F4F4;
|
829 |
border: 1px solid #AAAAAA;
|
830 |
height: 22px;
|
831 |
width: 190px;
|
832 |
}
|
833 |
-
|
834 |
border: 3px double #A6A6A6;
|
835 |
display: inline-block;
|
836 |
margin-top: 5px;
|
837 |
}
|
838 |
-
|
839 |
text-align: center;
|
840 |
padding:4px;
|
841 |
}
|
842 |
-
|
843 |
background: #F4F4F4;
|
844 |
border: 1px solid #A6A6A6;
|
845 |
padding:3px !important;
|
816 |
content: "\1f527";
|
817 |
}
|
818 |
|
819 |
+
#icon_show, #icon_show_button{
|
820 |
margin-left: 8px;
|
821 |
background: none repeat scroll 0 0 #DBDBDB;
|
822 |
border: 1px solid #B3B3CD;
|
824 |
}
|
825 |
|
826 |
|
827 |
+
.oscitas-icon-div {
|
828 |
background: none repeat scroll 0 0 #F4F4F4;
|
829 |
border: 1px solid #AAAAAA;
|
830 |
height: 22px;
|
831 |
width: 190px;
|
832 |
}
|
833 |
+
.oscitas-icon {
|
834 |
border: 3px double #A6A6A6;
|
835 |
display: inline-block;
|
836 |
margin-top: 5px;
|
837 |
}
|
838 |
+
.oscitas-icon ul li{
|
839 |
text-align: center;
|
840 |
padding:4px;
|
841 |
}
|
842 |
+
.oscitas-icon ul li:hover, .osc_icon_selected, .osc_icon_selected_button{
|
843 |
background: #F4F4F4;
|
844 |
border: 1px solid #A6A6A6;
|
845 |
padding:3px !important;
|
styles/bootstrap_admin.css
CHANGED
@@ -17,12 +17,19 @@
|
|
17 |
border-left: 1px solid #AAAAAE;
|
18 |
min-width: 150px;
|
19 |
}
|
|
|
|
|
20 |
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
22 |
border: 1px solid #C1BCC4 !important;
|
23 |
}
|
24 |
|
25 |
-
.tb_multiple_column thead tr {
|
26 |
background: none repeat scroll 0 0 #C2C2C2 !important;
|
27 |
}
|
28 |
|
@@ -36,4 +43,62 @@
|
|
36 |
|
37 |
.tb_multiple_column td {
|
38 |
border: 0 none;
|
39 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
border-left: 1px solid #AAAAAE;
|
18 |
min-width: 150px;
|
19 |
}
|
20 |
+
#oscitas-form-dropdown .form-table td {
|
21 |
+
min-width: 184px;
|
22 |
|
23 |
+
}
|
24 |
+
.tb_multiple_column th{
|
25 |
+
min-width: 150px;
|
26 |
+
border: 0 none;
|
27 |
+
}
|
28 |
+
.tb_multiple_column,.tb_multiple_column_upper {
|
29 |
border: 1px solid #C1BCC4 !important;
|
30 |
}
|
31 |
|
32 |
+
.tb_multiple_column thead tr, .tb_multiple_column_upper thead tr{
|
33 |
background: none repeat scroll 0 0 #C2C2C2 !important;
|
34 |
}
|
35 |
|
43 |
|
44 |
.tb_multiple_column td {
|
45 |
border: 0 none;
|
46 |
+
}
|
47 |
+
.tb_multiple_column_upper tbody tr:nth-child(even) {
|
48 |
+
background: none repeat scroll 0 0 #D7D7D7 !important;
|
49 |
+
}
|
50 |
+
|
51 |
+
.tb_multiple_column_upper tbody tr:nth-child(odd) {
|
52 |
+
background: none repeat scroll 0 0 #ECECEC !important;
|
53 |
+
}
|
54 |
+
|
55 |
+
.tb_multiple_column_upper td {
|
56 |
+
border: 0 none;
|
57 |
+
}
|
58 |
+
#osc_thumbnail_upload img, #osc_image_upload img{
|
59 |
+
float: right;
|
60 |
+
height: 70px;
|
61 |
+
width: 70px;
|
62 |
+
}
|
63 |
+
.tb_multiple_column #oscitas-append-dropdownitem {
|
64 |
+
display: block;
|
65 |
+
float: left;
|
66 |
+
height: 146px;
|
67 |
+
overflow-x: hidden;
|
68 |
+
overflow-y: auto;
|
69 |
+
width: 100%;
|
70 |
+
}
|
71 |
+
#oscitas-form-dropdown .tb_multiple_column thead tr {
|
72 |
+
display: block;
|
73 |
+
}
|
74 |
+
#oscitas-form-dropdown .tb_multiple_column thead tr {
|
75 |
+
position: relative;
|
76 |
+
background: none repeat scroll 0 0 #D6D6D6 !important;
|
77 |
+
}
|
78 |
+
#oscitas-form-dropdown .tb_multiple_column thead tr th {
|
79 |
+
background: none repeat scroll 0 0 #C2C2C2 !important;
|
80 |
+
}
|
81 |
+
|
82 |
+
|
83 |
+
.head_division {
|
84 |
+
|
85 |
+
float: left;
|
86 |
+
font-size: 10px;
|
87 |
+
|
88 |
+
|
89 |
+
text-align: left;
|
90 |
+
width: 45%;
|
91 |
+
|
92 |
+
}
|
93 |
+
.head_division.right{
|
94 |
+
text-align: right;
|
95 |
+
}
|
96 |
+
|
97 |
+
|
98 |
+
/*#oscitas-form-wpcolumns .tb_multiple_column thead th{
|
99 |
+
text-align: center;
|
100 |
+
padding: 10px 0 0 0;
|
101 |
+
}*/
|
102 |
+
/*#oscitas-form-wpcolumns .tb_multiple_column tbody td{
|
103 |
+
padding: 10px 0;
|
104 |
+
}*/
|
styles/ebs-setting.css
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#ebs_setting{
|
2 |
+
margin: 20px 0 0 0;
|
3 |
+
}
|
4 |
+
.ebs_page_settings {
|
5 |
+
margin-top: 20px;
|
6 |
+
}
|
7 |
+
.ebs_page_settings h1 {
|
8 |
+
background: none repeat scroll 0 0 #D5D5D7;
|
9 |
+
color: #555555;
|
10 |
+
padding: 10px;
|
11 |
+
text-align: center;
|
12 |
+
text-decoration: underline;
|
13 |
+
width: 88.5%;
|
14 |
+
}
|
15 |
+
.ebs_details {
|
16 |
+
border: 1px solid #CCCCCC;
|
17 |
+
float: left;
|
18 |
+
width: 90%;
|
19 |
+
margin:8px 0;
|
20 |
+
border-radius:3px;
|
21 |
+
-moz-border-radius:3px;
|
22 |
+
-webkit-border-radius:3px;
|
23 |
+
-ms-border-radius:3px;
|
24 |
+
|
25 |
+
}
|
26 |
+
.ebs_details label {
|
27 |
+
line-height: 30px;
|
28 |
+
margin: 0 10px 0 0;
|
29 |
+
padding: 5px 10px;
|
30 |
+
text-align: right;
|
31 |
+
width: 170px;
|
32 |
+
}
|
33 |
+
.ebs_details > p {
|
34 |
+
float: left;
|
35 |
+
margin: 5px 0;
|
36 |
+
}
|
37 |
+
.ebs_details.show_cdn > #cdn_path {
|
38 |
+
margin: 8px 0 0 10px;
|
39 |
+
width: 462px;
|
40 |
+
}
|
41 |
+
.ebs_setting_label {
|
42 |
+
border-right: 1px solid #CCCCCC;
|
43 |
+
display: block;
|
44 |
+
float: left;
|
45 |
+
}
|
46 |
+
.ebs_page_settings .ebs_btn {
|
47 |
+
float: left;
|
48 |
+
width: 90%;
|
49 |
+
}
|
50 |
+
|
51 |
+
.ebs_page_settings .ebs_btn > input {
|
52 |
+
font-size: 15px;
|
53 |
+
font-weight: 600;
|
54 |
+
padding: 7px;
|
55 |
+
width: 19%;
|
56 |
+
}
|