setting.html 2.2 KB

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