From 1e6fcc41a8d962b6d87b01bc2f9b767ea8679d0c Mon Sep 17 00:00:00 2001 From: Kumar Priyansh Date: Wed, 19 Jun 2019 14:59:57 +0530 Subject: Made the bed and smashed some bugs, now a little sleep is needed --- src/scripts/starterWindow.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/scripts') diff --git a/src/scripts/starterWindow.js b/src/scripts/starterWindow.js index 03afd8b..e815381 100644 --- a/src/scripts/starterWindow.js +++ b/src/scripts/starterWindow.js @@ -17,4 +17,21 @@ $(document).ready(function(){ $('.template .templateName span').removeClass('clickedText'); } }); + $('#startSelected').click(function(){ + if ($('.template .templateIcon').hasClass('clicked')){ + var parentId = ($('.clicked').parent().attr('id')); + start(parentId); + } + else { + showError('No Template Selected!', 'No template was selected. Please Select a template to get started!') + } + }) + function showError(heading, message) { + const { remote } = window.require('electron') + const dialog = remote.dialog + dialog.showErrorBox(heading, message); + } + function start(id) { + alert('This would start the ' + id + ' template'); + } }) \ No newline at end of file -- cgit v1.2.3