Changeset 593347


Ignore:
Timestamp:
Sep 24, 2008, 1:24:54 PM (13 years ago)
Author:
rene <rene@…>
Branches:
lite_0.1, multiEdit, ng_0.6, ng_0.6_help, ng_0.8, ng_0.9
Children:
174b75
Parents:
b34626
Message:

show information about selected items in TreeOverview?

Location:
chrome/content/v_identity
Files:
2 edited

Legend:

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

    rb34626 r593347  
    4242    init : function() {
    4343        vI_rdfDatasource.init();
    44         vI_rdfDataTree.__treeElem = document.getElementById("rdfDataTree");
     44        vI_rdfDataTree.__treeElem = document.getElementById("threadTree");
    4545        vI_rdfDataTree.__strings = document.getElementById("vI_rdfDataTreeBundle");
    4646        vI_storageExtrasHelper.hideUnusedTreeCols();
     
    6262                idCol : localIdentityData.id.value,
    6363                idKey : localIdentityData.id.key,
    64                 resource : resource }
     64                resource : resource,
     65                type : type,
     66                identityData : localIdentityData }
    6567       
    6668        localIdentityData.extras.addPrefs(pref);
     
    223225        vI_rdfDataTree.__idData = null; vI_rdfDataTree.__idTable = null;
    224226        vI_rdfDataTree.loadTable();
     227        vI_rdfDataTree.hideInfoBox();
    225228    },
    226229   
     
    239242            vI_rdfDataTree.__treeElem.view.selection.getRangeAt(t,start,end);
    240243            for (var v=start.value; v<=end.value; v++){
     244                vI_rdfDatasource.removeBagForResource(vI_rdfDataTree.__idTable[v]["resource"], vI_rdfDataTree.__idTable[v]["type"])
    241245                vI_rdfDatasource.removeVIdentityFromRDF(vI_rdfDataTree.__idTable[v]["resource"])
    242246            }
     
    245249        vI_rdfDataTree.__idData = null; vI_rdfDataTree.__idTable = null;
    246250        vI_rdfDataTree.loadTable();
    247     },
    248    
     251        vI_rdfDataTree.hideInfoBox();
     252    },
     253   
     254    onselect : function() {
     255        var htmlBox = document.getElementById("vI_rdfDataTreeInfoBox")
     256        if (vI_rdfDataTree.__treeElem.view.selection.count != 1)
     257            { vI_rdfDataTree.hideInfoBox(); return; }
     258       
     259        var identityData = vI_rdfDataTree.__idTable[vI_rdfDataTree.__treeElem.currentIndex]["identityData"];
     260        var _identityInfo =
     261            "<div id='recipientLabel'>" +
     262                vI_rdfDataTree.__idTable[vI_rdfDataTree.__treeElem.currentIndex]["recipientCol"].replace(/>/g,"&gt;").replace(/</g,"&lt;") +
     263            "</div><div id='vICard'>" +
     264            "<table><tr>" +
     265                "<td class='image'><img src='chrome://v_identity/skin/vi-info.png' /></td>" +
     266                "<td class='identityTable'>" +
     267                    "<div class='name'>" + identityData.combinedNameHtml + "</div>" +   
     268                    "<table><tbody>" + identityData.getMatrix() + "</tbody></table>" +
     269                "</td>" +
     270            "</tr></table></div>"
     271
     272        htmlBox.outputString = _identityInfo;
     273        vI_rdfDataTree.infoBoxHidden = false;
     274        htmlBox.setAttribute("style", "height:" + htmlBox.contentDocument.lastChild.scrollHeight +"px");
     275        vI_rdfDataTree.overflow(); // better resize one time too much :)
     276    },
     277
     278    infoBoxHidden : true,
     279    overflow : function() {
     280        if (vI_rdfDataTree.infoBoxHidden) return;
     281        var htmlBox = document.getElementById("vI_rdfDataTreeInfoBox")
     282        htmlBox.setAttribute("style", "height:" + htmlBox.contentDocument.lastChild.scrollHeight +"px");
     283
     284    },
     285
     286    hideInfoBox : function() {
     287        vI_rdfDataTree.infoBoxHidden = true;
     288        document.getElementById("vI_rdfDataTreeInfoBox").setAttribute("style", "height:0px");
     289    },
     290
    249291    selectAll : function() {
    250292        vI_rdfDataTree.__treeElem.view.selection.selectAll();
     
    265307        vI_rdfDataTree.__idData = null; vI_rdfDataTree.__idTable = null;
    266308        vI_rdfDataTree.loadTable();
     309        vI_rdfDataTree.hideInfoBox();
    267310    }
    268311};
  • chrome/content/v_identity/vI_rdfDataTree.xul

    rb34626 r593347  
    2525
    2626<?xml-stylesheet href="chrome://v_identity/skin/v_identity.css" type="text/css"?>
     27<?xml-stylesheet href="chrome://global/skin/tree.css" type="text/css"?>
     28<?xml-stylesheet href="chrome://messenger/skin/mailWindow1.css" type="text/css"?>
    2729
    2830<!DOCTYPE overlay [
     
    3335<!ENTITY % communicatorDTD SYSTEM "chrome://communicator/locale/contentAreaCommands.dtd" >
    3436  %communicatorDTD;
     37  <!ENTITY % messengercomposeDTD SYSTEM "chrome://messenger/locale/messengercompose/messengercompose.dtd" >
     38%messengercomposeDTD;
    3539]>
    3640
     
    5660    <stringbundle id="vI_rdfDataTreeBundle" src="chrome://v_identity/locale/vI_rdfDataEditor.properties" />
    5761    <stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties" />
     62    <stringbundle id="vIdentBundle" src="chrome://v_identity/locale/v_identity.properties" />
     63        <stringbundle id="vIStorageExtrasBundle" src="chrome://v_identity/locale/vI_storageExtras.properties" />
    5864</stringbundleset>
     65
     66<menupopup hidden="true">  <!--just to hold the localized labels-->
     67    <menuitem label="&autoFormatCmd.label;" accesskey="&autoFormatCmd.accesskey;" id="format_auto"/>
     68    <menuitem label="&plainTextFormatCmd.label;" accesskey="&plainTextFormatCmd.accesskey;" id="format_plain"/>
     69    <menuitem label="&htmlFormatCmd.label;" accesskey="&htmlFormatCmd.accesskey;" id="format_html"/>
     70    <menuitem label="&bothFormatCmd.label;" accesskey="&bothFormatCmd.accesskey;" id="format_both"/>
     71</menupopup>
    5972
    6073<popup id="configContext" onpopupshowing="if (event.target == this) vI_rdfDataTree.updateContextMenu();">
     
    107120</hbox>
    108121
    109 <tree id="rdfDataTree" flex="1" class="plain" seltype="multiple"
     122<!-- just to use the same style like the threadTree -->
     123<tree id="threadTree" flex="1" class="plain" seltype="multiple"
    110124    persist="sortDirection sortResource" sortDirection="ascending" sortResource="recipientCol"
    111     enableColumnDrag="true" context="configContext">
     125    enableColumnDrag="true" context="configContext" onselect="vI_rdfDataTree.onselect();">
    112126    <treecols id="rdfDataTreeCols">
    113127        <treecol id="recipientCol" label="&vI_rdfDataTree.recipientColumn.label;" flex="10"
     
    132146            persist="hidden width ordinal sortDirection"/>     
    133147    </treecols>
    134     <treechildren id="configTreeBody" ondblclick="if (event.button == 0) vI_rdfDataTree.modifySelected();" onmouseover="vI_notificationBar.dump('## vI_rdfDataTree.xul mouseover ' + vI_rdfDataTree.__treeElem.currentIndex + '\n');" />
     148    <treechildren id="configTreeBody" ondblclick="if (event.button == 0) vI_rdfDataTree.modifySelected();" />
    135149</tree>
    136    
     150<splitter />
     151<browser id="vI_rdfDataTreeInfoBox" class="vI_htmlTextBox" cssSource="vI_rdfTreeInfo.css" disablehistory="true" onoverflow="vI_rdfDataTree.overflow();"/>
     152
    137153    <splitter id="vIDebugBoxSplitter" hidden="true"/>
    138154    <textbox id="vIDebugBox" hidden="true" multiline="true" readonly="true"
Note: See TracChangeset for help on using the changeset viewer.