Plugin Directory

Changeset 970419


Ignore:
Timestamp:
08/22/2014 07:20:26 AM (12 years ago)
Author:
oscitas
Message:

2.8

  • [Fixes] Fixed the Tab Color Issue - Color appears when logged in.
Location:
easy-responsive-tabs
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • easy-responsive-tabs/tags/2.2/README.txt

    r949101 r970419  
    7070
    7171== Changelog ==
     72
     73= 2.8 =
     74
     75* [Fixes] Fixed the Tab Color Issue - Color appears when logged in.
    7276
    7377= 2.7 =
  • easy-responsive-tabs/tags/2.2/assets/css/ert_css.php

    r944740 r970419  
    11<?php
     2session_start();
    23header("Content-type: text/css");
    3 session_start();
    4 if (isset($_SESSION['ert_css'])) {
    5     echo $_SESSION['ert_css'];
     4if(isset($_SESSION['ert_css']) && is_array( $_SESSION['ert_css']) && count($_SESSION['ert_css'])){
     5    foreach( $_SESSION['ert_css'] as $val){
     6        echo $val;
     7    }
    68}
    7 ?>
  • easy-responsive-tabs/tags/2.2/assets/js/bootstrap-tabdrop.js

    r903949 r970419  
    116116
    117117}( window.jQuery );
     118
  • easy-responsive-tabs/tags/2.2/assets/js/ert_js.php

    r944740 r970419  
    22session_start();
    33header("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']);
     4if(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 '});';
    810}
    9 echo '});';
    10 ?>
  • easy-responsive-tabs/tags/2.2/easy_res_tab.php

    r949101 r970419  
    44  Plugin URI: http://www.oscitasthemes.com
    55  Description: Make bootstrap tabs res.
    6   Version: 2.7
     6  Version: 2.8
    77  Author: oscitas
    88  Author URI: http://www.oscitasthemes.com
    99  License: Under the GPL v2 or later
    1010 */
    11 define('ERT_VERSION', '2.7');
     11define('ERT_VERSION', '2.8');
    1212define('ERT_BASE_URL', plugins_url('',__FILE__));
    1313define('ERT_ASSETS_URL', ERT_BASE_URL . '/assets/');
     
    2121    function __construct(){
    2222
    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        }
    2529
    2630        $pluginmenu=explode('/',plugin_basename(__FILE__));
     
    102106    public function ert_theme_tabs($params, $content = null) {
    103107        global $_ert_restabs, $shortcode_tags;
     108        if (!count($_ert_restabs)) {
     109            $_ert_restabs = array('current_id'=>0);
     110        }
    104111        global $post;
    105112        $slug = get_post( $post )->post_name;
     
    167174            $output = '<div class="osc-res-tab tabbable '.$class.' '.$position.' '.$alignment.'">' . $scontent;
    168175            $output .= '</div>';
    169             if (!isset($_SESSION['ert_js'])) {
    170                 $_SESSION['ert_js'] = '';
    171             }
     176
     177            $jscontent='';
    172178            if($responsive!='false'){
    173                 $autoselect -= ($autoselect ? 1: 0);
    174             $_SESSION['ert_js'].= <<<EOF
     179//                $autoselect -= ($autoselect ? 1: 0);
     180            $jscontent.= <<<EOF
    175181                    jQuery('#oscitas-restabs-$id').tabdrop({'text': '$text'});
    176182EOF;
    177183            }
    178184
    179             $_SESSION['ert_js'].= <<<EOF
     185            $jscontent.= <<<EOF
    180186            var tabHashId = window.location.hash.substr(1);
    181187            if (tabHashId) {
     
    183189            }
    184190EOF;
    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;
    190194            //$_SESSION['ert_css'].=$tabcolor.$tabheadcolor.$seltabcolor.$seltabheadcolor.$tabhovercolor.$contentcolor;
    191195        }
     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');
    192198
    193199        $_ert_restabs['current_id'] = $_ert_restabs['current_id']-1;
     
    208214            $_ert_restabs[$index]['tabs'] = array();
    209215        }
     216        if (!isset($_ert_restabs[$index]['panes'])) {
     217            $_ert_restabs[$index]['panes'] = array();
     218        }
    210219        $pane_id = 'ert_pane' . $index . '-' .  count($_ert_restabs[$index]['tabs']);
    211220        $_ert_restabs[$index]['tabs'][] = '<li class="' . $active . '"><a href="#' . $pane_id . '" data-toggle="tab">' . $title
    212221            . '</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>';
    217224    }
    218225    public function ert_enqueue_scripts(){
     
    251258
    252259        }
     260
    253261        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
    259265    }
    260266
     
    277283    if (!session_id()) {
    278284        @session_start();
    279         unset($_SESSION['ert_js']);
    280285    }
    281286}
  • easy-responsive-tabs/trunk/README.txt

    r949101 r970419  
    7070
    7171== Changelog ==
     72
     73= 2.8 =
     74
     75* [Fixes] Fixed the Tab Color Issue - Color appears when logged in.
    7276
    7377= 2.7 =
  • easy-responsive-tabs/trunk/assets/css/ert_css.php

    r944740 r970419  
    11<?php
     2session_start();
    23header("Content-type: text/css");
    3 session_start();
    4 if (isset($_SESSION['ert_css'])) {
    5     echo $_SESSION['ert_css'];
     4if(isset($_SESSION['ert_css']) && is_array( $_SESSION['ert_css']) && count($_SESSION['ert_css'])){
     5    foreach( $_SESSION['ert_css'] as $val){
     6        echo $val;
     7    }
    68}
    7 ?>
  • easy-responsive-tabs/trunk/assets/js/bootstrap-tabdrop.js

    r810619 r970419  
    116116
    117117}( window.jQuery );
     118
  • easy-responsive-tabs/trunk/assets/js/ert_js.php

    r944740 r970419  
    22session_start();
    33header("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']);
     4if(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 '});';
    810}
    9 echo '});';
    10 ?>
  • easy-responsive-tabs/trunk/easy_res_tab.php

    r949101 r970419  
    44  Plugin URI: http://www.oscitasthemes.com
    55  Description: Make bootstrap tabs res.
    6   Version: 2.7
     6  Version: 2.8
    77  Author: oscitas
    88  Author URI: http://www.oscitasthemes.com
    99  License: Under the GPL v2 or later
    1010 */
    11 define('ERT_VERSION', '2.7');
     11define('ERT_VERSION', '2.8');
    1212define('ERT_BASE_URL', plugins_url('',__FILE__));
    1313define('ERT_ASSETS_URL', ERT_BASE_URL . '/assets/');
     
    2121    function __construct(){
    2222
    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        }
    2529
    2630        $pluginmenu=explode('/',plugin_basename(__FILE__));
     
    102106    public function ert_theme_tabs($params, $content = null) {
    103107        global $_ert_restabs, $shortcode_tags;
     108        if (!count($_ert_restabs)) {
     109            $_ert_restabs = array('current_id'=>0);
     110        }
    104111        global $post;
    105112        $slug = get_post( $post )->post_name;
     
    167174            $output = '<div class="osc-res-tab tabbable '.$class.' '.$position.' '.$alignment.'">' . $scontent;
    168175            $output .= '</div>';
    169             if (!isset($_SESSION['ert_js'])) {
    170                 $_SESSION['ert_js'] = '';
    171             }
     176
     177            $jscontent='';
    172178            if($responsive!='false'){
    173                 $autoselect -= ($autoselect ? 1: 0);
    174             $_SESSION['ert_js'].= <<<EOF
     179//                $autoselect -= ($autoselect ? 1: 0);
     180            $jscontent.= <<<EOF
    175181                    jQuery('#oscitas-restabs-$id').tabdrop({'text': '$text'});
    176182EOF;
    177183            }
    178184
    179             $_SESSION['ert_js'].= <<<EOF
     185            $jscontent.= <<<EOF
    180186            var tabHashId = window.location.hash.substr(1);
    181187            if (tabHashId) {
     
    183189            }
    184190EOF;
    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;
    190194            //$_SESSION['ert_css'].=$tabcolor.$tabheadcolor.$seltabcolor.$seltabheadcolor.$tabhovercolor.$contentcolor;
    191195        }
     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');
    192198
    193199        $_ert_restabs['current_id'] = $_ert_restabs['current_id']-1;
     
    208214            $_ert_restabs[$index]['tabs'] = array();
    209215        }
     216        if (!isset($_ert_restabs[$index]['panes'])) {
     217            $_ert_restabs[$index]['panes'] = array();
     218        }
    210219        $pane_id = 'ert_pane' . $index . '-' .  count($_ert_restabs[$index]['tabs']);
    211220        $_ert_restabs[$index]['tabs'][] = '<li class="' . $active . '"><a href="#' . $pane_id . '" data-toggle="tab">' . $title
    212221            . '</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>';
    217224    }
    218225    public function ert_enqueue_scripts(){
     
    251258
    252259        }
     260
    253261        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
    259265    }
    260266
     
    277283    if (!session_id()) {
    278284        @session_start();
    279         unset($_SESSION['ert_js']);
    280285    }
    281286}
Note: See TracChangeset for help on using the changeset viewer.