Skip to content

Commit

Permalink
Updated copyright and added check for updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rmraya committed Jan 14, 2022
1 parent 25babef commit c248433
Show file tree
Hide file tree
Showing 53 changed files with 189 additions and 73 deletions.
Binary file modified WebContent/WEB-INF/lib/openxliff.jar
Binary file not shown.
Binary file modified WebContent/WEB-INF/lib/swordfish.jar
Binary file not shown.
Binary file modified WebContent/docs/remotetm.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<body class="bg" style="height: 100vh; width: 100%; " id="body">
<div id="mainContent" class="mainContent"></div>
<div id="status" class="status" style="display:none;"></div>
<footer id="footer">RemoteTM <span id="version">5.0.0</span> © 2008 - 2021 <a href="https://maxprograms.com"
<footer id="footer">RemoteTM <span id="version">5.0.0</span> © 2008 - 2022 <a href="https://maxprograms.com"
target="_blank" rel="noopener">Maxprograms</a>
</footer>
<script src="ts/remotetm.ts"></script>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"devDependencies": {
"cssnano": "^4.1.10",
"parcel-bundler": "^1.12.4",
"typescript": "^4.5.2"
"typescript": "^4.5.4"
},
"scripts": {
"build": "tsc",
Expand Down
6 changes: 3 additions & 3 deletions src/com/maxprograms/remotetm/Constants.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand All @@ -18,8 +18,8 @@ private Constants() {
// private for security
}

public static final String VERSION = "5.0.0";
public static final String BUILD = "20211201_1423";
public static final String VERSION = "5.1.0";
public static final String BUILD = "20220114_0820";

public static final String STATUS = "status";
public static final String OK = "OK";
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/remotetm/DbManager.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/remotetm/RemoteTM.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/remotetm/TmManager.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/remotetm/models/EmailServer.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/remotetm/models/Permission.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/remotetm/models/Ticket.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/remotetm/models/User.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/remotetm/rest/AuthorizeServlet.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/remotetm/rest/DownloadServlet.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/remotetm/rest/EmailServerServlet.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/remotetm/rest/LogoutServlet.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/remotetm/rest/MemoriesServlet.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/remotetm/rest/PermissionsServlet.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/remotetm/rest/UploadServlet.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/remotetm/rest/UsersServlet.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
19 changes: 18 additions & 1 deletion src/com/maxprograms/remotetm/rest/VersionServlet.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand All @@ -12,9 +12,13 @@

package com.maxprograms.remotetm.rest;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.System.Logger;
import java.lang.System.Logger.Level;
import java.net.URL;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
Expand All @@ -40,6 +44,19 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) {
result.put(Constants.STATUS, Constants.OK);
result.put("version", Constants.VERSION);
result.put("build", Constants.BUILD);
URL home = new URL("https://maxprograms.com/remotetm.json");
try (InputStream stream = home.openStream()) {
try (InputStreamReader reader = new InputStreamReader(stream)) {
StringBuilder builder = new StringBuilder();
String line = "";
try (BufferedReader buffered = new BufferedReader(reader)) {
while ((line = buffered.readLine()) != null) {
builder.append(line);
}
}
result.put("updates", new JSONObject(builder.toString()));
}
}
Utils.writeResponse(result, response, 200);
} catch (IOException e) {
Logger logger = System.getLogger(VersionServlet.class.getName());
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/remotetm/utils/Crypto.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/remotetm/utils/SecurityFilter.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
4 changes: 2 additions & 2 deletions src/com/maxprograms/remotetm/utils/SendMail.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down Expand Up @@ -34,7 +34,7 @@ public class SendMail {
private EmailServer server;

private static final String HEADER = "<table width='100%' style='border-collapse:collapse; margin-bottom:30px;'><tr><td style='background:#0073B5;color:white; text-align:left; font-family: sans-serif; font-size:2em; letter-spacing: 2px; font-weight: lighter; padding-left:20px; padding-top:10px; padding-bottom:10px; text-shadow: 2px 2px 7px #444444;'>RemoteTM</td></tr></table>";
private static final String FOOTER = "<table width='100%' style='border-collapse:collapse; margin-top:40px;'><tr><td style='background:#0073B5;color:#dddddd; text-align:center; font-family:sans-serif; font-size:0.8em; padding:20px;'>Copyright &copy; 2008 - 2021 <a style='color:#eeeeee; text-decoration:none' href='https://www.maxprograms.com/'>Maxprograms</a>. All rights reserved.</td></tr></table>";
private static final String FOOTER = "<table width='100%' style='border-collapse:collapse; margin-top:40px;'><tr><td style='background:#0073B5;color:#dddddd; text-align:center; font-family:sans-serif; font-size:0.8em; padding:20px;'>Copyright &copy; 2008 - 2022 <a style='color:#eeeeee; text-decoration:none' href='https://www.maxprograms.com/'>Maxprograms</a>. All rights reserved.</td></tr></table>";

public SendMail(EmailServer server) {
this.server = server;
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/remotetm/utils/Utils.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
4 changes: 2 additions & 2 deletions ts/about.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down Expand Up @@ -34,7 +34,7 @@ export class AboutDialog {
container.appendChild(logo);

let p: HTMLParagraphElement = document.createElement('p');
p.innerHTML = 'Copyright &copy; 2008-2021 Maxprograms';
p.innerHTML = 'Copyright &copy; 2008-2022 Maxprograms';
container.appendChild(p);

let licensesButton: HTMLButtonElement = document.createElement('button');
Expand Down
2 changes: 1 addition & 1 deletion ts/accessDialog.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion ts/addMemory.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
15 changes: 8 additions & 7 deletions ts/adduser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand All @@ -14,6 +14,7 @@ import { Dialog } from "./dialog";
import { Input } from "./input";
import { Message } from "./message";
import { RemoteTM } from "./remotetm";
import { Role } from "./roles";
import { Select } from "./select";
import { UsersManager } from "./usersManager";

Expand Down Expand Up @@ -103,18 +104,18 @@ export class AddUser {
let roles: HTMLOptionElement[] = [];

let sa: HTMLOptionElement = document.createElement('option');
sa.value = 'SA';
sa.innerText = 'System Administrator';
sa.value = Role.SYSTEM_ADMINISTRATOR;
sa.innerText = Role.getDescription(Role.SYSTEM_ADMINISTRATOR);
roles.push(sa);

let pm: HTMLOptionElement = document.createElement('option');
pm.value = 'PM';
pm.innerText = 'Project Manager';
pm.value = Role.PROJECT_MANAGER;
pm.innerText = Role.getDescription(Role.PROJECT_MANAGER);
roles.push(pm);

let tr: HTMLOptionElement = document.createElement('option');
tr.value = 'TR';
tr.innerText = 'Translator';
tr.value = Role.TRANSLATOR;
tr.innerText = Role.getDescription(Role.TRANSLATOR);
roles.push(tr);

return roles;
Expand Down
2 changes: 1 addition & 1 deletion ts/changePassword.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion ts/checkBox.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
26 changes: 20 additions & 6 deletions ts/dashboard.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand All @@ -20,6 +20,8 @@ import { ImportTMX } from './importTMX';
import { LicensesDialog } from './licenses';
import { Message } from './message';
import { RemoteTM } from './remotetm';
import { Role } from './roles';
import { UpdatesDialog } from './updatesDialog';
import { UsersManager } from './usersManager';
import { View } from './view';

Expand Down Expand Up @@ -202,7 +204,7 @@ export class Dashboard implements View {
changePassword.addEventListener('click', () => { this.changePassword(); });
settingsMenu.addOption(changePassword);

if (this.role === 'SA') {
if (this.role === Role.SYSTEM_ADMINISTRATOR) {
settingsMenu.addOption(document.createElement('hr'));

let manageUsers: HTMLAnchorElement = document.createElement('a');
Expand Down Expand Up @@ -235,6 +237,13 @@ export class Dashboard implements View {
licenses.addEventListener('click', () => { this.viewLicenses(); });
helpMenu.addOption(licenses);

if (this.role === Role.SYSTEM_ADMINISTRATOR) {
let checkUpdates: HTMLAnchorElement = document.createElement('a');
checkUpdates.innerText = 'Check for Updates...';
checkUpdates.addEventListener('click', () => { this.checkUpdates(); });
helpMenu.addOption(checkUpdates);
}

helpMenu.addOption(document.createElement('hr'));

let about: HTMLAnchorElement = document.createElement('a');
Expand All @@ -243,7 +252,12 @@ export class Dashboard implements View {
helpMenu.addOption(about);
}

setEmailServer() {
checkUpdates(): void {
let dialog: UpdatesDialog = new UpdatesDialog();
dialog.open();
}

setEmailServer(): void {
let dialog: EmailServerDialog = new EmailServerDialog();
dialog.open();
}
Expand Down Expand Up @@ -363,7 +377,7 @@ export class Dashboard implements View {
new Message('Select memory');
return;
}
if (this.role === 'TR') {
if (this.role === Role.TRANSLATOR) {
new Message('Access denied');
return;
}
Expand Down Expand Up @@ -394,7 +408,7 @@ export class Dashboard implements View {
new Message('Select memory');
return;
}
if (this.role === 'TR') {
if (this.role === Role.TRANSLATOR) {
new Message('Access denied');
return;
}
Expand Down Expand Up @@ -461,7 +475,7 @@ export class Dashboard implements View {
}

closeMemories(): void {
if (this.role !== 'SA') {
if (this.role !== Role.SYSTEM_ADMINISTRATOR) {
new Message('Access denied');
return;
}
Expand Down
2 changes: 1 addition & 1 deletion ts/dialog.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2021 Maxprograms.
* Copyright (c) 2008-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
Loading

0 comments on commit c248433

Please sign in to comment.