Changeset 1287912
- Timestamp:
- 11/17/2015 11:52:27 AM (10 years ago)
- Location:
- footer-flyout-widget/trunk
- Files:
-
- 3 edited
-
footer-flyout-widget.php (modified) (7 diffs)
-
wpwox-css.css (modified) (5 diffs)
-
wpwox-js.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
footer-flyout-widget/trunk/footer-flyout-widget.php
r1287856 r1287912 43 43 44 44 function 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' ); 46 46 } 47 47 48 48 function 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 } 52 52 if ( count($_POST) > 0 && isset($_POST['footerflyout_settings']) ) 53 53 { … … 65 65 } 66 66 } 67 echo '<div class="wrap">';67 echo '<div class="wrap">'; 68 68 wpwoxfooterflyout_metaboxs(); 69 echo '</div>';69 echo '</div>'; 70 70 71 71 } … … 73 73 //include css and js 74 74 function 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 ); 77 77 } 78 78 … … 245 245 $linkcolor = get_option('wpwoxfooterflyout_link_color'); 246 246 $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"; 249 253 $buttonbackgroundcolor = get_option('wpwoxfooterflyout_button_backgroundcolor'); 250 254 $buttonhovercolor = get_option('wpwoxfooterflyout_button_hovercolor'); … … 313 317 echo "</style>"; 314 318 } 319 315 320 316 321 if($widgetflyout=='right'){ … … 363 368 364 369 echo "<style> 365 #wpwox-footer-flyout-div .textwidget{ 366 display: none; 367 } 370 368 371 #wpwox-footer-flyout-headingonly{ 369 372 display: none; 370 373 } 371 374 </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>'; 373 376 echo "<div id='wpwox-footer-flyout-headingonly'>"; 374 377 dynamic_sidebar('wpwox-footer-flyout-div'); … … 392 395 dynamic_sidebar('wpwox-footer-flyout-div'); 393 396 echo "<script>"; 394 echo 'jQuery("#wpwox-footer-flyout-closebtn").click(function(){ ';397 echo 'jQuery("#wpwox-footer-flyout-closebtn").click(function(){ '; 395 398 echo 'jQuery("#wpwox-footer-flyout-div").removeClass("wpwox-footer-flyout-active");'; 396 399 echo 'jQuery("#wpwox-footer-flyout-div").addClass("wpwox-footer-flyout-inactive");'; -
footer-flyout-widget/trunk/wpwox-css.css
r1280916 r1287912 1 1 #wpwox-footer-flyout-div{ 2 2 3 width: 270px;4 padding: 12px; 3 /*width: 270px; 4 padding: 12px;*/ 5 5 position: fixed; 6 6 bottom: 0; 7 7 z-index: 9999999; 8 opacity: 0;8 /*opacity: 0;*/ 9 9 background-color: #eee; 10 10 -webkit-box-shadow: 0px -2px 8px 0px rgba(50, 50, 50, 0.32); … … 19 19 } 20 20 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 21 32 #wpwox-footer-flyout-div .img-responsive,#wpwox-footer-flyout-div .et_pb_widget{ 22 33 margin: 0; … … 26 37 27 38 #wpwox-footer-flyout-closebtn{ 39 padding: 0 5px !important; 40 width: 25px !important; 28 41 color: #E83D2C; 29 42 cursor:pointer; 30 font-size:20px ;43 font-size:20px !important; 31 44 float: right; 32 45 position: absolute; … … 61 74 62 75 #wpwox-footer-flyout-closebtn{ 63 opacity: 0;76 /*opacity: 0;*/ 64 77 } 65 78 66 79 #wpwox-footer-flyout-div .wpwox-footer-flyout-widgettitle{ 67 opacity: 0;80 /*opacity: 0;*/ 68 81 } 69 82 … … 76 89 77 90 #wpwox-footer-flyout-headingonly{ 78 opacity: 0;91 /*opacity: 0;*/ 79 92 cursor:pointer; 80 93 } 81 94 82 95 .wpwox-footer-flyout-active{ 83 opacity: 1 !important; 96 /*opacity: 1 !important;*/ 97 display: block; 84 98 } 85 99 86 100 .wpwox-footer-flyout-inactive{ 87 opacity: 0 !important; 101 /*opacity: 0 !important;*/ 102 display: none; 88 103 } 89 104 -
footer-flyout-widget/trunk/wpwox-js.js
r1287856 r1287912 11 11 12 12 /*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" ); 14 14 jQuery("#wpwox-footer-flyout-div #wpwox-footer-flyout-customheading").addClass( "wpwox-footer-flyout-active" ); 15 15 jQuery("#wpwox-footer-flyout-closebtn").addClass( "wpwox-footer-flyout-inactive" ); 16 16 jQuery('#wpwox-footer-flyout-headingonly').addClass( "wpwox-footer-flyout-inactive" ); 17 17 jQuery( "#wpwox-footer-flyout-headingonly" ).css("display"," none" ); 18 19 jQuery( "#wpwox-footer-flyout-div>div" ).css("display"," none" ); 18 20 19 21 … … 23 25 24 26 jQuery(window).scroll(function(){ 25 if(isclick=="false"){ 26 var y = jQuery(this).scrollTop(); 27 var y = jQuery(this).scrollTop(); 27 28 var docheight= jQuery(window).height(); 28 29 var appearheight= 0.6*docheight; 30 if(isclick=="false"){ 31 29 32 30 33 if (y > appearheight) { … … 51 54 jQuery('#wpwox-footer-flyout-div').fadeOut(); 52 55 jQuery("#wpwox-footer-flyout-div").removeClass( "wpwox-footer-flyout-active" ); 53 jQuery("#wpwox-footer-flyout-headingonly").removeClass( "wpwox-footer-flyout-active" );54 56 jQuery("#wpwox-footer-flyout-div").addClass( "wpwox-footer-flyout-inactive" ); 55 jQuery("#wpwox-footer-flyout-headingonly").addClass( "wpwox-footer-flyout-inactive" );56 57 } 57 58 } 58 59 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 } 61 75 } 62 76 });
Note: See TracChangeset
for help on using the changeset viewer.