Upgrading JS framework version
This commit is contained in:
parent
f56991d6d2
commit
81661159db
|
@ -29,14 +29,10 @@ $env = $this->getParam('env', '');
|
||||||
<meta property="og:title" content="<?php echo $this->getParam('title', ''); ?>" />
|
<meta property="og:title" content="<?php echo $this->getParam('title', ''); ?>" />
|
||||||
<meta property="og:description" content="<?php echo $this->getParam('description', ''); ?>" />
|
<meta property="og:description" content="<?php echo $this->getParam('description', ''); ?>" />
|
||||||
<meta property="og:image" content="<?php echo APP_PROTOCOL;?>://<?php echo $domain; ?>/logo.png?v=1" />
|
<meta property="og:image" content="<?php echo APP_PROTOCOL;?>://<?php echo $domain; ?>/logo.png?v=1" />
|
||||||
<!--<meta name="referrer" content="never">
|
|
||||||
<meta name="referrer" content="no-referrer">-->
|
|
||||||
<link rel="preconnect" href="<?php echo $api; ?>" />
|
<link rel="preconnect" href="<?php echo $api; ?>" />
|
||||||
<?php foreach ($this->getParam('prefetch', []) as $prefetch): ?>
|
<?php foreach ($this->getParam('prefetch', []) as $prefetch): ?>
|
||||||
<link rel="prefetch" href="<?php echo $this->escape($prefetch); ?>" />
|
<link rel="prefetch" href="<?php echo $this->escape($prefetch); ?>" />
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<script src="https://cdn.ravenjs.com/3.26.2/raven.min.js" crossorigin="anonymous"></script>
|
|
||||||
<!--<script src="/dist/scripts/app-dependencies.js"></script>-->
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||||
|
@ -66,22 +62,13 @@ $env = $this->getParam('env', '');
|
||||||
script.async = true;
|
script.async = true;
|
||||||
script.src = '/dist/scripts/app-all.js?v=<?php echo $version; ?>';
|
script.src = '/dist/scripts/app-all.js?v=<?php echo $version; ?>';
|
||||||
script.onload = function() {
|
script.onload = function() {
|
||||||
window.Litespeed.run(window);
|
window.ls.run(window);
|
||||||
};
|
};
|
||||||
|
|
||||||
head.appendChild(script);
|
head.appendChild(script);
|
||||||
});
|
});
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
window.recaptchaCallback = function () {
|
|
||||||
window.grecaptchaReady = true;
|
|
||||||
document.dispatchEvent(new CustomEvent('recaptcha-loaded', {
|
|
||||||
bubbles: false,
|
|
||||||
cancelable: true
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
<script src="https://www.google.com/recaptcha/api.js?onload=recaptchaCallback&render=explicit&hl=<?php echo Locale::getText('settings.recaptcha'); ?>" async defer></script>
|
|
||||||
<?php echo $this->exec($this->getParam('head', [])); ?>
|
<?php echo $this->exec($this->getParam('head', [])); ?>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
84
public/dist/scripts/app-all.js
vendored
84
public/dist/scripts/app-all.js
vendored
File diff suppressed because one or more lines are too long
84
public/dist/scripts/app.js
vendored
84
public/dist/scripts/app.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,44 +1,4 @@
|
||||||
window.Litespeed.container.get('state')
|
window.ls.router
|
||||||
.add('/', {
|
|
||||||
template: '/',
|
|
||||||
scope: 'home'
|
|
||||||
})
|
|
||||||
.add('/soon', {
|
|
||||||
template: '/soon',
|
|
||||||
scope: 'soon'
|
|
||||||
})
|
|
||||||
.add('/products/:product', {
|
|
||||||
template: function (window) {
|
|
||||||
return window.location.pathname;
|
|
||||||
},
|
|
||||||
scope: 'home'
|
|
||||||
})
|
|
||||||
.add('/pricing', {
|
|
||||||
template: '/pricing',
|
|
||||||
scope: 'home'
|
|
||||||
})
|
|
||||||
.add('/docs', {
|
|
||||||
template: '/docs',
|
|
||||||
scope: 'home'
|
|
||||||
})
|
|
||||||
.add('/docs/:page', {
|
|
||||||
template: function (window) {
|
|
||||||
return window.location.pathname;
|
|
||||||
},
|
|
||||||
scope: 'home'
|
|
||||||
})
|
|
||||||
.add('/support', {
|
|
||||||
template: '/support',
|
|
||||||
scope: 'home'
|
|
||||||
})
|
|
||||||
.add('/contact', {
|
|
||||||
template: '/contact',
|
|
||||||
scope: 'home'
|
|
||||||
})
|
|
||||||
.add('/contact/thank-you', {
|
|
||||||
template: '/contact/thank-you',
|
|
||||||
scope: 'home'
|
|
||||||
})
|
|
||||||
.add('/auth/signin', {
|
.add('/auth/signin', {
|
||||||
template: '/auth/signin',
|
template: '/auth/signin',
|
||||||
scope: 'home'
|
scope: 'home'
|
||||||
|
@ -63,30 +23,6 @@ window.Litespeed.container.get('state')
|
||||||
template: '/auth/join',
|
template: '/auth/join',
|
||||||
scope: 'home'
|
scope: 'home'
|
||||||
})
|
})
|
||||||
.add('/company/about', {
|
|
||||||
template: '/company/about',
|
|
||||||
scope: 'home'
|
|
||||||
})
|
|
||||||
.add('/policy/security', {
|
|
||||||
template: '/policy/security',
|
|
||||||
scope: 'home'
|
|
||||||
})
|
|
||||||
.add('/policy/terms', {
|
|
||||||
template: '/policy/terms',
|
|
||||||
scope: 'home'
|
|
||||||
})
|
|
||||||
.add('/policy/privacy', {
|
|
||||||
template: '/policy/privacy',
|
|
||||||
scope: 'home'
|
|
||||||
})
|
|
||||||
.add('/policy/sub-processors', {
|
|
||||||
template: '/policy/sub-processors',
|
|
||||||
scope: 'home'
|
|
||||||
})
|
|
||||||
.add('/policy/cookies', {
|
|
||||||
template: '/policy/cookies',
|
|
||||||
scope: 'home'
|
|
||||||
})
|
|
||||||
.add('/console', {
|
.add('/console', {
|
||||||
template: '/console',
|
template: '/console',
|
||||||
scope: 'console'
|
scope: 'console'
|
||||||
|
@ -174,33 +110,28 @@ window.Litespeed.container.get('state')
|
||||||
|
|
||||||
// Filters
|
// Filters
|
||||||
|
|
||||||
let filter = window.Litespeed.container.get('filter');
|
let filter = window.ls.filter;
|
||||||
let date = window.Litespeed.container.get('date');
|
let date = window.ls.container.get('date');
|
||||||
let timezone = window.Litespeed.container.get('timezone');
|
let timezone = window.ls.container.get('timezone');
|
||||||
let markdown = window.Litespeed.container.get('markdown');
|
let markdown = window.ls.container.get('markdown');
|
||||||
|
|
||||||
filter.add('lowerCase', function (value) {
|
filter
|
||||||
|
.add('lowerCase', function (value) {
|
||||||
return value.toLowerCase();
|
return value.toLowerCase();
|
||||||
});
|
})
|
||||||
|
.add('date', function (value, options) {
|
||||||
filter.add('date', function (value, options) {
|
|
||||||
return date.format('Y-m-d', value);
|
return date.format('Y-m-d', value);
|
||||||
});
|
})
|
||||||
|
.add('date-time', function (value, options) {
|
||||||
filter.add('date-time', function (value, options) {
|
|
||||||
return date.format('Y-m-d H:i', value);
|
return date.format('Y-m-d H:i', value);
|
||||||
});
|
})
|
||||||
|
.add('date-text', function (value, options) {
|
||||||
filter.add('date-text', function (value, options) {
|
|
||||||
return date.format('d M Y', value);
|
return date.format('d M Y', value);
|
||||||
});
|
})
|
||||||
|
.add('date-long', function (value, options) {
|
||||||
filter.add('date-long', function (value, options) {
|
|
||||||
return date.format('l, j F, H:i', value);
|
return date.format('l, j F, H:i', value);
|
||||||
});
|
})
|
||||||
|
.add('min2hum', function (value, options) {
|
||||||
filter.add('min2hum', function (value, options) {
|
|
||||||
|
|
||||||
if(value >= 60) {
|
if(value >= 60) {
|
||||||
if(value % 60 === 0) {
|
if(value % 60 === 0) {
|
||||||
return Math.ceil(value / 60) + ' hours';
|
return Math.ceil(value / 60) + ' hours';
|
||||||
|
@ -211,9 +142,8 @@ filter.add('min2hum', function (value, options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return value + ' minutes';
|
return value + ' minutes';
|
||||||
});
|
})
|
||||||
|
.add('ms2hum', function (value, options) {
|
||||||
filter.add('ms2hum', function (value, options) {
|
|
||||||
let temp = value;
|
let temp = value;
|
||||||
const years = Math.floor( temp / 31536000 ),
|
const years = Math.floor( temp / 31536000 ),
|
||||||
days = Math.floor( ( temp %= 31536000 ) / 86400 ),
|
days = Math.floor( ( temp %= 31536000 ) / 86400 ),
|
||||||
|
@ -230,21 +160,18 @@ filter.add('ms2hum', function (value, options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return "< 1s";
|
return "< 1s";
|
||||||
});
|
})
|
||||||
|
.add('nl2p', function (value, options) {
|
||||||
filter.add('nl2p', function (value, options) {
|
|
||||||
let result = "<p>" + value + "</p>";
|
let result = "<p>" + value + "</p>";
|
||||||
result = result.replace(/\r\n\r\n/g, "</p><p>").replace(/\n\n/g, "</p><p>");
|
result = result.replace(/\r\n\r\n/g, "</p><p>").replace(/\n\n/g, "</p><p>");
|
||||||
result = result.replace(/\r\n/g, "<br />").replace(/\n/g, "<br />");
|
result = result.replace(/\r\n/g, "<br />").replace(/\n/g, "<br />");
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
});
|
})
|
||||||
|
.add('markdown', function (value, options) {
|
||||||
filter.add('markdown', function (value, options) {
|
|
||||||
return markdown.render(value);
|
return markdown.render(value);
|
||||||
});
|
})
|
||||||
|
.add('id2name', function (value, options) {
|
||||||
filter.add('id2name', function (value, options) {
|
|
||||||
let members = container.get('members');
|
let members = container.get('members');
|
||||||
|
|
||||||
if(members === null) {
|
if(members === null) {
|
||||||
|
@ -258,17 +185,15 @@ filter.add('id2name', function (value, options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
});
|
})
|
||||||
|
.add('id2role', function (value, options) {
|
||||||
filter.add('id2role', function (value, options) {
|
|
||||||
if(APP_ENV.ROLES[value]) {
|
if(APP_ENV.ROLES[value]) {
|
||||||
return APP_ENV.ROLES[value];
|
return APP_ENV.ROLES[value];
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
});
|
})
|
||||||
|
.add('humanFileSize', function (bytes) {
|
||||||
filter.add('humanFileSize', function (bytes) {
|
|
||||||
if(!bytes) {
|
if(!bytes) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -288,9 +213,8 @@ filter.add('humanFileSize', function (bytes) {
|
||||||
} while(Math.abs(bytes) >= thresh && u < units.length - 1);
|
} while(Math.abs(bytes) >= thresh && u < units.length - 1);
|
||||||
|
|
||||||
return bytes.toFixed(1) + '<span class="text-size-small unit">' + units[u] + '</span>';
|
return bytes.toFixed(1) + '<span class="text-size-small unit">' + units[u] + '</span>';
|
||||||
});
|
})
|
||||||
|
.add('statsTotal', function (value) {
|
||||||
filter.add('statsTotal', function (value) {
|
|
||||||
if(!value) {
|
if(!value) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -359,15 +283,17 @@ function annotate(number, maxPlaces, forcePlaces, abbr) {
|
||||||
|
|
||||||
// Views
|
// Views
|
||||||
|
|
||||||
window.Litespeed.container.get('view')
|
window.ls.container.get('view')
|
||||||
.add({
|
.add({
|
||||||
selector: 'data-acl',
|
selector: 'data-acl',
|
||||||
controller: function(element, document, state, alerts) {
|
controller: function(element, document, router, alerts) {
|
||||||
document.body.classList.remove('console');
|
document.body.classList.remove('console');
|
||||||
document.body.classList.remove('home');
|
document.body.classList.remove('home');
|
||||||
document.body.classList.add(state.getCurrent().view.scope);
|
console.log(router.getCurrent());
|
||||||
|
|
||||||
if(!state.getCurrent().view.project) {
|
document.body.classList.add(router.getCurrent().view.scope);
|
||||||
|
|
||||||
|
if(!router.getCurrent().view.project) {
|
||||||
document.body.classList.add('hide-nav');
|
document.body.classList.add('hide-nav');
|
||||||
document.body.classList.remove('show-nav');
|
document.body.classList.remove('show-nav');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
selector: 'data-appwrite',
|
selector: 'data-appwrite',
|
||||||
repeat: true,
|
repeat: true,
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
// Init
|
// Init
|
||||||
Raven.config('https://a9388b4e324f48f8afd4558cb8d3e8fc@sentry.io/1225344').install();
|
|
||||||
|
|
||||||
window.Litespeed = app(APP_ENV.VERSION);
|
window.ls.error = function () {
|
||||||
|
|
||||||
window.Litespeed.error = function () {
|
|
||||||
return function (error) {
|
return function (error) {
|
||||||
alert(error);
|
alert(error);
|
||||||
console.error('ERROR-APP', error);
|
console.error('ERROR-APP', error);
|
||||||
|
@ -11,14 +8,12 @@ window.Litespeed.error = function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
window.addEventListener('error', function (event) {
|
window.addEventListener('error', function (event) {
|
||||||
alert(error.error.message);
|
alert(event.error.message);
|
||||||
console.error('ERROR-EVENT:', event.error.message, event.error.stack);
|
console.error('ERROR-EVENT:', event.error.message, event.error.stack);
|
||||||
});
|
});
|
||||||
|
|
||||||
document.addEventListener('logout', function (event) {
|
document.addEventListener('logout', function () {
|
||||||
var state = window.Litespeed.container.get('state');
|
if(window.ls.router.getCurrent().view.scope === 'console') {
|
||||||
|
|
||||||
if(state.getCurrent().view.scope === 'console') {
|
|
||||||
state.change('/auth/signin');
|
state.change('/auth/signin');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.set('alerts', function (window) {
|
window.ls.container.set('alerts', function (window) {
|
||||||
let service = {};
|
let service = {};
|
||||||
|
|
||||||
let counter = 0;
|
let counter = 0;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.set('console', function (window) {
|
window.ls.container.set('console', function (window) {
|
||||||
var sdk = new window.AppwriteSDK();
|
var sdk = new window.AppwriteSDK();
|
||||||
|
|
||||||
sdk.config.domain = 'https://appwrite.io';
|
sdk.config.domain = 'https://appwrite.io';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.set('date', function () {
|
window.ls.container.set('date', function () {
|
||||||
function format (format, timestamp) {
|
function format (format, timestamp) {
|
||||||
// discuss at: http://locutus.io/php/date/
|
// discuss at: http://locutus.io/php/date/
|
||||||
// original by: Carlos R. L. Rodrigues (http://www.jsfromhell.com)
|
// original by: Carlos R. L. Rodrigues (http://www.jsfromhell.com)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.set('di', function () {
|
window.ls.container.set('di', function () {
|
||||||
var list = {
|
var list = {
|
||||||
'load': true
|
'load': true
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.set('env', function () {
|
window.ls.container.set('env', function () {
|
||||||
return APP_ENV;
|
return APP_ENV;
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.set('markdown', function (window) {
|
window.ls.container.set('markdown', function (window) {
|
||||||
var md = window.markdownit();
|
var md = window.markdownit();
|
||||||
|
|
||||||
function renderEm (tokens, idx, opts, _, slf) {
|
function renderEm (tokens, idx, opts, _, slf) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.set('sdk', function (window, state) {
|
window.ls.container.set('sdk', function (window, state) {
|
||||||
var sdk = new window.AppwriteSDK();
|
var sdk = new window.AppwriteSDK();
|
||||||
|
|
||||||
sdk.config.domain = APP_ENV.API;
|
sdk.config.domain = APP_ENV.API;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.set('timezone', function () {
|
window.ls.container.set('timezone', function () {
|
||||||
return {
|
return {
|
||||||
convert: function (unixTime) {
|
convert: function (unixTime) {
|
||||||
var timezoneMinutes = new Date().getTimezoneOffset();
|
var timezoneMinutes = new Date().getTimezoneOffset();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
'selector': 'data-analytics-event',
|
'selector': 'data-analytics-event',
|
||||||
'controller': function (element) {
|
'controller': function (element) {
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
'selector': 'data-analytics-pageview',
|
'selector': 'data-analytics-pageview',
|
||||||
'controller': function (window, state) {
|
'controller': function (window, router) {
|
||||||
if(!ga) {
|
if(!ga) {
|
||||||
console.error('Google Analytics ga object is not available');
|
console.error('Google Analytics ga object is not available');
|
||||||
}
|
}
|
||||||
|
|
||||||
var company = state.params['company'] || null;
|
var company = router.params['company'] || null;
|
||||||
|
|
||||||
if(!company) {
|
if(!company) {
|
||||||
//return;
|
//return;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
window.Litespeed.container.get('view').add({
|
window.ls.container.get('view').add({
|
||||||
selector: 'data-ls-count',
|
selector: 'data-ls-count',
|
||||||
template: false,
|
template: false,
|
||||||
repeat: true,
|
repeat: true,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
selector: 'data-forms-clone',
|
selector: 'data-forms-clone',
|
||||||
repeat: false,
|
repeat: false,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
selector: 'data-forms-color',
|
selector: 'data-forms-color',
|
||||||
repeat: false,
|
repeat: false,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
selector: 'data-forms-copy',
|
selector: 'data-forms-copy',
|
||||||
controller: function(element, alerts, document, window) {
|
controller: function(element, alerts, document, window) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
selector: 'data-forms-draft',
|
selector: 'data-forms-draft',
|
||||||
repeat: false,
|
repeat: false,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
//"use strict";
|
//"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.get('view').add({
|
window.ls.container.get('view').add({
|
||||||
selector: 'data-forms-filter',
|
selector: 'data-forms-filter',
|
||||||
controller: function(document, container, expression, element, form, di) {
|
controller: function(document, container, expression, element, form, di) {
|
||||||
let name = element.dataset['formsFilter'] || '';
|
let name = element.dataset['formsFilter'] || '';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
selector: 'data-forms-parent-down',
|
selector: 'data-forms-parent-down',
|
||||||
repeat: false,
|
repeat: false,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
selector: 'data-forms-parent-remove',
|
selector: 'data-forms-parent-remove',
|
||||||
repeat: false,
|
repeat: false,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
selector: 'data-forms-parent-up',
|
selector: 'data-forms-parent-up',
|
||||||
repeat: false,
|
repeat: false,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
selector: 'data-forms-password-meter',
|
selector: 'data-forms-password-meter',
|
||||||
repeat: false,
|
repeat: false,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.get('view').add({
|
window.ls.container.get('view').add({
|
||||||
selector: 'data-forms-pell',
|
selector: 'data-forms-pell',
|
||||||
repeat: false,
|
repeat: false,
|
||||||
controller: function(element, window, document, markdown) {
|
controller: function(element, window, document, markdown) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
selector: 'data-forms-recaptcha',
|
selector: 'data-forms-recaptcha',
|
||||||
repeat: false,
|
repeat: false,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
selector: 'data-forms-remove',
|
selector: 'data-forms-remove',
|
||||||
repeat: false,
|
repeat: false,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
selector: 'data-forms-switch',
|
selector: 'data-forms-switch',
|
||||||
repeat: false,
|
repeat: false,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
selector: 'data-forms-text-count',
|
selector: 'data-forms-text-count',
|
||||||
repeat: false,
|
repeat: false,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
selector: 'data-forms-text-direction',
|
selector: 'data-forms-text-direction',
|
||||||
repeat: false,
|
repeat: false,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
selector: 'data-forms-text-resize',
|
selector: 'data-forms-text-resize',
|
||||||
repeat: false,
|
repeat: false,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
selector: 'data-forms-upload-multi',
|
selector: 'data-forms-upload-multi',
|
||||||
repeat: false,
|
repeat: false,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
selector: 'data-forms-upload',
|
selector: 'data-forms-upload',
|
||||||
repeat: false,
|
repeat: false,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
'selector': 'data-page-title',
|
'selector': 'data-page-title',
|
||||||
'repeat': true,
|
'repeat': true,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
window.Litespeed.container.get('view').add({
|
window.ls.container.get('view').add({
|
||||||
selector: 'data-setup',
|
selector: 'data-setup',
|
||||||
controller: function(element, console, form) {
|
controller: function(element, console, form) {
|
||||||
element.addEventListener('submit', function (event) {
|
element.addEventListener('submit', function (event) {
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
.then(function (data) {
|
.then(function (data) {
|
||||||
let project= JSON.parse(data);
|
let project= JSON.parse(data);
|
||||||
|
|
||||||
//state.change();
|
//router.change();
|
||||||
window.location.href = '/console?project=' + project['$uid'];
|
window.location.href = '/console?project=' + project['$uid'];
|
||||||
}, function () {
|
}, function () {
|
||||||
throw new Error('Failed to setup project');
|
throw new Error('Failed to setup project');
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
window.Litespeed.container.get('view').add({
|
window.ls.container.get('view').add({
|
||||||
selector: 'data-switch',
|
selector: 'data-switch',
|
||||||
controller: function(element, state, window, di) {
|
controller: function(element, router, window, di) {
|
||||||
let debug = (element.dataset['debug']);
|
let debug = (element.dataset['debug']);
|
||||||
|
|
||||||
let init = function () {
|
let init = function () {
|
||||||
|
@ -15,12 +15,12 @@
|
||||||
let fallback = function () {
|
let fallback = function () {
|
||||||
if (debug) { console.log('fallback init', element.value); }
|
if (debug) { console.log('fallback init', element.value); }
|
||||||
|
|
||||||
if(state.getCurrent().view.scope !== 'console' || !state.getCurrent().view.project) {
|
if(router.getCurrent().view.scope !== 'console' || !router.getCurrent().view.project) {
|
||||||
if (debug) { console.log('Skip: not console state', element.value); }
|
if (debug) { console.log('Skip: not console state', element.value); }
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(state.params['project']) {
|
if(router.params['project']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,14 +31,14 @@
|
||||||
|
|
||||||
if (debug) { console.log('last used project', project); }
|
if (debug) { console.log('last used project', project); }
|
||||||
|
|
||||||
return state.change('/console/home?project=' + project, true);
|
return router.change('/console/home?project=' + project, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
di.reset();
|
di.reset();
|
||||||
|
|
||||||
if (debug) { console.log('first project from list', element.options, element.$lsSkip); }
|
if (debug) { console.log('first project from list', element.options, element.$lsSkip); }
|
||||||
|
|
||||||
return state.change('/console/home?project=' + element.options[0].value, true);
|
return router.change('/console/home?project=' + element.options[0].value, true);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (debug) { console.log('switch init', element.options); }
|
if (debug) { console.log('switch init', element.options); }
|
||||||
|
@ -48,12 +48,12 @@
|
||||||
|
|
||||||
fallback();
|
fallback();
|
||||||
|
|
||||||
if(element.value && element.value !== state.params['project']) {
|
if(element.value && element.value !== router.params['project']) {
|
||||||
if (debug) { console.log('Changed: selected project from list');}
|
if (debug) { console.log('Changed: selected project from list');}
|
||||||
|
|
||||||
init ();
|
init ();
|
||||||
|
|
||||||
return state.change('/console/home?project=' + element.value);
|
return router.change('/console/home?project=' + element.value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
repeat: true,
|
repeat: true,
|
||||||
selector: 'data-ui-gravatar',
|
selector: 'data-ui-gravatar',
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
window.Litespeed.container.get('view').add({
|
window.ls.container.get('view').add({
|
||||||
selector: 'data-ui-highlight',
|
selector: 'data-ui-highlight',
|
||||||
controller: function(element, state, expression, document) {
|
controller: function(element, state, expression, document) {
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
selector: 'data-ui-modal',
|
selector: 'data-ui-modal',
|
||||||
controller: function(document, element, expression) {
|
controller: function(document, element, expression) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
window.Litespeed.container.get('view').add({
|
window.ls.container.get('view').add({
|
||||||
selector: 'data-ls-ui-open',
|
selector: 'data-ls-ui-open',
|
||||||
repeat: false,
|
repeat: false,
|
||||||
controller: function(element, window) {
|
controller: function(element, window) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
window.Litespeed.container.get('view').add({
|
window.ls.container.get('view').add({
|
||||||
selector: 'data-ls-ui-paging',
|
selector: 'data-ls-ui-paging',
|
||||||
repeat: true,
|
repeat: true,
|
||||||
controller: function(document, element, expression) {
|
controller: function(document, element, expression) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
selector: 'data-ui-phases',
|
selector: 'data-ui-phases',
|
||||||
controller: function(element, window, document, expression, view) {
|
controller: function(element, window, document, expression, view) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
window.Litespeed.container.get('view').add({
|
window.ls.container.get('view').add({
|
||||||
selector: 'data-ls-ui-scroll-to',
|
selector: 'data-ls-ui-scroll-to',
|
||||||
repeat: false,
|
repeat: false,
|
||||||
controller: function(element, document, expression) {
|
controller: function(element, document, expression) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
window.Litespeed.container.get('view').add(
|
window.ls.container.get('view').add(
|
||||||
{
|
{
|
||||||
repeat: true,
|
repeat: true,
|
||||||
selector: 'data-ui-slide',
|
selector: 'data-ui-slide',
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(function (window) {
|
(function (window) {
|
||||||
window.Litespeed.container.get('view').add({
|
window.ls.container.get('view').add({
|
||||||
selector: 'data-ls-wait',
|
selector: 'data-ls-wait',
|
||||||
template: false,
|
template: false,
|
||||||
repeat: false,
|
repeat: false,
|
||||||
|
|
Loading…
Reference in a new issue