setting.html 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <include file="plugin/functions"/>
  2. <include file="public@header"/>
  3. </head>
  4. <body>
  5. <div class="wrap">
  6. <ul class="nav nav-tabs">
  7. <li><a href="{:url('plugin/index')}">{:lang('ADMIN_PLUGIN_INDEX')}</a></li>
  8. <li class="active"><a>{:lang('ADMIN_PLUGIN_SETTING')}</a></li>
  9. </ul>
  10. <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('plugin/settingPost')}">
  11. <empty name="custom_config">
  12. {:_parse_plugin_config($data['config'])}
  13. <else/>
  14. <present name="custom_config">
  15. {$custom_config}
  16. </present>
  17. </empty>
  18. <div class="form-group">
  19. <div class="col-sm-offset-2 col-sm-10">
  20. <input type="hidden" name="id" value="{$id}" readonly>
  21. <button type="submit" class="btn btn-primary js-ajax-submit" data-refresh="0">保存</button>
  22. <a class="btn btn-default" href="javascript:history.back(-1);">返回</a>
  23. </div>
  24. </div>
  25. </form>
  26. </div>
  27. <script src="__STATIC__/js/admin.js"></script>
  28. <script>
  29. Wind.use('colorpicker',function(){
  30. $('.js-color').each(function () {
  31. var $this=$(this);
  32. $this.ColorPicker({
  33. livePreview:true,
  34. onChange: function(hsb, hex, rgb) {
  35. $this.val('#'+hex);
  36. },
  37. onBeforeShow: function () {
  38. $(this).ColorPickerSetColor(this.value);
  39. }
  40. });
  41. });
  42. });
  43. function doSelectLocation(obj) {
  44. var $obj = $(obj);
  45. var title = $obj.data('title');
  46. var $realInput = $obj;
  47. var location = $realInput.val();
  48. parent.openIframeLayer(
  49. "{:url('dialog/map')}?location=" + location,
  50. title,
  51. {
  52. area: ['700px', '90%'],
  53. btn: ['确定', '取消'],
  54. yes: function (index, layero) {
  55. var iframeWin = parent.window[layero.find('iframe')[0]['name']];
  56. var location = iframeWin.confirm();
  57. $realInput.val(location.lng + ',' + location.lat);
  58. //$obj.val(location.address);
  59. parent.layer.close(index); //如果设定了yes回调,需进行手工关闭
  60. }
  61. }
  62. );
  63. }
  64. </script>
  65. </body>
  66. </html>