You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.8 KiB

<?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>