twingle/twingle/content/workspace genericviewer.xml,1.5,1.6
[email protected] Fri, 14 Mar 2003 03:26:30 -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-serv15966
Modified Files:
genericviewer.xml
Log Message:
new button for delete
Index: genericviewer.xml
===================================================================
RCS file: /cvs/root/twingle/twingle/content/workspace/genericviewer.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** genericviewer.xml 11 Mar 2003 10:23:43 -0000 1.5
--- genericviewer.xml 14 Mar 2003 10:26:28 -0000 1.6
***************
*** 1,7 ****
<?xml version="1.0"?>
! <bindings xmlns="http://www.mozilla.org/xbl"
! xmlns:xbl="http://www.mozilla.org/xbl"
! xmlns:html="http://www.w3.org/1999/xhtml"
! xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
--- 1,4 ----
<?xml version="1.0"?>
! <bindings xmlns="http://www.mozilla.org/xbl" xmlns:xbl="http://www.mozilla.org/xbl" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
***************
*** 9,13 ****
<content>
<xul:tabbox flex="1">
! <xul:tabs oncommand='document.getBindingParent(this).onTabsClick(this);'>
<xul:tab label="Contents"/>
<xul:tab label="Source"/>
--- 6,10 ----
<content>
<xul:tabbox flex="1">
! <xul:tabs oncommand="document.getBindingParent(this).onTabsClick(this);">
<xul:tab label="Contents"/>
<xul:tab label="Source"/>
***************
*** 39,43 ****
<implementation>
<field name="resourcetitle"/>
! <field name="sourceurl"></field>
<field name="previewurl"/>
<field name="saveurl"/>
--- 36,40 ----
<implementation>
<field name="resourcetitle"/>
! <field name="sourceurl"/>
<field name="previewurl"/>
<field name="saveurl"/>
***************
*** 81,91 ****
</body>
</method>
! <method name="save">
<body>
if (this.saveurl != "") {
! var p = new XMLHttpRequest();
! p.onload = function(e) {p = e.target; alert("RESPONSE \n"+ p.responseText);}
! p.open("PUT",this.saveurl);
! p.send(this.content,true);
}
else {
--- 78,118 ----
</body>
</method>
! <method name="checkResponse">
! <parameter name="xmlHttpReq"/>
! <body>
! <![CDATA[
! if ((xmlHttpReq.status>=200) && (xmlHttpReq.status<300)) {
! window.defaultStatus = "saved successfully";
! } else {
! alert(
! "save failed with code " + xmlHttpReq.status +
! "and message '" + xmlHttpReq.statusText + "'"
! );
! }
! ]]>
! </body>
! </method>
! <method name="saveIt">
! <body>
! this.perform("PUT");
! </body>
! </method>
! <method name="deleteIt">
! <body>
! this.perform("DELETE");
! </body>
! </method>
! <method name="perform">
! <parameter name="method"/>
<body>
if (this.saveurl != "") {
! var xmlHttpReq = new XMLHttpRequest();
! xmlHttpReq.container = this;
! xmlHttpReq.onload = function(event) {
! xmlHttpReq = event.target;
! xmlHttpReq.container.checkResponse(xmlHttpReq);
! }
! xmlHttpReq.open(method,this.saveurl);
! xmlHttpReq.send(this.content,true);
}
else {
***************
*** 159,163 ****
</implementation>
</binding>
! </bindings>
!
!
--- 186,188 ----
</implementation>
</binding>
! </bindings>
\ No newline at end of file