Easy Bootstrap Shortcode - Version 3.6

Version Description

Download this release

Release Info

Developer oscitas
Plugin Icon 128x128 Easy Bootstrap Shortcode
Version 3.6
Comparing to
See all releases

Code changes from version 3.5 to 3.6

Files changed (77) hide show
  1. README.txt +58 -32
  2. ebs_settings.php +52 -0
  3. images/Thumbs.db +0 -0
  4. images/colorpicker_background.png +0 -0
  5. images/colorpicker_hex.png +0 -0
  6. images/colorpicker_hsb_b.png +0 -0
  7. images/colorpicker_hsb_h.png +0 -0
  8. images/colorpicker_hsb_s.png +0 -0
  9. images/colorpicker_indic.gif +0 -0
  10. images/colorpicker_overlay.png +0 -0
  11. images/colorpicker_rgb_b.png +0 -0
  12. images/colorpicker_rgb_g.png +0 -0
  13. images/colorpicker_rgb_r.png +0 -0
  14. images/colorpicker_select.gif +0 -0
  15. images/colorpicker_submit.png +0 -0
  16. images/custom_background.png +0 -0
  17. images/custom_hex.png +0 -0
  18. images/custom_hsb_b.png +0 -0
  19. images/custom_hsb_h.png +0 -0
  20. images/custom_hsb_s.png +0 -0
  21. images/custom_indic.gif +0 -0
  22. images/custom_rgb_b.png +0 -0
  23. images/custom_rgb_g.png +0 -0
  24. images/custom_rgb_r.png +0 -0
  25. images/custom_submit.png +0 -0
  26. images/icon.png +0 -0
  27. images/select.png +0 -0
  28. images/select2.png +0 -0
  29. images/slider.png +0 -0
  30. osc_bootstrap_shortcode.php +81 -6
  31. shortcode/buttons/buttons_plugin.js +423 -170
  32. shortcode/buttons/plugin_shortcode.php +37 -23
  33. shortcode/dropdown/dropdown_plugin.js +190 -0
  34. shortcode/dropdown/icon.png +0 -0
  35. shortcode/dropdown/plugin_shortcode.php +77 -0
  36. shortcode/functions.php +68 -61
  37. shortcode/icon/icon.png +0 -0
  38. shortcode/icon/icon_plugin.js +318 -0
  39. shortcode/icon/plugin_shortcode.php +17 -0
  40. shortcode/iconhead/iconhead_plugin.js +333 -306
  41. shortcode/iconhead/plugin_shortcode.php +22 -14
  42. shortcode/image/icon.png +0 -0
  43. shortcode/image/image_plugin.js +124 -0
  44. shortcode/image/plugin_shortcode.php +22 -0
  45. shortcode/labels/icon.png +0 -0
  46. shortcode/labels/labels_plugin.js +97 -0
  47. shortcode/labels/plugin_shortcode.php +20 -0
  48. shortcode/lists/lists_plugin.js +115 -102
  49. shortcode/lists/plugin_shortcode.php +26 -24
  50. shortcode/notifications/notifications_plugin.js +106 -93
  51. shortcode/notifications/plugin_shortcode.php +28 -23
  52. shortcode/panel/panel_plugin.js +99 -86
  53. shortcode/panel/plugin_shortcode.php +44 -43
  54. shortcode/popover/plugin_shortcode.php +27 -27
  55. shortcode/popover/popover_plugin.js +166 -154
  56. shortcode/progressbar/icon.png +0 -0
  57. shortcode/progressbar/plugin_shortcode.php +24 -0
  58. shortcode/progressbar/progressbar_plugin.js +143 -0
  59. shortcode/tables/plugin_shortcode.php +61 -53
  60. shortcode/tables/tables_plugin.js +151 -139
  61. shortcode/tabs/plugin_shortcode.php +47 -43
  62. shortcode/tabs/tabs_plugin.js +26 -26
  63. shortcode/thumbnail/icon.png +0 -0
  64. shortcode/thumbnail/plugin_shortcode.php +38 -0
  65. shortcode/thumbnail/thumbnail_plugin.js +132 -0
  66. shortcode/toggles/plugin_shortcode.php +55 -49
  67. shortcode/toggles/toggles_plugin.js +26 -26
  68. shortcode/tooltip/plugin_shortcode.php +36 -35
  69. shortcode/tooltip/tooltip_plugin.js +143 -132
  70. shortcode/well/icon.png +0 -0
  71. shortcode/well/plugin_shortcode.php +20 -0
  72. shortcode/well/well_plugin.js +94 -0
  73. shortcode/wpcolumns/plugin_shortcode.php +542 -495
  74. shortcode/wpcolumns/wpcolumns_plugin.js +324 -211
  75. styles/bootstrap-icon.css +5 -5
  76. styles/bootstrap_admin.css +68 -3
  77. 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.5
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
- Features:
18
 
19
- * simplest bootstrap style plugin ever
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
- Easy Bootstrap Shortcode provides following styles
27
-
28
- Typography
29
 
30
- 1. Buttons
31
- 2. Icon Heading
32
- 3. Tables
33
- 4. Table Header and Body
34
- 5. Table Cells
35
- 6. Different table styles
36
- 7. Responsive
 
 
37
 
38
- Grid
39
 
40
- 1. Add multiple columns in a row
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
- Components
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.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
- wp_enqueue_script('colorpickerjs', plugins_url('/js/colorpicker.js', __FILE__));
 
 
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
- wp_enqueue_script('bootstrap', plugins_url('/js/bootstrap.js', __FILE__));
32
- wp_enqueue_style('bootstrap', plugins_url('/styles/bootstrap.css', __FILE__));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 : 'Buttons Shortcodes',
6
- image : url+'/icon.png',
7
- onclick : function() {
8
- jQuery.fancybox({
9
- 'type' : 'inline',
10
- 'title' : 'Button Shortcode',
11
- 'href' : '#oscitas-form-button',
12
- helpers: {
13
- title : {
14
- type : 'over',
15
- position:'top'
16
- }
17
- }
18
- });
19
- }
20
- });
21
- },
22
- createControl : function(n, cm) {
23
- return null;
24
- },
25
- getInfo : function() {
26
- return {
27
- longname : "Button Shortcode",
28
- author : 'Oscitas Themes',
29
- authorurl : 'http://www.oscitasthemes.com/',
30
- infourl : 'http://www.oscitasthemes.com/',
31
- version : "1.0"
32
- };
33
- }
34
- });
35
- tinymce.PluginManager.add('oscitasbuttons', tinymce.plugins.oscitasButtons);
36
- })();
37
-
38
- jQuery(function(){
39
- // creates a form to be displayed everytime the button is clicked
40
- // you should achieve this using AJAX instead of direct html code like this
41
- var form = jQuery('<div id="oscitas-form-button"><table id="oscitas-table" class="form-table">\
42
- <tr>\
43
- <th><label for="oscitas-button-style">Style:</label></th>\
44
- <td><select name="type" id="oscitas-button-style">\
45
- <option value="btn-default">Simple</option>\
46
- <option value="btn-primary">Primary</option>\
47
- <option value="btn-success">Success</option>\
48
- <option value="btn-info">Information</option>\
49
- <option value="btn-warning">Warning</option>\
50
- <option value="btn-danger">Danger</option>\
51
- <option value="btn-link">Link</option>\
52
- </select><br />\
53
- </td>\
54
- </tr>\
55
- <tr>\
56
- <th><label for="oscitas-button-size">Size:</label></th>\
57
- <td><select name="type" id="oscitas-button-size">\
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 />\
62
- </td>\
63
- </tr>\
64
- <tr>\
65
- <th><label for="oscitas-table-rows">Make block</label></th>\
66
- <td>\
67
- <input type="checkbox" id="oscitas-button-block">\
68
- <br />\
69
- </td>\
70
- </tr>\
71
- <tr>\
72
- <th><label for="oscitas-button-title">Title:</label></th>\
73
- <td><input type="text" name="title" id="oscitas-button-title" value="Button"/><br />\
74
- </td>\
75
- </tr>\
76
- <tr id="tr-button-link">\
77
- <th><label for="oscitas-button-link">Link</label></th>\
78
- <td><input type="text" name="link" id="oscitas-button-link" value="www.yoursitename.com" /><br />\
79
- </td>\
80
- </tr>\
81
- <tr>\
82
- <th><label for="oscitas-table-rows">Open in new window</label></th>\
83
- <td>\
84
- <input type="checkbox" id="oscitas-button-target">\
85
- <br />\
86
- </td>\
87
- </tr>\
88
- </table>\
89
- <p class="submit">\
90
- <input type="button" id="oscitas-button-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
- var colors = ['color','bgcolor'];
97
- jQuery.each(colors,function(index,color){
98
-
99
- jQuery('#oscitas-form-button').find('#oscitas-button-'+color).after('<div id="bg-'+color+'" style="height:25px;width:25px;"></div>');
100
- var defaultcolor = jQuery('#oscitas-button-'+color).val();
101
- jQuery('#oscitas-form-button').find('#bg-'+color).css('backgroundColor', '#'+defaultcolor );
102
- jQuery('#oscitas-form-button').find('#oscitas-button-'+color).ColorPicker({
103
- color: '#0000ff',
104
- onShow: function (colpkr) {
105
- jQuery(colpkr).fadeIn(500);
106
- return false;
107
- },
108
- onHide: function (colpkr) {
109
- jQuery(colpkr).fadeOut(500);
110
- return false;
111
- },
112
- onChange: function (hsb, hex, rgb) {
113
- //jQuery('#oscitas-bgcolor').css('backgroundColor', '#' + hex);
114
- jQuery('#oscitas-button-'+color).val('#' + hex);
115
- jQuery('#bg-'+color).css('backgroundColor', '#' + hex)
116
-
117
- }
118
- });
119
-
120
- });
121
-
122
- jQuery('#oscitas-button-type').change(function(){
123
- var abc = jQuery(this).val();
124
- if('button-link' == abc){
125
- jQuery("#tr-button-link").fadeIn();
126
- jQuery("#tr-modalname").fadeOut();
127
- }else{
128
- jQuery("#tr-button-link").fadeOut();
129
- jQuery("#tr-modalname").fadeIn();
130
- }
131
- });
132
-
133
-
134
-
135
-
136
- // handles the click event of the submit button
137
- form.find('#oscitas-button-submit').click(function(){
138
- // defines the options and their default values
139
- // again, this is not the most elegant way to do this
140
- // but well, this gets the job done nonetheless
141
- var options = {
142
- 'title' : 'osCitas',
143
- 'link' : ''
144
- };
145
- var type = jQuery('#oscitas-button-type').val();
146
- var shortcode = '[button';
147
-
148
- shortcode += ' class="'+table.find('#oscitas-button-style').val();
149
- shortcode += ' '+table.find('#oscitas-button-size').val();
150
- shortcode += table.find('#oscitas-button-block').prop('checked')? ' btn-block': '';
151
- shortcode += '" ';
152
- //shortcode += ' btntag="'+table.find('#oscitas-button-type').val()+'" ';
153
- shortcode += ' target="'+(table.find('#oscitas-button-block').prop('checked')? 'true': 'false')+ '" ';
154
-
155
- for( var index in options) {
156
- var value = table.find('#oscitas-button-' + index).val();
157
- var value = table.find('#oscitas-button-' + index).val();
158
- shortcode += ' ' + index + '="' + value + '"';
159
- }
160
-
161
- shortcode += ']';
162
-
163
- // inserts the shortcode into the active editor
164
- tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
165
-
166
- // closes fancybox
167
- jQuery.fancybox.close();
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
- * BUTTONS
4
- * **********************************************************/
5
- function osc_theme_button( $params, $content = null) {
6
- extract( shortcode_atts( array(
7
- 'title' => 'osCitas',
8
- 'link' => '',
9
- 'btntag' => 'a',
10
- 'class' => '',
11
- 'target' => '',
12
- ), $params ) );
13
- $out = '';
14
-
15
- if ($btntag == 'a') {
16
- $out = '<a class="btn '.$class.'" href="'.$link.'" target="'.($target).'">'.$title.'</a>';
17
- } elseif ($btntag == 'button' || $btntag == 'submit') {
18
- $out = '<input class="btn '.$class.'" type="'.$btntag.'" value="'.$title.'">';
19
- }
20
- return $out;
21
- }
22
- add_shortcode( 'button', 'osc_theme_button' );
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
- foreach ($elements as $element) {
19
- include( $element . '/plugin_shortcode.php');
20
- }
21
-
22
-
23
- // --------------------------------------------------------------------------------------------------------------
24
-
25
- add_action('init', 'add_custom_button');
26
-
27
- function add_custom_button() {
28
- //global $elements;
29
- // Don't bother doing this stuff if the current user lacks permissions
30
- if (!current_user_can('edit_posts') && !current_user_can('edit_pages'))
31
- return;
32
-
33
- // Add only in Rich Editor mode
34
- if (get_user_option('rich_editing') == 'true') {
35
-
36
- add_filter("mce_external_plugins", "add_custom_plugin");
37
- add_filter('mce_buttons_3', 'register_custom_button');
38
- }
39
- }
40
-
41
- function register_custom_button($buttons) {
42
-
43
- global $elements;
44
- foreach ($elements as $element) {
45
- $buttons[] = 'oscitas' . $element;
46
- }
47
- return $buttons;
48
- }
49
-
50
- // Load the TinyMCE plugin : editor_plugin.js (wp2.5)
51
- function add_custom_plugin($plugin_array) {
52
- //print_r($elements); exit;
53
- global $elements;
54
- foreach ($elements as $element) {
55
- $plugin_array['oscitas' . $element] = plugins_url('', __FILE__) . '/' . $element . '/' . $element . '_plugin.js';
56
- }
57
- /// return $buttons;
58
- return $plugin_array;
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
- jQuery.fancybox({
9
- 'autoSize':false,
10
- 'autoWidth':false,
11
- 'fitToView':false,
12
- 'height':'auto',
13
- 'topRatio':0.2,
14
- 'type' : 'inline',
15
- 'title' : 'Icon Heading Shortcode',
16
- 'href' : '#oscitas-form-iconhead',
17
- 'width':600,
18
- helpers: {
19
- title : {
20
- type : 'over',
21
- position:'top'
22
- }
23
- }
24
- });
25
- }
26
- });
27
- },
28
- createControl: function(n, cm) {
29
- return null;
30
- },
31
- getInfo: function() {
32
- return {
33
- longname: "Icon Heading Shortcode",
34
- author : 'Oscitas Themes',
35
- authorurl : 'http://www.oscitasthemes.com/',
36
- infourl : 'http://www.oscitasthemes.com/',
37
- version : "."
38
- };
39
- }
40
- });
41
- tinymce.PluginManager.add('oscitasiconhead', tinymce.plugins.oscitasIconhead);
42
- })();
43
-
44
- jQuery(function() {
45
- // creates a form to be displayed everytime the button is clicked
46
- // you should achieve this using AJAX instead of direct html code like this
47
- var form = jQuery('<div id="oscitas-form-iconhead"><table id="oscitas-table" class="form-table">\
48
- <tr>\
49
- <th><label for="oscitas-heading-icon">Select Icon:</label></th>\
50
- <td><div id="click_icon_list"><span id="osc_show_icon"></span><span class="show-drop"></span></div><input type="hidden" id="osc_icon_class_val" value="">\
51
- <div id="osc_show_iconlist" style="display:none;width:100%"><ul name="oscitas-heading-icon" id="oscitas-heading-icon">\
52
- <li data-value="glyphicon-adjust" class="glyphicon glyphicon-adjust"> </li>\
53
- <li data-value="glyphicon-align-center" class="glyphicon glyphicon-align-center"> </li>\
54
- <li data-value="glyphicon-align-justify" class="glyphicon glyphicon-align-justify"> </li>\
55
- <li data-value="glyphicon-align-left" class="glyphicon glyphicon-align-left"> </li>\
56
- <li data-value="glyphicon-align-right" class="glyphicon glyphicon-align-right"> </li>\
57
- <li data-value="glyphicon-arrow-down" class="glyphicon glyphicon-arrow-down"> </li>\
58
- <li data-value="glyphicon-arrow-left" class="glyphicon glyphicon-arrow-left"> </li>\
59
- <li data-value="glyphicon-arrow-right" class="glyphicon glyphicon-arrow-right"> </li>\
60
- <li data-value="glyphicon-arrow-up" class="glyphicon glyphicon-arrow-up"> </li>\
61
- <li data-value="glyphicon-asterisk" class="glyphicon glyphicon-asterisk"> </li>\
62
- <li data-value="glyphicon-backward" class="glyphicon glyphicon-backward"> </li>\
63
- <li data-value="glyphicon-ban-circle" class="glyphicon glyphicon-ban-circle"> </li>\
64
- <li data-value="glyphicon-barcode" class="glyphicon glyphicon-barcode"> </li>\
65
- <li data-value="glyphicon-bell" class="glyphicon glyphicon-bell"> </li>\
66
- <li data-value="glyphicon-bold" class="glyphicon glyphicon-bold"> </li>\
67
- <li data-value="glyphicon-book" class="glyphicon glyphicon-book"> </li>\
68
- <li data-value="glyphicon-bookmark" class="glyphicon glyphicon-bookmark"> </li>\
69
- <li data-value="glyphicon-briefcase" class="glyphicon glyphicon-briefcase"> </li>\
70
- <li data-value="glyphicon-bullhorn" class="glyphicon glyphicon-bullhorn"> </li>\
71
- <li data-value="glyphicon-calendar" class="glyphicon glyphicon-calendar"> </li>\
72
- <li data-value="glyphicon-camera" class="glyphicon glyphicon-camera"> </li>\
73
- <li data-value="glyphicon-certificate" class="glyphicon glyphicon-certificate"> </li>\
74
- <li data-value="glyphicon-check" class="glyphicon glyphicon-check"> </li>\
75
- <li data-value="glyphicon-chevron-down" class="glyphicon glyphicon-chevron-down"> </li>\
76
- <li data-value="glyphicon-chevron-left" class="glyphicon glyphicon-chevron-left"> </li>\
77
- <li data-value="glyphicon-chevron-right" class="glyphicon glyphicon-chevron-right"> </li>\
78
- <li data-value="glyphicon-chevron-up" class="glyphicon glyphicon-chevron-up"> </li>\
79
- <li data-value="glyphicon-circle-arrow-down" class="glyphicon glyphicon-circle-arrow-down"> </li>\
80
- <li data-value="glyphicon-circle-arrow-left" class="glyphicon glyphicon-circle-arrow-left"> </li>\
81
- <li data-value="glyphicon-circle-arrow-right" class="glyphicon glyphicon-circle-arrow-right"> </li>\
82
- <li data-value="glyphicon-circle-arrow-up" class="glyphicon glyphicon-circle-arrow-up"> </li>\
83
- <li data-value="glyphicon-cloud" class="glyphicon glyphicon-cloud"> </li>\
84
- <li data-value="glyphicon-cloud-download" class="glyphicon glyphicon-cloud-download"> </li>\
85
- <li data-value="glyphicon-cloud-upload" class="glyphicon glyphicon-cloud-upload"> </li>\
86
- <li data-value="glyphicon-cog" class="glyphicon glyphicon-cog"> </li>\
87
- <li data-value="glyphicon-collapse-down" class="glyphicon glyphicon-collapse-down"> </li>\
88
- <li data-value="glyphicon-collapse-up" class="glyphicon glyphicon-collapse-up"> </li>\
89
- <li data-value="glyphicon-comment" class="glyphicon glyphicon-comment"> </li>\
90
- <li data-value="glyphicon-compressed" class="glyphicon glyphicon-compressed"> </li>\
91
- <li data-value="glyphicon-copyright-mark" class="glyphicon glyphicon-copyright-mark"> </li>\
92
- <li data-value="glyphicon-credit-card" class="glyphicon glyphicon-credit-card"> </li>\
93
- <li data-value="glyphicon-cutlery" class="glyphicon glyphicon-cutlery"> </li>\
94
- <li data-value="glyphicon-dashboard" class="glyphicon glyphicon-dashboard"> </li>\
95
- <li data-value="glyphicon-download" class="glyphicon glyphicon-download"> </li>\
96
- <li data-value="glyphicon-download-alt" class="glyphicon glyphicon-download-alt"> </li>\
97
- <li data-value="glyphicon-earphone" class="glyphicon glyphicon-earphone"> </li>\
98
- <li data-value="glyphicon-edit" class="glyphicon glyphicon-edit"> </li>\
99
- <li data-value="glyphicon-eject" class="glyphicon glyphicon-eject"> </li>\
100
- <li data-value="glyphicon-envelope" class="glyphicon glyphicon-envelope"> </li>\
101
- <li data-value="glyphicon-euro" class="glyphicon glyphicon-euro"> </li>\
102
- <li data-value="glyphicon-exclamation-sign" class="glyphicon glyphicon-exclamation-sign"> </li>\
103
- <li data-value="glyphicon-exclamation-sign" class="glyphicon glyphicon-exclamation-sign"> </li>\
104
- <li data-value="glyphicon-expand" class="glyphicon glyphicon-expand"> </li>\
105
- <li data-value="glyphicon-export" class="glyphicon glyphicon-export"> </li>\
106
- <li data-value="glyphicon-eye-close" class="glyphicon glyphicon-eye-close"> </li>\
107
- <li data-value="glyphicon-eye-open" class="glyphicon glyphicon-eye-open"> </li>\
108
- <li data-value="glyphicon-facetime-video" class="glyphicon glyphicon-facetime-video"> </li>\
109
- <li data-value="glyphicon-fast-backward" class="glyphicon glyphicon-fast-backward"> </li>\
110
- <li data-value="glyphicon-fast-forward" class="glyphicon glyphicon-fast-forward"> </li>\
111
- <li data-value="glyphicon-file" class="glyphicon glyphicon-file"> </li>\
112
- <li data-value="glyphicon-film" class="glyphicon glyphicon-film"> </li>\
113
- <li data-value="glyphicon-filter" class="glyphicon glyphicon-filter"> </li>\
114
- <li data-value="glyphicon-fire" class="glyphicon glyphicon-fire"> </li>\
115
- <li data-value="glyphicon-flag" class="glyphicon glyphicon-flag"> </li>\
116
- <li data-value="glyphicon-floppy-disk" class="glyphicon glyphicon-floppy-disk"> </li>\
117
- <li data-value="glyphicon-floppy-open" class="glyphicon glyphicon-floppy-open"> </li>\
118
- <li data-value="glyphicon-floppy-remove" class="glyphicon glyphicon-floppy-remove"> </li>\
119
- <li data-value="glyphicon-floppy-save" class="glyphicon glyphicon-floppy-save"> </li>\
120
- <li data-value="glyphicon-floppy-saved" class="glyphicon glyphicon-floppy-saved"> </li>\
121
- <li data-value="glyphicon-folder-close" class="glyphicon glyphicon-folder-close"> </li>\
122
- <li data-value="glyphicon-folder-open" class="glyphicon glyphicon-folder-open"> </li>\
123
- <li data-value="glyphicon-font" class="glyphicon glyphicon-font"> </li>\
124
- <li data-value="glyphicon-forward" class="glyphicon glyphicon-forward"> </li>\
125
- <li data-value="glyphicon-fullscreen" class="glyphicon glyphicon-fullscreen"> </li>\
126
- <li data-value="glyphicon-gbp" class="glyphicon glyphicon-gbp"> </li>\
127
- <li data-value="glyphicon-gift" class="glyphicon glyphicon-gift"> </li>\
128
- <li data-value="glyphicon-glass" class="glyphicon glyphicon-glass"> </li>\
129
- <li data-value="glyphicon-globe" class="glyphicon glyphicon-globe"> </li>\
130
- <li data-value="glyphicon-hand-down" class="glyphicon glyphicon-hand-down"> </li>\
131
- <li data-value="glyphicon-hand-left" class="glyphicon glyphicon-hand-left"> </li>\
132
- <li data-value="glyphicon-hand-right" class="glyphicon glyphicon-hand-right"> </li>\
133
- <li data-value="glyphicon-hand-up" class="glyphicon glyphicon-hand-up"> </li>\
134
- <li data-value="glyphicon-hd-video" class="glyphicon glyphicon-hd-video"> </li>\
135
- <li data-value="glyphicon-hdd" class="glyphicon glyphicon-hdd"> </li>\
136
- <li data-value="glyphicon-header" class="glyphicon glyphicon-header"> </li>\
137
- <li data-value="glyphicon-headphones" class="glyphicon glyphicon-headphones"> </li>\
138
- <li data-value="glyphicon-heart" class="glyphicon glyphicon-heart"> </li>\
139
- <li data-value="glyphicon-heart-empty" class="glyphicon glyphicon-heart-empty"> </li>\
140
- <li data-value="glyphicon-home" class="glyphicon glyphicon-home"> </li>\
141
- <li data-value="glyphicon-import" class="glyphicon glyphicon-import"> </li>\
142
- <li data-value="glyphicon-inbox" class="glyphicon glyphicon-inbox"> </li>\
143
- <li data-value="glyphicon-indent-left" class="glyphicon glyphicon-indent-left"> </li>\
144
- <li data-value="glyphicon-indent-right" class="glyphicon glyphicon-indent-right"> </li>\
145
- <li data-value="glyphicon-info-sign" class="glyphicon glyphicon-info-sign"> </li>\
146
- <li data-value="glyphicon-italic" class="glyphicon glyphicon-italic"> </li>\
147
- <li data-value="glyphicon-leaf" class="glyphicon glyphicon-leaf"> </li>\
148
- <li data-value="glyphicon-link" class="glyphicon glyphicon-link"> </li>\
149
- <li data-value="glyphicon-list" class="glyphicon glyphicon-list"> </li>\
150
- <li data-value="glyphicon-list-alt" class="glyphicon glyphicon-list-alt"> </li>\
151
- <li data-value="glyphicon-lock" class="glyphicon glyphicon-lock"> </li>\
152
- <li data-value="glyphicon-log-in" class="glyphicon glyphicon-log-in"> </li>\
153
- <li data-value="glyphicon-log-out" class="glyphicon glyphicon-log-out"> </li>\
154
- <li data-value="glyphicon-magnet" class="glyphicon glyphicon-magnet"> </li>\
155
- <li data-value="glyphicon-map-marker" class="glyphicon glyphicon-map-marker"> </li>\
156
- <li data-value="glyphicon-minus" class="glyphicon glyphicon-minus"> </li>\
157
- <li data-value="glyphicon-minus-sign" class="glyphicon glyphicon-minus-sign"> </li>\
158
- <li data-value="glyphicon-move" class="glyphicon glyphicon-move"> </li>\
159
- <li data-value="glyphicon-music" class="glyphicon glyphicon-music"> </li>\
160
- <li data-value="glyphicon-new-window" class="glyphicon glyphicon-new-window"> </li>\
161
- <li data-value="glyphicon-off" class="glyphicon glyphicon-off"> </li>\
162
- <li data-value="glyphicon-ok" class="glyphicon glyphicon-ok"> </li>\
163
- <li data-value="glyphicon-ok-circle" class="glyphicon glyphicon-ok-circle"> </li>\
164
- <li data-value="glyphicon-ok-sign" class="glyphicon glyphicon-ok-sign"> </li>\
165
- <li data-value="glyphicon-open" class="glyphicon glyphicon-open"> </li>\
166
- <li data-value="glyphicon-paperclip" class="glyphicon glyphicon-paperclip"> </li>\
167
- <li data-value="glyphicon-pause" class="glyphicon glyphicon-pause"> </li>\
168
- <li data-value="glyphicon-pencil" class="glyphicon glyphicon-pencil"> </li>\
169
- <li data-value="glyphicon-phone" class="glyphicon glyphicon-phone"> </li>\
170
- <li data-value="glyphicon-phone-alt" class="glyphicon glyphicon-phone-alt"> </li>\
171
- <li data-value="glyphicon-picture" class="glyphicon glyphicon-picture"> </li>\
172
- <li data-value="glyphicon-plane" class="glyphicon glyphicon-plane"> </li>\
173
- <li data-value="glyphicon-play" class="glyphicon glyphicon-play"> </li>\
174
- <li data-value="glyphicon-play-circle" class="glyphicon glyphicon-play-circle"> </li>\
175
- <li data-value="glyphicon-plus" class="glyphicon glyphicon-plus"> </li>\
176
- <li data-value="glyphicon-plus-sign" class="glyphicon glyphicon-plus-sign"> </li>\
177
- <li data-value="glyphicon-print" class="glyphicon glyphicon-print"> </li>\
178
- <li data-value="glyphicon-pushpin" class="glyphicon glyphicon-pushpin"> </li>\
179
- <li data-value="glyphicon-qrcode" class="glyphicon glyphicon-qrcode"> </li>\
180
- <li data-value="glyphicon-question-sign" class="glyphicon glyphicon-question-sign"> </li>\
181
- <li data-value="glyphicon-random" class="glyphicon glyphicon-random"> </li>\
182
- <li data-value="glyphicon-record" class="glyphicon glyphicon-record"> </li>\
183
- <li data-value="glyphicon-refresh" class="glyphicon glyphicon-refresh"> </li>\
184
- <li data-value="glyphicon-registration-mark" class="glyphicon glyphicon-registration-mark"> </li>\
185
- <li data-value="glyphicon-remove" class="glyphicon glyphicon-remove"> </li>\
186
- <li data-value="glyphicon-remove-circle" class="glyphicon glyphicon-remove-circle"> </li>\
187
- <li data-value="glyphicon-remove-sign" class="glyphicon glyphicon-remove-sign"> </li>\
188
- <li data-value="glyphicon-repeat" class="glyphicon glyphicon-repeat"> </li>\
189
- <li data-value="glyphicon-resize-full" class="glyphicon glyphicon-resize-full"> </li>\
190
- <li data-value="glyphicon-resize-horizontal" class="glyphicon glyphicon-resize-horizontal"> </li>\
191
- <li data-value="glyphicon-resize-small" class="glyphicon glyphicon-resize-small"> </li>\
192
- <li data-value="glyphicon-resize-vertical" class="glyphicon glyphicon-resize-vertical"> </li>\
193
- <li data-value="glyphicon-retweet" class="glyphicon glyphicon-retweet"> </li>\
194
- <li data-value="glyphicon-road" class="glyphicon glyphicon-road"> </li>\
195
- <li data-value="glyphicon-save" class="glyphicon glyphicon-save"> </li>\
196
- <li data-value="glyphicon-saved" class="glyphicon glyphicon-saved"> </li>\
197
- <li data-value="glyphicon-screenshot" class="glyphicon glyphicon-screenshot"> </li>\
198
- <li data-value="glyphicon-sd-video" class="glyphicon glyphicon-sd-video"> </li>\
199
- <li data-value="glyphicon-search" class="glyphicon glyphicon-search"> </li>\
200
- <li data-value="glyphicon-send" class="glyphicon glyphicon-send"> </li>\
201
- <li data-value="glyphicon-share" class="glyphicon glyphicon-share"> </li>\
202
- <li data-value="glyphicon-share-alt" class="glyphicon glyphicon-share-alt"> </li>\
203
- <li data-value="glyphicon-shopping-cart" class="glyphicon glyphicon-shopping-cart"> </li>\
204
- <li data-value="glyphicon-signal" class="glyphicon glyphicon-signal"> </li>\
205
- <li data-value="glyphicon-sort" class="glyphicon glyphicon-sort"> </li>\
206
- <li data-value="glyphicon-sort-by-alphabet" class="glyphicon glyphicon-sort-by-alphabet"> </li>\
207
- <li data-value="glyphicon-sort-by-alphabet-alt" class="glyphicon glyphicon-sort-by-alphabet-alt"> </li>\
208
- <li data-value="glyphicon-sort-by-attributes" class="glyphicon glyphicon-sort-by-attributes"> </li>\
209
- <li data-value="glyphicon-sort-by-attributes-alt" class="glyphicon glyphicon-sort-by-attributes-alt"> </li>\
210
- <li data-value="glyphicon-sort-by-order" class="glyphicon glyphicon-sort-by-order"> </li>\
211
- <li data-value="glyphicon-sort-by-order-alt" class="glyphicon glyphicon-sort-by-order-alt"> </li>\
212
- <li data-value="glyphicon-sound--" class="glyphicon glyphicon-sound-5-1"> </li>\
213
- <li data-value="glyphicon-sound--" class="glyphicon glyphicon-sound-6-1"> </li>\
214
- <li data-value="glyphicon-sound--" class="glyphicon glyphicon-sound-7-1"> </li>\
215
- <li data-value="glyphicon-sound-dolby" class="glyphicon glyphicon-sound-dolby"> </li>\
216
- <li data-value="glyphicon-sound-stereo" class="glyphicon glyphicon-sound-stereo"> </li>\
217
- <li data-value="glyphicon-star" class="glyphicon glyphicon-star"> </li>\
218
- <li data-value="glyphicon-star-empty" class="glyphicon glyphicon-star-empty"> </li>\
219
- <li data-value="glyphicon-stats" class="glyphicon glyphicon-stats"> </li>\
220
- <li data-value="glyphicon-step-backward" class="glyphicon glyphicon-step-backward"> </li>\
221
- <li data-value="glyphicon-step-forward" class="glyphicon glyphicon-step-forward"> </li>\
222
- <li data-value="glyphicon-stop" class="glyphicon glyphicon-stop"> </li>\
223
- <li data-value="glyphicon-subtitles" class="glyphicon glyphicon-subtitles"> </li>\
224
- <li data-value="glyphicon-tag" class="glyphicon glyphicon-tag"> </li>\
225
- <li data-value="glyphicon-tags" class="glyphicon glyphicon-tags"> </li>\
226
- <li data-value="glyphicon-tasks" class="glyphicon glyphicon-tasks"> </li>\
227
- <li data-value="glyphicon-text-height" class="glyphicon glyphicon-text-height"> </li>\
228
- <li data-value="glyphicon-text-width" class="glyphicon glyphicon-text-width"> </li>\
229
- <li data-value="glyphicon-th" class="glyphicon glyphicon-th"> </li>\
230
- <li data-value="glyphicon-th-large" class="glyphicon glyphicon-th-large"> </li>\
231
- <li data-value="glyphicon-th-list" class="glyphicon glyphicon-th-list"> </li>\
232
- <li data-value="glyphicon-thumbs-down" class="glyphicon glyphicon-thumbs-down"> </li>\
233
- <li data-value="glyphicon-thumbs-up" class="glyphicon glyphicon-thumbs-up"> </li>\
234
- <li data-value="glyphicon-time" class="glyphicon glyphicon-time"> </li>\
235
- <li data-value="glyphicon-tint" class="glyphicon glyphicon-tint"> </li>\
236
- <li data-value="glyphicon-tower" class="glyphicon glyphicon-tower"> </li>\
237
- <li data-value="glyphicon-transfer" class="glyphicon glyphicon-transfer"> </li>\
238
- <li data-value="glyphicon-trash" class="glyphicon glyphicon-trash"> </li>\
239
- <li data-value="glyphicon-tree-conifer" class="glyphicon glyphicon-tree-conifer"> </li>\
240
- <li data-value="glyphicon-tree-deciduous" class="glyphicon glyphicon-tree-deciduous"> </li>\
241
- <li data-value="glyphicon-unchecked" class="glyphicon glyphicon-unchecked"> </li>\
242
- <li data-value="glyphicon-upload" class="glyphicon glyphicon-upload"> </li>\
243
- <li data-value="glyphicon-usd" class="glyphicon glyphicon-usd"> </li>\
244
- <li data-value="glyphicon-user" class="glyphicon glyphicon-user"> </li>\
245
- <li data-value="glyphicon-volume-down" class="glyphicon glyphicon-volume-down"> </li>\
246
- <li data-value="glyphicon-volume-off" class="glyphicon glyphicon-volume-off"> </li>\
247
- <li data-value="glyphicon-volume-up" class="glyphicon glyphicon-volume-up"> </li>\
248
- <li data-value="glyphicon-warning-sign" class="glyphicon glyphicon-warning-sign"> </li>\
249
- <li data-value="glyphicon-wrench" class="glyphicon glyphicon-wrench"> </li>\
250
- <li data-value="glyphicon-zoom-in" class="glyphicon glyphicon-zoom-in"> </li>\
251
- <li data-value="glyphicon-zoom-out" class="glyphicon glyphicon-zoom-out"> </li>\
252
- </ul></div>\
253
- </td>\
254
- </tr>\
255
- <tr>\
256
- <th><label for="oscitas-iconhead-heading">Heading:</label></th>\
257
- <td><input type="text" name="oscitas-iconhead-heading" id="oscitas-iconhead-heading" value="Heading"/><br />\
258
- </td>\
259
- </tr>\
260
- </table>\
261
- <p class="submit">\
262
- <input type="button" id="oscitas-iconhead-submit" class="button-primary" value="Insert Icon Heading" name="submit" />\
263
- </p>\
264
- </div>');
265
-
266
- var table = form.find('table');
267
- jQuery('.glyphicon').css('display','inline');
268
- form.appendTo('body').hide();
269
- table.find('#click_icon_list').click(function(){
270
- if(!jQuery(this).hasClass('osc_icon_showing')){
271
- jQuery(this).addClass('osc_icon_showing')
272
- jQuery('#osc_show_iconlist').show();
273
- } else{
274
- jQuery(this).removeClass('osc_icon_showing')
275
- jQuery('#osc_show_iconlist').hide();
276
- }
277
- });
278
- table.find('#oscitas-heading-icon li').click(function(){
279
- var val=jQuery(this).attr('data-value');
280
- table.find('#oscitas-heading-icon li').removeClass('osc_icon_selected');
281
- jQuery(this).addClass('osc_icon_selected');
282
- jQuery('#osc_show_iconlist').hide();
283
- jQuery('#osc_show_icon').removeClass().addClass('glyphicon').addClass(val);
284
- jQuery('#osc_icon_class_val').val(val);
285
- })
286
- // // handles the click event of the submit button
287
- form.find('#oscitas-iconhead-submit').click(function() {
288
- // defines the options and their default values
289
- // again, this is not the most elegant way to do this
290
- // but well, this gets the job done nonetheless
291
-
292
- var shortcode = '[iconheading';
293
-
294
- shortcode += ' class="' + table.find('#osc_icon_class_val').val();
295
-
296
- shortcode += '" ';
297
-
298
- shortcode += ']'+table.find('#oscitas-iconhead-heading').val()+'[/iconheading]' ;
299
-
300
- // inserts the shortcode into the active editor
301
- tinyMCE.activeEditor.execCommand('mceInsertContent',0 , shortcode);
302
-
303
- jQuery.fancybox.close();
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
- 'class' => '',
6
- ), $params));
7
- $out = '';
8
- $out = '<h3><span class="glyphicon '.$class.'"></span> '.$content.'</h3>';
9
-
10
- return $out;
11
- }
12
-
13
- add_shortcode('iconheading', 'osc_theme_iconhead');
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&amp;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 : 'Create lists',
6
- image : url+'/icon.png',
7
- onclick : function() {
8
- jQuery.fancybox({
9
- 'type' : 'inline',
10
- 'title' : 'List Shortcode',
11
- 'href' : '#oscitas-form-lists',
12
- helpers: {
13
- title : {
14
- type : 'over',
15
- position:'top'
16
- }
17
- }
18
- });
19
- }
20
- });
21
- },
22
- createControl : function(n, cm) {
23
- return null;
24
- },
25
- getInfo : function() {
26
- return {
27
- longname : "List Shortcode",
28
- author : 'Oscitas Themes',
29
- authorurl : 'http://www.oscitasthemes.com/',
30
- infourl : 'http://www.oscitasthemes.com/',
31
- version : "1.0"
32
- };
33
- }
34
- });
35
- tinymce.PluginManager.add('oscitaslists', tinymce.plugins.oscitasLists);
36
- })();
37
-
38
- jQuery(function(){
39
- // creates a form to be displayed everytime the button is clicked
40
- // you should achieve this using AJAX instead of direct html code like this
41
- var form = jQuery('<div id="oscitas-form-lists"><table id="oscitas-table" class="form-table">\
42
- <tr>\
43
- <th><label for="oscitas-type">Lists style</label></th>\
44
- <td><select name="type" id="oscitas-type">\
45
- <option value="">None</option>\
46
- <option value="glyphicon-arrow-right">Arrow</option>\
47
- <option value="glyphicon-ok">Check</option>\
48
- <option value="glyphicon-plus">Plus</option>\
49
- <option value="glyphicon-minus">Minus</option>\
50
- </select><br />\
51
- </td>\
52
- </tr>\
53
- <tr>\
54
- <th><label for="oscitas-line">No of List Item</label></th>\
55
- <td><input type="oscitas-list-item" name="line" id="oscitas-list-item" value="3"/><br /><small>Enter a numeric value</small>\
56
- </td>\
57
- </tr>\
58
- </table>\
59
- <p class="submit">\
60
- <input type="button" id="oscitas-submit" class="button-primary" value="Insert List" name="submit" />\
61
- </p>\
62
- </div>');
63
-
64
- var table = form.find('table');
65
- form.appendTo('body').hide();
66
-
67
- // handles the click event of the submit button
68
- form.find('#oscitas-submit').click(function(){
69
- // defines the options and their default values
70
- // again, this is not the most elegant way to do this
71
- // but well, this gets the job done nonetheless
72
- var options = {
73
- 'type' : 'arrow'
74
- },list=0,list_type;
75
- var shortcode = '[list';
76
- var list_item=jQuery('#oscitas-list-item').val();
77
- if(isNaN(list_item)==false){
78
- list=list_item;
79
- } else{
80
- list=3;
81
- }
82
-
83
-
84
- shortcode += ']<br/>';
85
- if(table.find('#oscitas-type').val()!=''){
86
- list_type=' type="'+table.find('#oscitas-type').val()+'"';
87
- }
88
- else{
89
- list_type='';
90
- }
91
- for(var i=1;i<=list;i++){
92
- shortcode +='[li'+list_type+']your list content[/li]<br/>'
93
- }
94
- shortcode +='[/list]';
95
-
96
- // inserts the shortcode into the active editor
97
- tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
98
-
99
- jQuery.fancybox.close();
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
- $content = str_replace("]<br />", ']', $content);
6
- $content = str_replace("]<br />\n", ']', $content);
7
- $content = str_replace("<br />\n[", '[', $content);
8
- return '<ul class="list-group">' . do_shortcode($content) . '</ul>';
9
- }
10
-
11
- add_shortcode('list', 'osc_theme_list');
12
-
13
- function osc_theme_li($params, $content = null) {
14
- extract(shortcode_atts(array(
15
- 'type' => ''
16
- ), $params));
17
- if ($type != '') {
18
- $osc_class = '<span class="glyphicon ' . $type . '"></span> ';
19
- } else {
20
- $osc_class = '';
21
- }
22
- return '<li class="list-group-item">' . $osc_class . $content . '</li>';
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 Shortcodes',
6
- image : url+'/icon.png',
7
- onclick : function() {
8
- jQuery.fancybox({
9
- 'type' : 'inline',
10
- 'title' : 'Notifications Shortcode',
11
- 'href' : '#oscitas-form-notifications',
12
- helpers: {
13
- title : {
14
- type : 'over',
15
- position:'top'
16
- }
17
- }
18
- });
19
- }
20
- });
21
- },
22
- createControl : function(n, cm) {
23
- return null;
24
- },
25
- getInfo : function() {
26
- return {
27
- longname : "Notifications Shortcode",
28
- author : 'Oscitas Themes',
29
- authorurl : 'http://www.oscitasthemes.com/',
30
- infourl : 'http://www.oscitasthemes.com/',
31
- version : "1.0"
32
- };
33
- }
34
- });
35
- tinymce.PluginManager.add('oscitasnotifications', tinymce.plugins.oscitasNotifications);
36
- })();
37
-
38
- jQuery(function(){
39
- // creates a form to be displayed everytime the button is clicked
40
- // you should achieve this using AJAX instead of direct html code like this
41
- var form = jQuery('<div id="oscitas-form-notifications"><table id="oscitas-table" class="form-table">\
42
- <tr>\
43
- <th><label for="oscitas-type">VideoServer</label></th>\
44
- <td><select name="type" id="oscitas-type">\
45
- <option value="alert-warning">Warning</option>\
46
- <option value="alert-success">Success</option>\
47
- <option value="alert-info">Information</option>\
48
- <option value="alert-danger">Danger</option>\
49
- </select><br />\
50
- </td>\
51
- </tr>\
52
- <tr>\
53
- <th><label for="oscitas-line">Close link</label></th>\
54
- <td><input type="checkbox" id="oscitas-close"/><br />\
55
- </td>\
56
- </tr>\
57
- </table>\
58
- <p class="submit">\
59
- <input type="button" id="oscitas-submit" class="button-primary" value="Insert Notification" name="submit" />\
60
- </p>\
61
- </div>');
62
-
63
- var table = form.find('table');
64
- form.appendTo('body').hide();
65
-
66
- // handles the click event of the submit button
67
- form.find('#oscitas-submit').click(function(){
68
- // defines the options and their default values
69
- // again, this is not the most elegant way to do this
70
- // but well, this gets the job done nonetheless
71
- var options = {
72
- 'type' : 'error'
73
- };
74
- var shortcode = '[notification';
75
-
76
- for( var index in options) {
77
- var value = table.find('#oscitas-' + index).val();
78
-
79
- // attaches the attribute to the shortcode only if it's different from the default value
80
- //if ( value !== options[index] )
81
- shortcode += ' ' + index + '="' + value + '"';
82
- }
83
- shortcode += ' close="'+(table.find('#oscitas-close').prop('checked')? 'true': 'false')+ '" ';
84
-
85
- shortcode += ']Title: Lorem ipsum dolor sit amet...[/notification]';
86
-
87
- // inserts the shortcode into the active editor
88
- tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
89
-
90
- jQuery.fancybox.close();
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
- function osc_theme_notification($atts, $content = null ) {
3
- extract(shortcode_atts(array(
4
- 'type' => '',
5
- 'close' => 'false',
6
- ), $atts));
7
- $type = ($close == 'true' ? $type.' alert-dismissable' : $type);
8
-
9
- $result = '<div class="alert '.$type.'">';
10
- if ($close == 'true') {
11
- $result .= '<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>';
12
- }
13
- $result .= do_shortcode($content);
14
- $result .= '</div>';
15
-
16
- return $result;
17
- }
18
- add_shortcode('notification', 'osc_theme_notification');
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">&times;
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 Shortcodes',
6
- image : url+'/icon.png',
7
- onclick : function() {
8
- jQuery.fancybox({
9
- 'type' : 'inline',
10
- 'title' : 'Panel Shortcode',
11
- 'href' : '#oscitas-form-panel',
12
- helpers: {
13
- title : {
14
- type : 'over',
15
- position:'top'
16
- }
17
- }
18
- });
19
- }
20
- });
21
- },
22
- createControl : function(n, cm) {
23
- return null;
24
- },
25
- getInfo : function() {
26
- return {
27
- longname : "Panel Shortcode",
28
- author : 'Oscitas Themes',
29
- authorurl : 'http://www.oscitasthemes.com/',
30
- infourl : 'http://www.oscitasthemes.com/',
31
- version : "1.0"
32
- };
33
- }
34
- });
35
- tinymce.PluginManager.add('oscitaspanel', tinymce.plugins.oscitasPanel);
36
- })();
37
-
38
- jQuery(function(){
39
- // creates a form to be displayed everytime the button is clicked
40
- // you should achieve this using AJAX instead of direct html code like this
41
- var form = jQuery('<div id="oscitas-form-panel"><table id="oscitas-table" class="form-table">\
42
- <tr>\
43
- <th><label for="oscitas-type">Style</label></th>\
44
- <td><select name="type" id="oscitas-panel-type">\
45
- <option value="panel-default">Simple</option>\
46
- <option value="panel-primary">Primary</option>\
47
- <option value="panel-warning">Warning</option>\
48
- <option value="panel-success">Success</option>\\n\
49
- <option value="panel-info">Information</option>\
50
- <option value="panel-danger">Danger</option>\
51
- </select><br />\
52
- </td>\
53
- </tr>\
54
- <tr>\
55
- <th><label for="oscitas-line">Show footer</label></th>\
56
- <td><input type="checkbox" id="oscitas-panel-footer"/><br />\
57
- </td>\
58
- </tr>\
59
- </table>\
60
- <p class="submit">\
61
- <input type="button" id="oscitas-submit" class="button-primary" value="Insert Panel" name="submit" />\
62
- </p>\
63
- </div>');
64
-
65
- var table = form.find('table');
66
- form.appendTo('body').hide();
67
-
68
- // handles the click event of the submit button
69
- form.find('#oscitas-submit').click(function(){
70
- // defines the options and their default values
71
- // again, this is not the most elegant way to do this
72
- // but well, this gets the job done nonetheless
73
- var shortcode = '[panel class="'+table.find('#oscitas-panel-type').val()+ '"]';
74
- shortcode += '<br/>[panel-header]<br/>Heading goes here<br/>[/panel-header]';
75
- //shortcode += (table.find('#oscitas-panel-header').prop('checked')? '[panel-header]<br/>Heading goes here<br/>[/panel-header]': '');
76
- shortcode += '<br/>[panel-content]<br/>Content goes here<br/>[/panel-content]';
77
- shortcode += (table.find('#oscitas-panel-footer').prop('checked')? '<br/>[panel-footer]<br/>Footer goes here<br/>[/panel-footer]': '');
78
- shortcode += '<br/>[/panel]';
79
-
80
- // inserts the shortcode into the active editor
81
- tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
82
-
83
- jQuery.fancybox.close();
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
- 'class' => '',
6
- ), $atts));
7
- $content = str_replace("]<br />", ']', $content);
8
-
9
- $content = str_replace("<br />\n[", '[', $content);
10
- $result = '<div class="panel ' . $class . '">';
11
- $result .= do_shortcode($content);
12
- $result .= '</div>';
13
-
14
- return $result;
15
- }
16
-
17
- add_shortcode('panel', 'osc_theme_panel');
18
-
19
- function osc_theme_panel_footer($atts, $content = null) {
20
- $result = '<div class="panel-footer">';
21
- $result .= do_shortcode($content);
22
- $result .= '</div>';
23
- return $result;
24
- }
25
-
26
- add_shortcode('panel-footer', 'osc_theme_panel_footer');
27
-
28
- function osc_theme_panel_heading($atts, $content = null) {
29
- $result = '<div class="panel-heading">';
30
- $result .= do_shortcode($content);
31
- $result .= '</div>';
32
- return $result;
33
- }
34
-
35
- add_shortcode('panel-header', 'osc_theme_panel_heading');
36
-
37
- function osc_theme_panel_content($atts, $content = null) {
38
- $result = '<div class="panel-body">';
39
- $result .= do_shortcode($content);
40
- $result .= '</div>';
41
- return $result;
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
- function osc_theme_popover($params, $content = 'Popover') {
5
- extract(shortcode_atts(array(
6
- 'trigger' => '',
7
- 'title' => '',
8
- 'pop_content' => '',
9
- 'style' => '',
10
- 'size' => '',
11
- 'type' => ''
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="'.$trigger.'" data-container="body" type="button" data-title="' . $title . '"> ' . $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');
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
- jQuery.fancybox({
9
- 'type' : 'inline',
10
- 'title' : 'Popover Shortcode',
11
- 'href' : '#oscitas-form-popover',
12
- helpers: {
13
- title : {
14
- type : 'over',
15
- position:'top'
16
- }
17
- }
18
- });
19
- }
20
- });
21
- },
22
- createControl: function(n, cm) {
23
- return null;
24
- },
25
- getInfo: function() {
26
- return {
27
- longname: "Popover Shortcode",
28
- author : 'Oscitas Themes',
29
- authorurl : 'http://www.oscitasthemes.com/',
30
- infourl : 'http://www.oscitasthemes.com/',
31
- version : "1.0"
32
- };
33
- }
34
- });
35
- tinymce.PluginManager.add('oscitaspopover', tinymce.plugins.oscitasPopover);
36
- })();
37
-
38
- jQuery(function() {
39
- // creates a form to be displayed everytime the button is clicked
40
- // you should achieve this using AJAX instead of direct html code like this
41
- var form = jQuery('<div id="oscitas-form-popover"><table id="oscitas-table" class="form-table">\
42
- <tr>\
43
- <th><label for="oscitas-popover-style">Popover Style:</label></th>\
44
- <td><select name="oscitas-popover-style" id="oscitas-popover-style">\
45
- <option value="top">Top</option>\
46
- <option value="bottom">Bottom</option>\
47
- <option value="left">Left</option>\
48
- <option value="right">Right</option>\
49
- <option value="auto">Auto</option>\
50
- </select><br />\
51
- </td>\
52
- </tr>\
53
- <tr>\
54
- <th><label for="oscitas-popover-title">Popover Title Text:</label></th>\
55
- <td><input type="text" name="popover-title" id="oscitas-popover-title" value="A title"/><br />\
56
- </td>\
57
- </tr>\
58
- </tr>\
59
- <tr>\
60
- <th><label for="oscitas-popover-content">Popover Title Text:</label></th>\
61
- <td><textarea " name="popover-content" id="oscitas-popover-content">Your Content</textarea><br />\
62
- </td>\
63
- </tr>\
64
- <tr>\
65
- <th><label for="oscitas-pbutton-trigger">Trigger Popover On:</label></th>\
66
- <td><select name="tigger" id="oscitas-pbutton-trigger">\
67
- <option value="click">Click</option>\
68
- <option value="hover">Hover</option>\
69
- </select><br />\
70
- </td>\
71
- </tr >\
72
- <tr>\
73
- <th><label for="oscitas-pbutton-size">Button Size:</label></th>\
74
- <td><select name="size" id="oscitas-pbutton-size">\
75
- <option value="">Default</option>\
76
- <option value="btn-lg">Large</option>\
77
- <option value="btn-sm">Small</option>\
78
- <option value="btn-xs">X-Small</option>\
79
- </select><br />\
80
- </td>\
81
- </tr >\
82
- <tr>\
83
- <th><label for="oscitas-pbutton-type">Button Type:</label></th>\
84
- <td><select name="type" id="oscitas-pbutton-type">\
85
- <option value="btn-default">Default</option>\
86
- <option value="btn-primary">Primary</option>\
87
- <option value="btn-success">Success</option>\
88
- <option value="btn-info">Info</option>\
89
- <option value="btn-warning">Warning</option>\
90
- <option value="btn-danger">Danger</option>\\n\
91
- <option value="btn-link">Link</option>\
92
- </select><br />\
93
- </td>\
94
- </tr >\
95
- <tr>\
96
- <th><label for="oscitas-popover-button-text">Button Text:</label></th>\
97
- <td><input type="text" name="link-text" id="oscitas-popover-button-text" value="Popover"/><br />\
98
- </td>\
99
- </tr>\
100
- </table>\
101
- <p class="submit">\
102
- <input type="button" id="oscitas-popover-submit" class="button-primary" value="Insert Popover" name="submit" />\
103
- </p>\
104
- </div>');
105
-
106
- var table = form.find('table');
107
- form.appendTo('body').hide();
108
- var colors = ['color', 'bgcolor'];
109
- jQuery('table tr:visible:even').css('background', '#F0F0F0');
110
- jQuery('table tr:visible:odd').css('background', '#DADADD');
111
-
112
-
113
- // handles the click event of the submit button
114
- form.find('#oscitas-popover-submit').click(function() {
115
- // defines the options and their default values
116
- // again, this is not the most elegant way to do this
117
- // but well, this gets the job done nonetheless
118
-
119
- var shortcode = '[popover';
120
- shortcode += ' title="' + table.find('#oscitas-popover-title').val();
121
-
122
- shortcode += '" ';
123
-
124
- shortcode += ' pop_content="' + table.find('#oscitas-popover-content').val();
125
-
126
- shortcode += '" ';
127
- shortcode += ' trigger="' + table.find('#oscitas-pbutton-trigger').val();
128
-
129
- shortcode += '" ';
130
- shortcode += ' style="' + table.find('#oscitas-popover-style').val();
131
-
132
- shortcode += '" ';
133
- shortcode += ' size="' + table.find('#oscitas-pbutton-size').val();
134
-
135
- shortcode += '" ';
136
- shortcode += ' type="' + table.find('#oscitas-pbutton-type').val();
137
-
138
- shortcode += '" ';
139
- //shortcode += ' btntag="'+table.find('#oscitas-button-type').val()+'" ';
140
-
141
-
142
-
143
- shortcode += ']';
144
- shortcode+= table.find('#oscitas-popover-button-text').val();
145
- shortcode+='[/popover]';
146
-
147
- // inserts the shortcode into the active editor
148
- tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
149
-
150
- // closes fancybox
151
- jQuery.fancybox.close();
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
- * TABLES
4
- * **********************************************************/
5
- function osc_theme_os_table( $params, $content = null) {
6
- extract( shortcode_atts( array(
7
- 'width' => '100%',
8
- 'class' => '',
9
- 'responsive' => 'false',
10
- ), $params ) );
11
- $content = str_replace("]<br />",']',$content);
12
- $out = '<table width="'.$width.'" class="table '.$class.'">'. do_shortcode($content) . '</table>';
13
- $out = strtolower($responsive) == 'true' ? '<div class="table-responsive">'.$out.'</div>': $out;
14
- return $out;
15
- }
16
- add_shortcode( 'table', 'osc_theme_os_table' );
17
-
18
- function osc_theme_os_table_head( $params, $content = null) {
19
- $out = '<thead><tr>'. do_shortcode($content) . '</tr></thead>';
20
- return $out;
21
- }
22
- add_shortcode( 'table_head', 'osc_theme_os_table_head' );
23
-
24
-
25
- function osc_theme_os_table_body( $params, $content = null) {
26
- $out = '<tbody>'. do_shortcode($content) . '</tbody>';
27
- return $out;
28
- }
29
- add_shortcode( 'table_body', 'osc_theme_os_table_body' );
30
-
31
- function osc_theme_os_table_row( $params, $content = null) {
32
- $out = '<tr>';
33
- $out .= do_shortcode($content);
34
- $out .= '</tr>';
35
- return $out;
36
- }
37
- add_shortcode( 'table_row', 'osc_theme_os_table_row' );
38
-
39
- function osc_theme_os_row_column( $params, $content = null) {
40
- $out = '<td>';
41
- $out .= $content;
42
- $out .= '</td>';
43
- return $out;
44
- }
45
- add_shortcode( 'row_column', 'osc_theme_os_row_column' );
46
-
47
- function osc_theme_os_th_column( $params, $content = null) {
48
- $out = '<th>';
49
- $out .= $content;
50
- $out .= '</th>';
51
- return $out;
52
- }
53
- add_shortcode( 'th_column', 'osc_theme_os_th_column' );
 
 
 
 
 
 
 
 
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 : 'Create Tables',
6
- image : url+'/icon.png',
7
- onclick : function() {
8
- jQuery.fancybox({
9
- 'type' : 'inline',
10
- 'title' : 'Tables Shortcode',
11
- 'href' : '#oscitas-form-table',
12
-
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 : "Tables Shortcode",
29
- author : 'Oscitas Themes',
30
- authorurl : 'http://www.oscitasthemes.com/',
31
- infourl : 'http://www.oscitasthemes.com/',
32
- version : "1.0"
33
- };
34
- }
35
- });
36
- tinymce.PluginManager.add('oscitastables', tinymce.plugins.oscitasTables);
37
- })();
38
-
39
- jQuery(function(){
40
- // creates a form to be displayed everytime the button is clicked
41
- // you should achieve this using AJAX instead of direct html code like this
42
- var form = jQuery('<div id="oscitas-form-table"><table id="oscitas-table" class="form-table">\
43
- <tr>\
44
- <th><label for="oscitas-table-width">Table Width</label></th>\
45
- <td><input type="text" name="icontag" id="oscitas-table-width" value="100%" /><br />\
46
- </td>\
47
- </tr>\
48
- <tr>\
49
- <th><label for="oscitas-table-columns">Columns</label></th>\
50
- <td><input type="text" name="link" id="oscitas-table-columns" value="4" /><br />\
51
- </td>\
52
- </tr>\
53
- <tr>\
54
- <th><label for="oscitas-table-rows">Rows</label></th>\
55
- <td><input type="text" name="title" id="oscitas-table-rows" value="4" /><br />\
56
- </td>\
57
- </tr>\
58
- <tr>\
59
- <th><label for="oscitas-table-rows">Table style</label></th>\
60
- <td>\
61
- <select name="tablestyle" id="oscitas-table-style">\
62
- <option value="">Simple</option>\
63
- <option value="table-striped">Striped</option>\
64
- <option value="table-bordered">Bordered</option>\
65
- <option value="table-striped table-bordered">Striped + Bordered</option>\
66
- </select>\
67
- <br />\
68
- </td>\
69
- </tr>\
70
- <tr>\
71
- <th><label for="oscitas-table-rows">Show hover effect</label></th>\
72
- <td>\
73
- <input type="checkbox" id="oscitas-table-hover" value="table-hover">\
74
- <br />\
75
- </td>\
76
- </tr>\
77
- <tr>\
78
- <th><label for="oscitas-table-rows">Responsive</label></th>\
79
- <td>\
80
- <input type="checkbox" id="oscitas-table-scroll" value="table-responsive">\
81
- <br />\
82
- </td>\
83
- </tr>\
84
- </table>\
85
- <p class="submit">\
86
- <input type="button" id="oscitas-submit" class="button-primary" value="Insert Table" name="submit" />\
87
- </p>\
88
- </div>');
89
-
90
- var table = form.find('table');
91
- form.appendTo('body').hide();
92
-
93
- // handles the click event of the submit button
94
- form.find('#oscitas-submit').click(function(){
95
- // defines the options and their default values
96
- // again, this is not the most elegant way to do this
97
- // but well, this gets the job done nonetheless
98
-
99
- var columns = table.find('#oscitas-table-columns').val();
100
- var rows = table.find('#oscitas-table-rows').val();
101
- var value = table.find('#oscitas-table-width').val();
102
- var osStyle = table.find('#oscitas-table-style').val();
103
-
104
- var osHover = table.find('#oscitas-table-hover').prop('checked') ? ' table-hover' : '' ;
105
- var osScroll = table.find('#oscitas-table-scroll').prop('checked')? 'true': 'false';
106
- //creating table
107
- var shortcode = '[table ';
108
- shortcode += 'width ="' + value + '"';
109
- shortcode += ' class ="' + osStyle +osHover+ '"';
110
- shortcode += ' responsive ="' +osScroll+ '"';
111
-
112
- shortcode += ']<br/>[table_head]<br/>';
113
- for (var i=1;i<=columns;i++)
114
- {
115
- shortcode += '[th_column]Heading-'+i+'[/th_column]<br/>';
116
- }
117
- shortcode += '[/table_head]<br/>[table_body]<br/>';
118
-
119
- for (var j=1;j<=rows;j++)
120
- {
121
- shortcode += '[table_row]<br/>';
122
- for (var i=1;i<=columns;i++)
123
- {
124
- shortcode += '[row_column]value-'+i+'[/row_column]<br/>';
125
- }
126
-
127
- shortcode += '[/table_row]<br/>';
128
- }
129
- shortcode += '[/table_body]<br/>[/table]';
130
-
131
-
132
- // inserts the shortcode into the active editor
133
- tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
134
-
135
- // closes fancybox
136
- jQuery.fancybox.close();
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
- * jQuery UI Tabs
4
- * **********************************************************/
5
- $_oscitas_tabs = array();
6
-
7
- function osc_theme_tabs( $params, $content = null) {
8
- global $_oscitas_tabs;
9
- extract( shortcode_atts( array(
10
- 'id' => count($_oscitas_tabs),
11
- ), $params ) );
12
- $_oscitas_tabs[$id] = array();
13
- do_shortcode($content);
14
- $scontent = '<ul class="nav nav-tabs" id="oscitas-tabs-'.$id.'">'.implode('',$_oscitas_tabs[$id]['tabs'] ).'</ul><div
15
- class="tab-content">'.implode('',
16
- $_oscitas_tabs[$id]['panes']).'</div>';
17
- if(trim($scontent) != ""){
18
- $output = '<div>'.$scontent;
19
- $output .= '</div>';
20
- return $output;
21
- } else {
22
- return "";
23
- }
24
- }
25
- add_shortcode( 'tabs', 'osc_theme_tabs' );
26
-
27
- function osc_theme_tab( $params, $content = null) {
28
- global $_oscitas_tabs;
29
- extract( shortcode_atts( array(
30
- 'title' => 'title',
31
- 'active' => '',
32
- ), $params ) );
33
-
34
- $index = count($_oscitas_tabs)-1;
35
- $pane_id = 'pane-'.$index.'-'. count($_oscitas_tabs[$index]['tabs']);
36
- $_oscitas_tabs[$index]['tabs'][] = '<li class="'.$active.'"><a href="#'.$pane_id.'" data-toggle="tab">'.$title
37
- .'</a></li>';
38
- $_oscitas_tabs[$index]['panes'][] = '<div class="tab-pane '.$active.'" id="'
39
- .$pane_id.'">'
40
- .do_shortcode
41
- (trim($content)).'</div>';
42
- }
43
- add_shortcode( 'tab', 'osc_theme_tab' );
 
 
 
 
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 Shortcodes',
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 : "1.0"
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&amp;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
- * jQuery UI Accordion (toggles)
4
- * **********************************************************/
5
-
6
- $_oscitas_accordion = array();
7
- function osc_theme_toggles( $params, $content = null) {
8
- global $_oscitas_accordion;
9
- extract( shortcode_atts( array(
10
- 'id' => count($_oscitas_accordion),
11
- ), $params ) );
12
- $_oscitas_accordion[$id] = array();
13
- $scontent = do_shortcode($content);
14
- if(trim($scontent) != ""){
15
- $output = '<div class="panel-group" id="oscitas-accordion-'.$id.'">'.implode('', $_oscitas_accordion[$id]['details']);
16
- $output .= '</div>';
17
- return $output;
18
- } else {
19
- return "";
20
- }
21
- }
22
- add_shortcode( 'toggles', 'osc_theme_toggles' );
23
-
24
- function osc_theme_toggle( $params, $content = null) {
25
- global $_oscitas_accordion;
26
- extract( shortcode_atts( array(
27
- 'title' => 'title'
28
- ), $params ) );
29
- $index = count($_oscitas_accordion)-1;
30
- $id = 'details-'.$index.'-'.count($_oscitas_accordion[$index]['details']);
31
- $_oscitas_accordion[$index]['details'][] = <<<EOS
32
- <div class="panel panel-default">
33
- <div class="panel-heading">
34
- <h4 class="panel-title">
35
- <a class="accordion-toggle" data-toggle="collapse"
36
- data-parent="#oscitas-accordion-{$index}"
37
- href="#{$id}">
38
- {$title}
39
- </a>
40
- </h4>
41
- </div>
42
- <div id="{$id}" class="panel-collapse collapse">
43
- <div class="panel-body">{$content}</div>
44
- </div>
45
- </div>
46
- EOS;
47
-
48
- }
49
- add_shortcode( 'toggle', 'osc_theme_toggle' );
 
 
 
 
 
 
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 : 'Toggles Shortcodes',
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 : "Toggles Shortcode",
18
- author : 'Oscitas Themes',
19
- authorurl : 'http://www.oscitasthemes.com/',
20
- infourl : 'http://www.oscitasthemes.com/',
21
- version : "1.0"
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
- ), $params));
14
- $out = '';
15
- if ($type == 'link') {
16
- $out = '<a href="' . $link . '" data-placement="' . $style . '" title="' . $tooltip . '" class="osc_tooltip">' . $content . '</a>
17
- ';
18
- } elseif ($type == 'button') {
19
- $out = '<button type="button" data-toggle="tooltip" data-placement="' . $style . '" title="' . $tooltip . '" class="osc_tooltip">' . $content . '</button>';
20
- }
21
-
22
-
23
- $out .= "
24
- <script>
25
- jQuery(document).ready(function() {
26
- jQuery('.osc_tooltip').tooltip();
27
- });
28
- </script>
29
- ";
30
-
31
- return $out;
32
- }
33
-
34
- add_shortcode('tooltip', 'osc_theme_tooltip');
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
- jQuery.fancybox({
9
- 'type' : 'inline',
10
- 'title' : 'Tooltip Shortcode',
11
- 'href' : '#oscitas-form-tooltip',
12
- helpers: {
13
- title : {
14
- type : 'over',
15
- position:'top'
16
- }
17
- }
18
- });
19
- }
20
- });
21
- },
22
- createControl: function(n, cm) {
23
- return null;
24
- },
25
- getInfo: function() {
26
- return {
27
- longname: "Tooltip Shortcode",
28
- author : 'Oscitas Themes',
29
- authorurl : 'http://www.oscitasthemes.com/',
30
- infourl : 'http://www.oscitasthemes.com/',
31
- version : "1.0"
32
- };
33
- }
34
- });
35
- tinymce.PluginManager.add('oscitastooltip', tinymce.plugins.oscitasTooltip);
36
- })();
37
-
38
- jQuery(function() {
39
- // creates a form to be displayed everytime the button is clicked
40
- // you should achieve this using AJAX instead of direct html code like this
41
- var form = jQuery('<div id="oscitas-form-tooltip"><table id="oscitas-table" class="form-table">\
42
- <tr>\
43
- <th><label for="oscitas-tooltip-style">Tooltip Style:</label></th>\
44
- <td><select name="type" id="oscitas-tooltip-style">\
45
- <option value="top">Top</option>\
46
- <option value="bottom">Bottom</option>\
47
- <option value="left">Left</option>\
48
- <option value="right">Right</option>\
49
- <option value="auto">Auto</option>\
50
- </select><br />\
51
- </td>\
52
- </tr>\
53
- <tr>\
54
- <th><label for="oscitas-tooltip-text">Tooltip Text:</label></th>\
55
- <td><input type="text" name="tooltip-text" id="oscitas-tooltip-text" value="Tooltip"/><br />\
56
- </td>\
57
- </tr>\
58
- <tr>\
59
- <th><label for="oscitas-tooltip-type">Type:</label></th>\
60
- <td><select name="type" id="oscitas-tooltip-type">\
61
- <option value="link">Link</option>\
62
- <option value="button">Button</option>\
63
- </select><br />\
64
- </td>\
65
- </tr >\
66
- <tr id="oscitas-tooltip-link-tr">\
67
- <th><label for="oscitas-tooltip-link">Link:</label></th>\
68
- <td><input type="text" name="tooltip-link" id="oscitas-tooltip-link" value="http://www.yoursite.com"/><br />\
69
- </td>\
70
- </tr>\
71
- <tr>\
72
- <th><label for="oscitas-tooltip-link-text">Value:</label></th>\
73
- <td><input type="text" name="link-text" id="oscitas-tooltip-link-text" value="Hover Me"/><br />\
74
- </td>\
75
- </tr>\
76
- </table>\
77
- <p class="submit">\
78
- <input type="button" id="oscitas-tooltip-submit" class="button-primary" value="Insert Tooltip" name="submit" />\
79
- </p>\
80
- </div>');
81
-
82
- var table = form.find('table');
83
- form.appendTo('body').hide();
84
- var colors = ['color', 'bgcolor'];
85
- jQuery('table tr:visible:even').css('background', '#F0F0F0');
86
- jQuery('table tr:visible:odd').css('background', '#DADADD');
87
- form.find('#oscitas-tooltip-type').change(function(){
88
- if(jQuery(this).val()=='link'){
89
- table.find('#oscitas-tooltip-link-tr').show();
90
- table.find('#oscitas-tooltip-link').val('http://www.yoursite.com');
91
- } else{
92
- table.find('#oscitas-tooltip-link-tr').hide();
93
- table.find('#oscitas-tooltip-link').val('');
94
-
95
- }
96
- jQuery('table tr:visible:even').css('background', '#F0F0F0');
97
- jQuery('table tr:visible:odd').css('background', '#DADADD');
98
- })
99
-
100
- // handles the click event of the submit button
101
- form.find('#oscitas-tooltip-submit').click(function() {
102
- // defines the options and their default values
103
- // again, this is not the most elegant way to do this
104
- // but well, this gets the job done nonetheless
105
-
106
- var shortcode = '[tooltip';
107
- shortcode += ' type="' + table.find('#oscitas-tooltip-type').val();
108
-
109
- shortcode += '" ';
110
-
111
- shortcode += ' link="' + table.find('#oscitas-tooltip-link').val();
112
-
113
- shortcode += '" ';
114
- shortcode += ' tooltip="' + table.find('#oscitas-tooltip-text').val();
115
-
116
- shortcode += '" ';
117
- shortcode += ' style="' + table.find('#oscitas-tooltip-style').val();
118
-
119
- shortcode += '" ';
120
-
121
- shortcode += ']';
122
- shortcode+= table.find('#oscitas-tooltip-link-text').val();
123
- shortcode+='[/tooltip]';
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
-
 
 
 
 
 
 
 
 
 
 
 
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
- $result = '<div class="row">';
9
- //echo '<textarea>'.$content.'</textarea>';
10
- $content = str_replace("]<br />", ']', $content);
11
- $content = str_replace("<br />\n[", '[', $content);
12
- $result .= do_shortcode($content);
13
- $result .= '</div>';
14
-
15
- return force_balance_tags($result);
16
- }
17
-
18
- add_shortcode('row', 'osc_theme_row');
19
- /* * *********************************************************
20
- * TWO
21
- * ********************************************************* */
22
-
23
- function osc_theme_one_half($params, $content = null) {
24
- extract(shortcode_atts(array(
25
- 'md' => '',
26
- 'sm' => '',
27
- 'xs' => '',
28
- 'off' => ''
29
- ), $params));
30
- if ($md == 12) {
31
- $mds = '';
32
- } else {
33
- $mds = 'col-md-' . $md;
34
- }
35
- if ($sm == 12) {
36
- $sms = '';
37
- } else {
38
- $sms = 'col-sm-' . $sm;
39
- }
40
- if ($xs == 12) {
41
- $xss = '';
42
- } else {
43
- $xss = 'col-xs-' . $xs;
44
- }
45
- $result = '<div class="col-lg-6 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-half">';
46
- $result .= do_shortcode($content);
47
- $result .= '</div>';
48
-
49
- return force_balance_tags($result);
50
- }
51
-
52
- add_shortcode('one_half', 'osc_theme_one_half');
53
-
54
- function osc_theme_one_half_last($params, $content = null) {
55
- extract(shortcode_atts(array(
56
- 'md' => '',
57
- 'sm' => '',
58
- 'xs' => '',
59
- 'off' => ''
60
- ), $params));
61
- if ($md == 12) {
62
- $mds = '';
63
- } else {
64
- $mds = 'col-md-' . $md;
65
- }
66
- if ($sm == 12) {
67
- $sms = '';
68
- } else {
69
- $sms = 'col-sm-' . $sm;
70
- }
71
- if ($xs == 12) {
72
- $xss = '';
73
- } else {
74
- $xss = 'col-xs-' . $xs;
75
- }
76
- $result = '<div class="col-lg-6 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-half-last">';
77
- $result .= do_shortcode($content);
78
- $result .= '</div>';
79
-
80
- return force_balance_tags($result);
81
- }
82
-
83
- add_shortcode('one_half_last', 'osc_theme_one_half_last');
84
-
85
- /* * *********************************************************
86
- * THIRD
87
- * ********************************************************* */
88
-
89
- function osc_theme_one_third($params, $content = null) {
90
- extract(shortcode_atts(array(
91
- 'md' => '',
92
- 'sm' => '',
93
- 'xs' => '',
94
- 'off' => ''
95
- ), $params));
96
- if ($md == 12) {
97
- $mds = '';
98
- } else {
99
- $mds = 'col-md-' . $md;
100
- }
101
- if ($sm == 12) {
102
- $sms = '';
103
- } else {
104
- $sms = 'col-sm-' . $sm;
105
- }
106
- if ($xs == 12) {
107
- $xss = '';
108
- } else {
109
- $xss = 'col-xs-' . $xs;
110
- }
111
- $result = '<div class="sc-column col-lg-4 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' ">'; //one-third
112
- $result .= do_shortcode($content);
113
- $result .= '</div>';
114
-
115
- return force_balance_tags($result);
116
- }
117
-
118
- add_shortcode('one_third', 'osc_theme_one_third');
119
-
120
- function osc_theme_one_third_last($params, $content = null) {
121
- extract(shortcode_atts(array(
122
- 'md' => '',
123
- 'sm' => '',
124
- 'xs' => '',
125
- 'off' => ''
126
- ), $params));
127
- if ($md == 12) {
128
- $mds = '';
129
- } else {
130
- $mds = 'col-md-' . $md;
131
- }
132
- if ($sm == 12) {
133
- $sms = '';
134
- } else {
135
- $sms = 'col-sm-' . $sm;
136
- }
137
- if ($xs == 12) {
138
- $xss = '';
139
- } else {
140
- $xss = 'col-xs-' . $xs;
141
- }
142
- $result = '<div class="col-lg-4 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' column-last">'; // one-third-last
143
- $result .= do_shortcode($content);
144
- $result .= '</div>';
145
-
146
- return force_balance_tags($result);
147
- }
148
-
149
- add_shortcode('one_third_last', 'osc_theme_one_third_last');
150
-
151
- function osc_theme_two_third($params, $content = null) {
152
- extract(shortcode_atts(array(
153
- 'md' => '',
154
- 'sm' => '',
155
- 'xs' => '',
156
- 'off' => ''
157
- ), $params));
158
- if ($md == 12) {
159
- $mds = '';
160
- } else {
161
- $mds = 'col-md-' . $md;
162
- }
163
- if ($sm == 12) {
164
- $sms = '';
165
- } else {
166
- $sms = 'col-sm-' . $sm;
167
- }
168
- if ($xs == 12) {
169
- $xss = '';
170
- } else {
171
- $xss = 'col-xs-' . $xs;
172
- }
173
- $result = '<div class=" col-lg-8 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' ">'; //two-third
174
- $result .= do_shortcode($content);
175
- $result .= '</div>';
176
-
177
- return force_balance_tags($result);
178
- }
179
-
180
- add_shortcode('two_third', 'osc_theme_two_third');
181
-
182
- function osc_theme_two_third_last($params, $content = null) {
183
- extract(shortcode_atts(array(
184
- 'md' => '',
185
- 'sm' => '',
186
- 'xs' => '',
187
- 'off' => ''
188
- ), $params));
189
- if ($md == 12) {
190
- $mds = '';
191
- } else {
192
- $mds = 'col-md-' . $md;
193
- }
194
- if ($sm == 12) {
195
- $sms = '';
196
- } else {
197
- $sms = 'col-sm-' . $sm;
198
- }
199
- if ($xs == 12) {
200
- $xss = '';
201
- } else {
202
- $xss = 'col-xs-' . $xs;
203
- }
204
- $result = '<div class="col-lg-8 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' column-last ">'; //two-third-last
205
- $result .= do_shortcode($content);
206
- $result .= '</div>';
207
-
208
- return force_balance_tags($result);
209
- }
210
-
211
- add_shortcode('two_third_last', 'osc_theme_two_third_last');
212
-
213
- /* * *********************************************************
214
- * FOURTH
215
- * ********************************************************* */
216
-
217
- function osc_theme_one_fourth($params, $content = null) {
218
- extract(shortcode_atts(array(
219
- 'md' => '',
220
- 'sm' => '',
221
- 'xs' => '',
222
- 'off' => ''
223
- ), $params));
224
- if ($md == 12) {
225
- $mds = '';
226
- } else {
227
- $mds = 'col-md-' . $md;
228
- }
229
- if ($sm == 12) {
230
- $sms = '';
231
- } else {
232
- $sms = 'col-sm-' . $sm;
233
- }
234
- if ($xs == 12) {
235
- $xss = '';
236
- } else {
237
- $xss = 'col-xs-' . $xs;
238
- }
239
- $result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-fourth">';
240
- $result .= do_shortcode($content);
241
- $result .= '</div>';
242
-
243
- return force_balance_tags($result);
244
- }
245
-
246
- add_shortcode('one_fourth', 'osc_theme_one_fourth');
247
-
248
- function osc_theme_one_fourth_last($params, $content = null) {
249
- extract(shortcode_atts(array(
250
- 'md' => '',
251
- 'sm' => '',
252
- 'xs' => '',
253
- 'off' => ''
254
- ), $params));
255
- if ($md == 12) {
256
- $mds = '';
257
- } else {
258
- $mds = 'col-md-' . $md;
259
- }
260
- if ($sm == 12) {
261
- $sms = '';
262
- } else {
263
- $sms = 'col-sm-' . $sm;
264
- }
265
- if ($xs == 12) {
266
- $xss = '';
267
- } else {
268
- $xss = 'col-xs-' . $xs;
269
- }
270
- $result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' column-last one-fourth-last">';
271
- $result .= do_shortcode($content);
272
- $result .= '</div>';
273
-
274
- return force_balance_tags($result);
275
- }
276
-
277
- add_shortcode('one_fourth_last', 'osc_theme_one_fourth_last');
278
-
279
- function osc_theme_three_fourth($params, $content = null) {
280
- extract(shortcode_atts(array(
281
- 'md' => '',
282
- 'sm' => '',
283
- 'xs' => '',
284
- 'off' => ''
285
- ), $params));
286
- if ($md == 12) {
287
- $mds = '';
288
- } else {
289
- $mds = 'col-md-' . $md;
290
- }
291
- if ($sm == 12) {
292
- $sms = '';
293
- } else {
294
- $sms = 'col-sm-' . $sm;
295
- }
296
- if ($xs == 12) {
297
- $xss = '';
298
- } else {
299
- $xss = 'col-xs-' . $xs;
300
- }
301
- $result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' three-fourth">';
302
- $result .= do_shortcode($content);
303
- $result .= '</div>';
304
-
305
- return force_balance_tags($result);
306
- }
307
-
308
- add_shortcode('three_fourth', 'osc_theme_three_fourth');
309
-
310
- function osc_theme_three_fourth_last($params, $content = null) {
311
- extract(shortcode_atts(array(
312
- 'md' => '',
313
- 'sm' => '',
314
- 'xs' => '',
315
- 'off' => ''
316
- ), $params));
317
- if ($md == 12) {
318
- $mds = '';
319
- } else {
320
- $mds = 'col-md-' . $md;
321
- }
322
- if ($sm == 12) {
323
- $sms = '';
324
- } else {
325
- $sms = 'col-sm-' . $sm;
326
- }
327
- if ($xs == 12) {
328
- $xss = '';
329
- } else {
330
- $xss = 'col-xs-' . $xs;
331
- }
332
- $result = '<div class="col-lg-6 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' column-last three-fourth-last">';
333
- $result .= do_shortcode($content);
334
- $result .= '</div>';
335
-
336
- return force_balance_tags($result);
337
- }
338
-
339
- add_shortcode('three_fourth_last', 'osc_theme_three_fourth_last');
340
-
341
- function osc_theme_one_fourth_second($params, $content = null) {
342
- extract(shortcode_atts(array(
343
- 'md' => '',
344
- 'sm' => '',
345
- 'xs' => '',
346
- 'off' => ''
347
- ), $params));
348
- if ($md == 12) {
349
- $mds = '';
350
- } else {
351
- $mds = 'col-md-' . $md;
352
- }
353
- if ($sm == 12) {
354
- $sms = '';
355
- } else {
356
- $sms = 'col-sm-' . $sm;
357
- }
358
- if ($xs == 12) {
359
- $xss = '';
360
- } else {
361
- $xss = 'col-xs-' . $xs;
362
- }
363
- $result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-fourth-second">';
364
- $result .= do_shortcode($content);
365
- $result .= '</div>';
366
-
367
- return force_balance_tags($result);
368
- }
369
-
370
- add_shortcode('one_fourth_second', 'osc_theme_one_fourth_second');
371
-
372
- function osc_theme_one_fourth_third($params, $content = null) {
373
- extract(shortcode_atts(array(
374
- 'md' => '',
375
- 'sm' => '',
376
- 'xs' => '',
377
- 'off' => ''
378
- ), $params));
379
- if ($md == 12) {
380
- $mds = '';
381
- } else {
382
- $mds = 'col-md-' . $md;
383
- }
384
- if ($sm == 12) {
385
- $sms = '';
386
- } else {
387
- $sms = 'col-sm-' . $sm;
388
- }
389
- if ($xs == 12) {
390
- $xss = '';
391
- } else {
392
- $xss = 'col-xs-' . $xs;
393
- }
394
-
395
- $result = '<div class="col-lg-3 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-fourth-third">';
396
- $result .= do_shortcode($content);
397
- $result .= '</div>';
398
-
399
- return force_balance_tags($result);
400
- }
401
-
402
- add_shortcode('one_fourth_third', 'osc_theme_one_fourth_third');
403
-
404
- function osc_theme_one_half_second($params, $content = null) {
405
- extract(shortcode_atts(array(
406
- 'md' => '',
407
- 'sm' => '',
408
- 'xs' => '',
409
- 'off' => ''
410
- ), $params));
411
- if ($md == 12) {
412
- $mds = '';
413
- } else {
414
- $mds = 'col-md-' . $md;
415
- }
416
- if ($sm == 12) {
417
- $sms = '';
418
- } else {
419
- $sms = 'col-sm-' . $sm;
420
- }
421
- if ($xs == 12) {
422
- $xss = '';
423
- } else {
424
- $xss = 'col-xs-' . $xs;
425
- }
426
- $result = '<div class="col-lg-6 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-half-second">';
427
- $result .= do_shortcode($content);
428
- $result .= '</div>';
429
-
430
- return force_balance_tags($result);
431
- }
432
-
433
- add_shortcode('one_half_second', 'osc_theme_one_half_second');
434
-
435
- function osc_theme_one_third_second($params, $content = null) {
436
- extract(shortcode_atts(array(
437
- 'md' => '',
438
- 'sm' => '',
439
- 'xs' => '',
440
- 'off' => ''
441
- ), $params));
442
- if ($md == 12) {
443
- $mds = '';
444
- } else {
445
- $mds = 'col-md-' . $md;
446
- }
447
- if ($sm == 12) {
448
- $sms = '';
449
- } else {
450
- $sms = 'col-sm-' . $sm;
451
- }
452
- if ($xs == 12) {
453
- $xss = '';
454
- } else {
455
- $xss = 'col-xs-' . $xs;
456
- }
457
- $result = '<div class="col-lg-4 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-third-second">';
458
- $result .= do_shortcode($content);
459
- $result .= '</div>';
460
-
461
- return force_balance_tags($result);
462
- }
463
-
464
- add_shortcode('one_third_second', 'osc_theme_one_third_second');
465
-
466
- function osc_theme_one_column($params, $content = null) {
467
- extract(shortcode_atts(array(
468
- 'md' => '',
469
- 'sm' => '',
470
- 'xs' => '',
471
- 'off' => ''
472
- ), $params));
473
- if ($md == 12) {
474
- $mds = '';
475
- } else {
476
- $mds = 'col-md-' . $md;
477
- }
478
- if ($sm == 12) {
479
- $sms = '';
480
- } else {
481
- $sms = 'col-sm-' . $sm;
482
- }
483
- if ($xs == 12) {
484
- $xss = '';
485
- } else {
486
- $xss = 'col-xs-' . $xs;
487
- }
488
- $result = '<div class="col-lg-12 ' . $mds . ' ' . $sms . ' ' . $xss . ' col-lg-offset-' . $off . ' one-column">';
489
- $result .= do_shortcode($content);
490
- $result .= '</div>';
491
-
492
- return force_balance_tags($result);
493
- }
494
-
495
- add_shortcode('one_column', 'osc_theme_one_column');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Shortcodes',
6
- image : url+'/icon.png',
7
- onclick : function() {
8
- jQuery.fancybox({
9
- 'type' : 'inline',
10
- 'title' : 'Columns Shortcode',
11
- 'minHeight': 410,
12
- 'href' : '#oscitas-form-wpcolumns',
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 : "Columns Shortcode",
30
- author : 'Oscitas Themes',
31
- authorurl : 'http://www.oscitasthemes.com/',
32
- infourl : 'http://www.oscitasthemes.com/',
33
- version : "1.0"
34
- };
35
- }
36
- });
37
- tinymce.PluginManager.add('oscitaswpcolumns', tinymce.plugins.oscitasWpcolumns);
38
- })();
39
-
40
- jQuery(function(){
41
- // creates a form to be displayed everytime the button is clicked
42
- // you should achieve this using AJAX instead of direct html code like this
43
- var form = jQuery('<div id="oscitas-form-wpcolumns">\
44
- <table id="oscitas-table" class="form-table">\
45
- <tr>\
46
- <th><label for="oscitas-no-of-wpcolumns">Number of columns</label></th>\
47
- <td><select name="type" id="oscitas-no-of-wpcolumns">\
48
- <option value="1" selected="selected">One column</option>\
49
- <option value="2">Two columns</option>\
50
- <option value="3">Three columns</option>\
51
- <option value="4">Four columns</option>\
52
- </select><br />\
53
- </td>\
54
- </tr>\
55
- <tr id="wptwo" style="display:none;">\
56
- <th><label for="oscitas-two-columns">2 column division</label></th>\
57
- <td><select name="type" id="oscitas-two-columns">\
58
- <option value="one_half$one_half_last">1/2-1/2</option>\
59
- <option value="one_third$two_third_last">1/3-2/3</option>\
60
- <option value="two_third$one_third_last">2/3-1/3</option>\
61
- <option value="one_fourth$three_fourth_last">1/4-3/4</option>\
62
- <option value="three_fourth$one_fourth_last">3/4-1/4</option>\
63
- </select> For Large Screen<br />\
64
- </td>\
65
- </tr>\
66
- <tr id="wpthree" style="display:none;">\
67
- <th><label for="oscitas-three-columns">3 column division</label></th>\
68
- <td><select name="type" id="oscitas-three-columns">\
69
- <option value="one_fourth$one_half_second$one_fourth_last">1/4-2/4-1/4</option>\
70
- <option value="one_fourth$one_fourth_second$one_half_last">1/4-1/4-2/4</option>\
71
- <option value="one_half$one_fourth_second$one_fourth_last">2/4-1/4-1/4</option>\
72
- <option value="one_third$one_third_second$one_third_last">1/3-1/3-1/3</option>\
73
- </select> For Large Screen<br />\
74
- </tr>\
75
- <tr id="">\
76
- <th><label for="append_column_table">Column Specification</label></th>\
77
- <td id="append_column_table"></td>\
78
- </tr>\
79
- </table>\
80
- <p class="submit">\
81
- <input type="button" id="oscitas-submit-wp_column" class="button-primary" value="Insert Columns" name="submit" /><small><br/>if you select four column it will 1/4 each</small>\
82
- </p>\
83
- </div>');
84
- var table = form.find('table');
85
- form.appendTo('body').hide();
86
-
87
- function show_table(){
88
-
89
- var ele='',e=0,sm,md,off,xs,sel;
90
- var col= jQuery('#oscitas-no-of-wpcolumns').val();
91
- ele = '<i>You can select different column style for different screens such as medium, small(e.g 480px), x-small(e.g 320px)</i><br/>';
92
- ele+= '<table id="appended" class="tb_multiple_column"><thead><tr><th>Column</th><th>Medium Screen</th><th>Small Screen</th><th>x-small Screen</th><th>Large Screen Offset</th></tr></thead>';
93
- for(var i=1;i<=col;i++){
94
- sm='<select name="sm['+i+']" id="sm'+i+'">';
95
- for( e=1;e<=12;e++){
96
- if(e==12){
97
- sel='selected=selected'
98
- }
99
- sm+='<option value="'+e+'" '+sel+'>'+e+'</option>';
100
- }
101
- sm+='</select>';
102
-
103
-
104
- md='<select name="md['+i+']" id="md'+i+'">';
105
- for( e=1;e<=12;e++){
106
- if(e==12){
107
- sel='selected=selected'
108
- }
109
- md+='<option value="'+e+'" '+sel+'>'+e+'</option>';
110
- }
111
- md+='</select>';
112
-
113
- xs='<select name="xs['+i+']" id="xs'+i+'">';
114
- for( e=1;e<=12;e++){
115
- if(e==12){
116
- sel='selected=selected'
117
- }
118
- xs+='<option value="'+e+'" '+sel+'>'+e+'</option>';
119
- }
120
- xs+='</select>';
121
-
122
- off='<select name="off['+i+']" id="off'+i+'">';
123
- for( e=0;e<=12;e++){
124
-
125
- off+='<option value="'+e+'">'+e+'</option>';
126
- }
127
- off+='</select>';
128
- ele+='<tr><td>'+i+'</td><td>'+md+'</td><td>'+sm+'</td><td>'+xs+'</td><td>'+off+'</td></tr>';
129
- }
130
- ele +='</table>';
131
- table.find('#append_column_table').html(ele);
132
-
133
- jQuery('#oscitas-form-wpcolumns table tr:visible:even').css('background', '#F0F0F0');
134
- jQuery('#oscitas-form-wpcolumns table tr:visible:odd').css('background', '#DADADD');
135
- }
136
-
137
- show_table();
138
- jQuery('#oscitas-no-of-wpcolumns').change(function(){
139
-
140
- var noOfColumns = jQuery(this).val();
141
-
142
- if(2 == noOfColumns){
143
-
144
- jQuery("#wpthree").hide();
145
- jQuery("#wptwo").show();
146
- }
147
- else if(3 == noOfColumns){
148
- jQuery("#wptwo").hide();
149
- jQuery("#wpthree").show();
150
- }
151
- else{
152
- jQuery("#wptwo").hide();
153
- jQuery("#wpthree").hide();
154
-
155
- }
156
- show_table();
157
-
158
-
159
-
160
- });
161
-
162
-
163
- // handles the click event of the submit button
164
- form.find('#oscitas-submit-wp_column').click(function(){
165
- // defines the options and their default values
166
- // again, this is not the most elegant way to do this
167
- // but well, this gets the job done nonetheless
168
- var a_md=[],a_sm=[],a_xs=[],a_off=[],j=0;
169
- var options = {
170
- 'title' : 'Insert Columns',
171
- 'link' : '',
172
- 'description' : '100%',
173
- 'width' : '180px',
174
- 'height' : '350px',
175
- 'version' : '',
176
- 'position' : '',
177
- 'bgcolor' : '',
178
- 'color' : ''
179
- };
180
- var noOfColumns = jQuery('#oscitas-no-of-wpcolumns').val();
181
- for(var i=1;i<=parseInt(noOfColumns);i++){
182
- j=i-1;
183
- a_md[j] = jQuery('#md'+i).val();
184
- a_sm[j] = jQuery('#sm'+i).val();
185
- a_xs[j] = jQuery('#xs'+i).val();
186
- a_off[j] = jQuery('#off'+i).val();
187
- }
188
-
189
- var shortcode = '';
190
-
191
- if(1==noOfColumns){
192
- shortcode ='[row]<br/>[one_column md="'+a_md[0]+'" sm="'+a_sm[0]+'" xs="'+a_xs[0]+'" off="'+a_off[0]+'"]<br/>text<br/>[/one_column]<br/>[/row]';
193
- }else if(2==noOfColumns){
194
- var value = jQuery('#oscitas-two-columns').val();
195
- var selected = value.split("$");
196
- shortcode ='[row]<br/>['+selected[0]+' md="'+a_md[0]+'" sm="'+a_sm[0]+'" xs="'+a_xs[0]+'" off="'+a_off[0]+'"]<br/>text<br/>[/'+selected[0]+']<br/>['+selected[1]+' md="'+a_md[1]+'" sm="'+a_sm[1]+'" xs="'+a_xs[1]+'" off="'+a_off[1]+'"]<br/>text<br/>[/'+selected[1]+']<br/>[/row]';
197
- }else if(3==noOfColumns){
198
- var value = jQuery('#oscitas-three-columns').val();
199
- var selected = value.split("$");
200
- shortcode = '[row]<br/>['+selected[0]+' md="'+a_md[0]+'" sm="'+a_sm[0]+'" xs="'+a_xs[0]+'" off="'+a_off[0]+'"]<br/>text<br/>[/'+selected[0]+']<br/>['+selected[1]+' md="'+a_md[1]+'" sm="'+a_sm[1]+'" xs="'+a_xs[1]+'" off="'+a_off[1]+'"]<br/>text<br/>[/'+selected[1]+']<br/>['+selected[2]+' md="'+a_md[2]+'" sm="'+a_sm[2]+'" xs="'+a_xs[2]+'" off="'+a_off[2]+'"]<br/>text<br/>[/'+selected[2]+']<br/>[/row]';
201
- }else if(4==noOfColumns){
202
- shortcode = '[row]<br/>[one_fourth md="'+a_md[0]+'" sm="'+a_sm[0]+'" xs="'+a_xs[0]+'" off="'+a_off[0]+'"]<br/>text<br/>[/one_fourth]<br/>[one_fourth_second md="'+a_md[1]+'" sm="'+a_sm[1]+'" xs="'+a_xs[1]+'" off="'+a_off[1]+'"]<br/>text<br/>[/one_fourth_second]<br/>[one_fourth_third md="'+a_md[1]+'" sm="'+a_sm[1]+'" xs="'+a_xs[1]+'" off="'+a_off[1]+'"]<br/>text<br/>[/one_fourth_third]<br/>[one_fourth_last md="'+a_md[1]+'" sm="'+a_sm[1]+'" xs="'+a_xs[1]+'" off="'+a_off[1]+'"]<br/>text<br/>[/one_fourth_last]<br/>[/row]';
203
-
204
- }
205
- // inserts the shortcode into the active editor
206
- tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
207
- // closes Thickbox
208
- jQuery.fancybox.close();
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
- #click_icon_list {
828
  background: none repeat scroll 0 0 #F4F4F4;
829
  border: 1px solid #AAAAAA;
830
  height: 22px;
831
  width: 190px;
832
  }
833
- #osc_show_iconlist {
834
  border: 3px double #A6A6A6;
835
  display: inline-block;
836
  margin-top: 5px;
837
  }
838
- #osc_show_iconlist ul li{
839
  text-align: center;
840
  padding:4px;
841
  }
842
- #osc_show_iconlist ul li:hover, .osc_icon_selected{
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
- .tb_multiple_column {
 
 
 
 
 
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
+ }