Changeset 970419
- Timestamp:
- 08/22/2014 07:20:26 AM (12 years ago)
- Location:
- easy-responsive-tabs
- Files:
-
- 10 edited
-
tags/2.2/README.txt (modified) (1 diff)
-
tags/2.2/assets/css/ert_css.php (modified) (1 diff)
-
tags/2.2/assets/js/bootstrap-tabdrop.js (modified) (1 diff)
-
tags/2.2/assets/js/ert_js.php (modified) (1 diff)
-
tags/2.2/easy_res_tab.php (modified) (8 diffs)
-
trunk/README.txt (modified) (1 diff)
-
trunk/assets/css/ert_css.php (modified) (1 diff)
-
trunk/assets/js/bootstrap-tabdrop.js (modified) (1 diff)
-
trunk/assets/js/ert_js.php (modified) (1 diff)
-
trunk/easy_res_tab.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easy-responsive-tabs/tags/2.2/README.txt
r949101 r970419 70 70 71 71 == Changelog == 72 73 = 2.8 = 74 75 * [Fixes] Fixed the Tab Color Issue - Color appears when logged in. 72 76 73 77 = 2.7 = -
easy-responsive-tabs/tags/2.2/assets/css/ert_css.php
r944740 r970419 1 1 <?php 2 session_start(); 2 3 header("Content-type: text/css"); 3 session_start(); 4 if (isset($_SESSION['ert_css'])) { 5 echo $_SESSION['ert_css']; 4 if(isset($_SESSION['ert_css']) && is_array( $_SESSION['ert_css']) && count($_SESSION['ert_css'])){ 5 foreach( $_SESSION['ert_css'] as $val){ 6 echo $val; 7 } 6 8 } 7 ?> -
easy-responsive-tabs/tags/2.2/assets/js/bootstrap-tabdrop.js
r903949 r970419 116 116 117 117 }( window.jQuery ); 118 -
easy-responsive-tabs/tags/2.2/assets/js/ert_js.php
r944740 r970419 2 2 session_start(); 3 3 header("Content-type: text/javascript"); 4 echo 'jQuery(document).ready(function() {'; 5 if (isset($_SESSION['ert_js'])) { 6 echo $_SESSION['ert_js']; 7 unset($_SESSION['ert_js']); 4 if(isset($_SESSION['ert_js']) && is_array( $_SESSION['ert_js']) && count($_SESSION['ert_js'])){ 5 echo 'jQuery(document).ready(function() {'; 6 foreach($_SESSION['ert_js'] as $val){ 7 echo $val; 8 } 9 echo '});'; 8 10 } 9 echo '});';10 ?> -
easy-responsive-tabs/tags/2.2/easy_res_tab.php
r949101 r970419 4 4 Plugin URI: http://www.oscitasthemes.com 5 5 Description: Make bootstrap tabs res. 6 Version: 2. 76 Version: 2.8 7 7 Author: oscitas 8 8 Author URI: http://www.oscitasthemes.com 9 9 License: Under the GPL v2 or later 10 10 */ 11 define('ERT_VERSION', '2. 7');11 define('ERT_VERSION', '2.8'); 12 12 define('ERT_BASE_URL', plugins_url('',__FILE__)); 13 13 define('ERT_ASSETS_URL', ERT_BASE_URL . '/assets/'); … … 21 21 function __construct(){ 22 22 23 $_SESSION['ert_js']=''; 24 //$_SESSION['ert_css']=''; 23 if (!isset($_SESSION['ert_js'])) { 24 $_SESSION['ert_js'] = array(); 25 } 26 if (!isset($_SESSION['ert_css'])) { 27 $_SESSION['ert_css'] = array(); 28 } 25 29 26 30 $pluginmenu=explode('/',plugin_basename(__FILE__)); … … 102 106 public function ert_theme_tabs($params, $content = null) { 103 107 global $_ert_restabs, $shortcode_tags; 108 if (!count($_ert_restabs)) { 109 $_ert_restabs = array('current_id'=>0); 110 } 104 111 global $post; 105 112 $slug = get_post( $post )->post_name; … … 167 174 $output = '<div class="osc-res-tab tabbable '.$class.' '.$position.' '.$alignment.'">' . $scontent; 168 175 $output .= '</div>'; 169 if (!isset($_SESSION['ert_js'])) { 170 $_SESSION['ert_js'] = ''; 171 } 176 177 $jscontent=''; 172 178 if($responsive!='false'){ 173 $autoselect -= ($autoselect ? 1: 0);174 $ _SESSION['ert_js'].= <<<EOF179 // $autoselect -= ($autoselect ? 1: 0); 180 $jscontent.= <<<EOF 175 181 jQuery('#oscitas-restabs-$id').tabdrop({'text': '$text'}); 176 182 EOF; 177 183 } 178 184 179 $ _SESSION['ert_js'].= <<<EOF185 $jscontent.= <<<EOF 180 186 var tabHashId = window.location.hash.substr(1); 181 187 if (tabHashId) { … … 183 189 } 184 190 EOF; 185 if (!isset($_SESSION['ert_css'])) { 186 $_SESSION['ert_css'] = ''; 187 } 188 189 $_SESSION['ert_css'].=$tabcolor.$tabheadcolor.$seltabheadcolor.$tabhovercolor.$seltabcolor.$contentcolor; 191 $_SESSION['ert_js'][$id]=$jscontent; 192 193 $_SESSION['ert_css'][$id]=$tabcolor.$tabheadcolor.$seltabheadcolor.$tabhovercolor.$seltabcolor.$contentcolor; 190 194 //$_SESSION['ert_css'].=$tabcolor.$tabheadcolor.$seltabcolor.$seltabheadcolor.$tabhovercolor.$contentcolor; 191 195 } 196 wp_enqueue_style('ert_tab_css',ERT_ASSETS_URL.$this->rescss_path); 197 wp_enqueue_style('ert_css',ERT_ASSETS_URL.'css/ert_css.php'); 192 198 193 199 $_ert_restabs['current_id'] = $_ert_restabs['current_id']-1; … … 208 214 $_ert_restabs[$index]['tabs'] = array(); 209 215 } 216 if (!isset($_ert_restabs[$index]['panes'])) { 217 $_ert_restabs[$index]['panes'] = array(); 218 } 210 219 $pane_id = 'ert_pane' . $index . '-' . count($_ert_restabs[$index]['tabs']); 211 220 $_ert_restabs[$index]['tabs'][] = '<li class="' . $active . '"><a href="#' . $pane_id . '" data-toggle="tab">' . $title 212 221 . '</a></li>'; 213 $_ert_restabs[$index]['panes'][] = '<li class="tab-pane ' . $active . '" id="' 214 . $pane_id . '">' 215 . do_shortcode 216 (trim($content)) . '</li>'; 222 $_ert_restabs[$index]['panes'][] = '<li class="tab-pane ' . $active . '" id="'. $pane_id . '">' 223 . do_shortcode (trim($content)) . '</li>'; 217 224 } 218 225 public function ert_enqueue_scripts(){ … … 251 258 252 259 } 260 253 261 wp_enqueue_script('ert_tab_js',ERT_ASSETS_URL.$this->resjs_path,array('jquery'),ERT_VERSION,true); 254 wp_enqueue_style('ert_tab_css',ERT_ASSETS_URL.$this->rescss_path); 255 //if (isset($_SESSION['ert_js'])) 256 wp_enqueue_script('ert_js',ERT_ASSETS_URL.'js/ert_js.php',array('jquery','ert_tab_js'),ERT_VERSION,true); 257 //if (isset($_SESSION['ert_css'])) 258 wp_enqueue_style('ert_css',ERT_ASSETS_URL.'css/ert_css.php'); 262 263 wp_enqueue_script('ert_js',ERT_ASSETS_URL.'js/ert_js.php',array('jquery','ert_tab_js'),ERT_VERSION,true); 264 259 265 } 260 266 … … 277 283 if (!session_id()) { 278 284 @session_start(); 279 unset($_SESSION['ert_js']);280 285 } 281 286 } -
easy-responsive-tabs/trunk/README.txt
r949101 r970419 70 70 71 71 == Changelog == 72 73 = 2.8 = 74 75 * [Fixes] Fixed the Tab Color Issue - Color appears when logged in. 72 76 73 77 = 2.7 = -
easy-responsive-tabs/trunk/assets/css/ert_css.php
r944740 r970419 1 1 <?php 2 session_start(); 2 3 header("Content-type: text/css"); 3 session_start(); 4 if (isset($_SESSION['ert_css'])) { 5 echo $_SESSION['ert_css']; 4 if(isset($_SESSION['ert_css']) && is_array( $_SESSION['ert_css']) && count($_SESSION['ert_css'])){ 5 foreach( $_SESSION['ert_css'] as $val){ 6 echo $val; 7 } 6 8 } 7 ?> -
easy-responsive-tabs/trunk/assets/js/bootstrap-tabdrop.js
r810619 r970419 116 116 117 117 }( window.jQuery ); 118 -
easy-responsive-tabs/trunk/assets/js/ert_js.php
r944740 r970419 2 2 session_start(); 3 3 header("Content-type: text/javascript"); 4 echo 'jQuery(document).ready(function() {'; 5 if (isset($_SESSION['ert_js'])) { 6 echo $_SESSION['ert_js']; 7 unset($_SESSION['ert_js']); 4 if(isset($_SESSION['ert_js']) && is_array( $_SESSION['ert_js']) && count($_SESSION['ert_js'])){ 5 echo 'jQuery(document).ready(function() {'; 6 foreach($_SESSION['ert_js'] as $val){ 7 echo $val; 8 } 9 echo '});'; 8 10 } 9 echo '});';10 ?> -
easy-responsive-tabs/trunk/easy_res_tab.php
r949101 r970419 4 4 Plugin URI: http://www.oscitasthemes.com 5 5 Description: Make bootstrap tabs res. 6 Version: 2. 76 Version: 2.8 7 7 Author: oscitas 8 8 Author URI: http://www.oscitasthemes.com 9 9 License: Under the GPL v2 or later 10 10 */ 11 define('ERT_VERSION', '2. 7');11 define('ERT_VERSION', '2.8'); 12 12 define('ERT_BASE_URL', plugins_url('',__FILE__)); 13 13 define('ERT_ASSETS_URL', ERT_BASE_URL . '/assets/'); … … 21 21 function __construct(){ 22 22 23 $_SESSION['ert_js']=''; 24 //$_SESSION['ert_css']=''; 23 if (!isset($_SESSION['ert_js'])) { 24 $_SESSION['ert_js'] = array(); 25 } 26 if (!isset($_SESSION['ert_css'])) { 27 $_SESSION['ert_css'] = array(); 28 } 25 29 26 30 $pluginmenu=explode('/',plugin_basename(__FILE__)); … … 102 106 public function ert_theme_tabs($params, $content = null) { 103 107 global $_ert_restabs, $shortcode_tags; 108 if (!count($_ert_restabs)) { 109 $_ert_restabs = array('current_id'=>0); 110 } 104 111 global $post; 105 112 $slug = get_post( $post )->post_name; … … 167 174 $output = '<div class="osc-res-tab tabbable '.$class.' '.$position.' '.$alignment.'">' . $scontent; 168 175 $output .= '</div>'; 169 if (!isset($_SESSION['ert_js'])) { 170 $_SESSION['ert_js'] = ''; 171 } 176 177 $jscontent=''; 172 178 if($responsive!='false'){ 173 $autoselect -= ($autoselect ? 1: 0);174 $ _SESSION['ert_js'].= <<<EOF179 // $autoselect -= ($autoselect ? 1: 0); 180 $jscontent.= <<<EOF 175 181 jQuery('#oscitas-restabs-$id').tabdrop({'text': '$text'}); 176 182 EOF; 177 183 } 178 184 179 $ _SESSION['ert_js'].= <<<EOF185 $jscontent.= <<<EOF 180 186 var tabHashId = window.location.hash.substr(1); 181 187 if (tabHashId) { … … 183 189 } 184 190 EOF; 185 if (!isset($_SESSION['ert_css'])) { 186 $_SESSION['ert_css'] = ''; 187 } 188 189 $_SESSION['ert_css'].=$tabcolor.$tabheadcolor.$seltabheadcolor.$tabhovercolor.$seltabcolor.$contentcolor; 191 $_SESSION['ert_js'][$id]=$jscontent; 192 193 $_SESSION['ert_css'][$id]=$tabcolor.$tabheadcolor.$seltabheadcolor.$tabhovercolor.$seltabcolor.$contentcolor; 190 194 //$_SESSION['ert_css'].=$tabcolor.$tabheadcolor.$seltabcolor.$seltabheadcolor.$tabhovercolor.$contentcolor; 191 195 } 196 wp_enqueue_style('ert_tab_css',ERT_ASSETS_URL.$this->rescss_path); 197 wp_enqueue_style('ert_css',ERT_ASSETS_URL.'css/ert_css.php'); 192 198 193 199 $_ert_restabs['current_id'] = $_ert_restabs['current_id']-1; … … 208 214 $_ert_restabs[$index]['tabs'] = array(); 209 215 } 216 if (!isset($_ert_restabs[$index]['panes'])) { 217 $_ert_restabs[$index]['panes'] = array(); 218 } 210 219 $pane_id = 'ert_pane' . $index . '-' . count($_ert_restabs[$index]['tabs']); 211 220 $_ert_restabs[$index]['tabs'][] = '<li class="' . $active . '"><a href="#' . $pane_id . '" data-toggle="tab">' . $title 212 221 . '</a></li>'; 213 $_ert_restabs[$index]['panes'][] = '<li class="tab-pane ' . $active . '" id="' 214 . $pane_id . '">' 215 . do_shortcode 216 (trim($content)) . '</li>'; 222 $_ert_restabs[$index]['panes'][] = '<li class="tab-pane ' . $active . '" id="'. $pane_id . '">' 223 . do_shortcode (trim($content)) . '</li>'; 217 224 } 218 225 public function ert_enqueue_scripts(){ … … 251 258 252 259 } 260 253 261 wp_enqueue_script('ert_tab_js',ERT_ASSETS_URL.$this->resjs_path,array('jquery'),ERT_VERSION,true); 254 wp_enqueue_style('ert_tab_css',ERT_ASSETS_URL.$this->rescss_path); 255 //if (isset($_SESSION['ert_js'])) 256 wp_enqueue_script('ert_js',ERT_ASSETS_URL.'js/ert_js.php',array('jquery','ert_tab_js'),ERT_VERSION,true); 257 //if (isset($_SESSION['ert_css'])) 258 wp_enqueue_style('ert_css',ERT_ASSETS_URL.'css/ert_css.php'); 262 263 wp_enqueue_script('ert_js',ERT_ASSETS_URL.'js/ert_js.php',array('jquery','ert_tab_js'),ERT_VERSION,true); 264 259 265 } 260 266 … … 277 283 if (!session_id()) { 278 284 @session_start(); 279 unset($_SESSION['ert_js']);280 285 } 281 286 }
Note: See TracChangeset
for help on using the changeset viewer.