[Zope-CVS] CVS: Packages/Moztop/moztop/content/workspace - imagebindings.xbl:1.1

Stephan Richter srichter@cbu.edu
Sun, 23 Mar 2003 00:21:40 -0500


Update of /cvs-repository/Packages/Moztop/moztop/content/workspace
In directory cvs.zope.org:/tmp/cvs-serv30146/moztop/content/workspace

Added Files:
	imagebindings.xbl 
Log Message:
Added preliminary Image XBL stuff. Nothing working yet though. :( 

The lack of DAV support in Zope 3 becomes a serious bottleneck! :(


=== Added File Packages/Moztop/moztop/content/workspace/imagebindings.xbl ===
<?xml version="1.0" encoding="iso-latin-1"?>
<bindings 
  xmlns="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">

  <binding id="imageviewerbinding" extends="xul:tabpanel">
    <content>
      <xul:tabbox flex="1">

	<xul:tabs>
	  <xul:tab label="Upload"/>
	  <xul:tab label="Meta Data"/>
	  <xul:tab label="Preview"/>
        </xul:tabs>

	<xul:tabpanels flex="1">
	  <xul:imageuploadpanel flex="1"/>
	  <xul:imagemetadatapanel flex="1"/>
	  <xul:imagepreviewpanel flex="1"/>
        </xul:tabpanels>

      </xul:tabbox>
    </content>

    <implementation>
      <field name="urn"/>
      <field name="resourcetitle"/>
      <constructor>
      </constructor>
    </implementation>
  </binding>

  <binding id="imageuploadpanelbinding" extends="xul:tabpanel">
    <content orient="vertical">

      <xul:grid>
      	<xul:columns>
      	  <xul:column/>
      	  <xul:column flex="1"/>
      	</xul:columns>
      	<xul:rows>
      	  <xul:row>
      	    <xul:label value="Size:" />
      	    <xul:label id="field_size" value="? x ?; 1kB" />
      	  </xul:row>
      	  <xul:row>
      	    <xul:label control="field_content_type" value="Content Type"/>
      	    <xul:textbox id="field_content_type" value="image/png" flex="1"/>
      	  </xul:row>
      	  <xul:row>
      	    <xul:label control="field_upload" value="File to Upload"/>
      	    <xul:box orient="horizontal">
      	      <xul:textbox id="field_upload" value="" flex="1"/>
      	      <xul:button onclick="handleFilePicker();" label="File..." />
      	    </xul:box>
      	  </xul:row>
      	</xul:rows>
      </xul:grid>
      <xul:box orient="horizontal">
        <xul:button onclick="uploadFile()" label="Upload" />
        <xul:button onclick="refresh()" label="Refresh" />
        <xul:spring flex="100%" />
      </xul:box>

    </content>

    <implementation>
      <constructor>
      </constructor>
    </implementation>

  </binding>

  <binding id="imagemetadatapanelbinding" extends="xul:tabpanel">
    <content orient="vertical">
      <xul:groupbox>
        <xul:caption label="Edit"/>
        <xul:grid flex="1">
          <xul:columns>
            <xul:column/>
            <xul:column flex="1"/>
          </xul:columns>
          <xul:rows>
            <xul:row>
              <xul:label control="field_title" value="Title"/>
              <xul:textbox id="field_title" flex="1"/>
            </xul:row>
            <xul:row>
              <xul:label control="field_description" value="Description"/>
              <xul:textbox id="field_description" flex="1"/>
            </xul:row>
            <xul:row>
              <xul:label value="Created on:" />
              <xul:label id="field_created" value="01/01/2003" />
            </xul:row>
            <xul:row>
              <xul:label value="Last modified on:" />
              <xul:label id="field_modified" value="01/01/2003" />
            </xul:row>
          </xul:rows>
        </xul:grid>
        <xul:box orient="horizontal">
          <xul:button onclick="saveMetaData()" label="Save" />
          <xul:button onclick="loadMetaData()" label="Refresh" />
          <xul:spring flex="100%" />
        </xul:box>
      </xul:groupbox>

    </content>

    <implementation>
      <constructor>
      </constructor>
    </implementation>

  </binding>

  <binding id="imagepreviewpanelbinding" extends="xul:tabpanel">
    <content orient="vertical">
      <xul:iframe id="preview-frame" src="" flex="1"/>
      <xul:box orient="horizontal">
        <xul:button onclick="loadPreview();" label="Reload Content" />
        <xul:spring flex="100%" />
      </xul:box>
    </content>

    <implementation>
      <constructor>
        // The constructor assumes that 'urn' is defined in this scope
        var iframe = document.getElementById('preview-frame');
        iframe.setAttribute("src", urn);
      </constructor>
    </implementation>

  </binding>

</bindings>