aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKumar Priyansh <[email protected]>2019-06-19 14:59:57 +0530
committerKumar Priyansh <[email protected]>2019-06-19 14:59:57 +0530
commit1e6fcc41a8d962b6d87b01bc2f9b767ea8679d0c (patch)
tree21541f7be479c26e41e42a104a1243af15230eb6 /src
parenta4ee4a4eb7f8211191d8f2bf0215c2d699698c49 (diff)
downloadauthorr-1e6fcc41a8d962b6d87b01bc2f9b767ea8679d0c.tar.xz
authorr-1e6fcc41a8d962b6d87b01bc2f9b767ea8679d0c.zip
Made the bed and smashed some bugs, now a little sleep is needed
Diffstat (limited to 'src')
-rw-r--r--src/index.html8
-rw-r--r--src/scripts/starterWindow.js17
-rw-r--r--src/styles/main.css1
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;