File:  [mozdev] / annozilla / src / content / annozilla / annozilla.xul
Revision 1.30: download - view: text, annotated - select for diffs - revision graph
Thu Dec 29 18:46:18 2005 UTC (13 years, 6 months ago) by matthew
Branches: MAIN
CVS tags: HEAD, ANNOZILLA-ES-CHANGES, ANNOZILLA-ES, ANNOZILLA-CGH-CHANGES, ANNOZILLA-0-6-7-BRANCH, ANNOZILLA-0-6-7, ANNOZILLA-0-6-6, ANNOZILLA-0-6-5
Added context menu to annotation bodies loaded in the sidebar with Copy, Select All. (Bug 12626)

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://annozilla/content/annozilla.css" type="text/css"?>

<!DOCTYPE window SYSTEM "chrome://annozilla/locale/annozilla.dtd" >

<!-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
   -
   - The contents of this file are subject to the Mozilla Public License Version
   - 1.1 (the "License"); you may not use this file except in compliance with
   - the License. You may obtain a copy of the License at
   - http://www.mozilla.org/MPL/
   -
   - Software distributed under the License is distributed on an "AS IS" basis,
   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   - for the specific language governing rights and limitations under the
   - License.
   -
   - The Original Code is Annozilla.
   -
   - The Initial Developer of the Original Code is
   - Matthew Wilson <matthew@mjwilson.demon.co.uk>.
   - Portions created by the Initial Developer are Copyright (C) 2002
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -
   - Alternatively, the contents of this file may be used under the terms of
   - either the GNU General Public License Version 2 or later (the "GPL"), or
   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
   - in which case the provisions of the GPL or the LGPL are applicable instead
   - of those above. If you wish to allow use of your version of this file only
   - under the terms of either the GPL or the LGPL, and not to allow others to
   - use your version of this file under the terms of the MPL, indicate your
   - decision by deleting the provisions above and replace them with the notice
   - and other provisions required by the LGPL or the GPL. If you do not delete
   - the provisions above, a recipient may use your version of this file under
   - the terms of any one of the MPL, the GPL or the LGPL.
   - ***** END LICENSE BLOCK ***** -->

<window
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    id="annozillaWindow"
    title="Annozilla Sidebar"
    onload="initialize()"
    orient="vertical">
   
    <script type="application/x-javascript" src="chrome://annozilla/content/XPCU.js"/>
    <script type="application/x-javascript" src="chrome://annozilla/content/RDFU.js"/>
    <script type="application/x-javascript" src="chrome://global/content/strres.js"/>
    <script type="application/x-javascript" src="chrome://annozilla/content/xpointer.js"/>
    <script type="application/x-javascript" src="chrome://annozilla/content/prefs/prefs.js"/>
    <script type="application/x-javascript" src="chrome://annozilla/content/XULSidebar.js"/>
    <script type="application/x-javascript" src="chrome://annozilla/content/LocalServerUtils.js"/>
    <script type="application/x-javascript" src="chrome://annozilla/content/annozilla.js"/>

    <vbox flex="1">
       
	<popupset>
            <popup id="loadAndCreatePopup">
               <menuitem id="load" label="&annotationLoadAnnotationListLabel;" accesskey="&annotationLoadAnnotationListKey;" oncommand="gAnnozillaSidebar.userLoadOnCommand();"/>
               <menuitem id="create-annotation" label="&annotationCreateAnnotationLabel;" accesskey="&annotationCreateAnnotationKey;" oncommand="gAnnozillaSidebar.postOnCommand()"/>
            </popup>
        </popupset>

        <hbox id="loadCreateBox" class="toolbar">
           <toolbarbutton id="loadCreateMenuTButton" label="&annotationAnnotationsMenuLabel;"
                          popup="loadAndCreatePopup"/>
        </hbox>

        <popupset>
            <popup id="annotationPopup">
                <menuitem id="view-annotation-body" label="&annotationViewAnnotationLabel;" oncommand="gAnnozillaSidebar.loadBodyOnCommand()" accesskey="&annotationViewAnnotationKey;"/>
                <menuitem id="edit-annotation-body" label="&annotationEditAnnotationLabel;" oncommand="gAnnozillaSidebar.updateOnCommand()" accesskey="&annotationEditAnnotationKey;"/>
                <menuitem id="delete-annotation"    label="&annotationDeleteAnnotationLabel;"    oncommand="gAnnozillaSidebar.deleteOnCommand()" accesskey="&annotationDeleteAnnotationKey;"/>
                <!--
                <menuitem id="reply-to-annotation"  label="&annotationReplyAnnotationLabel;" accesskey="&annotationReplyAnnotationKey;"/>
                <menuitem id="check-for-replies"  label="Check for replies" accesskey="C" oncommand="check_for_replies()"/>
                -->
           </popup>
        </popupset>

        <vbox flex="1">

            <vbox flex="1">

                <tree flex="1" id="annotationTree" multiple="false" hidecolumnpicker="true">
                    <treecols>
                        <treecol id="headerXUL" label="&annotationAnnotationList;" flex="1" primary="true"/>
                    </treecols>

                    <treechildren id="annotationTreeChildren">
                        <treeitem>
                            <treerow>
                                <treecell label="&annotationNoAnnotations;"/>
                            </treerow>
                        </treeitem>
                    </treechildren>
                </tree>

                <statusbar id="statusbar" flex="0" orient="horizontal">
                        <statusbarpanel id="statusbar-text" flex="5" label="" crop="right"/>
                    <statusbarpanel id="statusbar-progress" flex="1">
                        <progressmeter id="progress" mode="determined"/>
                    </statusbarpanel>
                </statusbar>

            </vbox>

            <splitter collapse="before" orient="vertical" pack="center" align="center" state="open">
                <grippy/>
            </splitter>

            <hbox flex="1" persist="height">

                <popupset>
                    <popup id="browserContextMenu">
                        <menuitem id="browserSelectAll" label="Select All" accesskey="A"
                                  oncommand='document.getElementById ("body").contentViewerEdit.selectAll();'/>
                        <menuitem id="browserCopy" label="Copy" accesskey="C"
                                  oncommand='document.getElementById ("body").contentViewerEdit.copySelection();'/>
                    </popup>
                </popupset>

                <browser
                    id="body"
                    disableHistory="true" 
                    type="content"
                    context="browserContextMenu"
                    flex="1"
                    src="about:blank"/>

            </hbox>

        </vbox>

    </vbox>
</window>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>