1
0
mirror of https://github.com/moparisthebest/FireTray synced 2024-12-23 06:18:48 -05:00

options: remove static tree for mail_account_types_exclude

This commit is contained in:
foudfou 2011-10-29 22:42:21 +02:00
parent aa9e13a366
commit d8ef0882cc
2 changed files with 15 additions and 61 deletions

View File

@ -20,11 +20,8 @@ firetray.UIOptions = {
onLoad: function() { onLoad: function() {
if(firetray.Handler.inMailApp) { if(firetray.Handler.inMailApp) {
Cu.import("resource://firetray/FiretrayMessaging.jsm"); Cu.import("resource://firetray/FiretrayMessaging.jsm");
this.insertMailAccountsExcluded(this.accountBoxId);
this.populateMailAccountTypes();
this.populateTreeServerTypes(); this.populateTreeServerTypes();
this.insertMailAccountsExcluded(this.accountBoxId);
} else { } else {
this.hideElement("mail_tab"); this.hideElement("mail_tab");
} }
@ -54,33 +51,6 @@ firetray.UIOptions = {
targetNode.hidden = true; targetNode.hidden = true;
}, },
populateMailAccountTypes: function() {
let targetTree = document.getElementById("ui_mail_account_types");
let serverTypes = firetray.Utils.getObjPref('server_types');
for (t in serverTypes) {
let accType = serverTypes[t];
let item = document.createElement('treeitem');
let row = document.createElement('treerow');
item.appendChild(row);
let cell = document.createElement('treecell');
cell.setAttribute('label',t);
row.appendChild(cell);
cell = document.createElement('treecell');
cell.setAttribute('value',accType.excluded);
row.appendChild(cell);
cell = document.createElement('treecell');
cell.setAttribute('label',accType.order);
row.appendChild(cell);
targetTree.appendChild(item);
}
},
insertMailAccountsExcluded: function(parentId) { insertMailAccountsExcluded: function(parentId) {
// the DOM parent where we do appendChild // the DOM parent where we do appendChild
let targetNode = document.getElementById(parentId); let targetNode = document.getElementById(parentId);

View File

@ -21,7 +21,7 @@
<tabbox> <tabbox>
<tabs> <tabs>
<tab label="&general_options;"/> <tab label="&general_options;"/>
<tab label="&input_options;"/> <!-- <tab label="&input_options;"/> -->
<tab label="&mail_options;" id="mail_tab" /> <tab label="&mail_options;" id="mail_tab" />
</tabs> </tabs>
<tabpanels> <tabpanels>
@ -36,12 +36,14 @@
</tabpanel> </tabpanel>
<tabpanel id="input_tabpanel"> <!-- <tabpanel id="input_tabpanel"> -->
</tabpanel> <!-- </tabpanel> -->
<tabpanel id="mail_tabpanel"> <tabpanel id="mail_tabpanel">
<vbox align="center" > <vbox>
<!-- <label value="To edit a item doubleclick on it" /> -->
<tree id="ui_tree_server_types" height="200" width="500" flex="1" <tree id="ui_tree_server_types" height="200" width="500" flex="1"
seltype="single" editable="true" seltype="single" editable="true"
preference-editable="true" preference-editable="true"
@ -57,37 +59,19 @@
</treecols> </treecols>
<treechildren id="ui_server_types" /> <treechildren id="ui_server_types" />
</tree> </tree>
<separator class="thin" /> <separator class="thin" />
<label value="To edit a item doubleclick on it" />
<groupbox id="ui_accounts_box"> <!-- firetray.UIOptions.accountBoxId -->
<caption label="&mail_accounts_exclude;"/>
<!-- accounts are dynamically added here with insert_accounts_name()
functions, called at the bottom of this file -->
</groupbox>
</vbox> </vbox>
<separator class="thin" />
<groupbox id="ui_mail_account_types_exclude">
<caption label="&mail_account_types_exclude;" tooltiptext="HI" />
<tree rows="6" flex="1" editable="true" hidecolumnpicker="false">
<treecols>
<treecol id="col_active" label="Account" flex="1" tooltiptext="HI"/>
<treecol id="col_active" label="Excluded" type="checkbox" flex="1"
editable="true" />
<treecol id="col_name" label="Order" editable="true" flex="1"
hidden= "true" />
</treecols>
<treechildren id="ui_mail_account_types" />
</tree>
</groupbox>
<groupbox id="ui_accounts_box"> <!-- firetray.UIOptions.accountBoxId -->
<caption label="&mail_accounts_exclude;"/>
<!-- accounts are dynamically added here with insert_accounts_name()
functions, called at the bottom of this file -->
</groupbox>
</tabpanel> </tabpanel>
</tabpanels> </tabpanels>
</tabbox> </tabbox>