WC_Compare_Features_Panel

WooCommerce Compare Features Panel.

Defined (1)

The class is defined in the following location(s).

/admin/classes/class-wc-compare-features-panel.php  
  1. class WC_Compare_Features_Panel  
  2.  
  3. public static function admin_screen () { 
  4. global $wc_compare_admin_init; 
  5. ?> 
  6. <style> 
  7. .chzn-container{margin-right:2px;} 
  8. .field_title{width:205px; padding:0 8px 0 10px; float:left;} 
  9. .help_tip{cursor: help;line-height: 1;margin: -4px 0 0 5px;padding: 0;vertical-align: middle;} 
  10. .compare_set_1{width:46%; float:left; margin-right:5%; margin-bottom:15px;} 
  11. .compare_set_2{width:46%; float:left; margin-bottom:15px;} 
  12. .ui-state-highlight{background:#F6F6F6; height:24px; padding:8px 0 0; border:1px dotted #DDD; margin-bottom:20px;} 
  13. ul.compare_orders{float:left; margin:0; width:100%} 
  14. ul.compare_orders li{padding-top:8px; border-top:1px solid #DFDFDF; margin:5px 0; line-height:20px;} 
  15. ul.compare_orders li.first_record{border-top:none; padding-top:0;} 
  16. ul.compare_orders .compare_sort{float:left; width:60px;} 
  17. .c_field_name{padding-left:20px; background:url(<?php echo WOOCP_IMAGES_URL; ?>/icon_sort.png) no-repeat 0 center;} 
  18. .c_openclose_table{cursor:pointer;} 
  19. .c_openclose_none{width:16px; height:16px; display:inline-block;} 
  20. .c_close_table{background:url(<?php echo get_option('siteurl'); ?>/wp-admin/images/arrows.png) no-repeat center 0px; width:16px; height:16px; display:inline-block;} 
  21. .c_open_table{background:url(<?php echo get_option('siteurl'); ?>/wp-admin/images/arrows.png) no-repeat center -35px; width:16px; height:16px; display:inline-block;} 
  22. ul.compare_orders .c_field_type{width:120px; float:left;} 
  23. ul.compare_orders .c_field_manager{background:url(<?php echo WOOCP_IMAGES_URL; ?>/icon_fields.png) no-repeat 0 0; width:16px; height:16px; display:inline-block;} 
  24. .tablenav-pages{float:right;} 
  25. .c_field_edit, .c_field_delete{cursor:pointer;} 
  26. .widefat th input { 
  27. vertical-align:middle; 
  28. padding:3px 8px; 
  29. margin:auto; 
  30. .widefat th, .widefat td { 
  31. overflow: inherit !important;  
  32. .chzn-container-multi .chzn-choices { 
  33. min-height:100px;  
  34.  
  35. ul.feature_compare_orders .compare_sort{margin-right:10px; float:none; width:auto;} 
  36. ul.feature_compare_orders .c_field_name{margin-right:10px;padding:5px 0 5px 20px; float:none; width:auto;} 
  37. ul.feature_compare_orders .c_field_action{float:right;} 
  38. ul.feature_compare_orders .c_field_type{float:right; margin-right:10px; width:70px;} 
  39.  
  40. .icon32-compare-product { 
  41. background:url(<?php echo WOOCP_IMAGES_URL; ?>/a3-plugins.png) no-repeat left top !important; 
  42. @media screen and ( max-width: 782px ) { 
  43. .a3rev_manager_panel_container table { 
  44. width:100% !important;  
  45. .a3rev_manager_panel_container td.search_features_td { 
  46. text-align:left !important;  
  47. </style> 
  48. <script> 
  49. (function($) { 
  50. $(function() { 
  51. $("#field_type").change( function() { 
  52. var field_type = $(this).val(); 
  53. if(field_type == 'checkbox' || field_type == 'radio' || field_type == 'drop-down' || field_type == 'multi-select') { 
  54. $("#field_value").slideDown(); 
  55. }else{ 
  56. $("#field_value").slideUp(); 
  57. }); 
  58. $('#toggle1').click(function() { 
  59. if($('#toggle1').is(':checked')) { 
  60. $(".list_fields").attr("checked", "checked"); 
  61. $(".toggle2").attr("checked", "checked"); 
  62. }else{ 
  63. $(".list_fields").removeAttr("checked"); 
  64. $(".toggle2").removeAttr("checked"); 
  65. }); 
  66. $('#toggle2').click(function() { 
  67. if($('#toggle2').is(':checked')) { 
  68. $(".list_fields").attr("checked", "checked"); 
  69. $(".toggle1").attr("checked", "checked"); 
  70. }else{ 
  71. $(".list_fields").removeAttr("checked"); 
  72. $(".toggle1").removeAttr("checked"); 
  73. }); 
  74. }); 
  75. })(jQuery); 
  76. function confirmation(text) { 
  77. var answer = confirm(text) 
  78. if (answer) { 
  79. return true; 
  80. }else{ 
  81. return false; 
  82. }  
  83. </script> 
  84. <div id="htmlForm"> 
  85. <div style="clear:both"></div> 
  86. <div class="wrap"> 
  87. <h1></h1> 
  88. <div id="a3_plugin_panel_container"> 
  89. <div id="a3_plugin_panel_upgrade_area"><div id="a3_plugin_panel_extensions"><?php echo $wc_compare_admin_init->plugin_extension_boxes(); ?></div></div> 
  90. <div id="a3_plugin_panel_fields"> 
  91. <div class="a3rev_panel_container a3rev_manager_panel_container"> 
  92. <?php  
  93. echo WC_Compare_Fields_Class::init_features_actions(); 
  94. echo WC_Compare_Categories_Class::init_categories_actions(); 
  95. ?> 
  96. <?php 
  97. if (isset($_REQUEST['act']) && $_REQUEST['act'] == 'add-new') { 
  98. WC_Compare_Categories_Class::woocp_categories_manager(); 
  99. WC_Compare_Fields_Class::woocp_features_manager(); 
  100. } else if(isset($_REQUEST['act']) && $_REQUEST['act'] == 'cat-edit') { 
  101. WC_Compare_Categories_Class::woocp_categories_manager(); 
  102. } else if (isset($_REQUEST['act']) && $_REQUEST['act'] == 'field-edit') { 
  103. WC_Compare_Fields_Class::woocp_features_manager(); 
  104. } else if (isset($_REQUEST['s_feature'])) { 
  105. WC_Compare_Fields_Class::features_search_area(); 
  106. } else { 
  107. WC_Compare_Fields_Class::features_search_area(); 
  108. WC_Compare_Fields_Class::woocp_features_orders(); 
  109. ?> 
  110. </div> 
  111. </div> 
  112. </div> 
  113. </div> 
  114. </div> 
  115. <?php 
  116.