edit.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. {// 引入标签库 }
  2. <tagLib name="html" />
  3. <include file="Public:header" />
  4. <div class="main">
  5. <div class="main_title">{%EDIT} <a href="{:u("Navigation/index")}" class="back_list">{%BACK_LIST}</a></div>
  6. <div class="blank5"></div>
  7. <form name="edit" action="__APP__" method="post" enctype="multipart/form-data">
  8. <table class="form" cellpadding=0 cellspacing=0>
  9. <tr>
  10. <td colspan=2 class="topTd"></td>
  11. </tr>
  12. <tr>
  13. <td class="item_title">标题:</td>
  14. <td class="item_input"><input type="text" class="textbox require" name="name" value="{$vo.name}" /></td>
  15. </tr>
  16. <tr>
  17. <td class="item_title">图片:</td>
  18. <td class="item_input"><html:imgUpload name = 'icon' id='icon' value="$vo.icon" />
  19. <span class="tip_span" id="tip_span">&nbsp;显示图标</span>
  20. </td>
  21. </tr>
  22. <tr id="select_type">
  23. <td class="item_title">类型:</td>
  24. <td class="item_input">
  25. <select name="tag" id="tag">
  26. <option value="anchor_rank" <if condition="$vo['tag'] eq anchor_rank"> selected="selected"</if> >anchor_rank</option>
  27. <option value="random_game" <if condition="$vo['tag'] eq random_game"> selected="selected"</if> >random_game</option>
  28. <option value="hero_rank" <if condition="$vo['tag'] eq hero_rank"> selected="selected"</if>>hero_rank</option>
  29. </select>
  30. </td>
  31. </tr>
  32. <tr>
  33. <td class="item_title">{%SORT}:</td>
  34. <td class="item_input"><input type="text" class="textbox" name="sort" value="{$vo.sort}" /></td>
  35. </tr>
  36. <tr>
  37. <td class="item_title"></td>
  38. <td class="item_input">
  39. <!--隐藏元素-->
  40. <input type="hidden" name="{:conf("VAR_MODULE")}" value="Navigation" />
  41. <input type="hidden" name="{:conf("VAR_ACTION")}" value="update" />
  42. <input type="hidden" name="id" value="{$vo.id}" />
  43. <!--隐藏元素-->
  44. <input type="submit" class="button" value="{%EDIT}" />
  45. <input type="reset" class="button" value="{%RESET}" />
  46. </td>
  47. </tr>
  48. <tr>
  49. <td colspan=2 class="bottomTd"></td>
  50. </tr>
  51. </table>
  52. <script>
  53. $(function(){
  54. var type = $('#type option:selected').val();
  55. var position = $('#position option:selected').val();
  56. if(type==1){
  57. $('#family_id').show();
  58. }else{
  59. $('#family_id').hide();
  60. }
  61. if(type==0){
  62. $("#url").show();
  63. }else{
  64. $("#url").hide();
  65. }
  66. if(type>=6 && type<=9){
  67. $('#edu_show_id').show();
  68. $('#edu_show_id input').attr('name','show_id');
  69. if( type==8)
  70. $('#edu_show_id_title').html("房间号:");
  71. else if( type==6)
  72. $('#edu_show_id_title').html("机构id:");
  73. else if( type==9)
  74. $('#edu_show_id_title').html("课程id:");
  75. else
  76. $('#edu_show_id_title').html("会员id:");
  77. }else{
  78. $('#edu_show_id').hide();
  79. $('#edu_show_id input').removeAttr('name');
  80. }
  81. if(position == 3){
  82. $("#select_type").hide();
  83. $("#type").val(0);
  84. $("#url").show();
  85. }else{
  86. $("#select_type").show();
  87. }
  88. $("#type").change(function(){
  89. type = $(this).val();
  90. if(type==1){
  91. $('#family_id').show();
  92. }else{
  93. $('#family_id').hide();
  94. }
  95. if(type!=0){
  96. $("#url").hide();
  97. $("input[name='url']").val('');
  98. }else{
  99. $("#url").show();
  100. }
  101. if(type>=6 && type<=9){
  102. $('#edu_show_id').show();
  103. $('#edu_show_id input').attr('name','show_id');
  104. if( type==8)
  105. $('#edu_show_id_title').html("房间号:");
  106. else if( type==6)
  107. $('#edu_show_id_title').html("机构id:");
  108. else if( type==9)
  109. $('#edu_show_id_title').html("课程id:");
  110. else
  111. $('#edu_show_id_title').html("会员id:");
  112. }else{
  113. $('#edu_show_id').hide();
  114. $('#edu_show_id input').removeAttr('name');
  115. }
  116. });
  117. $("#position").change(function(){
  118. position = $(this).val();
  119. if(position == 3){
  120. $("#select_type").hide();
  121. $("#type").val(0);
  122. $("#url").show();
  123. }else{
  124. type = $('#type option:selected').val();
  125. if(type==0){
  126. $("#url").show();
  127. }else{
  128. $("#url").hide();
  129. $("input[name='url']").val('');
  130. }
  131. $("#select_type").show();
  132. }
  133. });
  134. });
  135. </script>
  136. </form>
  137. </div>
  138. <include file="Public:footer" />