* adjust the tab index of upload image image.

* fix the css style of image upload page.
This commit is contained in:
wangchunsheng
2012-12-01 07:45:35 +00:00
parent 211b7a3ce3
commit 9f969c4662
4 changed files with 27 additions and 21 deletions
File diff suppressed because one or more lines are too long
+4 -1
View File
@@ -6,6 +6,9 @@
* @website http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
* @version 4.1.4 (2012-11-11)
*
* 调试前必读:务必将DEBUG设成true,否则,死的很惨! added by zentao team.
*******************************************************************************/
(function (window, undefined) {
if (window.KindEditor) {
@@ -17,7 +20,7 @@ if (!window.console) {
if (!console.log) {
console.log = function () {};
}
var _VERSION = '4.1.4 (2012-11-11)',
var _VERSION = '4.1.4',
_ua = navigator.userAgent.toLowerCase(),
_IE = _ua.indexOf('msie') > -1 && _ua.indexOf('opera') == -1,
_GECKO = _ua.indexOf('gecko') > -1 && _ua.indexOf('khtml') == -1,
+20 -19
View File
@@ -39,8 +39,23 @@ KindEditor.plugin('image', function(K) {
'<div style="padding:20px;">',
//tabs
'<div class="tabs"></div>',
//remote image - start
//local upload - start
'<div class="tab1" style="display:none;">',
'<iframe name="' + target + '" style="display:none;"></iframe>',
'<form class="ke-upload-area ke-form" method="post" enctype="multipart/form-data" target="' + target + '" action="' + K.addParam(uploadJson, 'dir=image') + '">',
//file
'<div class="ke-dialog-row">',
hiddenElements.join(''),
'<label style="width:60px;">' + lang.localUrl + '</label>',
'<input type="text" name="localUrl" class="ke-input-text" tabindex="-1" style="width:200px;" readonly="true" /> &nbsp;',
'<input type="button" class="ke-upload-button" value="' + lang.upload + '" />',
'</div>',
'</form>',
'</div>',
//local upload - end
//remote image - start
'<div class="tab2" style="display:none;">',
//url
'<div class="ke-dialog-row">',
'<label for="remoteUrl" style="width:60px;">' + lang.remoteUrl + '</label>',
@@ -70,20 +85,6 @@ KindEditor.plugin('image', function(K) {
'</div>',
'</div>',
//remote image - end
//local upload - start
'<div class="tab2" style="display:none;">',
'<iframe name="' + target + '" style="display:none;"></iframe>',
'<form class="ke-upload-area ke-form" method="post" enctype="multipart/form-data" target="' + target + '" action="' + K.addParam(uploadJson, 'dir=image') + '">',
//file
'<div class="ke-dialog-row">',
hiddenElements.join(''),
'<label style="width:60px;">' + lang.localUrl + '</label>',
'<input type="text" name="localUrl" class="ke-input-text" tabindex="-1" style="width:200px;" readonly="true" /> &nbsp;',
'<input type="button" class="ke-upload-button" value="' + lang.upload + '" />',
'</div>',
'</form>',
'</div>',
//local upload - end
'</div>'
].join('');
var dialogWidth = showLocal || allowFileManager ? 450 : 400,
@@ -167,18 +168,18 @@ KindEditor.plugin('image', function(K) {
afterSelect : function(i) {}
});
tabs.add({
title : lang.remoteImage,
title : lang.localImage,
panel : K('.tab1', div)
});
tabs.add({
title : lang.localImage,
title : lang.remoteImage,
panel : K('.tab2', div)
});
tabs.select(tabIndex);
} else if (showRemote) {
K('.tab1', div).show();
} else if (showLocal) {
K('.tab2', div).show();
} else if (showLocal) {
K('.tab1', div).show();
}
var uploadbutton = K.uploadbutton({
@@ -890,6 +890,8 @@
padding:0;
}
.ke-tabs-li {
list-style-type:none;
position: relative;
border: 1px solid #A0A0A0;
background-color: #F0F0EE;