Skip to content

Commit 30929ae

Browse files
committed
update notifications for newer electron
1 parent ba368c2 commit 30929ae

File tree

4 files changed

+49
-43
lines changed

4 files changed

+49
-43
lines changed

gui/index.html

Lines changed: 40 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
<head>
55
<meta charset="utf-8">
66
<title>MoveIt</title>
7-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
8-
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
7+
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
8+
<script>window.jQuery = window.$ = require('jquery');</script>
9+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
10+
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
11+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
912
<script type="text/javascript">
1013
let shell = require('electron').remote.shell
1114
document.addEventListener('click', function (event) {
@@ -19,89 +22,90 @@
1922

2023
<body>
2124
<div id="container" class="container-fluid">
22-
25+
<h2>MoveIt</h2>
26+
<br/>
2327
<div class="row">
2428
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
25-
<h3>Contact Name</h3>
26-
<input name="contactname" id="contactname" type="text" size="60"/>
29+
<h4>Contact Name</h4>
30+
<input name="contactname" id="contactname" type="text" size="56"/>
2731
</div>
2832
</div>
29-
33+
<br/>
3034
<div class="row">
3135
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
32-
<h3>Position / Title</h3>
33-
<input name="jobtitle" id="jobtitle" type="text" size="60"/>
36+
<h4>Position / Title</h4>
37+
<input name="jobtitle" id="jobtitle" type="text" size="56"/>
3438
</div>
3539
</div>
36-
40+
<br/>
3741
<div class="row">
3842
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
39-
<h3>Department / Organization</h3>
40-
<input name="department" id="department" type="text" size="60"/>
43+
<h4>Department / Organization</h4>
44+
<input name="department" id="department" type="text" size="56"/>
4145
</div>
4246
</div>
43-
47+
<br/>
4448
<div class="row">
4549
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
46-
<h3>Email Address</h3>
47-
<input name="email" id="email" type="text" size="60"/>
50+
<h4>Email Address</h4>
51+
<input name="email" id="email" type="text" size="56"/>
4852
</div>
4953
</div>
50-
54+
<br/>
5155
<div class="row">
5256
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
53-
<h3>Telephone</h3>
54-
<input name="phone" id="phone" type="text" size="60"/>
57+
<h4>Telephone</h4>
58+
<input name="phone" id="phone" type="text" size="56"/>
5559
</div>
5660
</div>
5761

5862
<br/><hr/>
5963

6064
<div class="row">
6165
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
62-
<h3>Record Creator</h3>
63-
<input name="creator" id="creator" type="text" size="60"/>
64-
<img class="exp_icon0" src="icon_explanation.png" width="25" height="25" data-tooltip="The name of the department or unit responsible for creating and maintaing the records." >
66+
<h4>Record Creator</h4>
67+
<input name="creator" id="creator" type="text" size="56"/>
68+
<img class="exp_icon0" src="icon_explanation.png" data-toggle="tooltip" data-placement="right" width="25" height="25" title="The name of the department or unit responsible for creating and maintaing the records." >
6569
</div>
6670
</div>
67-
71+
<br/>
6872
<div class="row">
6973
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
70-
<h3>RRSDA Number</h3>
74+
<h4>RRSDA Number</h4>
7175
Internal SFU Users Only. See <a href="http://www.sfu.ca/archives2/dur/rrsdas.html">Overview</a>.
72-
<input name="rrsda" id="rrsda" type="text" size="60"/>
73-
<img class="exp_icon0" src="icon_explanation.png" width="25" height="25" data-tooltip="The Records Retention Schedule and Disposal Authority (RRSDA) number that applies to the records." >
76+
<input name="rrsda" id="rrsda" type="text" size="56"/>
77+
<img class="exp_icon0" src="icon_explanation.png" data-toggle="tooltip" data-placement="right" width="25" height="25" title="The Records Retention Schedule and Disposal Authority (RRSDA) number that applies to the records." >
7478
</div>
7579
</div>
76-
80+
<br/>
7781
<div class="row">
7882
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
79-
<h3>Transfer Title</h3>
80-
<input name="title" id="title" type="text" size="60"/>
81-
<img class="exp_icon0" src="icon_explanation.png" width="25" height="25" data-tooltip="The name of the records series if known, or a brief descriptor." >
83+
<h4>Transfer Title</h4>
84+
<input name="title" id="title" type="text" size="56"/>
85+
<img class="exp_icon0" src="icon_explanation.png" data-toggle="tooltip" data-placement="right" width="25" height="25" title="The name of the records series if known, or a brief descriptor." >
8286
</div>
8387
</div>
84-
88+
<br/>
8589
<div class="row">
8690
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
87-
<h3>Date Range</h3>
91+
<h4>Date Range</h4>
8892
From: <select name="datefrom" id="datefrom"></select> To <select name="dateto" id="dateto"></select>
8993
</div>
9094
</div>
91-
95+
<br/>
9296
<div class="row">
9397
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
94-
<h3>Records Description</h3>
95-
<textarea name="description" id="description" rows="4" wrap="soft" cols="60"></textarea>
98+
<h4>Records Description</h4>
99+
<textarea name="description" id="description" rows="4" wrap="soft" cols="56"></textarea>
96100
</div>
97101
</div>
98-
102+
<br/>
99103
<div class="row">
100104
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
101-
<h3>Other Metadata Available?</h3>
105+
<h4>Other Metadata Available?</h4>
102106
e.g. file lists, indices, documentation.<br/>
103107
If so, please provide a brief description.
104-
<textarea name="metadata" id="metadata" rows="4" wrap="soft" cols="60"></textarea>
108+
<textarea name="metadata" id="metadata" rows="4" wrap="soft" cols="56"></textarea>
105109
</div>
106110
</div>
107111

gui/main.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ const createWindow = () => {
3939
width: 550,
4040
height: 700,
4141
backgroundColor: "#D6D8DC",
42+
webPreferences: {
43+
nodeIntegration: true
44+
}
4245
});
4346

4447
if (app.dock) { app.dock.show() };
@@ -94,6 +97,7 @@ let port = portfinder.getPort(function (err, port) {
9497
const exitMoveIt = () => {
9598
pythonChild.kill()
9699
pythonChild = null
100+
global.client.close();
97101
}
98102

99103
app.on("before-quit", ev => {

gui/makePackage.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
const notifier = require("node-notifier");
2-
const tt = require('electron-tooltip');
32
const path = require('path');
43
const fs = require('fs');
54
const {dialog} = require('electron').remote;
65
const {app} = require('electron').remote;
76
const remote = require('electron').remote;
87
let client = remote.getGlobal('client');
98
let packageFolder = null;
10-
tt({position: 'right'})
119

1210
var configpath = path.join(app.getPath("userData"), "moveituser.json");
1311
if (fs.existsSync(configpath)) {
@@ -33,7 +31,7 @@ function package() {
3331
if (contactname === "" || email === "" || title === ""){
3432
notifier.notify({"title" : "MoveIt", "message" : "Contact name, email, and transfer title are required fields."});
3533
} else {
36-
packageFolder = dialog.showOpenDialog({properties: ["openDirectory"]});
34+
packageFolder = dialog.showOpenDialogSync({properties: ["openDirectory"]});
3735
if (packageFolder){
3836
notifier.notify({"title" : "MoveIt", "message" : "Creating transfer package..."});
3937
client.invoke("bag_package", contactname, jobtitle, department, email, phone, creator, rrsda, title, datefrom, dateto, description, metadata, JSON.stringify(packageFolder[0]), function(error, res, more) {

gui/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sfu-moveit",
3-
"version": "2.0.4",
3+
"version": "2.0.5",
44
"homepage": "https://github.com/axfelix/moveit",
55
"main": "main.js",
66
"description": "An app for producing packages for deposit to the Archives",
@@ -14,13 +14,13 @@
1414
"test": "electron . --run-tests"
1515
},
1616
"dependencies": {
17-
"electron": "2.0.18",
17+
"electron": "~9.1.0",
1818
"electron-squirrel-startup": "^1.0.0",
19-
"electron-tooltip": "^1.1.5",
19+
"jquery": "~3.5.1",
2020
"node-notifier": "^5.4.0",
2121
"portfinder": "^1.0.20",
2222
"update-electron-app": "^1.3.0",
23-
"zerorpc": "^0.9.8"
23+
"zerorpc": "hokiedsp/zerorpc-node#dev_zmq6"
2424
},
2525
"files": [
2626
"moveit/*"

0 commit comments

Comments
 (0)