No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

customvar_bind.htm 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. {include file="public/layout" /}
  2. <body class="bodystyle" style="min-width: auto;">
  3. <div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
  4. <div id="append_parent"></div>
  5. <div id="ajaxwaitid"></div>
  6. <div class="page ksedit" style="min-width: auto;">
  7. <form class="form-horizontal" id="post_form" method="post">
  8. <div class="ncap-form-default">
  9. <input type="hidden" name="attr_id" value="{$attr_id}" />
  10. <dl class="row">
  11. <dt class="tit">
  12. <label for="title"><em>*</em>选择关联栏目</label>
  13. </dt>
  14. <dd class="opt" style="width: auto;">
  15. <select name="typeid" id="typeid" style="width: 300px;" size="22">
  16. {$select_html}
  17. </select>
  18. <span class="err"></span>
  19. <p class="notic"></p>
  20. </dd>
  21. </dl>
  22. </div>
  23. </form>
  24. </div>
  25. <script type="text/javascript">
  26. $(function () {
  27. $('#typeid').find('option').click(function(){
  28. if (!$('#typeid').val()) {
  29. layer.alert('请选择栏目…!', {icon:5, title:false}, function(index){
  30. $('#typeid').val('');
  31. layer.close(index);
  32. });
  33. return false;
  34. }
  35. var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  36. layer_loading('正在处理');
  37. $.ajax({
  38. url: "{:url('Language/customvar_bind', ['_ajax'=>1])}",
  39. type: 'POST',
  40. dataType: 'JSON',
  41. data: $('#post_form').serialize(),
  42. success: function(res){
  43. layer.closeAll();
  44. if (res.code == 1) {
  45. parent.layer.msg(res.msg, {shade: layer_shade, time: 500}, function(){
  46. parent.window.location.reload();
  47. parent.layer.close(parentObj);
  48. });
  49. } else {
  50. layer.alert(res.msg, {icon:5, title:false});
  51. }
  52. return false;
  53. },
  54. error: function(e){
  55. layer.closeAll();
  56. layer.alert('操作失败', {icon:5, title:false});
  57. return false;
  58. }
  59. });
  60. });
  61. });
  62. </script>
  63. {include file="public/footer" /}