Changeset ce8828


Ignore:
Timestamp:
Apr 5, 2010, 11:40:46 AM (12 years ago)
Author:
rene <rene@…>
Branches:
multiEdit, ng_0.6, ng_0.6_help, ng_0.8, ng_0.9
Children:
8e5aff
Parents:
ab880d
Message:

new modifications - now using remotecontent element from update.xml

Location:
chrome
Files:
6 edited

Legend:

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

    rab880d rce8828  
    2525var vI_Help = {
    2626    init : function(htmlFile) {
    27         // refresh window contents through resizing
    28         window.resizeTo(window.outerWidth, window.outerHeight);
    29         // document.getElementById('vI_Help_browser').loadURI('chrome://v_identity/content/doc/' + htmlFile);
    30 //      document.getElementById('vI_Help_browser').htmlSource = htmlFile;
    31         document.getElementById('vI_Help_browser').cssSource = "localDoc.css";
     27        // copied and adapted from mozapps/plugins/pluginInstallerWizard.js
     28        // add a nsIWebProgress listener to the license iframe.
     29        document.getElementById('vI_remoteBrowserBox').localCss = "localDoc.css";
     30        document.getElementById('vI_remoteBrowserBox').url = "https://www.absorb.it/virtual-id/wiki/docSmartIdentities";
    3231    }
    3332}
  • chrome/content/v_identity/vI_Help.xul

    rab880d rce8828  
    2626<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>   
    2727<?xml-stylesheet href="chrome://v_identity/skin/v_identity.css" type="text/css"?>
     28<?xml-stylesheet href="chrome://mozapps/content/update/updates.css"?>
     29
    2830
    2931<!DOCTYPE overlay [
     
    5456                tooltiptext="&vI_Help.vidLogo.tooltiptext;" />
    5557    </hbox>
    56    
    57     <browser id="vI_Help_browser" src="https://www.absorb.it/virtual-id/wiki/docSmartIdentities" class="vI_htmlTextBox" flex="1" />
     58    <browserbox id="vI_remoteBrowserBox" class="vI_remoteBrowserBox" flex="1"/>
    5859</dialog>
  • chrome/content/v_identity/vI_htmlTextBox.xml

    rab880d rce8828  
    2828          xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    2929          xmlns:xbl="http://www.mozilla.org/xbl">
    30     <binding id="vI_htmlTextBox" extends="chrome://global/content/bindings/browser.xml#browser">
     30   
     31    <binding id="vI_browserBox" extends="chrome://global/content/bindings/browser.xml#browser">
    3132    <implementation>
    32     <constructor>
    33         <![CDATA[       
    34         dump('******* vI_htmlTextBox.xml constructor\n');
    35         ]]>
    36     </constructor>
    37     <property name="outputString" >
    38         <setter><![CDATA[
    39         if (!this._cssRead) this.cssSource = this.getAttribute('cssSource');    // read initial Attributes
    40         this.contentDocument.lastChild.setAttribute("style", this.getAttribute('documentStyle'));
    41        
    42         var oldChilds = this.contentDocument.body.childNodes;
    43         while (oldChilds.length > 0) this.contentDocument.body.removeChild(oldChilds[0])
    44 
    45         var text_list = val.split(/\n/)
    46         for (var i = 0; i < text_list.length; i++) {
    47             if (this._isHR(text_list[i])) continue;
    48             var text_item = this._checkList(text_list[i]);
    49             this._add(text_item);
    50             if (!this._currentList && (i + 1) < text_list.length) {
    51                 var new_br = this.contentDocument
    52                     .createElementNS("http://www.w3.org/1999/xhtml", 'html:br');
    53                 this.contentDocument.body.appendChild(new_br);
    54             }
    55         }
    56         ]]></setter>
    57     </property>
    5833    <field name="_cssRead">false</field>
    5934    <property name="cssSource" >
     
    8964        ]]></setter>
    9065    </property>
    91     <field name="_currentList">null</field>
    92     <field name="_currentBaseNode">null</field>
    9366    <method name="_getContents">
    9467        <parameter name="aURL" />
     
    11083        ]]></body>
    11184    </method>
     85    </implementation>
     86    </binding>
     87
     88    <binding id="vI_remoteBrowserBox" extends="chrome://mozapps/content/update/updates.xml#remotecontent">
     89    <content>
     90        <xul:hbox flex="1" >
     91            <xul:vbox class="vI_remoteBrowserBoxProgressmeter" flex="1" >
     92                <xul:progressmeter mode="undetermined" />
     93                <xul:spacer flex="1" />
     94            </xul:vbox>
     95            <xul:browser class="vI_browserBox" hidden="true" flex="1" />
     96        </xul:hbox>
     97    </content>
     98    <resources>
     99            <stylesheet src="chrome://v_identity/skin/v_identity.css"/>
     100    </resources>
     101    <implementation>
     102    <field name="_content">
     103        document.getAnonymousElementByAttribute(this, "class", "vI_browserBox");
     104    </field>
     105    <field name="_progress">
     106        document.getAnonymousElementByAttribute(this, "class", "vI_remoteBrowserBoxProgressmeter");
     107    </field>
     108    <property name="localCss" onget="return this.getAttribute('localCss');" onset="this.setAttribute('localCss', val); return val;" />
     109    <method name="onError">
     110    <body><![CDATA[
     111        alert("error");
     112    ]]></body>
     113    </method>
     114    <method name="onLoad">
     115        <body><![CDATA[
     116        this._content.cssSource = this.localCss;
     117        this._progress.setAttribute("hidden", "true");
     118        this._content.removeAttribute("hidden");
     119    ]]></body>
     120    </method>
     121    <method name="onStart">
     122    <body><![CDATA[
     123        this._content.setAttribute("hidden", "true");
     124        this._progress.removeAttribute("hidden");
     125    ]]></body>
     126    </method>
     127    </implementation>
     128    </binding>
     129
     130
     131    <binding id="vI_htmlTextBox" extends="chrome://v_identity/content/vI_htmlTextBox.xml#BrowserBox">
     132    <implementation>
     133    <constructor>
     134        <![CDATA[       
     135        dump('******* vI_htmlTextBox.xml constructor\n');
     136        ]]>
     137    </constructor>
     138    <property name="outputString" >
     139        <setter><![CDATA[
     140        if (!this._cssRead) this.cssSource = this.getAttribute('cssSource');    // read initial Attributes
     141        this.contentDocument.lastChild.setAttribute("style", this.getAttribute('documentStyle'));
     142       
     143        var oldChilds = this.contentDocument.body.childNodes;
     144        while (oldChilds.length > 0) this.contentDocument.body.removeChild(oldChilds[0])
     145
     146        var text_list = val.split(/\n/)
     147        for (var i = 0; i < text_list.length; i++) {
     148            if (this._isHR(text_list[i])) continue;
     149            var text_item = this._checkList(text_list[i]);
     150            this._add(text_item);
     151            if (!this._currentList && (i + 1) < text_list.length) {
     152                var new_br = this.contentDocument
     153                    .createElementNS("http://www.w3.org/1999/xhtml", 'html:br');
     154                this.contentDocument.body.appendChild(new_br);
     155            }
     156        }
     157        ]]></setter>
     158    </property>
     159    <field name="_currentList">null</field>
     160    <field name="_currentBaseNode">null</field>
    112161    <method name="_isHR">
    113162        <parameter name="text" />
  • chrome/content/v_identity/vI_prefDialog.js

    rab880d rce8828  
    2828        // var selTab = this.currentIndex
    2929        window.openDialog("chrome://v_identity/content/vI_Help.xul",0,"chrome, dialog=no, alwaysRaised, resizable=yes", "docSmartReply.html")
     30    },
     31
     32    updateHelpUrl : function(tabpanel) {
     33        var panelIndex = (tabpanel)?tabpanel:document.getElementById('prefTabbox').selectedIndex
     34        var prefTree = document.getElementById('prefTabbox').selectedPanel.getElementsByAttribute("class", "vIprefTree")[0];
     35        var currentVersion = document.getElementById("extVersion").getAttribute("value").split(/\./);
     36        var extVersion = currentVersion[0] + "." + currentVersion[1];
     37        var url = "https://www.absorb.it/virtual-id/wiki/docs/" + extVersion + "/tab" + panelIndex + "tree" + prefTree.currentIndex;
     38        dump("url: " + url + "\n");
     39//      document.getElementById("vI_remoteBrowserBox").localCss = "localDoc.css";
     40        document.getElementById("vI_remoteBrowserBox").url = url;
    3041    },
    3142
     
    241252            mAttr("storageUpDown","featureDisabled",element.checked);
    242253            vI_prefDialog.base.constraints();
     254        },
     255
     256        initTreeValues : function() {
     257            var prefTrees = document.getElementById("prefTabbox").getElementsByAttribute("class", "vIprefTree");
     258            for (var i=0 ; i<prefTrees.length; i++) prefTrees[i].currentIndex = 0;
    243259        }
    244260    },
     
    269285        vI_prefDialog.base.storageConstraint(document.getElementById("VIdent_identity.storage"));
    270286        vI_prefDialog.base.constraints();
     287        vI_prefDialog.base.initTreeValues();
    271288        if (vI_storageExtrasHelper.seamonkey_to_old()) {
    272289            document.getElementById("storageExtrasTreeitem1").setAttribute("hidden", "true")
  • chrome/content/v_identity/vI_prefDialog.xul

    rab880d rce8828  
    7676<textbox hidden="true" id="VIdent_identity.stationeryFolderPickerMode"
    7777                prefstring="stationeryFolderPickerMode"/>
    78 
     78<hbox>
    7979<tabbox id="prefTabbox" class="viewSelector ">
    8080    <radiogroup xhtml:role="listbox" id="viewGroup" persist="last-selected"
     
    8383        <hbox>
    8484            <radio pane="source" id="sourceEmail"
    85                 oncommand="document.getElementById('prefTabbox').selectedIndex = 0;"
     85                oncommand="document.getElementById('prefTabbox').selectedIndex = 0; vI_prefDialog.updateHelpUrl();"
    8686                tooltiptext="&vI_prefDialog.tabbox.tab0.label;" />
    8787            <vbox><spacer flex="1"/><image class="arrow" id="toSelection" /><spacer flex="1"/></vbox>
    8888            <radio pane="source" id="selection"
    89                 oncommand="document.getElementById('prefTabbox').selectedIndex = 1;"
     89                oncommand="document.getElementById('prefTabbox').selectedIndex = 1; vI_prefDialog.updateHelpUrl();"
    9090                tooltiptext="&vI_prefDialog.tabbox.tab1.label;" />
    9191            <vbox><spacer flex="1"/><image class="arrow" id="toCompose" /><spacer flex="1"/></vbox>
    9292            <radio pane="source" id="composeDialog"
    93                 oncommand="document.getElementById('prefTabbox').selectedIndex = 2;"
     93                oncommand="document.getElementById('prefTabbox').selectedIndex = 2; vI_prefDialog.updateHelpUrl();"
    9494                tooltiptext="&vI_prefDialog.tabbox.tab2.label;" />
    9595            <vbox><spacer flex="1"/><image class="arrow" id="toSend" /><spacer flex="1"/></vbox>
    9696            <radio pane="source" id="emailOut"
    97                 oncommand="document.getElementById('prefTabbox').selectedIndex = 3;"
     97                oncommand="document.getElementById('prefTabbox').selectedIndex = 3; vI_prefDialog.updateHelpUrl();"
    9898                tooltiptext="&vI_prefDialog.tabbox.tab3.label;" />
    9999        </hbox>
     
    103103            <vbox><spacer flex="1"/><image class="arrow" id="storageUp" /><spacer flex="1"/></vbox>
    104104            <radio pane="source" id="storageOut"
    105                 oncommand="document.getElementById('prefTabbox').selectedIndex = 4;"
     105                oncommand="document.getElementById('prefTabbox').selectedIndex = 4; vI_prefDialog.updateHelpUrl();"
    106106                tooltiptext="&vI_prefDialog.tabbox.tab4.label;" />
    107107            <vbox><spacer flex="1"/><image class="arrow" id="storageUpDown" /><spacer flex="1"/></vbox>
     
    113113            <spacer flex="1"/>
    114114            <hbox><spacer flex="1"/><radio pane="source" id="options"
    115                 oncommand="document.getElementById('prefTabbox').selectedIndex = 5;"
     115                oncommand="document.getElementById('prefTabbox').selectedIndex = 5; vI_prefDialog.updateHelpUrl();"
    116116                tooltiptext="&vI_prefDialog.tabbox.tab5.label;" />
    117117            </hbox>
     
    124124    </radiogroup>
    125125    <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;"/>
     126        <tab label="&vI_prefDialog.tabbox.tab0.label;" oncommand="document.getElementById('viewGroup').selectedIndex = 0; vI_prefDialog.updateHelpUrl(0);"/>
     127        <tab label="&vI_prefDialog.tabbox.tab1.label;" oncommand="document.getElementById('viewGroup').selectedIndex = 1; vI_prefDialog.updateHelpUrl(1);"/>
     128        <tab label="&vI_prefDialog.tabbox.tab2.label;" oncommand="document.getElementById('viewGroup').selectedIndex = 2; vI_prefDialog.updateHelpUrl(2);"/>
     129        <tab label="&vI_prefDialog.tabbox.tab3.label;" oncommand="document.getElementById('viewGroup').selectedIndex = 3; vI_prefDialog.updateHelpUrl(3);"/>
     130        <tab label="&vI_prefDialog.tabbox.tab4.label;" oncommand="document.getElementById('viewGroup').selectedIndex = 4; vI_prefDialog.updateHelpUrl(4);"/>
     131        <tab label="&vI_prefDialog.tabbox.tab5.label;" oncommand="document.getElementById('viewGroup').selectedIndex = 5; vI_prefDialog.updateHelpUrl(5);"/>
    132132    </tabs>
    133133    <tabpanels>
    134134    <tabpanel orient="vertical" >
    135135        <hbox flex="1">
    136         <tree class="vIprefTree" seltype="single" onselect="this.nextSibling.selectedIndex = this.currentIndex"
     136        <tree class="vIprefTree" seltype="single" onselect="this.nextSibling.selectedIndex = this.currentIndex; vI_prefDialog.updateHelpUrl();"
    137137            hidecolumnpicker="true" hidehscroll="true" >
    138138        <treecols orient="vertical"><treecol flex="1" hideheader="true" primary="true"/></treecols>
     
    233233    <tabpanel orient="vertical" >
    234234        <hbox flex="1">
    235         <tree class="vIprefTree" seltype="single" onselect="this.nextSibling.selectedIndex = this.currentIndex"
     235        <tree class="vIprefTree" seltype="single" onselect="this.nextSibling.selectedIndex = this.currentIndex; vI_prefDialog.updateHelpUrl();"
    236236            hidecolumnpicker="true" hidehscroll="true">
    237237        <treecols orient="vertical"><treecol flex="1" hideheader="true" primary="true" /></treecols>
     
    298298    <tabpanel orient="vertical" >
    299299        <hbox flex="1">
    300         <tree class="vIprefTree" seltype="single" onselect="this.nextSibling.selectedIndex = this.currentIndex"
     300        <tree class="vIprefTree" seltype="single" onselect="this.nextSibling.selectedIndex = this.currentIndex; vI_prefDialog.updateHelpUrl();"
    301301            hidecolumnpicker="true" hidehscroll="true">
    302302        <treecols orient="vertical"><treecol flex="1" hideheader="true" primary="true" /></treecols>
     
    352352    <tabpanel orient="vertical" >
    353353        <hbox flex="1">
    354         <tree class="vIprefTree" seltype="single" onselect="this.nextSibling.selectedIndex = this.currentIndex"
     354        <tree class="vIprefTree" seltype="single" onselect="this.nextSibling.selectedIndex = this.currentIndex; vI_prefDialog.updateHelpUrl();"
    355355            hidecolumnpicker="true" hidehscroll="true" >
    356356        <treecols orient="vertical"><treecol flex="1" hideheader="true" primary="true"/></treecols>
     
    519519    <tabpanel orient="vertical" >
    520520        <hbox flex="1">
    521         <tree class="vIprefTree" seltype="single" onselect="this.nextSibling.selectedIndex = this.currentIndex"
     521        <tree class="vIprefTree" seltype="single" onselect="this.nextSibling.selectedIndex = this.currentIndex; vI_prefDialog.updateHelpUrl();"
    522522            hidecolumnpicker="true" hidehscroll="true">
    523523        <treecols orient="vertical">
     
    631631    <tabpanel orient="vertical" >
    632632        <hbox flex="1">
    633         <tree class="vIprefTree" seltype="single" onselect="this.nextSibling.selectedIndex = this.currentIndex"
     633        <tree class="vIprefTree" seltype="single" onselect="this.nextSibling.selectedIndex = this.currentIndex; vI_prefDialog.updateHelpUrl();"
    634634            hidecolumnpicker="true" hidehscroll="true">
    635635        <treecols orient="vertical">
     
    692692    </tabpanels>
    693693</tabbox>
     694<browserbox id="vI_remoteBrowserBox" class="vI_remoteBrowserBox" localCss="localDoc.css" flex="1"/>
     695<label id="extVersion" value="&vident.version;" hidden="true" />
     696</hbox>
    694697</dialog>
    695698</overlay>
  • chrome/skin/classic/v_identity/v_identity.css

    rab880d rce8828  
    314314}
    315315
     316.vI_browserBox {
     317    -moz-binding: url("chrome://v_identity/content/vI_htmlTextBox.xml#vI_browserBox");
     318}
     319
     320.vI_remoteBrowserBox {
     321    -moz-binding: url("chrome://v_identity/content/vI_htmlTextBox.xml#vI_remoteBrowserBox");
     322}
     323
    316324.identity_clone-popup-item {
    317325    -moz-binding: url("chrome://v_identity/content/v_identity.xml#fromPopupItem_clone");
Note: See TracChangeset for help on using the changeset viewer.