Mercurial > tinyurl_creator
diff chrome/content/tinyurl_dialog.xul @ 0:c14d52a3b2fe
initial import
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Mon, 11 Aug 2008 20:34:21 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/chrome/content/tinyurl_dialog.xul Mon Aug 11 20:34:21 2008 +0900 @@ -0,0 +1,87 @@ +<?xml version="1.0"?> +<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?> + +<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" + id="tinyurlDialog" title="TinyUrl Creator" + buttons="cancel, accept" + onload="tinyurl_load();" + ondialogaccept="document.getElementById('tinyurlDialogMain').style.cursor = 'wait'; tinyurl_createNew(); return false;" + ondialogcancel="if(opener != null)opener.focus(); return true;" + persist="width height" style="padding: 1px; margin: 0;" + buttonpack="center" buttonalign="center"> + <script type="application/x-javascript" src="chrome://tinyurl/content/tinyurl.js"></script> + <script type="application/x-javascript" src="chrome://tinyurl/content/saved.js"></script> + + <keyset> + <key id="copy-key" key="c" modifiers="control" oncommand="tinyurl_copy_command();" /> + <key id="close-key" key="w" modifiers="accel" oncommand="self.close();" /> + </keyset> + + <vbox flex="1" style="overflow: auto; padding: 7px;"> + <tabbox id="tinyurl-tabs" flex="1"> + <tabs> + <tab label="Create" id="tinyurl-create-tab" /> + <tab label="Saved" id="tinyurl-saved-tab" /> + </tabs> + <tabpanels flex="1"> + + <!-- Create TinyUrl --> + <tabpanel id="tinyurl-create-tab" orient="vertical" flex="1" align="center"> + <grid flex="1" id="tinyurlDialogMain"> + <rows> + <row align="center"> + <label value="Long URL:" style="font-weight: bold;"/> + <textbox id="longurl-field" value="" flex="1" /> + <button id="create-button" label="Get Tiny Url" dlgtype="accept" /> + </row> + <row align="center"> + <label value="Tiny URL:" style="font-weight: bold;" /> + <textbox id="tinyurl-field" value="" flex="1" readonly="true" /> + <button id="copy-button" label="Copy" oncommand="tinyurl_copy()" disabled="true" /> + <button id="save-button" label="Save" oncommand="" disabled="true" /> + </row> + </rows> + </grid> + </tabpanel> + + <!-- Veiw Saved TinyUrl's --> + <tabpanel id="tinyurl-saved-tabpanel" orient="vertical" flex="1"> + <tree id="saved-tree" flex="2" rows="5" seltype="single" onselect="tinyurl_saved_disable(false)" hidecolumnpicker="false" stlye="overflow: auto;"> + <treecols> + <treecol label="Title" id="title-col" flex="3" fixed="false" persist="width ordinal hidden" /> + <splitter class="tree-splitter" /> + <treecol label="Tiny Url" id="tiny-col" flex="2" fixed="false" persist="width ordinal hidden" /> + <splitter class="tree-splitter" /> + <treecol label="Real Url" id="real-col" flex="3" fixed="false" hidden="true" persist="width ordinal hidden" /> + </treecols> + <treechildren id="saved-items"> + <!-- + <treeitem container="true" open="true"> + <treerow> + <treecell label="Test1"/> + </treerow> + </treeitem> + --> + </treechildren> + </tree> + <spacer height="5" width="1" /> + <hbox pack="center" align="center"> + <button id="go-saved-button" label="Go" disabled="true" oncommand="tinyurl_saved_go();" image="chrome://tinyurl/content/icons/go_off.png" /> + <button id="copy-saved-button" label="Copy" disabled="true" oncommand="tinyurl_saved_copy()" image="chrome://tinyurl/content/icons/copy_off.png" /> + <button id="edit-saved-button" label="View / Edit" disabled="true" oncommand="tinyurl_saved_openEdit();" image="chrome://tinyurl/content/icons/edit_off.png" /> + <button id="remove-saved-button" label="Remove" disabled="true" oncommand="tinyurl_saved_remove();" image="chrome://tinyurl/content/icons/remove_off.png" /> + </hbox> + </tabpanel> + </tabpanels> + </tabbox> + </vbox> + + <hbox> + <hbox pack="center" align="center" flex="2"> + <label id="disclaimer_1" value="This extension uses" style="color: #666; font-size: xx-small;" /> + <label id="disclaimer_2" value="http://tinyurl.com" style="color: #00F; font-size: xx-small; margin-left: 0; text-decoration: underline; cursor: pointer;" onclick="tinyurl_gotoTinyUrl();" /> + <label id="disclaimer_3" value="to generate URLs" style="color: #666; font-size: xx-small; margin-left: 0;" /> + </hbox> + <resizer id="windowResizer" dir="bottomright" /> + </hbox> +</dialog> \ No newline at end of file