From 7718c31b20979ad49ee21d3e4b2d82075df77923 Mon Sep 17 00:00:00 2001 From: Ivan Goethals Date: Sat, 23 Nov 2024 12:00:42 +0100 Subject: [PATCH] - Een aparte TAB werd toegevoegd in de applicatie voor documentatie. - 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. --- builddate.js | 2 +- css/styles.css | 17 +++++++++++++++-- eendraadschema.js | 15 ++++++++++++++- prop/prop_scripts.ts | 2 ++ src/documentation.ts | 40 ++++++++++++++++++++++++++++++++++++++++ src/general.ts | 1 + src/main.ts | 4 +++- src/tsconfig.json | 1 + 8 files changed, 77 insertions(+), 5 deletions(-) create mode 100644 src/documentation.ts diff --git a/builddate.js b/builddate.js index 2f45514..37efe38 100644 --- a/builddate.js +++ b/builddate.js @@ -1 +1 @@ -var CONF_builddate="20241117-113745" +var CONF_builddate="20241123-120000" diff --git a/css/styles.css b/css/styles.css index 2ac86ff..eabf863 100644 --- a/css/styles.css +++ b/css/styles.css @@ -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 */ @@ -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; @@ -70,7 +82,8 @@ ul#minitabs a#current { } ul#minitabs a:hover { border-color: #F60; - color: #333 + color: #333; + cursor: pointer } /* RIBBON */ @@ -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; diff --git a/eendraadschema.js b/eendraadschema.js index 73f514e..92e7c16 100644 --- a/eendraadschema.js +++ b/eendraadschema.js @@ -1517,6 +1517,17 @@ var TopMenu = /** @class */ (function () { }; return TopMenu; }()); +/* FUNCTION showFilePage + + Shows the Documentation-Page. + +*/ +function showDocumentationPage() { + var strleft = "\n \n \n \n \n \n \n \n
\n Handleiding\n
\n \n \n \n \n \n
\n \n \n Een volledige handleiding is beschikbaar in PDF formaat.\n Click link op \"Download\" om deze in een ander venster te openen.\n
\n Het programma is in volle ontwikkeling dus delen van de handleiding zijn\n mogelijk ietwat verouderd. \n
\n
"; + 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) { @@ -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 = '

Expert ontwikkel opties, Gebruik enkel indien u weet wat u doet.

' @@ -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 diff --git a/prop/prop_scripts.ts b/prop/prop_scripts.ts index 5ea7991..c2928ca 100644 --- a/prop/prop_scripts.ts +++ b/prop/prop_scripts.ts @@ -22,6 +22,8 @@ function PROP_getCookieText() { return(""); } +function PROP_edit_menu(menuItems) {} + //--- START OF DEVELOPMENT OPTIONS --- function PROP_development_options() { diff --git a/src/documentation.ts b/src/documentation.ts new file mode 100644 index 0000000..34e38c0 --- /dev/null +++ b/src/documentation.ts @@ -0,0 +1,40 @@ +/* FUNCTION showFilePage + + Shows the Documentation-Page. + +*/ + +function showDocumentationPage() { + + let strleft = ` + + + + + + + +
+ Handleiding +
+ + + + + +
+ + + Een volledige handleiding is beschikbaar in PDF formaat. + Click link op "Download" om deze in een ander venster te openen. +
+ Het programma is in volle ontwikkeling dus delen van de handleiding zijn + mogelijk ietwat verouderd. +
+
`; + + document.getElementById("configsection").innerHTML = strleft; + hide2col(); + + (document.getElementById('Btn_downloadManual') as HTMLElement).onclick = () => { window.open('Documentation/edsdoc.pdf', '_blank') }; +} \ No newline at end of file diff --git a/src/general.ts b/src/general.ts index 9e17a4e..e09e15c 100644 --- a/src/general.ts +++ b/src/general.ts @@ -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; diff --git a/src/main.ts b/src/main.ts index 484353a..2363052 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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 diff --git a/src/tsconfig.json b/src/tsconfig.json index 7e3d8a3..cc981a5 100644 --- a/src/tsconfig.json +++ b/src/tsconfig.json @@ -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",