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