当前位置:
源文件浏览
,下载次数:9 次
| 关键字:
010.gif[65B]
037.gif[118B]
False.gif[138B]
Rule.gif[1KB]
Thumbs.db[48KB]
True.gif[131B]
admin_top_bg.jpg[493B]
button_bg1.jpg[313B]
button_bg6.gif[934B]
button_bg7.gif[766B]
button_bg8.gif[1017B]
del.gif[145B]
dl.gif[984B]
edt.gif[197B]
glyphicons-halflings-white.png[8KB]
glyphicons-halflings.png[12KB]
icon_add.gif[360B]
img_pre_none.gif[427B]
input.gif[2KB]
leftmenu_bg.gif[114B]
leftmenu_dt_bg.gif[1004B]
leftmenu_li_on.gif[468B]
leftmenu_li_s.gif[492B]
lg_buttom.gif[1KB]
list-1.png[291B]
login_03.gif[5KB]
login_04.gif[19KB]
login_06.gif[14KB]
login_07.gif[2KB]
login_08.gif[4KB]
login_09.gif[21KB]
login_t_img.gif[16KB]
lor_bg.jpg[349B]
msg_ask.gif[1KB]
msg_error.gif[2KB]
msg_ok.gif[1KB]
msg_stop.gif[2KB]
mtitle_bg.gif[93B]
mtitle_bg.jpg[301B]
mtitle_l.jpg[318B]
mtitle_r.jpg[320B]
quick_bg.gif[1KB]
sd_buttom.jpg[289B]
sd_left_bg.jpg[392B]
sd_right_bg.jpg[590B]
sd_top_bg.jpg[285B]
tab_12.gif[112B]
tab_14.gif[263B]
tbody_toggle.gif[564B]
vssver2.scc[1KB]
Controllers
Index.cshtml[1KB]
Create.cshtml[2KB]
Edit.cshtml[2KB]
Index.cshtml[1KB]
ArticleTypeIndex.cshtml[1KB]
Create.cshtml[3KB]
CreateCate.cshtml[1KB]
Edit.cshtml[3KB]
Index.cshtml[1KB]
TypeEdit.cshtml[2KB]
AttrTypeIndex.cshtml[991B]
Create.cshtml[1KB]
CreateType.cshtml[1KB]
Edit.cshtml[1021B]
EditType.cshtml[1KB]
Index.cshtml[1KB]
Create.cshtml[3KB]
Edit.cshtml[4KB]
Index.cshtml[1KB]
Create.cshtml[3KB]
Edit.cshtml[2KB]
Index.cshtml[2KB]
Create.cshtml[9KB]
Edit.cshtml[11KB]
GetGoodsAttibutes.cshtml[512B]
GetGoodsPictures.cshtml[849B]
GetUploadGoodsImageTemplate.cshtml[427B]
Index.cshtml[4KB]
Index.cshtml[8KB]
Welcome.cshtml[72B]
Index.cshtml[1KB]
Membership
Index.cshtml[1KB]
Details.cshtml[6KB]
Index.cshtml[3KB]
Create.cshtml[3KB]
Edit.cshtml[3KB]
Index.cshtml[1KB]
Index.cshtml[2KB]
Edit.cshtml[1KB]
Index.cshtml[1KB]
AddNav.cshtml[2KB]
AddPicture.cshtml[1KB]
EditNav.cshtml[2KB]
Navigate.cshtml[2KB]
PicturePlayer.cshtml[2KB]
WebSite.cshtml[3KB]
_Layout.cshtml[1KB]
_ViewStart.cshtml[67B]
demoimages
01.jpg[180KB]
02.jpg[156KB]
03.jpg[113KB]
04.jpg[104KB]
05.jpg[57KB]
06.jpg[123KB]
8.jpg[43KB]
300city.gif[3KB]
30days.gif[2KB]
big-1.jpg[56KB]
brand1.jpg[16KB]
brand2.jpg[2KB]
brand3.jpg[15KB]
brand4.jpg[16KB]
brand5.jpg[17KB]
brand6.jpg[30KB]
jbiao.jpg[21KB]
more300.gif[2KB]
n1.gif[25KB]
n2.gif[22KB]
n3.gif[19KB]
n4.gif[22KB]
n5.gif[18KB]
n6.gif[19KB]
n7.gif[21KB]
ora-1.jpg[21KB]
r12.jpg[19KB]
r22.jpg[26KB]
small-1.jpg[6KB]
yk5yue.jpg[56KB]
zx1.gif[27KB]
zx2.gif[19KB]
Connect_logo_3.png[3KB]
Thumbs.db[50KB]
big_title.gif[5KB]
bnt_buy_1.gif[1KB]
bnt_subOrder.gif[3KB]
cart.gif[191B]
checkout.gif[4KB]
cmp.jpg[27KB]
compareSub.gif[253B]
down.gif[50B]
keepgoods.gif[348B]
left_title.gif[153B]
left_title1.gif[175B]
leftpoint.jpg[908B]
list.gif[431B]
login_title.gif[270B]
logo.jpg[2KB]
minilist.gif[85B]
more.gif[61B]
nopic.jpg[10KB]
point_user.gif[57B]
ponit.gif[44B]
products_bg.jpg[14KB]
rightpoint.jpg[905B]
search_bg.gif[2KB]
selected.gif[84B]
title_bg.jpg[340B]
top1.gif[180B]
top_login.gif[212B]
top_register.gif[159B]
top_search.gif[210B]
urhere.gif[412B]
usercenter.gif[2KB]
ui-bg_flat_0_aaaaaa_40x100.png[180B]
ui-bg_flat_75_ffffff_40x100.png[178B]
ui-bg_glass_55_fbf9ee_1x400.png[120B]
ui-bg_glass_65_ffffff_1x400.png[105B]
ui-bg_glass_75_dadada_1x400.png[111B]
ui-bg_glass_75_e6e6e6_1x400.png[110B]
ui-bg_glass_95_fef1ec_1x400.png[119B]
ui-bg_highlight-soft_75_cccccc_1x100.png[101B]
ui-icons_x240.png[4KB]
ui-icons_2e83ff_256x240.png[4KB]
ui-icons_x240.png[4KB]
ui-icons_x240.png[4KB]
ui-icons_cd0a0a_256x240.png[4KB]
Controllers
ActionSyntax
0a69eee8-0bf5--ba.jpeg[3KB]
0ba8f27d-f1d0-4fe0-8fda-88fcf6c6ab87.jpg[5KB]
24cd76f2-08e6-4ef9-913c-5bfd.jpg[7KB]
d-406d-9b7a-.jpg[4KB]
2aaf--b89ef4aede68.jpg[3KB]
3970df1a-edb6-42a0-91fd-e5b34fa1fd27.jpg[4KB]
7eb658c7-ba3d-4a8f-c1a7c21.jpg[14KB]
819afc37-24b4-4c72-b0cb-243bab6cbbce.gif[705B]
a7-4e01-b5fa-4d9443bb61cb.jpg[3KB]
nobrand.jpg[5KB]
185bbd07-41a7-4c90-8c70-da-Original.jpg[15KB]
185bbd07-41a7-4c90-8c70-da-small.jpg[1KB]
185bbd07-41a7-4c90-8c70-da.jpg[115KB]
1d60f3d6-0bc2-44c9-89d4-2a07c8fbc888-Original.jpg[21KB]
1d60f3d6-0bc2-44c9-89d4-2a07c8fbc888-small.jpg[1KB]
1d60f3d6-0bc2-44c9-89d4-2a07c8fbc888.jpg[184KB]
PicturePlayer
1fc65e8a-ce9f-4655-abac-6a4a594abb41.png[29KB]
3205f2fc-d9e4-453c-8bc6-2e7d8cee3b3e.jpg[82KB]
5d636f93-b3f1-aade83298d9.gif[705B]
-29bc-8a4e51de0a.jpg[7KB]
d130fc16-f4e9-d-c2bf227ed05f.jpg[7KB]
Collections
ValidateCode
B2CDB.dbml[31KB]
B2CDB.dbml.layout[30KB]
Properties
Flat-UI-Icons.dev.svg[18KB]
Flat-UI-Icons.eot[5KB]
Flat-UI-Icons.svg[18KB]
Flat-UI-Icons.ttf[5KB]
Flat-UI-Icons.woff[6KB]
icomoon-session.json[931KB]
browser-2x.png[1KB]
browser-author.jpg[3KB]
browser-pic-1.jpg[12KB]
browser-pic-2.jpg[6KB]
browser-pic-3.jpg[6KB]
browser-pic-4.jpg[7KB]
browser-pic-5.jpg[6KB]
browser-pic-6.jpg[8KB]
browser.png[1KB]
html-icon.png[4KB]
logo-mask-2x.png[17KB]
logo-mask.png[7KB]
video.jpg[168KB]
logo.png[8KB]
Book@2x.png[3KB]
Calendar@2x.png[4KB]
Chat@2x.png[4KB]
Clipboard@2x.png[3KB]
Compas@2x.png[16KB]
Gift-Box@2x.png[11KB]
Infinity-Loop@2x.png[8KB]
Mail@2x.png[6KB]
Map@2x.png[8KB]
Pensils@2x.png[11KB]
Pocket@2x.png[4KB]
Retina-Ready@2x.png[10KB]
Toilet-Paper@2x.png[4KB]
Watches@2x.png[11KB]
icon.png[7KB]
imac-2x.png[21KB]
imac.png[7KB]
mask-square.png[1KB]
mask.png[1KB]
ribbon-2x.png[4KB]
ribbon.png[2KB]
done-2x.png[1KB]
done.png[1KB]
search-2x.png[1KB]
search.png[1KB]
todo-2x.png[1KB]
todo.png[1KB]
fullscreen-2x.png[1KB]
fullscreen.png[1KB]
pause-2x.png[1KB]
pause.png[1KB]
play-2x.png[1KB]
play.png[1KB]
poster.jpg[50KB]
volume-full-2x.png[1KB]
volume-full.png[1KB]
volume-off-2x.png[1KB]
volume-off.png[1KB]
favicon.ico[932B]
icon.png[7KB]
imac.png[7KB]
glyphicons-halflings-white.png[8KB]
glyphicons-halflings.png[12KB]
metro-bootstrap
Thumbs.db[6KB]
glyphicons-halflings-white.png[8KB]
glyphicons-halflings.png[12KB]
talkslab.png[24KB]
twittertile.png[1KB]
js.jar[850KB]
merge.bat[306B]
yuicompressor-2.4.6.jar[832KB]
attachment
fileTypeImages
icon_chm.gif[923B]
icon_default.png[841B]
icon_doc.gif[1012B]
icon_exe.gif[949B]
icon_mp3.gif[986B]
icon_mv.gif[1001B]
icon_pdf.gif[996B]
icon_ppt.gif[1001B]
icon_psd.gif[1009B]
icon_rar.gif[1007B]
icon_txt.gif[970B]
icon_xls.gif[1005B]
background
0.gif[43B]
bface.gif[26KB]
cface.gif[8KB]
fface.gif[18KB]
jxface2.gif[39KB]
neweditor-tab-bg.png[216B]
tface.gif[19KB]
wface.gif[48KB]
yface.gif[27KB]
highlightcode
center_focus.jpg[11KB]
left_focus.jpg[11KB]
none_focus.jpg[11KB]
right_focus.jpg[11KB]
imageUploader.swf[61KB]
insertframe
addimg.png[628B]
brush.png[608B]
delimg.png[516B]
delimgH.png[578B]
empty.png[519B]
emptyH.png[657B]
eraser.png[42KB]
redo.png[454B]
redoH.png[536B]
scale.png[435B]
scaleH.png[330B]
size.png[775B]
undo.png[444B]
undoH.png[511B]
searchreplace
snapscreen
dragicon.png[304B]
bg.gif[84B]
pre0.png[250B]
pre1.png[291B]
pre2.png[394B]
pre3.png[485B]
pre4.png[393B]
center_focus.jpg[11KB]
left_focus.jpg[11KB]
none_focus.jpg[11KB]
right_focus.jpg[11KB]
fClipboard_ueditor.swf[1KB]
imageUploader.swf[61KB]
addimage.png[3KB]
alldeletebtnhoverskin.png[743B]
alldeletebtnupskin.png[743B]
background.png[3KB]
button.png[4KB]
copy.png[1KB]
deletedisable.png[649B]
deleteenable.png[664B]
imglabel.png[672B]
listbackground.png[3KB]
localimage.png[3KB]
music.png[89KB]
rotateleftdisable.png[719B]
rotateleftenable.png[952B]
rotaterightdisable.png[754B]
rotaterightenable.png[1007B]
upload.png[3KB]
copy.png[4KB]
imglabel.png[2KB]
localimage.png[6KB]
music.png[22KB]
upload.png[6KB]
35dd36bc-9b86--f70ac85a532b.png[2KB]
efccd0-96e4-8cedf5afc32a.png[29KB]
fileUp.ashx[1KB]
getContent.ashx[1KB]
getMovie.ashx[1KB]
getRemoteImage.ashx[3KB]
imageManager.ashx[1KB]
imageUp.ashx[1KB]
scrawlUp.ashx[1KB]
anchor.gif[184B]
arrow.png[1KB]
button-bg.gif[1KB]
cancelbutton.gif[1KB]
cursor_h.gif[253B]
cursor_h.png[175B]
cursor_v.gif[370B]
cursor_v.png[177B]
dialog-title-bg.png[938B]
filescan.png[4KB]
highlighted.gif[111B]
icons-all.gif[3KB]
icons.gif[14KB]
icons.png[11KB]
lock.gif[1KB]
neweditor-tab-bg.png[216B]
pagebreak.gif[54B]
scale.png[167B]
spacer.gif[43B]
sparator_v.png[122B]
toolbar_bg.png[170B]
unhighlighted.gif[111B]
upload.png[6KB]
videologo.gif[1KB]
word.gif[1019B]
wordpaste.png[6KB]
third-party
SyntaxHighlighter
codemirror
snapscreen
UEditorSnapscreen.exe[507KB]
swfupload.swf[182KB]
swfupload_fp9.swf[13KB]
CHANGELOG.TXT[12KB]
Thumbs.db[3KB]
dialog_bg.jpg[22KB]
dialog_cb.gif[109B]
dialog_cb.png[2KB]
dialog_closebtn.gif[388B]
dialog_closebtn_over.gif[441B]
dialog_ct.gif[217B]
dialog_ct.png[2KB]
dialog_lb.gif[173B]
dialog_lb.png[2KB]
dialog_lt.gif[366B]
dialog_lt.png[3KB]
dialog_mlm.gif[84B]
dialog_mlm.png[2KB]
dialog_mrm.gif[83B]
dialog_mrm.png[2KB]
dialog_rb.gif[119B]
dialog_rb.png[2KB]
dialog_rt.gif[377B]
dialog_rt.png[3KB]
icon_alert.gif[680B]
icon_dialog.gif[92B]
icon_query.gif[687B]
window.gif[1KB]
FindPassword.cshtml[2KB]
Login.cshtml[1KB]
QQConnect.cshtml[310B]
Registor.cshtml[3KB]
GetGoodsReviews.cshtml[1KB]
Index.cshtml[7KB]
WriteComment.cshtml[1KB]
Article.cshtml[775B]
CateArticles.cshtml[804B]
Index.cshtml[2KB]
PromoteActivy
Index.cshtml[1KB]
Brand.cshtml[4KB]
CateSearch.cshtml[9KB]
Index.cshtml[4KB]
TypeSearch.cshtml[4KB]
ArticleFooter.cshtml[959B]
ArticleTypeList.cshtml[440B]
Discuss.cshtml[651B]
Error.cshtml[210B]
FastLogin.cshtml[1KB]
PicturePlayer.cshtml[1KB]
SaleActivity.cshtml[420B]
SaleTop.cshtml[839B]
_HelpLayout.cshtml[237B]
_Layout.cshtml[10KB]
_NestedLayout.cshtml[764B]
_UCenterLayout.cshtml[1008B]
GoodsGridView.cshtml[681B]
GoodsListView.cshtml[718B]
GoodsSimpleView.cshtml[635B]
GoodsTextView.cshtml[590B]
AddToCar.cshtml[4KB]
AddressList.cshtml[1KB]
Order.cshtml[6KB]
AddressList.cshtml[1KB]
EditAddress.cshtml[2KB]
MyCollection.cshtml[1KB]
MyReviews.cshtml[2KB]
OrderList.cshtml[2KB]
Personal.cshtml[3KB]
ViewOrder.cshtml[4KB]
_ViewStart.cshtml[55B]
System.Web.Mvc.resources.dll[27KB]
B2CSystem.dll[553KB]
B2CSystem.pdb[1.41MB]
Newtonsoft.Json.dll[366KB]
QConnectSDK.dll[38KB]
QConnectSDK.pdb[65KB]
RestSharp.dll[146KB]
System.Web.Mvc.dll[434KB]
Models.B2CDB.designer.cs.dll[106KB]
B2CSystem.csproj.FileListAbsolute.txt[2KB]
B2CSystem.csprojResolveAssemblyReference.cache[78KB]
B2CSystem.dll[553KB]
B2CSystem.pdb[1.41MB]
DesignTimeResolveAssemblyReferences.cache[65KB]
DesignTimeResolveAssemblyReferencesInput.cache[116KB]
B2CSystem.csproj.user[1KB]
B2CSysDB.mdf[3MB]
B2CSysDB_log.ldf[1MB]
QConnectSDK.1.1.1
QConnectSDK
Authenticators
Exceptions
Properties
QConnectSDK.csproj.vspscc[257B]
QConnectSDK.pfx[1KB]
QConnectSDK.WindowsPhone
Properties
QConnectSDK.WindowsPhone.csproj.user[460B]
QConnectSDK.WindowsPhone.csproj.vspscc[257B]
QConnectSDK.XML[67KB]
QConnectSDK.dll[38KB]
QConnectSDK.pdb[65KB]
QConnectSDK.XML[67KB]
QConnectSDK.dll[38KB]
QConnectSDK.pdb[65KB]
QConnectSDK.WindowsPhone.XML[47KB]
QConnectSDK.WindowsPhone.dll[41KB]
QConnectSDK.WindowsPhone.pdb[71KB]
Local.testsettings[427B]
OpenConnectSDK.sln[3KB]
OpenConnectSDK.suo[85KB]
OpenConnectSDK.vsmdi[515B]
OpenConnectSDK.vssscc[256B]
QConnectSDK.1.1.1.nupkg[190KB]
QConnectSDK.pfx[1KB]
TraceAndTestImpact.testsettings[2KB]
RestSharp.104.1
RestSharp.dll[143KB]
net35-client
RestSharp.dll[143KB]
RestSharp.dll[146KB]
net4-client
RestSharp.dll[146KB]
RestSharp.Silverlight.dll[122KB]
RestSharp.WindowsPhone.dll[161KB]
RestSharp.104.1.nupkg[591KB]
B2CSystem.sln[1KB]
from.gif[4KB]
最新Asp.Net源码下载.url[123B]
当前路径:B2CSystem/ThirdPart/ueditor/dialogs/image/image.js
* Created by JetBrains PhpStorm.
* User: taoqili
* Date: 12-01-08
* Time: 下午2:52
* To change this template use File | Settings | File Templates.
var imageUploader = {},
flashObj = null,
postConfig=[];
(function () {
var g = $G,
ajax = parent.baidu.editor.ajax,
maskIframe = g(&maskIframe&); //tab遮罩层,用来解决flash和其他dom元素的z-index层级不一致问题
//flash上传对象
var flagImg = null, flashC
imageUploader.init = function (opt, callbacks) {
switchTab(&imageTab&);
createAlignButton([&remoteFloat&, &localFloat&]);
createFlash(opt, callbacks);
var srcImg = editor.selection.getRange().getClosedNode();
if (srcImg) {
showImageInfo(srcImg);
showPreviewImage(srcImg, true);
var tabElements = g(&imageTab&).children,
tabHeads = tabElements[0].children,
tabBodys = tabElements[1].
for (var i = 0, ci = tabHeads[i++];) {
if (ci.getAttribute(&tabSrc&) == &remote&) {
clickHandler(tabHeads, tabBodys, ci);
addUrlChangeListener();
addOKListener();
addScrollListener();
addSearchListener();
$focus(g(&url&));
imageUploader.setPostParams = function(obj,index){
if(index===undefined){
utils.each(postConfig,function(config){
config.data =
postConfig[index].data =
function insertImage(imgObjs) {
editor.fireEvent('beforeInsertImage', imgObjs);
editor.execCommand(&insertImage&, imgObjs);
function searchImage() {
var imgSearchInput = $G(&imgSearchTxt&);
if (!imgSearchInput.getAttribute(&hasClick&) || !imgSearchInput.value) {
selectTxt(imgSearchInput);
g(&searchList&).innerHTML = &&p class='msg'&& + lang.imageLoading + &&/p&&;
var key = imgSearchInput.value,
type = $G(&imgType&).value,
url = &/i?ct=&cl=2&lm=-1&st=-1&tn=baiduimagejson&istype=2&rn=32&fm=index&pv=&word=& + encodeToGb2312(key) + type + &&& + +new D
var reqCallBack = function (data) {
var imgObjs = data.
} catch (e) {
var frg = document.createDocumentFragment();
if (imgObjs.length & 2) {
g(&searchList&).innerHTML = &&p class='msg'&& + lang.tryAgain + &&/p&&;
for (var i = 0, len = imgObjs. i & len - 1; i++) {
var img = document.createElement(&img&), obj = imgObjs[i], div = document.createElement(&div&);
img.src = obj.objURL; //obj.thumbURL 为缩略图,只能针对百度内部使用
img.setAttribute(&sourceUrl&, obj.objURL);
var title = obj.fromPageTitleEnc.replace(/^\.\.\./i, &&);
img.setAttribute(&title&, lang.toggleSelect + obj.width + &X& + obj.height);
img.onclick = function () {
changeSelected(this);
scale(img, 100, obj.width, obj.height);
div.appendChild(img);
var p = document.createElement(&p&);
p.innerHTML = &&a target='_blank' href='& + obj.fromURL + &'&& + title + &&/a&&;
div.appendChild(p);
//setTimeout(function(){
frg.appendChild(div);
g(&searchList&).innerHTML = &&;
g(&searchList&).appendChild(frg);
baidu.sio.callByServer(url, reqCallBack, {charset:&GB18030&});
function selectTxt(node) {
if (node.select) {
node.select();
var r = node.createTextRange && node.createTextRange();
r.select();
function addSearchListener() {
g(&imgSearchTxt&).onclick = function () {
selectTxt(this);
this.setAttribute(&hasClick&, true);
if (this.value == lang.searchInitInfo) {
this.value = &&;
g(&imgSearchTxt&).onkeyup = function () {
this.setAttribute(&hasClick&, true);
//只触发一次
this.onkeyup =
g(&imgSearchBtn&).onclick = function () {
searchImage();
g(&imgSearchReset&).onclick = function () {
var txt = g(&imgSearchTxt&);
txt.value = &&;
txt.focus();
g(&searchList&).innerHTML = &&;
g(&imgType&).onchange = function () {
searchImage();
domUtils.on(g(&imgSearchTxt&), &keyup&, function (evt) {
if (evt.keyCode == 13) {
searchImage();
* 延迟加载
function addScrollListener() {
g(&imageList&).onscroll = function () {
var imgs = this.getElementsByTagName(&img&),
top = Math.ceil(this.scrollTop / 100) - 1;
top = top & 0 ? 0 :
for (var i = top * 5; i & (top + 5) * 5; i++) {
var img = imgs[i];
if (img && !img.getAttribute(&src&)) {
img.src = img.getAttribute(&lazy_src&);
img.removeAttribute(&lazy_src&);
* 绑定确认按钮
function addOKListener() {
dialog.onok = function () {
var currentTab = findFocus(&tabHeads&, &tabSrc&);
switch (currentTab) {
case &remote&:
return insertSingle();
case &local&:
return insertBatch();
case &imgManager&:
return insertSearch(&imageList&);
case &imgSearch&:
return insertSearch(&searchList&, true);
dialog.oncancel = function () {
hideFlash();
function hideFlash() {
flashObj =
flashContainer.innerHTML = &&;
* 将元素id下的所有图片文件插入到编辑器中。
* @param id
* @param catchRemote
是否需要替换远程图片
function insertSearch(id, catchRemote) {
var imgs = $G(id).getElementsByTagName(&img&), imgObjs = [];
for (var i = 0, ci = imgs[i++];) {
if (ci.getAttribute(&selected&)) {
var url = ci.getAttribute(&src&, 2).replace(/(\s*$)/g, &&), img = {};
img.data_ue_src =
imgObjs.push(img);
insertImage(imgObjs);
catchRemote && editor.fireEvent(&catchRemoteImage&);
hideFlash();
* 插入单张图片
function insertSingle() {
var url = g(&url&),
width = g(&width&),
height = g(&height&),
border = g(&border&),
vhSpace = g(&vhSpace&),
title = g(&title&),
align = findFocus(&remoteFloat&, &name&),
imgObj = {};
if (!url.value)
if (!flagImg)
//粘贴地址后如果没有生成对应的预览图,可以认为本次粘贴地址失败
if (!checkNum([width, height, border, vhSpace]))
imgObj.src = url.
imgObj.data_ue_src = url.
imgObj.width = width.
imgObj.height = height.
imgObj.border = border.
imgObj.floatStyle =
imgObj.vspace = imgObj.hspace = vhSpace.
imgObj.title = title.
imgObj.style = &width:& + width.value + &height:& + height.value + &&;
insertImage(imgObj);
editor.fireEvent(&catchRemoteImage&);
hideFlash();
* 检测传入的所有input框中输入的长宽是否是正数
* @param nodes input框集合,
function checkNum(nodes) {
for (var i = 0, ci = nodes[i++];) {
if (!isNumber(ci.value) || ci.value & 0) {
alert(lang.numError);
ci.value = &&;
ci.focus();
* 数字判断
* @param value
function isNumber(value) {
return /(0|^[1-9]\d*$)/.test(value);
* 插入多张图片
function insertBatch() {
if (imageUrls.length & 1)
var imgObjs = [],
align = findFocus(&localFloat&, &name&);
for (var i = 0, ci = imageUrls[i++];) {
var tmpObj = {};
tmpObj.title = ci.
tmpObj.floatStyle =
//修正显示时候的地址数据,如果后台返回的是图片的绝对地址,那么此处无需修正
tmpObj.data_ue_src = tmpObj.src = editor.options.imagePath + ci.
imgObjs.push(tmpObj);
insertImage(imgObjs);
hideFlash();
* 找到id下具有focus类的节点并返回该节点下的某个属性
* @param id
* @param returnProperty
function findFocus(id, returnProperty) {
var tabs = g(id).children,
for (var i = 0, ci = tabs[i++];) {
if (ci.className == &focus&) {
property = ci.getAttribute(returnProperty);
* 绑定地址框改变事件
function addUrlChangeListener() {
var value = g(&url&).
if (browser.ie) {
g(&url&).onpropertychange = function () {
var v = this.
if (v != value) {
createPreviewImage(v);
g(&url&).addEventListener(&input&, function () {
var v = this.
if (v != value) {
createPreviewImage(v);
}, false);
* 绑定图片等比缩放事件
* @param percent
function addSizeChangeListener(percent) {
var width = g(&width&),
height = g(&height&),
lock = g('lock');
width.onkeyup = function () {
if (!isNaN(this.value) && lock.checked) {
height.value = Math.round(this.value / percent) || this.
height.onkeyup = function () {
if (!isNaN(this.value) && lock.checked) {
width.value = Math.round(this.value * percent) || this.
* 依据url中的地址创建一个预览图片并将对应的信息填入信息框和预览框
function createPreviewImage(url) {
if (!url) {
g(&preview&).innerHTML = &&;
g(&width&).value = &&;
g(&height&).value = &&;
g(&border&).value = &&;
g(&vhSpace&).value = &&;
g(&title&).value = &&;
$focus(g(&url&));
var img = document.createElement(&img&),
preview = g(&preview&);
var imgTypeReg = /\.(png|gif|jpg|jpeg)$/gi, //格式过滤
urlFilter = &&;
//地址过滤
if (!imgTypeReg.test(url) || url.indexOf(urlFilter) == -1) {
preview.innerHTML = &&span style='color: red'&& + lang.imageUrlError + &&/span&&;
preview.innerHTML = lang.imageL
img.onload = function () {
showImageInfo(this);
showPreviewImage(this,true);
this.onload =
img.onerror = function () {
preview.innerHTML = &&span style='color: red'&& + lang.imageLoadError + &&/span&&;
this.onerror =
* 显示图片对象的信息
* @param img
function showImageInfo(img) {
if (!img.getAttribute(&src&) || !img.src)
var wordImgFlag = img.getAttribute(&word_img&);
g(&url&).value = wordImgFlag ? wordImgFlag.replace(&&&, &&&) : (img.getAttribute('data_ue_src') || img.getAttribute(&src&, 2).replace(&&&, &&&));
g(&width&).value = img.width || 0;
g(&height&).value = img.height || 0;
g(&border&).value = img.getAttribute(&border&) || 0;
g(&vhSpace&).value = img.getAttribute(&vspace&) || 0;
g(&title&).value = img.title || &&;
var align = editor.queryCommandValue(&imageFloat&) || &none&;
updateAlignButton(align);
//保存原始比例,用于等比缩放
var percent = (img.width / img.height).toFixed(2);
addSizeChangeListener(percent);
* 将img显示在预览框,
* @param img
* @param needClone
是否需要克隆后显示
function showPreviewImage(img, needClone) {
var tmpWidth = img.width, tmpHeight = img.
var maxWidth = 262,maxHeight = 262,
target = scaling(tmpWidth,tmpHeight,maxWidth,maxHeight);
target.border = img.border||0;
target.src = img.
if ((target.width + 2 * target.border) & maxWidth) {
target.width = maxWidth - 2 * target.
if ((target.height + 2 * target.border) & maxWidth) {
target.height = maxWidth - 2 * target.
var preview = g(&preview&);
preview.innerHTML = '&img src=&' + target.src + '& width=&' + target.width + '& height=&' + target.height + '& border=&' + target.border + 'px solid #000& /&';
* 图片缩放
* @param img
* @param max
function scale(img, max, oWidth, oHeight) {
var width = 0, height = 0, percent, ow = img.width || oWidth, oh = img.height || oH
if (ow & max || oh & max) {
if (ow &= oh) {
if (width = ow - max) {
percent = (width / ow).toFixed(2);
img.height = oh - oh *
img.width =
if (height = oh - max) {
percent = (height / oh).toFixed(2);
img.width = ow - ow *
img.height =
function scaling(width,height,maxWidth,maxHeight){
if(width&maxWidth && height&maxHeight) return {width:width,height:height};
var srcRatio = (width/height).toFixed(2),
tarRatio = (maxWidth/maxHeight).toFixed(2),
if(srcRatio&tarRatio){
w = h*srcR
h = w/srcR
return {width:w.toFixed(0),height:h.toFixed(0)}
* 创建flash实例
* @param opt
* @param callbacks
function createFlash(opt, callbacks) {
var i18n = utils.extend({}, lang.flashI18n);
//处理图片资源地址的编码,补全等问题
for (var i in i18n) {
if (!(i in {&lang&:1, &uploadingTF&:1, &imageTF&:1, &textEncoding&:1}) && i18n[i]) {
i18n[i] = encodeURIComponent(editor.options.langPath + editor.options.lang + &/images/& + i18n[i]);
opt = utils.extend(opt, i18n, false);
var option = {
createOptions:{
id:'flash',
url:opt.flashUrl,
width:opt.width,
height:opt.height,
errorMessage:lang.flashError,
wmode:browser.safari ? 'transparent' : 'window',
ver:'10.0.0',
container:opt.container
flashContainer = $G(opt.container);
option = utils.extend(option, callbacks, false);
flashObj = new baidu.flash.imageUploader(option);
* 依据传入的align值更新按钮信息
* @param align
function updateAlignButton(align) {
var aligns = g(&remoteFloat&).
for (var i = 0, ci = aligns[i++];) {
if (ci.getAttribute(&name&) == align) {
if (ci.className != &focus&) {
ci.className = &focus&;
if (ci.className == &focus&) {
ci.className = &&;
* 创建图片浮动选择按钮
* @param ids
function createAlignButton(ids) {
for (var i = 0, ci = ids[i++];) {
var floatContainer = g(ci),
nameMaps = {&none&:lang.floatDefault, &left&:lang.floatLeft, &right&:lang.floatRight, ¢er&:lang.floatCenter};
for (var j in nameMaps) {
var div = document.createElement(&div&);
div.setAttribute(&name&, j);
if (j == &none&) div.className = &focus&;
div.style.cssText = &background:url(images/& + j + &_focus.jpg);&;
div.setAttribute(&title&, nameMaps[j]);
floatContainer.appendChild(div);
switchSelect(ci);
function toggleFlash(show) {
if (flashContainer && browser.webkit) {
flashContainer.style.left = show ? &0& : &-10000px&;
* tab点击处理事件
* @param tabHeads
* @param tabBodys
* @param obj
function clickHandler(tabHeads, tabBodys, obj) {
//head样式更改
for (var k = 0, len = tabHeads. k & k++) {
tabHeads[k].className = &&;
obj.className = &focus&;
//body显隐
var tabSrc = obj.getAttribute(&tabSrc&);
for (var j = 0, length = tabBodys. j & j++) {
var body = tabBodys[j],
id = body.getAttribute(&id&);
body.onclick = function () {
this.style.zoom = 1;
if (id != tabSrc) {
body.style.zIndex = 1;
body.style.zIndex = 200;
//当切换到本地图片上传时,隐藏遮罩用的iframe
if (id == &local&) {
toggleFlash(true);
maskIframe.style.display = &none&;
//处理确定按钮的状态
if (selectedImageCount) {
dialog.buttons[0].setDisabled(true);
toggleFlash(false);
maskIframe.style.display = &&;
dialog.buttons[0].setDisabled(false);
var list = g(&imageList&);
list.style.display = &none&;
//切换到图片管理时,ajax请求后台图片列表
if (id == &imgManager&) {
list.style.display = &&;
//已经初始化过时不再重复提交请求
if (!list.children.length) {
ajax.request(editor.options.imageManagerUrl, {
timeout:100000,
action:&get&,
onsuccess:function (xhr) {
//去除空格
var tmp = utils.trim(xhr.responseText),
imageUrls = !tmp ? [] : tmp.split(&ue_separate_ue&),
length = imageUrls.
g(&imageList&).innerHTML = !length ? &&&& + lang.noUploadImage : &&;
for (var k = 0, ci = imageUrls[k++];) {
var img = document.createElement(&img&);
var div = document.createElement(&div&);
div.appendChild(img);
div.style.display = &none&;
g(&imageList&).appendChild(div);
img.onclick = function () {
changeSelected(this);
img.onload = function () {
this.parentNode.style.display = &&;
var w = this.width, h = this.
scale(this, 100, 120, 80);
this.title = lang.toggleSelect + w + &X& +
this.onload =
img.setAttribute(k & 35 ? &src& : &lazy_src&, editor.options.imageManagerPath + ci.replace(/\s+|\s+/ig, &&));
img.setAttribute(&data_ue_src&, editor.options.imageManagerPath + ci.replace(/\s+|\s+/ig, &&));
onerror:function () {
g(&imageList&).innerHTML = lang.imageLoadE
if (id == &imgSearch&) {...