Initial Commit Update Telerik

This commit is contained in:
2022-01-07 19:26:33 +01:00
commit 57e1cda236
2174 changed files with 1202494 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="_sample_dialog" dock="fill" margin="12" padding="12" back_color="green" overflow="visible">
<label dock="fill" margin="30" back_color="white" text="Hello World" font="Normal 29pt Arial" vertical_align="middle" horizontal_align="center" cursor="pointer">
<attach name="click">
<![CDATA[
editor.AppendHTML("<p>Hello World ! <p>");
]]>
</attach>
</label>
<attach name="keydown" arguments="je,e">
if(e.keyCode==27)dialog.close();
</attach>
</panel>
<panel jsml-base="_sample_dialog" />
</jsml>

View File

@@ -0,0 +1,323 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<execute>
dialog.set_title("RichTextEditor Developer Center Beta");
</execute>
<panel jsml-class="developerdialog" dock="fill" margin="0" padding="0" back_color="black" text_color="white">
<xmldata>
<h1>Help</h1>
<ul>
<li>help - print this line</li>
<li>buildihtml5</li>
<li>joinallimages</li>
</ul>
</xmldata>
<panel jsml-local="sp" dock="fill" overflow_y="scroll">
<panel dock="bottom">
<label dock="left" text="&gt;" width="5" vertical_align="middle" text_align="right" margin="0,1,0,0"/>
<textbox dock="fill" back_color="black" text_color="white" border_width="0">
<initialize>
setTimeout(function(){self.focus();},100);
</initialize>
<attach name="enterkey">
var text=self.get_text()
self.set_text();
self.focus();
text=text.replace(/(^\s+)|(\s+$)/g,'');
if(text)instance.executeline(text);
else instance.printtext("");
</attach>
<attach name="keydown">
</attach>
</textbox>
</panel>
<htmlcontrol dock="fill" jsml-local="hc" overflow="visible">
</htmlcontrol>
</panel>
<method name="jsml_append_xmldata" arguments="xmldata">
self._xmldata=jsml.get_node_innerxml(xmldata);
</method>
<method name="insertdiv" arguments="div">
<![CDATA[
hc._content.appendChild(div);
hc.invoke_notify_content();
jsml.queue_resumehandler(function()
{
sp.set_scrolly(hc.get_demand_height());
});
]]>
</method>
<method name="printhelp">
var div=document.createElement("DIV");
div.innerHTML=this._xmldata;
self.insertdiv(div);
</method>
<initialize>
var div=document.createElement("DIV");
div.innerHTML="RichTextEditor : "+editor._config.version+" ? "+editor._config._urlsuffix
self.insertdiv(div);
self.printhelp();
</initialize>
<method name="printtext" arguments="text,color,bold">
<![CDATA[
var div=document.createElement("DIV");
div.innerHTML=jsml.html_encode(text)||"&nbsp;";
if(color)div.style.color=color;
if(bold)div.style.fontWeight='bold';
self.insertdiv(div);
]]>
</method>
<method name="executeline" arguments="text">
<![CDATA[
self.printtext("> "+text,'lightgreen',true);
var argline="";
var pos=text.indexOf(' ');
if(pos!=-1)
{
argline=text.substring(pos+1);
text=text.substring(0,pos);
}
try
{
switch(text.toLowerCase())
{
case "help":
self.printhelp();
return;
case "joinallimages":
case "buildihtml5":
self[text.toLowerCase()](argline);
return;
}
}
catch(x)
{
self.printtext('error : '+x.message,'red',true);
return;
}
self.printtext('Unknown command : '+text,'red',true);
]]>
</method>
<method name="joinallimages" arguments="cmdargs">
<![CDATA[
if(!jsml.html5)
{
self.printtext('Require HTML5','red',true);
return;
}
var folder=editor._config.folder;
var skin=editor._config.skin;
if(!editor._config.allimageindexdata)
{
self.printtext('no config.allimageindexdata','red',true);
return;
}
var imagenames=editor._config.allimageindexdata.split(',');
var allcanvas=document.createElement("canvas");
allcanvas.width=20;
allcanvas.height=20*imagenames.length;
var allctx=allcanvas.getContext("2d");
var index=-1;
function DoReport()
{
var str=allcanvas.toDataURL("image/png");
str=str.substring("data:image/png;base64,".length);
var form=document.createElement("form");
var textarea=document.createElement("TEXTAREA");
textarea.value=str;
textarea.style.width="480px";
textarea.style.height="320px";
var div=document.createElement("DIV");
div.appendChild(form);
form.appendChild(textarea);
self.insertdiv(div);
self.printtext('completed. count:'+imagenames.length+', size:'+textarea.value.length);
if(!cmdargs)return;
textarea.name="base64";
form.method="post";
form.target="_blank";
form.action=cmdargs+"?name=all.png&type=image/png";
form.submit();
}
function DoNext()
{
index++;
var imagename=imagenames[index];
if(!imagename) return DoReport();
var url=folder+"images/"+imagename+".png";
var img=document.createElement("IMG");
img.onload=function()
{
allctx.drawImage(img,0,20*index);
setTimeout(DoNext,1);
}
img.onerror=function()
{
self.printtext("error:"+url,"red");
return;
}
img.setAttribute("src",url);
}
DoNext();
]]>
</method>
<method name="buildihtml5">
<![CDATA[
if(!jsml.html5)
{
self.printtext('Require HTML5','red',true);
return;
}
var folder=editor._config.folder;
var skin=editor._config.skin;
var images=[];
function fillimages(ctrl)
{
if(ctrl.is_jsml_type("image"))
{
images.push(ctrl.get_src());
}
var arr=ctrl.get_children();
for(var i=0;i<arr.length;i++)
fillimages(arr[i]);
}
fillimages(editor._config.skin_control)
var oldcount=0;
var newcount=0;
var datamap={};
var index=-1;
var rteic=editor._config._rte_image_cache;
if(rteic)
{
for(var p in rteic)
{
var v=rteic[p];
if(typeof(v)=="string"&&v.substring(0,5)=="data:")
{
datamap[p]=v;
oldcount++;
}
}
}
if(editor._config.allimageindexdata)
{
var imagenames=editor._config.allimageindexdata.split(',');
for(var i=0;i<imagenames.length;i++)
images.push(folder+"images/"+imagenames[i]+".png");
var newimages=[];
var mapimages={};
for(var i=0;i<images.length;i++)
{
if(mapimages[images[i]])
continue;
mapimages[images[i]]=true;
newimages.push(images[i]);
}
}
self.printtext('loading images...');
function DoReport()
{
var code=[];
code.push("window._rte_image_cache=new function(){");
code.push("\r\n\r\n");
for(var p in datamap)
{
code.push("this['");
code.push(p);
code.push("']='");
code.push(datamap[p]);
code.push("';\r\n");
}
code.push("\r\n\r\n}\r\n");
var textarea=document.createElement("TEXTAREA");
textarea.value=code.join("");
textarea.style.width="480px";
textarea.style.height="320px";
var div=document.createElement("DIV");
div.appendChild(textarea);
self.insertdiv(div);
self.printtext('completed. exists:'+oldcount+', new:'+newcount+', size:'+textarea.value.length);
}
function DoNext()
{
index++;
var image=images[index];
if(!image) return DoReport();
var url=image;
if(url.substring(0,5)=="data:")
{
setTimeout(DoNext,1);
return;
}
if(url.substring(0,folder.length)!=folder)
{
self.printtext("skip:"+url,"red");
setTimeout(DoNext,1);
return;
}
var img=document.createElement("IMG");
img.onload=function()
{
var canvas=document.createElement("canvas");
canvas.width=img.width;
canvas.height=img.height;
var ctx=canvas.getContext("2d");
ctx.drawImage(img,0,0);
var p=url.substring(folder.length);
if(!datamap[p])
newcount++;
datamap[p]=canvas.toDataURL("image/png");
setTimeout(DoNext,1);
}
img.onerror=function()
{
self.printtext("error:"+url,"red");
setTimeout(DoNext,1);
}
img.setAttribute("src",url);
}
DoNext();
]]>
</method>
</panel>
<panel jsml-base="developerdialog" />
</jsml>

View File

@@ -0,0 +1,173 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<include src="{folder}dialogs/_skins.xml?{timems}" />
<panel jsml-class="dialogcontainer">
<panel dock="over" jsml-member="mask" back_color="black" opacity="5"></panel>
<!--a button for form default..-->
<button text="default" width="1px" height="1px" left="-10" top="-10" />
<panel jsml-local="dialogframe" width="620" height="420">
<panel jsml-local="skin" jsml-base="frameskin_seven" dock="over">
<attach name="clickclose">
if(instance._panel)instance._panel.invoke_event("clickclose");
</attach>
</panel>
</panel>
<initialize>
<![CDATA[
skin.set_css_class("jsml_dialogskin");
dialogframe.set_padding(skin.get_framepadding());
skin._skinmovetarget=dialogframe;
skin._skinsizetarget=dialogframe;
//self._element.onmousedown=jsml.cancel_bubble_function;
self.set_parent(document.body);
var style=self._estyle;
style.zIndex=editor._config.dialog_zindex;
style.position="absolute";
function repos()
{
if(self._jsml_disposed)return;
var rect=jsml.get_body_rect();
if(jsml.mobile)
{
rect.top=0;
rect.left=0;
}
else
{
setTimeout(repos,100);
}
style.top=rect.top+"px";
style.left=rect.left+"px";
self.set_width(rect.width);
self.set_height(rect.height);
}
repos();
]]>
</initialize>
<property name="title">
<get>
return skin.get_text();
</get>
<set>
skin.set_text(value);
</set>
</property>
<method name="SetPanel">
self._panel=value;
dialogframe.append_child(value);
self.MoveCenter();
//self._timeline=jsml.new_timeline()
//instance.set_opacity(30);
//self._timeline.add_onprogress(jsml.tween.make_number_property(instance,"opacity",70))
//self._timeline.set_timespan(500);
//self._timeline.start();
</method>
<attach name="disposing">
if(!self._timeline)return
self._timeline.pause();
self._timeline.dispose();
</attach>
<method name="MoveCenter">
var value=self._panel;
var padding=dialogframe.get_padding();
var w=value.get_width()+padding[1]+padding[3];
var h=value.get_height()+padding[0]+padding[2];
var rect=jsml.get_body_rect();
if(jsml.mobile)
{
dialogframe.set_top(rect.top)
dialogframe.set_left(rect.left)
}
else
{
dialogframe.set_top(Math.floor( Math.max(0,rect.height-h)/2 ))
dialogframe.set_left(Math.floor( Math.max(0,rect.width-w)/2 ))
}
dialogframe.set_width(Math.min(w,rect.width));
dialogframe.set_height(Math.min(h,rect.height));
</method>
<method name="resize" arguments="width,height">
<![CDATA[
var padding=dialogframe.get_padding();
if(width)
dialogframe.set_width(width+padding[1]+padding[3]);
if(height)
dialogframe.set_height(height+padding[0]+padding[2]);
self.MoveCenter();
]]>
</method>
</panel>
<panel dock="fill" back_color="white">
<initialize>
self._dialogcontainer=jsml.new_dialogcontainer();
self._dialogcontainer.SetPanel(self);
</initialize>
<attach name="keydown" arguments="je,e">
if(e.keyCode==27)self.invoke_event("clickclose");
</attach>
<attach name="clickclose">
<![CDATA[
if(self.onqueryclose)
if(false===self.onqueryclose())
return;
self.close();
]]>
</attach>
<method name="close">
self._dialogcontainer.set_visible(false);
setTimeout(function(){self._dialogcontainer.dispose();},1);
self.invoke_event("closing");
</method>
<property name="title">
<get>
return self._dialogcontainer.get_title();
</get>
<set>
self._dialogcontainer.set_title(value);
</set>
</property>
<method name="hidemask">
self._dialogcontainer.mask.set_visible(false);
</method>
<method name="resize" arguments="width,height">
jsml.suppend_layout();
self.set_width(width);
self.set_height(height);
self._dialogcontainer.resize(width,height);
jsml.resume_layout();
</method>
<method name="adjustsize">
<![CDATA[
jsml.suppend_layout();
var sw=self.get_width();
var sh=self.get_height();
var w=self.get_demand_content_width();
var h=self.get_demand_content_height();
if(w>sw||h>sh)
{
self.resize(Math.max(w,sw),Math.max(h,sh));
//recalc the height for flow controls
self.resize(Math.max(w,sw),self.get_demand_content_height());
}
jsml.resume_layout();
]]>
</method>
<method name="expandsize" arguments="width,height">
var rect=jsml.get_body_rect();
var maxw=Math.floor(rect.width*0.8);
var maxh=Math.floor(rect.height*0.8);
self.resize( Math.min(width+self.get_width(),maxw) , Math.min(height+self.get_height(),maxh) )
</method>
</panel>
</jsml>

View File

@@ -0,0 +1,283 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="frameskin_base">
</panel>
<panel jsml-class="frameskin_resizepanel">
<method name="get_sizetarget">
<![CDATA[
for(var p=self;p;p=p.get_jsml_parent())
{
if(p.instance_of("frameskin_base"))
return p._skinsizetarget;
}
]]>
</method>
<property name="resize_cursor">
<get>
return this._resize_cursor||"";
</get>
<set>
this._resize_cursor=value;
</set>
</property>
<property name="resize_edge">
<get>
return this._resize_edge||[0,0,0,0];
</get>
<set>
var arr=value.split(',');
this._resize_edge=arr;
self._stt=parseInt(arr[0]);
self._str=parseInt(arr[1]);
self._stb=parseInt(arr[2]);
self._stl=parseInt(arr[3]);
</set>
</property>
<attach name="mousehover">
this.set_unselectable(true);
var target=self.get_sizetarget();
if(target)self.set_cursor(self.get_resize_cursor());
</attach>
<attach name="mousedown" arguments="jevent,devent">
var target=self.get_sizetarget();
if(target)target.start_resize(devent,self._stt,self._str,self._stb,self._stl);
</attach>
</panel>
<panel jsml-class="frameskin_default" jsml-base="frameskin_base">
<panel dock="top" height="28" border_color="#D1D9DB" border_style="solid" border_width="0,1,0,1">
<panel dock="fill" padding="3,0,0,12" background="transparent url({folder}dialogs/skins/Default/top_middle.png)">
<label jsml-local="lbt" vertical_align="middle" dock="fill" cursor="move">
<initialize>
self._estyle.fontWeight="bold";
</initialize>
<attach name="mousedown,touchstart" arguments="jevent,devent">
if(instance._skinmovetarget)instance._skinmovetarget.start_move_offset(devent);
</attach>
</label>
</panel>
</panel>
<panel dock="fill" border_color="#D1D9DB" border_style="solid" border_width="1"></panel>
<method name="get_framepadding">
return [29,1,1,1];
</method>
<property name="text">
<get>
return lbt.get_text();
</get>
<set arguments="value">
lbt.set_text(value);
</set>
</property>
</panel>
<panel jsml-class="frameskin_blue" jsml-base="frameskin_base" border_width="1" border_color="#788EC0">
<panel dock="top" height="30" background="transparent url({folder}dialogs/skins/Blue/blue-bg.png) repeat-x">
<panel dock="top" height="4">
<panel dock="left" width="4" jsml-base="frameskin_resizepanel" resize_cursor="nw-resize" resize_edge="1,0,0,1"/>
<panel dock="right" width="4" jsml-base="frameskin_resizepanel" resize_cursor="ne-resize" resize_edge="1,1,0,0"/>
<panel dock="fill" width="4" jsml-base="frameskin_resizepanel" resize_cursor="n-resize" resize_edge="1,0,0,0"/>
</panel>
<label jsml-local="lbt" vertical_align="middle" dock="fill" margin="0,0,0,20" cursor="move">
<initialize>
self._estyle.fontWeight="bold";
</initialize>
<attach name="mousedown,touchstart" arguments="jevent,devent">
if(instance._skinmovetarget)instance._skinmovetarget.start_move_offset(devent);
</attach>
</label>
<panel top="9" right="9" width="16" height="16" cursor="pointer" tooltip="@CLOSE" background="transparent url({folder}dialogs/skins/Blue/blue-close.gif) no-repeat">
<attach name="click">
frameskin_blue.invoke_event("clickclose");
</attach>
</panel>
</panel>
<panel dock="fill" >
<panel dock="bottom" height="4" back_color="#C1D1F9">
<panel dock="left" width="4" jsml-base="frameskin_resizepanel" resize_cursor="sw-resize" resize_edge="0,0,1,1"/>
<panel dock="right" width="4" jsml-base="frameskin_resizepanel" resize_cursor="se-resize" resize_edge="0,1,1,0"/>
<panel dock="fill" width="4" jsml-base="frameskin_resizepanel" resize_cursor="s-resize" resize_edge="0,0,1,0"/>
</panel>
<panel dock="left" back_color="#C1D1F9" width="4" jsml-base="frameskin_resizepanel" resize_cursor="w-resize" resize_edge="0,0,0,1"/>
<panel dock="right" back_color="#C1D1F9" width="4" jsml-base="frameskin_resizepanel" resize_cursor="e-resize" resize_edge="0,1,0,0"/>
<panel dock="fill" border_color="#9CACD0" border_width="1" back_color="white">
</panel>
</panel>
<property name="text">
<get>
return lbt.get_text();
</get>
<set arguments="value">
lbt.set_text(value);
</set>
</property>
<method name="get_framepadding">
return [32,4,4,4];
</method>
</panel>
<panel jsml-class="frameskin_template" jsml-base="frameskin_base">
<panel jsml-member="tt" dock="top">
<panel jsml-member="tl" dock="left" jsml-base="frameskin_resizepanel" resize_cursor="nw-resize" resize_edge="1,0,0,1"/>
<panel jsml-member="tr" dock="right" jsml-base="frameskin_resizepanel" resize_cursor="ne-resize" resize_edge="1,1,0,0" />
<panel jsml-member="tc" dock="fill">
<panel dock="top" height="5" jsml-base="frameskin_resizepanel" resize_cursor="n-resize" resize_edge="1,0,0,0"/>
<label jsml-member="lt" dock="fill" vertical_align="middle" text="" cursor="move">
<attach name="mousedown,touchstart" arguments="jevent,devent">
if(instance._skinmovetarget)instance._skinmovetarget.start_move_offset(devent);
</attach>
</label>
</panel>
</panel>
<panel jsml-member="bb" dock="bottom">
<panel jsml-member="bl" dock="left" jsml-base="frameskin_resizepanel" resize_cursor="sw-resize" resize_edge="0,0,1,1"/>
<panel jsml-member="br" dock="right" jsml-base="frameskin_resizepanel" resize_cursor="se-resize" resize_edge="0,1,1,0"/>
<panel jsml-member="bc" dock="fill" jsml-base="frameskin_resizepanel" resize_cursor="s-resize" resize_edge="0,0,1,0" />
</panel>
<panel jsml-member="ml" dock="left" width="15" jsml-base="frameskin_resizepanel" resize_cursor="w-resize" resize_edge="0,0,0,1"/>
<panel jsml-member="mr" dock="right" width="15" jsml-base="frameskin_resizepanel" resize_cursor="e-resize" resize_edge="0,1,0,0"/>
<method name="get_framepadding">
return [this.tth||0,this.mrw||0,this.bbh||0,this.mlw||0];
</method>
<method name="init_skinname" arguments="skinname,tth,tlw,trw,bbh,blw,brw,mlw,mrw">
<![CDATA[
var imgext="gif";
if(skinname=="seven")
{
var ua=navigator.userAgent;
if( ua.indexOf("MSIE 6.")==-1 && ua.indexOf("MSIE 5.")==-1 )
imgext="png";
}
this.tth=tth;
this.bbh=bbh;
this.mlw=mlw;
this.mrw=mrw;
this.tt.set_height(tth);
this.tl.set_width(tlw);
this.tr.set_width(trw);
this.bb.set_height(bbh);
this.bl.set_width(blw);
this.br.set_width(brw);
this.ml.set_width(mlw);
this.mr.set_width(mrw);
this.tl.set_background("transparent url({folder}dialogs/skins/"+skinname+"/top_left."+imgext+") no-repeat");
this.tr.set_background("transparent url({folder}dialogs/skins/"+skinname+"/top_right."+imgext+") no-repeat");
this.tc.set_background("transparent url({folder}dialogs/skins/"+skinname+"/top_center."+imgext+") repeat-x");
this.bl.set_background("transparent url({folder}dialogs/skins/"+skinname+"/btm_left."+imgext+") no-repeat");
this.br.set_background("transparent url({folder}dialogs/skins/"+skinname+"/btm_right."+imgext+") no-repeat");
this.bc.set_background("transparent url({folder}dialogs/skins/"+skinname+"/btm_center."+imgext+") repeat-x");
this.ml.set_background("transparent url({folder}dialogs/skins/"+skinname+"/mdl_left."+imgext+") repeat-y");
this.mr.set_background("transparent url({folder}dialogs/skins/"+skinname+"/mdl_right."+imgext+") repeat-y");
]]>
</method>
<property name="text">
<get>
return self.lt.get_text();
</get>
<set>
self.lt.set_text(value);
</set>
</property>
<property name="text_color">
<get>
return self.lt.get_text_color();
</get>
<set>
self.lt.set_text_color(value);
</set>
</property>
</panel>
<panel jsml-class="frameskin_royale" jsml-base="frameskin_template">
<initialize>
this.init_skinname("royale",17,3,3,3,3,3,3,3);
this.lt.set_margin([0,0,0,3]);
this.lt.set_text_color("white");
</initialize>
</panel>
<panel jsml-class="frameskin_classic" jsml-base="frameskin_template">
<initialize>
this.init_skinname("classic",5,5,5,5,5,5,5,5);
</initialize>
</panel>
<panel jsml-class="frameskin_indigo" jsml-base="frameskin_template">
<initialize>
this.init_skinname("indigo",5,5,5,5,5,5,5,5);
</initialize>
</panel>
<panel jsml-class="frameskin_macblue" jsml-base="frameskin_template">
<initialize>
this.init_skinname("macblue",22,81,47,14,12,16,1,1);
</initialize>
</panel>
<panel jsml-class="frameskin_macwhite" jsml-base="frameskin_template">
<initialize>
this.init_skinname("macwhite",22,76,33,22,8,8,1,1);
</initialize>
</panel>
<panel jsml-class="frameskin_normal" jsml-base="frameskin_template">
<initialize>
this.init_skinname("normal",3,3,3,3,3,3,3,3);
</initialize>
</panel>
<panel jsml-class="frameskin_seven" jsml-base="frameskin_template">
<panel jsml-member="cb" right="15" top="7" width="44" height="18" cursor="pointer" tooltip="@CLOSE" background="transparent url({folder}dialogs/skins/seven/close.gif) no-repeat">
<attach name="click">
frameskin_seven.invoke_event("clickclose");
</attach>
</panel>
<initialize>
<![CDATA[
this.init_skinname("seven",35,15,15,15,15,15,15,15);
this.lt.set_margin([2,0,0,6]);
]]>
</initialize>
</panel>
<panel jsml-class="frameskin_newgreen" jsml-base="frameskin_template" jsml-local="newgreen">
<panel jsml-member="icon" left="15" top="14" width="13" height="18" background="transparent url({folder}dialogs/skins/newgreen/icon_dialog.gif) no-repeat"></panel>
<panel jsml-member="cb" right="0" top="9" width="44" height="18" cursor="pointer" background="transparent url({folder}dialogs/skins/newgreen/closebtn.gif) no-repeat">
<attach name="mousehover">
//self.set_background('transparent url({folder}dialogs/skins/newgreen/closebtn_over.gif) no-repeat');
newgreen.cbover.set_visible("true");
</attach>
</panel>
<panel jsml-member="cbover" visible="false" right="0" top="9" width="44" height="18" cursor="pointer" background="transparent url({folder}dialogs/skins/newgreen/closebtn_over.gif) no-repeat">
<attach name="click">
frameskin_newgreen.invoke_event("clickclose");
</attach>
<attach name="mouseleave">
self.set_visible("false");
</attach>
</panel>
<initialize>
<![CDATA[
this.init_skinname("newgreen",33,13,13,13,13,13,13,13);
this.lt.set_margin([8,0,8,20]);
]]>
</initialize>
</panel>
<execute>
<![CDATA[
if(!jsml.class_exists("frameskin"))
{
var skin='seven';
var arr=(window.location.href.split('#')[0].split('?')[1]||'').split('&');
for(var i=0;i<arr.length;i++)
{
var kv=arr[i].split('=');
if(kv[0]=="dialogskin")
skin=kv[1];
}
jsml.class_define("frameskin","frameskin_"+skin);
}
]]>
</execute>
</jsml>

View File

@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="alertdialogpanel" dock="fill" overflow="visible" margin="0" padding="15">
<panel jsml-local="bottompanel" dock="bottom" horizontal_align="center">
<button width="82" text="@OK" jsml-local="okbtn">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
<panel dock="top" overflow="visible">
<image dock="left" src="{folder}images/msgbox_alert.gif" width="11" height="11" />
<label jsml-local="label" dock="fill" margin="0,5,15,5" word_wrap="true" vertical_align="middle" max_width="640" />
</panel>
<attach name="keydown" arguments="je,e">
if(e.keyCode==27)dialog.close();
</attach>
<initialize>
<![CDATA[
if(option.hideButtons)
bottompanel.set_visible(false);
label.set_text(option.message);
setTimeout(function()
{
okbtn.focus();
var dw=label.get_demand_content_width()
var dh=label.get_demand_content_height()
var cw=label.get_current_width();
var ch=label.get_current_height();
var w=dw-cw;
var h=dh-ch;
if(w>0||h>0)
{
if(w<0)w=0;
if(h<0)h=0;
//dialog.expandsize(w,h);
}
},1);
setTimeout(function(){okbtn.focus();},100);
]]>
</initialize>
<attach name="click">
okbtn.focus()
</attach>
</panel>
<object jsml-base="alertdialogpanel">
</object>
</jsml>

View File

@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="promptdialogpanel" dock="fill" margin="0" padding="18" overflow="visible">
<panel dock="top" overflow="visible">
<checkbox jsml-local="checkbox" dock="left" width="20" margin="3,1,0,4"/>
<label jsml-local="label" dock="fill" margin="4,4,0,4" max_width="640" />
</panel>
<panel dock="bottom">
<panel dock="right" overflow="visible">
<button dock="left" width="82" margin="0,12,0,0" text="@OK" jsml-local="btnok">
<attach name="click">
instance.commitinput();
</attach>
</button>
<button dock="left" width="82" margin="0,12,0,0" text="@CANCEL">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
</panel>
<attach name="keydown" arguments="je,e">
if(e.keyCode==27)dialog.close();
</attach>
<method name="commitinput">
<![CDATA[
if(!checkbox.get_checked())
return;
dialog.result=true;
dialog.close();
]]>
</method>
<initialize>
<![CDATA[
label.set_text(option.message);
function checkvalue()
{
if(self._jsml_disposed)return;
setTimeout(checkvalue,10);
btnok.set_disabled(!checkbox.get_checked());
btnok.set_tooltip(checkbox.get_checked()?"":"Please click the checkbox at first");
}
setTimeout(checkvalue,10);
]]>
</initialize>
</panel>
<object jsml-base="promptdialogpanel">
</object>
</jsml>

View File

@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="promptdialogpanel" dock="fill" margin="0" padding="18" overflow="visible">
<panel dock="top" overflow="visible">
<label jsml-local="label" dock="fill" margin="4,4,0,4" max_width="640"/>
</panel>
<panel dock="top" overflow="visible">
<textbox jsml-local="textbox" dock="fill" margin="12" border_color="gray" border_style="solid" border_width="1">
<attach name="enterkey">
instance.commitinput();
</attach>
</textbox>
</panel>
<panel dock="bottom">
<panel dock="right" overflow="visible">
<button dock="left" width="82" margin="0,12,0,0" text="@OK" jsml-local="btnok">
<attach name="click">
instance.commitinput();
</attach>
</button>
<button dock="left" width="82" margin="0,12,0,0" text="@CANCEL">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
</panel>
<attach name="keydown" arguments="je,e">
if(e.keyCode==27)dialog.close();
</attach>
<method name="getvalidvalue" arguments="allowUI">
<![CDATA[
var val=textbox.get_text();
if(!option.stoptrim)val=val.replace(/(^\s+|\s+$)/g,"")
if(val=="")return option.allowempty?"":null;
if(option.minlen&&val.length<option.minlen)return null;
if(option.maxlen&&val.length>option.maxlen)return null;
if(option.regexp&&!option.regexp.test(val))return null;
if(option.precheckvalue)
val=option.precheckvalue(val,allowUI);
return val;
]]>
</method>
<method name="commitinput">
<![CDATA[
var val=self.getvalidvalue(true);
if(val==null)
return;
dialog.result=val;
dialog.close();
]]>
</method>
<initialize>
<![CDATA[
label.set_text(option.message);
textbox.set_text(option.defaultvalue||"");
setTimeout(function()
{
textbox.focus();
if(textbox.get_text())
{
try{textbox._input.select();}catch(x){}
}
},1);
function checkvalue()
{
if(self._jsml_disposed)return;
setTimeout(checkvalue,10);
var val=self.getvalidvalue();
btnok.set_disabled(val==null);
}
setTimeout(checkvalue,10);
]]>
</initialize>
</panel>
<object jsml-base="promptdialogpanel">
</object>
</jsml>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,247 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="cleancode_item" dock="top">
<checkbox dock="left" jsml-local="checkbox" width="20" height="16" margin="1,0,3,0">
<attach name="change,click">
instance.filter.IsChecked=self.get_checked();
</attach>
</checkbox>
<label dock="left" jsml-local="label" vertical_align="middle"/>
<method name="bind_item" arguments="arg0">
self.filter=arg0;
label.set_text(self.filter.Filter.LangText);
self.set_opacity(self.filter.IsMatch?100:80)
checkbox.set_disabled(!self.filter.IsMatch);
</method>
</panel>
<panel jsml-class="cleancode_dialog" dock="fill" margin="0" padding="6" overflow="visible" back_color="#f9f9f9">
<label dock="bottom" jsml-local="scaninfo" />
<panel dock="fill" margin="12">
<panel dock="right">
<button text="@APPLY" >
<attach name="click">
instance.DoExecute();
</attach>
</button>
<button text="@UNDO" jsml-local="btnundo" top="30">
<attach name="click">
instance.DoUndo();
</attach>
</button>
<button text="@REDO" jsml-local="btnredo" top="60">
<attach name="click">
instance.DoRedo();
</attach>
</button>
<button text="@CLOSE" top="90">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
<panel dock="fill" overflow_y="scroll" margin="0,10,0,0" border_style="solid" border_width="0,1,0,0" border_color="#cccccc">
<panel dock="top" overflow="visible">
<label dock="left" text="@CLEAN_MATCHITEMS|:" padding="0,0,0,5" width="90"/>
<panel dock="left" width="400" overflow="visible">
<panel dock="top" jsml-local="enablelist" overflow="visible">
</panel>
<panel dock="top">
<label dock="left" text="@TAGSTOREMOVE|:" vertical_align="middle" margin="0,5,0,5"></label>
<textbox dock="left" jsml-local="specifytags" border_width="1" width="160" border_color="#a0a0a0"></textbox>
</panel>
</panel>
</panel>
<panel dock="top"/>
<panel dock="top" overflow="visible">
<label dock="left" text="@CLEAN_UNMATCHITEMS|:" padding="0,0,0,5" width="90" />
<panel dock="left" jsml-local="disablelist" overflow="visible">
</panel>
</panel>
</panel>
</panel>
<attach name="keydown" arguments="je,e">
if(e.keyCode==27)dialog.close();
</attach>
<initialize>
self.LoadUI();
</initialize>
<method name="ReloadUI">
enablelist.dispose_children();
disablelist.dispose_children()
self.LoadUI();
</method>
<method name="LoadUI">
<![CDATA[
self.loadingfilter=true;
var filters=self.filters=editor.GetHtmlFilterList();
var html=editor.GetHtmlCode();
var nodes=editor.ParseHtmlCode(html);
var ver=editor.GetFrameVersion();
var index=-1;
function NextFilter()
{
if(self._jsml_disposed)
return;
if(ver!=editor.GetFrameVersion())
return;
index++;
var filter=filters[index];
if(!filter)
{
jsml.suppend_layout();
scaninfo.set_text("")
self.FillFilters();
jsml.resume_layout();
self.loadingfilter=false;
return;
}
setTimeout(NextFilter,10);
scaninfo.set_text(filter.LangText+".."+Math.floor(100*(index+1)/filters.length)+"%")
filter={Filter:filter}
filters[index]=filter;
if(filter.Filter.ParamType=="NodeArray")
filter.IsMatch=filter.Filter.Match(nodes)
else
filter.IsMatch=filter.Filter.Match(html)
}
scaninfo.set_text("Loading...")
setTimeout(NextFilter,10);
setTimeout(function()
{
btnundo.set_disabled(!editor.CanExecCommand("undo"));
btnredo.set_disabled(!editor.CanExecCommand("redo"));
},200);
]]>
</method>
<method name="FillFilters">
<![CDATA[
var matchcount=0;
for(var i=0;i<self.filters.length;i++)
{
var filter=self.filters[i];
var list=filter.IsMatch?enablelist:disablelist;
var item=jsml.class_create_instance("cleancode_item");
item.bind_item(filter);
list.append_child(item);
if(filter.IsMatch)matchcount++;
}
if(matchcount==0)
{
var label=jsml.class_create_instance("label");
label.set_text(editor.GetLangText("msg_cleancode_nomatches"));
label.set_vertical_align("middle");
label.set_padding([0,0,0,5]);
label._estyle.fontWeight="bold";
//label.set_margin([0,0,12,0]);
label.set_dock("fill");
enablelist.append_child(label);
}
]]>
</method>
<method name="DoUndo">
editor.ExecCommand("undo");
self.ReloadUI();
</method>
<method name="DoRedo">
editor.ExecCommand("redo");
self.ReloadUI();
</method>
<method name="DoExecute">
<![CDATA[
if(self.loadingfilter)
return;
var arr1=[];
var arr2=[];
var tags=specifytags.get_text().split(' ').join(',').split(',');
for(var i=0;i<tags.length;i++)
{
var tag=tags[i].replace(/(^\s+)|(\s+$)/g,'');
if(!tag)
{
tags.splice(i,1);
i--;
}
else
{
tags[i]=tag;
}
}
if(tags.length)
{
var rtf=editor.CreateRemoveTagsFilter(tags);
arr1.push({Filter:rtf,IsChecked:1});
}
for(var i=0;i<self.filters.length;i++)
{
var filter=self.filters[i];
if(!filter.IsChecked)continue;
if(filter.Filter.ParamType=="NodeArray")
arr1.push(filter);
else
arr2.push(filter);
}
var html=editor.GetHtmlCode();
if(arr2.length)
{
for(var i=0;i<arr2.length;i++)
html=arr2[i].Filter.Filter(html);
}
if(arr1.length)
{
var nodes=editor.ParseHtmlCode(html);
for(var i=0;i<arr1.length;i++)
nodes=arr1[i].Filter.Filter(nodes);
var sb=[]
for(var i=0;i<nodes.length;i++)
sb.push(nodes[i].GetHtmlCode());
html=sb.join("");
}
editor.SetHtmlCode(html);
self.ReloadUI();
]]>
</method>
</panel>
<panel jsml-base="cleancode_dialog" />
<execute>
dialog.set_title(editor.GetLangText("cleancode"));
</execute>
</jsml>

View File

@@ -0,0 +1,152 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="colorpickericon" dock="flow" width="16" height="16" margin="2" border_color="transparent" border_width="1" cursor="pointer">
<panel jsml-member="inner" dock="fill" border_color="gray" border_width="1" back_color="black" />
</panel>
<panel jsml-class="colorpickeritem" dock="flow" width="16" height="16" margin="2" border_color="transparent" border_width="1" cursor="pointer">
<panel jsml-member="inner" dock="fill" border_color="gray" border_width="1" />
<property name="value">
<get>
return self.inner.get_back_color();
</get>
<set>
self.inner.set_back_color(value);
</set>
</property>
<method name="setup_preview" arguments="html,cmd">
self._previewhtml=html;
self._previewcmd=cmd;
self._previewstyle=(cmd=="forecolor"?"color":"background-color");
</method>
<attach name="mousehover" arguments="je,e">
<![CDATA[
self.set_border_color('orange');
self._hovered=true;
if(!self._previewhtml)return;
if(self.currentdialog&&self.currentdialog.get_visible())
return;
var newoption={control:self,floatMode:'b-r',stopToggle:true,stopOverlay:true};
newoption.buttonClick=function()
{
self.invoke_event("click");
}
var dialog=jsml.class_create_instance("floatbox");
var htmlc=jsml.class_create_instance("htmlcontrol");
htmlc.set_html("<pre style='margin:0px;padding:0px;font-weight:bold;'>Preview for color : "+self.get_value()+"</pre><pre style='padding:5px;"+self._previewstyle+":"+self.get_value()+"'>"+self._previewhtml+"</pre>");
htmlc.set_dock("fill");
var gbr=jsml.get_body_rect();
htmlc.set_max_width(Math.floor(gbr.width*0.6));
htmlc.set_max_height(Math.floor(gbr.height*0.3));
htmlc.set_vertical_align("middle");
dialog.append_child(htmlc);
dialog.set_width(240);
dialog.set_padding(12);
dialog._estyle.zIndex=editor._config.dialog_zindex;
dialog.show(newoption);
self.currentdialog=dialog;
]]>
</attach>
<attach name="mouseleave">
<![CDATA[
self.set_border_color('transparent');
self._hovered=false;
setTimeout(function()
{
if(self._hovered)return;
if(self.currentdialog&&self.currentdialog.get_visible())
{
self.currentdialog.close();
}
},11);
]]>
</attach>
<attach name="click">
dialog.close();
option.setcolor(self.get_value());
</attach>
</panel>
<panel jsml-class="colorpickerpanel" dock="fill" padding="6" width="186" overflow="visible">
<panel jsml-base="panelbutton" dock="top" margin="2,2,2,2" padding="0,3,0,3">
<panel jsml-base="colorpickericon" dock="left"/>
<label dock="fill" text="@automatic" cursor="pointer" vertical_align="middle" horizontal_align="center"/>
<attach name="click">
dialog.close();
option.setcolor("");
</attach>
</panel>
<panel jsml-base="panelbutton" dock="bottom" margin="2,2,2,2" padding="0,3,0,3">
<panel jsml-base="colorpickericon" dock="left"/>
<label dock="fill" text="@MoreColors" cursor="pointer" vertical_align="middle" horizontal_align="center" />
<attach name="click">
<![CDATA[
dialog.close();
var newoption={}
newoption.width=510;
newoption.height=460;
newoption.callback=function(val)
{
if(!val)return;
option.setcolor(val);
}
editor.ShowXmlDialog("{folder}server/colorpicker.xml",newoption);
]]>
</attach>
</panel>
<panel jsml-local="arraypanel" padding="6" dock="fill" overflow="visible">
</panel>
<initialize>
<![CDATA[
var type=String(option.command).toLowerCase();
var arr=editor._config.colorpicker_othercolor;
switch(type)
{
case "forecolor":
arr=editor._config.colorpicker_forecolor;
if(option.preview&&!editor._config.preview_disabletooltip&&!editor._config.preview_disableforecolor)
{
self._previewcmd="forecolor";
self._previewhtml=editor.GetRangePreviewHTML("forecolor");
}
break;
case "backcolor":
arr=editor._config.colorpicker_backcolor;
if(option.preview&&!editor._config.preview_disabletooltip&&!editor._config.preview_disablebackcolor)
{
self._previewcmd="backcolor";
self._previewhtml=editor.GetRangePreviewHTML("backcolor");
}
break;
}
for(var i=0;i<arr.length;i++)
{
var item=jsml.class_create_instance("colorpickeritem");
if(self._previewhtml)
item.setup_preview(self._previewhtml,self._previewcmd);
else
item.set_tooltip(arr[i])
item.set_value(arr[i]);
arraypanel.append_child(item);
}
]]>
</initialize>
<attach name="keydown" arguments="je,e">
if(e.keyCode==27)dialog.close();
</attach>
</panel>
<panel jsml-base="colorpickerpanel" />
</jsml>

View File

@@ -0,0 +1,173 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<execute>
dialog.set_title("Paste")
</execute>
<panel dock="fill" margin="6" padding="6" jsml-class="pastedialog" >
<label dock="top" jsml-local="labeltitle" text="@PASTETITLE" />
<panel jsml-local="keeplinepanel" right="0" overflow="visible" padding="0,6,0,0">
<checkbox dock="left" jsml-local="cbkeepline" checked="1" />
<label dock="fill" text="@keeplinebreaks" vertical_align="middle"/>
</panel>
<panel dock="bottom" margin="3" padding="6" overflow="visible">
<panel dock="top" height="20" margin="0,0,6,0">
<label dock="right" text="@closeafterpaste" text_color="gray" vertical_align="middle" />
<checkbox dock="right" width="20" jsml-local="checkbox" checked="true">
<attach name="click">
instance._focustodiv();
</attach>
</checkbox>
</panel>
<panel dock="right" margin="3" overflow="visible">
<button dock="left" width="82" height="24" text="OK" margin="0,12,0,0">
<attach name="click">
instance._tryreturn();
</attach>
</button>
<button dock="left" width="82" height="24" text="Cancel">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
</panel>
<panel dock="fill" margin="6" padding="6" border_width="1" border_color="#cccccc" border_style="solid" cursor="text">
<htmlcontrol jsml-local="thectrl" dock="fill" css_text="normal 11px Arial">
</htmlcontrol>
</panel>
<initialize>
<![CDATA[
if(option.command=="pasteword")
labeltitle.set_text(editor.GetLangText("pastewordtitle"));
else if(option.command=="pastetext")
labeltitle.set_text(editor.GetLangText("pastetexttitle"));
else
labeltitle.set_text(editor.GetLangText("pastetitle"));
self._thediv=document.createElement(option.puretextmode?"TEXTAREA":"DIV");
self._thediv.style.resize="none";
thectrl._content.appendChild(self._thediv);
if(!option.puretextmode)
{
self._thediv.setAttribute("contenteditable","true")
self._thediv.contentEditable=true;
}
else
{
self._thediv.onkeyup=self.delegate(self._thedivkeyup);
}
if(window._rtecliphtml)
self._thediv.innerHTML=window._rtecliphtml;
if(option.command!="pastetext")
keeplinepanel.set_visible(false);
self._thediv.style.outline="none";
self._thediv.style.borderWidth="0px";
self._setdivsize();
setTimeout(function()
{
self._setdivsize();
self._focustodiv();
},123);
]]>
</initialize>
<attach name="disposing">
self._thediv.onkeyup=null;
</attach>
<method name="_focustodiv">
<![CDATA[
window.focus();
self._thediv.focus();
if(!option.puretextmode)
{
editor._browserSetPointInside(window,self._thediv,0);
}
]]>
</method>
<method name="_setdivsize">
<![CDATA[
var w=thectrl.get_client_width()-6;
var h=thectrl.get_client_height()-6;
if(w<10)w=10;
if(h<10)h=10;
self._thediv.style.width=w+"px";
self._thediv.style.height=h+"px";
]]>
</method>
<attach name="resize">
self._setdivsize();
</attach>
<method name="_tryreturn">
<![CDATA[
var html=self._thediv.innerHTML;
if(option.command=="pastehtml")
{
html=self._thediv.value;
}
if(option.command=="pastetext")
{
var tabhtc=editor._config.pastetext_tabspaces;
var usepre=editor._config.pastetext_whitespace;
if(usepre=='auto')usepre=jsml.html5;
var lines=self._thediv.value.split('\r').join('').split('\n');
for(var i=0;i<lines.length;i++)
{
var code=lines[i];
code=code.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\x22/g,"&quot;").replace(/\x27/g,"&#39;");
if(usepre&&code.indexOf('\t')!=-1)
code="<span style='white-space:pre'>"+code+"</span>";
else
code=code.split('\t').join(tabhtc).replace(/\s/g,"&nbsp;");
lines[i]=code;
}
if(cbkeepline.get_checked())
html=lines.join("<br/>");
else
html=lines.join(" ");
}
if(html.length==0)return;
dialog.result=html;
dialog.close();
]]>
</method>
<attach name="keydown,divkeyup" arguments="je,e">
<![CDATA[
if(e.keyCode==27)
{
dialog.close();
return;
}
if(e.ctrlKey&&e.keyCode==86)
{
if(checkbox.get_checked())
{
setTimeout(self.delegate(self._tryreturn),100);
}
}
]]>
</attach>
<method name="_thedivkeyup" arguments="e">
self.invoke_event("divkeyup",e||window.event);
</method>
</panel>
<panel jsml-base="pastedialog" width="360" height="240" />
</jsml>

View File

@@ -0,0 +1,173 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="findandreplace_dialog" dock="fill" margin="0" padding="15" overflow="visible" back_color="#F9F9F9">
<panel dock="left" overflow="visible">
<panel dock="top" margin="3,0,5,0">
<label dock="left" text="@FINDWHAT" vertical_align="middle" />
<textbox jsml-local="tbfind" dock="fill" width="150" border_color="#ABADB3">
<initialize>
self._input.style.textIndent="2px";
</initialize>
<attach name="enterkey">
instance.DoFind();
</attach>
</textbox>
</panel>
<panel dock="top" margin="3,0,5,0">
<label dock="left" text="@REPLACEWITH" vertical_align="middle" />
<textbox jsml-local="tbreplace" dock="fill" width="150" border_color="#ABADB3">
<initialize>
self._input.style.textIndent="2px";
</initialize>
</textbox>
</panel>
<panel dock="top" margin="5,0,0,80">
<checkbox jsml-local="cbcase" top="1" />
<label left="24" vertical_align="middle" text="@MATCHCASE" />
</panel>
<panel dock="top" margin="5,0,0,80">
<checkbox jsml-local="cbword" top="1" />
<label left="24" vertical_align="middle" text="@MATCHWORD" />
</panel>
</panel>
<panel dock="right" overflow="visible">
<panel overflow="visible">
<button dock="top" height="24" width="90" margin="3" text="@FIND">
<attach name="click">
instance.DoFind();
</attach>
</button>
<button dock="top" height="24" width="90" margin="3" text="@REPLACE">
<attach name="click">
instance.DoReplace();
</attach>
</button>
<button dock="top" height="24" width="90" margin="3" text="@REPLACEALL">
<attach name="click">
instance.DoReplaceAll();
</attach>
</button>
<button dock="top" height="24" width="90" margin="3" text="@CLOSE">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
</panel>
<initialize>
<![CDATA[
setTimeout(function()
{
tbfind.focus();
},100);
]]>
</initialize>
<attach name="keydown" arguments="je,e">
if(e.keyCode==27)dialog.close();
</attach>
<method name="GetSelectedText">
return jsml.html_decode(editor.GetRangePreviewHTML());
</method>
<initialize>
<![CDATA[
var seltext=self.GetSelectedText();
if(seltext)
{
tbfind.set_text(seltext);
}
]]>
</initialize>
<method name="DoFind">
<![CDATA[
var text=tbfind.get_text();
if(!text)
return false;
if(!self.FindNext())
{
alert(editor.GetLangText("msg_nofindmatch"));
}
editor.Focus();
]]>
</method>
<method name="FindNext" arguments="dontmovetostart">
<![CDATA[
var text=tbfind.get_text();
if(!text)
return false;
if(editor.GetSelectionType()=="Point"||editor.GetSelectionType()=="Range")
{
if(editor.FindNextText(text,cbcase.get_checked(),cbword.get_checked()))
return true;
}
if(dontmovetostart)
return false;
editor.MoveToDocumentBegin();
return editor.FindNextText(text,cbcase.get_checked(),cbword.get_checked());
]]>
</method>
<method name="DoReplace">
<![CDATA[
var text=tbfind.get_text();
if(!text)
return;
var txtreplace=tbreplace.get_text();
if(!txtreplace)
return;
var seltext=self.GetSelectedText();
if(!seltext||text.toLowerCase()!=seltext.toLowerCase())
{
if(!self.FindNext())
{
alert(editor.GetLangText("msg_nofindmatch"));
}
editor.Focus();
return;
}
self.replacedcount=1+(self.replacedcount||0)
editor.DeleteSelection();
editor.InsertHTML(jsml.html_encode(txtreplace));
if(!self.FindNext())
{
alert(editor.GetLangText("msg_finishreplace"));
}
]]>
</method>
<method name="DoReplaceAll">
<![CDATA[
var text=tbfind.get_text();
if(!text)
return;
var txtreplace=tbreplace.get_text();
if(!txtreplace)
return;
editor.MoveToDocumentBegin();
var count=0;
while(self.FindNext(true))
{
editor.DeleteSelection();
editor.InsertHTML(jsml.html_encode(txtreplace))
editor.RangeSyncToDom(true);
count++;
}
alert(editor.GetLangText("msg_replaceall",count));
editor.Focus();
]]>
</method>
</panel>
<panel jsml-base="findandreplace_dialog" />
<execute>
dialog.set_title(editor.GetLangText("FINDANDREPLACE"));
</execute>
</jsml>

View File

@@ -0,0 +1,155 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="foldertreenode" dock="top" height="10" overflow="visible">
<panel dock="top" height="10" overflow="visible" cursor="pointer">
<image dock="left" jsml-local="image" width="18" height="18" overflow="none" vertical_align="middle" padding="-1,-2,1,2"/>
<label dock="fill" jsml-local="label" text="Loading.." cursor="pointer" vertical_align="middle" margin="0,0,0,2" />
<attach name="mousehover">
<![CDATA[
if(instance.invalidnode)return;
if(self.isselected)
self.set_back_color('#cccccc');
else
self.set_back_color('#eeeeee');
]]>
</attach>
<attach name="mouseleave">
<![CDATA[
if(instance.invalidnode)return;
if(self.isselected)
self.set_back_color('#eeeeee');
else
self.set_back_color('');
]]>
</attach>
<attach name="mousedown">
<![CDATA[
if(instance.invalidnode)return;
if(option.quickselect)
{
option.quickselect(instance._item.UrlPath);
dialog.close();
return;
}
if(dialog.selectedtreenode)dialog.selectedtreenode.set_selected(false);
dialog.selectedtreenode=self;
dialog.selectedpath=instance._item.UrlPath;
self.set_selected(true);
self.set_back_color('#cccccc');
dialog.okbutton.set_disabled(false);
]]>
</attach>
<property name="selected">
<get>
return self.isselected;
</get>
<set>
<![CDATA[
self.isselected=value;
if(self.isselected)
self.set_back_color('#eeeeee');
else
self.set_back_color('');
]]>
</set>
</property>
</panel>
<panel dock="fill" jsml-local="panel" height="10" overflow="visible" visible="false" margin="0,0,0,21">
</panel>
<method name="bind_item" arguments="item">
<![CDATA[
self._item=item;
label.set_text(item.Name);
if(!option.quickselect && item.UrlPath==option.folder)
{
self.invalidnode="same";
}
if(item.Parent&&item.Parent.UrlPath==option.folder)
{
var arr=option.items;
for(var i=0;i<arr.length;i++)
if(arr[i]==item.Name)
self.invalidnode="invalid";
}
if(self.invalidnode)
{
label.set_text_color("#999999");
}
if(self.invalidnode=="invalid"||!item.SubNodes||!item.SubNodes.length)
{
image.set_src("{folder}images/closedfolder.gif");
return;
}
image.set_src("{folder}images/openfolder.png");
for(var i=0;i<item.SubNodes.length;i++)
{
var subctrl=jsml.new_foldertreenode();
var subitem=item.SubNodes[i];
subitem.Parent=item;
subitem.UrlPath=item.UrlPath+subitem.Name+"/";
subctrl.bind_item(subitem);
panel.append_child(subctrl);
}
panel.set_visible(true);
]]>
</method>
</panel>
<panel jsml-class="foldertreedialog" dock="fill" back_color="white" overflow="visible" max_width="480" max_height="420">
<panel dock="bottom" jsml-local="bottompanel" margin="3" padding="6" overflow="visible">
<panel dock="right" margin="3" overflow="visible">
<button dock="left" width="82" height="24" text="OK" margin="0,12,0,0" disabled="true">
<initialize>
dialog.okbutton=self;
</initialize>
<attach name="click">
dialog.result=dialog.selectedpath;
dialog.close();
</attach>
</button>
<button dock="left" width="82" height="24" text="Cancel">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
</panel>
<panel jsml-local="rootpanel" jsml-base="foldertreenode" dock="fill" overflow_y="scroll" margin="9" padding="0,12,0,0" />
<initialize>
<![CDATA[
editor.CallAjax("AjaxGetFolderNodes",self.delegate(self.handlegetfolders),option.storage);
if(option.quickselect)
{
bottompanel.set_visible(false);
self.set_width(210);
self.set_height(150);
}
else
{
self.set_width(360);
self.set_height(240);
}
]]>
</initialize>
<method name="handlegetfolders" arguments="res">
jsml.suppend_layout();
rootpanel.bind_item({Name:"/",UrlPath:"/",SubNodes:res.ReturnValue});
jsml.resume_layout();
</method>
</panel>
<panel jsml-base="foldertreedialog">
<initialize>
dialog.set_title("select folder..");
</initialize>
</panel>
</jsml>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<execute>
if(!dialog.get_title())dialog.set_title(editor.GetLangText("preview"));
</execute>
<panel jsml-class="htmlpreview_dialog" dock="fill" overflow="visible" vertical_align="middle" horizontal_align="center">
<htmlcontrol overflow="visible">
<initialize>
self._content.innerHTML=option.htmlcode;
self.invoke_notify_content();
</initialize>
</htmlcontrol>
<attach name="keydown" arguments="je,e">
if(e.keyCode==27)dialog.close();
</attach>
</panel>
<panel jsml-base="htmlpreview_dialog" />
</jsml>

View File

@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<execute>
dialog.set_title(editor.GetLangText("imageeditor"));
</execute>
<panel jsml-class="imageeditor_dialog" dock="fill" overflow="visible">
<htmlcontrol dock="fill" jsml-local="hc">
</htmlcontrol>
<attach name="attach_dom">
<![CDATA[
setTimeout(function()
{
if(self.iframe)return;
window.rteimageeditoreditor=editor;
window.rteimageeditordialog=dialog;
window.rteimageeditoroption=option;
dialog.attach_event("closing",function()
{
window.rteimageeditoreditor=null;
window.rteimageeditordialog=null;
window.rteimageeditoroption=null;
});
var iframe=document.createElement("IFRAME");
var canvas=document.createElement("CANVAS");
if(canvas.getContext)
iframe.setAttribute("src","{folder}rtepaint5/dialog.htm?{timems}");
else if(editor._config.servertype=="AspNet")
iframe.setAttribute("src","{folder}rtepaint4/dialog.htm?{timems}");
else
return alert("Require HTML5 browser")+":"+dialog.close();
iframe.setAttribute("frameBorder","0");
hc._content.appendChild(iframe);
self.iframe=iframe;
self.invoke_event("resize");
},10);
]]>
</attach>
<attach name="disposing">
if(!self.iframe)return;
var win=self.iframe.contentWindow;
if(!win)return;
var doc=win.document;
if(!doc)return;
doc.open("text/html");
doc.write("empty");
doc.close();
</attach>
<attach name="resize">
if(!self.iframe)return;
self.iframe.style.width=hc.get_client_width()+"px";
self.iframe.style.height=hc.get_client_height()+"px";
</attach>
</panel>
<panel jsml-base="imageeditor_dialog" />
</jsml>

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

View File

@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<execute>
dialog.set_back_color("#F9F9F9");
dialog.set_title(editor.GetLangText("insertanchor"));
</execute>
<panel jsml-class="insertanchor_dialog" dock="fill" overflow="visible">
<groupbox text="@namedanchor" dock="top" overflow="visible" margin="8">
<panel dock="top" margin="6" width="240" height="100" overflow="scroll" border_style="solid" border_width="1" back_color="white" border_color="#cccccc">
<htmlcontrol jsml-local="container" dock="fill" margin="2" overflow="visible" css_class="jsml_button" font_size="11">
</htmlcontrol>
</panel>
<panel dock="top" width="240" height="80">
<panel dock="bottom" margin="3" padding="6" overflow="visible">
<panel dock="right" margin="3" overflow="visible">
<button dock="left" width="82" height="24" text="@OK" margin="0,12,0,0">
<initialize>
if(option.oktext)self.set_text(option.oktext);
</initialize>
<attach name="click">
var name=option.targetnode.GetAttribute("name");
if(!name)return;
option.targetnode.SetAttribute("id",name);
dialog.result=true;
dialog.close();
</attach>
</button>
<button dock="left" width="82" height="24" text="@CANCEL">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
</panel>
<panel margin="15,3,1,8" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@anchorname|:" text_align="right" width="50"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="name" width="165" />
</panel>
</panel>
</groupbox>
<initialize>
<![CDATA[
self._rtenode=option.targetnode;
editor.LoadAnchors(function(group)
{
self.loadgroupcontent(group,container._content);
});
]]>
</initialize>
<jsml-ref name="linktree"/>
</panel>
<panel jsml-base="insertanchor_dialog" />
</jsml>

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="insertdate_dialog" dock="fill" margin="2" padding="2" overflow="visible">
<attach name="keydown" arguments="je,e">
if(e.keyCode==27)dialog.close();
</attach>
<initialize>
<![CDATA[
var d=new Date();
var arr=[];
arr.push(editor._config.command_insertdatetime())
arr.push(d.toString());
arr.push(d.toDateString());
arr.push(d.toGMTString());
arr.push(d.toLocaleString());
arr.push(d.toLocaleDateString());
arr.push(d.toLocaleTimeString());
arr.push(d.toTimeString());
for(var i=0;i<arr.length;i++)
{
var item=self.createitem(arr[i]);
self.append_child(item);
}
]]>
</initialize>
<method name="createitem">
var item=jsml.class_create_instance("rtemenuitem");
item.set_text(value);
item.attach_event("click",function()
{
editor.InsertHTML(value,true);
});
return item;
</method>
</panel>
<panel jsml-base="insertdate_dialog" />
</jsml>

View File

@@ -0,0 +1,406 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<include src="{folder}dialogs/browsedialogbase.xml?{timems}" />
<execute>
dialog.set_back_color("#F9F9F9");
dialog.set_title(editor.GetLangText("INSERTDOCUMENT"));
</execute>
<!-- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
class insertdocumentdialog
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -->
<panel jsml-class="insertdocumentdialog" jsml-base="browsedialogbase" dock="fill" margin="3">
<panel dock="top" height="210" margin="3" jsml-local="toparea">
<panel dock="left" border_width="1" border_color="#a0a0a0" border_style="solid" padding="1,0,1,1" width="355">
<!-- Items Header -->
<panel dock="top" height="21" back_color="#eeeeee" border_width="0,0,1,0" border_color="white">
<checkbox dock="left" jsml-local="checkbox" width="20" padding="1,0,-1,0">
<attach name="change">
instance.checkallitems(self.get_checked());
</attach>
</checkbox>
<panel dock="left" width="1" back_color="white"/>
<image dock="left" width="19" overflow="none" src="{folder}images/refresh.gif" tooltip="@REFRESH" padding="1,-1,-1,1" jsml-base="imagebutton">
<attach name="click">
instance.call_reload(self);
</attach>
</image>
<label dock="right" width="17" border_width="0,0,0,1" border_color="white" />
<label dock="right" width="21" border_width="0,0,0,1" border_color="white" />
<panel dock="right" width="59" border_width="0,0,0,1" border_color="white">
<label dock="left" width="42" text="Size" padding="-2,0,2,1" tooltip="click to sort" vertical_align="middle" horizontal_align="right" cursor="pointer" >
<initialize>
self._content.style.textDecoration="underline";
</initialize>
<attach name="click">
instance.toggle_sort("Size");
</attach>
</label>
<image dock="left" width="16" jsml-local="sortsizeicon" vertical_align="middle" opacity="0" overflow="none" />
</panel>
<panel dock="left" width="30" overflow_x="visible" border_width="0,0,0,1" border_color="white" >
<label dock="left" width="15" text="Name" padding="-2,0,2,1" tooltip="click to sort" vertical_align="middle" cursor="pointer" overflow_x="visible" >
<initialize>
self._content.style.textDecoration="underline";
</initialize>
<attach name="click">
instance.toggle_sort("Name");
</attach>
</label>
<image dock="left" width="16" jsml-local="sortnameicon" vertical_align="middle" opacity="0" overflow="none" />
</panel>
</panel>
<!-- Items List -->
<panel jsml-base="scrollitemspanel" dock="fill" jsml-local="itemspanel" back_color="white">
</panel>
<label dock="fill" jsml-local="noitemlabel" visible="false" text="@empty" vertical_align="middle" horizontal_align="center">
</label>
<panel dock="over" visible="false" jsml-local="loadingmask">
<image dock="fill" vertical_align="middle" horizontal_align="center" src="{folder}images/loading5.gif" />
<panel dock="over" opacity="10" back_color="gray" jsml-enable="0"></panel>
</panel>
</panel>
<panel dock="fill" border_width="1,1,1,0" border_color="#a0a0a0" border_style="solid" back_color="white">
<!-- Preview previewframe -->
<htmlcontrol jsml-local="previewframe" dock="fill" zoom="out" margin="3">
<attach name="resize">
<![CDATA[
var iframe=self._content.firstChild;
if(!iframe||iframe.nodeName!="IFRAME")return;
iframe.style.width=self.get_client_width()+"px";
iframe.style.height=self.get_client_height()+"px";
]]>
</attach>
<attach name="disposing">
self._content.innerHTML="";
</attach>
</htmlcontrol>
</panel>
</panel>
<panel dock="bottom" margin="3" padding="6" overflow="visible">
<panel dock="right" margin="3" overflow="visible">
<initialize>
if(!option.nestedmode)self.set_visible(false);
</initialize>
<button dock="left" width="82" height="24" text="@CLOSE">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
<panel dock="right" margin="3" overflow="visible">
<initialize>
if(option.nestedmode)self.set_visible(false);
</initialize>
<button dock="left" width="82" height="24" text="@OK" margin="0,12,0,0">
<initialize>
if(option.oktext)self.set_text(option.oktext);
</initialize>
<attach name="click">
if(!option.targetnode.GetAttribute("href"))return;
dialog.result=true;
dialog.close();
</attach>
</button>
<button dock="left" width="82" height="24" text="@CANCEL">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
</panel>
<groupbox dock="left" text="@ATTRIBUTES" overflow="visible">
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@ATTR_TARGET|:" text_align="right" width="50"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:target" width="80">
<listitem value="" text="@NOTSET" />
<listitem value="_blank" text="@ATTR_TARGETBLANK" />
<listitem value="_parent" text="@ATTR_TARGETPARENT" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@COLOR|:" width="50" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropcolorbox" propname="style:color" width="80" />
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="ID:" text_align="right" width="50"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="id" width="80"/>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@CSSCLASS|:" text_align="right" width="50"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="class" width="80"/>
</panel>
</groupbox>
<groupbox dock="fill" text="@INSERT" overflow="visible">
<panel margin="7,3,1,3" height="18" dock="top" >
<label dock="left" vertical_align="middle" text="@URL|:" text_align="right" width="50"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="href" width="500" jsml-local="tbhref" />
</panel>
<panel margin="7,3,1,3" height="18" dock="top" >
<label dock="left" vertical_align="middle" text_align="right" width="50" text="@CURSOR|:"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:cursor">
<listitem value="" text="@NOTSET" />
<listitem value="auto" text="auto" />
<listitem value="pointer" text="pointer" />
<listitem value="default" text="default" />
<listitem value="text" text="text" />
<listitem value="wait" text="wait" />
<listitem value="move" text="move" />
<listitem value="help" text="help" />
<listitem value="crosshair" text="crosshair" />
<listitem value="progress" text="progress" />
<listitem value="e-resize" text="e-resize" />
<listitem value="n-resize" text="n-resize" />
<listitem value="ne-resize" text="ne-resize" />
<listitem value="nw-resize" text="nw-resize" />
<listitem value="s-resize" text="s-resize" />
<listitem value="se-resize" text="se-resize" />
<listitem value="sw-resize" text="sw-resize" />
<listitem value="w-resize" text="w-resize" />
</panel>
<panel dock="left" width="8" />
<label dock="left" vertical_align="middle" text="@ACCESSKEY|:" text_align="right" width="50"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="accesskey" width="60"/>
<panel dock="left" width="8" />
<label dock="left" vertical_align="middle" text="@TABINDEX|:" text_align="right" width="50"/>
<panel jsml-base="rteproptextbox" dock="left" propname="tabindex" width="60"/>
<panel dock="left" width="8" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="rel" truestring="nofollow" falsestring="" jsml-local="cbnofollow" />
<label dock="left" vertical_align="middle" width="32" text="@NOFOLLOW" unselectable="true">
<attach name="click,dblclick">
cbnofollow.toggle_checked();
</attach>
</label>
</panel>
<panel margin="7,3,1,3" height="18" dock="top" >
<label dock="left" vertical_align="middle" text="@LINKTEXT|:" text_align="right" width="50"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="text" width="500" jsml-local="tbtext">
<method name="get_node_value">
var node=self.find_node();
return node.GetInnerText();
</method>
<method name="set_node_value">
var node=self.find_node();
node.SetInnerText(value);
</method>
<attach name="change">
instance.stopsynctext();
</attach>
</panel>
</panel>
<panel margin="7,3,8,3" height="18" dock="top" >
<label dock="left" vertical_align="middle" text="@TOOLTIP|:" text_align="right" width="50"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="title" width="500" />
</panel>
</groupbox>
<!-- # # # # # # # # # # # # # # # #
dialog code
# # # # # # # # # # # # # # # # -->
<initialize>
setTimeout(self.delegate(self.initsynctext),100);
</initialize>
<method name="stopsynctext">
self.initsynctext();
</method>
<method name="initsynctext">
<![CDATA[
self._synctotext=false;
var text=tbtext.get_ctrl_value();
if(text==editor._config.default_link_text)
self._synctotext=true;
else if(text==option.targetnode.GetAttribute("href"))
self._synctotext=true;
]]>
</method>
<method name="syncurltotext">
<![CDATA[
if(!self._synctotext)return;
option.targetnode.SetInnerText(option.targetnode.GetAttribute("href")||"")
tbtext.invoke_event("loadvalue");
]]>
</method>
<method name="setisloading">
loadingmask.set_visible(value);
</method>
<attach name="updateui_itemcount">
noitemlabel.set_visible(self.itemcount==0);
</attach>
<attach name="updateui_itemscheck">
<![CDATA[
itemspanel.foreach_slot(function(ctrl)
{
ctrl.update_check();
});
]]>
</attach>
<method name="clearitemcontrols">
itemspanel.reset_items();
</method>
<method name="additemcontrols" arguments="arr">
<![CDATA[
itemspanel.add_items(arr,function(item)
{
var ctrl;
if(item.IsFolder)
ctrl=jsml.class_create_instance("browserdialogfolder");
else
ctrl=jsml.class_create_instance("browserdialogfile");
ctrl.bind_item(item,self);
return ctrl;
});
]]>
</method>
<initialize>
<![CDATA[
self._category="Document";
self._getoption={GetSize:true,GetTime:true};
self._rtenode=option.targetnode;
if(option.targetnode.GetNameLower()=="area")
{
/// aprops.set_visible(false);
}
self.change_folder("/");
]]>
</initialize>
<method name="select_file">
<![CDATA[
var src=self._folderitem.UrlPrefix+self._currdir+value.Name;
tbhref.set_text(src);
self.do_preview(src);
self.syncurltotext();
//tbwidth.set_text("");
//tbheight.set_text("");
]]>
</method>
<method name="do_preview" arguments="src">
<![CDATA[
if(!src||src=='http://')
{
previewframe._content.innerHTML="";
return;
}
var url=editor.GetPlayerUrl()+"?type=document&backcolor=white&autoplay=1&file="+encodeURIComponent(src)
var w=previewframe.get_client_width()+"px";
var h=previewframe.get_client_height()+"px";
previewframe._content.innerHTML="<iframe src='"+jsml.html_encode(url)+"' style='width:"+w+";height:"+h+"' frameborder='0'></iframe>";
]]>
</method>
<initialize>
<![CDATA[
var img=option.targetnode;
var w=parseInt(img.GetStyle("width")||img.GetAttribute("width"));
var h=parseInt(img.GetStyle("height")||img.GetAttribute("height"));
if(w&&h)
{
self._lastwidth=w;
self._lastheight=h;
}
]]>
</initialize>
<method name="onpreviewload" arguments="w,h">
self._lastwidth=w;
self._lastheight=h;
if(!tbwidth.get_text())tbwidth.set_text(w+"px");
if(!tbheight.get_text())tbheight.set_text(h+"px");
</method>
<method name="onwidthchange">
<![CDATA[
option.targetnode.RemoveAttribute("width");
if(self._dimunlocked||!self._lastwidth||!self._lastheight)return;
var w=parseInt(tbwidth.get_ctrl_value());
if(!w)
{
tbheight.set_text("");
return;
}
var h=Math.floor(w*self._lastheight/self._lastwidth);
tbheight.set_text(h+"px");
]]>
</method>
<method name="onheightchange">
<![CDATA[
option.targetnode.RemoveAttribute("height");
if(self._dimunlocked||!self._lastwidth||!self._lastheight)return;
var h=parseInt(tbheight.get_ctrl_value());
if(!h)
{
tbwidth.set_text("");
return;
}
var w=Math.floor(h*self._lastwidth/self._lastheight);
tbwidth.set_text(w+"px");
]]>
</method>
<attach name="updateui_sort">
<![CDATA[
if(self._sortmode=="Name")
{
sortnameicon.set_opacity(100);
sortnameicon.set_src("{folder}images/arrow_"+(self._sortdesc?"down":"up")+".gif");
}
else
{
sortnameicon.set_opacity(0);
}
if(self._sortmode=="Size")
{
sortsizeicon.set_opacity(100);
sortsizeicon.set_src("{folder}images/arrow_"+(self._sortdesc?"down":"up")+".gif");
}
else
{
sortsizeicon.set_opacity(0);
}
]]>
</attach>
</panel>
<panel jsml-base="insertdocumentdialog" />
</jsml>

View File

@@ -0,0 +1,295 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<include src="{folder}dialogs/browsedialogbase.xml?{timems}" />
<execute>
dialog.set_back_color("#F9F9F9");
dialog.set_title(editor.GetLangText("INSERTGALLERY"));
</execute>
<!-- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
class insertgalleryrow/insertgalleryfolder/insertgalleryfile
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -->
<panel jsml-class="insertgalleryrow" height="84" padding="3,3,0,3">
<jsml-ref name="browsedialogoncontextmenu"/>
</panel>
<panel jsml-class="insertgalleryfolder" jsml-base="insertgalleryrow" cursor="pointer">
<panel dock="fill" jsml-local="panel" border_width="1" border_color="transparent">
<panel dock="bottom" height="20" margin="0,2,0,2">
<checkbox dock="left" jsml-local="checkbox" opacity="3" width="20" padding="1,0,-1,0">
<attach name="change">
instance._item.IsChecked=self.get_checked();
</attach>
</checkbox>
<image dock="right" width="20" jsml-local="editbtn" opacity="3" jsml-base="imagebutton" src="{folder}images/edit.gif" padding="2" overflow="none">
<attach name="click">
option.dialogcontrol.startedititem(instance._item,instance);
</attach>
</image>
<label dock="fill" jsml-local="lname" vertical_align="middle" horizontal_align="center" cursor="pointer">
<attach name="click">
option.dialogcontrol.select_item(instance._item);
</attach>
</label>
</panel>
<label dock="bottom" jsml-local="lsize" vertical_align="middle" text_align="center" visible="false" />
<image dock="fill" jsml-local="theicon" src="{folder}images/folder.png" vertical_align="middle" horizontal_align="center" margin="2" padding="2">
<attach name="click">
option.dialogcontrol.select_item(instance._item);
</attach>
</image>
</panel>
<attach name="mousehover">
checkbox.set_opacity(100);
editbtn.set_opacity(100);
panel.set_back_color('#eeeeee');
panel.set_border_color('#CCCCEE');
</attach>
<attach name="mouseleave">
if(!checkbox.get_checked())checkbox.set_opacity(3);
editbtn.set_opacity(3);
panel.set_back_color('');
panel.set_border_color('transparent');
</attach>
<method name="update_check">
if(self._item)checkbox.set_checked(!!self._item.IsChecked);
if(checkbox.get_checked())checkbox.set_opacity(100);
</method>
<method name="bind_item">
<![CDATA[
self._item=value;
checkbox.set_checked(!!value.IsChecked);
if(checkbox.get_checked())checkbox.set_opacity(100);
lsize.set_text(String(value.Size));
lname.set_text(value.Name);
if(value.Name=="..")
{
checkbox.set_visible(false);
editbtn.set_visible(false);
theicon.set_src("{folder}images/folder_up.png");
}
self.set_tooltip(value.Name+" , "+editor.GetLangText("numitems",value.Size));
]]>
</method>
</panel>
<image jsml-class="insertgalleryicon">
<initialize>
self._content.style.border='solid 1px #dddddd';
self._content.style.padding='2px';
</initialize>
<method name="get_demand_content_width" overrideas="image_gdcw">
var cv=self.image_gdcw();
return cv+12;
</method>
<method name="get_demand_content_height" overrideas="image_gdch">
var cv=self.image_gdch();
return cv+12;
</method>
</image>
<panel jsml-class="insertgalleryfile" jsml-base="insertgalleryrow" cursor="pointer">
<panel dock="fill" jsml-local="panel" border_width="1" border_color="transparent">
<panel dock="bottom" height="20" margin="0,2,0,2">
<checkbox dock="left" jsml-local="checkbox" opacity="3" width="20" padding="1,0,-1,0">
<attach name="change">
instance._item.IsChecked=self.get_checked();
</attach>
</checkbox>
<image dock="right" width="20" jsml-local="editbtn" opacity="3" jsml-base="imagebutton" src="{folder}images/edit.gif" padding="2" overflow="none">
<attach name="click">
option.dialogcontrol.startedititem(instance._item,instance);
</attach>
</image>
<label dock="fill" jsml-local="lname" vertical_align="middle" horizontal_align="center" cursor="pointer">
<attach name="click">
option.dialogcontrol.select_item(instance._item,true);
dialog.result=true;
dialog.close();
</attach>
</label>
</panel>
<image dock="fill" jsml-local="theicon" jsml-base="insertgalleryicon" zoom="out" vertical_align="middle" horizontal_align="center" margin="3,0,0,0">
<attach name="click">
option.dialogcontrol.select_item(instance._item,true);
dialog.result=true;
dialog.close();
</attach>
</image>
</panel>
<attach name="mousehover">
checkbox.set_opacity(100);
editbtn.set_opacity(100);
panel.set_back_color('#EEEEEE');
panel.set_border_color('#CCCCEE');
</attach>
<attach name="mouseleave">
if(!checkbox.get_checked())checkbox.set_opacity(3);
editbtn.set_opacity(3);
panel.set_back_color('');
panel.set_border_color('transparent');
</attach>
<method name="update_check">
if(self._item)checkbox.set_checked(!!self._item.IsChecked);
if(checkbox.get_checked())checkbox.set_opacity(100);
</method>
<method name="bind_item" arguments="value,inst">
<![CDATA[
var MAX_STRING_LENGTH=9
self._item=value;
checkbox.set_checked(!!value.IsChecked);
if(checkbox.get_checked())checkbox.set_opacity(100);
var src=value.Thumbnail;
if(value.Thumbnail)
src=inst._folderitem.UrlPrefix+inst._currdir+value.Thumbnail;
else
src=inst._folderitem.UrlPrefix+inst._currdir+value.Name;
theicon.set_src(src);
var str=value.Name;
var len=0;
for(var i=0;i<str.length;i++)
{
len++;
if(str.charCodeAt(i)>256)
len++;
if(len>MAX_STRING_LENGTH&&i+2<str.length)
{
//lname.set_tooltip(str);
str=str.substring(0,i)+"..";
break;
}
}
lname.set_text(str);
var text=editor.GetLangText("NAME")+": "+self._item.Name+"\r\n"+editor.GetLangText("SIZE")+": "+jsml.format_size(self._item.Size);
if(self._item.Width&&self._item.Height)
text+="\r\n"+editor.GetLangText("DIMENSIONS")+": "+self._item.Width+" x "+self._item.Height;
if(self._item.Time)
{
var date=new Date(self._item.Time)
var dval=date.getFullYear()*10000+(date.getMonth()+1)*100+date.getDate();
dval=dval*1000000+date.getHours()*10000+date.getMinutes()*100+date.getSeconds();
var dstr=String(dval).replace(/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/,"$1-$2-$3 $4:$5")
text+="\r\n"+editor.GetLangText("DATECREATED")+": "+dstr;
}
if(true)
self.itemtooltiptext=text;
else
self.set_tooltip(text);
]]>
</method>
<jsml-ref name="browsedialogitemtooltip"/>
</panel>
<!-- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
class insertgallerydialog
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -->
<panel jsml-class="insertgallerydialog" jsml-base="browsedialogbase" dock="fill" margin="3">
<panel dock="fill" margin="6" back_color="white" border_width="1" border_color="#EFEFEF">
<!-- Items List -->
<panel jsml-local="itemspanel" jsml-base="scrollitemspanel" dock="fill" itemwidth="120" itemheight="84">
</panel>
<label dock="fill" jsml-local="noitemlabel" visible="false" text="@empty" vertical_align="middle" horizontal_align="center">
</label>
<panel dock="over" visible="false" jsml-local="loadingmask">
<image dock="fill" vertical_align="middle" horizontal_align="center" src="{folder}images/loading5.gif" />
<panel dock="over" opacity="10" back_color="gray" jsml-enable="0"></panel>
</panel>
</panel>
<!-- # # # # # # # # # # # # # # # #
dialog code
# # # # # # # # # # # # # # # # -->
<method name="setisloading">
loadingmask.set_visible(value);
</method>
<attach name="updateui_itemcount">
noitemlabel.set_visible(self.itemcount==0);
</attach>
<attach name="updateui_itemscheck">
<![CDATA[
itemspanel.foreach_slot(function(ctrl)
{
ctrl.update_check();
});
]]>
</attach>
<method name="clearitemcontrols">
itemspanel.reset_items();
</method>
<method name="additemcontrols" arguments="arr">
<![CDATA[
itemspanel.add_items(arr,function(item)
{
var ctrl;
if(item.IsFolder)
ctrl=jsml.class_create_instance("insertgalleryfolder");
else
ctrl=jsml.class_create_instance("insertgalleryfile");
ctrl.bind_item(item,self);
return ctrl;
});
]]>
</method>
<initialize>
<![CDATA[
self._category="Gallery";
self._getoption={GetSize:true,GetTime:true,GetDimensions:true,GetThumbnails:true};
self._sortmode="Name";
self._sortdesc=false;
self.change_folder("/");
]]>
</initialize>
<method name="select_file">
<![CDATA[
var src=self._folderitem.UrlPrefix+self._currdir+value.Name;
var imgobj=option.targetnode;
imgobj.SetAttribute("src",src);
]]>
</method>
</panel>
<panel jsml-base="insertgallerydialog">
</panel>
</jsml>

View File

@@ -0,0 +1,505 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<include src="{folder}dialogs/browsedialogbase.xml?{timems}" />
<execute>
dialog.set_back_color("#F9F9F9");
dialog.set_title(editor.GetLangText("INSERTIMAGE"));
</execute>
<!-- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
class insertimagedialog
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -->
<panel jsml-class="insertimagedialog" jsml-base="browsedialogbase" dock="fill" margin="3">
<panel dock="top" height="210" margin="3" jsml-local="toparea">
<panel dock="left" border_width="1" border_color="#a0a0a0" border_style="solid" padding="1,0,1,1" width="355">
<!-- Items Header -->
<panel dock="top" height="21" back_color="#eeeeee" border_width="0,0,1,0" border_color="white">
<checkbox dock="left" jsml-local="checkbox" width="20" padding="1,0,-1,0">
<attach name="change">
instance.checkallitems(self.get_checked());
</attach>
</checkbox>
<panel dock="left" width="1" back_color="white"/>
<image dock="left" width="19" overflow="none" src="{folder}images/refresh.gif" tooltip="@REFRESH" padding="1,-1,-1,1" jsml-base="imagebutton">
<attach name="click">
instance.call_reload(self);
</attach>
</image>
<label dock="right" width="17" border_width="0,0,0,1" border_color="white" />
<label dock="right" width="21" border_width="0,0,0,1" border_color="white" />
<panel dock="right" width="59" border_width="0,0,0,1" border_color="white">
<label dock="left" width="42" text="Size" padding="-2,0,2,1" tooltip="click to sort" vertical_align="middle" horizontal_align="right" cursor="pointer" >
<initialize>
self._content.style.textDecoration="underline";
</initialize>
<attach name="click">
instance.toggle_sort("Size");
</attach>
</label>
<image dock="left" width="16" jsml-local="sortsizeicon" vertical_align="middle" opacity="0" overflow="none" />
</panel>
<panel dock="left" width="30" overflow_x="visible" border_width="0,0,0,1" border_color="white" >
<label dock="left" width="15" text="Name" padding="-2,0,2,1" tooltip="click to sort" vertical_align="middle" cursor="pointer" overflow_x="visible" >
<initialize>
self._content.style.textDecoration="underline";
</initialize>
<attach name="click">
instance.toggle_sort("Name");
</attach>
</label>
<image dock="left" width="16" jsml-local="sortnameicon" vertical_align="middle" opacity="0" overflow="none" />
</panel>
</panel>
<!-- Items List -->
<panel jsml-base="scrollitemspanel" dock="fill" jsml-local="itemspanel" back_color="white">
</panel>
<label dock="fill" jsml-local="noitemlabel" visible="false" text="@empty" vertical_align="middle" horizontal_align="center">
</label>
<panel dock="over" visible="false" jsml-local="loadingmask">
<image dock="fill" vertical_align="middle" horizontal_align="center" src="{folder}images/loading5.gif" />
<panel dock="over" opacity="10" back_color="gray" jsml-enable="0"></panel>
</panel>
</panel>
<panel dock="fill" border_width="1,1,1,0" border_color="#a0a0a0" border_style="solid" back_color="white">
<!-- Preview -->
<image jsml-local="imagepreview" dock="fill" zoom="out" margin="3" vertical_align="middle" horizontal_align="center">
<attach name="load">
var w=self.get_demand_content_width();
var h=self.get_demand_content_height();
instance.onpreviewload(w,h);
</attach>
</image>
<label jsml-local="labelsize" dock="bottom" vertical_align="bottom" text_align="right" margin="2,5,2,2"/>
</panel>
</panel>
<panel dock="bottom" margin="3" padding="6" overflow="visible">
<panel dock="right" margin="3" overflow="visible">
<initialize>
if(!option.nestedmode)self.set_visible(false);
</initialize>
<button dock="left" width="82" height="24" text="@CLOSE">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
<panel dock="right" margin="3" overflow="visible">
<initialize>
if(option.nestedmode)self.set_visible(false);
</initialize>
<button dock="left" width="82" height="24" text="@OK" margin="0,12,0,0">
<initialize>
if(option.oktext)self.set_text(option.oktext);
</initialize>
<attach name="click">
if(!option.targetnode.GetAttribute("src"))return;
if(option.targetnode.GetAttribute("alt")==null)
option.targetnode.SetAttribute("alt","");
dialog.result=true;
dialog.close();
</attach>
</button>
<button dock="left" width="82" height="24" text="@CANCEL">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
</panel>
<groupbox dock="left" text="@LAYOUT" overflow="visible">
<panel dock="top" overflow="visible">
<panel dock="left" overflow="visible">
<panel dock="top" margin="2" padding="2" height="22">
<label dock="left" width="60" text="@WIDTH|:" vertical_align="middle" text_align="right" />
<panel jsml-base="rtepropunitbox" jsml-local="tbwidth" dock="left" propname="style:width" border_width="1" border_color="#cccccc">
<attach name="change">
instance.onwidthchange();
</attach>
</panel>
</panel>
<panel dock="top" margin="2" padding="2" height="22">
<label dock="left" width="60" text="@HEIGHT|:" vertical_align="middle" text_align="right" />
<panel jsml-base="rtepropunitbox" jsml-local="tbheight" dock="left" propname="style:height" border_width="1" border_color="#cccccc">
<attach name="change">
instance.onheightchange();
</attach>
</panel>
</panel>
</panel>
<panel dock="fill" width="25" vertical_align="middle">
<image src="{folder}images/locked.gif" cursor="pointer">
<attach name="click">
instance._dimunlocked=!instance._dimunlocked;
self.set_src(instance._dimunlocked?"{folder}images/unlocked.gif":"{folder}images/locked.gif");
</attach>
</image>
</panel>
</panel>
<panel dock="top" margin="2" overflow="visible">
<label dock="left" width="60" text="@FLOAT|:" vertical_align="middle" text_align="right" />
<panel jsml-base="rtebtngroup_float" dock="top" />
</panel>
<panel dock="top" margin="2" padding="2" height="22">
<label dock="left" width="60" text="@ALIGNMENT|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="85" jsml-base="rtepropdropdown" propname="align">
<listitem value="" text="@NOTSET" />
<listitem value="left" text="@LEFT" />
<listitem value="right" text="@RIGHT" />
</panel>
</panel>
<panel dock="top" margin="2" padding="2" height="22">
<label dock="left" width="60" text="@MARGIN|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="60" jsml-base="rtepropnumupdown" propname="style:margin" suffix="px" />
<image dock="left" width="20" cursor="pointer" src="{folder}images/box.png">
<attach name="click">
marginfloatbox._rtenode=option.targetnode;
marginfloatbox.invoke_recursive("editor_ready",editor);
marginfloatbox._estyle.zIndex=editor._config.dialog_zindex;
marginfloatbox.show({control:self,stopDispose:true});
</attach>
</image>
<attach name="disposing">
marginfloatbox.dispose();
</attach>
<panel jsml-base="floatbox" jsml-local="marginfloatbox" jsml-append="false" height="180" padding="18">
<panel dock="bottom" margin="5">
<button text="@RESET" right="0">
<attach name="click">
option.targetnode.SetStyle("margin-left",null);
option.targetnode.SetStyle("margin-right",null);
option.targetnode.SetStyle("margin-top",null);
option.targetnode.SetStyle("margin-bottom",null);
marginfloatbox.invoke_recursive("loadvalue");
</attach>
</button>
</panel>
<panel dock="left" overflow="visible" vertical_align="middle">
<panel overflow_x="visible" height="20">
<label dock="left" width="1" overflow="visible" text="@LEFT|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:margin-left" suffix="px" />
</panel>
</panel>
<panel dock="right" overflow="visible" vertical_align="middle">
<panel overflow_x="visible" height="20">
<label dock="left" width="60" text="@RIGHT|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:margin-right" suffix="px" />
</panel>
</panel>
<panel dock="top" overflow="visible" horizontal_align="center">
<panel overflow_x="visible" height="20">
<label dock="left" width="60" text="@TOP|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:margin-top" suffix="px" />
</panel>
</panel>
<panel dock="bottom" overflow="visible" horizontal_align="center">
<panel overflow_x="visible" height="20">
<label dock="left" width="60" text="@BOTTOM|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:margin-bottom" suffix="px" />
</panel>
</panel>
</panel>
</panel>
</groupbox>
<groupbox dock="fill" text="@INSERT" overflow="visible">
<panel dock="top" margin="2" padding="2" height="22">
<label dock="left" width="85" text="@URL|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="550" jsml-base="rteproptextbox" propname="src" jsml-local="rtb_src">
<attach name="attach_dom,change,loadvalue">
instance.do_preview(self.get_text());
</attach>
</panel>
</panel>
<panel dock="top" margin="2" padding="2" height="22">
<label dock="left" width="85" text="@ATTR_ALT|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="170" jsml-base="rteproptextbox" propname="alt" nonull="true" />
<label dock="left" width="50" text="ID:" vertical_align="middle" text_align="right" />
<panel dock="left" width="80" jsml-base="rteproptextbox" propname="id" />
</panel>
<panel dock="top" margin="2" padding="2" height="22">
<label dock="left" width="85" text="@LONGDESC|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="300" jsml-base="rteproptextbox" propname="longdesc" />
<image dock="left" src="{folder}images/accessibility.gif" vertical_align="middle" margin="1,1,1,5" />
</panel>
<panel dock="top" margin="2" padding="2" height="22">
<label dock="left" width="85" text="@TOOLTIP|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="170" jsml-base="rteproptextbox" propname="title" />
<label dock="left" width="50" text="@CSSCLASS|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="80" jsml-base="rteproptextbox" propname="class" />
</panel>
<panel dock="top" margin="2" padding="2" height="22">
<label dock="left" width="85" text="@BORDER|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="60" jsml-base="rtepropnumupdown" propname="style:border-width" suffix="px" min_value="0">
<attach name="change">
<![CDATA[
var size=parseInt(self.get_text());
if(isNaN(size))
ddborderstyle.set_text("");
else if(size&&!ddborderstyle.get_text())
ddborderstyle.set_text("solid");
]]>
</attach>
</panel>
<image dock="left" width="20" cursor="pointer" src="{folder}images/box.png">
<attach name="click">
borderfloatbox._rtenode=option.targetnode;
borderfloatbox.invoke_recursive("editor_ready",editor);
borderfloatbox._estyle.zIndex=editor._config.dialog_zindex;
borderfloatbox.show({control:self,stopDispose:true});
</attach>
</image>
<attach name="disposing">
borderfloatbox.dispose();
</attach>
<panel jsml-base="floatbox" jsml-local="borderfloatbox" jsml-append="false" height="180" padding="18">
<panel dock="bottom" margin="5">
<button text="@RESET" right="0">
<attach name="click">
option.targetnode.SetStyle("border-left-width",null);
option.targetnode.SetStyle("border-right-width",null);
option.targetnode.SetStyle("border-top-width",null);
option.targetnode.SetStyle("border-bottom-width",null);
borderfloatbox.invoke_recursive("loadvalue");
</attach>
</button>
</panel>
<panel dock="left" overflow="visible" vertical_align="middle">
<panel overflow_x="visible" height="20">
<label dock="left" width="1" overflow="visible" text="@LEFT|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:border-left-width" suffix="px" />
</panel>
</panel>
<panel dock="right" overflow="visible" vertical_align="middle">
<panel overflow_x="visible" height="20">
<label dock="left" width="60" text="@RIGHT|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:border-right-width" suffix="px" />
</panel>
</panel>
<panel dock="top" overflow="visible" horizontal_align="center">
<panel overflow_x="visible" height="20">
<label dock="left" width="60" text="@TOP|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:border-top-width" suffix="px" />
</panel>
</panel>
<panel dock="bottom" overflow="visible" horizontal_align="center">
<panel overflow_x="visible" height="20">
<label dock="left" width="60" text="@BOTTOM|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:border-bottom-width" suffix="px" />
</panel>
</panel>
</panel>
<panel dock="left" width="72" jsml-base="rtepropcolorbox" propname="style:border-color" />
<panel dock="left" width="85" jsml-local="ddborderstyle" margin="0,0,0,4" jsml-base="rtepropdropdown" propname="style:border-style">
<listitem value="" text="@BORDER_NOTSET" />
<listitem value="solid" text="@BORDER_SOLID" />
<listitem value="dotted" text="@BORDER_DOTTED" />
<listitem value="dashed" text="@BORDER_DASHED" />
<listitem value="outset" text="@BORDER_OUTSET" />
<listitem value="inset" text="@BORDER_INSET" />
</panel>
</panel>
</groupbox>
<!-- # # # # # # # # # # # # # # # #
dialog code
# # # # # # # # # # # # # # # # -->
<method name="setisloading">
loadingmask.set_visible(value);
</method>
<attach name="updateui_itemcount">
noitemlabel.set_visible(self.itemcount==0);
</attach>
<attach name="updateui_itemscheck">
<![CDATA[
itemspanel.foreach_slot(function(ctrl)
{
ctrl.update_check();
});
]]>
</attach>
<method name="clearitemcontrols">
itemspanel.reset_items();
</method>
<method name="additemcontrols" arguments="arr">
<![CDATA[
itemspanel.add_items(arr,function(item)
{
var ctrl;
if(item.IsFolder)
ctrl=jsml.class_create_instance("browserdialogfolder");
else
ctrl=jsml.class_create_instance("browserdialogfile");
ctrl.bind_item(item,self);
return ctrl;
});
]]>
</method>
<initialize>
<![CDATA[
self._category="Image";
self._getoption={GetSize:true,GetTime:true,GetDimensions:true};
self._rtenode=option.targetnode;
self.change_folder("/");
]]>
</initialize>
<method name="select_file">
<![CDATA[
var src=self._folderitem.UrlPrefix+self._currdir+value.Name;
var imgobj=option.targetnode;
imgobj.SetAttribute("src",src);
rtb_src.invoke_event("loadvalue");
self.do_preview(src)
tbwidth.set_text("");
tbheight.set_text("");
]]>
</method>
<method name="do_preview" arguments="src">
imagepreview.set_src("");
imagepreview.set_src(src);
self._previewingsrc=src;
</method>
<attach name="repreview">
if(!self._previewingsrc)return;
option.targetnode.ResyncAttributeToView("src");
self.do_preview(self._previewingsrc);
</attach>
<initialize>
<![CDATA[
var img=option.targetnode;
var w=parseInt(img.GetStyle("width")||img.GetAttribute("width"));
var h=parseInt(img.GetStyle("height")||img.GetAttribute("height"));
if(w&&h)
{
self._lastwidth=w;
self._lastheight=h;
}
]]>
</initialize>
<method name="onpreviewload" arguments="w,h">
self._lastwidth=w;
self._lastheight=h;
labelsize.set_text(w+" x "+h);
//if(!tbwidth.get_text())tbwidth.set_text(w+"px");
//if(!tbheight.get_text())tbheight.set_text(h+"px");
</method>
<method name="onwidthchange">
<![CDATA[
option.targetnode.RemoveAttribute("width");
if(self._dimunlocked||!self._lastwidth||!self._lastheight)return;
var w=parseInt(tbwidth.get_ctrl_value());
if(!w)
{
tbheight.set_text("");
return;
}
var h=Math.floor(w*self._lastheight/self._lastwidth);
tbheight.set_text(h+"px");
]]>
</method>
<method name="onheightchange">
<![CDATA[
option.targetnode.RemoveAttribute("height");
if(self._dimunlocked||!self._lastwidth||!self._lastheight)return;
var h=parseInt(tbheight.get_ctrl_value());
if(!h)
{
tbwidth.set_text("");
return;
}
var w=Math.floor(h*self._lastwidth/self._lastheight);
tbwidth.set_text(w+"px");
]]>
</method>
<attach name="updateui_sort">
<![CDATA[
if(self._sortmode=="Name")
{
sortnameicon.set_opacity(100);
sortnameicon.set_src("{folder}images/arrow_"+(self._sortdesc?"down":"up")+".gif");
}
else
{
sortnameicon.set_opacity(0);
}
if(self._sortmode=="Size")
{
sortsizeicon.set_opacity(100);
sortsizeicon.set_src("{folder}images/arrow_"+(self._sortdesc?"down":"up")+".gif");
}
else
{
sortsizeicon.set_opacity(0);
}
]]>
</attach>
</panel>
<panel jsml-base="insertimagedialog" />
</jsml>

View File

@@ -0,0 +1,300 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<execute>
dialog.set_back_color("#F9F9F9");
dialog.set_title(editor.GetLangText("INSERTIMAGEMAP"));
</execute>
<panel jsml-class="insertimagemap_area" width="32" height="32">
<panel dock="top" jsml-local="resizet" height="2" back_color="blue" margin="0,2,0,0"/>
<panel dock="left" jsml-local="resizel" width="2" back_color="blue" margin="0,0,2,0"/>
<panel dock="right" width="6" cursor="e-resize" vertical_align="middle">
<panel dock="bottom" height="2" jsml-local="resizez" back_color="blue" margin="0,2,2,0" cursor="se-resize">
<attach name="mousedown" arguments="je,de">
de.cancel();
instance.resizearea(de,1,1);
</attach>
</panel>
<panel dock="left" back_color="yellow" opacity="50" width="2" />
<panel dock="fill" jsml-local="resizex" width="2" back_color="blue" margin="0,2,0,0" />
<image jsml-local="dotr" width="6" height="6" zoom="both" src="{folder}dialogs/images/dot_ring.png" overflow="none" />
<attach name="mousedown" arguments="je,de">
instance.resizearea(de,1,0);
</attach>
</panel>
<panel dock="bottom" height="6" cursor="n-resize" horizontal_align="center">
<panel dock="top" back_color="yellow" opacity="50" height="2" />
<panel dock="fill" jsml-local="resizey" back_color="blue" margin="0,0,2,0" />
<image jsml-local="dotb" width="6" height="6" zoom="both" src="{folder}dialogs/images/dot_ring.png" overflow="none" />
<attach name="mousedown" arguments="je,de">
instance.resizearea(de,0,1);
</attach>
</panel>
<panel dock="fill" back_color="yellow" opacity="50">
<attach name="mousedown" arguments="je,de">
<![CDATA[
de.cancel();
if(self.lastdowntime)
{
if(new Date().getTime()-self.lastdowntime<300)
{
self.bubble_event("dblclickarea",instance._area)
return;
}
}
instance.dialoginst.SelectHotSpot(instance._area);
instance.start_move_offset(de,function()
{
instance.updatecoords();
});
self.lastdowntime=new Date().getTime();
]]>
</attach>
</panel>
<initialize>
//self._estyle.boxShadow="2px 2px 2px #333333";
</initialize>
<property name="area">
<get>
return self._area;
</get>
<set>
self._area=value;
var coords=self._area.GetAttribute("coords")||"";
coords=coords.split(',');
var x1=parseInt(coords[0])||0;
var y1=parseInt(coords[1])||0;
var x2=parseInt(coords[2])||0;
var y2=parseInt(coords[3])||0;
self.set_left(x1);
self.set_top(y1);
self.set_width( (x2-x1)||32 );
self.set_height( (y2-y1)||32 );
self.set_offset_x(0);
self.set_offset_y(0);
</set>
</property>
<property name="selected">
<get>
return self._selected;
</get>
<set>
self._selected=value;
var color=value?"red":"blue";
self.set_border_color(color);
resizex.set_back_color(color);
resizey.set_back_color(color);
resizez.set_back_color(color);
resizet.set_back_color(color);
resizel.set_back_color(color);
</set>
</property>
<method name="updatecoords">
var x1=self.get_offset_x()+self.get_left();
var y1=self.get_offset_y()+self.get_top();
var x2=x1+self.get_width();
var y2=y1+self.get_height();
var coords=x1+","+y1+","+x2+","+y2;
self._area.SetAttribute("coords",coords);
</method>
<method name="resizearea" arguments="de,fr,fb">
<![CDATA[
self.start_resize(de,0,fr,fb,0,12,function()
{
self.updatecoords();
});
]]>
</method>
<attach name="mousehover">
var alt=self._area.GetAttribute("alt");
var url=self._area.GetAttribute("href");
var sb=[];
if(alt)sb.push(alt);
if(url)sb.push(url);
self.set_tooltip(sb.join("\r\n"));
</attach>
</panel>
<panel jsml-class="insertimagemap_dialog" dock="fill" overflow="visible" padding="5">
<panel dock="top" overflow="visible" text="@INSERTIMAGEMAP" width="180" jsml-local="mappanel">
<panel dock="top" margin="2" padding="2" height="24">
<label dock="left" width="80" text="@MAPNAME|:" vertical_align="middle" />
<panel dock="left" width="130" jsml-base="rteproptextbox" propname="name" />
<panel dock="left" width="15"/>
<image jsml-base="imagebutton" imagename="imagemap" tooltip="@ADDHOTSPOT" width="20" height="20" dock="left" margin="0,2,0,2">
<attach name="click">
instance.InsertHotSpot();
</attach>
</image>
<image jsml-base="imagebutton" imagename="link" jsml-local="btnedit" disabled="true" tooltip="@EDITHOTSPOT" width="20" height="20" dock="left" margin="0,2,0,2">
<attach name="click">
instance.ShowHotSpotDialog();
</attach>
</image>
<image jsml-base="imagebutton" imagename="delete" jsml-local="btndel" disabled="true" tooltip="@DELETEHOTSPOT" width="20" height="20" dock="left" margin="0,2,0,2">
<attach name="click">
instance.DeleteHotSpot();
</attach>
</image>
</panel>
</panel>
<panel dock="bottom" margin="3" padding="6" overflow="visible">
<panel dock="right" margin="3" overflow="visible">
<initialize>
if(!option.nestedmode)self.set_visible(false);
</initialize>
<button dock="left" width="82" height="24" text="@CLOSE">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
<panel dock="right" margin="3" overflow="visible">
<initialize>
if(option.nestedmode)self.set_visible(false);
</initialize>
<button dock="left" width="82" height="24" text="@OK" margin="0,12,0,0">
<initialize>
if(option.oktext)self.set_text(option.oktext);
</initialize>
<attach name="click">
var name=option.targetnode.GetAttribute("name");
if(!name)return;
var oldid=option.targetnode.GetAttribute("id");
if(oldid!=name)option.targetnode.SetAttribute("id",name);
option.targetimg.SetAttribute("usemap","#"+name);
dialog.result=true;
dialog.close();
</attach>
</button>
<button dock="left" width="82" height="24" text="@CANCEL">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
</panel>
<panel dock="fill">
<panel dock="fill" jsml-local="areapanel" overflow="scroll" margin="3" padding="3" border_width="1" border_style="inset">
<image zoom="none">
<initialize>
self.set_src(option.targetimg.GetAttribute("src"));
var w=parseInt(option.targetimg.GetStyle("width"));
var h=parseInt(option.targetimg.GetStyle("height"));
document.title=[w,h];
if(w)self.set_width(w);
if(h)self.set_height(h);
if(w||h)self.set_overflow("none");
</initialize>
</image>
</panel>
</panel>
<initialize>
<![CDATA[
mappanel._rtenode=option.targetnode;
var c=option.targetnode.GetChildCount();
for(var i=0;i<c;i++)
{
var child=option.targetnode.GetChildAt(i);
if(child.GetNameLower()!="area")
continue;
self.ShowHotSpot(child);
}
]]>
</initialize>
<method name="InsertHotSpot">
<![CDATA[
var area=new $rte.DataElement("area");
area.SetAttribute("shape","rect");
area.SetAttribute("coords","0,0,32,32");
option.targetnode.AppendChild(area);
self.ShowHotSpot(area);
self.SelectHotSpot(area);
self.ShowHotSpotDialog();
]]>
</method>
<attach name="dblclickarea">
self.ShowHotSpotDialog();
</attach>
<method name="ShowHotSpotDialog">
<![CDATA[
var tag=self._selectedarea;
if(!tag)return;
var newoption={width:430,height:170,targetnode:tag};
newoption.nestedmode=true;
editor.ShowXmlDialog(editor.BuildDialogUrl("insertimagemaplink.xml"),newoption);
]]>
</method>
<method name="ShowHotSpot">
<![CDATA[
var ctrl=jsml.class_create_instance("insertimagemap_area");
ctrl.dialoginst=self;
ctrl.set_area(value);
areapanel.append_child(ctrl);
]]>
</method>
<method name="SelectHotSpot" arguments="area">
<![CDATA[
self._selectedarea=area;
self.invoke_event("selectedareachanged");
//hotspotpanel._rtenode=area;
//hotspotpanel.set_visible(true);
//hotspotpanel.invoke_recursive("loadvalue");
for(var i=1;i<areapanel._childs.length;i++)
{
var ctrl=areapanel._childs[i];
if(ctrl.get_area()==area)
ctrl.set_selected(true);
else
ctrl.set_selected(false);
}
]]>
</method>
<method name="DeleteHotSpot">
<![CDATA[
if(!confirm(editor.GetLangText("confirm_deleteitem")))
return;
var area=self._selectedarea;
self._selectedarea=null;
self.invoke_event("selectedareachanged");
//hotspotpanel._rtenode=null;
//hotspotpanel.set_visible(false);
for(var i=1;i<areapanel._childs.length;i++)
{
var ctrl=areapanel._childs[i];
if(ctrl.get_area()==area)
{
ctrl.dispose();
break;
}
}
area.RemoveNode();
]]>
</method>
<attach name="selectedareachanged">
var v=!self._selectedarea;
btnedit.set_disabled(v);
btndel.set_disabled(v);
</attach>
</panel>
<panel jsml-base="insertimagemap_dialog" />
</jsml>

View File

@@ -0,0 +1,190 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<include src="{folder}dialogs/browsedialogbase.xml?{timems}" />
<execute>
dialog.set_back_color("#F9F9F9");
dialog.set_title(editor.GetLangText("HOTSPOT"));
</execute>
<!-- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
class insertimagemaplinkdialog
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -->
<panel jsml-class="insertimagemaplinkdialog" dock="fill" margin="3">
<panel dock="bottom" margin="3" padding="6" overflow="visible">
<panel dock="right" margin="3" overflow="visible">
<initialize>
if(!option.nestedmode)self.set_visible(false);
</initialize>
<button dock="left" width="82" height="24" text="@CLOSE">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
<panel dock="right" margin="3" overflow="visible">
<initialize>
if(option.nestedmode)self.set_visible(false);
</initialize>
<button dock="left" width="82" height="24" text="@OK" margin="0,12,0,0">
<initialize>
if(option.oktext)self.set_text(option.oktext);
</initialize>
<attach name="click">
if(!option.targetnode.GetAttribute("href"))return;
dialog.result=true;
dialog.close();
</attach>
</button>
<button dock="left" width="82" height="24" text="@CANCEL">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
</panel>
<groupbox text="@HOTSPOT" dock="top" overflow="visible" margin="3" padding="12,12,12,2">
<panel margin="7,3,1,3" height="18" dock="top" >
<label dock="left" vertical_align="middle" text="Url:" text_align="right" width="50"/>
<panel jsml-base="rteproptextbox" dock="left" propname="href" width="240" jsml-local="tbhref">
<attach name="change,loadvalue,attach_dom">
<![CDATA[
instance.syncurltotext();
var ddltext=ddltype.get_text();
var href=self.get_text();
if(ddltext&&href.substring(0,ddltext.length)==ddltext)return;
for(var i=0;i<ddltype._items.length;i++)
{
ddltext=ddltype._items[i].get_value();
if(href.substring(0,ddltext.length)!=ddltext)
continue;
ddltype.set_text(ddltext);
break;
}
]]>
</attach>
</panel>
<image jsml-base="imagebutton" dock="left" width="20" tooltip="@INTERNALLINK" src="{folder}images/node-tree.png" padding="-1,1,1,-1" margin="0,1,0,1">
<attach name="click">
instance.showfindurl(self);
</attach>
</image>
<panel dock="left" width="3" />
<button dock="left" width="82" height="24" text="@BROWSE|..">
<attach name="click">
instance.showuploadfile(self);
</attach>
</button>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@TYPE|:" text_align="right" width="50"/>
<dropdown dock="left" jsml-local="ddltype" border_color="#cccccc">
<attach name="change">
tbhref.set_text(self.get_text());
tbhref.invoke_event("change");
</attach>
<listitem text="http://" value="http://" />
<listitem text="https://" value="https://" />
<listitem text="news://" value="news://" />
<listitem text="ftp://" value="ftp://" />
<listitem text="mailto:" value="mailto:" />
<listitem text="@OTHER" value="" />
</dropdown>
<panel dock="left" width="12" />
<label dock="left" vertical_align="middle" text="@ATTR_TARGET|:" text_align="right" width="50"/>
<panel dock="left" jsml-base="rtepropdropdown" propname="style:target">
<listitem value="" text="@NOTSET" />
<listitem value="_blank" text="@ATTR_TARGETBLANK" />
<listitem value="_parent" text="@ATTR_TARGETPARENT" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top" >
<label dock="left" vertical_align="middle" text="@TOOLTIP|:" text_align="right" width="50"/>
<panel jsml-base="rteproptextbox" dock="left" propname="title" width="320" jsml-local="tbtext"/>
</panel>
</groupbox>
<!-- # # # # # # # # # # # # # # # #
dialog code
# # # # # # # # # # # # # # # # -->
<initialize>
<![CDATA[
self._rtenode=option.targetnode;
]]>
</initialize>
<initialize>
setTimeout(self.delegate(self.initsynctext),100);
</initialize>
<method name="stopsynctext">
self.initsynctext();
</method>
<method name="initsynctext">
<![CDATA[
self._synctotext=false;
var text=tbtext.get_ctrl_value();
if(!text||text==editor._config.default_link_text)
self._synctotext=true;
else if(text==option.targetnode.GetAttribute("href"))
self._synctotext=true;
]]>
</method>
<method name="syncurltotext">
<![CDATA[
if(!self._synctotext)return;
option.targetnode.SetAttribute("title",option.targetnode.GetAttribute("href")||"")
tbtext.invoke_event("loadvalue");
]]>
</method>
<method name="showfindurl" arguments="ctrl">
<![CDATA[
var newoption={};
newoption.control=ctrl
newoption.handlehref=function(href)
{
tbhref.set_text(href);
tbhref.invoke_event("change");
}
editor.ShowXmlFloatBox(editor.BuildDialogUrl("insertlink_findurl.xml"),newoption);
]]>
</method>
<method name="showuploadfile" arguments="anchor">
<![CDATA[
var newoption={width:640,height:420,targetnode:option.targetnode};
newoption.nestedmode=true;
newoption.callback=function()
{
self.invoke_recursive("loadvalue");
}
editor.ShowXmlDialog(editor.BuildDialogUrl("insertdocument.xml"),newoption);
]]>
</method>
</panel>
<panel jsml-base="insertimagemaplinkdialog" />
</jsml>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="insertlink_dialog" dock="fill" margin="12" padding="12" back_color="green" overflow="visible">
<label dock="fill" margin="30" back_color="white" text="insertlink.xml" font="Normal 29pt Arial" vertical_align="middle" horizontal_align="center" cursor="pointer">
<attach name="click">
<![CDATA[
editor.AppendHTML("<p>insertlink.xml ! <p>");
]]>
</attach>
</label>
<attach name="keydown" arguments="je,e">
if(e.keyCode==27)dialog.close();
</attach>
</panel>
<panel jsml-base="insertlink_dialog" />
</jsml>

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="insertlinkdropdown_dialog" dock="fill" overflow="visible">
<groupbox text="@internallink" dock="top" overflow="visible" margin="3">
<panel width="280" height="210" overflow="scroll">
<htmlcontrol jsml-local="container" dock="fill" margin="2" padding="4" overflow="visible">
</htmlcontrol>
</panel>
</groupbox>
<initialize>
<![CDATA[
editor.LoadLinks(function(group)
{
self.loadgroupcontent(group,container._content);
});
]]>
</initialize>
<jsml-ref name="linktree"/>
<attach name="clicklink" arguments="je,link">
<![CDATA[
var tag=new $rte.LinkElement("a");
tag.SetAttribute("href",link.href);
if(editor.GetSelectionType()=="Point")
{
tag.SetInnerText(link.href);
editor.InsertNode(tag);
editor.SelectContent(tag);
}
else
{
if(editor.SurroundNode(tag))
{
editor.RemoveInnerLink(tag);
editor.SelectContent(tag);
}
}
dialog.close();
]]>
</attach>
</panel>
<panel jsml-base="insertlinkdropdown_dialog" />
</jsml>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<execute>
dialog.set_title(editor.GetLangText("findanchor"));
</execute>
<panel jsml-class="insertlinkfindanchor_dialog" dock="fill" overflow="visible">
<panel dock="top" margin="6" width="244" height="120" overflow="scroll" border_style="solid" border_width="1" back_color="white" border_color="#cccccc">
<htmlcontrol jsml-local="container" dock="fill" margin="2" overflow="visible" css_class="jsml_button">
</htmlcontrol>
</panel>
<initialize>
<![CDATA[
editor.LoadAnchors(function(group)
{
self.loadgroupcontent(group,container._content);
});
]]>
</initialize>
<jsml-ref name="linktree"/>
<attach name="clicklink" arguments="je,link">
<![CDATA[
if(option.handlehref)
option.handlehref(link.href);
dialog.close();
]]>
</attach>
</panel>
<panel jsml-base="insertlinkfindanchor_dialog" />
</jsml>

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<execute>
dialog.set_title(editor.GetLangText("internallink"));
</execute>
<panel jsml-class="insertlinkfindurl_dialog" dock="fill" overflow="visible">
<groupbox text="@internallink" dock="top" overflow="visible" margin="3">
<panel width="280" height="210" overflow="scroll">
<htmlcontrol jsml-local="container" dock="fill" margin="2" padding="4" overflow="visible">
</htmlcontrol>
</panel>
</groupbox>
<initialize>
<![CDATA[
editor.LoadLinks(function(group)
{
self.loadgroupcontent(group,container._content);
});
]]>
</initialize>
<jsml-ref name="linktree"/>
<attach name="clicklink" arguments="je,link">
<![CDATA[
if(option.handlehref)
option.handlehref(link.href);
dialog.close();
]]>
</attach>
</panel>
<panel jsml-base="insertlinkfindurl_dialog" />
</jsml>

View File

@@ -0,0 +1,183 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="inserttabledialog_edittable" jsml-base="floatmenu">
<panel jsml-base="rtemenuitem" command="mergecells" imagename="mrgcell" htmlcode="@MERGECELLS" />
<panel jsml-base="rtemenuitem" command="splitcells" imagename="spltcell" htmlcode="@SPLITCELLS" />
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" command="deleterow" htmlcode="@DELETEROW" imagename="delrow" />
<panel jsml-base="rtemenuitem" command="deletecolumn" htmlcode="@DELETECOLUMN" imagename="delcol" />
<panel jsml-base="rtemenuitem" command="insertrowtop" htmlcode="@INSERTROWTOP" imagename="insrow_t" />
<panel jsml-base="rtemenuitem" command="insertrowbottom" htmlcode="@INSERTROWBOTTOM" imagename="insrow_b" />
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" command="insertcolumnleft" htmlcode="@INSERTCOLUMNLEFT" imagename="inscol_l" />
<panel jsml-base="rtemenuitem" command="insertcolumnright" htmlcode="@INSERTCOLUMNRIGHT" imagename="inscol_r" />
</panel>
<panel jsml-class="inserttabledialog" dock="fill" margin="3" padding="3" overflow="visible">
<htmlcontrol dock="top" background="transparent url({folder}dialogs/images/insert_table_bg1.png) no-repeat 1px 1px" height="160">
<initialize>
<![CDATA[
var t=document.createElement("TABLE");
for(var y=0;y<8;y++)
{
var row=t.insertRow(-1);
for(var x=0;x<10;x++)
{
var cell=row.insertCell(-1);
var cs=cell.style;
cs.width="10px";
cs.height="10px";
cs.cursor="pointer";
cs.fontSize="1px";
cell.setAttribute("rowy",y+1);
cell.setAttribute("cellx",x+1);
cell.innerHTML="&nbsp;";
}
}
t.border=0;
t.cellSpacing=3;
t.cellPadding=3;
t.style.height="153px";
self._content.appendChild(t);
self.table=t;
]]>
</initialize>
<method name="set_hovered_cells" arguments="mx,my">
<![CDATA[
self.county=my;
self.countx=mx;
var ts=self.table.style;
if(!ts.backgroundImage)
{
ts.backgroundImage="url({folder}dialogs/images/insert_table_bg2.png)";
ts.backgroundRepeat="no-repeat";
}
var x=mx*19-189
var y=my*19-151
ts.backgroundPosition=x+"px "+y+"px";
if(mx>0&&my>0)
{
self.table.rows[my-1].cells[mx-1].title=my+" x "+mx;
}
]]>
</method>
<attach name="mousemove" arguments="jevent,devent">
var src=devent.get_element();
if(src.nodeName!="TD")return;
var y=parseInt(src.getAttribute("rowy"));
var x=parseInt(src.getAttribute("cellx"));
if(!y||!x)return;
self.set_hovered_cells(x,y);
</attach>
<attach name="mousehover">
self._hovered=true;
</attach>
<attach name="mouseleave">
self._hovered=false;
setTimeout(function(){if(!self._hovered)self.set_hovered_cells(0,0);},1);
</attach>
<attach name="click">
<![CDATA[
if(self.county&&self.countx)
{
var table=editor.ParseHtmlCode(editor._config.default_code_table)[0];
var tbody=table.GetChildAt(0);
for(var y=0;y<self.county;y++)
{
var row=editor.ParseHtmlCode(editor._config.default_code_tr)[0];
(tbody||table).AppendChild(row);
for(var x=0;x<self.countx;x++)
{
var td=editor.ParseHtmlCode(editor._config.default_code_td)[0];
row.AppendChild(td);
}
}
dialog.close();
if(jsml.msie5678)
{
editor.InsertHTML(table.GetHtmlCode(),true);
}
else
{
editor.InsertNode(table);
editor.SelectControl(table);
if(jsml.msie)
{
setTimeout(function()
{
editor.Focus();
editor.SelectControl(table);
},200);
}
}
editor.Focus();
}
]]>
</attach>
</htmlcontrol>
<panel dock="top" overflow_y="visible">
<panel dock="left" width="96" overflow_x="none" jsml-base="rtemenuitem" border_width="1" text="@INSERTTABLE" command="inserttable" />
<panel dock="left" width="96" overflow_x="none" jsml-base="rtemenuitem" border_width="1" text="@TEMPLATE" command="inserttabletemplate" imagename="inserttable" />
</panel>
<panel jsml-base="rtemenuspliter" margin="3" />
<panel dock="top" overflow="visible" margin="3,0,3,0" padding="3">
<panel jsml-base="tbgroup_{skin}_{color}" dock="none">
<image jsml-base="image_{skin}_{color}" command="mergecells" tooltip="@MERGECELLS" imagename="mrgcell"/>
<image jsml-base="image_{skin}_{color}" command="splitcells" tooltip="@SPLITCELLS" imagename="spltcell" />
<image jsml-base="image_{skin}_{color}" command="insertrowtop" tooltip="@INSERTROWTOP" imagename="insrow_t"/>
<image jsml-base="image_{skin}_{color}" command="insertrowbottom" tooltip="@INSERTROWBOTTOM" imagename="insrow_b" />
<image jsml-base="image_{skin}_{color}" command="insertcolumnleft" tooltip="@INSERTCOLUMNLEFT" imagename="inscol_l"/>
<image jsml-base="image_{skin}_{color}" command="insertcolumnright" tooltip="@INSERTCOLUMNRIGHT" imagename="inscol_r"/>
<image jsml-base="image_{skin}_{color}" command="deleterow" tooltip="@DELETEROW" imagename="delrow"/>
<image jsml-base="image_{skin}_{color}" command="deletecolumn" tooltip="@DELETECOLUMN" imagename="delcol"/>
</panel>
</panel>
<!--
<panel jsml-base="rtemenuopener" menuclass="inserttabledialog_edittable" imagename="inserttable" text="@EDITTABLE">
<initialize>
var table=editor.IsIncludedByTag("table");
if(table==null)return self.set_disabled(true);
</initialize>
</panel>
<panel jsml-base="rtemenuitem" command="mergecells" imagename="mrgcell" htmlcode="@MERGECELLS" />
<panel jsml-base="rtemenuitem" command="splitcells" imagename="spltcell" htmlcode="@SPLITCELLS" />
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" command="deleterow" htmlcode="@DELETEROW" imagename="delrow" />
<panel jsml-base="rtemenuitem" command="deletecolumn" htmlcode="@DELETECOLUMN" imagename="delcol" />
<panel jsml-base="rtemenuitem" command="insertrowtop" htmlcode="@INSERTROWTOP" imagename="insrow_t" />
<panel jsml-base="rtemenuitem" command="insertrowbottom" htmlcode="@INSERTROWBOTTOM" imagename="insrow_b" />
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" command="insertcolumnleft" htmlcode="@INSERTCOLUMNLEFT" imagename="inscol_l" />
<panel jsml-base="rtemenuitem" command="insertcolumnright" htmlcode="@INSERTCOLUMNRIGHT" imagename="inscol_r" />
-->
<attach name="keydown" arguments="je,e">
if(e.keyCode==27)dialog.close();
</attach>
</panel>
<panel jsml-base="inserttabledialog" />
</jsml>

View File

@@ -0,0 +1,307 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<execute>
<![CDATA[
dialog.set_back_color("#F9F9F9");
dialog.set_title(editor.GetLangText("INSERTTABLE"));
dialog.tablearray=[];
dialog.tablearray.push({text:"Header",html:"<tr style='height:40px'><td>&nbsp;</td></tr><tr style='height:160px'><td>&nbsp;</td></tr>",preview:"<tr style='height:8px'><td>&nbsp;</td></tr><tr style='height:32px'><td>&nbsp;</td></tr>"});
dialog.tablearray.push({text:"Side",html:"<tr style='height:200px'><td style='width:20%'>&nbsp;</td><td style='width:80%'>&nbsp;</td></tr>",preview:"<tr><td style='width:8px;'>&nbsp;</td><td style='width:32px;'>&nbsp;</td></tr>"});
dialog.tablearray.push({text:"Footer",html:"<tr style='height:160px'><td>&nbsp;</td></tr><tr style='height:40px'><td>&nbsp;</td></tr>",preview:"<tr style='height:32px'><td>&nbsp;</td></tr><tr style='height:8px'><td>&nbsp;</td></tr>"});
dialog.tablearray.push({text:"Header and side",html:"<tr style='height:40px'><td colspan='2'>&nbsp;</td></tr><tr style='height:160px'><td style='width:20%'>&nbsp;</td><td style='width:80%'>&nbsp;</td></tr>",preview:"<tr style='height:8px'><td colspan='2'>&nbsp;</td></tr><tr style='32px'><td style='width:8px;'>&nbsp;</td><td style='width:32px;'>&nbsp;</td></tr>"});
dialog.tablearray.push({text:"Header and footer",html:"<tr style='height:40px'><td>&nbsp;</td></tr><tr style='height:120px'><td>&nbsp;</td></tr><tr style='height:40px'><td>&nbsp;</td></tr>",preview:"<tr style='height:8px'><td>&nbsp;</td></tr><tr style='height:24px'><td>&nbsp;</td></tr><tr style='height:8px'><td>&nbsp;</td>"});
dialog.tablearray.push({text:"Header, footer and side",html:"<tr style='height:40px'><td colspan='2'>&nbsp;</td></tr><tr style='height:120px'><td style='width:20%'>&nbsp;</td><td style='width:80%'>&nbsp;</td></tr><tr style='height:40px'><td colspan='2'>&nbsp;</td></tr>",preview:"<tr style='height:8px'><td colspan='2'>&nbsp;</td></tr><tr style='32px'><td style='width:8px;'>&nbsp;</td><td style='width:32px;'>&nbsp;</td></tr><tr style='height:8px'><td colspan='2'>&nbsp;</td></tr>"});
]]>
</execute>
<panel jsml-class="inserttabletemplateitem" dock="fill" height="42" cursor="pointer">
<htmlcontrol dock="left" jsml-local="hc" width="42" />
<label dock="fill" jsml-local="label" vertical_align="middle" cursor="pointer" margin="0,0,0,5" />
<method name="bind">
<![CDATA[
self.itemdata=value;
label.set_text(value.text);
hc._content.innerHTML="<table style='width:40px;height:40px;border-collapse:collapse;font-size:1px;' border='1' cellspacing=0 cellpadding=0>"+value.preview+"</table>";
]]>
</method>
<attach name="click">
self.bubble_event("inserttabletemplateitemclicked",self.itemdata);
</attach>
</panel>
<panel jsml-class="inserttabletemplatepanel" dock="top" margin="5" overflow="visible">
<attach name="mousehover">
self.set_back_color('#eeeeee');
</attach>
<attach name="mouseleave">
self.set_back_color('');
</attach>
</panel>
<panel jsml-class="inserttabletemplatedialog" dock="fill">
<panel dock="bottom" margin="3" padding="6" overflow="visible">
<panel dock="right" margin="3" overflow="visible">
<initialize>
if(!option.nestedmode)self.set_visible(false);
</initialize>
<button dock="left" width="82" height="24" text="@CLOSE">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
<panel dock="right" margin="3" overflow="visible">
<initialize>
if(option.nestedmode)self.set_visible(false);
</initialize>
<button dock="left" width="82" height="24" text="@OK" margin="0,12,0,0">
<initialize>
if(option.oktext)self.set_text(option.oktext);
</initialize>
<attach name="click">
dialog.result=true;
dialog.close();
</attach>
</button>
<button dock="left" width="82" height="24" text="@CANCEL">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
</panel>
<groupbox text="@TEMPLATE" dock="top" overflow="visible" margin="3">
<panel dock="left" width="65">
<label text="@TEMPLATE" dock="fill" vertical_align="middle" text_align="center" />
</panel>
<panel jsml-local="itempanel" height="52" dock="left" width="245" padding="5" margin="5" back_color="white" border_style="inset" border_width="1" overflow="visible">
<panel jsml-local="itembox" jsml-base="floatbox" jsml-append="false">
<initialize>
<![CDATA[
for(var i=0;i<dialog.tablearray.length;i++)
{
var data=dialog.tablearray[i];
var item=jsml.class_create_instance("inserttabletemplateitem");
item.bind(data);
var panel=jsml.class_create_instance("inserttabletemplatepanel");
panel.append_child(item);
self.append_child(panel);
}
]]>
</initialize>
<attach name="inserttabletemplateitemclicked" arguments="je,data">
self.close();
itempanel.loaddata(data);
</attach>
</panel>
<attach name="disposing">
itembox.dispose();
</attach>
<attach name="click">
itembox._element.style.zIndex=editor._config.dialog_zindex+1;
itembox.set_min_width(self.get_current_width());
itembox.show({control:self,stopDispose:true});
</attach>
<method name="loaddata" arguments="data">
<![CDATA[
self.dispose_children();
var item=jsml.class_create_instance("inserttabletemplateitem");
item.bind(data);
self.append_child(item);
var nodes=editor.ParseHtmlCode(data.html);
var table=option.targetnode;
var count=table.GetChildCount();
for(var i=count-1;i>=0;i--)
{
var child=table.GetChildAt(i);
switch(child.GetNameLower())
{
case "tbody":
case "thead":
case "tfoot":
case "tr":
child.RemoveNode(true);
break;
}
}
for(var i=0;i<nodes.length;i++)
table.AppendChild(nodes[i]);
]]>
</method>
<initialize>
self.loaddata(dialog.tablearray[0]);
</initialize>
</panel>
</groupbox>
<groupbox text="@LAYOUT" dock="top" overflow="visible" margin="3">
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" width="70" text="@CELLSPACING|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="4" />
<panel dock="left" width="65" jsml-base="rtepropnumupdown" propname="cellspacing" min_value="0" />
<panel dock="left" width="25" />
<checkbox dock="left" jsml-local="cbusewidth" checked="1">
<attach name="change">
<![CDATA[
tbwidth.set_node_value(self.get_checked()?tbwidth.get_text():"");
tbwidth.set_disabled(!self.get_checked());
]]>
</attach>
</checkbox>
<label dock="left" vertical_align="middle" width="45" text="@WIDTH|:" unselectable="true">
<attach name="click,dblclick">
cbusewidth.set_checked(!cbusewidth.get_checked());
</attach>
</label>
<panel jsml-base="rtepropunitbox" jsml-local="tbwidth" width="65" dock="left" propname="style:width" />
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" width="70" text="@CELLPADDING|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="4" />
<panel dock="left" width="65" jsml-base="rtepropnumupdown" propname="cellpadding" min_value="0" />
<panel dock="left" width="25" />
<checkbox dock="left" jsml-local="cbuseheight" checked="1">
<attach name="change">
<![CDATA[
tbheight.set_node_value(self.get_checked()?tbheight.get_text():"");
tbheight.set_disabled(!self.get_checked());
]]>
</attach>
</checkbox>
<label dock="left" vertical_align="middle" width="45" text="@HEIGHT|:" unselectable="true">
<attach name="click,dblclick">
cbuseheight.set_checked(!cbuseheight.get_checked());
</attach>
</label>
<panel jsml-base="rtepropunitbox" width="65" jsml-local="tbheight" dock="left" propname="style:height" />
<initialize>
if(option.targetnode.GetAttribute("height"))return;
cbuseheight.set_checked(false);
tbheight.set_disabled(true);
</initialize>
</panel>
<panel margin="7,3,8,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@FLOAT|:" width="70" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" width="65" propname="style:float">
<listitem value="" text="@NOTSET" />
<listitem value="left" text="@LEFT" />
<listitem value="right" text="@RIGHT" />
<listitem value="right" text="@NONE" />
</panel>
<panel dock="left" width="30" />
<label dock="left" vertical_align="middle" text="@ALIGN|:" width="60"/>
<panel dock="left" jsml-base="rtepropdropdown" propname="rules" width="67">
<listitem value="" text="@NOTSET" />
<listitem value="left" text="@LEFT" />
<listitem value="center" text="@CENTER" />
<listitem value="right" text="@RIGHT" />
</panel>
<panel dock="left" width="25" />
<label dock="left" vertical_align="middle" text="@RULES|:" width="85"/>
<panel dock="left" jsml-base="rtepropdropdown" propname="rules">
<listitem value="" text="@NOTSET" />
<listitem value="all" text="all" />
<listitem value="rows" text="rows" />
<listitem value="cols" text="cols" />
<listitem value="none" text="none" />
</panel>
</panel>
</groupbox>
<groupbox text="@BORDER" dock="top" overflow="visible" margin="3">
<panel margin="7,3,8,3" height="18" dock="top">
<label dock="left" width="70" text="@SIZE|:" vertical_align="middle" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" width="65" jsml-base="rtepropnumupdown" propname="border" min_value="0" />
<panel dock="left" width="30" />
<label dock="left" vertical_align="middle" text="@COLOR|:" width="60"/>
<panel dock="left" jsml-base="rtepropcolorbox" propname="bordercolor" width="75" />
<panel dock="left" width="12" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="style:border-collapse" truestring="collapse" falsestring="" jsml-local="cbcollapse" />
<label dock="left" vertical_align="middle" width="32" text="@BORDERCOLLAPSE" unselectable="true">
<attach name="click,dblclick">
cbcollapse.toggle_checked();
</attach>
</label>
</panel>
</groupbox>
<groupbox text="@ATTRIBUTES" dock="top" overflow="visible" margin="3">
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@CSSCLASS|:" width="70" text_align="right"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="class" width="65" />
<panel dock="left" width="30" />
<label dock="left" vertical_align="middle" text="ID:" width="60"/>
<panel jsml-base="rteproptextbox" dock="left" propname="id" width="75" />
<panel dock="left" width="15" />
<label dock="left" vertical_align="middle" text="@BACKGROUNDCOLOR|:" width="85"/>
<panel dock="left" jsml-base="rtepropcolorbox" width="75" propname="style:background-color" />
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@CAPTION|:" width="70" text_align="right"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="title" width="340">
<method name="get_node_value">
<![CDATA[
var node=self.find_node();
for(var index=0;true;index++)
{
var child=node.GetChildAt(index);
if(!child)
break;
if(child.GetNameLower()!="caption")
continue;
return child.GetInnerText();
}
return "";
]]>
</method>
<method name="set_node_value">
<![CDATA[
var node=self.find_node();
for(var index=0;true;index++)
{
var child=node.GetChildAt(index);
if(!child)
break;
if(child.GetNameLower()!="caption")
continue;
if(value)
child.SetInnerText(value);
else
child.RemoveNode(true);
return;
}
var child=new $rte.ContainerElement("caption");
node.AppendChild(child);
child.SetInnerText(value);
]]>
</method>
</panel>
<image dock="left" src="{folder}images/accessibility.gif" vertical_align="middle" margin="1,1,1,5" />
</panel>
<panel margin="7,3,10,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@SUMMARY|:" width="70" text_align="right"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="summary" width="340" />
<image dock="left" src="{folder}images/accessibility.gif" vertical_align="middle" margin="1,1,1,5" />
</panel>
</groupbox>
</panel>
<panel jsml-base="inserttabletemplatedialog">
<initialize>
self._rtenode=option.targetnode;
</initialize>
</panel>
</jsml>

View File

@@ -0,0 +1,282 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<include src="{folder}dialogs/browsedialogbase.xml?{timems}" />
<execute>
dialog.set_back_color("#F9F9F9");
dialog.set_title(editor.GetLangText("INSERTTEMPLATE"));
</execute>
<!-- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
class inserttemplatedialog
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -->
<panel jsml-class="inserttemplatedialog" jsml-base="browsedialogbase" dock="fill" margin="3">
<panel dock="bottom" margin="3" padding="6" overflow="visible">
<panel dock="right" margin="3" overflow="visible">
<initialize>
if(!option.nestedmode)self.set_visible(false);
</initialize>
<button dock="left" width="82" height="24" text="@CLOSE">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
<panel dock="right" margin="3" overflow="visible">
<initialize>
if(option.nestedmode)self.set_visible(false);
</initialize>
<button dock="left" width="82" height="24" text="@OK" margin="0,12,0,0">
<initialize>
if(option.oktext)self.set_text(option.oktext);
</initialize>
<attach name="click">
instance.loadselectedfile();
</attach>
</button>
<button dock="left" width="82" height="24" text="@CANCEL">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
</panel>
<panel dock="top" height="340" margin="3" jsml-local="toparea">
<panel dock="left" border_width="1" border_color="#a0a0a0" border_style="solid" padding="1,0,1,1" width="355">
<!-- Items Header -->
<panel dock="top" height="21" back_color="#eeeeee" border_width="0,0,1,0" border_color="white">
<checkbox dock="left" jsml-local="checkbox" width="20" padding="1,0,-1,0">
<attach name="change">
instance.checkallitems(self.get_checked());
</attach>
</checkbox>
<panel dock="left" width="1" back_color="white"/>
<image dock="left" width="19" overflow="none" src="{folder}images/refresh.gif" tooltip="@REFRESH" padding="1,-1,-1,1" jsml-base="imagebutton">
<attach name="click">
instance.call_reload(self);
</attach>
</image>
<label dock="right" width="17" border_width="0,0,0,1" border_color="white" />
<label dock="right" width="21" border_width="0,0,0,1" border_color="white" />
<panel dock="right" width="59" border_width="0,0,0,1" border_color="white">
<label dock="left" width="42" text="Size" padding="-2,0,2,1" tooltip="click to sort" vertical_align="middle" horizontal_align="right" cursor="pointer" >
<initialize>
self._content.style.textDecoration="underline";
</initialize>
<attach name="click">
instance.toggle_sort("Size");
</attach>
</label>
<image dock="left" width="16" jsml-local="sortsizeicon" vertical_align="middle" opacity="0" overflow="none" />
</panel>
<panel dock="left" width="30" overflow_x="visible" border_width="0,0,0,1" border_color="white" >
<label dock="left" width="15" text="Name" padding="-2,0,2,1" tooltip="click to sort" vertical_align="middle" cursor="pointer" overflow_x="visible" >
<initialize>
self._content.style.textDecoration="underline";
</initialize>
<attach name="click">
instance.toggle_sort("Name");
</attach>
</label>
<image dock="left" width="16" jsml-local="sortnameicon" vertical_align="middle" opacity="0" overflow="none" />
</panel>
</panel>
<!-- Items List -->
<panel jsml-base="scrollitemspanel" dock="fill" jsml-local="itemspanel" back_color="white">
</panel>
<label dock="fill" jsml-local="noitemlabel" visible="false" text="@empty" vertical_align="middle" horizontal_align="center">
</label>
<panel dock="over" visible="false" jsml-local="loadingmask">
<image dock="fill" vertical_align="middle" horizontal_align="center" src="{folder}images/loading5.gif" />
<panel dock="over" opacity="10" back_color="gray" jsml-enable="0"></panel>
</panel>
</panel>
<panel dock="fill" border_width="1,1,1,0" border_color="#a0a0a0" border_style="solid" back_color="white">
<!-- Preview previewframe -->
<htmlcontrol jsml-local="previewframe" dock="fill">
<attach name="resize">
<![CDATA[
var iframe=self._content.firstChild;
if(!iframe||iframe.nodeName!="IFRAME")return;
iframe.style.width=self.get_client_width()+"px";
iframe.style.height=self.get_client_height()+"px";
]]>
</attach>
<attach name="disposing">
self._content.innerHTML="";
</attach>
</htmlcontrol>
</panel>
</panel>
<!--
<panel dock="fill" margin="6" overflow="visible">
<panel jsml-base="panelbutton" overflow="visible">
<label text="Save current document to template" vertical_align="middle" dock="fill" margin="1,5,1,5"/>
</panel>
</panel>
-->
<!-- # # # # # # # # # # # # # # # #
dialog code
# # # # # # # # # # # # # # # # -->
<method name="setisloading">
loadingmask.set_visible(value);
</method>
<attach name="updateui_itemcount">
noitemlabel.set_visible(self.itemcount==0);
</attach>
<attach name="updateui_itemscheck">
<![CDATA[
itemspanel.foreach_slot(function(ctrl)
{
ctrl.update_check();
});
]]>
</attach>
<method name="clearitemcontrols">
itemspanel.reset_items();
</method>
<method name="additemcontrols" arguments="arr">
<![CDATA[
itemspanel.add_items(arr,function(item)
{
var ctrl;
if(item.IsFolder)
ctrl=jsml.class_create_instance("browserdialogfolder");
else
ctrl=jsml.class_create_instance("browserdialogfile");
ctrl.bind_item(item,self);
return ctrl;
});
]]>
</method>
<initialize>
<![CDATA[
self._category="Template";
self._getoption={GetSize:true,GetTime:true};
//self._rtenode=option.targetnode;
self.change_folder("/");
]]>
</initialize>
<method name="select_file">
<![CDATA[
var src=self._folderitem.UrlPrefix+self._currdir+value.Name;
self._selectedfile=value;
self.do_preview(src);
//tbwidth.set_text("");
//tbheight.set_text("");
]]>
</method>
<method name="do_preview" arguments="src">
<![CDATA[
if(!src||src=='http://')
{
previewframe._content.innerHTML="";
return;
}
var url=editor.GetPlayerUrl()+"?type=template&backcolor=white&autoplay=1&file="+encodeURIComponent(src)
var w=previewframe.get_client_width()+"px";
var h=previewframe.get_client_height()+"px";
previewframe._content.innerHTML="<iframe src='"+jsml.html_encode(url)+"' style='width:"+w+";height:"+h+"' frameborder='0'></iframe>";
]]>
</method>
<method name="onpreviewload" arguments="w,h">
</method>
<method name="onwidthchange">
<![CDATA[
]]>
</method>
<method name="onheightchange">
<![CDATA[
]]>
</method>
<attach name="updateui_sort">
<![CDATA[
if(self._sortmode=="Name")
{
sortnameicon.set_opacity(100);
sortnameicon.set_src("{folder}images/arrow_"+(self._sortdesc?"down":"up")+".gif");
}
else
{
sortnameicon.set_opacity(0);
}
if(self._sortmode=="Size")
{
sortsizeicon.set_opacity(100);
sortsizeicon.set_src("{folder}images/arrow_"+(self._sortdesc?"down":"up")+".gif");
}
else
{
sortsizeicon.set_opacity(0);
}
]]>
</attach>
<method name="handleloadtemplate" arguments="res">
<![CDATA[
if(res.Error)
{
self.reportError(res.Error.message);
return true;
}
var code=res.ReturnValue;
if(code)
{
var ns=self._selectedfile.Name.split('.');
var ext=ns.length>1?ns[ns.length-1]:"";
ext=ext.toLowerCase();
if(ext=="txt")
code=jsml.html_encode(code);
editor.InsertHTML(code=editor.FilterForPaste(code,"InsertTemplate"));
dialog.result=true;
dialog.close();
}
]]>
</method>
<method name="loadselectedfile">
<![CDATA[
if(!self._selectedfile)return;
var s=self._selectedstorage;
var folder={Category:s.Category,ID:s.ID,Name:s.Name,UrlPath:self._folderitem.UrlPath};
editor.CallAjax("AjaxLoadTemplate",self.delegate(self.handleloadtemplate),folder,self._selectedfile.Name);
]]>
</method>
</panel>
<panel jsml-base="inserttemplatedialog" />
</jsml>

View File

@@ -0,0 +1,143 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="inserttemplatedropdown_dialog" dock="fill" overflow="visible">
<groupbox text="@codesnippet" dock="top" overflow="visible" margin="3">
<panel width="280" height="210" overflow="scroll">
<htmlcontrol jsml-local="container" dock="fill" margin="2" padding="4" overflow="visible">
</htmlcontrol>
</panel>
</groupbox>
<initialize>
<![CDATA[
editor.LoadTemplates(function(group)
{
self.loadgroupcontent(group,container._content);
});
]]>
</initialize>
<method name="loadgroupcontent" arguments="group,element">
<![CDATA[
if(group.groups.length+group.templates.length==0)
{
element.style.paddingLeft="6px";
element.innerHTML="(Empty)";
return;
}
var table=document.createElement("TABLE");
table.cellSpacing=0;
table.cellPadding=0;
var cg1=document.createElement("COLGROUP");
cg1.style.width="16px";
table.appendChild(cg1);
for(var i=0;i<group.groups.length;i++)
{
self.templatetree_addgroup(group.groups[i],table);
}
for(var i=0;i<group.templates.length;i++)
{
self.templatetree_addtemplate(group.templates[i],table);
}
element.appendChild(table);
container.invoke_notify_content();
]]>
</method>
<method name="templatetree_addgroup" arguments="group,table">
<![CDATA[
var closedimg="<img src='{folder}dialogs/images/tree_closed.gif' style='width:13px;height:13px;'/>";
var openedimg="<img src='{folder}dialogs/images/tree_opened.gif' style='width:13px;height:13px;'/>";
var loaded=false;
var opened=false;
var row1=table.insertRow(-1);
var row2=table.insertRow(-1);
var td11=row1.insertCell(-1);
var td12=row1.insertCell(-1);
var td21=row2.insertCell(-1);
var td22=row2.insertCell(-1);
td11.style.cursor="pointer";
td11.style.verticalAlign="middle";
td11.style.fontSize="1px";
td11.style.lineHeight="1px";
td11.style.padding="0px";
td11.innerHTML=closedimg;
td12.className="rtelinktreegroup";
td12.innerHTML=jsml.html_encode(group.text);
row2.style.display='none';
function toggleit()
{
if(!loaded)
{
loaded=true;
self.loadgroupcontent(group,td22);
}
if(!opened)
{
row2.style.display='';
td11.innerHTML=openedimg;
opened=true;
}
else
{
row2.style.display='none';
td11.innerHTML=closedimg;
opened=false;
}
container.invoke_notify_content();
}
td11.onclick=toggleit;
td12.onclick=toggleit;
]]>
</method>
<method name="templatetree_addtemplate" arguments="template,table">
<![CDATA[
var row1=table.insertRow(-1);
var td11=row1.insertCell(-1);
var td12=row1.insertCell(-1);
td11.innerHTML="<img src='{folder}dialogs/images/document.gif' style='width:13px;height:13px;'/>"
td11.style.verticalAlign="middle";
td12.className="rtelinktreeitem";
td12.innerHTML=jsml.html_encode(template.text);
if(template.href)td12.setAttribute("title",template.href);
td12.onmouseover=new Function("","this.style.color='#0000FF'");
td12.onmouseout=new Function("","this.style.color=''");
td12.onclick=function()
{
self.invoke_event("clicktemplate",template);
}
]]>
</method>
<attach name="clicktemplate" arguments="je,template">
<![CDATA[
editor.InsertHTML(editor.FilterForPaste(template.code,"InsertTemplate"));
dialog.close();
]]>
</attach>
</panel>
<panel jsml-base="inserttemplatedropdown_dialog" />
</jsml>

View File

@@ -0,0 +1,654 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<include src="{folder}dialogs/browsedialogbase.xml?{timems}" />
<execute>
dialog.set_back_color("#F9F9F9");
dialog.set_title(editor.GetLangText("INSERTVIDEO"));
</execute>
<!-- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
class insertvideodialog
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -->
<panel jsml-class="insertvideodialog" jsml-base="browsedialogbase" dock="fill" margin="3">
<panel dock="top" height="210" margin="3" jsml-local="toparea">
<panel dock="left" border_width="1" border_color="#a0a0a0" border_style="solid" padding="1,0,1,1" width="355">
<!-- Items Header -->
<panel dock="top" height="21" back_color="#eeeeee" border_width="0,0,1,0" border_color="white">
<checkbox dock="left" jsml-local="checkbox" width="20" padding="1,0,-1,0">
<attach name="change">
instance.checkallitems(self.get_checked());
</attach>
</checkbox>
<panel dock="left" width="1" back_color="white"/>
<image dock="left" width="19" overflow="none" src="{folder}images/refresh.gif" tooltip="@REFRESH" padding="1,-1,-1,1" jsml-base="imagebutton">
<attach name="click">
instance.call_reload(self);
</attach>
</image>
<label dock="right" width="17" border_width="0,0,0,1" border_color="white" />
<label dock="right" width="21" border_width="0,0,0,1" border_color="white" />
<panel dock="right" width="59" border_width="0,0,0,1" border_color="white">
<label dock="left" width="42" text="Size" padding="-2,0,2,1" tooltip="click to sort" vertical_align="middle" horizontal_align="right" cursor="pointer" >
<initialize>
self._content.style.textDecoration="underline";
</initialize>
<attach name="click">
instance.toggle_sort("Size");
</attach>
</label>
<image dock="left" width="16" jsml-local="sortsizeicon" vertical_align="middle" opacity="0" overflow="none" />
</panel>
<panel dock="left" width="30" overflow_x="visible" border_width="0,0,0,1" border_color="white" >
<label dock="left" width="15" text="Name" padding="-2,0,2,1" tooltip="click to sort" vertical_align="middle" cursor="pointer" overflow_x="visible" >
<initialize>
self._content.style.textDecoration="underline";
</initialize>
<attach name="click">
instance.toggle_sort("Name");
</attach>
</label>
<image dock="left" width="16" jsml-local="sortnameicon" vertical_align="middle" opacity="0" overflow="none" />
</panel>
</panel>
<!-- Items List -->
<panel jsml-base="scrollitemspanel" dock="fill" jsml-local="itemspanel" back_color="white">
</panel>
<label dock="fill" jsml-local="noitemlabel" visible="false" text="@empty" vertical_align="middle" horizontal_align="center">
</label>
<panel dock="over" visible="false" jsml-local="loadingmask">
<image dock="fill" vertical_align="middle" horizontal_align="center" src="{folder}images/loading5.gif" />
<panel dock="over" opacity="10" back_color="gray" jsml-enable="0"></panel>
</panel>
</panel>
<panel dock="fill" border_width="1,1,1,0" border_color="#a0a0a0" border_style="solid" back_color="white">
<!-- Preview previewframe -->
<htmlcontrol jsml-local="previewframe" dock="fill">
<attach name="resize">
<![CDATA[
var iframe=self._content.firstChild;
if(!iframe||iframe.nodeName!="IFRAME")return;
iframe.style.width=self.get_client_width()+"px";
iframe.style.height=self.get_client_height()+"px";
]]>
</attach>
<attach name="disposing">
self._content.innerHTML="";
</attach>
</htmlcontrol>
</panel>
</panel>
<panel dock="bottom" margin="3" padding="6" overflow="visible">
<panel dock="right" margin="3" overflow="visible">
<initialize>
if(!option.nestedmode)self.set_visible(false);
</initialize>
<button dock="left" width="82" height="24" text="@CLOSE">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
<panel dock="right" margin="3" overflow="visible">
<initialize>
if(option.nestedmode)self.set_visible(false);
</initialize>
<button dock="left" width="82" height="24" text="@OK" margin="0,12,0,0">
<initialize>
if(option.oktext)self.set_text(option.oktext);
</initialize>
<attach name="click">
if(!option.targetnode.GetAttribute("src"))return;
dialog.result=true;
dialog.close();
</attach>
</button>
<button dock="left" width="82" height="24" text="@CANCEL">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
</panel>
<groupbox dock="left" text="@LAYOUT" overflow="visible">
<panel dock="top" overflow="visible">
<panel dock="left" overflow="visible">
<panel dock="top" margin="2" padding="2" height="22">
<label dock="left" width="60" text="@WIDTH|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="3" />
<panel jsml-base="rtepropunitbox" jsml-local="tbwidth" dock="left" propname="style:width" border_width="1" border_color="#cccccc">
<attach name="change">
instance.onwidthchange();
</attach>
</panel>
</panel>
<panel dock="top" margin="2" padding="2" height="22">
<label dock="left" width="60" text="@HEIGHT|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="3" />
<panel jsml-base="rtepropunitbox" jsml-local="tbheight" dock="left" propname="style:height" border_width="1" border_color="#cccccc">
<attach name="change">
instance.onheightchange();
</attach>
</panel>
</panel>
</panel>
<panel dock="fill" width="25" vertical_align="middle">
<image src="{folder}images/locked.gif" cursor="pointer">
<attach name="click">
instance._dimunlocked=!instance._dimunlocked;
self.set_src(instance._dimunlocked?"{folder}images/unlocked.gif":"{folder}images/locked.gif");
</attach>
</image>
</panel>
</panel>
<panel dock="top" margin="2" overflow="visible">
<label dock="left" width="60" text="@FLOAT|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="3" />
<panel jsml-base="rtebtngroup_float" dock="top" />
</panel>
<!--<panel dock="top" margin="2" padding="2" height="22">
<label dock="left" width="60" text="@ALIGNMENT|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="85" jsml-base="rtepropdropdown" propname="align">
<listitem value="" text="@NOTSET" />
<listitem value="left" text="@LEFT" />
<listitem value="right" text="@RIGHT" />
</panel>
</panel>-->
<panel dock="top" margin="2" overflow="visible">
<label dock="left" vertical_align="middle" width="62" text="@BACKCOLOR|:" text_align="right" unselectable="true" />
<panel dock="left" width="3" />
<panel dock="left" width="82" jsml-base="rtepropcolorbox" propname="backcolor" jsml-local="tbbackcolor">
<method name="get_node_value">
return rtb_src.findparam("backcolor");
</method>
<method name="set_node_value">
rtb_src.invoke_event("savevalue");
</method>
</panel>
</panel>
<panel dock="top" margin="2" padding="2" height="22">
<label dock="left" width="60" text="@MARGIN|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="3" />
<panel dock="left" width="60" jsml-base="rtepropnumupdown" propname="style:margin" suffix="px" />
<image dock="left" width="20" cursor="pointer" src="{folder}images/box.png">
<attach name="click">
marginfloatbox._rtenode=option.targetnode;
marginfloatbox.invoke_recursive("editor_ready",editor);
marginfloatbox._estyle.zIndex=editor._config.dialog_zindex;
marginfloatbox.show({control:self,stopDispose:true});
</attach>
</image>
<attach name="disposing">
marginfloatbox.dispose();
</attach>
<panel jsml-base="floatbox" jsml-local="marginfloatbox" jsml-append="false" height="180" padding="18">
<panel dock="bottom" margin="5">
<button text="@RESET" right="0">
<attach name="click">
option.targetnode.SetStyle("margin-left",null);
option.targetnode.SetStyle("margin-right",null);
option.targetnode.SetStyle("margin-top",null);
option.targetnode.SetStyle("margin-bottom",null);
marginfloatbox.invoke_recursive("loadvalue");
</attach>
</button>
</panel>
<panel dock="left" overflow="visible" vertical_align="middle">
<panel overflow_x="visible" height="20">
<label dock="left" width="1" overflow="visible" text="@LEFT|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:margin-left" suffix="px" />
</panel>
</panel>
<panel dock="right" overflow="visible" vertical_align="middle">
<panel overflow_x="visible" height="20">
<label dock="left" width="60" text="@RIGHT|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:margin-right" suffix="px" />
</panel>
</panel>
<panel dock="top" overflow="visible" horizontal_align="center">
<panel overflow_x="visible" height="20">
<label dock="left" width="60" text="@TOP|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:margin-top" suffix="px" />
</panel>
</panel>
<panel dock="bottom" overflow="visible" horizontal_align="center">
<panel overflow_x="visible" height="20">
<label dock="left" width="60" text="@BOTTOM|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:margin-bottom" suffix="px" />
</panel>
</panel>
</panel>
</panel>
</groupbox>
<groupbox dock="fill" text="@INSERT" overflow="visible">
<panel dock="top" margin="2" padding="2" height="22">
<label dock="left" width="52" text="@URL|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="3" />
<panel dock="left" width="550" jsml-base="rteproptextbox" propname="src" jsml-local="rtb_src">
<attach name="attach_dom,change,loadvalue,savevalue">
setTimeout(function()
{
instance.do_preview(self.get_node_value());
},100);
</attach>
<method name="findparam">
<![CDATA[
var src=self.find_node().GetAttribute("src")||""
var qs=(src.split('#')[0].split('?')[1]||"").split('&');
for(var i=0;i<qs.length;i++)
if(qs[i].split('=')[0]==value)
return decodeURIComponent(qs[i].substring(value.length+1));
]]>
</method>
<method name="get_node_value">
return self.findparam("file");
</method>
<method name="set_node_value">
self.find_node().SetAttribute("src",instance.calc_url(value||""));
</method>
</panel>
</panel>
<panel dock="top" margin="2" padding="2" height="22">
<panel dock="left" width="53" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="autoplay" truestring="1" falsestring="" jsml-local="cbautoplay">
<method name="get_node_value">
return rtb_src.findparam("autoplay");
</method>
<method name="set_node_value">
rtb_src.invoke_event("savevalue");
</method>
</panel>
<label dock="left" vertical_align="middle" width="70" text="@AUTOPLAY" unselectable="true">
<attach name="click,dblclick">
cbautoplay.toggle_checked();
cbautoplay.invoke_event("change");
</attach>
</label>
<panel dock="left" width="12" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="autoloop" truestring="1" falsestring="" jsml-local="cbautoloop">
<method name="get_node_value">
return rtb_src.findparam("autoloop");
</method>
<method name="set_node_value">
rtb_src.invoke_event("savevalue");
</method>
</panel>
<label dock="left" vertical_align="middle" width="70" text="@AUTOLOOP" unselectable="true">
<attach name="click,dblclick">
cbautoloop.toggle_checked();
cbautoloop.invoke_event("change");
</attach>
</label>
<panel dock="left" width="12" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="allowfullscreen" truestring="1" falsestring="" jsml-local="cballowfullscreen">
<method name="get_node_value">
return rtb_src.findparam("allowfullscreen");
</method>
<method name="set_node_value">
rtb_src.invoke_event("savevalue");
</method>
</panel>
<label dock="left" vertical_align="middle" width="70" text="@ALLOWFULLSCREEN" unselectable="true">
<attach name="click,dblclick">
cballowfullscreen.toggle_checked();
cballowfullscreen.invoke_event("change");
</attach>
</label>
</panel>
<panel dock="top" margin="2" padding="2" height="22">
<panel dock="left" width="53" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="allowmenu" truestring="1" falsestring="" jsml-local="cballowmenu">
<method name="get_node_value">
return rtb_src.findparam("allowmenu");
</method>
<method name="set_node_value">
rtb_src.invoke_event("savevalue");
</method>
</panel>
<label dock="left" vertical_align="middle" width="70" text="@ALLOWMENU" unselectable="true">
<attach name="click,dblclick">
cballowmenu.toggle_checked();
cballowmenu.invoke_event("change");
</attach>
</label>
<panel dock="left" width="12" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="showcontrols" truestring="1" falsestring="" jsml-local="cbshowcontrols">
<method name="get_node_value">
return rtb_src.findparam("showcontrols");
</method>
<method name="set_node_value">
rtb_src.invoke_event("savevalue");
</method>
</panel>
<label dock="left" vertical_align="middle" width="70" text="@SHOWCONTROLS" unselectable="true">
<attach name="click,dblclick">
cbshowcontrols.toggle_checked();
cbshowcontrols.invoke_event("change");
</attach>
</label>
<panel dock="left" width="12" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="transparency" truestring="1" falsestring="" jsml-local="cbtransparency">
<method name="get_node_value">
return rtb_src.findparam("transparency");
</method>
<method name="set_node_value">
rtb_src.invoke_event("savevalue");
</method>
</panel>
<label dock="left" vertical_align="middle" width="70" text="@TRANSPARENCY" unselectable="true">
<attach name="click,dblclick">
cbtransparency.toggle_checked();
cbtransparency.invoke_event("change");
</attach>
</label>
</panel>
<panel dock="top" margin="2" padding="2" height="22">
<label dock="left" width="52" text="@TOOLTIP|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="3" />
<panel dock="left" width="220" jsml-base="rteproptextbox" propname="title" />
<label dock="left" width="50" text="@CSSCLASS|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="3" />
<panel dock="left" width="80" jsml-base="rteproptextbox" propname="class" />
</panel>
<panel dock="top" margin="2" padding="2" height="22">
<label dock="left" width="52" text="@BORDER|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="3" />
<panel dock="left" width="60" jsml-base="rtepropnumupdown" propname="style:border-width" suffix="px" min_value="0">
<attach name="change">
<![CDATA[
var size=parseInt(self.get_text());
if(isNaN(size))
ddborderstyle.set_text("");
else if(size&&!ddborderstyle.get_text())
ddborderstyle.set_text("solid");
]]>
</attach>
</panel>
<image dock="left" width="20" cursor="pointer" src="{folder}images/box.png">
<attach name="click">
borderfloatbox._rtenode=option.targetnode;
borderfloatbox.invoke_recursive("editor_ready",editor);
borderfloatbox._estyle.zIndex=editor._config.dialog_zindex;
borderfloatbox.show({control:self,stopDispose:true});
</attach>
</image>
<attach name="disposing">
borderfloatbox.dispose();
</attach>
<panel jsml-base="floatbox" jsml-local="borderfloatbox" jsml-append="false" height="180" padding="18">
<panel dock="bottom" margin="5">
<button text="@RESET" right="0">
<attach name="click">
option.targetnode.SetStyle("border-left-width",null);
option.targetnode.SetStyle("border-right-width",null);
option.targetnode.SetStyle("border-top-width",null);
option.targetnode.SetStyle("border-bottom-width",null);
borderfloatbox.invoke_recursive("loadvalue");
</attach>
</button>
</panel>
<panel dock="left" overflow="visible" vertical_align="middle">
<panel overflow_x="visible" height="20">
<label dock="left" width="1" overflow="visible" text="@LEFT|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:border-left-width" suffix="px" />
</panel>
</panel>
<panel dock="right" overflow="visible" vertical_align="middle">
<panel overflow_x="visible" height="20">
<label dock="left" width="60" text="@RIGHT|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:border-right-width" suffix="px" />
</panel>
</panel>
<panel dock="top" overflow="visible" horizontal_align="center">
<panel overflow_x="visible" height="20">
<label dock="left" width="60" text="@TOP|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:border-top-width" suffix="px" />
</panel>
</panel>
<panel dock="bottom" overflow="visible" horizontal_align="center">
<panel overflow_x="visible" height="20">
<label dock="left" width="60" text="@BOTTOM|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:border-bottom-width" suffix="px" />
</panel>
</panel>
</panel>
<panel dock="left" width="72" jsml-base="rtepropcolorbox" propname="style:border-color" />
<panel dock="left" width="62" jsml-local="ddborderstyle" margin="0,0,0,4" jsml-base="rtepropdropdown" propname="style:border-style">
<listitem value="" text="@BORDER_NOTSET" />
<listitem value="solid" text="@BORDER_SOLID" />
<listitem value="dotted" text="@BORDER_DOTTED" />
<listitem value="dashed" text="@BORDER_DASHED" />
<listitem value="outset" text="@BORDER_OUTSET" />
<listitem value="inset" text="@BORDER_INSET" />
</panel>
<label dock="left" width="52" text="ID:" vertical_align="middle" text_align="right" />
<panel dock="left" width="3" />
<panel dock="left" width="80" jsml-base="rteproptextbox" propname="id" />
</panel>
</groupbox>
<!-- # # # # # # # # # # # # # # # #
dialog code
# # # # # # # # # # # # # # # # -->
<method name="calc_url" arguments="value">
<![CDATA[
var node=option.targetnode;
var src=node.GetAttribute("src")
var path;
var qs;
if(src)
{
var parts=src.split('#')[0].split('?');
path=parts[0];
qs=parts[1];
}
else
{
path=editor.GetPlayerUrl();
}
qs=(qs||("type="+instance._category.toLowerCase())).split('&');
var map={}
for(var i=0;i<qs.length;i++)
{
var pair=qs[i].split('=');
map[pair[0]]=pair[1];
}
if(editor._config.urltype=="absolute")
value=editor.MakeAbsoluteUrl(value,true);
map["file"]=encodeURIComponent(value);
map["autoplay"]=cbautoplay.get_ctrl_value();
map["autoloop"]=cbautoloop.get_ctrl_value();
map["allowmenu"]=cballowmenu.get_ctrl_value();
map["showcontrols"]=cbshowcontrols.get_ctrl_value();
map["transparency"]=cbtransparency.get_ctrl_value();
map["allowfullscreen"]=cballowfullscreen.get_ctrl_value();
map["backcolor"]=encodeURIComponent(tbbackcolor.get_ctrl_value());
qs=[];
for(var p in map)if(map[p])qs.push(p+"="+map[p]);
return path+"?"+qs.join("&");
]]>
</method>
<method name="setisloading">
loadingmask.set_visible(value);
</method>
<attach name="updateui_itemcount">
noitemlabel.set_visible(self.itemcount==0);
</attach>
<attach name="updateui_itemscheck">
<![CDATA[
itemspanel.foreach_slot(function(ctrl)
{
ctrl.update_check();
});
]]>
</attach>
<method name="clearitemcontrols">
itemspanel.reset_items();
</method>
<method name="additemcontrols" arguments="arr">
<![CDATA[
itemspanel.add_items(arr,function(item)
{
var ctrl;
if(item.IsFolder)
ctrl=jsml.class_create_instance("browserdialogfolder");
else
ctrl=jsml.class_create_instance("browserdialogfile");
ctrl.bind_item(item,self);
return ctrl;
});
]]>
</method>
<initialize>
<![CDATA[
self._category="Video";
self._getoption={GetSize:true,GetTime:true};
self._rtenode=option.targetnode;
self.change_folder("/");
]]>
</initialize>
<method name="select_file">
<![CDATA[
var src=self._folderitem.UrlPrefix+self._currdir+value.Name;
rtb_src.set_text(src);
self.do_preview(src);
//tbwidth.set_text("");
//tbheight.set_text("");
]]>
</method>
<method name="do_preview" arguments="src">
<![CDATA[
if(!src)
{
previewframe._content.innerHTML="";
return;
}
var tn=option.targetnode._cloneNode(true);
tn.SetAttribute("src",self.calc_url(src));
tn.SetStyle("width",previewframe.get_client_width()+"px");
tn.SetStyle("height",previewframe.get_client_height()+"px");
previewframe._content.innerHTML=tn.GetHtmlCode();
]]>
</method>
<initialize>
<![CDATA[
var img=option.targetnode;
var w=parseInt(img.GetStyle("width")||img.GetAttribute("width"));
var h=parseInt(img.GetStyle("height")||img.GetAttribute("height"));
if(w&&h)
{
self._lastwidth=w;
self._lastheight=h;
}
]]>
</initialize>
<method name="onpreviewload" arguments="w,h">
self._lastwidth=w;
self._lastheight=h;
if(!tbwidth.get_text())tbwidth.set_text(w+"px");
if(!tbheight.get_text())tbheight.set_text(h+"px");
</method>
<method name="onwidthchange">
<![CDATA[
option.targetnode.RemoveAttribute("width");
if(self._dimunlocked||!self._lastwidth||!self._lastheight)return;
var w=parseInt(tbwidth.get_ctrl_value());
if(!w)
{
tbheight.set_text("");
return;
}
var h=Math.floor(w*self._lastheight/self._lastwidth);
tbheight.set_text(h+"px");
]]>
</method>
<method name="onheightchange">
<![CDATA[
option.targetnode.RemoveAttribute("height");
if(self._dimunlocked||!self._lastwidth||!self._lastheight)return;
var h=parseInt(tbheight.get_ctrl_value());
if(!h)
{
tbwidth.set_text("");
return;
}
var w=Math.floor(h*self._lastwidth/self._lastheight);
tbwidth.set_text(w+"px");
]]>
</method>
<attach name="updateui_sort">
<![CDATA[
if(self._sortmode=="Name")
{
sortnameicon.set_opacity(100);
sortnameicon.set_src("{folder}images/arrow_"+(self._sortdesc?"down":"up")+".gif");
}
else
{
sortnameicon.set_opacity(0);
}
if(self._sortmode=="Size")
{
sortsizeicon.set_opacity(100);
sortsizeicon.set_src("{folder}images/arrow_"+(self._sortdesc?"down":"up")+".gif");
}
else
{
sortsizeicon.set_opacity(0);
}
]]>
</attach>
</panel>
<panel jsml-base="insertvideodialog" />
</jsml>

View File

@@ -0,0 +1,488 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="menu_context_common" jsml-base="floatmenu">
<panel jsml-base="rtemenuitem" command="selectall" imagename="selectall" htmlcode="@SELECTALL" />
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" command="undo" imagename="undo" htmlcode="@UNDO" />
<panel jsml-base="rtemenuitem" command="redo" imagename="redo" htmlcode="@REDO" />
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" command="save" imagename="save" htmlcode="@SAVE" />
<panel jsml-base="rtemenuitem" command="new" imagename="newdoc" htmlcode="@NEW" />
<panel jsml-base="rtemenuitem" command="print" imagename="print" htmlcode="@PRINT" />
<panel jsml-base="rtemenuitem" command="ExecPlugin" arguments="spellcheck" imagename="spell" htmlcode="@SPELLCHECK" />
<panel jsml-base="rtemenuitem" command="Find" imagename="Find" htmlcode="@FINDANDREPLACE" />
<panel jsml-base="rtemenuitem" command="CleanCode" imagename="cleanup" htmlcode="@CLEANCODE" />
</panel>
<panel jsml-class="menu_context_format" jsml-base="floatmenu">
<panel dock="top" margin="0,0,0,25" overflow="visible">
<panel jsml-base="tbgroup_{skin}_{color}" dock="none">
<image jsml-base="image_{skin}_{color}" command="bold" imagename="bold" tooltip="@BOLD" />
<image jsml-base="image_{skin}_{color}" command="italic" imagename="italic" tooltip="@ITALIC" />
<image jsml-base="image_{skin}_{color}" command="underline" imagename="under" tooltip="@UNDERLINE" />
<image jsml-base="image_{skin}_{color}" command="linethrough" imagename="strike" tooltip="@LINETHROUGH" />
<image jsml-base="image_{skin}_{color}" command="overline" imagename="overline" tooltip="@OVERLINE" />
</panel>
</panel>
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" htmlcode="@FONTNAME" arrow="true" xmlfile="setfontname.xml" />
<panel jsml-base="rtemenuitem" htmlcode="@FONTSIZE" arrow="true" xmlfile="setfontsize.xml" />
<panel jsml-base="rtemenuitem" htmlcode="@TEXTCOLOR" arrow="true" xmlfile="colorpicker.xml">
<method name="initoption" arguments="newoption">
newoption.setcolor=function(val){editor.ExecCommand("forecolor",val);}
</method>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@BACKCOLOR" arrow="true" xmlfile="colorpicker.xml">
<method name="initoption" arguments="newoption">
newoption.setcolor=function(val){editor.ExecCommand("backcolor",val);}
</method>
</panel>
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" command="removeformat" imagename="unformat" htmlcode="@REMOVEFORMAT" />
</panel>
<panel jsml-class="menu_context_justify" jsml-base="floatmenu">
<panel jsml-base="rtemenuitem" command="JustifyLeft" text="@JUSTIFYLEFT" imagename="left" />
<panel jsml-base="rtemenuitem" command="JustifyCenter" text="@JUSTIFYCENTER" imagename="center" />
<panel jsml-base="rtemenuitem" command="JustifyRight" text="@JUSTIFYRIGHT" imagename="right" />
<panel jsml-base="rtemenuitem" command="JustifyFull" text="@JUSTIFYFULL" imagename="justifyfull" />
<panel jsml-base="rtemenuitem" command="JustifyNone" text="@JUSTIFYNONE" imagename="justifynone" />
</panel>
<panel jsml-class="menu_context_paragraphs" jsml-base="floatmenu">
<panel dock="top" margin="0,0,0,25" overflow="visible">
<panel jsml-base="tbgroup_{skin}_{color}" dock="none">
<image jsml-base="image_{skin}_{color}" command="JustifyLeft" text="@JUSTIFYLEFT" imagename="left" />
<image jsml-base="image_{skin}_{color}" command="JustifyCenter" text="@JUSTIFYCENTER" imagename="center" />
<image jsml-base="image_{skin}_{color}" command="JustifyRight" text="@JUSTIFYRIGHT" imagename="right" />
<image jsml-base="image_{skin}_{color}" command="JustifyFull" text="@JUSTIFYFULL" imagename="justifyfull" />
<image jsml-base="image_{skin}_{color}" command="JustifyNone" text="@JUSTIFYNONE" imagename="justifynone" />
</panel>
</panel>
<!--
<panel jsml-base="rtemenuopener" menuclass="menu_context_justify" htmlcode="@JUSTIFY" />
-->
<!--
<panel dock="top" margin="0,0,0,25" overflow="visible">
<panel jsml-base="tbgroup_{skin}_{color}" dock="none">
<image jsml-base="image_{skin}_{color}" command="Outdent" tooltip="@OUTDENT" />
<image jsml-base="image_{skin}_{color}" command="Indent" tooltip="@INDENT" />
<image jsml-base="image_{skin}_{color}" command="InsertBlockQuote" tooltip="@INSERTBLOCKQUOTE" imagename="blockquote" />
<image jsml-base="image_{skin}_{color}" command="Ltr" imagename="dir_ltr" />
<image jsml-base="image_{skin}_{color}" command="Rtl" imagename="dir_rtl" />
</panel>
</panel>
-->
<panel jsml-base="rtemenuitem" command="InsertBlockQuote" text="@INSERTBLOCKQUOTE" imagename="blockquote" />
<panel jsml-base="rtemenuitem" command="Outdent" text="@OUTDENT" />
<panel jsml-base="rtemenuitem" command="Indent" text="@INDENT" />
<panel jsml-base="rtemenuitem" command="LTR" text="@DIRECTION_LTR" imagename="dir_ltr" />
<panel jsml-base="rtemenuitem" command="RTL" text="@DIRECTION_RTL" imagename="dir_rtl" />
<!--
<panel jsml-base="rtemenuitem" htmlcode="@PARAGRAPHS" arrow="true" xmlfile="setparagraph.xml" />
-->
</panel>
<panel jsml-class="menu_context_table" jsml-base="floatmenu">
<panel jsml-base="rtemenuitem" command="mergecells" imagename="mrgcell" htmlcode="@MERGECELLS" />
<panel jsml-base="rtemenuitem" command="splitcells" imagename="spltcell" htmlcode="@SPLITCELLS" />
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" command="deleterow" htmlcode="@DELETEROW" imagename="delrow" />
<panel jsml-base="rtemenuitem" command="deletecolumn" htmlcode="@DELETECOLUMN" imagename="delcol" />
<panel jsml-base="rtemenuitem" command="insertrowtop" htmlcode="@INSERTROWTOP" imagename="insrow_t" />
<panel jsml-base="rtemenuitem" command="insertrowbottom" htmlcode="@INSERTROWBOTTOM" imagename="insrow_b" />
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" command="insertcolumnleft" htmlcode="@INSERTCOLUMNLEFT" imagename="inscol_l" />
<panel jsml-base="rtemenuitem" command="insertcolumnright" htmlcode="@INSERTCOLUMNRIGHT" imagename="inscol_r" />
</panel>
<!--
<panel jsml-class="menu_context_link" jsml-base="floatmenu">
<panel jsml-base="rtemenuitem" imagename="link" htmlcode="@EDIT| |@LINK">
<attach name="click">
var link=editor.IsIncludedByTag("a");
if(link)editor.ShowPropertiesDialog(link);
</attach>
</panel>
<panel jsml-base="rtemenuitem" imagename="unlink" htmlcode="@REMOVE| |@LINK">
<attach name="click">
var link=editor.IsIncludedByTag("a");
if(link)link.RemoveNode(false);
</attach>
</panel>
</panel>
-->
<panel jsml-class="menu_context_taglist" jsml-base="floatmenu">
<initialize>
<![CDATA[
var node=editor.GetSelectionRoot();
for(;node&&node.GetNameLower()!="body";node=node.GetParent())
{
if(node.nodeType!=1)continue;
var item=self.createitem(node);
self.append_child(item);
}
]]>
</initialize>
<method name="createitem" arguments="node">
<![CDATA[
var item=jsml.class_create_instance("rtemenuitem");
item.set_arrow(true);
item.set_xmlfile("menu_tagitem.xml");
item._floatboxClass="floatmenu";
item.initoption=function(newoption)
{
newoption.node=node;
newoption.buttonClick=function()
{
item.invoke_event("click");
}
}
item.attach_event("click",function()
{
editor.ShowPropertiesDialog(node);
});
item.set_text(node.GetName());
return item;
]]>
</method>
</panel>
<panel jsml-class="menu_context_point" dock="fill" overflow="visible">
<panel jsml-base="rtemenuitem" command="selectall" imagename="selectall" htmlcode="@SELECTALL" />
<panel jsml-base="rtemenuitem" command="undo" imagename="undo" htmlcode="@UNDO" />
<panel jsml-base="rtemenuspliter" />
<!--
<panel jsml-base="rtemenuitem" command="paste" imagename="paste" htmlcode="@PASTE" />
-->
<panel jsml-base="rtemenuitem" htmlcode="@PASTE" imagename="paste" arrow="true" xmlfile="editor_paste.xml">
<initialize>
if(editor.GetSelectionType()=="Control")self.set_visible(false);
</initialize>
<method name="initoption" arguments="newoption">
this._lastpastecmd="paste";
newoption.command="paste";
newoption.width=360;
newoption.height=240;
newoption.puretextmode=false;
newoption.callback=editor.delegate(editor._onpastedialogreturn);
</method>
</panel>
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuopener" menuclass="menu_context_common" htmlcode="@COMMON" />
<panel jsml-base="rtemenuopener" menuclass="menu_context_paragraphs" htmlcode="@PARAGRAPHS">
<initialize>
//if(editor.GetSelectionType()=="Control")self.set_visible(false);
//if(!editor.QueryStyle("paragraph"))self.set_visible(false);
</initialize>
</panel>
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuopener" menuclass="menu_context_taglist" htmlcode="@TAGLIST">
<initialize>
<![CDATA[
var node=editor.GetSelectionRoot();
var count=0;
for(;node&&node.GetNameLower()!="body";node=node.GetParent())
{
if(node.nodeType==1)count++;
}
if(count==0)self.set_disabled(true);
]]>
</initialize>
</panel>
<panel jsml-base="rtemenuopener" menuclass="menu_context_table" htmlcode="@TABLE" imagename="inserttable">
<initialize>
var table=editor.IsIncludedByTag("table");
if(table==null)return self.set_visible(false);
</initialize>
</panel>
<!--
<panel jsml-base="rtemenuopener" menuclass="menu_context_link" htmlcode="@LINK" imagename="link">
<initialize>
var link=editor.IsIncludedByTag("a");
if(link==null)return self.set_visible(false);
</initialize>
<attach name="click">
var link=editor.IsIncludedByTag("a");
if(link)editor.ShowPropertiesDialog(link);
</attach>
</panel>
-->
<panel jsml-base="rtemenuitem" imagename="link" htmlcode="@EDIT| |@LINK">
<initialize>
var link=editor.IsIncludedByTag("a");
if(link==null)return self.set_visible(false);
</initialize>
<attach name="click">
var link=editor.IsIncludedByTag("a");
if(link)editor.ShowPropertiesDialog(link);
</attach>
</panel>
<panel jsml-base="rtemenuitem" imagename="unlink" htmlcode="@REMOVE| |@LINK">
<initialize>
var link=editor.IsIncludedByTag("a");
if(link==null)return self.set_visible(false);
</initialize>
<attach name="click">
var link=editor.IsIncludedByTag("a");
if(link)link.RemoveNode(false);
</attach>
</panel>
</panel>
<panel jsml-class="menu_context_range" dock="fill" overflow="visible">
<panel jsml-base="rtemenuitem" command="mergecells" imagename="mrgcell" htmlcode="@MERGECELLS">
<initialize>
if(!editor.CanExecCommand("mergecells"))self.set_visible(false);
</initialize>
</panel>
<panel jsml-base="rtemenuitem" command="cut" imagename="cut" htmlcode="@CUT">
<initialize>
if(editor.CanExecCommand("mergecells"))self.set_visible(false);
</initialize>
<attach name="mousehover">self._ResetFCButton();</attach>
</panel>
<panel jsml-base="rtemenuitem" command="copy" imagename="copy" htmlcode="@COPY">
<initialize>
if(editor.CanExecCommand("mergecells"))self.set_visible(false);
</initialize>
<attach name="mousehover">self._ResetFCButton();</attach>
</panel>
<panel jsml-base="rtemenuitem" command="delete" imagename="delete" htmlcode="@DELETE">
<initialize>
if(editor.CanExecCommand("mergecells"))self.set_visible(false);
</initialize>
</panel>
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" command="removeformat" imagename="unformat" htmlcode="@REMOVEFORMAT" />
<panel jsml-base="rtemenuspliter" />
<panel dock="top" margin="0,0,0,25" overflow="visible">
<panel jsml-base="tbgroup_{skin}_{color}" dock="none">
<image jsml-base="image_{skin}_{color}" command="bold" imagename="bold" tooltip="@BOLD" />
<image jsml-base="image_{skin}_{color}" command="italic" imagename="italic" tooltip="@ITALIC" />
<image jsml-base="image_{skin}_{color}" command="underline" imagename="under" tooltip="@UNDERLINE" />
<image jsml-base="image_{skin}_{color}" command="linethrough" imagename="strike" tooltip="@LINETHROUGH" />
<image jsml-base="image_{skin}_{color}" command="overline" imagename="overline" tooltip="@OVERLINE" />
</panel>
</panel>
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" htmlcode="@FONTNAME" arrow="true" xmlfile="setfontname.xml" />
<panel jsml-base="rtemenuitem" htmlcode="@FONTSIZE" arrow="true" xmlfile="setfontsize.xml" />
<panel jsml-base="rtemenuitem" htmlcode="@TEXTCOLOR" arrow="true" xmlfile="colorpicker.xml">
<method name="initoption" arguments="newoption">
newoption.setcolor=function(val){editor.ExecCommand("forecolor",val);}
</method>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@BACKCOLOR" arrow="true" xmlfile="colorpicker.xml">
<method name="initoption" arguments="newoption">
newoption.setcolor=function(val){editor.ExecCommand("backcolor",val);}
</method>
</panel>
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuopener" menuclass="menu_context_taglist" htmlcode="@TAGLIST">
<initialize>
<![CDATA[
var node=editor.GetSelectionRoot();
var count=0;
for(;node&&node.GetNameLower()!="body";node=node.GetParent())
{
if(node.nodeType==1)count++;
}
if(count==0)self.set_disabled(true);
]]>
</initialize>
</panel>
<panel jsml-base="rtemenuopener" menuclass="menu_context_table" htmlcode="@TABLE">
<initialize>
var table=editor.IsIncludedByTag("table");
if(table==null)return self.set_visible(false);
</initialize>
</panel>
</panel>
<panel jsml-class="menu_context_control" dock="fill" overflow="visible">
<panel jsml-base="rtemenuitem" command="cut" imagename="cut" htmlcode="@CUT">
<attach name="mousehover">self._ResetFCButton();</attach>
</panel>
<panel jsml-base="rtemenuitem" command="copy" imagename="copy" htmlcode="@COPY">
<attach name="mousehover">self._ResetFCButton();</attach>
</panel>
<panel jsml-base="rtemenuitem" command="delete" imagename="delete" htmlcode="@DELETE" />
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuopener" menuclass="menu_context_taglist" htmlcode="@TAGLIST">
<initialize>
<![CDATA[
var node=editor.GetSelectionRoot();
var count=0;
for(;node&&node.GetNameLower()!="body";node=node.GetParent())
{
if(node.nodeType==1)count++;
}
if(count==0)self.set_disabled(true);
]]>
</initialize>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@IMAGEEDITOR" imagename="imageeditor">
<initialize>
<![CDATA[
var node=editor.GetSelectionRoot();
if(!node||node.GetNameLower()!="img")self.set_visible(false);
self.set_disabled(true);
editor.FindStorage("Image",node.GetAttribute("src"),function(storage,fileitem)
{
if(!storage)return;
self.imgnode=node;
self.storage=storage;
self.fileitem=fileitem;
self.set_disabled(false);
});
]]>
</initialize>
<attach name="click">
if(!self.storage)return;
editor.ShowImageEditor(self.imgnode,self.storage,self.fileitem);
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@INSERTIMAGEMAP" imagename="imagemap">
<initialize>
<![CDATA[
var node=editor.GetSelectionRoot();
if(!node||node.GetNameLower()!="img")self.set_visible(false);
self.imgnode=node;
]]>
</initialize>
<attach name="click">
editor.ExecInsertImageMap(null,self.imgnode);
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@STYLES" imagename="properties">
<initialize>
<![CDATA[
var node=editor.GetSelectionRoot();
if(!node||!node.IsControl())
{
self.set_visible(false);
return;
}
self.set_arrow(true);
self.set_xmlfile("menu_styles.xml");
self._floatboxClass="floatmenu";
self.initoption=function(newoption)
{
newoption.node=node;
newoption.buttonClick=function()
{
self.invoke_event("click");
}
}
]]>
</initialize>
<attach name="click">
editor.ShowPropertiesDialog(editor.GetSelectionRoot(),{styletab:"text"})
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@PROPERTIES" imagename="properties">
<initialize>
var node=editor.GetSelectionRoot();
if(!node||!node.IsControl())self.set_visible(false);
</initialize>
<attach name="click">
editor.ShowPropertiesDialog(editor.GetSelectionRoot())
</attach>
</panel>
</panel>
<panel dock="fill" overflow="visible">
<initialize>
<![CDATA[
var seltype=editor.GetSelectionType();
var menucls="menu_context_point";
if(seltype=="Range")
menucls="menu_context_range";
if(seltype=="Control")
menucls="menu_context_control";
self.append_child(jsml.class_create_instance(menucls));
]]>
</initialize>
</panel>
</jsml>

View File

@@ -0,0 +1,488 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="menu_context_common" jsml-base="floatmenu">
<panel jsml-base="rtemenuitem" command="selectall" imagename="selectall" htmlcode="@SELECTALL" />
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" command="undo" imagename="undo" htmlcode="@UNDO" />
<panel jsml-base="rtemenuitem" command="redo" imagename="redo" htmlcode="@REDO" />
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" command="save" imagename="save" htmlcode="@SAVE" />
<panel jsml-base="rtemenuitem" command="new" imagename="newdoc" htmlcode="@NEW" />
<panel jsml-base="rtemenuitem" command="print" imagename="print" htmlcode="@PRINT" />
<panel jsml-base="rtemenuitem" command="ExecPlugin" arguments="spellcheck" imagename="spell" htmlcode="@SPELLCHECK" />
<panel jsml-base="rtemenuitem" command="Find" imagename="Find" htmlcode="@FINDANDREPLACE" />
<panel jsml-base="rtemenuitem" command="CleanCode" imagename="cleanup" htmlcode="@CLEANCODE" />
</panel>
<panel jsml-class="menu_context_format" jsml-base="floatmenu">
<panel dock="top" margin="0,0,0,25" overflow="visible">
<panel jsml-base="tbgroup_{skin}_{color}" dock="none">
<image jsml-base="image_{skin}_{color}" command="bold" imagename="bold" tooltip="@BOLD" />
<image jsml-base="image_{skin}_{color}" command="italic" imagename="italic" tooltip="@ITALIC" />
<image jsml-base="image_{skin}_{color}" command="underline" imagename="under" tooltip="@UNDERLINE" />
<image jsml-base="image_{skin}_{color}" command="linethrough" imagename="strike" tooltip="@LINETHROUGH" />
<image jsml-base="image_{skin}_{color}" command="overline" imagename="overline" tooltip="@OVERLINE" />
</panel>
</panel>
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" htmlcode="@FONTNAME" arrow="true" xmlfile="setfontname.xml" />
<panel jsml-base="rtemenuitem" htmlcode="@FONTSIZE" arrow="true" xmlfile="setfontsize.xml" />
<panel jsml-base="rtemenuitem" htmlcode="@TEXTCOLOR" arrow="true" xmlfile="colorpicker.xml">
<method name="initoption" arguments="newoption">
newoption.setcolor=function(val){editor.ExecCommand("forecolor",val);}
</method>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@BACKCOLOR" arrow="true" xmlfile="colorpicker.xml">
<method name="initoption" arguments="newoption">
newoption.setcolor=function(val){editor.ExecCommand("backcolor",val);}
</method>
</panel>
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" command="removeformat" imagename="unformat" htmlcode="@REMOVEFORMAT" />
</panel>
<panel jsml-class="menu_context_justify" jsml-base="floatmenu">
<panel jsml-base="rtemenuitem" command="JustifyLeft" text="@JUSTIFYLEFT" imagename="left" />
<panel jsml-base="rtemenuitem" command="JustifyCenter" text="@JUSTIFYCENTER" imagename="center" />
<panel jsml-base="rtemenuitem" command="JustifyRight" text="@JUSTIFYRIGHT" imagename="right" />
<panel jsml-base="rtemenuitem" command="JustifyFull" text="@JUSTIFYFULL" imagename="justifyfull" />
<panel jsml-base="rtemenuitem" command="JustifyNone" text="@JUSTIFYNONE" imagename="justifynone" />
</panel>
<panel jsml-class="menu_context_paragraphs" jsml-base="floatmenu">
<panel dock="top" margin="0,0,0,25" overflow="visible">
<panel jsml-base="tbgroup_{skin}_{color}" dock="none">
<image jsml-base="image_{skin}_{color}" command="JustifyLeft" text="@JUSTIFYLEFT" imagename="left" />
<image jsml-base="image_{skin}_{color}" command="JustifyCenter" text="@JUSTIFYCENTER" imagename="center" />
<image jsml-base="image_{skin}_{color}" command="JustifyRight" text="@JUSTIFYRIGHT" imagename="right" />
<image jsml-base="image_{skin}_{color}" command="JustifyFull" text="@JUSTIFYFULL" imagename="justifyfull" />
<image jsml-base="image_{skin}_{color}" command="JustifyNone" text="@JUSTIFYNONE" imagename="justifynone" />
</panel>
</panel>
<!--
<panel jsml-base="rtemenuopener" menuclass="menu_context_justify" htmlcode="@JUSTIFY" />
-->
<!--
<panel dock="top" margin="0,0,0,25" overflow="visible">
<panel jsml-base="tbgroup_{skin}_{color}" dock="none">
<image jsml-base="image_{skin}_{color}" command="Outdent" tooltip="@OUTDENT" />
<image jsml-base="image_{skin}_{color}" command="Indent" tooltip="@INDENT" />
<image jsml-base="image_{skin}_{color}" command="InsertBlockQuote" tooltip="@INSERTBLOCKQUOTE" imagename="blockquote" />
<image jsml-base="image_{skin}_{color}" command="Ltr" imagename="dir_ltr" />
<image jsml-base="image_{skin}_{color}" command="Rtl" imagename="dir_rtl" />
</panel>
</panel>
-->
<panel jsml-base="rtemenuitem" command="InsertBlockQuote" text="@INSERTBLOCKQUOTE" imagename="blockquote" />
<panel jsml-base="rtemenuitem" command="Outdent" text="@OUTDENT" />
<panel jsml-base="rtemenuitem" command="Indent" text="@INDENT" />
<panel jsml-base="rtemenuitem" command="LTR" text="@DIRECTION_LTR" imagename="dir_ltr" />
<panel jsml-base="rtemenuitem" command="RTL" text="@DIRECTION_RTL" imagename="dir_rtl" />
<!--
<panel jsml-base="rtemenuitem" htmlcode="@PARAGRAPHS" arrow="true" xmlfile="setparagraph.xml" />
-->
</panel>
<panel jsml-class="menu_context_table" jsml-base="floatmenu">
<panel jsml-base="rtemenuitem" command="mergecells" imagename="mrgcell" htmlcode="@MERGECELLS" />
<panel jsml-base="rtemenuitem" command="splitcells" imagename="spltcell" htmlcode="@SPLITCELLS" />
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" command="deleterow" htmlcode="@DELETEROW" imagename="delrow" />
<panel jsml-base="rtemenuitem" command="deletecolumn" htmlcode="@DELETECOLUMN" imagename="delcol" />
<panel jsml-base="rtemenuitem" command="insertrowtop" htmlcode="@INSERTROWTOP" imagename="insrow_t" />
<panel jsml-base="rtemenuitem" command="insertrowbottom" htmlcode="@INSERTROWBOTTOM" imagename="insrow_b" />
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" command="insertcolumnleft" htmlcode="@INSERTCOLUMNLEFT" imagename="inscol_l" />
<panel jsml-base="rtemenuitem" command="insertcolumnright" htmlcode="@INSERTCOLUMNRIGHT" imagename="inscol_r" />
</panel>
<!--
<panel jsml-class="menu_context_link" jsml-base="floatmenu">
<panel jsml-base="rtemenuitem" imagename="link" htmlcode="@EDIT| |@LINK">
<attach name="click">
var link=editor.IsIncludedByTag("a");
if(link)editor.ShowPropertiesDialog(link);
</attach>
</panel>
<panel jsml-base="rtemenuitem" imagename="unlink" htmlcode="@REMOVE| |@LINK">
<attach name="click">
var link=editor.IsIncludedByTag("a");
if(link)link.RemoveNode(false);
</attach>
</panel>
</panel>
-->
<panel jsml-class="menu_context_taglist" jsml-base="floatmenu">
<initialize>
<![CDATA[
var node=editor.GetSelectionRoot();
for(;node&&node.GetNameLower()!="body";node=node.GetParent())
{
if(node.nodeType!=1)continue;
var item=self.createitem(node);
self.append_child(item);
}
]]>
</initialize>
<method name="createitem" arguments="node">
<![CDATA[
var item=jsml.class_create_instance("rtemenuitem");
item.set_arrow(true);
item.set_xmlfile("menu_tagitem.xml");
item._floatboxClass="floatmenu";
item.initoption=function(newoption)
{
newoption.node=node;
newoption.buttonClick=function()
{
item.invoke_event("click");
}
}
item.attach_event("click",function()
{
editor.ShowPropertiesDialog(node);
});
item.set_text(node.GetName());
return item;
]]>
</method>
</panel>
<panel jsml-class="menu_context_point" dock="fill" overflow="visible">
<panel jsml-base="rtemenuitem" command="selectall" imagename="selectall" htmlcode="@SELECTALL" />
<panel jsml-base="rtemenuitem" command="undo" imagename="undo" htmlcode="@UNDO" />
<panel jsml-base="rtemenuspliter" />
<!--
<panel jsml-base="rtemenuitem" command="paste" imagename="paste" htmlcode="@PASTE" />
-->
<panel jsml-base="rtemenuitem" htmlcode="@PASTE" imagename="paste" arrow="true" xmlfile="editor_paste.xml">
<initialize>
if(editor.GetSelectionType()=="Control")self.set_visible(false);
</initialize>
<method name="initoption" arguments="newoption">
this._lastpastecmd="paste";
newoption.command="paste";
newoption.width=360;
newoption.height=240;
newoption.puretextmode=false;
newoption.callback=editor.delegate(editor._onpastedialogreturn);
</method>
</panel>
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuopener" menuclass="menu_context_common" htmlcode="@COMMON" />
<panel jsml-base="rtemenuopener" menuclass="menu_context_paragraphs" htmlcode="@PARAGRAPHS">
<initialize>
//if(editor.GetSelectionType()=="Control")self.set_visible(false);
//if(!editor.QueryStyle("paragraph"))self.set_visible(false);
</initialize>
</panel>
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuopener" menuclass="menu_context_taglist" htmlcode="@TAGLIST">
<initialize>
<![CDATA[
var node=editor.GetSelectionRoot();
var count=0;
for(;node&&node.GetNameLower()!="body";node=node.GetParent())
{
if(node.nodeType==1)count++;
}
if(count==0)self.set_disabled(true);
]]>
</initialize>
</panel>
<panel jsml-base="rtemenuopener" menuclass="menu_context_table" htmlcode="@TABLE" imagename="inserttable">
<initialize>
var table=editor.IsIncludedByTag("table");
if(table==null)return self.set_visible(false);
</initialize>
</panel>
<!--
<panel jsml-base="rtemenuopener" menuclass="menu_context_link" htmlcode="@LINK" imagename="link">
<initialize>
var link=editor.IsIncludedByTag("a");
if(link==null)return self.set_visible(false);
</initialize>
<attach name="click">
var link=editor.IsIncludedByTag("a");
if(link)editor.ShowPropertiesDialog(link);
</attach>
</panel>
-->
<panel jsml-base="rtemenuitem" imagename="link" htmlcode="@EDIT| |@LINK">
<initialize>
var link=editor.IsIncludedByTag("a");
if(link==null)return self.set_visible(false);
</initialize>
<attach name="click">
var link=editor.IsIncludedByTag("a");
if(link)editor.ShowPropertiesDialog(link);
</attach>
</panel>
<panel jsml-base="rtemenuitem" imagename="unlink" htmlcode="@REMOVE| |@LINK">
<initialize>
var link=editor.IsIncludedByTag("a");
if(link==null)return self.set_visible(false);
</initialize>
<attach name="click">
var link=editor.IsIncludedByTag("a");
if(link)link.RemoveNode(false);
</attach>
</panel>
</panel>
<panel jsml-class="menu_context_range" dock="fill" overflow="visible">
<panel jsml-base="rtemenuitem" command="mergecells" imagename="mrgcell" htmlcode="@MERGECELLS">
<initialize>
if(!editor.CanExecCommand("mergecells"))self.set_visible(false);
</initialize>
</panel>
<panel jsml-base="rtemenuitem" command="cut" imagename="cut" htmlcode="@CUT">
<initialize>
if(editor.CanExecCommand("mergecells"))self.set_visible(false);
</initialize>
<attach name="mousehover">self._ResetFCButton();</attach>
</panel>
<panel jsml-base="rtemenuitem" command="copy" imagename="copy" htmlcode="@COPY">
<initialize>
if(editor.CanExecCommand("mergecells"))self.set_visible(false);
</initialize>
<attach name="mousehover">self._ResetFCButton();</attach>
</panel>
<panel jsml-base="rtemenuitem" command="delete" imagename="delete" htmlcode="@DELETE">
<initialize>
if(editor.CanExecCommand("mergecells"))self.set_visible(false);
</initialize>
</panel>
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" command="removeformat" imagename="unformat" htmlcode="@REMOVEFORMAT" />
<panel jsml-base="rtemenuspliter" />
<panel dock="top" margin="0,0,0,25" overflow="visible">
<panel jsml-base="tbgroup_{skin}_{color}" dock="none">
<image jsml-base="image_{skin}_{color}" command="bold" imagename="bold" tooltip="@BOLD" />
<image jsml-base="image_{skin}_{color}" command="italic" imagename="italic" tooltip="@ITALIC" />
<image jsml-base="image_{skin}_{color}" command="underline" imagename="under" tooltip="@UNDERLINE" />
<image jsml-base="image_{skin}_{color}" command="linethrough" imagename="strike" tooltip="@LINETHROUGH" />
<image jsml-base="image_{skin}_{color}" command="overline" imagename="overline" tooltip="@OVERLINE" />
</panel>
</panel>
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" htmlcode="@FONTNAME" arrow="true" xmlfile="setfontname.xml" />
<panel jsml-base="rtemenuitem" htmlcode="@FONTSIZE" arrow="true" xmlfile="setfontsize.xml" />
<panel jsml-base="rtemenuitem" htmlcode="@TEXTCOLOR" arrow="true" xmlfile="colorpicker.xml">
<method name="initoption" arguments="newoption">
newoption.setcolor=function(val){editor.ExecCommand("forecolor",val);}
</method>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@BACKCOLOR" arrow="true" xmlfile="colorpicker.xml">
<method name="initoption" arguments="newoption">
newoption.setcolor=function(val){editor.ExecCommand("backcolor",val);}
</method>
</panel>
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuopener" menuclass="menu_context_taglist" htmlcode="@TAGLIST">
<initialize>
<![CDATA[
var node=editor.GetSelectionRoot();
var count=0;
for(;node&&node.GetNameLower()!="body";node=node.GetParent())
{
if(node.nodeType==1)count++;
}
if(count==0)self.set_disabled(true);
]]>
</initialize>
</panel>
<panel jsml-base="rtemenuopener" menuclass="menu_context_table" htmlcode="@TABLE">
<initialize>
var table=editor.IsIncludedByTag("table");
if(table==null)return self.set_visible(false);
</initialize>
</panel>
</panel>
<panel jsml-class="menu_context_control" dock="fill" overflow="visible">
<panel jsml-base="rtemenuitem" command="cut" imagename="cut" htmlcode="@CUT">
<attach name="mousehover">self._ResetFCButton();</attach>
</panel>
<panel jsml-base="rtemenuitem" command="copy" imagename="copy" htmlcode="@COPY">
<attach name="mousehover">self._ResetFCButton();</attach>
</panel>
<panel jsml-base="rtemenuitem" command="delete" imagename="delete" htmlcode="@DELETE" />
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuopener" menuclass="menu_context_taglist" htmlcode="@TAGLIST">
<initialize>
<![CDATA[
var node=editor.GetSelectionRoot();
var count=0;
for(;node&&node.GetNameLower()!="body";node=node.GetParent())
{
if(node.nodeType==1)count++;
}
if(count==0)self.set_disabled(true);
]]>
</initialize>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@IMAGEEDITOR" imagename="imageeditor">
<initialize>
<![CDATA[
var node=editor.GetSelectionRoot();
if(!node||node.GetNameLower()!="img")self.set_visible(false);
self.set_disabled(true);
editor.FindStorage(["Gallery","Image"],node.GetAttribute("src"),function(storage,fileitem)
{
if(!storage)return;
self.imgnode=node;
self.storage=storage;
self.fileitem=fileitem;
self.set_disabled(false);
});
]]>
</initialize>
<attach name="click">
if(!self.storage)return;
editor.ShowImageEditor(self.imgnode,self.storage,self.fileitem);
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@INSERTIMAGEMAP" imagename="imagemap">
<initialize>
<![CDATA[
var node=editor.GetSelectionRoot();
if(!node||node.GetNameLower()!="img")self.set_visible(false);
self.imgnode=node;
]]>
</initialize>
<attach name="click">
editor.ExecInsertImageMap(null,self.imgnode);
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@STYLES" imagename="properties">
<initialize>
<![CDATA[
var node=editor.GetSelectionRoot();
if(!node||!node.IsControl())
{
self.set_visible(false);
return;
}
self.set_arrow(true);
self.set_xmlfile("menu_styles.xml");
self._floatboxClass="floatmenu";
self.initoption=function(newoption)
{
newoption.node=node;
newoption.buttonClick=function()
{
self.invoke_event("click");
}
}
]]>
</initialize>
<attach name="click">
editor.ShowPropertiesDialog(editor.GetSelectionRoot(),{styletab:"text"})
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@PROPERTIES" imagename="properties">
<initialize>
var node=editor.GetSelectionRoot();
if(!node||!node.IsControl())self.set_visible(false);
</initialize>
<attach name="click">
editor.ShowPropertiesDialog(editor.GetSelectionRoot())
</attach>
</panel>
</panel>
<panel dock="fill" overflow="visible">
<initialize>
<![CDATA[
var seltype=editor.GetSelectionType();
var menucls="menu_context_point";
if(seltype=="Range")
menucls="menu_context_range";
if(seltype=="Control")
menucls="menu_context_control";
self.append_child(jsml.class_create_instance(menucls));
]]>
</initialize>
</panel>
</jsml>

View File

@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-base="rtemenuitem" command="mergecells" imagename="mrgcell" htmlcode="@MERGECELLS">
<initialize>
if(!editor.CanExecCommand("mergecells"))self.set_visible(false);
</initialize>
</panel>
<panel jsml-base="rtemenuitem" command="selectall" imagename="selectall" htmlcode="@SELECTALL" />
<panel jsml-base="rtemenuitem" command="undo" imagename="undo" htmlcode="@UNDO" />
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" command="cut" imagename="cut" htmlcode="@CUT">
<attach name="mousehover">self._ResetFCButton();</attach>
</panel>
<panel jsml-base="rtemenuitem" command="copy" imagename="copy" htmlcode="@COPY">
<attach name="mousehover">self._ResetFCButton();</attach>
</panel>
<panel jsml-base="rtemenuitem" command="delete" imagename="delete" htmlcode="@DELETE" />
<panel jsml-base="rtemenuitem" htmlcode="@IMAGEEDITOR" imagename="imageeditor">
<initialize>
<![CDATA[
var node=editor.GetSelectionRoot();
if(!node||node.GetNameLower()!="img")self.set_visible(false);
self.set_disabled(true);
editor.FindStorage(["Gallery","Image"],node.GetAttribute("src"),function(storage,fileitem)
{
if(!storage)return;
self.imgnode=node;
self.storage=storage;
self.fileitem=fileitem;
self.set_disabled(false);
});
]]>
</initialize>
<attach name="click">
if(!self.storage)return;
editor.ShowImageEditor(self.imgnode,self.storage,self.fileitem);
</attach>
</panel>
<panel jsml-base="rtemenuitem" imagename="link" htmlcode="@EDIT| |@LINK">
<initialize>
var link=editor.IsIncludedByTag("a");
if(link==null)return self.set_visible(false);
</initialize>
<attach name="click">
var link=editor.IsIncludedByTag("a");
if(link)editor.ShowPropertiesDialog(link);
</attach>
</panel>
<panel jsml-base="rtemenuitem" imagename="unlink" htmlcode="@REMOVE| |@LINK">
<initialize>
var link=editor.IsIncludedByTag("a");
if(link==null)return self.set_visible(false);
</initialize>
<attach name="click">
var link=editor.IsIncludedByTag("a");
if(link)link.RemoveNode(false);
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@PROPERTIES" imagename="properties">
<initialize>
var node=editor.GetSelectionRoot();
if(!node||!node.IsControl())self.set_visible(false);
</initialize>
<attach name="click">
editor.ShowPropertiesDialog(editor.GetSelectionRoot())
</attach>
</panel>
</jsml>

View File

@@ -0,0 +1,198 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="menu_context_table" jsml-base="floatmenu">
<panel jsml-base="rtemenuitem" command="mergecells" imagename="mrgcell" htmlcode="@MERGECELLS" />
<panel jsml-base="rtemenuitem" command="splitcells" imagename="spltcell" htmlcode="@SPLITCELLS" />
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" command="deleterow" htmlcode="@DELETEROW" imagename="delrow" />
<panel jsml-base="rtemenuitem" command="deletecolumn" htmlcode="@DELETECOLUMN" imagename="delcol" />
<panel jsml-base="rtemenuitem" command="insertrowtop" htmlcode="@INSERTROWTOP" imagename="insrow_t" />
<panel jsml-base="rtemenuitem" command="insertrowbottom" htmlcode="@INSERTROWBOTTOM" imagename="insrow_b" />
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" command="insertcolumnleft" htmlcode="@INSERTCOLUMNLEFT" imagename="inscol_l" />
<panel jsml-base="rtemenuitem" command="insertcolumnright" htmlcode="@INSERTCOLUMNRIGHT" imagename="inscol_r" />
</panel>
<panel jsml-class="menu_context_taglist" jsml-base="floatmenu">
<initialize>
<![CDATA[
var node=editor.GetSelectionRoot();
for(;node&&node.GetNameLower()!="body";node=node.GetParent())
{
if(node.nodeType!=1)continue;
var item=self.createitem(node);
self.append_child(item);
}
]]>
</initialize>
<method name="createitem" arguments="node">
<![CDATA[
var item=jsml.class_create_instance("rtemenuitem");
item.set_arrow(true);
item.set_xmlfile("menu_tagitem.xml");
item._floatboxClass="floatmenu";
item.initoption=function(newoption)
{
newoption.node=node;
newoption.buttonClick=function()
{
item.invoke_event("click");
}
}
item.attach_event("click",function()
{
editor.ShowPropertiesDialog(node);
});
item.set_text(node.GetName());
return item;
]]>
</method>
</panel>
<panel jsml-base="rtemenuitem" command="mergecells" imagename="mrgcell" htmlcode="@MERGECELLS">
<initialize>
if(!editor.CanExecCommand("mergecells"))self.set_visible(false);
</initialize>
</panel>
<panel jsml-base="rtemenuitem" command="selectall" imagename="selectall" htmlcode="@SELECTALL" />
<panel jsml-base="rtemenuitem" command="undo" imagename="undo" htmlcode="@UNDO" />
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuitem" command="cut" imagename="cut" htmlcode="@CUT">
<attach name="mousehover">self._ResetFCButton();</attach>
</panel>
<panel jsml-base="rtemenuitem" command="copy" imagename="copy" htmlcode="@COPY">
<attach name="mousehover">self._ResetFCButton();</attach>
</panel>
<panel jsml-base="rtemenuitem" command="delete" imagename="delete" htmlcode="@DELETE" />
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="rtemenuopener" menuclass="menu_context_taglist" htmlcode="@TAGLIST">
<initialize>
<![CDATA[
var node=editor.GetSelectionRoot();
var count=0;
for(;node&&node.GetNameLower()!="body";node=node.GetParent())
{
if(node.nodeType==1)count++;
}
if(count==0)self.set_disabled(true);
]]>
</initialize>
</panel>
<panel jsml-base="rtemenuopener" menuclass="menu_context_table" htmlcode="@TABLE">
<initialize>
var table=editor.IsIncludedByTag("table");
if(table==null)return self.set_visible(false);
</initialize>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@IMAGEEDITOR" imagename="imageeditor">
<initialize>
<![CDATA[
var node=editor.GetSelectionRoot();
if(!node||node.GetNameLower()!="img")self.set_visible(false);
self.set_disabled(true);
editor.FindStorage(["Gallery","Image"],node.GetAttribute("src"),function(storage,fileitem)
{
if(!storage)return;
self.imgnode=node;
self.storage=storage;
self.fileitem=fileitem;
self.set_disabled(false);
});
]]>
</initialize>
<attach name="click">
if(!self.storage)return;
editor.ShowImageEditor(self.imgnode,self.storage,self.fileitem);
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@INSERTIMAGEMAP" imagename="imagemap">
<initialize>
<![CDATA[
var node=editor.GetSelectionRoot();
if(!node||node.GetNameLower()!="img")self.set_visible(false);
self.imgnode=node;
]]>
</initialize>
<attach name="click">
editor.ExecInsertImageMap(null,self.imgnode);
</attach>
</panel>
<panel jsml-base="rtemenuitem" imagename="link" htmlcode="@EDIT| |@LINK">
<initialize>
var link=editor.IsIncludedByTag("a");
if(link==null)return self.set_visible(false);
</initialize>
<attach name="click">
var link=editor.IsIncludedByTag("a");
if(link)editor.ShowPropertiesDialog(link);
</attach>
</panel>
<panel jsml-base="rtemenuitem" imagename="unlink" htmlcode="@REMOVE| |@LINK">
<initialize>
var link=editor.IsIncludedByTag("a");
if(link==null)return self.set_visible(false);
</initialize>
<attach name="click">
var link=editor.IsIncludedByTag("a");
if(link)link.RemoveNode(false);
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@STYLES" imagename="properties">
<initialize>
<![CDATA[
var node=editor.GetSelectionRoot();
if(!node||!node.IsControl())
{
self.set_visible(false);
return;
}
self.set_arrow(true);
self.set_xmlfile("menu_styles.xml");
self._floatboxClass="floatmenu";
self.initoption=function(newoption)
{
newoption.node=node;
newoption.buttonClick=function()
{
self.invoke_event("click");
}
}
]]>
</initialize>
<attach name="click">
editor.ShowPropertiesDialog(editor.GetSelectionRoot(),{styletab:"text"})
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@PROPERTIES" imagename="properties">
<initialize>
var node=editor.GetSelectionRoot();
if(!node||!node.IsControl())self.set_visible(false);
</initialize>
<attach name="click">
editor.ShowPropertiesDialog(editor.GetSelectionRoot())
</attach>
</panel>
</jsml>

View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-base="rtemenuitem" htmlcode="@MOVE" imagename="move">
<attach name="click">
<![CDATA[
var node=option.dragcontrol;
var div=new $rte.ContainerElement("div");
editor.InsertNode(div);
node.RemoveNode(true);
div.GetParent().InsertBefore(node,div);
div.RemoveNode(false);
editor.SelectControl(node);
editor.RangeSyncToDom(true);
]]>
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@COPY" imagename="copy">
<attach name="click">
<![CDATA[
var node=option.dragcontrol;
var div=new $rte.ContainerElement("div");
editor.InsertNode(div);
node=node._cloneNode(true);
div.GetParent().InsertBefore(node,div);
div.RemoveNode(false);
editor.SelectControl(node);
editor.RangeSyncToDom(true);
]]>
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@CANCEL">
<attach name="click">
var node=option.dragcontrol;
editor.SelectControl(node);
editor.RangeSyncToDom(true);
</attach>
</panel>
</jsml>

View File

@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-base="rtemenuitem" htmlcode="@FONT" imagename="properties">
<attach name="click">
editor.ShowPropertiesDialog(option.node,{styletab:"font"})
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@BLOCK" imagename="properties">
<attach name="click">
editor.ShowPropertiesDialog(option.node,{styletab:"block"})
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@BACKGROUND" imagename="properties">
<attach name="click">
editor.ShowPropertiesDialog(option.node,{styletab:"background"})
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@BOX" imagename="properties">
<attach name="click">
editor.ShowPropertiesDialog(option.node,{styletab:"box"})
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@POSITION" imagename="properties">
<attach name="click">
editor.ShowPropertiesDialog(option.node,{styletab:"position"})
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@LAYOUT" imagename="properties">
<attach name="click">
editor.ShowPropertiesDialog(option.node,{styletab:"layout"})
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@LIST" imagename="properties">
<attach name="click">
editor.ShowPropertiesDialog(option.node,{styletab:"list"})
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@TABLE" imagename="properties">
<attach name="click">
editor.ShowPropertiesDialog(option.node,{styletab:"table"})
</attach>
</panel>
</jsml>

View File

@@ -0,0 +1,134 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="menu_tagitem_highlight_menuitem" jsml-base="rtemenuitem">
<attach name="mousehover">
option.node.SetRuntimeAttribute("style","background-color:#3399CC;color:white;","tagmenuitem");
</attach>
<attach name="mouseleave">
option.node.SetRuntimeAttribute("style",null,"tagmenuitem");
</attach>
<attach name="disposing">
option.node.SetRuntimeAttribute("style",null,"tagmenuitem");
</attach>
</panel>
<panel jsml-base="menu_tagitem_highlight_menuitem" imagename="selectall" htmlcode="@SELECT">
<attach name="click">
<![CDATA[
editor.Focus();
if(option.node.IsControl())
editor.SelectControl(option.node);
else
editor.SelectContent(option.node);
]]>
</attach>
</panel>
<panel jsml-base="rtemenuspliter" />
<panel jsml-base="menu_tagitem_highlight_menuitem" imagename="cut" htmlcode="@CUT">
<initialize>
if(!option.node.SupportPaste())self.set_visible(false);
</initialize>
<attach name="mousehover">self._ResetFCButton("cut",option.node);</attach>
</panel>
<panel jsml-base="menu_tagitem_highlight_menuitem" imagename="copy" htmlcode="@COPY">
<initialize>
if(!option.node.SupportPaste())self.set_visible(false);
</initialize>
<attach name="mousehover">self._ResetFCButton("copy",option.node);</attach>
</panel>
<panel jsml-base="menu_tagitem_highlight_menuitem" imagename="delete" htmlcode="@DELETE">
<initialize>
if(!option.node.SupportPaste())self.set_visible(false);
</initialize>
<attach name="click">
editor.RemoveNode(option.node,true);
</attach>
</panel>
<panel jsml-base="menu_tagitem_highlight_menuitem" imagename="removetag" htmlcode="@REMOVETAG">
<initialize>
if(!option.node.CanRemoveTag())self.set_visible(false);
if(option.node.IsControl())self.set_visible(false);
</initialize>
<attach name="click">
editor.RemoveNode(option.node,false);
</attach>
</panel>
<panel jsml-base="rtemenuspliter">
<initialize>
if(!option.node.SupportPaste())self.set_visible(false);
</initialize>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@IMAGEEDITOR" imagename="imageeditor">
<initialize>
<![CDATA[
var node=option.node;
if(!node||node.GetNameLower()!="img")self.set_visible(false);
self.set_disabled(true);
editor.FindStorage(["Gallery","Image"],node.GetAttribute("src"),function(storage,fileitem)
{
if(!storage)return;
self.imgnode=node;
self.storage=storage;
self.fileitem=fileitem;
self.set_disabled(false);
});
]]>
</initialize>
<attach name="click">
if(!self.storage)return;
editor.ShowImageEditor(self.imgnode,self.storage,self.fileitem);
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@INSERTIMAGEMAP" imagename="imagemap">
<initialize>
<![CDATA[
var node=option.node;
if(!node||node.GetNameLower()!="img")self.set_visible(false);
self.imgnode=node;
]]>
</initialize>
<attach name="click">
editor.ExecInsertImageMap(null,self.imgnode);
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@STYLES" imagename="properties">
<initialize>
<![CDATA[
var node=option.node;
self.set_arrow(true);
self.set_xmlfile("menu_styles.xml");
self._floatboxClass="floatmenu";
self.initoption=function(newoption)
{
newoption.node=node;
newoption.buttonClick=function()
{
self.invoke_event("click");
}
}
]]>
</initialize>
<attach name="click">
editor.ShowPropertiesDialog(option.node,{styletab:"text"})
</attach>
</panel>
<panel jsml-base="rtemenuitem" htmlcode="@PROPERTIES" imagename="properties">
<attach name="click">
editor.ShowPropertiesDialog(option.node);
</attach>
</panel>
</jsml>

View File

@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<execute>
dialog.set_back_color("#F9F9F9");
</execute>
<panel jsml-class="promptdialogpanel" dock="fill" margin="0" padding="18" overflow="visible">
<panel dock="top" overflow="visible">
<label jsml-local="label" dock="fill" margin="4,4,0,4" word_wrap="true" max_width="480" />
</panel>
<panel dock="top" jsml-local="nextpanel" margin="5">
<label dock="right" jsml-local="donextlabel" />
<checkbox dock="right" jsml-local="checkbox" />
</panel>
<panel dock="bottom" margin="18,3,3,3">
<panel dock="right" overflow="visible">
<button dock="left" width="82" margin="0,12,0,0" text="@msg_overwrite">
<initialize>
self.set_visible(option.AllowOverride);
</initialize>
<attach name="click">
option.result="override";
option.checked=checkbox.get_checked();
dialog.close();
</attach>
</button>
<button dock="left" width="82" margin="0,12,0,0" text="@msg_rename">
<attach name="click">
option.result="rename";
option.checked=checkbox.get_checked();
dialog.close();
</attach>
</button>
<button dock="left" width="82" margin="0,12,0,0" text="@msg_skip">
<attach name="click">
option.result="cancel";
option.checked=checkbox.get_checked();
dialog.close();
</attach>
</button>
</panel>
</panel>
<attach name="keydown" arguments="je,e">
if(e.keyCode==27)dialog.close();
</attach>
<initialize>
<![CDATA[
label.set_text(option.message);
if(option.nextmsg)
donextlabel.set_text(option.nextmsg);
else
nextpanel.set_visible(false);
checkbox.set_checked(option.lastchecked);
]]>
</initialize>
</panel>
<object jsml-base="promptdialogpanel">
</object>
</jsml>

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="phonecommondialog" dock="fill" overflow="visible" margin="0" padding="15">
<panel jsml-local="subbuttonpanel" dock="top" overflow="visible">
<panel jsml-base="phone_{skin}_{color}" command="Undo" imagename="m_undo" text="@Undo" />
<panel jsml-base="phone_{skin}_{color}" command="Redo" imagename="m_redo" text="@Redo" />
<panel jsml-base="phone_{skin}_{color}" command="Cut" imagename="m_cut" text="@CUT">
<attach name="mousehover">
self._ResetFCButton();
</attach>
</panel>
<panel jsml-base="phone_{skin}_{color}" command="Copy" imagename="m_copy" text="@COPY">
<attach name="mousehover">
self._ResetFCButton();
</attach>
</panel>
<panel jsml-base="phone_{skin}_{color}" imagename="m_paste" text="@Paste">
<initialize>
</initialize>
</panel>
<panel jsml-base="phone_{skin}_{color}" imagename="m_pastetext" text="@PasteFromDevice">
<attach name="click">
<![CDATA[
editor.ExecShowXmlDialog(self.get_element(), "phone_text.xml", {});
dialog.close();
]]>
</attach>
</panel>
<panel jsml-base="phone_{skin}_{color}" command="Find" imagename="m_find" text="@FINDANDREPLACE" />
<panel jsml-base="phone_{skin}_{color}" command="ToggleBorder" imagename="m_borders" text="@ToggleBorder" />
<panel jsml-base="phone_{skin}_{color}" command="Help" imagename="m_help" text="@HELP" />
</panel>
</panel>
<panel jsml-base="phonecommondialog">
</panel>
</jsml>

View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="phoneformatdialog" dock="fill" overflow="visible" margin="0" padding="15">
<panel jsml-local="subbuttonpanel" dock="top" overflow="visible">
<panel jsml-base="phone_{skin}_{color}" command="Bold" text="@BOLD" imagename="m_bold" />
<panel jsml-base="phone_{skin}_{color}" command="Italic" text="@ITALIC" imagename="m_italic"/>
<panel jsml-base="phone_{skin}_{color}" command="Underline" text="@UNDERLINE" imagename="m_under" />
<panel jsml-base="phone_{skin}_{color}" command="Linethrough" text="@LINETHROUGH" imagename="m_strike" />
<panel jsml-base="phone_{skin}_{color}" command="Overline" text="@OVERLINE" imagename="m_overline" />
<panel jsml-base="phone_{skin}_{color}" command="Superscript" text="@SUPERSCRIPT" imagename="m_superscript" />
<panel jsml-base="phone_{skin}_{color}" command="Subscript" text="@SUBSCRIPT" imagename="m_subscript" />
<panel jsml-base="phone_{skin}_{color}" command="Ucase" text="@UPPERCASE" imagename="m_ucase" />
<panel jsml-base="phone_{skin}_{color}" command="Lcase" text="@LOWERCASE" imagename="m_lcase" />
<panel jsml-base="phone_{skin}_{color}" command="ForeColor" text="@TEXTCOLOR" imagename="m_forecolor">
<attach name="click">
<![CDATA[
//var editor = self.find_editor();
var cmd = "ForeColor";
var option = { command: cmd, preview: true }
option.setcolor = this.delegate(function (val) {
editor.ExecCommand(cmd, val);
});
editor.ExecShowXmlDialog(self.get_element(), "colorpicker.xml", option);
dialog.close();
]]>
</attach>
</panel>
<panel jsml-base="phone_{skin}_{color}" command="BackColor" text="@BACKCOLOR" imagename="m_backcolor">
<attach name="click">
<![CDATA[
//var editor = self.find_editor();
var cmd = "BackColor";
var option = { command: cmd, preview: true }
option.setcolor = this.delegate(function (val) {
editor.ExecCommand(cmd, val);
});
editor.ExecShowXmlDialog(self.get_element(), "colorpicker.xml", option);
dialog.close();
]]>
</attach>
</panel>
<panel jsml-base="phone_{skin}_{color}" command="RemoveFormat" text="@REMOVEFORMAT" imagename="m_unformat" />
<panel jsml-base="phone_{skin}_{color}" command="ShowXmlDialog" arguments="setfontname.xml" text="@FontName" imagename="m_font"/>
<panel jsml-base="phone_{skin}_{color}" command="ShowXmlDialog" arguments="setfontsize.xml" text="@FontSize" imagename="m_fontsize"/>
</panel>
</panel>
<panel jsml-base="phoneformatdialog">
</panel>
</jsml>

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="phoneinsertdialog" dock="fill" overflow="visible" margin="0" padding="15">
<panel jsml-local="subbuttonpanel" dock="top" overflow="visible">
<panel jsml-base="phone_{skin}_{color}" command="InsertText" imagename="m_text" text="@INSERTTEXT">
<attach name="click">
<![CDATA[
editor.ExecShowXmlDialog(self.get_element(), "phone_text.xml", {});
dialog.close();
]]>
</attach>
</panel>
<panel jsml-base="phone_{skin}_{color}" command="InsertTable" imagename="m_table" text="@INSERTTABLE" />
<panel jsml-base="phone_{skin}_{color}" command="InsertBox" text="@INSERTBOX" imagename="m_insertdiv" />
<panel jsml-base="phone_{skin}_{color}" command="InsertFieldSet" text="@INSERTFIELDSET" imagename="m_groupbox" />
<panel jsml-base="phone_{skin}_{color}" command="InsertLink" text="@INSERTLINK" imagename="m_link" />
<panel jsml-base="phone_{skin}_{color}" command="InsertAnchor" text="@INSERTANCHOR" imagename="m_anchor" />
<panel jsml-base="phone_{skin}_{color}" command="ExecPlugin" arguments="insertchars" imagename="m_specialchar" text="@INSERTCHARS" />
<panel jsml-base="phone_{skin}_{color}" command="InsertDate" imagename="m_insertdate" text="@INSERTDATE" />
<panel jsml-base="phone_{skin}_{color}" command="InsertBlockQuote" text="@INSERTBLOCKQUOTE" imagename="m_blockquote" />
<panel jsml-base="phone_{skin}_{color}" command="InsertBreak" text="@INSERTBREAKRULE" imagename="m_break" />
<panel jsml-base="phone_{skin}_{color}" command="InsertWbr" text="@INSERTWBR" imagename="m_div" />
<panel jsml-base="phone_{skin}_{color}" command="InsertParagraph" text="@INSERTPARAGRAPH" imagename="m_paragraph" />
<panel jsml-base="phone_{skin}_{color}" command="InsertHorizontalRule" text="@INSERTHORIZONTALRULE" imagename="m_rule" />
<panel jsml-base="phone_{skin}_{color}" command="InsertPageBreak" text="@INSERTPAGEPRINTBREAK" imagename="m_insertpagebreak" />
<panel jsml-base="phone_{skin}_{color}" command="InsertTopLine" text="@INSERTTOPLINE" imagename="m_topline" />
<panel jsml-base="phone_{skin}_{color}" command="InsertBottomLine" text="@INSERTBOTTOMLINE" imagename="m_bottomline" />
<panel jsml-base="phone_{skin}_{color}" command="InsertImage" text="@INSERTIMAGE" imagename="m_image" />
<panel jsml-base="phone_{skin}_{color}" command="InsertVideo" text="@INSERTVIDEO" imagename="m_media" />
<panel jsml-base="phone_{skin}_{color}" command="InsertDocument" text="@INSERTDOCUMENT" imagename="m_document" />
<panel jsml-base="phone_{skin}_{color}" command="ExecPlugin" arguments="insertyoutube" text="@INSERTYOUTUBE" imagename="m_youtube"/>
<panel jsml-base="phone_{skin}_{color}" command="ExecPlugin" arguments="googlemap" text="@GOOGLEMAP" imagename="m_map"/>
</panel>
</panel>
<panel jsml-base="phoneinsertdialog">
</panel>
</jsml>

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="phoneparagraphdialog" dock="fill" overflow="visible" margin="0" padding="15">
<panel jsml-local="subbuttonpanel" dock="top" overflow="visible">
<panel jsml-base="phone_{skin}_{color}" command="JustifyLeft" text="@JUSTIFYLEFT" imagename="m_left" />
<panel jsml-base="phone_{skin}_{color}" command="JustifyCenter" text="@JUSTIFYCENTER" imagename="m_center" />
<panel jsml-base="phone_{skin}_{color}" command="JustifyRight" text="@JUSTIFYRIGHT" imagename="m_right" />
<panel jsml-base="phone_{skin}_{color}" command="JustifyFull" text="@JUSTIFYFULL" imagename="m_justifyfull"/>
<panel jsml-base="phone_{skin}_{color}" command="JustifyNone" text="@JUSTIFYNONE" imagename="m_justifynone" noactive="true" />
<panel jsml-base="phone_{skin}_{color}" command="Outdent" text="@OUTDENT" imagename="m_outdent" />
<panel jsml-base="phone_{skin}_{color}" command="Indent" text="@INDENT" imagename="m_indent" />
</panel>
<groupbox dock="top" overflow="visible" text="@ORDEREDLIST" margin="10,0,0,0">
<initialize>
<![CDATA[
self._fieldset.style.fontSize = "14px";
self._fieldset.style.fontWeight = "bold";
]]>
</initialize>
<panel jsml-base="rtemenuitem" command="InsertOrderedList" arguments="decimal" noactive="1" text="1,2,3,4,5" margin="5,0,0,0" />
<panel jsml-base="rtemenuitem" command="InsertOrderedList" arguments="lower-latin" noactive="1" text="a,b,c,d,e" />
<panel jsml-base="rtemenuitem" command="InsertOrderedList" arguments="lower-roman" noactive="1" text=",ⅱ,ⅲ,ⅳ," />
<panel jsml-base="rtemenuitem" command="InsertOrderedList" arguments="upper-latin" noactive="1" text="A,B,C,D,E" />
<panel jsml-base="rtemenuitem" command="InsertOrderedList" arguments="upper-roman" noactive="1" text=",Ⅱ,ⅢⅢ,Ⅳ," />
</groupbox>
<groupbox dock="top" overflow="visible" text="@UNORDEREDLIST" margin="10,0,0,0">
<initialize>
<![CDATA[
self._fieldset.style.fontSize = "14px";
self._fieldset.style.fontWeight = "bold";
]]>
</initialize>
<panel jsml-base="rtemenuitem" command="InsertUnorderedList" arguments="disc" noactive="1" imagename="ul-disc" text="@UL_DISC" margin="5,0,0,0" />
<panel jsml-base="rtemenuitem" command="InsertUnorderedList" arguments="circle" noactive="1" imagename="ul-circle" text="@UL_CIRCLE" />
<panel jsml-base="rtemenuitem" command="InsertUnorderedList" arguments="square" noactive="1" imagename="ul-square" text="@UL_SQUARE" />
</groupbox>
</panel>
<panel jsml-base="phoneparagraphdialog">
</panel>
</jsml>

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="phoneselectdialog" dock="fill" overflow="visible" margin="0" padding="15">
<panel jsml-local="subbuttonpanel" dock="top" overflow="visible">
<panel jsml-base="phone_{skin}_{color}" dock="top" command="SelectAll" imagename="m_selectall" text="@SELECTALL">
<attach name="click">
dialog.close();
</attach>
</panel>
<panel jsml-base="phone_{skin}_{color}" dock="top" imagename="m_selectparagraph" text="@SELECTPARAGRAPH">
<attach name="click">
var p=editor.EnsureParagraph();if(p)editor.SelectContent(p)
dialog.close();
</attach>
</panel>
<panel jsml-base="phone_{skin}_{color}" dock="top" imagename="m_selecttop" text="@SELECTTOHOME">
<attach name="click">
editor.SetPointInside(editor.GetBodyNode(),0)
dialog.close();
</attach>
</panel>
<panel jsml-base="phone_{skin}_{color}" dock="top" imagename="m_selectbottom" text="@SELECTTOEND">
<attach name="click">
editor.SetPointInside(editor.GetBodyNode(),editor.GetBodyNode().GetMaxOffset())
dialog.close();
</attach>
</panel>
</panel>
</panel>
<panel jsml-base="phoneselectdialog">
</panel>
</jsml>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="phonetextdialog" dock="fill" overflow="visible" margin="0" padding="15">
<panel dock="top" height="30">
<button dock="left" width="60" text="@ok">
<attach name="click">
editor.AppendHTML(pastearea.get_text());
dialog.close();
</attach>
</button>
<button dock="left" width="60" text="@close" margin="0,0,0,5">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
<textbox jsml-local="pastearea" dock="fill" text_mode="multipleline" margin="5,0,0,0"></textbox>
</panel>
<panel jsml-base="phonetextdialog">
</panel>
</jsml>

View File

@@ -0,0 +1,277 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<!-- TAB BUTTON -->
<panel jsml-class="properties_tabbtn" cursor="pointer" height="18" width="60" border_color="#CDCDCD" border_width="0,0,1,0">
<label jsml-local="label" dock="fill" text_align="center" vertical_align="middle" cursor="pointer"/>
<attach name="set_text">
label.set_text(self.get_text());
</attach>
<attach name="mousehover">
label.set_text_color("blue");
</attach>
<attach name="mouseleave">
label.set_text_color("");
</attach>
<attach name="mousedown">
self.SetActive();
</attach>
<method name="SetActive">
<![CDATA[
var p=this.get_parent();
if(!p)return;
var cs=p._childs;
var isprev=true;
for(var i=0;i<cs.length;i++)
{
var header=cs[i];
if(header==self)
{
isprev=false;
if(i==cs.length-1)
{
if(i==0)
header.SetMode("active_full");
else
header.SetMode("active_end");
}
else
{
if(i==0)
header.SetMode("active_begin");
else
header.SetMode("active_middle");
}
}
else
{
if(i==0)
header.SetMode("first");
else if(isprev)
header.SetMode("prev");
else if(i==cs.length-1)
header.SetMode("last");
else
header.SetMode("next");
}
}
]]>
</method>
<method name="IsActive">
return self._isactive;
</method>
<method name="SetMode" arguments="mode">
<![CDATA[
if(self._tabmode==mode)
return;
self._tabmode=mode;
self._isactive=mode.substring(0,7)=="active_";
switch(mode)
{
case "active_begin":
case "active_end":
case "active_middle":
case "active_full":
self.set_border_color("#f6f6f6");
label.set_border_color("#CDCDCD");
label.set_back_color("#f6f6f6");
label.set_border_width([1,1,0,1]);
label.set_padding([3,0,1,0]);
label.set_margin([0,0,0,0]);
self.set_min_height(self.get_height()+2);
break;
case "first":
case "prev":
self.set_border_color("#CDCDCD");
label.set_border_color("#DEDEDE");
label.set_back_color("#F5F5F5");
label.set_border_width([1,0,0,1]);
label.set_padding([0,1,1,0]);
label.set_margin([3,0,0,0]);
self.set_min_height(self.get_height()+1);
break;
case "next":
case "last":
self.set_border_color("#CDCDCD");
label.set_border_color("#DEDEDE");
label.set_back_color("#F5F5F5");
label.set_border_width([1,1,0,0]);
label.set_padding([0,0,1,1]);
label.set_margin([3,0,0,0]);
self.set_min_height(self.get_height()+1);
break;
}
if(self._isactive)
self.invoke_event("active");
else
self.invoke_event("deactive");
if(self._isactive)
self.bubble_event("tabactived",self._active_argument,self);
]]>
</method>
<property name="active_argument">
<get>
return self._active_argument;
</get>
<set>
self._active_argument=value;
</set>
</property>
</panel>
<!-- DIALOG -->
<panel jsml-class="properties_dialog" dock="fill" padding="8" back_color="#EEEEEE">
<panel dock="bottom" margin="3" padding="6" overflow="visible">
<panel dock="right" margin="3" overflow="visible">
<initialize>
if(!option.nestedmode)self.set_visible(false);
</initialize>
<button dock="left" width="82" height="24" text="@CLOSE">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
<panel dock="right" margin="3" overflow="visible">
<initialize>
if(option.nestedmode)self.set_visible(false);
</initialize>
<button dock="left" width="82" height="24" text="@OK" margin="0,12,0,0">
<initialize>
if(option.oktext)self.set_text(option.oktext);
</initialize>
<attach name="click">
dialog.result=true;
dialog.close();
</attach>
</button>
<button dock="left" width="82" height="24" text="@CANCEL">
<attach name="click">
dialog.close();
</attach>
</button>
</panel>
</panel>
<panel dock="top" overflow="visible" jsml-local="tabspanel">
<panel dock="left" border_width="0,0,1,0" border_color="#CDCDCD" width="20"></panel>
<panel dock="left" overflow="visible" jsml-local="tabpanel">
<panel dock="left" jsml-base="properties_tabbtn" text="" active_argument="special" jsml-local="firsttabbtn"/>
<panel dock="left" jsml-base="properties_tabbtn" text="@COMMON" active_argument="tag_common" />
<panel dock="left" jsml-base="properties_tabbtn" text="@STYLES" active_argument="style" />
</panel>
<panel dock="fill" border_width="0,0,1,0" border_color="#CDCDCD">
</panel>
<attach name="tabactived" arguments="je,arg">
<![CDATA[
mainpanel.dispose_children();
var urlhandler=function(res,err)
{
if(!res)
{
if(err)setTimeout(function(){throw(err)},1);
return;
}
};
var processinst=function(inst){
mainpanel.append_child(inst);
inst.invoke_recursive("editor_ready",editor);
};
var dialogvars={editor:editor,dialog:dialog,option:option}
var file="properties_"+arg;
if(arg=="special")
file="properties_"+instance.specialfile;
file+=".xml";
editor._LoadXmlUrl(editor.BuildDialogUrl(file),urlhandler,processinst,dialogvars);
je.ReturnValue=false;
]]>
</attach>
</panel>
<panel jsml-local="mainpanel" dock="fill" border_width="0,1,1,1" border_color="#CDCDCD" padding="6" back_color="#f6f6f6">
</panel>
<attach name="reloadvalue">
self.invoke_recursive("loadvalue");
</attach>
<initialize>
<![CDATA[
self._rtenode=option.targetnode;
var title=editor.CreateControlProvider(option.targetnode).GetTitle();
dialog.set_title(title)
var index=0;
instance.specialfile="tag_common";
var nl=option.targetnode.GetNameLower();
switch(nl)
{
case "a":
case "div":
case "table":
case "form":
case "select":
case "input":
case "textarea":
case "button":
case "audio":
case "video":
firsttabbtn.set_text(title)
instance.specialfile="tag_"+nl;
if(option.styletab)index=2;
break;
default:
tabpanel.remove_child(firsttabbtn);
firsttabbtn.dispose();
firsttabbtn.set_visible(false);
if(option.styletab)index=1;
break;
}
tabpanel._childs[index].SetActive();
if(option.hidetabs)
{
tabspanel.set_visible(false);
mainpanel.set_border_width(0);
}
setTimeout(function()
{
editor.PreloadDialogUrl("properties_style.xml");
},3000);
]]>
</initialize>
</panel>
<panel jsml-base="properties_dialog">
</panel>
</jsml>

View File

@@ -0,0 +1,269 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<!-- TAB BUTTON -->
<panel jsml-class="properties_style_tabbtn" cursor="pointer" height="22" border_color="#CDCDCD" border_width="1" margin="0,0,5,0">
<label jsml-local="label" dock="fill" text_align="left" vertical_align="middle" cursor="pointer" padding="0,0,0,12"/>
<attach name="set_text">
label.set_text(self.get_text());
</attach>
<attach name="mousehover">
label.set_text_color("blue");
</attach>
<attach name="mouseleave">
label.set_text_color("");
</attach>
<attach name="mousedown">
self.SetActive();
</attach>
<method name="SetActive">
<![CDATA[
var p=this.get_parent();
if(!p)return;
var cs=p._childs;
var isprev=true;
for(var i=0;i<cs.length;i++)
{
var header=cs[i];
if(header==self)
{
isprev=false;
if(i==cs.length-1)
{
if(i==0)
header.SetMode("active_full");
else
header.SetMode("active_end");
}
else
{
if(i==0)
header.SetMode("active_begin");
else
header.SetMode("active_middle");
}
}
else
{
if(i==0)
header.SetMode("first");
else if(isprev)
header.SetMode("prev");
else if(i==cs.length-1)
header.SetMode("last");
else
header.SetMode("next");
}
}
]]>
</method>
<method name="IsActive">
return self._isactive;
</method>
<method name="SetMode" arguments="mode">
<![CDATA[
if(self._tabmode==mode)
return;
self._tabmode=mode;
self._isactive=mode.substring(0,7)=="active_";
switch(mode)
{
case "active_begin":
case "active_end":
case "active_middle":
case "active_full":
label.set_back_color("white");
break;
case "first":
case "prev":
label.set_back_color("#F5F5F5");
break;
case "next":
case "last":
label.set_back_color("#F5F5F5");
break;
}
if(self._isactive)
self.invoke_event("active");
else
self.invoke_event("deactive");
if(self._isactive)
self.bubble_event("tabactived",self._active_argument,self);
]]>
</method>
<property name="active_argument">
<get>
return self._active_argument;
</get>
<set>
self._active_argument=value;
</set>
</property>
</panel>
<!-- DIALOG -->
<panel jsml-class="properties_style_dialog" dock="fill">
<panel dock="left" overflow="visible" margin="5" jsml-local="tabspanel">
<panel dock="top" overflow="visible" jsml-local="tabpanel">
<panel dock="top" jsml-base="properties_style_tabbtn" text="@FONT" active_argument="font" />
<panel dock="top" jsml-base="properties_style_tabbtn" text="@BLOCK" active_argument="block" />
<panel dock="top" jsml-base="properties_style_tabbtn" text="@BACKGROUND" active_argument="background" />
<panel dock="top" jsml-base="properties_style_tabbtn" text="@BORDER" active_argument="border" />
<panel dock="top" jsml-base="properties_style_tabbtn" text="@BOX" active_argument="box" />
<panel dock="top" jsml-base="properties_style_tabbtn" text="@POSITION" active_argument="position" />
<panel dock="top" jsml-base="properties_style_tabbtn" text="@LAYOUT" active_argument="layout" />
<panel dock="top" jsml-base="properties_style_tabbtn" text="@LIST" active_argument="list" />
<panel dock="top" jsml-base="properties_style_tabbtn" text="@TABLE" active_argument="table" />
<initialize>
<![CDATA[
switch(option.targetnode.GetNameLower())
{
case "body":
break
default:
return;
}
while(true)
{
var c=self._childs[5];
if(!c)break;
self.remove_child(c);
c.dispose()
}
]]>
</initialize>
</panel>
<panel dock="fill" border_width="0" border_color="#CDCDCD">
</panel>
<attach name="tabactived" arguments="je,arg">
<![CDATA[
switch(arg)
{
case "box":
case "position":
case "layout":
case "list":
case "table":
previewpanel.set_visible(false);
break;
default:
previewpanel.set_visible(true);
break;
}
mainpanel.dispose_children();
var urlhandler=function(res,err)
{
if(!res)
{
if(err)setTimeout(function(){throw(err)},1);
return;
}
};
var processinst=function(inst){
mainpanel.append_child(inst);
inst.invoke_recursive("editor_ready",editor);
};
var dialogvars={editor:editor,dialog:dialog,option:option}
var file="properties_style_"+arg+".xml";
editor._LoadXmlUrl(editor.BuildDialogUrl(file),urlhandler,processinst,dialogvars)
je.ReturnValue=false;
]]>
</attach>
</panel>
<groupbox jsml-local="previewpanel" text="@PREVIEW" dock="bottom" overflow="visible" height="60" margin="4">
<panel dock="fill" margin="2,6,4,50">
<htmlcontrol jsml-local="previewctrl" dock="fill" back_color="white" />
</panel>
</groupbox>
<panel jsml-local="mainpanel" dock="fill" border_width="0" border_color="#CDCDCD">
</panel>
<initialize>
<![CDATA[
self._rtenode=option.targetnode;
var title=editor.CreateControlProvider(option.targetnode).GetTitle();
var index=0;
if(option.styletab)
{
for(var i=0;i<tabpanel._childs.length;i++)
{
if(tabpanel._childs[i].get_active_argument()==option.styletab)
index=i;
}
}
tabpanel._childs[index].SetActive();
if(option.hidetabs)
{
tabspanel.set_visible(false);
mainpanel.set_border_width(0);
}
setTimeout(function()
{
editor.PreloadDialogUrl("properties_style_font.xml");
editor.PreloadDialogUrl("properties_style_background.xml");
editor.PreloadDialogUrl("properties_style_block.xml");
editor.PreloadDialogUrl("properties_style_border.xml");
editor.PreloadDialogUrl("properties_style_box.xml");
editor.PreloadDialogUrl("properties_style_layout.xml");
editor.PreloadDialogUrl("properties_style_list.xml");
editor.PreloadDialogUrl("properties_style_other.xml");
editor.PreloadDialogUrl("properties_style_position.xml");
editor.PreloadDialogUrl("properties_style_table.xml");
},3000);
]]>
</initialize>
<initialize>
self.previewspan=document.createElement("DIV");
self.previewspan.innerHTML="Sample Text";
previewctrl._content.appendChild(self.previewspan);
self.invoke_event("loadpropstyle");
</initialize>
<attach name="rtepropsaved,loadpropstyle">
var s=self.previewspan.style;
s.cssText=self._rtenode.GetAttribute("style");
s.left="";s.top="";
self.invoke_event("recalcsize");
</attach>
<attach name="resize,recalcsize">
var s=self.previewspan.style;
s.width=previewctrl.get_current_width()+"px";
s.height=previewctrl.get_current_height()+"px";
</attach>
</panel>
<panel jsml-base="properties_style_dialog">
</panel>
</jsml>

View File

@@ -0,0 +1,214 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="properties_background" dock="fill">
<groupbox text="@background" dock="top" overflow="visible" margin="4">
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="background-color:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropcolorbox" propname="style:background-color" />
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="background-image:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" width="240" propname="style:background-image">
<method name="set_node_value" overrideas="base_set_value">
<![CDATA[
if(!value)
{
self.base_set_value("");
}
else
{
self.base_set_value("url("+value+")");
}
]]>
</method>
<method name="get_node_value" overrideas="base_get_value">
var url=self.base_get_value();
if(!url)return "";
return url.replace(/url\(["']?(.*)["']?\)/gi,"$1");
</method>
</panel>
<panel dock="left" width="4" />
<button dock="left" height="24" width="30" text="...">
<attach name="click">
instance.showuploadfile(self);
</attach>
</button>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="background-repeat:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:background-repeat">
<listitem value="" text="@NOTSET" />
<listitem value="repeat" text="repeat" />
<listitem value="repeat-x" text="repeat-x" />
<listitem value="repeat-y" text="repeat-y" />
<listitem value="no-repeat" text="no-repeat" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="background-attachment:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:background-attachment">
<listitem value="" text="@NOTSET" />
<listitem value="scroll" text="scroll" />
<listitem value="fixed" text="fixed" />
<listitem value="repeat-y" text="repeat-y" />
<listitem value="no-repeat" text="no-repeat" />
<listitem value="inherit" text="inherit" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="background-clip:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:background-clip">
<listitem value="" text="@NOTSET" />
<listitem value="border-box" text="border-box" />
<listitem value="padding-box" text="padding-box" />
<listitem value="content-box" text="content-box" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="background-origin:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:background-origin">
<listitem value="" text="@NOTSET" />
<listitem value="padding-box" text="padding-box" />
<listitem value="border-box" text="border-box" />
<listitem value="content-box" text="content-box" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="(x) background-position:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:background-position" jsml-local="bgpvd">
<method name="get_node_value">
return instance.get_position_value(true,true);
</method>
<method name="set_node_value">
instance.set_position_value(true,value);
bgpvt.invoke_event("loadvalue");
</method>
<listitem value="" text="@NOTSET" />
<listitem value="top" text="@TOP" />
<listitem value="center" text="@CENTER" />
<listitem value="bottom" text="@BOTTOM" />
</panel>
<label dock="left" vertical_align="middle" width="20" text=" or "/>
<panel dock="left" jsml-base="rtepropunitbox" width="48" propname="style:background-position" jsml-local="bgpvt">
<method name="get_node_value">
return instance.get_position_value(true,false);
</method>
<method name="set_node_value">
instance.set_position_value(true,value);
bgpvd.invoke_event("loadvalue");
</method>
</panel>
</panel>
<panel margin="7,3,10,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="(y) background-position:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:background-position" jsml-local="bgphd">
<method name="get_node_value">
return instance.get_position_value(false,true);
</method>
<method name="set_node_value">
instance.set_position_value(false,value);
bgpht.invoke_event("loadvalue");
</method>
<listitem value="" text="@NOTSET" />
<listitem value="left" text="@LEFT" />
<listitem value="center" text="@CENTER" />
<listitem value="right" text="@RIGHT" />
</panel>
<label dock="left" vertical_align="middle" width="20" text=" or "/>
<panel dock="left" jsml-base="rtepropunitbox" width="48" propname="style:background-position" jsml-local="bgpht">
<method name="get_node_value">
return instance.get_position_value(false,false);
</method>
<method name="set_node_value">
instance.set_position_value(false,value);
bgphd.invoke_event("loadvalue");
</method>
</panel>
</panel>
</groupbox>
<method name="find_node">
<![CDATA[
for(var p=self;p&&p.get_parent;p=p.get_parent())
if(p._rtenode)
return p._rtenode;
]]>
</method>
<method name="get_position_value" arguments="isvtc,dropdown">
<![CDATA[
var node=self.find_node();
var pos=node.GetStyle("background-position");
if(!pos)return null;
pos=pos.split(' ')[isvtc?0:1];
if(!pos)return null;
if(dropdown)
{
if(isNaN(parseInt(pos)))
return pos;
}
else
{
if(!isNaN(parseInt(pos)))
return pos;
}
return null;
]]>
</method>
<method name="set_position_value" arguments="isvtc,value">
<![CDATA[
var node=self.find_node();
var pos=node.GetStyle("background-position")||"";
var pair=pos.split(' ');
if(pair.length!=2)
{
if(!value)
{
node.SetStyle("background-position",null)
return;
}
pair=["0px","0px"];
}
pair[isvtc?0:1]=value||"0px";
pos=pair.join(" ");
if(pos=="0px 0px")
pos=null;
node.SetStyle("background-position",pos)
]]>
</method>
<method name="showuploadfile" arguments="anchor">
<![CDATA[
var img=new $rte.GenericElement("img");
var newoption={width:640,height:420,targetnode:img};
newoption.nestedmode=true;
newoption.callback=function(res)
{
if(!res)return;
option.targetnode.SetStyle("background-image","url("+img.GetAttribute("src")+")");
self.invoke_recursive("loadvalue");
self.bubble_event("rtepropsaved");
}
editor.ShowXmlDialog(editor.BuildDialogUrl("insertgallery.xml"),newoption);
]]>
</method>
</panel>
<panel jsml-base="properties_background" />
</jsml>

View File

@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="properties_text" dock="fill">
<groupbox text="@BLOCK" dock="top" overflow="visible" margin="4">
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="text-indent:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:text-indent"/>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="line-height:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:line-height"/>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="vertical-align:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:vertical-align" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="top" text="@TOP" />
<listitem value="middle" text="@MIDDLE" />
<listitem value="bottom" text="@BOTTOM" />
<listitem value="sub" text="@SUBSCRIPT" />
<listitem value="super" text="@SUPERSCRIPT" />
<listitem value="baseline" text="baseline" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="text-align:" width="120" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:text-align" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="left" text="@LEFT" />
<listitem value="center" text="@CENTER" />
<listitem value="right" text="@RIGHT" />
<listitem value="justify" text="@JUSTIFY" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="direction:" width="120" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:direction" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="ltr" text="@DIRECTION_LTR" />
<listitem value="rtl" text="@DIRECTION_RTL" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="white-space:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:white-space" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="pre" text="pre" />
<listitem value="nowrap" text="nowrap" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="word-spacing:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:word-spacing"/>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="letter-spacing:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:letter-spacing"/>
</panel>
</groupbox>
</panel>
<panel jsml-base="properties_text" />
</jsml>

View File

@@ -0,0 +1,259 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="properties_border" dock="fill">
<groupbox text="@BORDER" dock="top" overflow="visible" margin="4">
<panel dock="left" width="90">
<panel margin="3,3,3,3" height="18" dock="top">
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="top:" text_align="right"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="right:" text_align="right"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="bottom:" text_align="right"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="left:" text_align="right"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" width="80" text="@borderradius|:" vertical_align="middle" text_align="right" />
</panel>
</panel>
<panel dock="left" width="110">
<panel margin="3,3,3,3" height="18" dock="top">
<panel dock="left" width="4" />
<label dock="left" vertical_align="middle" width="100" text="border-style:" />
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<checkbox dock="left" jsml-local="cbstyle" />
<label dock="left" vertical_align="middle" width="70" text="@SAMEFORALL" unselectable="true">
<attach name="click">
cbmargin.set_checked(!cbmargin.get_checked());
cbmargin.invoke_event("change");
</attach>
</label>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:border-top-style" width="100" jsml-local="tbstyletop">
<listitem value="" text="@NOTSET" />
<listitem value="none" text="none" />
<listitem value="hidden" text="hidden" />
<listitem value="dotted" text="dotted" />
<listitem value="dashed" text="dashed" />
<listitem value="solid" text="solid" />
<listitem value="double" text="double" />
<listitem value="groove" text="groove" />
<listitem value="ridge" text="ridge" />
<listitem value="inset" text="inset" />
<listitem value="outset" text="outset" />
<listitem value="inherit" text="inherit" />
</panel>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:border-right-style" width="100" jsml-local="tbstyleright">
<listitem value="" text="@NOTSET" />
<listitem value="none" text="none" />
<listitem value="hidden" text="hidden" />
<listitem value="dotted" text="dotted" />
<listitem value="dashed" text="dashed" />
<listitem value="solid" text="solid" />
<listitem value="double" text="double" />
<listitem value="groove" text="groove" />
<listitem value="ridge" text="ridge" />
<listitem value="inset" text="inset" />
<listitem value="outset" text="outset" />
<listitem value="inherit" text="inherit" />
</panel>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:border-bottom-style" width="100" jsml-local="tbstylebottom">
<listitem value="" text="@NOTSET" />
<listitem value="none" text="none" />
<listitem value="hidden" text="hidden" />
<listitem value="dotted" text="dotted" />
<listitem value="dashed" text="dashed" />
<listitem value="solid" text="solid" />
<listitem value="double" text="double" />
<listitem value="groove" text="groove" />
<listitem value="ridge" text="ridge" />
<listitem value="inset" text="inset" />
<listitem value="outset" text="outset" />
<listitem value="inherit" text="inherit" />
</panel>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:border-left-style" width="100" jsml-local="tbstyleleft">
<listitem value="" text="@NOTSET" />
<listitem value="none" text="none" />
<listitem value="hidden" text="hidden" />
<listitem value="dotted" text="dotted" />
<listitem value="dashed" text="dashed" />
<listitem value="solid" text="solid" />
<listitem value="double" text="double" />
<listitem value="groove" text="groove" />
<listitem value="ridge" text="ridge" />
<listitem value="inset" text="inset" />
<listitem value="outset" text="outset" />
<listitem value="inherit" text="inherit" />
</panel>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<panel dock="left" width="4" />
<panel dock="left" width="100" jsml-base="rtepropnumupdown" propname="style:border-radius" suffix="px" min_value="0" />
</panel>
</panel>
<panel dock="left" width="110">
<panel margin="3,3,3,3" height="18" dock="top">
<panel dock="left" width="4" />
<label dock="left" vertical_align="middle" width="100" text="border-width:" />
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<checkbox dock="left" jsml-local="cbwidth" />
<label dock="left" vertical_align="middle" width="70" text="@SAMEFORALL" unselectable="true">
<attach name="click">
cbmargin.set_checked(!cbmargin.get_checked());
cbmargin.invoke_event("change");
</attach>
</label>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:border-top-width" jsml-local="tbwidthtop"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:border-right-width" jsml-local="tbwidthright"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:border-bottom-width" jsml-local="tbwidthbottom"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:border-left-width" jsml-local="tbwidthleft"/>
</panel>
</panel>
<panel dock="left" width="110">
<panel margin="3,3,3,3" height="18" dock="top">
<panel dock="left" width="4" />
<label dock="left" vertical_align="middle" width="100" text="border-color:" />
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<checkbox dock="left" jsml-local="cbcolor" />
<label dock="left" vertical_align="middle" width="70" text="@SAMEFORALL" unselectable="true">
<attach name="click">
cbmargin.set_checked(!cbmargin.get_checked());
cbmargin.invoke_event("change");
</attach>
</label>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropcolorbox" propname="style:border-top-color" jsml-local="tbcolortop"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropcolorbox" propname="style:border-right-color" jsml-local="tbcolorright"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropcolorbox" propname="style:border-bottom-color" jsml-local="tbcolorbottom"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropcolorbox" propname="style:border-left-color" jsml-local="tbcolorleft"/>
</panel>
</panel>
</groupbox>
<panel margin="3,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="*Requires a CSS 3 compliant browser to view" width="300"/>
</panel>
<method name="bindrectlogic" arguments="mainstyle,cb,a,b,c,d">
<![CDATA[
var arr=[a,b,c,d];
function handletbchange()
{
if(cb.get_checked())
{
var v=a.get_node_value();
a.set_node_value(null);
option.targetnode.SetStyle("border-" + mainstyle,v);
}
}
function handlecbchange()
{
var v=option.targetnode.GetStyle("border-" + mainstyle)||a.get_node_value();
if(cb.get_checked())
{
option.targetnode.SetStyle("border-" + mainstyle,v);
for(var i=0;i<arr.length;i++)
{
arr[i].set_node_value(null);
arr[i].set_ctrl_value("");
}
a.set_node_value(null);
a.set_ctrl_value(v);
}
else
{
var attrs = ["border-top-" + mainstyle,"border-right-" + mainstyle,"border-bottom-" + mainstyle,"border-left-" + mainstyle];
for(var i=0;i<arr.length;i++)
{
arr[i].set_node_value(option.targetnode.GetStyle(attrs[i])||(!!cb._hasloaded?v:null));
arr[i].set_ctrl_value(option.targetnode.GetStyle(attrs[i])||(!!cb._hasloaded?v:""));
}
option.targetnode.SetStyle("border-" + mainstyle,null);
}
for(var i=0;i<arr.length;i++)
{
if(i>0)arr[i].set_disabled(cb.get_checked());
}
}
cb.attach_event("change",handlecbchange);
var anyval=null;
for(var i=0;i<arr.length;i++)
{
if(!anyval)anyval=arr[i].get_node_value();
arr[i].attach_event("change",handletbchange);
}
cb.set_checked(!anyval);
handlecbchange();
]]>
</method>
<method name ="bindallrect">
<![CDATA[
self.bindrectlogic("style",cbstyle,tbstyletop,tbstyleright,tbstylebottom,tbstyleleft);
self.bindrectlogic("width",cbwidth,tbwidthtop,tbwidthright,tbwidthbottom,tbwidthleft);
self.bindrectlogic("color",cbcolor,tbcolortop,tbcolorright,tbcolorbottom,tbcolorleft);
]]>
</method>
<initialize>
setTimeout(self.delegate(self.bindallrect),111);
</initialize>
</panel>
<panel jsml-base="properties_border" />
</jsml>

View File

@@ -0,0 +1,189 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="properties_text" dock="fill">
<groupbox text="@BOX" dock="top" overflow="visible" margin="4">
<panel dock="left" width="180">
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="padding:" text_align="right"/>
<panel dock="left" width="4" />
<checkbox dock="left" jsml-local="cbpadding" />
<label dock="left" vertical_align="middle" width="70" text="@SAMEFORALL" unselectable="true">
<attach name="click">
cbpadding.set_checked(!cbpadding.get_checked());
cbpadding.invoke_event("change");
</attach>
</label>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="top:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:padding-top" jsml-local="tbpaddingtop"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="right:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:padding-right" jsml-local="tbpaddingright"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="bottom:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:padding-bottom" jsml-local="tbpaddingbottom"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="left:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:padding-left" jsml-local="tbpaddingleft"/>
</panel>
</panel>
<panel dock="left" width="200">
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="margin:" text_align="right"/>
<panel dock="left" width="4" />
<checkbox dock="left" jsml-local="cbmargin" />
<label dock="left" vertical_align="middle" width="70" text="@SAMEFORALL" unselectable="true">
<attach name="click">
cbmargin.set_checked(!cbmargin.get_checked());
cbmargin.invoke_event("change");
</attach>
</label>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="top:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:margin-top" jsml-local="tbmargintop"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="right:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:margin-right" jsml-local="tbmarginright"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="bottom:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:margin-bottom" jsml-local="tbmarginbottom"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="left:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:margin-left" jsml-local="tbmarginleft"/>
</panel>
</panel>
</groupbox>
<groupbox text="@boxshadow" dock="top" overflow="visible" margin="4">
<panel dock="left" width="180">
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="x*:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:top"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="blur:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:right"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="color:" width="80" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropcolorbox" propname="style:color" width="100" />
</panel>
</panel>
<panel dock="left" width="200">
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="y*:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:top"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="spread*:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:right"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="inset*:" width="80" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:text-align" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="left" text="@LEFT" />
<listitem value="center" text="@CENTER" />
<listitem value="right" text="@RIGHT" />
<listitem value="justify" text="@JUSTIFY" />
</panel>
</panel>
</panel>
</groupbox>
<panel margin="3,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="*Requires a CSS 3 compliant browser to view" width="300"/>
</panel>
<method name="bindrectlogic" arguments="mainstyle,cb,a,b,c,d">
<![CDATA[
var arr=[a,b,c,d];
function handletbchange()
{
if(cb.get_checked())
{
var v=a.get_node_value();
a.set_node_value(null);
option.targetnode.SetStyle(mainstyle,v);
}
}
function handlecbchange()
{
var v=option.targetnode.GetStyle(mainstyle)||a.get_node_value();
if(cb.get_checked())
{
option.targetnode.SetStyle(mainstyle,v);
for(var i=0;i<arr.length;i++)
{
arr[i].set_node_value(null);
arr[i].set_ctrl_value("");
}
a.set_node_value(null);
a.set_ctrl_value(v);
}
else
{
var attrs = [mainstyle+"-top",mainstyle+"-right",mainstyle+"-bottom",mainstyle+"-left"];
for(var i=0;i<arr.length;i++)
{
arr[i].set_node_value(option.targetnode.GetStyle(attrs[i])||(!!cb._hasloaded?v:null));
arr[i].set_ctrl_value(option.targetnode.GetStyle(attrs[i])||(!!cb._hasloaded?v:""));
}
option.targetnode.SetStyle(mainstyle,null);
}
for(var i=0;i<arr.length;i++)
{
if(i>0)arr[i].set_disabled(cb.get_checked());
}
cb._hasloaded = true;
}
cb.attach_event("change",handlecbchange);
var anyval=null;
for(var i=0;i<arr.length;i++)
{
if(!anyval)anyval=arr[i].get_node_value();
arr[i].attach_event("change",handletbchange);
}
cb.set_checked(!anyval);
handlecbchange();
]]>
</method>
<method name ="bindallrect">
<![CDATA[
self.bindrectlogic("padding",cbpadding,tbpaddingtop,tbpaddingright,tbpaddingbottom,tbpaddingleft);
self.bindrectlogic("margin",cbmargin,tbmargintop,tbmarginright,tbmarginbottom,tbmarginleft);
]]>
</method>
<initialize>
setTimeout(self.delegate(self.bindallrect),111);
</initialize>
</panel>
<panel jsml-base="properties_text" />
</jsml>

View File

@@ -0,0 +1,258 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="properties_font_decoration" jsml-base="rtepropctrl" propname="style:text-decoration" overflow="visible">
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="100" text="text-decoration:"/>
</panel>
<panel margin="3,3,1,3" height="18" dock="top">
<checkbox dock="left" jsml-local="cbu">
<attach name="change,click">
instance.invoke_event("checkedchange",cbu);
</attach>
</checkbox>
<label dock="left" vertical_align="middle" width="70" text="underline" unselectable="true">
<attach name="click,dblclick">
cbu.set_checked(!cbu.get_checked());
instance.invoke_event("checkedchange",cbu);
</attach>
</label>
</panel>
<panel margin="3,3,1,3" height="18" dock="top">
<checkbox dock="left" jsml-local="cbo">
<attach name="change,click">
instance.invoke_event("checkedchange",cbo);
</attach>
</checkbox>
<label dock="left" vertical_align="middle" width="70" text="overline" unselectable="true">
<attach name="click,dblclick">
cbo.set_checked(!cbo.get_checked());
instance.invoke_event("checkedchange",cbo);
</attach>
</label>
</panel>
<panel margin="3,3,1,3" height="18" dock="top">
<checkbox dock="left" jsml-local="cbs">
<attach name="change,click">
instance.invoke_event("checkedchange",cbs);
</attach>
</checkbox>
<label dock="left" vertical_align="middle" width="70" text="line-through" unselectable="true">
<attach name="click,dblclick">
cbs.set_checked(!cbs.get_checked());
instance.invoke_event("checkedchange",cbs);
</attach>
</label>
</panel>
<panel margin="3,3,1,3" height="18" dock="top">
<checkbox dock="left" jsml-local="cbb">
<attach name="change,click">
instance.invoke_event("checkedchange",cbb);
</attach>
</checkbox>
<label dock="left" vertical_align="middle" width="70" text="blink" unselectable="true">
<attach name="click,dblclick">
cbb.set_checked(!cbb.get_checked());
instance.invoke_event("checkedchange",cbb);
</attach>
</label>
</panel>
<panel margin="3,3,1,3" height="18" dock="top">
<checkbox dock="left" jsml-local="cbi">
<attach name="change,click">
instance.invoke_event("checkedchange",cbi);
</attach>
</checkbox>
<label dock="left" vertical_align="middle" width="70" text="inherit" unselectable="true">
<attach name="click,dblclick">
cbi.set_checked(!cbi.get_checked());
instance.invoke_event("checkedchange",cbi);
</attach>
</label>
</panel>
<panel margin="3,3,1,3" height="18" dock="top">
<checkbox dock="left" jsml-local="cbn">
<attach name="change,click">
instance.invoke_event("checkedchange",cbn);
</attach>
</checkbox>
<label dock="left" vertical_align="middle" width="70" text="none" unselectable="true">
<attach name="click,dblclick">
cbn.set_checked(!cbn.get_checked());
instance.invoke_event("checkedchange",cbn);
</attach>
</label>
</panel>
<attach name="checkedchange" arguments="je,cb">
<![CDATA[
var arr=[cbn,cbi,cbb,cbu,cbo,cbs];
if(cb.get_checked())
{
if(cb==cbn||cb==cbi||cb==cbb)
{
for(var i=0;i<arr.length;i++)
{
if(arr[i]==cb)
continue;
arr[i].set_checked(false);
}
}
if(cb==cbu||cb==cbo||cb==cbs)
{
cbn.set_checked(false);
cbi.set_checked(false);
cbb.set_checked(false);
}
}
self.invoke_event("change");
]]>
</attach>
<property name="ctrl_value">
<get>
<![CDATA[
if(cbn.get_checked())
return "none";
if(cbb.get_checked())
return "blink";
if(cbi.get_checked())
return "inherit";
var arr=[];
if(cbu.get_checked())arr.push("underline");
if(cbo.get_checked())arr.push("overline");
if(cbs.get_checked())arr.push("line-through");
return arr.join(" ");
]]>
</get>
<set>
value=String(value||"");
cbu.set_checked(value.indexOf("underline")!=-1)
cbo.set_checked(value.indexOf("overline")!=-1)
cbs.set_checked(value.indexOf("line-through")!=-1)
cbb.set_checked(value.indexOf("blink")!=-1)
cbi.set_checked(value.indexOf("inherit")!=-1)
cbn.set_checked(value.indexOf("none")!=-1)
</set>
</property>
</panel>
<panel jsml-class="properties_font" dock="fill" >
<groupbox text="@FONT" dock="top" overflow="visible" margin="4">
<panel dock="top" overflow="visible">
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="font-family:" width="100" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:font-family" width="250">
<listitem value="" text="@NOTSET" />
<listitem value="Arial" text="Arial" />
<listitem value="Verdana" text="Verdana" />
<listitem value="Tahoma" text="Tahoma" />
<listitem value="Segoe UI" text="Segoe UI" />
<listitem value="Sans-Serif" text="Sans-Serif" />
<listitem value="Comic Sans MS" text="Comic Sans MS" />
<listitem value="Courier New" text="Courier New" />
<listitem value="Georgia" text="Georgia" />
<listitem value="Impact" text="Impact" />
<listitem value="Lucida Console" text="Lucida Console" />
<listitem value="Times New Roman" text="Times New Roman" />
<listitem value="Trebuchet MS" text="Trebuchet MS" />
<listitem value="Monospace" text="Monospace" />
<listitem value="caption" text="Caption" />
<listitem value="small-caption" text="Small caption" />
<listitem value="icon" text="Icon labels" />
<listitem value="menu" text="Menu text" />
<listitem value="message-box" text="Message box" />
<listitem value="status-bar" text="Status bar" />
</panel>
</panel>
</panel>
<panel dock="left" width="200">
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="100" text="font-size:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:font-size"/>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="font-weight:" width="100" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:font-weight" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="normal" text="normal" />
<listitem value="bold" text="bold" />
<listitem value="bolder" text="bolder" />
<listitem value="lighter" text="lighter" />
<listitem value="inherit" text="inherit" />
<listitem value="100" text="100" />
<listitem value="200" text="200" />
<listitem value="300" text="300" />
<listitem value="400" text="400" />
<listitem value="500" text="500" />
<listitem value="600" text="600" />
<listitem value="700" text="700" />
<listitem value="800" text="800" />
<listitem value="900" text="900" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="font-style:" width="100" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:font-style" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="normal" text="normal" />
<listitem value="italic" text="italic" />
<listitem value="oblique" text="oblique" />
<listitem value="inherit" text="inherit" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="font-variant:" width="100" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:font-variant" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="normal" text="normal" />
<listitem value="small-caps" text="small-caps" />
<listitem value="inherit" text="inherit" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="text-transform:" width="100" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:text-transform" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="capitalize" text="@CAPITALIZE" />
<listitem value="uppercase" text="@UPPERCASE" />
<listitem value="lowercase" text="@LOWERCASE" />
<listitem value="none" text="@none" />
<listitem value="inherit" text="@inherit" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="text-align:" width="100" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:text-align" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="left" text="@LEFT" />
<listitem value="center" text="@CENTER" />
<listitem value="right" text="@RIGHT" />
<listitem value="justify" text="@JUSTIFY" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="color:" width="100" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropcolorbox" propname="style:color" width="100" />
</panel>
</panel>
<panel dock="left" width="30">
</panel>
<panel dock="right" width="200">
<panel dock="fill" jsml-base="properties_font_decoration" />
</panel>
</groupbox>
</panel>
<panel jsml-base="properties_font" />
</jsml>

View File

@@ -0,0 +1,190 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="properties_text" dock="fill">
<groupbox text="@LAYOUT" dock="top" overflow="visible" margin="4">
<panel dock="left" width="180">
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="visibility:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:visibility" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="visible" text="visible" />
<listitem value="hidden" text="hidden" />
<listitem value="collapse" text="collapse" />
<listitem value="inherit" text="inherit" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="display:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:display" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="none" text="none" />
<listitem value="block" text="block" />
<listitem value="inline" text="inline" />
<listitem value="inline-block" text="inline-block" />
<listitem value="inline-table" text="inline-table" />
<listitem value="list-item" text="list-item" />
<listitem value="table" text="table" />
<listitem value="table-caption" text="table-caption" />
<listitem value="table-cell" text="table-cell" />
<listitem value="table-column " text="table-column " />
<listitem value="table-row" text="table-row" />
<listitem value="inherit" text="inherit" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="float:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:float" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="none" text="none" />
<listitem value="left" text="left" />
<listitem value="right" text="right" />
<listitem value="inherit" text="inherit" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="clear:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:clear" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="none" text="none" />
<listitem value="left" text="left" />
<listitem value="right" text="right" />
<listitem value="both" text="both" />
<listitem value="inherit" text="inherit" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="cursor:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:cursor" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="auto" text="auto" />
<listitem value="pointer" text="pointer" />
<listitem value="default" text="default" />
<listitem value="text" text="text" />
<listitem value="wait" text="wait" />
<listitem value="move" text="move" />
<listitem value="help" text="help" />
<listitem value="crosshair" text="crosshair" />
<listitem value="progress" text="progress" />
<listitem value="e-resize" text="e-resize" />
<listitem value="n-resize" text="n-resize" />
<listitem value="ne-resize" text="ne-resize" />
<listitem value="nw-resize" text="nw-resize" />
<listitem value="s-resize" text="s-resize" />
<listitem value="se-resize" text="se-resize" />
<listitem value="sw-resize" text="sw-resize" />
<listitem value="w-resize" text="w-resize" />
</panel>
</panel>
</panel>
<panel dock="left" width="200">
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="overflow:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:overflow" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="visible" text="visible" />
<listitem value="hidden" text="hidden" />
<listitem value="scroll" text="scroll" />
<listitem value="auto" text="auto" />
<listitem value="inherit" text="inherit" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="clip:" text_align="right"/>
<panel dock="left" width="4" />
<label dock="left" vertical_align="middle" width="100" text="rect(...)"/>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="top:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropnumupdown" width="100" propname="style:clip" suffix="px" jsml-local="cliptop">
<method name="set_node_value">
instance.set_clip_value(0,value);
</method>
<method name="get_node_value">
return instance.get_clip_value(0);
</method>
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="right:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropnumupdown" width="100" propname="style:clip" suffix="px" jsml-local="clipright">
<method name="set_node_value">
instance.set_clip_value(1,value);
</method>
<method name="get_node_value">
return instance.get_clip_value(1);
</method>
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="bottom:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropnumupdown" width="100" propname="style:clip" suffix="px" jsml-local="clipbottom">
<method name="set_node_value">
instance.set_clip_value(2,value);
</method>
<method name="get_node_value">
return instance.get_clip_value(2);
</method>
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="left:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropnumupdown" width="100" propname="style:clip" suffix="px" jsml-local="clipleft">
<method name="set_node_value">
instance.set_clip_value(3,value);
</method>
<method name="get_node_value">
return instance.get_clip_value(3);
</method>
</panel>
</panel>
<panel margin="7,3,30,3" height="18" dock="top">
</panel>
</panel>
</groupbox>
<method name="find_node">
<![CDATA[
for(var p=self;p&&p.get_parent;p=p.get_parent())
if(p._rtenode)
return p._rtenode;
]]>
</method>
<method name="get_clip_value" arguments="index">
<![CDATA[
var node=self.find_node();
var clip=node.GetStyle("clip");
if(!clip)return null;
return clip.replace(/.*rect\((.*)\s(.*)\s(.*)\s(.*)\).*/g,"$"+(index+1))
]]>
</method>
<method name="set_clip_value" arguments="index,value">
<![CDATA[
var node=self.find_node();
var clip=node.GetStyle("clip");
if(!clip&&!value)return;
clip=(clip||"").replace(/.*rect\((.*)\s(.*)\s(.*)\s(.*)\).*/g,"$1,$2,$3,$4").split(",");
if(clip.length!=4)clip=["0px","0px","0px","0px"];
clip[index]=value;
clip=clip.join(" ");
if(clip=="0px 0px 0px 0px")
clip=null;
else
clip="rect("+clip+")";
node.SetStyle("clip",clip);
]]>
</method>
</panel>
<panel jsml-base="properties_text" />
</jsml>

View File

@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="properties_background" dock="fill">
<groupbox text="@LIST" dock="top" overflow="visible" margin="4">
<panel margin="7,3,4,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="list-style-type:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" width="100" propname="style:list-style-type">
<listitem value="" text="@NOTSET" />
<listitem value="circle" text="@listcircle" />
<listitem value="disc" text="@listdisc" />
<listitem value="disc" text="@listdisc" />
<listitem value="none" text="@none" />
<listitem value="square" text="@listsquare" />
<listitem value="decimal" text="@listdecimal" />
<listitem value="lower-roman" text="@lowerroman" />
<listitem value="upper-roman" text="@upperroman" />
<listitem value="lower-latin" text="@lowerlatin" />
<listitem value="upper-latin" text="@upperlatin" />
</panel>
</panel>
<panel margin="7,3,4,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="list-style-image:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" width="240" propname="style:list-style-image">
<method name="set_node_value" overrideas="base_set_value">
<![CDATA[
if(!value)
{
self.base_set_value("");
}
else
{
self.base_set_value("url("+value+")");
}
]]>
</method>
<method name="get_node_value" overrideas="base_get_value">
var url=self.base_get_value();
if(!url)return "";
return url.replace(/url\(["']?(.*)["']?\)/gi,"$1");
</method>
</panel>
<panel dock="left" width="4" />
<button dock="left" height="24" width="30" text="...">
<attach name="click">
instance.showuploadfile(self);
</attach>
</button>
</panel>
<panel margin="7,3,4,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="list-style-position:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" width="100" propname="style:list-style-position">
<listitem value="" text="@NOTSET" />
<listitem value="inside" text="inside" />
<listitem value="outside" text="outside" />
<listitem value="inherit" text="inherit" />
</panel>
</panel>
<panel margin="7,3,30,3" height="18" dock="top">
</panel>
</groupbox>
<method name="find_node">
<![CDATA[
for(var p=self;p&&p.get_parent;p=p.get_parent())
if(p._rtenode)
return p._rtenode;
]]>
</method>
<method name="showuploadfile" arguments="anchor">
<![CDATA[
var img=new $rte.GenericElement("img");
var newoption={width:640,height:420,targetnode:img};
newoption.nestedmode=true;
newoption.callback=function(res)
{
if(!res)return;
option.targetnode.SetStyle("list-style-image","url("+img.GetAttribute("src")+")");
self.invoke_recursive("loadvalue");
self.bubble_event("rtepropsaved");
}
editor.ShowXmlDialog(editor.BuildDialogUrl("insertgallery.xml"),newoption);
]]>
</method>
</panel>
<panel jsml-base="properties_background" />
</jsml>

View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="properties_other" dock="fill">
<groupbox text="@OTHER" dock="top" overflow="visible" margin="3">
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" width="40" overflow="visible" text="@ZINDEX|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropunitbox" width="80" propname="style:z-index" />
<panel dock="left" width="12"/>
<label dock="left" vertical_align="middle" width="32" text="@CURSOR|:"/>
<panel dock="left" jsml-base="rtepropdropdown" propname="style:cursor">
<listitem value="" text="@NOTSET" />
<listitem value="pointer" text="@CURSORPOINTER" />
<listitem value="text" text="@CURSORTEXT" />
<listitem value="wait" text="@CURSORWAIT" />
<listitem value="move" text="@CURSORMOVE" />
<listitem value="help" text="@CURSORHELP" />
<listitem value="crosshair" text="@CURSORCROSSHAIR" />
</panel>
</panel>
</groupbox>
<groupbox text="@PRINT" dock="top" overflow="visible" margin="3">
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" width="40" overflow="visible" text="@PAGEBREAKBEFORE|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:page-break-before">
<listitem value="" text="@NOTSET" />
<listitem value="always" text="@ALWAYS" />
</panel>
<panel dock="left" width="12"/>
<label dock="left" vertical_align="middle" width="32" text="@PAGEBREAKAFTER|:"/>
<panel dock="left" jsml-base="rtepropdropdown" propname="style:page-break-after">
<listitem value="" text="@NOTSET" />
<listitem value="always" text="@ALWAYS" />
</panel>
</panel>
</groupbox>
</panel>
<panel jsml-base="properties_other" />
</jsml>

View File

@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="properties_text" dock="fill">
<groupbox text="@POSITION" dock="top" overflow="visible" margin="4">
<panel dock="left" width="180">
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="position:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:position" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="static" text="static" />
<listitem value="absolute" text="absolute" />
<listitem value="fixed" text="fixed" />
<listitem value="relative" text="relative" />
<listitem value="inherit" text="inherit" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" width="80" overflow="visible" text="z-index:" vertical_align="middle" text_align="right" />
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropnumupdown" width="100" propname="style:z-index" />
</panel>
</panel>
<panel dock="left" width="200">
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="width:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:width"/>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="height:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:height"/>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="top:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:top"/>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="right:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:right"/>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="bottom:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:bottom"/>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="left:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:left"/>
</panel>
</panel>
</groupbox>
</panel>
<panel jsml-base="properties_text" />
</jsml>

View File

@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="properties_background" dock="fill">
<groupbox text="@TABLE" dock="top" overflow="visible" margin="4">
<panel margin="7,3,4,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="table-layout:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" width="100" propname="style:table-layout">
<listitem value="" text="@NOTSET" />
<listitem value="auto" text="auto" />
<listitem value="fixed" text="fixed" />
<listitem value="inherit" text="inherit" />
</panel>
</panel>
<panel margin="7,3,4,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="border-collapse:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" width="100" propname="style:border-collapse">
<listitem value="" text="@NOTSET" />
<listitem value="collapse" text="collapse" />
<listitem value="separate" text="separate" />
<listitem value="inherit" text="inherit" />
</panel>
</panel>
<panel margin="7,3,4,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="border-spacing:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:border-spacing"/>
</panel>
<panel margin="7,3,4,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="empty-cells:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" width="100" propname="style:empty-cells">
<listitem value="" text="@NOTSET" />
<listitem value="hide" text="hide" />
<listitem value="show" text="show" />
<listitem value="inherit" text="inherit" />
</panel>
</panel>
<panel margin="7,3,4,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="120" text="caption-side:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" width="100" propname="style:caption-side">
<listitem value="" text="@NOTSET" />
<listitem value="top" text="top" />
<listitem value="bottom" text="bottom" />
<listitem value="inherit" text="inherit" />
</panel>
</panel>
<panel margin="7,3,30,3" height="18" dock="top">
</panel>
</groupbox>
<method name="find_node">
<![CDATA[
for(var p=self;p&&p.get_parent;p=p.get_parent())
if(p._rtenode)
return p._rtenode;
]]>
</method>
<method name="get_position_value" arguments="isvtc,dropdown">
<![CDATA[
var node=self.find_node();
var pos=node.GetStyle("background-position");
if(!pos)return null;
pos=pos.split(' ')[isvtc?0:1];
if(!pos)return null;
if(dropdown)
{
if(isNaN(parseInt(pos)))
return pos;
}
else
{
if(!isNaN(parseInt(pos)))
return pos;
}
return null;
]]>
</method>
<method name="set_position_value" arguments="isvtc,value">
<![CDATA[
var node=self.find_node();
var pos=node.GetStyle("background-position")||"";
var pair=pos.split(' ');
if(pair.length!=2)
{
if(!value)
{
node.SetStyle("background-position",null)
return;
}
pair=["0px","0px"];
}
pair[isvtc?0:1]=value||"0px";
pos=pair.join(" ");
if(pos=="0px 0px")
pos=null;
node.SetStyle("background-position",pos)
]]>
</method>
</panel>
<panel jsml-base="properties_background" />
</jsml>

View File

@@ -0,0 +1,241 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="properties_taga" dock="fill">
<groupbox text="@LINK" dock="top" overflow="visible" margin="3">
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@URL|:" width="72" text_align="right"/>
<panel dock="left" width="6" />
<panel jsml-base="rteproptextbox" dock="left" propname="href" width="300" jsml-local="tbhref">
<attach name="change,loadvalue,attach_dom">
<![CDATA[
instance.syncurltotext();
var ddltext=ddltype.get_text();
var href=self.get_text();
if(ddltext&&href.substring(0,ddltext.length)==ddltext)return;
for(var i=0;i<ddltype._items.length;i++)
{
ddltext=ddltype._items[i].get_value();
if(href.substring(0,ddltext.length)!=ddltext)
continue;
ddltype.set_text(ddltext);
break;
}
]]>
</attach>
</panel>
<!--
<image jsml-base="imagebutton" dock="left" width="20" src="{folder}images/anchor.png" padding="-1,1,1,-1" margin="0,1,0,1">
<attach name="click">
instance.showfindanchor(self);
</attach>
</image>
-->
<panel dock="left" width="6" />
<image jsml-base="imagebutton" dock="left" width="20" tooltip="@INTERNALLINK" src="{folder}images/node-tree.png" padding="-1,1,1,-1" margin="0,1,0,1">
<attach name="click">
instance.showfindurl(self);
</attach>
</image>
<panel dock="left" width="6" />
<button dock="left" width="65" text="@BROWSE|.." height="22" css_class="dialogbutton">
<attach name="click">
instance.showuploadfile(self);
</attach>
</button>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@TYPE|:" width="72" text_align="right"/>
<panel dock="left" width="6" />
<dropdown dock="left" jsml-local="ddltype" width="100" border_color="#cccccc">
<attach name="change">
tbhref.set_text(self.get_text());
tbhref.invoke_event("change");
</attach>
<listitem text="http://" value="http://" />
<listitem text="https://" value="https://" />
<listitem text="news://" value="news://" />
<listitem text="ftp://" value="ftp://" />
<listitem text="mailto:" value="mailto:" />
<listitem text="@OTHER" value="" />
</dropdown>
<panel dock="left" width="12" />
<label dock="left" vertical_align="middle" text="@ATTR_TARGET|:" text_align="right" width="60"/>
<panel dock="left" width="6" />
<panel dock="left" jsml-base="rtepropdropdown" propname="target" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="_blank" text="@ATTR_TARGETBLANK" />
<listitem value="_parent" text="@ATTR_TARGETPARENT" />
<listitem value="_self" text="@ATTR_TARGETSELF" />
<listitem value="_top" text="@ATTR_TARGETTOP" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="ID:" width="72" text_align="right"/>
<panel dock="left" width="6" />
<panel jsml-base="rteproptextbox" dock="left" propname="id" width="100"/>
<panel dock="left" width="12"/>
<label dock="left" vertical_align="middle" text="@CSSCLASS|:" text_align="right" width="60"/>
<panel dock="left" width="6" />
<panel jsml-base="rteproptextbox" dock="left" propname="class" width="100" />
<panel dock="left" width="12"/>
<label dock="left" vertical_align="middle" width="60" text="@NOFOLLOW|:" text_align="right" unselectable="true">
<attach name="click,dblclick">
cbnofollow.toggle_checked();
</attach>
</label>
<panel dock="left" jsml-base="rtepropcheckbox" propname="rel" truestring="nofollow" falsestring="" jsml-local="cbnofollow" />
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@ACCESSKEY|:" width="72" text_align="right"/>
<panel dock="left" width="6" />
<panel jsml-base="rteproptextbox" dock="left" propname="accesskey" width="100" />
<panel dock="left" width="12" />
<label dock="left" vertical_align="middle" text="@TABINDEX|:" text_align="right" width="60"/>
<panel dock="left" width="6" />
<panel jsml-base="rteproptextbox" dock="left" propname="tabindex" width="100" />
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="72" text_align="right" text="@CURSOR|:"/>
<panel dock="left" width="6" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:cursor" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="auto" text="auto" />
<listitem value="pointer" text="pointer" />
<listitem value="default" text="default" />
<listitem value="text" text="text" />
<listitem value="wait" text="wait" />
<listitem value="move" text="move" />
<listitem value="help" text="help" />
<listitem value="crosshair" text="crosshair" />
<listitem value="progress" text="progress" />
<listitem value="e-resize" text="e-resize" />
<listitem value="n-resize" text="n-resize" />
<listitem value="ne-resize" text="ne-resize" />
<listitem value="nw-resize" text="nw-resize" />
<listitem value="s-resize" text="s-resize" />
<listitem value="se-resize" text="se-resize" />
<listitem value="sw-resize" text="sw-resize" />
<listitem value="w-resize" text="w-resize" />
</panel>
<panel dock="left" width="12" />
<label dock="left" vertical_align="middle" text_align="right" width="60" text="@COLOR|:"/>
<panel dock="left" width="6" />
<panel dock="left" jsml-base="rtepropcolorbox" propname="style:color" width="100" />
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@LINKTEXT|:" width="72" text_align="right"/>
<panel dock="left" width="6" />
<panel jsml-base="rteproptextbox" dock="left" propname="text" width="300" jsml-local="tbtext">
<method name="get_node_value">
var node=self.find_node();
return node.GetInnerText();
</method>
<method name="set_node_value">
var node=self.find_node();
node.SetInnerText(value);
</method>
<attach name="change">
instance.stopsynctext();
</attach>
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@TOOLTIP|:" width="72" text_align="right"/>
<panel dock="left" width="6" />
<panel jsml-base="rteproptextbox" dock="left" propname="title" width="300" />
</panel>
<panel margin="15,3,30,3" dock="top" height="18" overflow="visible">
<panel dock="left" width="78" />
<panel dock="left" jsml-base="panelbutton" border_color="#CDCDCD" overflow="visible" back_color="#f7f7f7" padding="0,3,0,3" width="254" css_class="dialogbutton">
<image dock="left" src="{folder}images/anchor.png" width="20" />
<label text="@EXISTINGANCHOR" dock="left" width="230" vertical_align="middle" cursor="pointer" />
<attach name="click">
instance.showfindanchor(self);
</attach>
</panel>
</panel>
</groupbox>
<initialize>
setTimeout(self.delegate(self.initsynctext),100);
</initialize>
<method name="stopsynctext">
self.initsynctext();
</method>
<method name="initsynctext">
<![CDATA[
self._synctotext=false;
if(editor._config.dialog_tag_a_disablesynclinktotext)
return;
var child=option.targetnode.GetChildAt(0);
if(child&&child.nodeType==1&&child.IsControl())
return;
var text=tbtext.get_ctrl_value();
if(!text||text==editor._config.default_link_text)
self._synctotext=true;
else if(text==option.targetnode.GetAttribute("href"))
self._synctotext=true;
]]>
</method>
<method name="syncurltotext">
<![CDATA[
if(!self._synctotext)return;
option.targetnode.SetInnerText(option.targetnode.GetAttribute("href")||"")
tbtext.invoke_event("loadvalue");
]]>
</method>
<method name="showfindanchor" arguments="ctrl">
<![CDATA[
var newoption={};
newoption.control=ctrl
newoption.handlehref=function(href)
{
tbhref.set_text(href);
tbhref.invoke_event("change");
}
editor.ShowXmlFloatBox(editor.BuildDialogUrl("insertlink_findanchor.xml"),newoption);
]]>
</method>
<method name="showfindurl" arguments="ctrl">
<![CDATA[
var newoption={};
newoption.control=ctrl
newoption.handlehref=function(href)
{
tbhref.set_text(href);
tbhref.invoke_event("change");
}
editor.ShowXmlFloatBox(editor.BuildDialogUrl("insertlink_findurl.xml"),newoption);
]]>
</method>
<method name="showuploadfile" arguments="anchor">
<![CDATA[
var newoption={width:640,height:420,targetnode:option.targetnode};
newoption.nestedmode=true;
newoption.callback=function()
{
self.bubble_event("reloadvalue");
}
editor.ShowXmlDialog(editor.BuildDialogUrl("insertdocument.xml"),newoption);
]]>
</method>
</panel>
<panel jsml-base="properties_taga" />
</jsml>

View File

@@ -0,0 +1,155 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="properties_audio" dock="fill">
<groupbox text="audio" dock="top" overflow="visible" margin="3">
<panel margin="7,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@URL|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" width="330" propname="src"/>
<panel dock="left" width="3" />
<button dock="left" width="82" height="24" text="@BROWSE|..">
<attach name="click">
instance.showuploadfile(self);
</attach>
</button>
</panel>
<panel dock="top" margin="2" padding="2" height="22">
<panel dock="left" width="80" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="autoplay" truestring="1" falsestring="" jsml-local="cbautoplay">
</panel>
<label dock="left" vertical_align="middle" width="70" text="@AUTOPLAY" unselectable="true">
<attach name="click,dblclick">
cbautoplay.toggle_checked();
cbautoplay.invoke_event("change");
</attach>
</label>
<panel dock="left" width="3" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="loop" truestring="1" falsestring="" jsml-local="cbautoloop">
</panel>
<label dock="left" vertical_align="middle" width="70" text="@AUTOLOOP" unselectable="true">
<attach name="click,dblclick">
cbautoloop.toggle_checked();
cbautoloop.invoke_event("change");
</attach>
</label>
<panel dock="left" width="3" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="controls" truestring="1" falsestring="" jsml-local="cbshowcontrols">
</panel>
<label dock="left" vertical_align="middle" width="70" text="@SHOWCONTROLS" unselectable="true">
<attach name="click,dblclick">
cbshowcontrols.toggle_checked();
cbshowcontrols.invoke_event("change");
</attach>
</label>
<panel dock="left" width="3" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="preload" truestring="1" falsestring="" jsml-local="cbpreload">
</panel>
<label dock="left" vertical_align="middle" width="70" text="@PRELOAD" unselectable="true">
<attach name="click,dblclick">
cbpreload.toggle_checked();
cbpreload.invoke_event("change");
</attach>
</label>
</panel>
</groupbox>
<groupbox text="@ATTRIBUTES" dock="top" overflow="visible" margin="3">
<panel margin="7,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@CSSCLASS|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" width="100" propname="class"/>
<label dock="left" vertical_align="middle" text="@FLOAT|:" text_align="right" width="140"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" width="100" propname="style:float">
<listitem value="" text="@NOTSET" />
<listitem value="left" text="@LEFT" />
<listitem value="right" text="@RIGHT" />
<listitem value="none" text="@none" />
</panel>
</panel>
<panel margin="7,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="ID:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" width="100" propname="id"/>
<label dock="left" vertical_align="middle" text="@TEXTALIGN|:" width="140" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:text-align" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="left" text="@LEFT" />
<listitem value="center" text="@CENTER" />
<listitem value="right" text="@RIGHT" />
<listitem value="justify" text="@JUSTIFY" />
</panel>
</panel>
<panel margin="7,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@COLOR|:" text_align="right" width="80"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropcolorbox" propname="style:color" width="100"/>
<label dock="left" vertical_align="middle" text="@BACKGROUNDCOLOR|:" text_align="right" width="140"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropcolorbox" propname="style:background-color" width="100"/>
</panel>
<panel margin="7,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@WIDTH|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:width"/>
</panel>
<panel margin="7,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@HEIGHT|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:height"/>
</panel>
<panel margin="10,3,30,3" height="56" dock="top">
<label dock="left" vertical_align="middle" text="@TOOLTIP|:" text_align="right" width="80"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="title" width="348">
<initialize>
self.textbox.set_text_mode("multipleline");
</initialize>
</panel>
</panel>
</groupbox>
<method name="showuploadfile" arguments="anchor">
<![CDATA[
var img=new $rte.GenericElement("iframe");
img.InsertType="Video";
img.SetStyle("width","320px");
img.SetStyle("height","240px");
img.SetStyle("border-width","0px");
img.SetAttribute("src",editor.GetPlayerUrl()+"?type=video&file=&autoplay=1&autoloop=1&allowmenu=1&transparency=1&showcontrols=1&allowfullscreen=1");
var newoption={width:640,height:420,targetnode:img};
newoption.callback=function(res)
{
if(!res)return;
var src=img.GetAttribute("src");
var arr=src.split('#')[0].split('?')[1].split('&');
for(var i=0;i<arr.length;i++)
{
if(arr[i].substring(0,5)!="file=")
continue;
option.targetnode.SetAttribute("src",decodeURIComponent(arr[i].substring(5)));
self.invoke_recursive("loadvalue");
self.bubble_event("rtepropsaved");
break;
}
}
editor.ShowXmlDialog(editor.BuildDialogUrl("insertvideo.xml"),newoption);
]]>
</method>
</panel>
<panel jsml-base="properties_audio" />
</jsml>

View File

@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="properties_tagtextarea" dock="fill">
<groupbox text="Button" dock="top" overflow="visible" margin="3">
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="100" text="@NAME|:" text_align="right"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="name" width="100" />
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@TEXT|:" width="100" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" width="320">
<method name="set_node_value">
option.targetnode.SetInnerText(value);
</method>
<method name="get_node_value">
return option.targetnode.GetInnerText();
</method>
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="100" text="ID:" text_align="right"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="id" width="100" />
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="100" text="@CSSCLASS|:" text_align="right"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="class" width="100" />
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@WIDTH|:" width="100" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" propname="style:width" width="100"/>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@HEIGHT|:" width="100" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:height"/>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@TYPE|:" width="100" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="type" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="button" text="button" />
<listitem value="reset" text="reset" />
<listitem value="submit" text="submit" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<panel dock="left" width="100" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="disabled" truestring="1" falsestring="" />
<label dock="left" vertical_align="middle" width="80" text="@disabled"/>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
</panel>
</groupbox>
</panel>
<panel jsml-base="properties_tagtextarea" />
</jsml>

View File

@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="properties_common" dock="fill">
<groupbox text="@ATTRIBUTES" dock="top" overflow="visible" margin="3">
<panel margin="7,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@CSSCLASS|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" width="100" propname="class"/>
<label dock="left" vertical_align="middle" text="@FLOAT|:" text_align="right" width="140"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" width="100" propname="style:float">
<listitem value="" text="@NOTSET" />
<listitem value="left" text="@LEFT" />
<listitem value="right" text="@RIGHT" />
<listitem value="none" text="@none" />
</panel>
</panel>
<panel margin="7,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="ID:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" width="100" propname="id"/>
<label dock="left" vertical_align="middle" text="@TEXTALIGN|:" width="140" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:text-align" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="left" text="@LEFT" />
<listitem value="center" text="@CENTER" />
<listitem value="right" text="@RIGHT" />
<listitem value="justify" text="@JUSTIFY" />
</panel>
</panel>
<panel margin="7,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@COLOR|:" text_align="right" width="80"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropcolorbox" propname="style:color" width="100"/>
<label dock="left" vertical_align="middle" text="@BACKGROUNDCOLOR|:" text_align="right" width="140"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropcolorbox" propname="style:background-color" width="100"/>
</panel>
<panel margin="7,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@WIDTH|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:width"/>
</panel>
<panel margin="7,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@HEIGHT|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:height"/>
</panel>
<panel margin="10,3,30,3" height="56" dock="top">
<label dock="left" vertical_align="middle" text="@TOOLTIP|:" text_align="right" width="80"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="title" width="348">
<initialize>
self.textbox.set_text_mode("multipleline");
</initialize>
</panel>
</panel>
</groupbox>
</panel>
<panel jsml-base="properties_common" />
</jsml>

View File

@@ -0,0 +1,332 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<execute>
dialog.tdhover=new Function("","this.style.backgroundColor='#eeeeee'");
dialog.tdleave=new Function("","this.style.backgroundColor=''");
</execute>
<panel jsml-class="properties_div" dock="fill">
<panel dock="top" height="135">
<panel dock="left" width="60"/>
<panel dock="left" width="120" margin="5" overflow_y="scroll" border_width="1" border_color="#666666">
<htmlcontrol>
<xmldata rawhtml="true">
<![CDATA[
<table style="width:100px;border-collapse:collapse;margin:1px;" >
<tr><td style='font-size:11px'>-</td></tr>
<tr><td val='solid'><div style='margin-top:3px;border-top:solid 2px black;'></div></td></tr>
<tr><td val='dotted'><div style='margin-top:3px;border-top:dotted 2px black;'></div></td></tr>
<tr><td val='dashed'><div style='margin-top:3px;border-top:dashed 2px black;'></div></td></tr>
<tr><td val='double'><div style='margin-top:3px;border:double 3px;height:10px'></div></td></tr>
<tr><td val='groove'><div style='margin-top:1px;border:groove 2px;height:10px'></div></td></tr>
<tr><td val='inset'><div style='margin-top:1px;border:inset 2px;height:10px'></div></td></tr>
<tr><td val='outset'><div style='margin-top:1px;border:outset 2px;height:10px'></div></td></tr>
</table>
]]>
</xmldata>
<method name="setupcell" arguments="cell">
<![CDATA[
var bstyle=cell.getAttribute("val")||null;
cell.onclick=function()
{
option.targetnode.SetStyle("border-style",bstyle);
self.invoke_event("loadvalue");
}
if(bstyle)
cell.setAttribute("title",bstyle);
else
cell.innerHTML=editor.GetLangText("notset");
cell.className="jsml_label";
cell.style.cursor="pointer";
cell.style.height="20px";
cell.onmouseover=dialog.tdhover;
cell.onmouseout=dialog.tdleave;
]]>
</method>
<initialize>
<![CDATA[
self.cells=[];
var rs=self._content.firstChild.rows;
for(var ri=0;ri<rs.length;ri++)
{
var cell=rs.item(ri).cells.item(0);
self.setupcell(cell);
self.cells.push(cell);
}
]]>
</initialize>
<attach name="attach_dom,loadvalue">
<![CDATA[
var val=option.targetnode.GetStyle("border-style");
for(var i=0;i<self.cells.length;i++)
{
var cell=self.cells[i];
var row=cell.parentNode;
if(cell.getAttribute("val")==val)
row.style.backgroundColor='yellow';
else
row.style.backgroundColor='';
}
]]>
</attach>
</htmlcontrol>
</panel>
<panel dock="left" width="30"/>
<panel dock="left" width="110" margin="5" overflow_y="scroll" border_width="1" border_color="#666666">
<htmlcontrol>
<xmldata rawhtml="true">
<![CDATA[
<table style="width:90px;border-collapse:collapse;margin:1px;" >
<tr><td style='font-size:11px'>-</td></tr>
<tr><td val='1px'><div style='margin-top:3px;border-top:solid 1px black;'></div></td></tr>
<tr><td val='2px'><div style='margin-top:3px;border-top:solid 2px black;'></div></td></tr>
<tr><td val='3px'><div style='margin-top:3px;border-top:solid 3px black;'></div></td></tr>
<tr><td val='4px'><div style='margin-top:3px;border-top:solid 4px black;'></div></td></tr>
<tr><td val='5px'><div style='margin-top:3px;border-top:solid 5px black;'></div></td></tr>
<tr><td val='6px'><div style='margin-top:3px;border-top:solid 6px black;'></div></td></tr>
<tr><td val='7px'><div style='margin-top:3px;border-top:solid 7px black;'></div></td></tr>
</table>
]]>
</xmldata>
<method name="setupcell" arguments="cell">
<![CDATA[
var bstyle=cell.getAttribute("val")||null;
cell.onclick=function()
{
option.targetnode.SetStyle("border-width",bstyle);
self.invoke_event("loadvalue");
}
if(bstyle)
cell.setAttribute("title",bstyle);
else
cell.innerHTML=editor.GetLangText("notset");
cell.className="jsml_label";
cell.style.cursor="pointer";
cell.style.height="20px";
cell.onmouseover=dialog.tdhover;
cell.onmouseout=dialog.tdleave;
]]>
</method>
<initialize>
<![CDATA[
self.cells=[];
var rs=self._content.firstChild.rows;
for(var ri=0;ri<rs.length;ri++)
{
var cell=rs.item(ri).cells.item(0);
self.setupcell(cell);
self.cells.push(cell);
}
]]>
</initialize>
<attach name="attach_dom,loadvalue">
<![CDATA[
var val=option.targetnode.GetStyle("border-width");
for(var i=0;i<self.cells.length;i++)
{
var cell=self.cells[i];
var row=cell.parentNode;
if(cell.getAttribute("val")==val)
row.style.backgroundColor='yellow';
else
row.style.backgroundColor='';
}
]]>
</attach>
</htmlcontrol>
</panel>
<panel dock="fill" padding="0,0,0,6">
<panel margin="2,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@BORDER|:" />
</panel>
<panel margin="2,3,2,3" height="18" dock="top">
<panel dock="left" jsml-base="rtepropcolorbox" propname="style:border-color" width="100"/>
</panel>
<panel margin="2,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@COLOR|:" />
</panel>
<panel margin="2,3,2,3" height="18" dock="top">
<panel dock="left" jsml-base="rtepropcolorbox" propname="style:color" width="100"/>
</panel>
<panel margin="2,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@BACKGROUNDCOLOR|:" />
</panel>
<panel margin="2,3,2,3" height="18" dock="top">
<panel dock="left" jsml-base="rtepropcolorbox" propname="style:background-color" width="100"/>
</panel>
</panel>
</panel>
<groupbox text="@ATTRIBUTES" dock="top" overflow="visible" margin="3">
<panel margin="7,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@CSSCLASS|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" width="100" propname="class"/>
<label dock="left" vertical_align="middle" text="@FLOAT|:" text_align="right" width="140"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" width="100" propname="style:float">
<listitem value="" text="@NOTSET" />
<listitem value="left" text="@LEFT" />
<listitem value="right" text="@RIGHT" />
<listitem value="none" text="@none" />
</panel>
</panel>
<panel margin="7,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="ID:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" width="100" propname="id"/>
<label dock="left" vertical_align="middle" text="@TEXTALIGN|:" width="140" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:text-align" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="left" text="@LEFT" />
<listitem value="center" text="@CENTER" />
<listitem value="right" text="@RIGHT" />
<listitem value="justify" text="@JUSTIFY" />
</panel>
</panel>
<panel margin="7,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@WIDTH|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:width"/>
<label dock="left" vertical_align="middle" text="@MARGIN|:" width="140" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" width="80" jsml-base="rtepropnumupdown" propname="style:margin" suffix="px" />
<image dock="left" width="20" cursor="pointer" src="{folder}images/box.png">
<attach name="click">
marginfloatbox._rtenode=option.targetnode;
marginfloatbox.invoke_recursive("editor_ready",editor);
marginfloatbox._estyle.zIndex=editor._config.dialog_zindex;
marginfloatbox.show({control:self,stopDispose:true});
</attach>
</image>
<attach name="disposing">
marginfloatbox.dispose();
</attach>
<panel jsml-base="floatbox" jsml-local="marginfloatbox" jsml-append="false" height="180" padding="18">
<panel dock="bottom" margin="5">
<button text="@RESET" right="0">
<attach name="click">
option.targetnode.SetStyle("margin-left",null);
option.targetnode.SetStyle("margin-right",null);
option.targetnode.SetStyle("margin-top",null);
option.targetnode.SetStyle("margin-bottom",null);
marginfloatbox.invoke_recursive("loadvalue");
</attach>
</button>
</panel>
<panel dock="left" overflow="visible" vertical_align="middle">
<panel overflow_x="visible" height="20">
<label dock="left" width="1" overflow="visible" text="@LEFT|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:margin-left" suffix="px" />
</panel>
</panel>
<panel dock="right" overflow="visible" vertical_align="middle">
<panel overflow_x="visible" height="20">
<label dock="left" width="60" text="@RIGHT|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:margin-right" suffix="px" />
</panel>
</panel>
<panel dock="top" overflow="visible" horizontal_align="center">
<panel overflow_x="visible" height="20">
<label dock="left" width="60" text="@TOP|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:margin-top" suffix="px" />
</panel>
</panel>
<panel dock="bottom" overflow="visible" horizontal_align="center">
<panel overflow_x="visible" height="20">
<label dock="left" width="60" text="@BOTTOM|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:margin-bottom" suffix="px" />
</panel>
</panel>
</panel>
</panel>
<panel margin="7,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@HEIGHT|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:height"/>
<label dock="left" vertical_align="middle" text="@PADDING|:" width="140" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" width="80" jsml-base="rtepropnumupdown" propname="style:padding" suffix="px" min_value="0" />
<image dock="left" width="20" cursor="pointer" src="{folder}images/box.png">
<attach name="click">
paddingfloatbox._rtenode=option.targetnode;
paddingfloatbox.invoke_recursive("editor_ready",editor);
paddingfloatbox._estyle.zIndex=editor._config.dialog_zindex;
paddingfloatbox.show({control:self,stopDispose:true});
</attach>
</image>
<attach name="disposing">
paddingfloatbox.dispose();
</attach>
<panel jsml-base="floatbox" jsml-local="paddingfloatbox" jsml-append="false" height="180" padding="18">
<panel dock="bottom" margin="5">
<button text="@RESET" right="0">
<attach name="click">
option.targetnode.SetStyle("padding-left",null);
option.targetnode.SetStyle("padding-right",null);
option.targetnode.SetStyle("padding-top",null);
option.targetnode.SetStyle("padding-bottom",null);
paddingfloatbox.invoke_recursive("loadvalue");
</attach>
</button>
</panel>
<panel dock="left" overflow="visible" vertical_align="middle">
<panel overflow_x="visible" height="20">
<label dock="left" width="1" overflow="visible" text="@LEFT|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:padding-left" suffix="px" />
</panel>
</panel>
<panel dock="right" overflow="visible" vertical_align="middle">
<panel overflow_x="visible" height="20">
<label dock="left" width="60" text="@RIGHT|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:padding-right" suffix="px" />
</panel>
</panel>
<panel dock="top" overflow="visible" horizontal_align="center">
<panel overflow_x="visible" height="20">
<label dock="left" width="60" text="@TOP|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:padding-top" suffix="px" />
</panel>
</panel>
<panel dock="bottom" overflow="visible" horizontal_align="center">
<panel overflow_x="visible" height="20">
<label dock="left" width="60" text="@BOTTOM|:" vertical_align="middle" text_align="right" />
<panel dock="left" jsml-base="rtepropnumupdown" propname="style:padding-bottom" suffix="px" />
</panel>
</panel>
</panel>
</panel>
<panel margin="10,3,5,3" height="32" dock="top">
<label dock="left" vertical_align="middle" text="@TOOLTIP|:" text_align="right" width="80"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="title" width="348">
<initialize>
self.textbox.set_text_mode("multipleline");
</initialize>
</panel>
</panel>
</groupbox>
</panel>
<panel jsml-base="properties_div" />
</jsml>

View File

@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="properties_tagform" dock="fill">
<groupbox text="Form" dock="top" overflow="visible" margin="3">
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@ACTION|:" width="100" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" propname="action" width="380" />
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="100" text="@METHOD|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="method" width="200">
<listitem text="post" value="post" />
<listitem text="get" value="get" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="100" text="@ATTR_TARGET|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="target" width="200">
<listitem value="" text="@NOTSET" />
<listitem value="_blank" text="@ATTR_TARGETBLANK" />
<listitem value="_parent" text="@ATTR_TARGETPARENT" />
<listitem value="_self" text="@ATTR_TARGETSELF" />
<listitem value="_top" text="@ATTR_TARGETTOP" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="100" text="@encodingtype|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="target" width="200">
<listitem value="" text="@NOTSET" />
<listitem value="multipart/form-data" text="multipart/form-data" />
<listitem value="application/x-www-form-urlencoded" text="application/x-www-form-urlencoded" />
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="100" text="@NAME|:" text_align="right"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="name" width="200" />
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="100" text="ID:" text_align="right"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="id" width="200" />
</panel>
<panel margin="7,3,20,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="100" text="@CSSCLASS|:" text_align="right"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="class" width="200" />
</panel>
</groupbox>
</panel>
<panel jsml-base="properties_tagform" />
</jsml>

View File

@@ -0,0 +1,152 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="properties_tagtextarea" dock="fill">
<groupbox text="Input" dock="top" overflow="visible" margin="3">
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="100" text="@Type|:" text_align="right"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="type" disabled="true" width="100" />
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="100" text="@NAME|:" text_align="right"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="name" width="100" />
</panel>
<panel jsml-local="panel_value" margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@Value|:" width="100" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" propname="value" width="320"></panel>
</panel>
<panel jsml-local="panel_src" visible="false" margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="100" text="Src:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" width="320" propname="src">
</panel>
<panel dock="left" width="4" />
<button dock="left" height="24" width="30" text="...">
<attach name="click">
instance.showuploadfile(self);
</attach>
</button>
</panel>
<panel jsml-local="panel_alt" visible="false" margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@alternate|:" width="100" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" propname="alt" width="320"></panel>
</panel>
<panel jsml-local="panel_size" margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="100" text="@Size|:" text_align="right"/>
<panel dock="left" width="4" />
<panel jsml-base="rtepropnumupdown" min_value="1" dock="left" propname="size" width="100" />
</panel>
<panel jsml-local="panel_maxlength" margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="100" text="@maxlength|:" text_align="right"/>
<panel dock="left" width="4" />
<panel jsml-base="rtepropnumupdown" min_value="1" dock="left" propname="maxlength" width="100" />
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="100" text="ID:" text_align="right"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="id" width="100" />
</panel>
<panel jsml-local="panel_accesskey" margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@ACCESSKEY|:" width="100" text_align="right"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="accesskey" width="100" />
</panel>
<panel jsml-local="panel_tabindex" margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@TABINDEX|:" text_align="right" width="100"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="tabindex" width="100" />
</panel>
<panel jsml-local="panel_disabled" margin="3,3,3,3" height="18" dock="top">
<panel dock="left" width="100" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="disabled" truestring="1" falsestring="" />
<label dock="left" vertical_align="middle" width="80" text="@disabled"/>
</panel>
<panel jsml-local="panel_readonly" margin="3,3,3,3" height="18" dock="top">
<panel dock="left" width="100" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="readonly" truestring="1" falsestring="" />
<label dock="left" vertical_align="middle" width="80" text="@readonly"/>
</panel>
<panel jsml-local="panel_checked" margin="7,3,1,3" visible="false" height="18" dock="top">
<panel dock="left" width="100" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="checked" truestring="checked" falsestring="" />
<label dock="left" vertical_align="middle" text="@CHECKED|:" width="80"/>
</panel>
<panel margin="7,3,12,3" height="18" dock="top">
</panel>
</groupbox>
<initialize>
<![CDATA[
switch(option.targetnode.GetAttribute("type"))
{
case "file":
panel_value.set_visible(false);
panel_size.set_visible(false);
panel_maxlength.set_visible(false);
panel_readonly.set_visible(false);
break;
case "image":
panel_src.set_visible(true);
panel_readonly.set_visible(false);
panel_size.set_visible(false);
panel_maxlength.set_visible(false);
panel_value.set_visible(false);
break;
case "text":
break;
case "hidden":
panel_size.set_visible(false);
panel_maxlength.set_visible(false);
panel_accesskey.set_visible(false);
panel_tabindex.set_visible(false);
panel_disabled.set_visible(false);
panel_readonly.set_visible(false);
break;
case "password":
break;
case "checkbox":
case "radio":
panel_size.set_visible(false);
panel_checked.set_visible(true);
panel_maxlength.set_visible(false);
panel_readonly.set_visible(false);
break;
case "button":
case "submit":
case "reset":
panel_size.set_visible(false);
panel_maxlength.set_visible(false);
panel_readonly.set_visible(false);
break;
}
]]>
</initialize>
<method name="showuploadfile" arguments="anchor">
<![CDATA[
var img=new $rte.GenericElement("img");
var newoption={width:640,height:420,targetnode:img};
newoption.nestedmode=true;
newoption.callback=function(res)
{
if(!res)return;
option.targetnode.SetAttribute("src",img.GetAttribute("src"));
self.invoke_recursive("loadvalue");
self.bubble_event("rtepropsaved");
}
editor.ShowXmlDialog(editor.BuildDialogUrl("insertgallery.xml"),newoption);
]]>
</method>
</panel>
<panel jsml-base="properties_tagtextarea" />
</jsml>

View File

@@ -0,0 +1,203 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="properties_tagtextarea" dock="fill">
<groupbox text="Select" dock="top" overflow="visible" margin="4">
<panel dock="left" width="134">
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="50" text="@NAME|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" width="80" propname="name"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="50" text="ID:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" width="80" propname="id"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="50" text="@SIZE|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" width="80" jsml-base="rtepropnumupdown" propname="size" min_value="1" />
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<panel dock="left" width="50" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="disabled" truestring="1" falsestring="" />
<label dock="left" vertical_align="middle" width="80" text="@disabled"/>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<panel dock="left" width="50" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="multiple" truestring="1" falsestring="" />
<label dock="left" vertical_align="middle" width="80" text="@multiple"/>
</panel>
</panel>
<panel dock="left" width="20" />
<panel dock="left" width="144">
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@ACCESSKEY|:" width="60" text_align="right"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="accesskey" width="80" />
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@TABINDEX|:" text_align="right" width="60"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="tabindex" width="80" />
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="60" text="@CSSCLASS|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" width="80" propname="class"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="60" text="@WIDTH|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" propname="style:width" width="80"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="60" text="@HEIGHT|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="80" propname="style:height"/>
</panel>
</panel>
<panel dock="left" width="15" />
<panel dock="left" width="144">
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@COLOR|:" width="65" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropcolorbox" propname="style:color" width="75" />
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@BACKCOLOR|:" width="65" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropcolorbox" propname="style:background-color" width="75" />
</panel>
</panel>
</groupbox>
<groupbox text="@ITEMS" dock="top" overflow="visible" margin="3">
<groupbox jsml-local="itempanel" text="@ITEM" dock="right" width="180" height="120" margin="5">
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@TEXT|:" width="65"/>
<panel dock="left" jsml-base="rteproptextbox" propname="text" autoupdate="false" width="89">
<method name="get_node_value">
return self.find_node().GetInnerText();
</method>
<method name="set_node_value">
self.find_node().SetInnerText(value);
</method>
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@VALUE|:" width="65"/>
<panel dock="left" jsml-base="rteproptextbox" propname="value" autoupdate="false" width="89"/>
</panel>
<panel margin="7,3,1,3" dock="bottom" overflow="visible">
<button jsml-local="btninsert" text="@ADD" width="45" height="20" left="5">
<attach name="click">
<![CDATA[
itempanel._rtenode=new $rte.DataElement("option");
itempanel.invoke_recursive("savevalue");
var opt=document.createElement("OPTION");
itempanel._rtenode._targetoption=opt;
opt.innerHTML=jsml.html_encode(itempanel._rtenode.GetInnerText());
opt.value=itempanel._rtenode.GetAttribute("value");
opt.ownedNode=itempanel._rtenode;
option.targetnode.AppendChild(itempanel._rtenode);
instance.listbox.appendChild(opt);
instance.listbox.selectedIndex=instance.listbox.options.length-1;
itempanel.invoke_event("updatecontrols");
]]>
</attach>
</button>
<button jsml-local="btnupdate" text="@UPDATE" width="45" height="20" left="55">
<attach name="click">
<![CDATA[
itempanel.invoke_recursive("savevalue");
var opt=itempanel._rtenode._targetoption;
if(opt==null)return;
opt.innerHTML=jsml.html_encode(itempanel._rtenode.GetInnerText());
opt.value=itempanel._rtenode.GetAttribute("value");
opt.ownedNode=itempanel._rtenode;
itempanel.invoke_event("updatecontrols");
]]>
</attach>
</button>
<button jsml-local="btndelete" text="@DELETE" width="45" height="20" left="105">
<attach name="click">
<![CDATA[
itempanel.invoke_recursive("savevalue");
var opt=itempanel._rtenode._targetoption;
if(opt==null)return;
itempanel._rtenode.RemoveNode(true);
instance.listbox.removeChild(opt);
instance.listbox.selectedIndex=-1;
itempanel._rtenode=new $rte.DataElement("option");
itempanel.invoke_event("updatecontrols");
]]>
</attach>
</button>
</panel>
<initialize>
itempanel._rtenode=new $rte.DataElement("option");
itempanel.invoke_event("updatecontrols");
</initialize>
<attach name="updatecontrols">
<![CDATA[
var par=itempanel._rtenode.GetParent();
if(par==null)
{
btnupdate.set_disabled(true);
btndelete.set_disabled(true);
}
else
{
btnupdate.set_disabled(false);
btndelete.set_disabled(false);
}
]]>
</attach>
</groupbox>
<htmlcontrol dock="fill" height="120" margin="5">
<initialize>
<![CDATA[
var lb=document.createElement("SELECT");
instance.listbox=lb;
lb.setAttribute("size",9);
lb.style.height="120px";
lb.style.width="300px";
lb.onchange=function()
{
if(lb.selectedIndex==-1)
itempanel._rtenode=new $rte.DataElement("option");
else
itempanel._rtenode=lb.options[lb.selectedIndex].ownedNode;
itempanel.invoke_recursive("loadvalue");
itempanel.invoke_event("updatecontrols");
}
self._content.appendChild(lb);
var c=option.targetnode.GetChildCount();
for(var i=0;i<c;i++)
{
var optnode=option.targetnode.GetChildAt(i);
if(optnode.GetNameLower()!="option")
continue;
var opt=document.createElement("OPTION");
opt.innerHTML=jsml.html_encode(optnode.GetInnerText());
opt.value=optnode.GetAttribute("value");
opt.ownedNode=optnode;
optnode._targetoption=opt;
lb.appendChild(opt);
}
]]>
</initialize>
</htmlcontrol>
</groupbox>
</panel>
<panel jsml-base="properties_tagtextarea" />
</jsml>

View File

@@ -0,0 +1,198 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="properties_tagtable" dock="fill">
<groupbox text="@LAYOUT" dock="top" overflow="visible" margin="3">
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" width="70" text="@ROWS|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="4" />
<panel dock="left" width="65" jsml-base="rtepropnumupdown" propname="rows" min_value="1">
<method name="get_node_value">
var node=self.find_node();
return editor.ExecTableLogic(node,"getrowcount");
</method>
<method name="set_node_value">
var node=self.find_node();
editor.ExecTableLogic(node,"setrowcount",parseInt(value));
</method>
</panel>
<panel dock="left" width="30" />
<label dock="left" width="60" text="@COLS|:" vertical_align="middle"/>
<panel dock="left" width="65" jsml-base="rtepropnumupdown" propname="cols" min_value="1">
<method name="get_node_value">
var node=self.find_node();
return editor.ExecTableLogic(node,"getcolcount");
</method>
<method name="set_node_value">
var node=self.find_node();
editor.ExecTableLogic(node,"setcolcount",parseInt(value));
</method>
</panel>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" width="70" text="@CELLSPACING|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="4" />
<panel dock="left" width="65" jsml-base="rtepropnumupdown" propname="cellspacing" min_value="0" />
<panel dock="left" width="25" />
<checkbox dock="left" jsml-local="cbusewidth" checked="1">
<attach name="change">
<![CDATA[
tbwidth.set_node_value(self.get_checked()?tbwidth.get_text():"");
tbwidth.set_disabled(!self.get_checked());
]]>
</attach>
</checkbox>
<label dock="left" vertical_align="middle" width="45" text="@WIDTH|:" unselectable="true">
<attach name="click,dblclick">
cbusewidth.set_checked(!cbusewidth.get_checked());
</attach>
</label>
<panel jsml-base="rtepropunitbox" jsml-local="tbwidth" width="65" dock="left" propname="style:width" />
<initialize>
if(option.targetnode.GetStyle("width"))return;
cbusewidth.set_checked(false);
tbwidth.set_disabled(true);
</initialize>
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" width="70" text="@CELLPADDING|:" vertical_align="middle" text_align="right" />
<panel dock="left" width="4" />
<panel dock="left" width="65" jsml-base="rtepropnumupdown" propname="cellpadding" min_value="0" />
<panel dock="left" width="25" />
<checkbox dock="left" jsml-local="cbuseheight" checked="1">
<attach name="change">
<![CDATA[
tbheight.set_node_value(self.get_checked()?tbheight.get_text():"");
tbheight.set_disabled(!self.get_checked());
]]>
</attach>
</checkbox>
<label dock="left" vertical_align="middle" width="45" text="@HEIGHT|:" unselectable="true">
<attach name="click,dblclick">
cbuseheight.set_checked(!cbuseheight.get_checked());
</attach>
</label>
<panel jsml-base="rtepropunitbox" width="65" jsml-local="tbheight" dock="left" propname="style:height" />
<initialize>
if(option.targetnode.GetStyle("height"))return;
cbuseheight.set_checked(false);
tbheight.set_disabled(true);
</initialize>
</panel>
<panel margin="7,3,8,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@FLOAT|:" width="70" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" width="65" propname="style:float">
<listitem value="" text="@NOTSET" />
<listitem value="left" text="@LEFT" />
<listitem value="right" text="@RIGHT" />
<listitem value="right" text="@NONE" />
</panel>
<panel dock="left" width="30" />
<label dock="left" vertical_align="middle" text="@ALIGN|:" width="60"/>
<panel dock="left" jsml-base="rtepropdropdown" propname="rules" width="67">
<listitem value="" text="@NOTSET" />
<listitem value="left" text="@LEFT" />
<listitem value="center" text="@CENTER" />
<listitem value="right" text="@RIGHT" />
</panel>
<panel dock="left" width="25" />
<label dock="left" vertical_align="middle" text="@RULES|:" width="85"/>
<panel dock="left" jsml-base="rtepropdropdown" propname="rules">
<listitem value="" text="@NOTSET" />
<listitem value="all" text="all" />
<listitem value="rows" text="rows" />
<listitem value="cols" text="cols" />
<listitem value="none" text="none" />
</panel>
</panel>
</groupbox>
<groupbox text="@BORDER" dock="top" overflow="visible" margin="3">
<panel margin="7,3,8,3" height="18" dock="top">
<label dock="left" width="70" text="@SIZE|:" vertical_align="middle" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" width="65" jsml-base="rtepropnumupdown" propname="border" min_value="0" />
<panel dock="left" width="30" />
<label dock="left" vertical_align="middle" text="@COLOR|:" width="60"/>
<panel dock="left" jsml-base="rtepropcolorbox" propname="bordercolor" width="75" />
<panel dock="left" width="12" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="style:border-collapse" truestring="collapse" falsestring="" jsml-local="cbcollapse" />
<label dock="left" vertical_align="middle" width="32" text="@BORDERCOLLAPSE" unselectable="true">
<attach name="click,dblclick">
cbcollapse.toggle_checked();
</attach>
</label>
</panel>
</groupbox>
<groupbox text="@ATTRIBUTES" dock="top" overflow="visible" margin="3">
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@CSSCLASS|:" width="70" text_align="right"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="class" width="65" />
<panel dock="left" width="30" />
<label dock="left" vertical_align="middle" text="ID:" width="60"/>
<panel jsml-base="rteproptextbox" dock="left" propname="id" width="75" />
<panel dock="left" width="15" />
<label dock="left" vertical_align="middle" text="@BACKGROUNDCOLOR|:" width="85"/>
<panel dock="left" jsml-base="rtepropcolorbox" width="75" propname="style:background-color" />
</panel>
<panel margin="7,3,1,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@CAPTION|:" width="70" text_align="right"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="title" width="340">
<method name="get_node_value">
<![CDATA[
var node=self.find_node();
for(var index=0;true;index++)
{
var child=node.GetChildAt(index);
if(!child)
break;
if(child.GetNameLower()!="caption")
continue;
return child.GetInnerText();
}
return "";
]]>
</method>
<method name="set_node_value">
<![CDATA[
var node=self.find_node();
for(var index=0;true;index++)
{
var child=node.GetChildAt(index);
if(!child)
break;
if(child.GetNameLower()!="caption")
continue;
if(value)
child.SetInnerText(value);
else
child.RemoveNode(true);
return;
}
var child=new $rte.ContainerElement("caption");
node.AppendChild(child);
child.SetInnerText(value);
]]>
</method>
</panel>
<image dock="left" src="{folder}images/accessibility.gif" vertical_align="middle" margin="1,1,1,5" />
</panel>
<panel margin="7,3,10,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@SUMMARY|:" width="70" text_align="right"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="summary" width="340" />
<image dock="left" src="{folder}images/accessibility.gif" vertical_align="middle" margin="1,1,1,5" />
</panel>
</groupbox>
</panel>
<panel jsml-base="properties_tagtable" />
</jsml>

View File

@@ -0,0 +1,101 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="properties_tagtextarea" dock="fill">
<groupbox text="Textarea" dock="top" overflow="visible" margin="4">
<panel dock="left" width="180">
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@rows|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" width="100" jsml-base="rtepropnumupdown" propname="rows" min_value="1">
</panel>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@cols|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" width="100" jsml-base="rtepropnumupdown" propname="cols" min_value="1">
</panel>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@WIDTH|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" propname="style:width" width="100"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@HEIGHT|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:height"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@ACCESSKEY|:" width="80" text_align="right"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="accesskey" width="100" />
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@TABINDEX|:" text_align="right" width="80"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="tabindex" width="100" />
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@wrap|:" text_align="right" width="80"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="wrap" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="soft" text="soft" />
<listitem value="hard" text="hard" />
<listitem value="off" text="off" />
</panel>
</panel>
</panel>
<panel dock="left" width="30" />
<panel dock="left" width="200">
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@NAME|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" width="100" propname="name"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="ID:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" width="100" propname="id"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@CSSCLASS|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" width="100" propname="class"/>
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@disabled|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropcheckbox" width="100" propname="disabled" truestring="1" falsestring="" />
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@readonly|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropcheckbox" width="100" propname="readonly" truestring="1" falsestring="" />
</panel>
<panel margin="3,3,3,3" height="18" dock="top">
</panel>
</panel>
</groupbox>
<groupbox text="@Value" dock="top" overflow="visible" margin="3">
<panel dock="left" width="84" />
<textbox text_mode="multipleline" width="350" dock="left" height="120" margin="5">
<initialize>
self.set_text(option.targetnode.GetInnerText());
</initialize>
<attach name="change,keyup">
option.targetnode.SetInnerText(self.get_text())
</attach>
</textbox>
</groupbox>
</panel>
<panel jsml-base="properties_tagtextarea" />
</jsml>

View File

@@ -0,0 +1,155 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="properties_video" dock="fill">
<groupbox text="video" dock="top" overflow="visible" margin="3">
<panel margin="7,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@URL|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" width="330" propname="src"/>
<panel dock="left" width="3" />
<button dock="left" width="82" height="24" text="@BROWSE|..">
<attach name="click">
instance.showuploadfile(self);
</attach>
</button>
</panel>
<panel dock="top" margin="2" padding="2" height="22">
<panel dock="left" width="80" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="autoplay" truestring="1" falsestring="" jsml-local="cbautoplay">
</panel>
<label dock="left" vertical_align="middle" width="70" text="@AUTOPLAY" unselectable="true">
<attach name="click,dblclick">
cbautoplay.toggle_checked();
cbautoplay.invoke_event("change");
</attach>
</label>
<panel dock="left" width="3" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="loop" truestring="1" falsestring="" jsml-local="cbautoloop">
</panel>
<label dock="left" vertical_align="middle" width="70" text="@AUTOLOOP" unselectable="true">
<attach name="click,dblclick">
cbautoloop.toggle_checked();
cbautoloop.invoke_event("change");
</attach>
</label>
<panel dock="left" width="3" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="controls" truestring="1" falsestring="" jsml-local="cbshowcontrols">
</panel>
<label dock="left" vertical_align="middle" width="70" text="@SHOWCONTROLS" unselectable="true">
<attach name="click,dblclick">
cbshowcontrols.toggle_checked();
cbshowcontrols.invoke_event("change");
</attach>
</label>
<panel dock="left" width="3" />
<panel dock="left" jsml-base="rtepropcheckbox" propname="preload" truestring="1" falsestring="" jsml-local="cbpreload">
</panel>
<label dock="left" vertical_align="middle" width="70" text="@PRELOAD" unselectable="true">
<attach name="click,dblclick">
cbpreload.toggle_checked();
cbpreload.invoke_event("change");
</attach>
</label>
</panel>
</groupbox>
<groupbox text="@ATTRIBUTES" dock="top" overflow="visible" margin="3">
<panel margin="7,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@CSSCLASS|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" width="100" propname="class"/>
<label dock="left" vertical_align="middle" text="@FLOAT|:" text_align="right" width="140"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" width="100" propname="style:float">
<listitem value="" text="@NOTSET" />
<listitem value="left" text="@LEFT" />
<listitem value="right" text="@RIGHT" />
<listitem value="none" text="@none" />
</panel>
</panel>
<panel margin="7,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="ID:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rteproptextbox" width="100" propname="id"/>
<label dock="left" vertical_align="middle" text="@TEXTALIGN|:" width="140" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropdropdown" propname="style:text-align" width="100">
<listitem value="" text="@NOTSET" />
<listitem value="left" text="@LEFT" />
<listitem value="center" text="@CENTER" />
<listitem value="right" text="@RIGHT" />
<listitem value="justify" text="@JUSTIFY" />
</panel>
</panel>
<panel margin="7,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" text="@COLOR|:" text_align="right" width="80"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropcolorbox" propname="style:color" width="100"/>
<label dock="left" vertical_align="middle" text="@BACKGROUNDCOLOR|:" text_align="right" width="140"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropcolorbox" propname="style:background-color" width="100"/>
</panel>
<panel margin="7,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@WIDTH|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:width"/>
</panel>
<panel margin="7,3,2,3" height="18" dock="top">
<label dock="left" vertical_align="middle" width="80" text="@HEIGHT|:" text_align="right"/>
<panel dock="left" width="4" />
<panel dock="left" jsml-base="rtepropunitbox" width="100" propname="style:height"/>
</panel>
<panel margin="10,3,30,3" height="56" dock="top">
<label dock="left" vertical_align="middle" text="@TOOLTIP|:" text_align="right" width="80"/>
<panel dock="left" width="4" />
<panel jsml-base="rteproptextbox" dock="left" propname="title" width="348">
<initialize>
self.textbox.set_text_mode("multipleline");
</initialize>
</panel>
</panel>
</groupbox>
<method name="showuploadfile" arguments="anchor">
<![CDATA[
var img=new $rte.GenericElement("iframe");
img.InsertType="Video";
img.SetStyle("width","320px");
img.SetStyle("height","240px");
img.SetStyle("border-width","0px");
img.SetAttribute("src",editor.GetPlayerUrl()+"?type=video&file=&autoplay=1&autoloop=1&allowmenu=1&transparency=1&showcontrols=1&allowfullscreen=1");
var newoption={width:640,height:420,targetnode:img};
newoption.callback=function(res)
{
if(!res)return;
var src=img.GetAttribute("src");
var arr=src.split('#')[0].split('?')[1].split('&');
for(var i=0;i<arr.length;i++)
{
if(arr[i].substring(0,5)!="file=")
continue;
option.targetnode.SetAttribute("src",decodeURIComponent(arr[i].substring(5)));
self.invoke_recursive("loadvalue");
self.bubble_event("rtepropsaved");
break;
}
}
editor.ShowXmlDialog(editor.BuildDialogUrl("insertvideo.xml"),newoption);
]]>
</method>
</panel>
<panel jsml-base="properties_video" />
</jsml>

View File

@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<htmlcontrol jsml-class="setfontnamedialogitem" dock="top" overflow="visible" vertical_align="middle" margin="0" padding="0" border_width="1" border_color="transparent" cursor="pointer" background="url({folder}images/font.png) center left no-repeat" unselectable="true">
<initialize>
self._estyle.fontFamily='"Segoe UI","Lucida Grande", Tahoma, Verdana, Arial, sans-serif';
<![CDATA[
if(!editor._config.preview_disabletooltip&&!editor._config.preview_disablefontname)
{
self._previewhtml=editor.GetRangePreviewHTML("fontname");
}
]]>
</initialize>
<attach name="mousehover" arguments="je,e">
self.set_border_color('#DCAC6C');
self.set_back_color('#FFF5D4');
self.set_text_color('blue');
</attach>
<attach name="mouseleave">
self.set_border_color('white');
self.set_back_color('');
self.set_text_color('');
</attach>
<attach name="click">
editor.ExecCommand("fontname",self.get_text());
dialog.close();
</attach>
<method name="set_html" arguments="value" overrideas="basesethtml">
value=value.replace('(Default)',editor.GetLangText("default"))
self.basesethtml(value);
</method>
</htmlcontrol>
<panel dock="fill" margin="0" padding="0" overflow="visible" width="160">
<panel dock="fill" overflow="visible" padding="3">
<htmlcontrol jsml-base="setfontnamedialogitem" text="!">
<xmldata>
<div style="width:125px;font-size:13px;padding:0 20px;">(Default)</div>
</xmldata>
</htmlcontrol>
<initialize>
<![CDATA[
var namelist=editor._config.fontnamelist||'Arial,Verdana,Tahoma,Segoe UI,Sans-Serif,Comic Sans MS,Courier New,Georgia,Impact,Lucida Console,Times New Roman,Trebuchet MS,Monospace';
namelist=namelist.split(',');
for(var i=0;i<namelist.length;i++)
{
var item=jsml.class_create_instance("setfontnamedialogitem");
item.set_text(namelist[i]);
item.set_html('<div style="width:125px;font-size:13px;padding:0 20px;font-family:'+namelist[i]+';">'+namelist[i]+'</div>');
self.append_child(item);
}
]]>
</initialize>
</panel>
<attach name="keydown" arguments="je,e">
if(e.keyCode==27)dialog.close();
</attach>
</panel>
</jsml>

View File

@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<htmlcontrol jsml-class="setfontsizedialogitem" dock="top" overflow="visible" vertical_align="middle" margin="0" padding="0" border_width="1" border_color="transparent" cursor="pointer" unselectable="true">
<initialize>
self._estyle.fontFamily='"Segoe UI","Lucida Grande", Tahoma, Verdana, Arial, sans-serif';
<![CDATA[
if(!editor._config.preview_disabletooltip&&!editor._config.preview_disablefontsize)
{
self._previewhtml=editor.GetRangePreviewHTML("fontsize");
}
]]>
</initialize>
<attach name="mousehover" arguments="je,e">
self.set_border_color('#DCAC6C');
self.set_back_color('#FFF5D4');
self.set_text_color('blue');
</attach>
<attach name="mouseleave">
self.set_border_color('white');
self.set_back_color('');
self.set_text_color('');
</attach>
<attach name="click">
editor.ExecCommand("fontsize",self.get_text());
dialog.close();
</attach>
<method name="set_html" arguments="value" overrideas="basesethtml">
value=value.replace('(Default)',editor.GetLangText("default"))
self.basesethtml(value);
</method>
</htmlcontrol>
<panel dock="fill" margin="0" padding="0" overflow="visible" width="50">
<panel dock="fill" overflow="visible" padding="3">
<htmlcontrol jsml-base="setfontsizedialogitem" text="!">
<xmldata>
<div style="padding:0 10px;font-size:13px;">(Default)</div>
</xmldata>
</htmlcontrol>
<initialize>
<![CDATA[
var sizelist=editor._config.fontsizelist||'8px,9px,10px,11px,12px,13px,14px,16px,18px,20px,24px,36px';
sizelist=sizelist.split(',');
for(var i=0;i<sizelist.length;i++)
{
var item=jsml.class_create_instance("setfontsizedialogitem");
item.set_text(sizelist[i]);
item.set_html('<div style="padding:0 10px;font-size:'+sizelist[i]+';">'+sizelist[i]+'</div>');
self.append_child(item);
}
]]>
</initialize>
</panel>
<attach name="keydown" arguments="je,e">
if(e.keyCode==27)dialog.close();
</attach>
</panel>
</jsml>

View File

@@ -0,0 +1,145 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<panel jsml-class="setparagraphdialogitem" dock="flow" width="120" height="70" margin="2" padding="3" >
<htmlcontrol jsml-local="hc" vertical_align="middle" border_width="1" border_style="solid" border_color="#afb4ba" cursor="pointer" unselectable="true" dock="fill">
</htmlcontrol>
<method name="jsml_append_xmldata">
hc.jsml_append_xmldata(value);
</method>
<initialize>
self._estyle.fontFamily='"Segoe UI","Lucida Grande", Tahoma, Verdana, Arial, sans-serif';
</initialize>
<attach name="mousehover">
self.set_back_color("#ffdc63");
hc.set_border_color('orange');
hc.set_back_color('#eeeeee');
hc.set_text_color('blue');
self._estyle.boxShadow="3px 3px 12px #999999";
</attach>
<attach name="mouseleave">
self.set_back_color("");
hc.set_border_color('gray');
hc.set_back_color('');
hc.set_text_color('');
self._estyle.boxShadow="";
</attach>
<attach name="click">
editor.ExecCommand("FormatBlock",self.get_text());
dialog.close();
</attach>
</panel>
<panel dock="fill" margin="5" padding="5" width="520" overflow_y="visible">
<panel dock="bottom" height="20" overflow="visible">
<panel jsml-base="panelbutton" overflow="visible" width="60" padding="0,8,0,3">
<initialize>
if(!editor.QueryStyle("paragraph"))self.set_disabled(true);
</initialize>
<image dock="left" src="{folder}images/unformat.png" width="16" height="16" margin="2"/>
<label text="@REMOVE" vertical_align="middle" horizontal_align="center" cursor="pointer" dock="fill" width="10"/>
<attach name="click">
editor.ExecCommand("FormatBlock","!");
</attach>
</panel>
</panel>
<panel dock="fill" overflow="visible">
<panel jsml-base="setparagraphdialogitem" text="p">
<xmldata>
<p style="text-align:center;width:115px;margin:0px">AaBbCc</p>
<div style="text-align:center;width:115px;">Normal(P)</div>
</xmldata>
</panel>
<panel jsml-base="setparagraphdialogitem" text="div">
<xmldata>
<div style="text-align:center;width:115px;margin:0px">AaBbCc</div>
<div style="text-align:center;width:115px;">Div</div>
</xmldata>
</panel>
<panel jsml-base="setparagraphdialogitem" text="pre">
<xmldata>
<pre style="text-align:center;width:115px;margin:0px">AaBbCc(Pre)</pre>
<div style="text-align:center;width:115px;">Preformatted</div>
</xmldata>
</panel>
<panel jsml-base="setparagraphdialogitem" text="address">
<xmldata>
<address style="text-align:center;width:115px;margin:0px">AaBbCc</address>
<div style="text-align:center;width:115px;">Address</div>
</xmldata>
</panel>
<panel jsml-base="setparagraphdialogitem" text="h1">
<xmldata>
<h1 style="text-align:center;width:115px;margin:0px;">AaBbCc</h1>
<div style="text-align:center;width:115px;">Headline 1</div>
</xmldata>
</panel>
<panel jsml-base="setparagraphdialogitem" text="h2">
<xmldata>
<h2 style="text-align:center;width:115px;margin:0px">AaBbCc</h2>
<div style="text-align:center;width:115px;">Headline 2</div>
</xmldata>
</panel>
<panel jsml-base="setparagraphdialogitem" text="h3">
<xmldata>
<h3 style="text-align:center;width:115px;margin:0px">AaBbCc</h3>
<div style="text-align:center;width:115px;">Headline 3</div>
</xmldata>
</panel>
<panel jsml-base="setparagraphdialogitem" text="h4">
<xmldata>
<h4 style="text-align:center;width:115px;margin:0px">AaBbCc</h4>
<div style="text-align:center;width:115px;">Headline 4</div>
</xmldata>
</panel>
<panel jsml-base="setparagraphdialogitem" text="h5">
<xmldata>
<h5 style="text-align:center;width:115px;margin:0px">AaBbCc</h5>
<div style="text-align:center;width:115px;">Headline 5</div>
</xmldata>
</panel>
<panel jsml-base="setparagraphdialogitem" text="h6">
<xmldata>
<h6 style="text-align:center;width:115px;margin:0px">AaBbCc</h6>
<div style="text-align:center;width:115px;">Headline 6</div>
</xmldata>
</panel>
<panel width="500" height="20" dock="flow">
<label text="HTML5:" />
</panel>
<panel jsml-base="setparagraphdialogitem" text="article">
<xmldata>
<article style="text-align:center;width:115px;margin:0px">AaBbCc</article>
<div style="text-align:center;width:115px;">Article</div>
</xmldata>
</panel>
<panel jsml-base="setparagraphdialogitem" text="section">
<xmldata>
<section style="text-align:center;width:115px;margin:0px">AaBbCc</section>
<div style="text-align:center;width:115px;">Section</div>
</xmldata>
</panel>
<panel jsml-base="setparagraphdialogitem" text="header">
<xmldata>
<header style="text-align:center;width:115px;margin:0px">AaBbCc</header>
<div style="text-align:center;width:115px;">Header</div>
</xmldata>
</panel>
<panel jsml-base="setparagraphdialogitem" text="footer">
<xmldata>
<footer style="text-align:center;width:115px;margin:0px">AaBbCc</footer>
<div style="text-align:center;width:115px;">Footer</div>
</xmldata>
</panel>
</panel>
<attach name="keydown" arguments="je,e">
if(e.keyCode==27)dialog.close();
</attach>
</panel>
</jsml>

View File

@@ -0,0 +1,390 @@
<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns="http://cutesoft.net/jsml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cutesoft.net/jsml ../core/jsml.xsd">
<htmlcontrol jsml-class="setstylesdialogitem" dock="top" overflow="visible" font_size="11px" vertical_align="middle" margin="2" padding="2,2,2,4" border_width="1" border_color="transparent" cursor="pointer" unselectable="true">
<initialize>
self._estyle.fontFamily='"Segoe UI","Lucida Grande", Tahoma, Verdana, Arial, sans-serif';
</initialize>
<attach name="mousehover" arguments="je,e">
self.set_border_color('#DCAC6C');
self.set_back_color('#FFF5D4');
self.set_text_color('blue');
</attach>
<attach name="mouseleave">
self.set_border_color('white');
self.set_back_color('');
self.set_text_color('');
</attach>
<attach name="click">
editor.FormatApplyData(self._painterdata);
dialog.close();
</attach>
</htmlcontrol>
<panel jsml-class="setstyles_dialog" dock="fill" width="240" overflow="visible">
<panel jsml-local="mainpanel" dock="fill" >
<panel dock="fill" overflow="scroll" padding="8">
<panel dock="top" overflow="visible" jsml-local="panelstatic">
</panel>
<panel jsml-base="rtemenuspliter" margin="3" />
<panel dock="top" overflow="visible">
<label dock="left" vertical_align="middle" horizontal_align="left" padding="0,0,0,3" text="@RECENTSTYLE|:" width="120" />
<image jsml-base="imagebutton" left="180" width="20" height="20" tooltip="@quickstyle" src="{folder}images/icon_add.png" padding="1,-1,-1,1">
<attach name="click">
editor.ExecCommand("formatpainterfetch");
instance._reloadtab=true;
instance.loadstyles("history",panelhistory);
</attach>
</image>
</panel>
<panel dock="top" overflow="visible" jsml-local="panelhistory">
</panel>
</panel>
</panel>
<initialize>
<![CDATA[
self.stylearray=[];
self.readmap={};
var totallen=0;
jsml.suppend_layout();
self.loadstyles("static",panelstatic);
totallen+=self.stylearray.length;
self.loadstyles("history",panelhistory);
totallen+=self.stylearray.length;
var height=120+28*Math.ceil(totallen/1);
if(height<200)height=200;
if(height>366)height=366;
mainpanel.set_height(height);
jsml.resume_layout();
]]>
</initialize>
<method name="loadstyles" arguments="styletab,itemspanel">
<![CDATA[
var reload=self._reloadtab;
self._reloadtab=null;
editor.SetLocalData("Styles","ActiveTab",styletab)
itemspanel.dispose_children();
self.stylearray=self.readmap[styletab];
if(reload||!self.stylearray)
{
self.stylearray=[];
switch(styletab)
{
case "static":
self.loadstylefromstaticfile();
self.loadstylefromcontentcss();
break;
case "document":
self.loadstylefromdocument();
break;
case "history":
self.loadstylefromhistory();
//if(self.stylearray.length<=20)
// self.loadstylefromstaticfile();
//if(self.stylearray.length<=20)
// self.loadstylefromcontentcss();
if(self.stylearray.length>12)
self.stylearray.length=12;
break;
}
self.readmap[styletab]=self.stylearray;
}
self.appendstyles(itemspanel);
]]>
</method>
<method name="loadstylefromstaticfile">
<![CDATA[
var arr=[editor._config.folder+"config/staticstyles.xml?"+editor._config._urlsuffix];
arr=arr.concat(editor._config.stylexmlurlarray||[]);
for(var i=0;i<arr.length;i++)
{
var xh=jsml.xmlhttp();
xh.open("GET",arr[i],false);
xh.send("");
var xd=xh.responseXML;
if(!xd)continue;
var cns=xd.documentElement.childNodes;
for(var ci=0;ci<cns.length;ci++)
{
var node=cns.item(ci);
if(node.nodeName!="style")continue;
var data={};
var attrs=node.attributes;
for(var ai=0;ai<attrs.length;ai++)
{
var attr=attrs.item(ai);
data[attr.nodeName]=attr.nodeValue;
}
self.stylearray.push(data);
}
}
]]>
</method>
<method name="loadstylefromcontentcss">
<![CDATA[
if(!editor._config.autoparseclasses)
return;
var contentcss=editor._config.contentcss;
if(!contentcss&&!editor._config.contentcsstext)
return;
var disableclasslist=editor._config.disableclasslist
var disableclassmap;
if(disableclasslist)
{
disableclassmap={}
disableclasslist=disableclasslist.toLowerCase().split(',');
for(var i=0;i<disableclasslist.length;i++)
{
disableclassmap[disableclasslist[i]]=true;
}
}
contentcss=contentcss?contentcss.split(','):[];
for(var i=0;i<contentcss.length;i++)
{
if(!contentcss[i])
continue;
contentcss[i]=editor.MakeAbsoluteUrl(contentcss[i])
}
function ParseCssText(text)
{
if(!text)return "";
var sb=[];
var pairs=text.split(';');
for(var pi=0;pi<pairs.length;pi++)
{
var pair=pairs[pi].split(':');
if(pair.length!=2)
continue;
var n=pair[0].replace(/(^\s+|\s+$)/g,"").toLowerCase();
switch(n)
{
case "vertical-align":
case "font-weight":
case "font-style":
case "text-decoration":
case "color":
case "background-color":
case "font-size":
case "font-family":
sb.push(n+":"+pair[1]);
break;
}
}
return sb.join(";");
}
function ParseStyleSheet(ss)
{
var rs=ss.rules||ss.cssRules;
for(var ri=0;ri<rs.length;ri++)
{
var r=rs.item(ri);
var rts=r.selectorText.split(',');
var cst=null;
for(var rti=0;rti<rts.length;rti++)
{
var rt=rts[rti].replace(/(^\s+|\s+$)/g,"").split('.');
if(rt.length!=2)
continue;
if(rt[0]!=""&&rt[0].toLowerCase()!="span")
continue;
if(!rt[1].match(/^[a-z0-9]+$/i))
continue;
if(disableclassmap&&disableclassmap[rt[1]])
continue;
if(cst==null)
cst=ParseCssText(r.style.cssText);
if(!cst)
break;
self.stylearray.push({cssclass:rt[1],stylevalue:cst});
}
}
}
var sss=editor.GetWindow().document.styleSheets;
for(var ssi=0;ssi<sss.length;ssi++)
{
var ss=sss.item(ssi);
var url=ss.href;
if(!url)
{
if(!ss.ownerNode)
continue;
if(ss.ownerNode.getAttribute("_from")=="contentcsstext")
{
ParseStyleSheet(ss);
continue;
}
url=ss.ownerNode.getAttribute("originalurl");
if(!url)
continue;
}
for(var i=0;i<contentcss.length;i++)
{
if(!contentcss[i])
continue;
if(url.indexOf(contentcss[i])==-1)
continue;
ParseStyleSheet(ss);
break;
}
}
]]>
</method>
<method name="loadstylefromhistory">
self.stylearray=self.stylearray.concat(editor.LoadHistoryStyles());
</method>
<method name="loadstylefromdocument">
<![CDATA[
function ScanNode(node)
{
var c=0;
if(node.GetChildCount)
c=node.GetChildCount();
if(c==0)
{
var d=editor.FormatFindData(node,self.stylearray);
if(d)
{
self.stylearray.push(d);
}
return;
}
for(var i=0;i<c;i++)
{
var subnode=node.GetChildAt(i);
ScanNode(subnode);
}
}
var sel=editor.SaveBookmark();
ScanNode(editor.GetBodyNode());
editor.RestoreBookmark(sel);
]]>
</method>
<method name="appendstyles" arguments="itemspanel">
<![CDATA[
for(var i=0;i<self.stylearray.length;i++)
{
var data=self.stylearray[i];
var item=jsml.class_create_instance("setstylesdialogitem");
var div=document.createElement("DIV");
div.innerHTML="AaBbCc";
for(var n in data)
{
var v=data[n];
if(!v)continue;
switch(n)
{
case "name":
case "value":
break;
default:
item.set_tooltip( (item.get_tooltip()||"") +" "+n+"="+v);
break;
}
switch(n)
{
case "subscript":
if(!data.name)div.innerHTML="AaB<sub>bCc</sub>";
break;
case "superscript":
if(!data.name)div.innerHTML="AaB<sup>bCc</sup>";
break;
case "name":
if(v.charAt(0)=='@')
v=editor.GetLangText(v.substring(1));
div.innerHTML="<table style='width:192px'><tr><td>'"+v+"'</td><td style='text-align:right;font-size:10px;font-weight:normal;font-style:normal;color:#999999'>style</td></tr></table>";
break;
case "bold":
div.style.fontWeight="bold";
break;
case "italic":
div.style.fontStyle="italic";
break;
case "underline":
div.style.textDecoration=(div.style.textDecoration||"")+" underline";
break;
case "linethrough":
div.style.textDecoration=(div.style.textDecoration||"")+" line-through";
break;
case "overline":
div.style.textDecoration=(div.style.textDecoration||"")+" overline";
break;
case "mark":
div.style.backgroundColor='yellow';
break;
case "forecolor":
div.style.color=v;
break;
case "backcolor":
div.style.backgroundColor=v;
break;
case "fontsize":
div.style.fontSize=v;
break;
case "fontname":
div.style.fontFamily=v;
break;
case "cssclass":
div.className=v;
div.innerHTML="<table style='width:192px'><tr><td>'"+v+"'</td><td style='text-align:right;font-size:10px;font-weight:normal;font-style:normal;color:#999999'>class</td></tr></table>";
break;
case "cssstyle":
case "stylevalue":
div.style.cssText+=";"+v;
break;
}
}
div.style.textAlign="left";
div.style.width="190px";
item._painterdata=data;
item._content.appendChild(div);
itemspanel.append_child(item);
}
]]>
</method>
<attach name="keydown" arguments="je,e">
if(e.keyCode==27)dialog.close();
</attach>
</panel>
<panel jsml-base="setstyles_dialog"/>
</jsml>

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Some files were not shown because too many files have changed in this diff Show More