twingle/twingle/content/workspace editorbindings.xml,1.2,1.3
[email protected] Mon, 10 Mar 2003 00:40:46 -0700 (MST)
| Newsgroups | gmane.comp.cms.oscom.twingle.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvs/root/twingle/twingle/content/workspace
In directory alpha.oscom.org:/tmp/cvs-serv23340
Modified Files:
editorbindings.xml
Log Message:
moved preview code from attribute to own method
(actually, the method should be in the preview-widget, not in the viewer..)
Index: editorbindings.xml
===================================================================
RCS file: /cvs/root/twingle/twingle/content/workspace/editorbindings.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** editorbindings.xml 9 Mar 2003 22:50:53 -0000 1.2
--- editorbindings.xml 10 Mar 2003 07:40:44 -0000 1.3
***************
*** 12,27 ****
<xul:tab label="Contents" oncommand="document.getBindingParent(this).onCommandStart('articleeditor');"/>
<xul:tab label="Source" oncommand="document.getBindingParent(this).onCommandStart('sourceeditor');" />
! <xul:tab label="Preview" oncommand="
! var articleviewer = document.getAnonymousNodes(this)[0].parentNode.parentNode.parentNode.parentNode;
!
! var ifr = document.getAnonymousNodes(this)[0].parentNode.parentNode.parentNode.getElementsByTagNameNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul','iframe')[0];
!
! if (!ifr.getAttribute('src')) {
! ifr.setAttribute('src',articleviewer.previewurl);
! } else {
! ifr.webNavigation.reload(ifr.webNavigation.LOAD_FLAGS_NONE);;
! }
!
! "/>
<xul:tab label="Properties"/>
<xul:tab label="Web Manage"/>
--- 12,16 ----
<xul:tab label="Contents" oncommand="document.getBindingParent(this).onCommandStart('articleeditor');"/>
<xul:tab label="Source" oncommand="document.getBindingParent(this).onCommandStart('sourceeditor');" />
! <xul:tab label="Preview" oncommand="document.getBindingParent(this).loadPreview()"/>
<xul:tab label="Properties"/>
<xul:tab label="Web Manage"/>
***************
*** 34,38 ****
<xul:sourceeditor flex="1" />
</xul:tabpanel>
!
<xul:tabpanel>
<xul:iframe id="iframe" flex="1" src=""/>
--- 23,27 ----
<xul:sourceeditor flex="1" />
</xul:tabpanel>
!
<xul:tabpanel>
<xul:iframe id="iframe" flex="1" src=""/>
***************
*** 49,53 ****
<implementation>
<constructor>
! <![CDATA[
dump("\narticleviewer constructor start");
this.articleeditor = document.getAnonymousNodes(this)[0].getElementsByTagNameNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul","midaseditor")[0];
--- 38,42 ----
<implementation>
<constructor>
! <![CDATA[
dump("\narticleviewer constructor start");
this.articleeditor = document.getAnonymousNodes(this)[0].getElementsByTagNameNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul","midaseditor")[0];
***************
*** 57,63 ****
dump("\narticleviewer constructor end");
]]>
! </constructor>
-
<method name="onCommandStart">
<parameter name="prop"/>
--- 46,52 ----
dump("\narticleviewer constructor end");
]]>
! </constructor>
!
<method name="onCommandStart">
<parameter name="prop"/>
***************
*** 67,73 ****
</body>
</method>
! </implementation>
</binding>
<binding id="articleeditorbinding">
<content>
--- 56,79 ----
</body>
</method>
!
! <method name="loadPreview">
! <body>
! <![CDATA[
! var ifr = document.getAnonymousNodes(this)[0].getElementsByTagNameNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul','iframe')[0];
! if (!ifr.getAttribute('src')) {
! ifr.setAttribute('src',this.previewurl);
! } else {
! ifr.webNavigation.reload(ifr.webNavigation.LOAD_FLAGS_NONE);
! }
! ]]>
! </body>
!
! </method>
!
!
! </implementation>
</binding>
+ <!-- this binding is not used anywhere at the moment, <midaseditor> is used instead-->
<binding id="articleeditorbinding">
<content>