Skip to content

Commit

Permalink
- Een aparte TAB werd toegevoegd in de applicatie voor documentatie.
Browse files Browse the repository at this point in the history
- Na de aanpassing van het menu, inbouwen van functionaliteit om in de online versie het menu te kunnen aanpassen.
- Enkele aanpassingen in de CSS om de mouse-pointer beter af te stemmen op de web-items.
  • Loading branch information
igoethal committed Nov 23, 2024
1 parent afa4411 commit 7718c31
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 5 deletions.
2 changes: 1 addition & 1 deletion builddate.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
var CONF_builddate="20241117-113745"
var CONF_builddate="20241123-120000"
17 changes: 15 additions & 2 deletions css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ html {height:100%; background-color: #FFFFFF;}
body {
margin: 0;
padding: 0;
cursor: default;
}

button, select, select option, input[type="checkbox"] {
cursor: pointer;
}

td[contenteditable="true"] {
cursor: text; /* Set the cursor to text edit pointer */
}

/* CONTAINER */
Expand All @@ -38,6 +47,9 @@ body {
align-items: center;
padding: 0px 7px 0px 7px;
border-bottom: 1px solid #b8b8b8;
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE 10 and IE 11 */
}
ul#minitabs {
display: flex;
Expand Down Expand Up @@ -70,7 +82,8 @@ ul#minitabs a#current {
}
ul#minitabs a:hover {
border-color: #F60;
color: #333
color: #333;
cursor: pointer
}

/* RIBBON */
Expand Down Expand Up @@ -217,7 +230,7 @@ table.html_edit_table td:nth-child(2) {
cursor: pointer;
}

p {font-size:16px; line-height:24px;}
p {font-size:16px; line-height:16px}

div.kring {
background-color: #FFCC99;
Expand Down
15 changes: 14 additions & 1 deletion eendraadschema.js
Original file line number Diff line number Diff line change
Expand Up @@ -1517,6 +1517,17 @@ var TopMenu = /** @class */ (function () {
};
return TopMenu;
}());
/* FUNCTION showFilePage
Shows the Documentation-Page.
*/
function showDocumentationPage() {
var strleft = "\n <table border=\"1px\" style=\"border-collapse:collapse\" align=\"center\" width=\"100%\">\n <tr>\n <td width=\"100%\" align=\"center\" bgcolor=\"LightGrey\">\n <b>Handleiding</b>\n </td>\n </tr>\n <tr>\n <td width=\"100%\" align=\"left\">\n <table border=0>\n <tr>\n <td width=100 style=\"vertical-align:top;padding:5px\">\n <button style=\"font-size:14px\" id=\"Btn_downloadManual\">Download</button>\n </td>\n <td style=\"vertical-align:top;padding:7px\">\n Een volledige handleiding is beschikbaar in PDF formaat.\n Click link op \"Download\" om deze in een ander venster te openen.\n <br>\n Het programma is in volle ontwikkeling dus delen van de handleiding zijn\n mogelijk ietwat verouderd. \n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>";
document.getElementById("configsection").innerHTML = strleft;
hide2col();
document.getElementById('Btn_downloadManual').onclick = function () { window.open('Documentation/edsdoc.pdf', '_blank'); };
}
var List_Item = /** @class */ (function () {
// -- Constructor --
function List_Item(mylist) {
Expand Down Expand Up @@ -6468,6 +6479,7 @@ function PROP_GDPR() {
function PROP_getCookieText() {
return ("");
}
function PROP_edit_menu(menuItems) { }
//--- START OF DEVELOPMENT OPTIONS ---
function PROP_development_options() {
var outstr = '<br><h2>Expert ontwikkel opties, Gebruik enkel indien u weet wat u doet.</h2>'
Expand Down Expand Up @@ -6835,9 +6847,10 @@ var menuItems = [
{ name: 'Bestand', callback: showFilePage },
{ name: 'Bewerken', callback: HLRedrawTree },
{ name: 'Print', callback: printsvg },
{ name: 'Documentatie', callback: function () { window.open('Documentation/edsdoc.pdf', '_blank'); } },
{ name: 'Documentatie', callback: showDocumentationPage },
{ name: 'Info/Contact', callback: openContactForm }
];
PROP_edit_menu(menuItems);
var topMenu = new TopMenu('minitabs', 'menu-item', menuItems);
// Download a default structure
import_to_structure(EXAMPLE_DEFAULT, false); //Just in case the user doesn't select a scheme and goes to drawing immediately, there should be something there
Expand Down
2 changes: 2 additions & 0 deletions prop/prop_scripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ function PROP_getCookieText() {
return("");
}

function PROP_edit_menu(menuItems) {}

//--- START OF DEVELOPMENT OPTIONS ---

function PROP_development_options() {
Expand Down
40 changes: 40 additions & 0 deletions src/documentation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/* FUNCTION showFilePage
Shows the Documentation-Page.
*/

function showDocumentationPage() {

let strleft = `
<table border="1px" style="border-collapse:collapse" align="center" width="100%">
<tr>
<td width="100%" align="center" bgcolor="LightGrey">
<b>Handleiding</b>
</td>
</tr>
<tr>
<td width="100%" align="left">
<table border=0>
<tr>
<td width=100 style="vertical-align:top;padding:5px">
<button style="font-size:14px" id="Btn_downloadManual">Download</button>
</td>
<td style="vertical-align:top;padding:7px">
Een volledige handleiding is beschikbaar in PDF formaat.
Click link op "Download" om deze in een ander venster te openen.
<br>
Het programma is in volle ontwikkeling dus delen van de handleiding zijn
mogelijk ietwat verouderd.
</td>
</tr>
</table>
</td>
</tr>
</table>`;

document.getElementById("configsection").innerHTML = strleft;
hide2col();

(document.getElementById('Btn_downloadManual') as HTMLElement).onclick = () => { window.open('Documentation/edsdoc.pdf', '_blank') };
}
1 change: 1 addition & 0 deletions src/general.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
declare var pako: any;
declare function printPDF(svgs, print_table, properties, pages, filename, statuscallback): any;
declare function openDonatePage(): any;

function deepClone (obj) {
var _out = new obj.constructor;
Expand Down
4 changes: 3 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,12 @@ const menuItems: MenuItem[] = [
{ name: 'Bestand', callback: showFilePage },
{ name: 'Bewerken', callback: HLRedrawTree },
{ name: 'Print', callback: printsvg },
{ name: 'Documentatie', callback: () => {window.open('Documentation/edsdoc.pdf', '_blank');} },
{ name: 'Documentatie', callback: showDocumentationPage },
{ name: 'Info/Contact', callback: openContactForm }
];

PROP_edit_menu(menuItems);

const topMenu = new TopMenu('minitabs', 'menu-item', menuItems);

// Download a default structure
Expand Down
1 change: 1 addition & 0 deletions src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"importExport.ts",
"undoRedo.ts",
"TopMenu.ts",
"documentation.ts",
"List_Item/List_Item.ts",
"List_Item/Electro_Item.ts",
"List_Item/Schakelaars/Schakelaar.ts",
Expand Down

0 comments on commit 7718c31

Please sign in to comment.