update
This commit is contained in:
0
src/js/lib/pwa-assets.js
Normal file → Executable file
0
src/js/lib/pwa-assets.js
Normal file → Executable file
19
src/js/lib/pwa-code-management.js
Normal file → Executable file
19
src/js/lib/pwa-code-management.js
Normal file → Executable file
@@ -2,30 +2,25 @@ import { DataManager } from './pwa-core.js';
|
||||
import { AbstractSite, FlashMessenger, Helper, InitPromise, Translator } from './pwa-lib.js';
|
||||
|
||||
class Code {
|
||||
constructor(args)
|
||||
{
|
||||
if (typeof args === "string")
|
||||
{
|
||||
constructor(args) {
|
||||
if (typeof args === "string") {
|
||||
args = {
|
||||
"code":args
|
||||
"code": args
|
||||
};
|
||||
}
|
||||
this.args = args;
|
||||
this.isCacheable = false;
|
||||
}
|
||||
|
||||
setIsCacheable(isCacheable)
|
||||
{
|
||||
setIsCacheable(isCacheable) {
|
||||
this.isCacheable = isCacheable;
|
||||
}
|
||||
|
||||
getIsCacheable()
|
||||
{
|
||||
getIsCacheable() {
|
||||
return this.isCacheable;
|
||||
}
|
||||
|
||||
activate()
|
||||
{
|
||||
activate() {
|
||||
return DataManager.send("c/code", this.args);
|
||||
}
|
||||
}
|
||||
@@ -62,7 +57,7 @@ class CodeSite extends AbstractSite {
|
||||
}
|
||||
|
||||
InitPromise.addPromise(function (app) {
|
||||
app.addDeepLink("code", CodeSite.name);
|
||||
app.addDeepLink("code", CodeSite);
|
||||
});
|
||||
|
||||
export { Code, CodeSite };
|
||||
|
||||
0
src/js/lib/pwa-core.js
Normal file → Executable file
0
src/js/lib/pwa-core.js
Normal file → Executable file
0
src/js/lib/pwa-cronjob.js
Normal file → Executable file
0
src/js/lib/pwa-cronjob.js
Normal file → Executable file
0
src/js/lib/pwa-lib.js
Normal file → Executable file
0
src/js/lib/pwa-lib.js
Normal file → Executable file
14
src/js/lib/pwa-user-management.js
Normal file → Executable file
14
src/js/lib/pwa-user-management.js
Normal file → Executable file
@@ -1801,7 +1801,7 @@ class UserSite extends AbstractSite$1{
|
||||
onConstruct(args) {
|
||||
if (!UserManager.hasAccess(this._access))
|
||||
{
|
||||
this.startSite(Achievement.name);
|
||||
this.startSite(Achievement);
|
||||
this.finish({
|
||||
"error":403
|
||||
});
|
||||
@@ -1813,7 +1813,7 @@ class UserSite extends AbstractSite$1{
|
||||
onStart(args) {
|
||||
if (!UserManager.hasAccess(this._access))
|
||||
{
|
||||
this.startSite(Achievement.name);
|
||||
this.startSite(Achievement);
|
||||
this.finish({
|
||||
"error":403
|
||||
});
|
||||
@@ -2082,7 +2082,7 @@ class EditUserRolesSite extends UserSite {
|
||||
InitPromise.addPromise(function (app) {
|
||||
app.addDeepLink("userRoles", EditUserRolesSite.name);
|
||||
app.addDefaultAction(new UserAction('userRoles', function(){
|
||||
app.startSite(EditUserRolesSite.name);
|
||||
app.startSite(EditUserRolesSite);
|
||||
}, null, 1100, "admin"));
|
||||
});
|
||||
|
||||
@@ -2121,7 +2121,7 @@ class LoginSite extends UserSite{
|
||||
});
|
||||
|
||||
this.findBy("#forgot-password-link").addEventListener("click", function(){
|
||||
self.startSite(Achievement.name);
|
||||
self.startSite(Achievement);
|
||||
self.finish();
|
||||
});
|
||||
}
|
||||
@@ -2129,7 +2129,7 @@ class LoginSite extends UserSite{
|
||||
InitPromise.addPromise(function(app){
|
||||
app.addDeepLink("login", LoginSite);
|
||||
app.addDefaultAction(new UserAction('login', function(){
|
||||
app.startSite(LoginSite.name);
|
||||
app.startSite(LoginSite);
|
||||
}, Menu.SHOW_NEVER, 1100, "offline"));
|
||||
app.addDefaultAction(new UserAction('logout', function(){
|
||||
UserManager.logOut();
|
||||
@@ -2157,7 +2157,7 @@ class RegistrationSite extends UserSite {
|
||||
InitPromise.addPromise(function (app) {
|
||||
app.addDeepLink("registration", RegistrationSite);
|
||||
app.addDefaultAction(new UserAction('registration', function(){
|
||||
app.startSite(RegistrationSite.name);
|
||||
app.startSite(RegistrationSite);
|
||||
}, null, 1100, "offline"));
|
||||
});
|
||||
|
||||
@@ -2178,7 +2178,7 @@ class SetNewPasswordSite extends UserSite {
|
||||
let self = this;
|
||||
(new Form(formElem, "c/code", "post")).onSubmit(function(res){
|
||||
FlashMessenger.addMessage(FlashMessenger.MESSAGE_TYPE_SUCCESS, Translator.translate("password-updated"));
|
||||
self.startSite(Achievement.name);
|
||||
self.startSite(Achievement);
|
||||
self.finish();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user