Changeset fa4f02


Ignore:
Timestamp:
Apr 14, 2008, 7:14:41 PM (14 years ago)
Author:
rene <rene@…>
Branches:
master
Children:
e97c30
Parents:
abc9ff
Message:

rearranged DataTree? Menu

Location:
chrome
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • chrome/content/v_identity/vI_rdfDataTree.js

    rabc9ff rfa4f02  
    212212    },
    213213   
    214     updateContextMenu : function() { },
    215    
     214    __updateMenu : function(modifySelected, removeSelected) {
     215        noSelections = (vI_rdfDataTree.__treeElem.view.selection.count == 0)
     216        modifySelected.setAttribute("disabled", noSelections)
     217        removeSelected.setAttribute("disabled", noSelections)   
     218    },
     219   
     220    updateContextMenu : function() {
     221        vI_rdfDataTree.__updateMenu(
     222            document.getElementById("context_modifySelected"),
     223            document.getElementById("context_removeSelected"))
     224    },
     225   
     226    updateMenu : function() {
     227        vI_rdfDataTree.__updateMenu(
     228            document.getElementById("menu_modifySelected"),
     229            document.getElementById("menu_removeSelected"))
     230    },
     231
    216232    modifySelected : function() {
     233        if (vI_rdfDataTree.__treeElem.view.selection.count == 0) return;
     234        if (vI_rdfDataTree.__treeElem.view.selection.count > 5) {
     235            var warning = vI_rdfDataTree.__strings.getString("vI_rdfDataTree.modify.Warning1") + " " +
     236                vI_rdfDataTree.__treeElem.view.selection.count + " " +
     237                vI_rdfDataTree.__strings.getString("vI_rdfDataTree.modify.Warning2")
     238            if (!vI_rdfDataTree.promptService.confirm(window,"Warning",warning)) return;
     239        }
     240       
    217241        var start = new Object(); var end = new Object();
    218242        var numRanges = vI_rdfDataTree.__treeElem.view.selection.getRangeCount();
     
    232256   
    233257    removeSelected : function() {
     258        if (vI_rdfDataTree.__treeElem.view.selection.count == 0) return;
    234259        var warning = vI_rdfDataTree.__strings.getString("vI_rdfDataTree.remove.Warning1") + " " +
    235260            vI_rdfDataTree.__treeElem.view.selection.count + " " +
  • chrome/content/v_identity/vI_rdfDataTree.xul

    rabc9ff rfa4f02  
    5252
    5353<popup id="configContext" onpopupshowing="if (event.target == this) vI_rdfDataTree.updateContextMenu();">
    54     <menuitem id="modifySelected" label="&vI_rdfDataTree.modifySelected.label;"
     54    <menuitem id="context_modifySelected" label="&vI_rdfDataTree.modifySelected.label;"
    5555        oncommand="vI_rdfDataTree.modifySelected();"/>
    56     <menuitem id="removeSelected" label="&vI_rdfDataTree.removeSelected.label;"
     56    <menuitem id="context_removeSelected" label="&vI_rdfDataTree.removeSelected.label;"
    5757        oncommand="vI_rdfDataTree.removeSelected();"/>
    58     <menuitem id="newItem" label="&vI_rdfDataTree.newItem.label;"
     58    <menuitem id="context_newItem" label="&vI_rdfDataTree.newItem.label;"
    5959        oncommand="vI_rdfDataTree.newItem();"/>
    6060    <menuseparator />
    61     <menuitem id="menu_selectAll" label="&selectAllCmd.label;"
     61    <menuitem id="context_menu_selectAll" label="&selectAllCmd.label;"
    6262        oncommand="vI_rdfDataTree.selectAll();"/>
    6363</popup>
     
    7272
    7373<hbox align="center">
    74     <button id="newItem" label="&vI_rdfDataTree.newItem.label;" accesskey="&vI_rdfDataTree.newItem.accesskey;" oncommand="vI_rdfDataTree.newItem();" />
     74    <spacer width="3px" />
     75    <vbox><spacer flex="1"/>
     76    <menubar>
     77        <menu id="editMenu" label="&vI_rdfDataTree.editMenu.label;"
     78            accesskey="&vI_rdfDataTree.editMenu.accesskey;">
     79        <menupopup onpopupshowing="if (event.target == this) vI_rdfDataTree.updateMenu();">
     80            <menuitem id="menu_modifySelected" label="&vI_rdfDataTree.modifySelected.label;"
     81                accesskey="&vI_rdfDataTree.modifySelected.accesskey;"
     82                oncommand="vI_rdfDataTree.modifySelected();"/>
     83            <menuitem id="menu_removeSelected" label="&vI_rdfDataTree.removeSelected.label;"
     84                accesskey="&vI_rdfDataTree.removeSelected.accesskey;"
     85                oncommand="vI_rdfDataTree.removeSelected();"/>
     86            <menuitem id="menu_newItem" label="&vI_rdfDataTree.newItem.label;"
     87                accesskey="&vI_rdfDataTree.newItem.accesskey;"
     88                oncommand="vI_rdfDataTree.newItem();"/>
     89            <menuseparator />
     90            <menuitem id="menu_menu_selectAll" label="&selectAllCmd.label;" accesskey="&selectAllCmd.accesskey;"
     91                oncommand="vI_rdfDataTree.selectAll();"/>
     92        </menupopup>
     93        </menu>
     94    </menubar>
     95    <spacer flex="1"/></vbox>
     96    <spacer width="20px" />
    7597    <label value="&vI_rdfDataTree.filterPrefs.label;" accesskey="&vI_rdfDataTree.filterPrefs.accesskey;" control="filter"/>
    7698    <textbox id="filter" flex="1" type="timed" timeout="500" oninput="vI_rdfDataTree.inputFilter(event);"/>
  • chrome/locale/en-US/v_identity/vI_rdfDataEditor.properties

    rabc9ff rfa4f02  
    11vI_rdfDataTree.remove.Warning1= You are about to remove
    22vI_rdfDataTree.remove.Warning2= stored dataset(s). Continue?
     3vI_rdfDataTree.modify.Warning1= You are about to edit
     4vI_rdfDataTree.modify.Warning2= stored dataset(s). Continue?
    35vI_rdfDataTree.dataType.email=email address
    46vI_rdfDataTree.dataType.maillist=mailing list
  • chrome/locale/en-US/v_identity/vI_rdfDataTree.dtd

    rabc9ff rfa4f02  
    11<!ENTITY vI_rdfDataTree.filterPrefs.label "Filter:">
    22<!ENTITY vI_rdfDataTree.filterPrefs.accesskey "i">
    3 <!ENTITY vI_rdfDataTree.newItem.label "New Entry">
    4 <!ENTITY vI_rdfDataTree.newItem.accesskey "n">
    53<!ENTITY vI_rdfDataTree.showAll.label "Show All">
    64<!ENTITY vI_rdfDataTree.showAll.accesskey "w">
     
    1210<!ENTITY vI_rdfDataTree.menuEntry.label "Virtual Identity Data-Storage">
    1311
     12<!ENTITY vI_rdfDataTree.editMenu.label "Edit">
     13<!ENTITY vI_rdfDataTree.editMenu.accesskey "E">
    1414<!ENTITY vI_rdfDataTree.modifySelected.label "modify selected Items">
     15<!ENTITY vI_rdfDataTree.modifySelected.accesskey "M">
    1516<!ENTITY vI_rdfDataTree.removeSelected.label "remove selected Items">
     17<!ENTITY vI_rdfDataTree.removeSelected.accesskey "R">
    1618<!ENTITY vI_rdfDataTree.newItem.label "add new Item">
     19<!ENTITY vI_rdfDataTree.newItem.accesskey "N">
    1720
Note: See TracChangeset for help on using the changeset viewer.