rabin 5 years ago
parent
commit
1e56aa331e
2 changed files with 10 additions and 7 deletions
  1. 3 3
      assets/lib/kindeditor/kindeditor-all-min.js
  2. 7 4
      assets/lib/manage/main.js

+ 3 - 3
assets/lib/kindeditor/kindeditor-all-min.js

@@ -7604,7 +7604,7 @@ KindEditor.plugin('image', function(K) {
 				};
 
 				var cur = K('[name="url"]', div).val();
-				editorShowUpload(cur, self.uploadJson.replace('save.kindeditor', 'view.files'), '图库', clickFn, this);
+				editorShowUpload(cur, self.fileManagerJson, '图库', clickFn, this);
 				/*
 				self.loadPlugin('filemanager', function() {
 					self.plugin.filemanagerDialog({
@@ -7861,7 +7861,7 @@ KindEditor.plugin('insertfile', function(K) {
 				};
 
 				var cur = K('[name="url"]', div).val();
-				editorShowUpload(cur, self.uploadJson.replace('save.kindeditor', 'view.files'), '文件库', clickFn, this);
+				editorShowUpload(cur, self.fileManagerJson, '文件库', clickFn, this);
 
 				/*
 				self.loadPlugin('filemanager', function() {
@@ -8261,7 +8261,7 @@ KindEditor.plugin('media', function(K) {
 					};
 
 					var cur = coverUrlBox.val();
-					editorShowUpload(cur, self.uploadJson.replace('save.kindeditor', 'view.files'), '图库', clickFn, this);
+					editorShowUpload(cur, self.fileManagerJson, '图库', clickFn, this);
 
 					/*
 					self.loadPlugin('filemanager', function() {

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

@@ -452,6 +452,9 @@ function loadEditorParam(e)
 	var domain = e.attr('domain');
 	var path = e.attr('path');
 
+	var upload_search = e.attr('upload_search');
+	var upload_search_value = e.attr('upload_search_value');
+
 	var yun = {};
 	if (token && host) {
 		yun.token = token;
@@ -474,11 +477,11 @@ function loadEditorParam(e)
 		themeType : 'default',
 		filePostName : 'file',
 		dialogOffset : 0, //对话框距离页面顶部的位置,默认为0居中,
-		uploadJson : config.upload + '.kindeditor?key=' + key,
-		uploadResJson : config.uploadRes + '.kindeditor?key=' + key,
-		uploadMediaJson : config.upload + '.kindeditor?key=' + media,
+		uploadJson : config.upload + '.kindeditor?key=' + key + '&search=' + upload_search_value,
+		uploadResJson : config.uploadRes + '.kindeditor?key=' + key + '&search=' + upload_search_value,
+		uploadMediaJson : config.upload + '.kindeditor?key=' + media + '&search=' + upload_search_value,
 		uploadYunJson : yun,
-		fileManagerJson : view + '.files?key=' + media,
+		fileManagerJson : view + '.files?key=' + media + '&upload_search=' + upload_search,
 
 		htmlTags : {
 			section : ['id', 'class', 'color', 'size', 'face', '.background-color'],