class_list.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. {include file="public/header" /}
  2. <div class="page">
  3. <div class="fixed-bar">
  4. <div class="item-title">
  5. <div class="subject">
  6. <h3>{$Think.lang.ds_groupbuy}</h3>
  7. <h5></h5>
  8. </div>
  9. {include file="public/admin_items" /}
  10. </div>
  11. </div>
  12. <div class="explanation" id="explanation">
  13. <div class="title" id="checkZoom">
  14. <h4 title="{$Think.lang.ds_explanation_tip}">{$Think.lang.ds_explanation}</h4>
  15. <span id="explanationZoom" title="{$Think.lang.ds_explanation_close}" class="arrow"></span>
  16. </div>
  17. <ul>
  18. <li>{$Think.lang.groupbuy_class_list_help1}</li>
  19. </ul>
  20. </div>
  21. <table class="ds-default-table">
  22. <thead>
  23. <tr class="thead">
  24. <th></th>
  25. <th>{$Think.lang.ds_sort}</th>
  26. <th>{$Think.lang.goods_class_index_name}</th>
  27. <th class="align-center">{$Think.lang.ds_handle}</th>
  28. </tr>
  29. </thead>
  30. <tbody>
  31. {notempty name="groupbuyclass_list"}
  32. {foreach name="groupbuyclass_list" item="val"}
  33. <tr class="hover edit {if $val.gclass_parent_id != '0'} two{/if} parent{$val.gclass_parent_id}">
  34. <td class="w36"><input type="checkbox" value="{$val.gclass_id}" class="checkitem">
  35. {eq name="val.have_child" value="1"}
  36. <img class="node_parent" state="close" node_id="parent{$val.gclass_id}" src="{$Think.ADMIN_SITE_ROOT}/images/treetable/tv-expandable.gif">
  37. {/eq}
  38. </td>
  39. <td class="w48 sort">
  40. <span title="{$Think.lang.ds_editable}" ajax_branch="gclass_sort" datatype="number" fieldid="{$val.gclass_id}" fieldname="gclass_sort" ds_type="inline_edit" class="editable ">{$val.gclass_sort}</span></td>
  41. <td class="name">
  42. {neq name="val.gclass_parent_id" value="0"}
  43. <img fieldid="{$val.gclass_id}" status="close" ds_type="flex" src="{$Think.ADMIN_SITE_ROOT}/images/treetable/tv-item-last.gif">
  44. {/neq}
  45. <span title="{$Think.lang.ds_editable}" required="1" fieldid="{$val.gclass_id}" ajax_branch="gclass_name" fieldname="gclass_name" ds_type="inline_edit" class="node_name editable ">{$val.gclass_name}</span>
  46. {eq name="val.gclass_parent_id" value="0"}
  47. <a href="javascript:dsLayerOpen('{:url('Groupbuy/class_add',['parent_id'=>$val.gclass_id])}','{$Think.lang.ds_add_sub_class}-{$Think.lang.ds_class}')" class="btn-add-nofloat marginleft"><span>{$Think.lang.ds_add_sub_class}</span></a>
  48. {/eq}
  49. </td>
  50. <td class="w156 align-center">
  51. <a href="JavaScript:void(0);" onclick="submit_delete('{$val.gclass_id}')" class="dsui-btn-del"><i class="iconfont"></i>{$Think.lang.ds_del}</a>
  52. </td>
  53. </tr>
  54. {/foreach}
  55. {else /}
  56. <tr class="no_data">
  57. <td colspan="10">{$Think.lang.ds_no_record}</td>
  58. </tr>
  59. {/notempty}
  60. <tr>
  61. <td colspan="20">
  62. <a class="btn-add-nofloat marginleft" href="javascript:dsLayerOpen('{:url('Groupbuy/class_add')}','{$Think.lang.ds_add}-{$Think.lang.ds_class}')">{$Think.lang.groupbuy_class_add}</a>
  63. </td>
  64. </tr>
  65. </tbody>
  66. {notempty name="groupbuyclass_list"}
  67. <tfoot>
  68. <tr class="tfoot">
  69. <td><input type="checkbox" class="checkall" id="checkall_1"></td>
  70. <td id="batchAction" colspan="15"><span class="all_checkbox">
  71. <label for="checkall_1">{$Think.lang.ds_select_all}</label>
  72. </span>&nbsp;&nbsp; <a href="JavaScript:void(0);" class="btn btn-small" onclick="submit_delete_batch();"><span>{$Think.lang.ds_del}</span></a>
  73. </tr>
  74. </tfoot>
  75. {/notempty}
  76. </table>
  77. </div>
  78. <script type="text/javascript" src="{$Think.ADMIN_SITE_ROOT}/js/jquery.edit.js" charset="utf-8"></script>
  79. <script type="text/javascript">
  80. $(document).ready(function(){
  81. $(".two").hide();
  82. $(".node_parent").click(function(){
  83. var node_id = $(this).attr('node_id');
  84. var state = $(this).attr('state');
  85. if(state == 'close') {
  86. $("."+node_id).show();
  87. $(this).attr('state','open');
  88. $(this).attr('src',"{$Think.ADMIN_SITE_ROOT}/images/treetable/tv-collapsable.gif");
  89. }
  90. else {
  91. $("."+node_id).hide();
  92. $(this).attr('state','close');
  93. $(this).attr('src',"{$Think.ADMIN_SITE_ROOT}/images/treetable/tv-expandable.gif");
  94. }
  95. });
  96. });
  97. function submit_delete(ids_str ){
  98. _uri = ADMINSITEURL+"/Groupbuy/class_drop.html?gclass_id=" + ids_str;
  99. dsLayerConfirm(_uri,'{$Think.lang.ds_ensure_del}');
  100. }
  101. </script>