mirror of
https://github.com/Ximi1970/systray-x.git
synced 2025-10-26 00:36:07 +02:00
Basic defaults dialog
This commit is contained in:
@@ -434,6 +434,66 @@
|
||||
"description": "Header for the new message 'from' list"
|
||||
},
|
||||
|
||||
"accounts_defaults": {
|
||||
"message": "Defaults for",
|
||||
"description": "Default for: "
|
||||
},
|
||||
|
||||
"accounts_defaults_subject": {
|
||||
"message": "Subject:",
|
||||
"description": "Subject:"
|
||||
},
|
||||
|
||||
"accounts_defaults_cc": {
|
||||
"message": "Cc:",
|
||||
"description": "Cc:"
|
||||
},
|
||||
|
||||
"accounts_defaults_bcc": {
|
||||
"message": "Bcc:",
|
||||
"description": "Bcc:"
|
||||
},
|
||||
|
||||
"accounts_defaults_replyto": {
|
||||
"message": "Reply to:",
|
||||
"description": "Reply to:"
|
||||
},
|
||||
|
||||
"accounts_defaults_pgp_key": {
|
||||
"message": "Attach public PGP key",
|
||||
"description": "Attach public PGP key"
|
||||
},
|
||||
|
||||
"accounts_defaults_vcard": {
|
||||
"message": "Attach vCard",
|
||||
"description": "Attach vCard"
|
||||
},
|
||||
|
||||
"accounts_defaults_stat_not": {
|
||||
"message": "Delivery status notification",
|
||||
"description": "Delivery status notification"
|
||||
},
|
||||
|
||||
"accounts_defaults_return_receipt": {
|
||||
"message": "Return receipt",
|
||||
"description": "Return receipt"
|
||||
},
|
||||
|
||||
"accounts_defaults_back": {
|
||||
"message": "Back",
|
||||
"description": "Back"
|
||||
},
|
||||
|
||||
"accounts_defaults_clear": {
|
||||
"message": "Clear",
|
||||
"description": "Clear"
|
||||
},
|
||||
|
||||
"accounts_defaults_save": {
|
||||
"message": "Save",
|
||||
"description": "Save"
|
||||
},
|
||||
|
||||
"shortcuts": {
|
||||
"message": "Shortcuts",
|
||||
"description": "Title for Shortcuts options"
|
||||
|
||||
@@ -86,6 +86,8 @@ body {
|
||||
#newindicatorselect,
|
||||
#storageselect,
|
||||
#startappselect,
|
||||
#accountmenudialog1,
|
||||
#accountmenudialog2,
|
||||
#closeappselect {
|
||||
width: 25em;
|
||||
border-style: solid;
|
||||
@@ -94,6 +96,22 @@ body {
|
||||
padding: 10px 10px 10px 10px;
|
||||
}
|
||||
|
||||
#accountmenudialog1 td:nth-child(1) {
|
||||
width: 7em;
|
||||
}
|
||||
|
||||
#accountmenudialog1 td:nth-child(2) {
|
||||
width: 18em;
|
||||
}
|
||||
|
||||
#accountmenudialog1 input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#accountmenudialog1:input {
|
||||
width: 100%
|
||||
}
|
||||
|
||||
#accountsTreeHeader {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
@@ -138,12 +138,27 @@ SysTrayX.Accounts = {
|
||||
|
||||
const typeButton = document.createElement("button");
|
||||
typeButton.setAttribute("id", "accountMenu");
|
||||
typeButton.setAttribute("name", accounts[prop][i].name);
|
||||
typeButton.innerHTML = " ☰";
|
||||
// typeButton.onclick = alert("Hallo");
|
||||
|
||||
const handleClickEvent = (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
// Construct the dialog
|
||||
if (SysTrayX.Info.browserInfo.majorVersion < 102) {
|
||||
const accountMenuvCard = document.getElementById("accountmenuvcard");
|
||||
accountMenuvCard.setAttribute("style", "display: none");
|
||||
|
||||
const accountMenuStatNot = document.getElementById("accountmenustatnot");
|
||||
accountMenuStatNot.setAttribute("style", "display: none");
|
||||
|
||||
const accountMenuRetRec = document.getElementById("accountmenureturnreceipt");
|
||||
accountMenuRetRec.setAttribute("style", "display: none");
|
||||
}
|
||||
|
||||
const divAccountMenuId = document.getElementById("accountMenuId");
|
||||
divAccountMenuId.innerHTML = e.target.name;
|
||||
|
||||
const divAccountsFolders = document.getElementById("accountsFolders");
|
||||
divAccountsFolders.setAttribute("style", "display: none");
|
||||
|
||||
@@ -153,21 +168,25 @@ SysTrayX.Accounts = {
|
||||
// Do something
|
||||
};
|
||||
|
||||
|
||||
typeButton.onclick = handleClickEvent;
|
||||
|
||||
/*
|
||||
const typeDivMenu = document.createElement("div");
|
||||
typeDivMenu.setAttribute("id", "popup");
|
||||
typeDivMenu.innerHTML = "Hallo world!"
|
||||
*/
|
||||
/*
|
||||
<div id="popup">
|
||||
<h2>Info <span title="click to close" class="close">X</span></h2>
|
||||
<div class="content"></div>
|
||||
</div>
|
||||
*/
|
||||
// Setup the buttons of the account menu dialog
|
||||
const handleClickBackEvent = (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
const divAccountsFolders = document.getElementById("accountsFolders");
|
||||
divAccountsFolders.removeAttribute("style");
|
||||
|
||||
const divAccountMenuDialog = document.getElementById("accountMenuDialog");
|
||||
divAccountMenuDialog.setAttribute("style", "display: none");
|
||||
}
|
||||
|
||||
const accountMenuBack = document.getElementById("accountMenuBack");
|
||||
accountMenuBack.onclick = handleClickBackEvent;
|
||||
|
||||
|
||||
// const accountMenuClear = document.getElementById("accountMenuClear");
|
||||
// const accountMenuSave = document.getElementById("accountMenuSave");
|
||||
|
||||
|
||||
typeDiv.appendChild(typeButton);
|
||||
|
||||
@@ -728,7 +728,129 @@
|
||||
</div>
|
||||
|
||||
<div id="accountMenuDialog" style="display: none">
|
||||
Hello world!
|
||||
<table id="accountmenudialog1">
|
||||
<caption>
|
||||
<div style="display: flex; flex-direction: row">
|
||||
<h4>__MSG_accounts_defaults__</h4>
|
||||
<h4> : </h4>
|
||||
<h4 id="accountMenuId">x@y</h4>
|
||||
</div>
|
||||
</caption>
|
||||
<tr id="accountmenusubject">
|
||||
<td>
|
||||
<label>__MSG_accounts_defaults_subject__</label>
|
||||
</td>
|
||||
<td>
|
||||
<input
|
||||
type="text"
|
||||
name="accountmenusubject"
|
||||
id="accountMenuSubjectInput"
|
||||
value=""
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="accountmenucc">
|
||||
<td>
|
||||
<label for="accountMenuCcInput" id="accountMenuCcInputLabel">
|
||||
__MSG_accounts_defaults_cc__
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
<input
|
||||
type="text"
|
||||
name="accountmenucc"
|
||||
id="accountMenuCcInput"
|
||||
value=""
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="accountmenubcc">
|
||||
<td>
|
||||
<label for="accountMenuBccInput" id="accountMenuBccInputLabel">
|
||||
__MSG_accounts_defaults_bcc__
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
<input
|
||||
type="text"
|
||||
name="accountmenubcc"
|
||||
id="accountMenuBccInput"
|
||||
value=""
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="accountmenureplyto">
|
||||
<td>
|
||||
<label for="accountMenuReplyToInput" id="accountMenuReplyToInputLabel">
|
||||
__MSG_accounts_defaults_replyto__
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
<input
|
||||
type="text"
|
||||
name="accountmenureplyto"
|
||||
id="accountMenuReplyToInput"
|
||||
value=""
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="accountmenudialog2">
|
||||
<tr id="accountmenupgpkey">
|
||||
<td>
|
||||
<input
|
||||
type="checkbox"
|
||||
name="accountmenupgpkey"
|
||||
id="accountMenuPgpKey"
|
||||
value=""
|
||||
/>
|
||||
<label for="accountMenuPgpKey" id="accountMenuPgpKeyLabel">
|
||||
__MSG_accounts_defaults_pgp_key__
|
||||
</label>
|
||||
</td>
|
||||
<tr id="accountmenuvcard">
|
||||
<td>
|
||||
<input
|
||||
type="checkbox"
|
||||
name="accountmenuvcard"
|
||||
id="accountMenuVCard"
|
||||
value=""
|
||||
/>
|
||||
<label for="accountMenuVCard" id="accountMenuVCardLabel">
|
||||
__MSG_accounts_defaults_vcard__
|
||||
</label>
|
||||
</td>
|
||||
<tr id="accountmenustatnot">
|
||||
<td>
|
||||
<input
|
||||
type="checkbox"
|
||||
name="accountmenustatnot"
|
||||
id="accountMenuStatNot"
|
||||
value=""
|
||||
/>
|
||||
<label for="accountMenuStatNot" id="accountMenuStatNotLabel">
|
||||
__MSG_accounts_defaults_stat_not__
|
||||
</label>
|
||||
</td>
|
||||
<tr id="accountmenureturnreceipt">
|
||||
<td>
|
||||
<input
|
||||
type="checkbox"
|
||||
name="accountmenureturnreceipt"
|
||||
id="accountMenuReturnReceipt"
|
||||
value=""
|
||||
/>
|
||||
<label for="accountMenuReturnReceipt" id="accountMenuReturnReceiptLabel">
|
||||
__MSG_accounts_defaults_return_receipt__
|
||||
</label>
|
||||
</td>
|
||||
</table>
|
||||
|
||||
<div>
|
||||
<button id="accountMenuBack">__MSG_accounts_defaults_back__</button>
|
||||
<button id="accountMenuClear">__MSG_accounts_defaults_clear__</button>
|
||||
<button id="accountMenuSave">__MSG_accounts_defaults_save__</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
Reference in New Issue
Block a user