Plugin Directory

Changeset 1287912


Ignore:
Timestamp:
11/17/2015 11:52:27 AM (10 years ago)
Author:
wpwox
Message:

fixed

Location:
footer-flyout-widget/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • footer-flyout-widget/trunk/footer-flyout-widget.php

    r1287856 r1287912  
    4343
    4444function wpwoxfooterflyout_menu() {
    45     add_menu_page( 'Settings', 'Footer Widget Flyout', 'manage_options', 'footer_flyout_setting', 'footerflyout_plugin_options' );
     45  add_menu_page( 'Settings', 'Footer Widget Flyout', 'manage_options', 'footer_flyout_setting', 'footerflyout_plugin_options' );
    4646}
    4747
    4848function footerflyout_plugin_options() {
    49     if ( !current_user_can( 'manage_options' ) )  {
    50         wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
    51     }
     49  if ( !current_user_can( 'manage_options' ) )  {
     50    wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
     51  }
    5252  if ( count($_POST) > 0 && isset($_POST['footerflyout_settings']) )
    5353  {
     
    6565    }     
    6666  }
    67     echo '<div class="wrap">';
     67  echo '<div class="wrap">';
    6868    wpwoxfooterflyout_metaboxs();
    69     echo '</div>';
     69  echo '</div>';
    7070
    7171}
     
    7373//include css and js
    7474function theme_name_scripts() {
    75     wp_enqueue_style( 'footer_flyout_plugin_css', WPWOXFOOTERWIDGETFLYOUT__PLUGIN_URL. '/wpwox-css.css' );
    76     wp_enqueue_script( 'footer_flyout_plugin_js', WPWOXFOOTERWIDGETFLYOUT__PLUGIN_URL . '/wpwox-js.js', array(), '1.0.0', true );
     75  wp_enqueue_style( 'footer_flyout_plugin_css', WPWOXFOOTERWIDGETFLYOUT__PLUGIN_URL. '/wpwox-css.css' );
     76  wp_enqueue_script( 'footer_flyout_plugin_js', WPWOXFOOTERWIDGETFLYOUT__PLUGIN_URL . '/wpwox-js.js', array(), '1.0.0', true );
    7777}
    7878
     
    245245  $linkcolor = get_option('wpwoxfooterflyout_link_color');
    246246  $buttoncolor = get_option('wpwoxfooterflyout_button_color');
    247   $customheight = get_option('wpwoxfooterflyout_custom_height')-40;
    248   $customwidth = get_option('wpwoxfooterflyout_custom_width')-40;
     247  if(get_option('wpwoxfooterflyout_custom_height')<> null){
     248  $customheight = get_option('wpwoxfooterflyout_custom_height')-40;}
     249
     250  if(get_option('wpwoxfooterflyout_custom_width')<> null){
     251  $customwidth = get_option('wpwoxfooterflyout_custom_width')-40;}
     252  else $customwidth = "300";
    249253  $buttonbackgroundcolor = get_option('wpwoxfooterflyout_button_backgroundcolor');
    250254  $buttonhovercolor = get_option('wpwoxfooterflyout_button_hovercolor');
     
    313317    echo "</style>";
    314318  }
     319 
    315320
    316321 if($widgetflyout=='right'){
     
    363368
    364369      echo "<style>
    365                     #wpwox-footer-flyout-div .textwidget{
    366                         display: none;
    367                       }
     370                   
    368371                    #wpwox-footer-flyout-headingonly{
    369372                        display: none;
    370373                     }
    371374            </style>";
    372       echo '<button id="wpwox-footer-flyout-closebtn">X</button>';
     375      echo '<button id="wpwox-footer-flyout-closebtn" class="wpwox-footer-flyout-inactive">X</button>';
    373376      echo "<div id='wpwox-footer-flyout-headingonly'>";
    374377      dynamic_sidebar('wpwox-footer-flyout-div');
     
    392395    dynamic_sidebar('wpwox-footer-flyout-div');
    393396    echo  "<script>";
    394     echo 'jQuery("#wpwox-footer-flyout-closebtn").click(function(){';
     397    echo 'jQuery("#wpwox-footer-flyout-closebtn").click(function(){ ';
    395398    echo 'jQuery("#wpwox-footer-flyout-div").removeClass("wpwox-footer-flyout-active");';
    396399    echo 'jQuery("#wpwox-footer-flyout-div").addClass("wpwox-footer-flyout-inactive");';
  • footer-flyout-widget/trunk/wpwox-css.css

    r1280916 r1287912  
    11#wpwox-footer-flyout-div{
    22   
    3     width: 270px;
    4     padding: 12px;
     3    /*width: 270px;
     4    padding: 12px;*/
    55    position: fixed;
    66    bottom: 0;
    77    z-index: 9999999;
    8     opacity: 0;
     8    /*opacity: 0;*/
    99    background-color: #eee;
    1010    -webkit-box-shadow: 0px -2px 8px 0px rgba(50, 50, 50, 0.32);
     
    1919}
    2020
     21#wpwox-footer-flyout-div>div{
     22    padding:12px;
     23
     24}
     25
     26#wpwox-footer-flyout-customheading{
     27    padding:10px;
     28    text-align: center;
     29}
     30
     31
    2132#wpwox-footer-flyout-div .img-responsive,#wpwox-footer-flyout-div .et_pb_widget{
    2233    margin: 0;
     
    2637
    2738#wpwox-footer-flyout-closebtn{
     39    padding: 0 5px !important;
     40    width: 25px !important;
    2841    color: #E83D2C;
    2942    cursor:pointer;
    30     font-size:20px;
     43    font-size:20px !important;
    3144    float: right;
    3245    position: absolute;
     
    6174
    6275#wpwox-footer-flyout-closebtn{
    63     opacity: 0;
     76    /*opacity: 0;*/
    6477}
    6578
    6679#wpwox-footer-flyout-div .wpwox-footer-flyout-widgettitle{
    67     opacity: 0;
     80    /*opacity: 0;*/
    6881}
    6982
     
    7689
    7790#wpwox-footer-flyout-headingonly{
    78     opacity: 0;
     91    /*opacity: 0;*/
    7992    cursor:pointer;
    8093}
    8194
    8295.wpwox-footer-flyout-active{
    83     opacity: 1 !important;
     96    /*opacity: 1 !important;*/
     97   display: block;
    8498}
    8599
    86100.wpwox-footer-flyout-inactive{
    87     opacity: 0 !important;
     101    /*opacity: 0 !important;*/
     102    display: none;
    88103}
    89104
  • footer-flyout-widget/trunk/wpwox-js.js

    r1287856 r1287912  
    1111
    1212                /*Adding classes*/
    13                 jQuery("#wpwox-footer-flyout-div .textwidget").addClass( "wpwox-footer-flyout-inactive" );
     13                //jQuery("#wpwox-footer-flyout-div .textwidget").addClass( "wpwox-footer-flyout-inactive" );
    1414                jQuery("#wpwox-footer-flyout-div #wpwox-footer-flyout-customheading").addClass( "wpwox-footer-flyout-active" );
    1515                jQuery("#wpwox-footer-flyout-closebtn").addClass( "wpwox-footer-flyout-inactive" );
    1616                jQuery('#wpwox-footer-flyout-headingonly').addClass( "wpwox-footer-flyout-inactive" );
    1717                jQuery( "#wpwox-footer-flyout-headingonly" ).css("display"," none" );
     18
     19                jQuery( "#wpwox-footer-flyout-div>div" ).css("display"," none" );
    1820
    1921               
     
    2325           
    2426            jQuery(window).scroll(function(){
    25               if(isclick=="false"){
    26                 var y = jQuery(this).scrollTop();
     27              var y = jQuery(this).scrollTop();
    2728                var docheight= jQuery(window).height();
    2829                var appearheight= 0.6*docheight;
     30              if(isclick=="false"){
     31               
    2932             
    3033              if (y > appearheight) {
     
    5154                  jQuery('#wpwox-footer-flyout-div').fadeOut();
    5255                  jQuery("#wpwox-footer-flyout-div").removeClass( "wpwox-footer-flyout-active" );
    53                   jQuery("#wpwox-footer-flyout-headingonly").removeClass( "wpwox-footer-flyout-active" );
    5456                  jQuery("#wpwox-footer-flyout-div").addClass( "wpwox-footer-flyout-inactive" );
    55                   jQuery("#wpwox-footer-flyout-headingonly").addClass( "wpwox-footer-flyout-inactive" );
    5657              }
    5758            }
    5859            else if(isclick = "true"){
    59                 jQuery("#wpwox-footer-flyout-div").removeClass( "wpwox-footer-flyout-active" );
    60                 jQuery("#wpwox-footer-flyout-div").addClass( "wpwox-footer-flyout-inactive" );
     60
     61              if (y > appearheight) {
     62
     63                jQuery('#wpwox-footer-flyout-div').fadeIn();
     64                  jQuery( "#wpwox-footer-flyout-div" ).removeClass( "wpwox-footer-flyout-inactive" );
     65                  jQuery( "#wpwox-footer-flyout-headingonly" ).removeClass( "wpwox-footer-flyout-active" );
     66
     67                  jQuery( "#wpwox-footer-flyout-div" ).addClass( "wpwox-footer-flyout-active" );
     68                  jQuery( "#wpwox-footer-flyout-headingonly" ).addClass( "wpwox-footer-flyout-inactive" );
     69
     70              }else {
     71                  jQuery('#wpwox-footer-flyout-div').fadeOut();
     72                  jQuery("#wpwox-footer-flyout-div").removeClass( "wpwox-footer-flyout-active" );
     73                  jQuery("#wpwox-footer-flyout-div").addClass( "wpwox-footer-flyout-inactive" );
     74              }
    6175            }
    6276          });
Note: See TracChangeset for help on using the changeset viewer.