Changeset b9a85dc


Ignore:
Timestamp:
Mar 15, 2010, 3:31:25 PM (11 years ago)
Author:
rene <rene@…>
Branches:
multiEdit, ng_0.6, ng_0.8, ng_0.9
Children:
e2ec02
Parents:
ec3005
Message:

added small toggle-switch to hide pre-dialog buttons

Location:
chrome
Files:
3 edited

Legend:

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

    rec3005 rb9a85dc  
    237237            mAttr("storageUpDown","featureDisabled",element.checked);
    238238            vI_prefDialog.base.constraints();
     239        },
     240
     241        menuButtonConstraints : function(elem) {
     242            var mAttr = vI_prefDialog.base.modifyAttribute;
     243            var valueParam = (document.getElementById("viewGroup").getAttribute("hidden") == "true");   // true -> removeAttribute
     244            mAttr("logoButton2","hidden", valueParam);
     245            mAttr("toggleIcon","open", valueParam);
     246            document.getAnonymousElementByAttribute(dialogElem, "class", "box-inherit dialog-content-box").removeAttribute("flex");
     247        },
     248
     249        flipMenuButtons : function(elem) {
     250            var mAttr = vI_prefDialog.base.modifyAttribute;
     251            var valueParam = (elem.getAttribute("open") == "true");
     252            var dialogElem = document.getElementById("vI_prefDialog");
     253            var oldContentElemHeight = document.getAnonymousElementByAttribute(dialogElem, "class", "box-inherit dialog-content-box").clientHeight;
     254            mAttr("viewGroup","hidden", !valueParam);
     255            mAttr("logoButton2","hidden", valueParam);
     256            mAttr(elem.id,"open", valueParam);
     257            window.resizeBy( 0, document.getAnonymousElementByAttribute(dialogElem, "class", "box-inherit dialog-content-box").clientHeight - oldContentElemHeight);
    239258        }
    240259    },
     
    267286        vI_prefDialog.base.storageConstraint(document.getElementById("VIdent_identity.storage"));
    268287        vI_prefDialog.base.constraints();
     288        vI_prefDialog.base.menuButtonConstraints();
    269289        if (vI_storageExtrasHelper.seamonkey_to_old()) {
    270290            document.getElementById("storageExtrasTreeitem1").setAttribute("hidden", "true")
  • chrome/content/v_identity/vI_prefDialog.xul

    rec3005 rb9a85dc  
    4242<?xml-stylesheet href="chrome://mozapps/skin/extensions/extensions.css"?>
    4343<?xml-stylesheet href="chrome://v_identity/skin/v_identity.css" type="text/css"?>
     44<?xml-stylesheet href="chrome://messenger/skin/messageHeader.css"?>
     45
    4446
    4547<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
     
    7880
    7981<tabbox id="prefTabbox" class="viewSelector ">
    80     <radiogroup xhtml:role="listbox" id="viewGroup" persist="last-selected"
    81         class="chromeclass-toolbar" orient="horizontal" >
     82    <hbox>
     83    <vbox>
     84        <image id="toggleIcon" class="addresstwisty" onclick="vI_prefDialog.base.flipMenuButtons(this);" open="true" persist="open" />
     85        <spacer flex="1" />
     86    </vbox>
     87    <radiogroup xhtml:role="listbox" id="viewGroup" persist="hidden last-selected"
     88        class="chromeclass-toolbar" orient="horizontal" flex="1" >
    8289        <vbox>
    8390        <hbox>
     
    117124            </hbox>
    118125            <spacer flex="1"/>
    119             <button class="v_identity_logo v_identity_logo_button"
     126            <button id="logoButton1" class="v_identity_logo v_identity_logo_button"
    120127                label="&vident.vidLogo.label; &vident.version;"
    121128                oncommand="vI_prefDialog.openURL('http://www.absorb.it/virtual-id')"
     
    123130        </vbox>
    124131    </radiogroup>
    125     <tabs>
    126         <tab label="&vI_prefDialog.tabbox.tab0.label;" oncommand="document.getElementById('viewGroup').selectedIndex = 0;"/>
    127         <tab label="&vI_prefDialog.tabbox.tab1.label;" oncommand="document.getElementById('viewGroup').selectedIndex = 1;"/>
    128         <tab label="&vI_prefDialog.tabbox.tab2.label;" oncommand="document.getElementById('viewGroup').selectedIndex = 2;"/>
    129         <tab label="&vI_prefDialog.tabbox.tab3.label;" oncommand="document.getElementById('viewGroup').selectedIndex = 3;"/>
    130         <tab label="&vI_prefDialog.tabbox.tab4.label;" oncommand="document.getElementById('viewGroup').selectedIndex = 4;"/>
    131         <tab label="&vI_prefDialog.tabbox.tab5.label;" oncommand="document.getElementById('viewGroup').selectedIndex = 5;"/>
    132     </tabs>
     132    </hbox>
     133    <hbox>
     134        <tabs>
     135            <tab label="&vI_prefDialog.tabbox.tab0.label;" oncommand="document.getElementById('viewGroup').selectedIndex = 0;"/>
     136            <tab label="&vI_prefDialog.tabbox.tab1.label;" oncommand="document.getElementById('viewGroup').selectedIndex = 1;"/>
     137            <tab label="&vI_prefDialog.tabbox.tab2.label;" oncommand="document.getElementById('viewGroup').selectedIndex = 2;"/>
     138            <tab label="&vI_prefDialog.tabbox.tab3.label;" oncommand="document.getElementById('viewGroup').selectedIndex = 3;"/>
     139            <tab label="&vI_prefDialog.tabbox.tab4.label;" oncommand="document.getElementById('viewGroup').selectedIndex = 4;"/>
     140            <tab label="&vI_prefDialog.tabbox.tab5.label;" oncommand="document.getElementById('viewGroup').selectedIndex = 5;"/>
     141        </tabs>
     142        <spacer flex="1" />
     143        <button id="logoButton2" class="v_identity_logo v_identity_logo_button"
     144                label="&vident.vidLogo.label; &vident.version;"
     145                oncommand="vI_prefDialog.openURL('http://www.absorb.it/virtual-id')"
     146                tooltiptext="&vI_prefDialog.vidLogo.tooltiptext;" hidden="true" />
     147    </hbox>
    133148    <tabpanels>
    134149    <tabpanel orient="vertical" >
  • chrome/skin/classic/v_identity/v_identity.css

    rec3005 rb9a85dc  
    7979tree.vIprefTree {
    8080    width: 15em;
     81}
     82
     83#logoButton2 {
     84    margin-left: 2em; margin-top: -1em;
    8185}
    8286
Note: See TracChangeset for help on using the changeset viewer.