content_quick.tpl.php 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. defined('IN_ADMIN') or exit('No permission resources.');
  3. include $this->admin_tpl('header','admin');?>
  4. <style type="text/css">
  5. <!--
  6. .showMsg{border: 1px solid #1e64c8; zoom:1; width:450px; height:172px;position:absolute;top:44%;left:50%;margin:-87px 0 0 -225px}
  7. .showMsg h5{background-image: url(<?php echo IMG_PATH?>msg_img/msg.png);background-repeat: no-repeat; color:#fff; padding-left:35px; height:25px; line-height:26px;*line-height:28px; overflow:hidden; font-size:14px; text-align:left}
  8. .showMsg .content{ margin-top:50px; font-size:14px; height:64px; position:relative}
  9. #search_div{ position:absolute; top:23px; border:1px solid #dfdfdf; text-align:left; padding:1px; left:89px;*left:88px; width:263px;*width:260px; background-color:#FFF; display:none; font-size:12px}
  10. #search_div li{ line-height:24px;}
  11. #search_div li a{ padding-left:6px;display:block}
  12. #search_div li a:hover{ background-color:#e2eaff}
  13. -->
  14. </style>
  15. <div class="showMsg" style="text-align:center">
  16. <h5><?php echo L('quick_into');?></h5>
  17. <div class="content">
  18. <input type="text" size="41" id="cat_search" value="<?php echo L('search_category');?>" onfocus="if(this.value == this.defaultValue) this.value = ''" onblur="if(this.value.replace(' ','') == '') this.value = this.defaultValue;">
  19. <ul id="search_div"></ul>
  20. </div>
  21. </div>
  22. <script type="text/javascript">
  23. <!--
  24. if(window.top.$("#current_pos").data('clicknum')==1 || window.top.$("#current_pos").data('clicknum')==null) {
  25. parent.document.getElementById('display_center_id').style.display='';
  26. parent.document.getElementById('center_frame').src = '?m=content&c=content&a=public_categorys&type=add&menuid=<?php echo $_GET['menuid'];?>&pc_hash=<?php echo $_SESSION['pc_hash'];?>';
  27. window.top.$("#current_pos").data('clicknum',0);
  28. }
  29. $(document).ready(function(){
  30. setInterval(closeParent,5000);
  31. });
  32. function closeParent() {
  33. if($('#closeParentTime').html() == '') {
  34. window.top.$(".left_menu").addClass("left_menu_on");
  35. window.top.$("#openClose").addClass("close");
  36. window.top.$("html").addClass("on");
  37. $('#closeParentTime').html('1');
  38. window.top.$("#openClose").data('clicknum',1);
  39. }
  40. }
  41. $().ready(
  42. function(){
  43. $('#cat_search').keyup(
  44. function(){
  45. var value = $("#cat_search").val();
  46. if (value.length > 0){
  47. $.getJSON('?m=admin&c=category&a=public_ajax_search', {catname: value}, function(data){
  48. if (data != null) {
  49. var str = '';
  50. $.each(data, function(i,n){
  51. if(n.type=='0') {
  52. str += '<li><a href="?m=content&c=content&a=init&menuid=822&catid='+n.catid+'&pc_hash='+pc_hash+'">'+n.catname+'</a></li>';
  53. } else {
  54. str += '<li><a href="?m=content&c=content&a=add&menuid=822&catid='+n.catid+'&pc_hash='+pc_hash+'">'+n.catname+'</a></li>';
  55. }
  56. });
  57. $('#search_div').html(str);
  58. $('#search_div').show();
  59. } else {
  60. $('#search_div').hide();
  61. }
  62. });
  63. } else {
  64. $('#search_div').hide();
  65. }
  66. }
  67. );
  68. }
  69. )
  70. //-->
  71. </script>
  72. </body>
  73. </html>