mirror of
https://github.com/moparisthebest/FireTray
synced 2024-11-10 19:15:08 -05:00
options: remove static tree for mail_account_types_exclude
This commit is contained in:
parent
aa9e13a366
commit
d8ef0882cc
@ -20,11 +20,8 @@ firetray.UIOptions = {
|
||||
onLoad: function() {
|
||||
if(firetray.Handler.inMailApp) {
|
||||
Cu.import("resource://firetray/FiretrayMessaging.jsm");
|
||||
this.insertMailAccountsExcluded(this.accountBoxId);
|
||||
this.populateMailAccountTypes();
|
||||
|
||||
this.populateTreeServerTypes();
|
||||
|
||||
this.insertMailAccountsExcluded(this.accountBoxId);
|
||||
} else {
|
||||
this.hideElement("mail_tab");
|
||||
}
|
||||
@ -54,33 +51,6 @@ firetray.UIOptions = {
|
||||
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) {
|
||||
// the DOM parent where we do appendChild
|
||||
let targetNode = document.getElementById(parentId);
|
||||
|
@ -21,7 +21,7 @@
|
||||
<tabbox>
|
||||
<tabs>
|
||||
<tab label="&general_options;"/>
|
||||
<tab label="&input_options;"/>
|
||||
<!-- <tab label="&input_options;"/> -->
|
||||
<tab label="&mail_options;" id="mail_tab" />
|
||||
</tabs>
|
||||
<tabpanels>
|
||||
@ -36,12 +36,14 @@
|
||||
|
||||
</tabpanel>
|
||||
|
||||
<tabpanel id="input_tabpanel">
|
||||
</tabpanel>
|
||||
<!-- <tabpanel id="input_tabpanel"> -->
|
||||
<!-- </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"
|
||||
seltype="single" editable="true"
|
||||
preference-editable="true"
|
||||
@ -57,37 +59,19 @@
|
||||
</treecols>
|
||||
<treechildren id="ui_server_types" />
|
||||
</tree>
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user