diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/index.html | 8 | ||||
| -rw-r--r-- | src/scripts/starterWindow.js | 17 | ||||
| -rw-r--r-- | src/styles/main.css | 1 |
3 files changed, 22 insertions, 4 deletions
diff --git a/src/index.html b/src/index.html index f30f0a8..f00b4fb 100644 --- a/src/index.html +++ b/src/index.html @@ -22,7 +22,7 @@ <span class="nav-group-item active"> All Templates </span> - <span class="nav-group-item"> + <!-- <span class="nav-group-item"> Blank Templates </span> <span class="nav-group-item"> @@ -39,7 +39,7 @@ </span> <span class="nav-group-item"> Letters and Applications - </span> + </span> --> </nav> </div> <div class="pane parentPane whiteText"> @@ -57,8 +57,8 @@ <button class="btn btn-default"> Open Recent Document </button> - <button class="btn btn-primary pull-right"> - Open + <button id="startSelected" class="btn btn-primary pull-right"> + Start with template </button> </div> </footer> 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 diff --git a/src/styles/main.css b/src/styles/main.css index 7e0d2ce..2584bcb 100644 --- a/src/styles/main.css +++ b/src/styles/main.css @@ -24,6 +24,7 @@ } .template { display: inline-block; + margin-right: 20px; } .templateIcon { background-size: contain; |
