Skip to content

Commit 61e2248

Browse files
committed
Situatieschema nu officieel toegevoegd aan de tool. Geen ?dev meer nodig in de URL.
1 parent 8803684 commit 61e2248

File tree

5 files changed

+28
-54
lines changed

5 files changed

+28
-54
lines changed

builddate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
var CONF_builddate="20250125-215345"
1+
var CONF_builddate="20250125-215843"

eendraadschema.js

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,7 @@ function json_to_structure(text, version, redraw) {
13611361
structure.reSort();
13621362
// Draw the structure
13631363
if (redraw == true)
1364-
topMenu.selectMenuItemByName(isDevMode() ? 'Eéndraadschema' : 'Bewerken'); // Ga naar het bewerken scherm, dat zal automatisch voor hertekenen zorgen.
1364+
topMenu.selectMenuItemByName('Eéndraadschema'); // Ga naar het bewerken scherm, dat zal automatisch voor hertekenen zorgen.
13651365
}
13661366
/* FUNCTION import_to_structure
13671367

@@ -1655,7 +1655,7 @@ var undoRedo = /** @class */ (function () {
16551655
HLRedrawTree();
16561656
break;
16571657
case 'config':
1658-
topMenu.selectMenuItemByOrdinal((isDevMode() ? 4 : 3));
1658+
topMenu.selectMenuItemByOrdinal(4);
16591659
printsvg();
16601660
break;
16611661
}
@@ -9783,7 +9783,7 @@ function reset_all() {
97839783
structure.dispose();
97849784
structure = new Hierarchical_List();
97859785
buildNewStructure(structure);
9786-
topMenu.selectMenuItemByName(isDevMode() ? 'Eéndraadschema' : 'Bewerken');
9786+
topMenu.selectMenuItemByName('Eéndraadschema');
97879787
undostruct.clear();
97889788
undostruct.store();
97899789
}
@@ -9831,9 +9831,7 @@ function changeAddressParams() {
98319831
}
98329832
function openContactForm() {
98339833
var strleft = PROP_Contact_Text;
9834-
if (isDevMode()) {
9835-
strleft = strleft.replace(/Bewerken/g, "Eéndraadschema");
9836-
}
9834+
strleft = strleft.replace(/Bewerken/g, "Eéndraadschema");
98379835
document.getElementById("configsection").innerHTML = strleft;
98389836
toggleAppView('config');
98399837
}
@@ -9944,27 +9942,15 @@ var undostruct = new undoRedo(100);
99449942
var appDocStorage = new MultiLevelStorage('appDocStorage', {});
99459943
// Build the menu
99469944
var menuItems;
9947-
if (isDevMode()) {
9948-
menuItems = [
9949-
{ name: 'Nieuw', callback: restart_all },
9950-
{ name: 'Bestand', callback: showFilePage },
9951-
{ name: 'Eéndraadschema', callback: HLRedrawTree },
9952-
{ name: 'Situatieschema', callback: showSituationPlanPage },
9953-
{ name: 'Print', callback: printsvg },
9954-
{ name: 'Documentatie', callback: showDocumentationPage },
9955-
{ name: 'Info/Contact', callback: openContactForm }
9956-
];
9957-
}
9958-
else {
9959-
menuItems = [
9960-
{ name: 'Nieuw', callback: restart_all },
9961-
{ name: 'Bestand', callback: showFilePage },
9962-
{ name: 'Bewerken', callback: HLRedrawTree },
9963-
{ name: 'Print', callback: printsvg },
9964-
{ name: 'Documentatie', callback: showDocumentationPage },
9965-
{ name: 'Info/Contact', callback: openContactForm }
9966-
];
9967-
}
9945+
menuItems = [
9946+
{ name: 'Nieuw', callback: restart_all },
9947+
{ name: 'Bestand', callback: showFilePage },
9948+
{ name: 'Eéndraadschema', callback: HLRedrawTree },
9949+
{ name: 'Situatieschema', callback: showSituationPlanPage },
9950+
{ name: 'Print', callback: printsvg },
9951+
{ name: 'Documentatie', callback: showDocumentationPage },
9952+
{ name: 'Info/Contact', callback: openContactForm }
9953+
];
99689954
PROP_edit_menu(menuItems);
99699955
var topMenu = new TopMenu('minitabs', 'menu-item', menuItems);
99709956
// Download a default structure

src/importExport.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ function json_to_structure(text: string, version = 0, redraw = true) {
289289
structure.reSort();
290290

291291
// Draw the structure
292-
if (redraw == true) topMenu.selectMenuItemByName(isDevMode() ? 'Eéndraadschema' : 'Bewerken'); // Ga naar het bewerken scherm, dat zal automatisch voor hertekenen zorgen.
292+
if (redraw == true) topMenu.selectMenuItemByName('Eéndraadschema'); // Ga naar het bewerken scherm, dat zal automatisch voor hertekenen zorgen.
293293

294294
}
295295

src/main.ts

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ function reset_all() {
208208
if (structure != null) structure.dispose();
209209
structure = new Hierarchical_List();
210210
buildNewStructure(structure);
211-
topMenu.selectMenuItemByName(isDevMode() ? 'Eéndraadschema' : 'Bewerken');
211+
topMenu.selectMenuItemByName('Eéndraadschema');
212212
undostruct.clear();
213213
undostruct.store();
214214
}
@@ -264,9 +264,7 @@ function changeAddressParams() {
264264

265265
function openContactForm() {
266266
var strleft: string = PROP_Contact_Text;
267-
if (isDevMode()) {
268-
strleft = strleft.replace(/Bewerken/g, "Eéndraadschema");
269-
}
267+
strleft = strleft.replace(/Bewerken/g, "Eéndraadschema");
270268

271269
document.getElementById("configsection").innerHTML = strleft;
272270
toggleAppView('config');
@@ -416,26 +414,16 @@ var appDocStorage = new MultiLevelStorage<any>('appDocStorage', {});
416414
// Build the menu
417415

418416
let menuItems: MenuItem[]
419-
if (isDevMode()) {
420-
menuItems = [
421-
{ name: 'Nieuw', callback: restart_all },
422-
{ name: 'Bestand', callback: showFilePage },
423-
{ name: 'Eéndraadschema', callback: HLRedrawTree },
424-
{ name: 'Situatieschema', callback: showSituationPlanPage },
425-
{ name: 'Print', callback: printsvg },
426-
{ name: 'Documentatie', callback: showDocumentationPage },
427-
{ name: 'Info/Contact', callback: openContactForm }
428-
];
429-
} else {
430-
menuItems = [
431-
{ name: 'Nieuw', callback: restart_all },
432-
{ name: 'Bestand', callback: showFilePage },
433-
{ name: 'Bewerken', callback: HLRedrawTree },
434-
{ name: 'Print', callback: printsvg },
435-
{ name: 'Documentatie', callback: showDocumentationPage },
436-
{ name: 'Info/Contact', callback: openContactForm }
437-
];
438-
}
417+
418+
menuItems = [
419+
{ name: 'Nieuw', callback: restart_all },
420+
{ name: 'Bestand', callback: showFilePage },
421+
{ name: 'Eéndraadschema', callback: HLRedrawTree },
422+
{ name: 'Situatieschema', callback: showSituationPlanPage },
423+
{ name: 'Print', callback: printsvg },
424+
{ name: 'Documentatie', callback: showDocumentationPage },
425+
{ name: 'Info/Contact', callback: openContactForm }
426+
];
439427

440428
PROP_edit_menu(menuItems);
441429

src/undoRedo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class undoRedo {
122122
switch (structure.properties.currentView) {
123123
case 'draw': topMenu.selectMenuItemByOrdinal(3); showSituationPlanPage(); break;
124124
case '2col': topMenu.selectMenuItemByOrdinal(2); HLRedrawTree(); break;
125-
case 'config': topMenu.selectMenuItemByOrdinal((isDevMode() ? 4 : 3)); printsvg(); break;
125+
case 'config': topMenu.selectMenuItemByOrdinal(4); printsvg(); break;
126126
}
127127
}
128128

0 commit comments

Comments
 (0)