jiapeng 8 years ago
parent
commit
61ee1f46df

+ 123 - 71
css/base.css

@ -1761,76 +1761,86 @@ a cite {
1761 1761
    right: 5px;
1762 1762
    cursor: pointer;
1763 1763
}
1764
1764 1765
.btn {
1765
	display:inline-block;
1766
	padding:5px 12px;
1767
	margin-bottom:4px;
1768
	margin-top: 4px;
1769
	font-size:14px;
1770
	font-weight:400;
1771
	line-height:1.42846154;
1772
	text-align:center;
1773
	white-space:nowrap;
1774
	vertical-align:middle;
1775
	cursor:pointer;
1776
	-webkit-user-select:none;
1777
	-moz-user-select:none;
1778
	-ms-user-select:none;
1779
	user-select:none;
1780
	border:1px solid transparent;
1781
	border-radius:4px;
1782
	-webkit-transition:all .4s cubic-bezier(.175,.885,.32,1);
1783
	-o-transition:all .4s cubic-bezier(.175,.885,.32,1);
1784
	transition:all .4s cubic-bezier(.175,.885,.32,1)
1766
    display: inline-block;
1767
    padding: 5px 12px;
1768
    margin-bottom: 4px;
1769
    margin-top: 4px;
1770
    font-size: 14px;
1771
    font-weight: 400;
1772
    line-height: 1.42846154;
1773
    text-align: center;
1774
    white-space: nowrap;
1775
    vertical-align: middle;
1776
    cursor: pointer;
1777
    -webkit-user-select: none;
1778
    -moz-user-select: none;
1779
    -ms-user-select: none;
1780
    user-select: none;
1781
    border: 1px solid transparent;
1782
    border-radius: 4px;
1783
    -webkit-transition: all .4s cubic-bezier(.175, .885, .32, 1);
1784
    -o-transition: all .4s cubic-bezier(.175, .885, .32, 1);
1785
    transition: all .4s cubic-bezier(.175, .885, .32, 1)
1785 1786
}
1787
1786 1788
.btn:focus {
1787
	outline:thin dotted #333;
1788
	outline:5px auto -webkit-focus-ring-color;
1789
	outline-offset:-2px
1790
}
1791
.btn:focus,.btn:hover {
1792
	color:#353535;
1793
	text-decoration:none
1794
}
1795
.btn.active,.btn:active {
1796
	background-image:none;
1797
	outline:0;
1798
	-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);
1799
	box-shadow:inset 0 3px 5px rgba(0,0,0,.125)
1800
}
1801
.btn.disabled,.btn[disabled],fieldset[disabled] .btn {
1802
	pointer-events:none;
1803
	cursor:not-allowed;
1804
	filter:alpha(opacity=65);
1805
	-webkit-box-shadow:none;
1806
	box-shadow:none;
1807
	opacity:.65
1789
    outline: thin dotted #333;
1790
    outline: 5px auto -webkit-focus-ring-color;
1791
    outline-offset: -2px
1808 1792
}
1793
1794
.btn:focus, .btn:hover {
1795
    color: #353535;
1796
    text-decoration: none
1797
}
1798
1799
.btn.active, .btn:active {
1800
    background-image: none;
1801
    outline: 0;
1802
    -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
1803
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125)
1804
}
1805
1806
.btn.disabled, .btn[disabled], fieldset[disabled] .btn {
1807
    pointer-events: none;
1808
    cursor: not-allowed;
1809
    filter: alpha(opacity=65);
1810
    -webkit-box-shadow: none;
1811
    box-shadow: none;
1812
    opacity: .65
1813
}
1814
1809 1815
.btn {
1810
	color:#353535;
1811
	text-shadow:0 1px 0 #fff;
1812
	background-color:#f2f2f2;
1813
	border-color:#bfbfbf
1814
}
1815
.btn.active,.btn:active,.btn:focus,.btn:hover,.open .dropdown-toggle.btn {
1816
	color:#353535;
1817
	background-color:#dedede;
1818
	border-color:#a1a1a1;
1819
	-webkit-box-shadow:0 2px 1px rgba(0,0,0,.15);
1820
	box-shadow:0 2px 1px rgba(0,0,0,.1)
1821
}
1822
.btn.active,.btn:active,.open .dropdown-toggle.btn {
1823
	background-color:#ccc;
1824
	background-image:none;
1825
	border-color:#a6a6a6;
1826
	-webkit-box-shadow:inset 0 4px 6px rgba(0,0,0,.15);
1827
	box-shadow:inset 0 4px 6px rgba(0,0,0,.15)
1828
}
1829
.btn.disabled,.btn.disabled.active,.btn.disabled:active,.btn.disabled:focus,.btn.disabled:hover,.btn[disabled],.btn[disabled].active,.btn[disabled]:active,.btn[disabled]:focus,.btn[disabled]:hover,fieldset[disabled] .btn,fieldset[disabled] .btn.active,fieldset[disabled] .btn:active,fieldset[disabled] .btn:focus,fieldset[disabled] .btn:hover {
1830
	background-color:#f2f2f2;
1831
	border-color:#bfbfbf
1816
    color: #353535;
1817
    text-shadow: 0 1px 0 #fff;
1818
    background-color: #f2f2f2;
1819
    border-color: #bfbfbf
1820
}
1821
1822
.btn.active, .btn:active, .btn:focus, .btn:hover, .open .dropdown-toggle.btn {
1823
    color: #353535;
1824
    background-color: #dedede;
1825
    border-color: #a1a1a1;
1826
    -webkit-box-shadow: 0 2px 1px rgba(0, 0, 0, .1);
1827
    box-shadow: 0 2px 1px rgba(0, 0, 0, .1)
1828
}
1829
1830
.btn.active, .btn:active, .open .dropdown-toggle.btn {
1831
    background-color: #ccc;
1832
    background-image: none;
1833
    border-color: #a6a6a6;
1834
    -webkit-box-shadow: inset 0 4px 6px rgba(0, 0, 0, .15);
1835
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, .15)
1832 1836
}
1833 1837
1838
.btn.disabled, .btn.disabled.active, .btn.disabled:active, .btn.disabled:focus, .btn.disabled:hover, .btn[disabled], .btn[disabled].active, .btn[disabled]:active, .btn[disabled]:focus, .btn[disabled]:hover, fieldset[disabled] .btn, fieldset[disabled] .btn.active, fieldset[disabled] .btn:active, fieldset[disabled] .btn:focus, fieldset[disabled] .btn:hover {
1839
    background-color: #f2f2f2;
1840
    border-color: #bfbfbf
1841
}
1842
1843
1834 1844
/* layout */
1835 1845
1836 1846
.container {
@ -2104,9 +2114,11 @@ a cite {
2104 2114
    padding-top: 10px;
2105 2115
    padding-right: 0px;
2106 2116
}
2117
2107 2118
.item-caption.center {
2108 2119
    text-align: center;
2109 2120
}
2121
2110 2122
.item-caption.required:after {
2111 2123
    content: ' *';
2112 2124
    color: red;
@ -2519,9 +2531,10 @@ table td[class*=col-], table th[class*=col-] {
2519 2531
    min-height: .01%;
2520 2532
    overflow-x: auto
2521 2533
}
2522
.table td.empty-desc{
2523
	text-align: center;
2524
	font-size: 30px;
2534
2535
.table td.empty-desc {
2536
    text-align: center;
2537
    font-size: 30px;
2525 2538
}
2526 2539
2527 2540
.dt-pager {
@ -2566,11 +2579,50 @@ table td[class*=col-], table th[class*=col-] {
2566 2579
    border-color: #ddd;
2567 2580
}
2568 2581
2569
.opt-check .icon-st-check:before{
2570
	 content: '\e68b';
2571
	 cursor: pointer;
2582
.opt-check .icon-st-check:before {
2583
    content: '\e68b';
2584
    cursor: pointer;
2585
}
2586
2587
.opt-check .icon-st-check.checked:before {
2588
    content: '\e642';
2589
}
2590
2591
.modal-dialog {
2592
    position: absolute;
2593
    max-width: 90%;
2594
    max-height: 90%;
2595
    min-width: 400px;
2596
    top: 50%;
2597
    left: 50%;
2598
    transform: translate(-50%, -50%);
2599
    background-color: #fff;
2600
    border: 1px solid rgba(0, 0, 0, .2);
2601
    border-radius: 6px;
2602
    box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
2603
}
2604
2605
.modal-dialog .modal-header {
2606
    min-height: 16.54px;
2607
    padding: 15px;
2608
    border-bottom: 1px solid #e5e5e5;
2572 2609
}
2573
.opt-check .icon-st-check.checked:before{
2574
	 content: '\e642';
2610
2611
.modal-dialog .modal-header .modal-title {
2612
    margin: 0;
2613
    line-height: 1.53846154;
2614
    font-weight: 700;
2575 2615
}
2576 2616
2617
.modal-dialog .modal-body {
2618
    padding: 15px;
2619
}
2620
2621
.modal-dialog .modal-footer {
2622
    padding: 15px;
2623
    text-align: right;
2624
    border-top: 1px solid #e5e5e5;
2625
}
2626
.modal-dialog .modal-footer button {
2627
    margin-left: 10px;
2628
}

+ 4 - 0
css/model/sys/org/edit.css

@ -0,0 +1,4 @@
1
@charset "utf-8";
2
.sys_org_edit{
3
	width:800px;
4
}

+ 0 - 1
css/model/sys/org/new.css

@ -1,5 +1,4 @@
1 1
@charset "utf-8";
2 2
.sys_org_new{
3 3
	width:800px;
4

5 4
}

+ 35 - 0
html/model/sys/org/edit.html

@ -0,0 +1,35 @@
1
<div class="sys_org_edit centerModal">
2
	<div class="modal-ctrl">
3
		<i class="icon icon-times"></i>
4
	</div>
5
	<div class="container newForm">
6
		<div class="row">
7
			<div class="col-2 item-caption">机构NAME</div>
8
			<div class="col-10">
9
				<div class="form-item text" defVal="" name="name"></div>
10
			</div>
11
		</div>
12
		<div class="row">
13
			<div class="col-2 item-caption">机构类型</div>
14
			<div class="col-10">
15
				<div class="form-item select" defVal="" dictCode="bool" name="type"></div>
16
			</div>
17
		</div>
18
		<div class="row">
19
			<div class="col-2 item-caption">备注</div>
20
			<div class="col-10">
21
				<div class="form-item textarea" defVal="" name="descp"></div>
22
			</div>
23
		</div>
24
		<div class="row">
25
			<div class="col-10"></div>
26
			<div class="col-2">
27
				<div class="btn pull-right opt-save">
28
					<i class="icon-check"></i> SAVE
29
				</div>
30

31
			</div>
32

33
		</div>
34
	</div>
35
</div>

+ 4 - 2
html/model/sys/org/index.html

@ -1,4 +1,4 @@
1
<div class="sys_org_index" loadUri="../ajax/sys/org/pq" pageSize="5" pageNo="1">
1
<div class="sys_org_index" loadUri="../ajax/sys/org/pq" pageSize="7" pageNo="1" pageIndex="pi">
2 2
	<div class="modal-ctrl">
3 3
		<i class="icon icon-times"></i>
4 4
	</div>
@ -56,6 +56,7 @@
56 56
				<tr>
57 57
					<th class="opt-check" ><i class="icon icon-st-check"></i> </th>
58 58
					<th>序号</th>
59
					<th>PageIndex</th>
59 60
					<th>名称</th>
60 61
					<th>登记日期</th>
61 62
					<th>类型</th>
@ -65,6 +66,7 @@
65 66
				<tr>
66 67
					<td class="opt-check" ><i class="icon icon-st-check" orgId="{{id}}"></i></td>
67 68
					<td>{{any-[]}}</td>
69
					<td>{{pi}}</td>
68 70
					<td>{{name}}</td>
69 71
					<td>{{createTime-showDay}}</td>
70 72
					<td class="do-dict-display" dict="bool" code="{{type}}"></td>
@ -72,7 +74,7 @@
72 74
			</tbody>
73 75
			<tbody class="code-tpl code-tag-hold" code-func="data-emptylist">
74 76
				<tr>
75
					<td class="empty-desc" colspan="5">表格暂无数据</td>
77
					<td class="empty-desc" colspan="6">表格暂无数据</td>
76 78
				</tr>
77 79
			</tbody>
78 80
		</table>

+ 69 - 10
js/base.js

@ -121,6 +121,7 @@ function($) {
121 121
		_g_layer_curr = { index: 5000000, remove: noop, css: noop },
122 122
		layer_remove = function() {
123 123
			this.shade.remove();
124
			this.ctn.empty();
124 125
			this.ctn.remove();
125 126
			this.prev.css("display", "block");
126 127
			_g_layer_curr = this.prev;
@ -198,13 +199,51 @@ function($) {
198 199
		/*
199 200
		 * 弹出提示信息,不会自动消失    parent is body z - index 5000000 - 9999997
200 201
		 */
201
		alertMsg: function(cnt) {},
202
		alertMsg: function(title, content,hand) {
203
			if(content){
204
				if($.isFunction(content)){
205
					hand = content;
206
					content = title;
207
					title = "提示";
208
				}
209
			}else{
210
				content = title;
211
				title = "提示";
212
			}
213
			hand=hand || noop;
214
			var ly = util.createModalLayer('<div class="modal-dialog"><div class="modal-content"><div class="modal-header"><h4 class="modal-title"></h4></div><div class="modal-body"><p></p></div><div class="modal-footer"><button type="button" class="btn">关闭</button></div></div></div>');
215
			ly.ctn.find(".modal-title").text(title);
216
			$content = ly.ctn.find("p").text(content);
217
			ly.ctn.find("button").on("click", function() {
218
				util.closeModalLayer();
219
				hand();
220
			});
221
		},
202 222
		/*
203 223
		 *弹出确认信息,不会自动消失    parent is body z - index 1000000 - 4999999 
204 224
		 * btns is Array 
205 225
		 * btns like [{catpion:"button caption",handler:function(){}},...]
206 226
		 */
207
		boxMsg: function(cnt, btns) {},
227
		boxMsg: function(obj) {
228
			var ly = util.createModalLayer('<div class="modal-dialog"><div class="modal-content"><div class="modal-header"><h4 class="modal-title"></h4></div><div class="modal-body"><p></p></div><div class="modal-footer"></div></div></div>');
229
			ly.ctn.find(".modal-title").text(obj.title || "确认");
230
			ly.ctn.find("p").text(obj.content);
231
			var m_footer = ly.ctn.find(".modal-footer"),
232
				btnH = function(btn) {
233
					var $btn = $('<button type="button" class="btn"></button>').appendTo(m_footer);
234
					var caption = btn.caption || "未命名的",
235
						handler = btn.hand || noop;
236
					$btn.text(caption);
237
					$btn.on("click", function() {
238
						util.closeModalLayer();
239
						handler();
240
					});
241
				};
242

243
			for(var i = 0; i < obj.btns.length; ++i) {
244
				btnH(obj.btns[i]);
245
			}
246
		},
208 247

209 248
		/*
210 249
		 *弹出确认信息,不会自动消失    parent is body z - index 1000000 - 4999999 
@ -274,6 +313,7 @@ function($) {
274 313
				type: method,
275 314
				url: pUrl,
276 315
				//cache: false,
316
				traditional:true,
277 317
				data: pData,
278 318
				contentType: method == "put" ? "application/json" : "application/x-www-form-urlencoded",
279 319
			}).done(function(rd) {
@ -311,6 +351,9 @@ function($) {
311 351
			util.ajax("post", url, data, sh, eh);
312 352
		},
313 353
		put: function(url, data, sh, eh) {
354
			if(data && ("string"!=$.type(data))){
355
				data =JSON.stringify(data);
356
			}
314 357
			util.ajax("put", url, data, sh, eh);
315 358
		},
316 359
		del: function(url, sh, eh) {
@ -369,7 +412,7 @@ function($) {
369 412
			util.showLoading();
370 413
			$.ajax({ url: dict_baseUri + dictCode, type: "get", dataType: "json" }).done(function(data) {
371 414
				util.hideLoading();
372
				if(data.success){
415
				if(data.success) {
373 416
					data = data.data;
374 417
					dict_dictCache[dictCode] = data;
375 418
					var handlers = dict_dictHandleCache[dictCode];
@ -379,7 +422,7 @@ function($) {
379 422
						}
380 423
						delete dict_dictHandleCache[dictCode];
381 424
					}
382
				}else{
425
				} else {
383 426
					var m = "load dict[" + dictCode + "] error";
384 427
					util.error(m);
385 428
				}
@ -1278,20 +1321,24 @@ function($) {
1278 1321
			}
1279 1322
			return qs;
1280 1323
		},
1281
		get: function(url, data, eh) {
1324
		get: function(url, data, check, eh) {
1282 1325
			if(CK_FALSE === data) return;
1283 1326
			var self = this;
1284 1327
			util.get(url, data, function(rd) {
1285
				self.reset();
1286
				self.val(rd);
1328
				if(check(rd)) {
1329
					self.reset();
1330
					self.val(rd);
1331
				}
1287 1332
			}, eh);
1288 1333
		},
1289
		post: function(url, data, eh) {
1334
		post: function(url, data, check, eh) {
1290 1335
			if(CK_FALSE === data) return;
1291 1336
			var self = this;
1292 1337
			util.post(url, data, function(rd) {
1293
				self.reset();
1294
				self.val(rd);
1338
				if(check(rd)) {
1339
					self.reset();
1340
					self.val(rd);
1341
				}
1295 1342
			}, eh);
1296 1343
		},
1297 1344
		doGet: function(url, sh, eh) {
@ -1598,6 +1645,14 @@ function($) {
1598 1645
					this.pagerEle.children("li.active").on("click", function() {
1599 1646
						self.goPage(parseInt($(this).attr("no")));
1600 1647
					});
1648
				} else {
1649
					this.pagerEle.empty();
1650
				}
1651
			},
1652
			pdt_build_pageIndex = function(data, key, pageSize, pageNo) {
1653
				var bi = pageSize * (pageNo - 1) + 1;
1654
				for(var i = 0; i < data.length; ++i) {
1655
					data[i][key] = bi++;
1601 1656
				}
1602 1657
			},
1603 1658
			PageDataTable = function(ele) {
@ -1612,6 +1667,7 @@ function($) {
1612 1667
				this.ph = pdt_pager_builder;
1613 1668
				this.ele.data(DK_PAGE_DATA_TABLE, this);
1614 1669
				this.eh = true;
1670
				this.pageIndex = ele.attr("pageIndex");
1615 1671
			};
1616 1672
		$.extend(PageDataTable.prototype, {
1617 1673
			error: function(eh) { this.eh = eh },
@ -1632,6 +1688,9 @@ function($) {
1632 1688
				util.get(self.uri, this.cache, function(data) {
1633 1689
					self.total = data.total;
1634 1690
					data.length = data.data.length;
1691
					if(self.pageIndex) {
1692
						pdt_build_pageIndex(data.data, self.pageIndex, data.pageSize, data.pageNo);
1693
					}
1635 1694
					self.codeRef.val(data);
1636 1695
					self.ph(data);
1637 1696
				}, self.eh);

+ 25 - 0
js/model/sys/org/edit.js

@ -0,0 +1,25 @@
1
;
2
spa_define(function(spa) {
3

4
	return {
5
		modal: function(data) {
6
			var modalCtn = spa.getLastModalCtn();
7
			var root = modalCtn = modalCtn.children();
8
			var form = root.find(".newForm").form();
9
			root.find(".modal-ctrl .icon-times").on("click", function() {
10
				spa.closeModal();
11
			});
12
			var handler = data.hand;
13
			var closeThis = function() {
14
				spa.closeModal();
15
				if(handler) {
16
					handler();
17
				}
18
			};
19
			form.val(data.data);
20
			root.find(".opt-save").on("click", function() {
21
				form.doPut("../ajax/sys/org", closeThis, {});
22
			});
23
		}
24
	};
25
});

+ 77 - 39
js/model/sys/org/index.js

@ -5,70 +5,108 @@ spa_define(function(spa) {
5 5
		main: function() {
6 6
			var root = spa.mainEle.children(".sys_org_index");
7 7
			var pdg = root.pdg();
8
			pdg.codeRef.shell("showDay",function(data,key){
9
				if(data && data[key]){
8
			pdg.codeRef.shell("showDay", function(data, key) {
9
				if(data && data[key]) {
10 10
					var day = data[key];
11
					return day.substring(0,4)+"年"+day.substring(4,6)+"月"+day.substring(6,8)+"日";
11
					return day.substring(0, 4) + "年" + day.substring(4, 6) + "月" + day.substring(6, 8) + "日";
12 12
				}
13 13
				return "";
14 14
			});
15 15
			pdg.codeRef.addValueListener($.util.dictDisplay);
16 16
			root.find(".opt-query").on("click", function() {
17
//				console.log("dt load")
17
				//				console.log("dt load")
18 18
				pdg.load();
19 19
			});
20 20

21 21
			//console.log(pdg.formRef.val());
22 22
			pdg.load();
23
			
24
			root.find(".opt-new").on("click",function(){
25
				spa.showModal("sys_org_new",function(){pdg.load()});
23

24
			root.find(".opt-new").on("click", function() {
25
				spa.showModal("sys_org_new", function() { pdg.load() });
26 26
			});
27
			root.find(".dt-tpl").on("click","th.opt-check>i.icon-st-check",function(){
27
			root.find(".dt-tpl").on("click", "th.opt-check>i.icon-st-check", function() {
28 28
				var $this = $(this);
29 29
				$this.toggleClass("checked");
30
				if($this.hasClass("checked")){
30
				if($this.hasClass("checked")) {
31 31
					root.find(".dt-tpl td.opt-check>i.icon-st-check").addClass("checked");
32
				}else{
32
				} else {
33 33
					root.find(".dt-tpl td.opt-check>i.icon-st-check").removeClass("checked");
34 34
				}
35 35
			});
36
			root.find(".dt-tpl").on("click","td.opt-check>i.icon-st-check",function(){
36
			root.find(".dt-tpl").on("click", "td.opt-check>i.icon-st-check", function() {
37 37
				var $this = $(this);
38 38
				$this.toggleClass("checked");
39 39
			});
40
			root.find(".opt-edit").on("click", function() {
41
				var $org = root.find("td.opt-check>i.checked");
42
				if($org.length) {
43
					if($org.length > 1) {
44
						$.util.alertMsg("只能选择一个机构");
45
					} else {
46
						$.util.get("../ajax/sys/org/id/"+$org.attr("orgId"),null,function(rd){
47
							if(rd){
48
								spa.showModal("sys_org_edit", { data:rd, hand: function() { pdg.load() } })								
49
							}else{
50
								$.util.alertMsg("机构已不存在", function(){pdg.load();});
51
							}
52
						},{});
53
					}
54
				} else {
55
					$.util.alertMsg("请选择一个机构");
56
				}
57
			});
58
			root.find(".opt-del").on("click", function() {
59
				var $org = root.find("td.opt-check>i.checked");
60
				if($org.length) {
61
					var ret =[];
62
					$org.each(function(){
63
						ret.push($(this).attr("orgId"));						
64
					});
65
					$.util.boxMsg({
66
						title: "确认删除",
67
						content: "您是否要删除选中的机构信息,机构信息删除后不可恢复!!!!!!!!!!!!!!!!!!",
68
						btns: [{ caption: "删除", hand: function() {
69
							$.util.post("../ajax/sys/org/del",{ids:ret},function(){pdg.load()},{});							
70
						} },
71
							{ caption: "取消" }
72
						]
73
					});
74
				} else {
75
					$.util.alertMsg("请选择一个机构");
76
				}
77
			});
40 78
		},
41 79
		modal: function(data) {
42 80
			//console.log(spa.getLastModalCtn())
43 81
			//spa.getLastModalCtn().html(" in modal:"+(new Date()).toString());	
44
//			var modalCtn =spa.getLastModalCtn();
45
//			var root = modalCtn = modalCtn.children();	
46
//			root.css("width","80%");
47
//			root.find(".upload-btn").upload({
48
//				uri:"/ajax/upload",
49
//				maxSize:1048576,
50
//				accept:"image/*",
51
//				start:function(){console.log("start:"+JSON.stringify(this))},
52
//				done:function(data){console.log("done:"+JSON.stringify({ref:this,data:data}))},
53
//				fail:function(type,param){console.log("fail:"+JSON.stringify({ref:this,type:type,param:param}))},
54
//				notity:function(total,loaded){console.log("notity:"+JSON.stringify({ref:this,total:total,loaded:loaded}))},
55
//			});
56
//			root.find(".icon-times").on("click",function(){
57
//				spa.closeModal();
58
//			});
59
//			var pdg =root.pdg();
60
//			pdg.codeRef.addValueListener($.util.dictDisplay);
61
//			root.find(".query").on("click", function() {
62
//				console.log("dt load")
63
//				pdg.load();
64
//			});
65
//			root.find(".reset").on("click", function() {
66
//				console.log("dt reset")
67
//				pdg.formRef.reset();
68
//			});
69
//			console.log(pdg.formRef.val());
70
//			pdg.load();
71
			
82
			//			var modalCtn =spa.getLastModalCtn();
83
			//			var root = modalCtn = modalCtn.children();	
84
			//			root.css("width","80%");
85
			//			root.find(".upload-btn").upload({
86
			//				uri:"/ajax/upload",
87
			//				maxSize:1048576,
88
			//				accept:"image/*",
89
			//				start:function(){console.log("start:"+JSON.stringify(this))},
90
			//				done:function(data){console.log("done:"+JSON.stringify({ref:this,data:data}))},
91
			//				fail:function(type,param){console.log("fail:"+JSON.stringify({ref:this,type:type,param:param}))},
92
			//				notity:function(total,loaded){console.log("notity:"+JSON.stringify({ref:this,total:total,loaded:loaded}))},
93
			//			});
94
			//			root.find(".icon-times").on("click",function(){
95
			//				spa.closeModal();
96
			//			});
97
			//			var pdg =root.pdg();
98
			//			pdg.codeRef.addValueListener($.util.dictDisplay);
99
			//			root.find(".query").on("click", function() {
100
			//				console.log("dt load")
101
			//				pdg.load();
102
			//			});
103
			//			root.find(".reset").on("click", function() {
104
			//				console.log("dt reset")
105
			//				pdg.formRef.reset();
106
			//			});
107
			//			console.log(pdg.formRef.val());
108
			//			pdg.load();
109

72 110
		},
73 111
		mainDestory: function() {
74 112