rails_kindeditor 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +14 -99
- data/lib/generators/rails_kindeditor/install/install_generator.rb +2 -2
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/kindeditor-min.js +165 -158
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/lang/en.js +210 -208
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/lang/zh_CN.js +214 -210
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/lang/zh_TW.js +212 -210
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/anchor/anchor.js +46 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/clearhtml/clearhtml.js +29 -28
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/filemanager/filemanager.js +185 -189
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/flash/flash.js +145 -128
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/image/image.js +242 -226
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/insertfile/insertfile.js +109 -104
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/link/link.js +65 -59
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/map/map.js +137 -135
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/media/media.js +153 -136
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/pagebreak/pagebreak.js +26 -26
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/table/table.js +715 -661
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/wordpaste/wordpaste.js +51 -57
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/themes/common/anchor.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/themes/default/default.css +980 -941
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/themes/default/default.gif +0 -0
- data/lib/rails_kindeditor/helper.rb +9 -10
- data/lib/rails_kindeditor/version.rb +1 -1
- metadata +29 -231
- data/vendor/assets/javascripts/kindeditor.js +0 -158
- data/vendor/assets/javascripts/lang/en.js +0 -208
- data/vendor/assets/javascripts/lang/zh_CN.js +0 -210
- data/vendor/assets/javascripts/lang/zh_TW.js +0 -210
- data/vendor/assets/javascripts/plugins/clearhtml/clearhtml.js +0 -28
- data/vendor/assets/javascripts/plugins/code/code.js +0 -57
- data/vendor/assets/javascripts/plugins/code/prettify.css +0 -13
- data/vendor/assets/javascripts/plugins/code/prettify.js +0 -28
- data/vendor/assets/javascripts/plugins/emoticons/emoticons.js +0 -129
- data/vendor/assets/javascripts/plugins/emoticons/images/0.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/1.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/10.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/100.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/101.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/102.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/103.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/104.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/105.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/106.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/107.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/108.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/109.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/11.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/110.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/111.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/112.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/113.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/114.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/115.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/116.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/117.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/118.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/119.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/12.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/120.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/121.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/122.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/123.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/124.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/125.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/126.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/127.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/128.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/129.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/13.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/130.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/131.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/132.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/133.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/134.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/14.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/15.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/16.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/17.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/18.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/19.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/2.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/20.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/21.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/22.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/23.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/24.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/25.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/26.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/27.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/28.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/29.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/3.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/30.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/31.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/32.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/33.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/34.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/35.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/36.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/37.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/38.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/39.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/4.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/40.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/41.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/42.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/43.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/44.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/45.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/46.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/47.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/48.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/49.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/5.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/50.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/51.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/52.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/53.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/54.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/55.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/56.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/57.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/58.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/59.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/6.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/60.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/61.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/62.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/63.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/64.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/65.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/66.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/67.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/68.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/69.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/7.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/70.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/71.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/72.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/73.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/74.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/75.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/76.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/77.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/78.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/79.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/8.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/80.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/81.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/82.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/83.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/84.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/85.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/86.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/87.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/88.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/89.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/9.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/90.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/91.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/92.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/93.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/94.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/95.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/96.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/97.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/98.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/99.gif +0 -0
- data/vendor/assets/javascripts/plugins/emoticons/images/static.gif +0 -0
- data/vendor/assets/javascripts/plugins/filemanager/filemanager.js +0 -189
- data/vendor/assets/javascripts/plugins/filemanager/images/file-16.gif +0 -0
- data/vendor/assets/javascripts/plugins/filemanager/images/file-64.gif +0 -0
- data/vendor/assets/javascripts/plugins/filemanager/images/folder-16.gif +0 -0
- data/vendor/assets/javascripts/plugins/filemanager/images/folder-64.gif +0 -0
- data/vendor/assets/javascripts/plugins/filemanager/images/go-up.gif +0 -0
- data/vendor/assets/javascripts/plugins/flash/flash.js +0 -128
- data/vendor/assets/javascripts/plugins/image/image.js +0 -226
- data/vendor/assets/javascripts/plugins/image/images/align_left.gif +0 -0
- data/vendor/assets/javascripts/plugins/image/images/align_right.gif +0 -0
- data/vendor/assets/javascripts/plugins/image/images/align_top.gif +0 -0
- data/vendor/assets/javascripts/plugins/image/images/refresh.gif +0 -0
- data/vendor/assets/javascripts/plugins/insertfile/insertfile.js +0 -104
- data/vendor/assets/javascripts/plugins/lineheight/lineheight.js +0 -38
- data/vendor/assets/javascripts/plugins/link/link.js +0 -59
- data/vendor/assets/javascripts/plugins/map/map.html +0 -57
- data/vendor/assets/javascripts/plugins/map/map.js +0 -135
- data/vendor/assets/javascripts/plugins/media/media.js +0 -136
- data/vendor/assets/javascripts/plugins/pagebreak/pagebreak.js +0 -26
- data/vendor/assets/javascripts/plugins/plainpaste/plainpaste.js +0 -41
- data/vendor/assets/javascripts/plugins/preview/preview.js +0 -31
- data/vendor/assets/javascripts/plugins/quickformat/quickformat.js +0 -71
- data/vendor/assets/javascripts/plugins/table/table.js +0 -661
- data/vendor/assets/javascripts/plugins/template/html/1.html +0 -14
- data/vendor/assets/javascripts/plugins/template/html/2.html +0 -42
- data/vendor/assets/javascripts/plugins/template/html/3.html +0 -36
- data/vendor/assets/javascripts/plugins/template/template.js +0 -58
- data/vendor/assets/javascripts/plugins/wordpaste/wordpaste.js +0 -57
- data/vendor/assets/stylesheets/bg.gif +0 -0
- data/vendor/assets/stylesheets/default.gif +0 -0
- data/vendor/assets/stylesheets/kindeditor.css +0 -942
- data/vendor/assets/stylesheets/themes/common/blank.gif +0 -0
- data/vendor/assets/stylesheets/themes/common/flash.gif +0 -0
- data/vendor/assets/stylesheets/themes/common/loading.gif +0 -0
- data/vendor/assets/stylesheets/themes/common/media.gif +0 -0
- data/vendor/assets/stylesheets/themes/common/rm.gif +0 -0
- data/vendor/assets/stylesheets/themes/simple/simple.css +0 -148
data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/clearhtml/clearhtml.js
CHANGED
@@ -1,28 +1,29 @@
|
|
1
|
-
/*******************************************************************************
|
2
|
-
* KindEditor - WYSIWYG HTML Editor for Internet
|
3
|
-
* Copyright (C) 2006-2011 kindsoft.net
|
4
|
-
*
|
5
|
-
* @author Roddy <luolonghao@gmail.com>
|
6
|
-
* @site http://www.kindsoft.net/
|
7
|
-
* @licence http://www.kindsoft.net/license.php
|
8
|
-
*******************************************************************************/
|
9
|
-
|
10
|
-
KindEditor.plugin('clearhtml', function(K) {
|
11
|
-
var self = this, name = 'clearhtml';
|
12
|
-
self.clickToolbar(name, function() {
|
13
|
-
self.focus();
|
14
|
-
var html = self.html();
|
15
|
-
html = html.replace(/(<script[^>]*>)([\s\S]*?)(<\/script>)/ig, '');
|
16
|
-
html = html.replace(/(<style[^>]*>)([\s\S]*?)(<\/style>)/ig, '');
|
17
|
-
html = K.formatHtml(html, {
|
18
|
-
a : ['href', 'target'],
|
19
|
-
embed : ['src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'],
|
20
|
-
img : ['src', 'width', 'height', 'border', 'alt', 'title', '.width', '.height'],
|
21
|
-
table : ['border'],
|
22
|
-
'
|
23
|
-
|
24
|
-
|
25
|
-
self.
|
26
|
-
self.
|
27
|
-
|
28
|
-
});
|
1
|
+
/*******************************************************************************
|
2
|
+
* KindEditor - WYSIWYG HTML Editor for Internet
|
3
|
+
* Copyright (C) 2006-2011 kindsoft.net
|
4
|
+
*
|
5
|
+
* @author Roddy <luolonghao@gmail.com>
|
6
|
+
* @site http://www.kindsoft.net/
|
7
|
+
* @licence http://www.kindsoft.net/license.php
|
8
|
+
*******************************************************************************/
|
9
|
+
|
10
|
+
KindEditor.plugin('clearhtml', function(K) {
|
11
|
+
var self = this, name = 'clearhtml';
|
12
|
+
self.clickToolbar(name, function() {
|
13
|
+
self.focus();
|
14
|
+
var html = self.html();
|
15
|
+
html = html.replace(/(<script[^>]*>)([\s\S]*?)(<\/script>)/ig, '');
|
16
|
+
html = html.replace(/(<style[^>]*>)([\s\S]*?)(<\/style>)/ig, '');
|
17
|
+
html = K.formatHtml(html, {
|
18
|
+
a : ['href', 'target'],
|
19
|
+
embed : ['src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'],
|
20
|
+
img : ['src', 'width', 'height', 'border', 'alt', 'title', '.width', '.height'],
|
21
|
+
table : ['border'],
|
22
|
+
'td,th' : ['rowspan', 'colspan'],
|
23
|
+
'div,hr,br,tbody,tr,p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6' : []
|
24
|
+
});
|
25
|
+
self.html(html);
|
26
|
+
self.cmd.selection(true);
|
27
|
+
self.addBookmark();
|
28
|
+
});
|
29
|
+
});
|
data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/filemanager/filemanager.js
CHANGED
@@ -1,189 +1,185 @@
|
|
1
|
-
/*******************************************************************************
|
2
|
-
* KindEditor - WYSIWYG HTML Editor for Internet
|
3
|
-
* Copyright (C) 2006-2011 kindsoft.net
|
4
|
-
*
|
5
|
-
* @author Roddy <luolonghao@gmail.com>
|
6
|
-
* @site http://www.kindsoft.net/
|
7
|
-
* @licence http://www.kindsoft.net/license.php
|
8
|
-
*******************************************************************************/
|
9
|
-
|
10
|
-
KindEditor.plugin('filemanager', function(K) {
|
11
|
-
var self = this, name = 'filemanager',
|
12
|
-
fileManagerJson = K.undef(self.fileManagerJson, self.basePath + 'php/file_manager_json.php'),
|
13
|
-
imgPath = self.pluginsPath + name + '/images/',
|
14
|
-
lang = self.lang(name + '.');
|
15
|
-
function makeFileTitle(filename, filesize, datetime) {
|
16
|
-
return filename + ' (' + Math.ceil(filesize / 1024) + 'KB, ' + datetime + ')';
|
17
|
-
}
|
18
|
-
function bindTitle(el, data) {
|
19
|
-
if (data.is_dir) {
|
20
|
-
el.attr('title', data.filename);
|
21
|
-
} else {
|
22
|
-
el.attr('title', makeFileTitle(data.filename, data.filesize, data.datetime));
|
23
|
-
}
|
24
|
-
}
|
25
|
-
self.plugin.filemanagerDialog = function(options) {
|
26
|
-
var width = K.undef(options.width, 520),
|
27
|
-
height = K.undef(options.height, 510),
|
28
|
-
dirName = K.undef(options.dirName, ''),
|
29
|
-
viewType = K.undef(options.viewType, 'VIEW').toUpperCase(), // "LIST" or "VIEW"
|
30
|
-
clickFn = options.clickFn;
|
31
|
-
var html = [
|
32
|
-
'<div style="padding:10px 20px;">',
|
33
|
-
// header start
|
34
|
-
'<div class="ke-plugin-filemanager-header">',
|
35
|
-
// left start
|
36
|
-
'<div class="ke-left">',
|
37
|
-
'<img class="ke-inline-block" name="moveupImg" src="' + imgPath + 'go-up.gif" width="16" height="16" border="0" alt="" /> ',
|
38
|
-
'<a class="ke-inline-block" name="moveupLink" href="javascript:;">' + lang.moveup + '</a>',
|
39
|
-
'</div>',
|
40
|
-
// right start
|
41
|
-
'<div class="ke-right">',
|
42
|
-
lang.viewType + ' <select class="ke-inline-block" name="viewType">',
|
43
|
-
'<option value="VIEW">' + lang.viewImage + '</option>',
|
44
|
-
'<option value="LIST">' + lang.listImage + '</option>',
|
45
|
-
'</select> ',
|
46
|
-
lang.orderType + ' <select class="ke-inline-block" name="orderType">',
|
47
|
-
'<option value="NAME">' + lang.fileName + '</option>',
|
48
|
-
'<option value="SIZE">' + lang.fileSize + '</option>',
|
49
|
-
'<option value="TYPE">' + lang.fileType + '</option>',
|
50
|
-
'</select>',
|
51
|
-
'</div>',
|
52
|
-
'<div class="ke-clearfix"></div>',
|
53
|
-
'</div>',
|
54
|
-
// body start
|
55
|
-
'<div class="ke-plugin-filemanager-body"></div>',
|
56
|
-
'</div>'
|
57
|
-
].join('');
|
58
|
-
var dialog = self.createDialog({
|
59
|
-
name : name,
|
60
|
-
width : width,
|
61
|
-
height : height,
|
62
|
-
title : self.lang(name),
|
63
|
-
body : html
|
64
|
-
}),
|
65
|
-
div = dialog.div,
|
66
|
-
bodyDiv = K('.ke-plugin-filemanager-body', div),
|
67
|
-
moveupImg = K('[name="moveupImg"]', div),
|
68
|
-
moveupLink = K('[name="moveupLink"]', div),
|
69
|
-
viewServerBtn = K('[name="viewServer"]', div),
|
70
|
-
viewTypeBox = K('[name="viewType"]', div),
|
71
|
-
orderTypeBox = K('[name="orderType"]', div);
|
72
|
-
function reloadPage(path, order, func) {
|
73
|
-
var
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
reloadPage(result.
|
112
|
-
}
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
.
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
reloadPage('', orderTypeBox.val(), viewType == 'VIEW' ? createView : createList);
|
187
|
-
}
|
188
|
-
|
189
|
-
});
|
1
|
+
/*******************************************************************************
|
2
|
+
* KindEditor - WYSIWYG HTML Editor for Internet
|
3
|
+
* Copyright (C) 2006-2011 kindsoft.net
|
4
|
+
*
|
5
|
+
* @author Roddy <luolonghao@gmail.com>
|
6
|
+
* @site http://www.kindsoft.net/
|
7
|
+
* @licence http://www.kindsoft.net/license.php
|
8
|
+
*******************************************************************************/
|
9
|
+
|
10
|
+
KindEditor.plugin('filemanager', function(K) {
|
11
|
+
var self = this, name = 'filemanager',
|
12
|
+
fileManagerJson = K.undef(self.fileManagerJson, self.basePath + 'php/file_manager_json.php'),
|
13
|
+
imgPath = self.pluginsPath + name + '/images/',
|
14
|
+
lang = self.lang(name + '.');
|
15
|
+
function makeFileTitle(filename, filesize, datetime) {
|
16
|
+
return filename + ' (' + Math.ceil(filesize / 1024) + 'KB, ' + datetime + ')';
|
17
|
+
}
|
18
|
+
function bindTitle(el, data) {
|
19
|
+
if (data.is_dir) {
|
20
|
+
el.attr('title', data.filename);
|
21
|
+
} else {
|
22
|
+
el.attr('title', makeFileTitle(data.filename, data.filesize, data.datetime));
|
23
|
+
}
|
24
|
+
}
|
25
|
+
self.plugin.filemanagerDialog = function(options) {
|
26
|
+
var width = K.undef(options.width, 520),
|
27
|
+
height = K.undef(options.height, 510),
|
28
|
+
dirName = K.undef(options.dirName, ''),
|
29
|
+
viewType = K.undef(options.viewType, 'VIEW').toUpperCase(), // "LIST" or "VIEW"
|
30
|
+
clickFn = options.clickFn;
|
31
|
+
var html = [
|
32
|
+
'<div style="padding:10px 20px;">',
|
33
|
+
// header start
|
34
|
+
'<div class="ke-plugin-filemanager-header">',
|
35
|
+
// left start
|
36
|
+
'<div class="ke-left">',
|
37
|
+
'<img class="ke-inline-block" name="moveupImg" src="' + imgPath + 'go-up.gif" width="16" height="16" border="0" alt="" /> ',
|
38
|
+
'<a class="ke-inline-block" name="moveupLink" href="javascript:;">' + lang.moveup + '</a>',
|
39
|
+
'</div>',
|
40
|
+
// right start
|
41
|
+
'<div class="ke-right">',
|
42
|
+
lang.viewType + ' <select class="ke-inline-block" name="viewType">',
|
43
|
+
'<option value="VIEW">' + lang.viewImage + '</option>',
|
44
|
+
'<option value="LIST">' + lang.listImage + '</option>',
|
45
|
+
'</select> ',
|
46
|
+
lang.orderType + ' <select class="ke-inline-block" name="orderType">',
|
47
|
+
'<option value="NAME">' + lang.fileName + '</option>',
|
48
|
+
'<option value="SIZE">' + lang.fileSize + '</option>',
|
49
|
+
'<option value="TYPE">' + lang.fileType + '</option>',
|
50
|
+
'</select>',
|
51
|
+
'</div>',
|
52
|
+
'<div class="ke-clearfix"></div>',
|
53
|
+
'</div>',
|
54
|
+
// body start
|
55
|
+
'<div class="ke-plugin-filemanager-body"></div>',
|
56
|
+
'</div>'
|
57
|
+
].join('');
|
58
|
+
var dialog = self.createDialog({
|
59
|
+
name : name,
|
60
|
+
width : width,
|
61
|
+
height : height,
|
62
|
+
title : self.lang(name),
|
63
|
+
body : html
|
64
|
+
}),
|
65
|
+
div = dialog.div,
|
66
|
+
bodyDiv = K('.ke-plugin-filemanager-body', div),
|
67
|
+
moveupImg = K('[name="moveupImg"]', div),
|
68
|
+
moveupLink = K('[name="moveupLink"]', div),
|
69
|
+
viewServerBtn = K('[name="viewServer"]', div),
|
70
|
+
viewTypeBox = K('[name="viewType"]', div),
|
71
|
+
orderTypeBox = K('[name="orderType"]', div);
|
72
|
+
function reloadPage(path, order, func) {
|
73
|
+
var param = 'path=' + path + '&order=' + order + '&dir=' + dirName;
|
74
|
+
K.ajax(K.addParam(fileManagerJson, param + '&' + new Date().getTime()), func);
|
75
|
+
}
|
76
|
+
var elList = [];
|
77
|
+
function bindEvent(el, result, data, createFunc) {
|
78
|
+
var fileUrl = K.formatUrl(result.current_url + data.filename, 'absolute'),
|
79
|
+
dirPath = encodeURIComponent(result.current_dir_path + data.filename + '/');
|
80
|
+
if (data.is_dir) {
|
81
|
+
el.click(function(e) {
|
82
|
+
reloadPage(dirPath, orderTypeBox.val(), createFunc);
|
83
|
+
});
|
84
|
+
} else if (data.is_photo) {
|
85
|
+
el.click(function(e) {
|
86
|
+
clickFn.call(this, fileUrl, data.filename);
|
87
|
+
});
|
88
|
+
} else {
|
89
|
+
el.click(function(e) {
|
90
|
+
clickFn.call(this, fileUrl, data.filename);
|
91
|
+
});
|
92
|
+
}
|
93
|
+
elList.push(el);
|
94
|
+
}
|
95
|
+
function createCommon(result, createFunc) {
|
96
|
+
// remove events
|
97
|
+
K.each(elList, function() {
|
98
|
+
this.unbind();
|
99
|
+
});
|
100
|
+
moveupLink.unbind();
|
101
|
+
viewTypeBox.unbind();
|
102
|
+
orderTypeBox.unbind();
|
103
|
+
// add events
|
104
|
+
if (result.current_dir_path) {
|
105
|
+
moveupLink.click(function(e) {
|
106
|
+
reloadPage(result.moveup_dir_path, orderTypeBox.val(), createFunc);
|
107
|
+
});
|
108
|
+
}
|
109
|
+
function changeFunc() {
|
110
|
+
if (viewTypeBox.val() == 'VIEW') {
|
111
|
+
reloadPage(result.current_dir_path, orderTypeBox.val(), createView);
|
112
|
+
} else {
|
113
|
+
reloadPage(result.current_dir_path, orderTypeBox.val(), createList);
|
114
|
+
}
|
115
|
+
}
|
116
|
+
viewTypeBox.change(changeFunc);
|
117
|
+
orderTypeBox.change(changeFunc);
|
118
|
+
bodyDiv.html('');
|
119
|
+
}
|
120
|
+
function createList(result) {
|
121
|
+
createCommon(result, createList);
|
122
|
+
var table = document.createElement('table');
|
123
|
+
table.className = 'ke-table';
|
124
|
+
table.cellPadding = 0;
|
125
|
+
table.cellSpacing = 0;
|
126
|
+
table.border = 0;
|
127
|
+
bodyDiv.append(table);
|
128
|
+
var fileList = result.file_list;
|
129
|
+
for (var i = 0, len = fileList.length; i < len; i++) {
|
130
|
+
var data = fileList[i], row = K(table.insertRow(i));
|
131
|
+
row.mouseover(function(e) {
|
132
|
+
K(this).addClass('ke-on');
|
133
|
+
})
|
134
|
+
.mouseout(function(e) {
|
135
|
+
K(this).removeClass('ke-on');
|
136
|
+
});
|
137
|
+
var iconUrl = imgPath + (data.is_dir ? 'folder-16.gif' : 'file-16.gif'),
|
138
|
+
img = K('<img src="' + iconUrl + '" width="16" height="16" alt="' + data.filename + '" align="absmiddle" />'),
|
139
|
+
cell0 = K(row[0].insertCell(0)).addClass('ke-cell ke-name').append(img).append(document.createTextNode(' ' + data.filename));
|
140
|
+
if (!data.is_dir || data.has_file) {
|
141
|
+
row.css('cursor', 'pointer');
|
142
|
+
cell0.attr('title', data.filename);
|
143
|
+
bindEvent(cell0, result, data, createList);
|
144
|
+
} else {
|
145
|
+
cell0.attr('title', lang.emptyFolder);
|
146
|
+
}
|
147
|
+
K(row[0].insertCell(1)).addClass('ke-cell ke-size').html(data.is_dir ? '-' : Math.ceil(data.filesize / 1024) + 'KB');
|
148
|
+
K(row[0].insertCell(2)).addClass('ke-cell ke-datetime').html(data.datetime);
|
149
|
+
}
|
150
|
+
}
|
151
|
+
function createView(result) {
|
152
|
+
createCommon(result, createView);
|
153
|
+
var fileList = result.file_list;
|
154
|
+
for (var i = 0, len = fileList.length; i < len; i++) {
|
155
|
+
var data = fileList[i],
|
156
|
+
div = K('<div class="ke-inline-block ke-item"></div>');
|
157
|
+
bodyDiv.append(div);
|
158
|
+
var photoDiv = K('<div class="ke-inline-block ke-photo"></div>')
|
159
|
+
.mouseover(function(e) {
|
160
|
+
K(this).addClass('ke-on');
|
161
|
+
})
|
162
|
+
.mouseout(function(e) {
|
163
|
+
K(this).removeClass('ke-on');
|
164
|
+
});
|
165
|
+
div.append(photoDiv);
|
166
|
+
var fileUrl = result.current_url + data.filename,
|
167
|
+
iconUrl = data.is_dir ? imgPath + 'folder-64.gif' : (data.is_photo ? fileUrl : imgPath + 'file-64.gif');
|
168
|
+
var img = K('<img src="' + iconUrl + '" width="80" height="80" alt="' + data.filename + '" />');
|
169
|
+
if (!data.is_dir || data.has_file) {
|
170
|
+
photoDiv.css('cursor', 'pointer');
|
171
|
+
bindTitle(photoDiv, data);
|
172
|
+
bindEvent(photoDiv, result, data, createView);
|
173
|
+
} else {
|
174
|
+
photoDiv.attr('title', lang.emptyFolder);
|
175
|
+
}
|
176
|
+
photoDiv.append(img);
|
177
|
+
div.append('<div class="ke-name" title="' + data.filename + '">' + data.filename + '</div>');
|
178
|
+
}
|
179
|
+
}
|
180
|
+
viewTypeBox.val(viewType);
|
181
|
+
reloadPage('', orderTypeBox.val(), viewType == 'VIEW' ? createView : createList);
|
182
|
+
return dialog;
|
183
|
+
}
|
184
|
+
|
185
|
+
});
|
@@ -1,128 +1,145 @@
|
|
1
|
-
/*******************************************************************************
|
2
|
-
* KindEditor - WYSIWYG HTML Editor for Internet
|
3
|
-
* Copyright (C) 2006-2011 kindsoft.net
|
4
|
-
*
|
5
|
-
* @author Roddy <luolonghao@gmail.com>
|
6
|
-
* @site http://www.kindsoft.net/
|
7
|
-
* @licence http://www.kindsoft.net/license.php
|
8
|
-
*******************************************************************************/
|
9
|
-
|
10
|
-
KindEditor.plugin('flash', function(K) {
|
11
|
-
var self = this, name = 'flash', lang = self.lang(name + '.'),
|
12
|
-
allowFlashUpload = K.undef(self.allowFlashUpload, true),
|
13
|
-
allowFileManager = K.undef(self.allowFileManager, false),
|
14
|
-
uploadJson = K.undef(self.uploadJson, self.basePath + 'php/upload_json.php');
|
15
|
-
self.plugin.flash = {
|
16
|
-
edit : function() {
|
17
|
-
var html = [
|
18
|
-
'<div style="padding:10px 20px;">',
|
19
|
-
//url
|
20
|
-
'<div class="ke-dialog-row">',
|
21
|
-
'<label for="keUrl" style="width:60px;">' + lang.url + '</label>',
|
22
|
-
'<input class="ke-input-text" type="text" id="keUrl" name="url" value="" style="width:160px;" /> ',
|
23
|
-
'<input type="button" class="ke-upload-button" value="' + lang.upload + '" /> ',
|
24
|
-
'<span class="ke-button-common ke-button-outer">',
|
25
|
-
'<input type="button" class="ke-button-common ke-button" name="viewServer" value="' + lang.viewServer + '" />',
|
26
|
-
'</span>',
|
27
|
-
'</div>',
|
28
|
-
//width
|
29
|
-
'<div class="ke-dialog-row">',
|
30
|
-
'<label for="keWidth" style="width:60px;">' + lang.width + '</label>',
|
31
|
-
'<input type="text" id="keWidth" class="ke-input-text ke-input-number" name="width" value="550" maxlength="4" /> ',
|
32
|
-
'</div>',
|
33
|
-
//height
|
34
|
-
'<div class="ke-dialog-row">',
|
35
|
-
'<label for="keHeight" style="width:60px;">' + lang.height + '</label>',
|
36
|
-
'<input type="text" id="keHeight" class="ke-input-text ke-input-number" name="height" value="400" maxlength="4" /> ',
|
37
|
-
'</div>',
|
38
|
-
'</div>'
|
39
|
-
].join('');
|
40
|
-
var dialog = self.createDialog({
|
41
|
-
name : name,
|
42
|
-
width : 450,
|
43
|
-
height : 200,
|
44
|
-
title : self.lang(name),
|
45
|
-
body : html,
|
46
|
-
yesBtn : {
|
47
|
-
name : self.lang('yes'),
|
48
|
-
click : function(e) {
|
49
|
-
var url = urlBox.val(),
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
uploadbutton.
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
}
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
}
|
1
|
+
/*******************************************************************************
|
2
|
+
* KindEditor - WYSIWYG HTML Editor for Internet
|
3
|
+
* Copyright (C) 2006-2011 kindsoft.net
|
4
|
+
*
|
5
|
+
* @author Roddy <luolonghao@gmail.com>
|
6
|
+
* @site http://www.kindsoft.net/
|
7
|
+
* @licence http://www.kindsoft.net/license.php
|
8
|
+
*******************************************************************************/
|
9
|
+
|
10
|
+
KindEditor.plugin('flash', function(K) {
|
11
|
+
var self = this, name = 'flash', lang = self.lang(name + '.'),
|
12
|
+
allowFlashUpload = K.undef(self.allowFlashUpload, true),
|
13
|
+
allowFileManager = K.undef(self.allowFileManager, false),
|
14
|
+
uploadJson = K.undef(self.uploadJson, self.basePath + 'php/upload_json.php');
|
15
|
+
self.plugin.flash = {
|
16
|
+
edit : function() {
|
17
|
+
var html = [
|
18
|
+
'<div style="padding:10px 20px;">',
|
19
|
+
//url
|
20
|
+
'<div class="ke-dialog-row">',
|
21
|
+
'<label for="keUrl" style="width:60px;">' + lang.url + '</label>',
|
22
|
+
'<input class="ke-input-text" type="text" id="keUrl" name="url" value="" style="width:160px;" /> ',
|
23
|
+
'<input type="button" class="ke-upload-button" value="' + lang.upload + '" /> ',
|
24
|
+
'<span class="ke-button-common ke-button-outer">',
|
25
|
+
'<input type="button" class="ke-button-common ke-button" name="viewServer" value="' + lang.viewServer + '" />',
|
26
|
+
'</span>',
|
27
|
+
'</div>',
|
28
|
+
//width
|
29
|
+
'<div class="ke-dialog-row">',
|
30
|
+
'<label for="keWidth" style="width:60px;">' + lang.width + '</label>',
|
31
|
+
'<input type="text" id="keWidth" class="ke-input-text ke-input-number" name="width" value="550" maxlength="4" /> ',
|
32
|
+
'</div>',
|
33
|
+
//height
|
34
|
+
'<div class="ke-dialog-row">',
|
35
|
+
'<label for="keHeight" style="width:60px;">' + lang.height + '</label>',
|
36
|
+
'<input type="text" id="keHeight" class="ke-input-text ke-input-number" name="height" value="400" maxlength="4" /> ',
|
37
|
+
'</div>',
|
38
|
+
'</div>'
|
39
|
+
].join('');
|
40
|
+
var dialog = self.createDialog({
|
41
|
+
name : name,
|
42
|
+
width : 450,
|
43
|
+
height : 200,
|
44
|
+
title : self.lang(name),
|
45
|
+
body : html,
|
46
|
+
yesBtn : {
|
47
|
+
name : self.lang('yes'),
|
48
|
+
click : function(e) {
|
49
|
+
var url = K.trim(urlBox.val()),
|
50
|
+
width = widthBox.val(),
|
51
|
+
height = heightBox.val();
|
52
|
+
if (url == 'http://' || K.invalidUrl(url)) {
|
53
|
+
alert(self.lang('invalidUrl'));
|
54
|
+
urlBox[0].focus();
|
55
|
+
return;
|
56
|
+
}
|
57
|
+
if (!/^\d*$/.test(width)) {
|
58
|
+
alert(self.lang('invalidWidth'));
|
59
|
+
widthBox[0].focus();
|
60
|
+
return;
|
61
|
+
}
|
62
|
+
if (!/^\d*$/.test(height)) {
|
63
|
+
alert(self.lang('invalidHeight'));
|
64
|
+
heightBox[0].focus();
|
65
|
+
return;
|
66
|
+
}
|
67
|
+
var html = K.mediaImg(self.themesPath + 'common/blank.gif', {
|
68
|
+
src : url,
|
69
|
+
type : K.mediaType('.swf'),
|
70
|
+
width : width,
|
71
|
+
height : height,
|
72
|
+
quality : 'high'
|
73
|
+
});
|
74
|
+
self.insertHtml(html).hideDialog().focus();
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}),
|
78
|
+
div = dialog.div,
|
79
|
+
urlBox = K('[name="url"]', div),
|
80
|
+
viewServerBtn = K('[name="viewServer"]', div),
|
81
|
+
widthBox = K('[name="width"]', div),
|
82
|
+
heightBox = K('[name="height"]', div);
|
83
|
+
urlBox.val('http://');
|
84
|
+
|
85
|
+
if (allowFlashUpload) {
|
86
|
+
var uploadbutton = K.uploadbutton({
|
87
|
+
button : K('.ke-upload-button', div)[0],
|
88
|
+
fieldName : 'imgFile',
|
89
|
+
url : K.addParam(uploadJson, 'dir=flash'),
|
90
|
+
afterUpload : function(data) {
|
91
|
+
if (data.error === 0) {
|
92
|
+
var url = K.formatUrl(data.url, 'absolute');
|
93
|
+
urlBox.val(url);
|
94
|
+
if (self.afterUpload) {
|
95
|
+
self.afterUpload.call(self, url);
|
96
|
+
}
|
97
|
+
alert(self.lang('uploadSuccess'));
|
98
|
+
} else {
|
99
|
+
alert(data.message);
|
100
|
+
}
|
101
|
+
}
|
102
|
+
});
|
103
|
+
uploadbutton.fileBox.change(function(e) {
|
104
|
+
uploadbutton.submit();
|
105
|
+
});
|
106
|
+
} else {
|
107
|
+
K('.ke-upload-button', div).hide();
|
108
|
+
urlBox.width(250);
|
109
|
+
}
|
110
|
+
|
111
|
+
if (allowFileManager) {
|
112
|
+
viewServerBtn.click(function(e) {
|
113
|
+
self.loadPlugin('filemanager', function() {
|
114
|
+
self.plugin.filemanagerDialog({
|
115
|
+
viewType : 'LIST',
|
116
|
+
dirName : 'flash',
|
117
|
+
clickFn : function(url, title) {
|
118
|
+
if (self.dialogs.length > 1) {
|
119
|
+
K('[name="url"]', div).val(url);
|
120
|
+
self.hideDialog();
|
121
|
+
}
|
122
|
+
}
|
123
|
+
});
|
124
|
+
});
|
125
|
+
});
|
126
|
+
} else {
|
127
|
+
viewServerBtn.hide();
|
128
|
+
}
|
129
|
+
|
130
|
+
var img = self.plugin.getSelectedFlash();
|
131
|
+
if (img) {
|
132
|
+
var attrs = K.mediaAttrs(img.attr('data-ke-tag'));
|
133
|
+
urlBox.val(attrs.src);
|
134
|
+
widthBox.val(K.removeUnit(img.css('width')) || attrs.width || 0);
|
135
|
+
heightBox.val(K.removeUnit(img.css('height')) || attrs.height || 0);
|
136
|
+
}
|
137
|
+
urlBox[0].focus();
|
138
|
+
urlBox[0].select();
|
139
|
+
},
|
140
|
+
'delete' : function() {
|
141
|
+
self.plugin.getSelectedFlash().remove();
|
142
|
+
}
|
143
|
+
};
|
144
|
+
self.clickToolbar(name, self.plugin.flash.edit);
|
145
|
+
});
|