dever 6 years ago
parent
commit
b1572bc22f

+ 3 - 2
assets/lib/layui/upload.js

@@ -21,6 +21,7 @@ function loadUpload(i,e,key,upload,assets)
 			,field: 'file'
 			,url: upload
 			,multiple: true
+			,accept:'file'
 			,choose: function(obj){
 				layer_1 = layer.load(0, {shade: false});
 			}
@@ -38,9 +39,9 @@ function loadUpload(i,e,key,upload,assets)
 							var m = $('.' +value+'_mul');
 							var i = m.find('li').eq(upload_file.length);
 							if (i.length) {
-								i.find('a').eq(0).html(data.data.name);
+								i.find('a').eq(0).html(data.name);
 							} else {
-								m.append('<li><a href="'+data.url+'" target="_blank" title="点此下载" >'+data.data.name+'</a>&nbsp;&nbsp;<a href="javascript:;" title="点此删除" style="color:red;" onclick="fileDel($(this), \''+value+'\')">[删除]</a></li>');
+								m.append('<li><a href="'+data.url+'" target="_blank" title="点此下载" >'+data.name+'</a>&nbsp;&nbsp;<a href="javascript:;" title="点此删除" style="color:red;" onclick="fileDel($(this), \''+value+'\')">[删除]</a></li>');
 							}
 
 							upload_file.push(data.url);

+ 7 - 5
assets/lib/manage/main.js

@@ -11,6 +11,7 @@ $(document).ready(function()
 
 function init()
 {
+	editors = [];
 	select = '';
 	edit();
 	del();
@@ -277,8 +278,8 @@ function loadEditor(e)
 
 	if(typeof(editors[id]) == "object")
 	{
-		editors[id].destroy();
-		editors[id] = undefined;
+		//editors[id].destroy();
+		//editors[id] = undefined;
 	}
 
 	if(typeof(editors[id]) == "undefined")
@@ -1348,7 +1349,7 @@ function showToggle(e)
 	loadEditor($(id).find('.editor'));
 }
 
-function select_linkage(level, id, url, name, value, valid, w, total, search)
+function select_linkage(level, id, url, name, value, valid, w, total, search, level_param)
 {
 	var e = '#' + id;
 	var parent = value.split(',');
@@ -1368,14 +1369,14 @@ function select_linkage(level, id, url, name, value, valid, w, total, search)
 		level_id = $(e + '_' + level).val();
 		level = parseInt(level) + 1;
 	}
-	$.getJSON(url + '?json=1', {level_search:search, level_id:level_id, level_num:level}, function(t) {
+	$.getJSON(url + '?json=1', {level_search:search, level_id:level_id, level_num:level,level_param:level_param}, function(t) {
 		var check = '';
 		if (t.status == 1) {
 			var total = t.data.level_total;
 			var data = t.data.list;
 
 			if(!$(e + '_' + level).length) {
-				html = '<select style="'+w+'display:inline;margin-top:10px;" class="update_value form-control '+valid+'" id="'+id+'_'+level+'" name="'+name+'[]" onchange="select_linkage(\''+level+'\', \''+id+'\', \''+url+'\', \''+name+'\', \''+value+'\', \''+valid+'\', \''+w+'\', '+total+', '+search+');">';
+				html = '<select style="'+w+'display:inline;margin-top:10px;" class="update_value form-control '+valid+'" id="'+id+'_'+level+'" name="'+name+'[]" onchange="select_linkage(\''+level+'\', \''+id+'\', \''+url+'\', \''+name+'\', \''+value+'\', \''+valid+'\', \''+w+'\', '+total+', \''+search+'\', \''+level_param+'\');">';
 			}
 
 			for (a in data) {
@@ -1539,6 +1540,7 @@ var dever_update =
 	init : function()
 	{
 		var self = this;
+		self.index = [];
 
 		// 增加整个更新的表单
 		if($(".dever_update_add").length)

+ 1 - 1
assets/lib/simditor/scripts/simditor.min.js

@@ -1964,7 +1964,7 @@ Toolbar = (function(superClass) {
           _this.wrapper.css('position', 'static');
           _this.wrapper.width('auto');
           _this.editor.util.reflow(_this.wrapper);
-          _this.wrapper.width(_this.wrapper.outerWidth());
+          //_this.wrapper.width(_this.wrapper.outerWidth());
           _this.wrapper.css('left', _this.editor.util.os.mobile ? _this.wrapper.position().left : _this.wrapper.offset().left);
           _this.wrapper.css('position', '');
           toolbarHeight = _this.wrapper.outerHeight();