Initial xentral_oss_20.3.c9ffacf

This commit is contained in:
Alex
2021-05-21 08:49:41 +02:00
parent 5406e4a551
commit 34e5ac43d9
18884 changed files with 2109867 additions and 0 deletions
@@ -0,0 +1,877 @@
body.module-appstore #page_container > div > div.ui-tabs-panel {
background-color: #F7F7F7;
margin-bottom: 0;
padding: 0 0 40px 0 !important;
}
/* Appstore
- - - - - - - - - - - - - - - - - - - - - - */
#appstore h2 {
font-weight: normal;
font-size: 18px;
color: #6d6d6f;
margin: 5px 1% 10px 1%;
padding: 12px 1% 14px 1%;
border-bottom: 1px solid rgba(55, 64, 81, 0.1);
}
#appstore h3 {
clear: both;
color: #6d6d6f;
margin: 20px 0;
padding: 12px 0 6px 0;
}
#appstore .hero {
margin-bottom: 20px;
}
#appstore .hero img {
width: 100%;
height: auto;
}
/**
Header
*/
.appstore-header{
position: relative;
background-color: rgba(136, 63, 254, 0.9);
background: -webkit-linear-gradient(115.15deg, rgba(136, 63, 254, 0.9) 9.64%, rgba(181, 143, 243, 0.79) 49.12%, rgba(47, 243, 255, 0.39) 106.88%);
background: -moz-linear-gradient(115.15deg, rgba(136, 63, 254, 0.9) 9.64%, rgba(181, 143, 243, 0.79) 49.12%, rgba(47, 243, 255, 0.39) 106.88%);
background: -o-linear-gradient(115.15deg, rgba(136, 63, 254, 0.9) 9.64%, rgba(181, 143, 243, 0.79) 49.12%, rgba(47, 243, 255, 0.39) 106.88%);
background: linear-gradient(115.15deg, rgba(136, 63, 254, 0.9) 9.64%, rgba(181, 143, 243, 0.79) 49.12%, rgba(47, 243, 255, 0.39) 106.88%);
padding-bottom: 25px;
}
.appstore-header .appstore-headline{
display: inline-block;
width: 100%;
margin-top: 25px;
margin-bottom: 18px;
color: white;
text-align: center;
font-size: 24px;
line-height: 30px;
padding: 0;
}
@media only screen and (max-width: 1200px) {
.appstore-header .appstore-headline{
margin-top: 60px;
}
}
.appstore-header .appstore-tabs {
position: absolute;
top: 18px;
}
.appstore-header .appstore-tabs .appstore-tab{
position: relative;
text-align: center;
margin: 0 9px;
display: inline-block;
color: white;
font-size: 14px;
min-width: 75px;
padding-bottom: 5px;
cursor: pointer;
}
.appstore-header .appstore-tabs .appstore-tab .tab-counter{
position: absolute;
display: block;
content: attr(data-updates);
left: 66px;
top: -8px;
font-size: 11px;
line-height: 16px;
min-width: 12px;
height: 16px;
padding: 0 4px;
border-radius: 16px;
background: rgba(255, 255, 255, 0.5);
}
.appstore-header .appstore-tab.appstore-tab-active,
.appstore-header .appstore-tabs .appstore-tab:hover {
border-bottom: 2px solid white;
}
.appstore-header .appstore-search input{
display: block;
margin: 0 auto;
width: 60%;
box-sizing: border-box;
}
.appstore-categories{
display: flex;
flex-wrap: wrap;
}
.appstore-categories .category-link{
display: flex;
cursor: pointer;
flex: 0 16%;
margin: 1.5% 2%;
width: 20%;
height: 25px;
line-height: 17px;
font-size: 14px;
background-repeat: no-repeat;
padding-left: 40px;
background-size: 22px;
background-position: left center;
background-color: transparent;
box-sizing: border-box;
}
.appstore-categories .category-link span{
align-self: center;
}
@media only screen and (max-width: 1150px) {
.appstore-categories .category-link{
font-size: 12px;
line-height: 16px;
}
}
.appstore-categories .category-link.active,
.appstore-categories .category-link:hover {
font-weight: bold;
}
/**
* filter
*/
#appstore .search .filter {
margin: 0;
}
#appstore .search .filter a {
display: inline-block;
padding: 3px;
margin-right: 20px;
color: #a1d624;
font-weight: bold;
}
#appstore .search .filter a.active {
font-size: 150%;
}
/**
* MODULE (Kategorien + Käufe)
*/
#appstore .modules {
flex-direction: row;
flex-wrap: wrap;
display: flex;
width: 100%;
box-sizing: border-box;
}
#appstore .modules h3{
margin: 0;
width: 100%;
padding-left: 2%;
font-weight: normal;
}
#appstore .module {
display: flex;
flex-wrap: nowrap;
flex-direction: row;
position: relative;
width: 23%;
margin: 0 1%;
padding: 18px 15px;
box-sizing: border-box;
}
@media only screen and (min-width: 1200px) {
#appstore .module {
width: 18%;
}
}
#appstore .module:hover{
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 1px rgba(0, 0, 0, 0.06);
border-radius: 3px;
background-color: white;
}
#appstore .module button {
font-size: 10px;
padding: 5px 25px;
margin-top: auto;
background-color: var(--button-primary-background);
border: none;
border-radius: 2px;
color: var(--button-primary-color);
word-break: normal;
}
#appstore .module button.install{
padding: 5px 15px;
}
#appstore .module .icon {
width: 66px;
min-width: 66px;
height: 66px;
min-height: 66px;
margin-right: 15px;
border-radius: 10px;
background-position: center;
background-repeat: no-repeat;
}
#appstore .module .icon a {
display: block;
width: 40px;
height: 40px;
}
#appstore .module .icon img {
position: absolute;
left: 13px;
top: 13px;
padding: 0;
border-radius: 0;
}
#appstore .module .content {
box-sizing: border-box;
line-height: 15px;
word-break: break-word;
display: flex;
flex-direction: column;
align-items: flex-start;
}
#appstore .module .content span,
#appstore .information-right .description span{
background: white;
color: #2729D2;
border: 1px solid #2729D2;
font-weight: normal;
font-size: 8px;
line-height: 14px;
margin: 5px 3px 5px 0;
height: 16px;
max-width: 50px;
padding: 0 5px;
display: inline-block;
}
#appstore .module .title {
display: block;
font-weight: bold;
box-sizing: border-box;
font-size: 12px;
line-height: 12px;
}
#appstore .module .dropdown {
position: absolute;
left: 50px;
top: 48px;
}
/**
Category Page
*/
#appstore .category-page-nav,
#appstore.category-page h2,
#appstore.category-page h3,
#appstore.category-page .appstore-categories{
display: none;
}
#appstore.category-page .category-page-nav{
display: block;
font-size: 14px;
padding: 10px 0;
margin: 30px 1% 10px 1%;
line-height: 30px;
border-bottom: 1px solid rgba(55, 64, 81, 0.1);
}
#appstore.category-page .category-page-nav .category-page-back{
display: inline-block;
margin-right: 10px;
width: 30px;
height: 30px;
background: rgba(55, 64, 81, 0.1);
border-radius: 3px;
text-align: center;
line-height: 30px;
cursor: pointer;
}
#appstore.category-page .modules{
display: flex;
flex-wrap: wrap;
}
#appstore.category-page .module {
display: flex;
width: 14%;
margin: 0 1% 2% 1%;
height: 202px;
background: #FFFFFF;
border: 1px solid #EAEDF7;
box-shadow: 0 2px 4px rgba(28, 41, 90, 0.0367952);
border-radius: 5px;
justify-content: flex-start;
align-items: center;
flex-direction: column;
}
#appstore.category-page .module .content {
display: flex;
align-items: center;
justify-content: space-between;
flex-direction: column;
text-align: center;
margin-top: 20px;
height: 100%;
}
#appstore.category-page .module .icon {
margin-right: 0;
}
#appstore.category-page .module button{
}
/**
* HIGHLIGHTS
*/
#appstore .highlights {
clear: both;
}
#appstore .highlight {
float: left;
width: 230px;
height: 140px;
margin: 0 20px 20px 0;
border-radius: 10px;
background-color: #42b8c4;
}
#appstore .highlight .label,
#appstore .highlight .image {
display: block;
text-align: center;
}
#appstore .highlight .image {
padding-top: 32px;
padding-bottom: 12px;
height: 48px;
text-align: center;
}
#appstore .highlight a {
display: block;
width: 100%;
height: 100%;
}
#appstore .highlight a span {
color: #FFF;
font-weight: bold;
text-decoration: none;
}
/**
* DETAIL-SEITE
*/
#appstore .detail {
}
#appstore .detail .information,
#appstore .detail .screenshots {
clear: both;
margin: 50px;
}
#appstore .detail .information-left {
box-sizing: border-box;
float: left;
width: 15%;
min-width: 85px;
padding: 0 20px 20px 0;
}
#appstore .detail .information-left svg,
#appstore .detail .information-left img {
width: 100%;
height: auto;
}
#appstore .detail .app-icon {
width: 100px;
height: 100px;
background-repeat: no-repeat;
background-position: center;
background-size: 40px;
border-radius: 10px;
}
#appstore .detail .information-right {
box-sizing: border-box;
float: left;
width: 85%;
}
#appstore .detail .information-right h1 {
font-size: 14px;
padding: 0 0 5px 0;
}
#appstore .detail .information-right .description {
margin-bottom: 25px;
color: rgba(0, 0, 0, 0.6);
}
#appstore .detail .screenshots .screenshot {
box-sizing: border-box;
float: left;
width: 50%;
min-width: 180px;
padding: 0 20px 20px 0;
}
#appstore .detail .screenshots img {
width: 100%;
height: auto;
}
@media only screen and (max-width: 792px) {
#appstore .detail .screenshots .screenshot {
clear: both;
float: none;
width: 100%;
padding: 0;
margin: 20px 0;
}
}
#appstore .detail .dropdown {
width: 180px;
}
/**
DROPDOWN
*/
.dropdown {
clear: both;
position: relative;
display: inline-block;
width: 130px;
}
.dropdown.open .dropdown-link {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.dropdown.open .dropdown-menu {
display: block;
}
.dropdown-link {
display: block;
min-height: 21px;
white-space: nowrap;
border: none;
border-radius: 3px;
color: #6D6D6D;
background-color: #E0E0E0;
outline: 0;
}
.dropdown-link .label,
.dropdown-link .caret {
padding: 4px;
}
.dropdown-link .label {
position: absolute;
top: 0;
left: 0;
width: 85%;
box-sizing: border-box;
font-weight: bold;
text-align: center;
padding: 4px;
}
.dropdown-link .caret {
position: absolute;
top: 0;
right: 0;
width: 26px;
box-sizing: border-box;
border-left: 1px solid #FFF;
background-image: url('../themes/new/images/caret_dark.png');
background-position: center;
background-repeat: no-repeat;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none;
float: left;
width: 100%;
padding: 4px 0;
margin: 0;
list-style: none;
font-size: 14px;
text-align: left;
background-color: #E0E0E0;
border-radius: 0 0 4px 4px;
-webkit-background-clip: padding-box;
background-clip: padding-box;
border-top: 1px solid #FFF;
}
.dropdown-menu > li {
font-size: 11px;
background-color: #E0E0E0;
}
.dropdown-menu > li > a {
display: block;
padding: 5px 10px;
clear: both;
font-weight: normal;
line-height: 1.42857143;
color: #333333;
white-space: nowrap;
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
color: #FFF;
text-decoration: none;
background-color: #42b8c4;
}
#anfragepopup{
display: none;
}
a.dropdown-link.activated span.caret {
background-image: url('../themes/new/images/caret_light.png');
}
a.dropdown-link.deactivated span.caret {
background-image: url('../themes/new/images/caret_dark.png');
}
a.testversion, a.testversion > span {
background-color: rgb(224, 224, 224) !important;
color: rgb(109, 109, 111);
}
a.dropdown-link > span.label.testversion, a.dropdown-link > span.label.testversion + span {
background-color: var(--button-primary-background) !important;
color: var(--button-primary-color);
}
/**
BUY MODAL
**/
#buyversion {
background-color: white;
font-size: 14px;
}
#buyversion a{
color: var(--link-color);
}
#buyversion legend{
margin: 0 auto 26px auto;
font-size: 24px;
}
#buyversion p{
font-size: 16px;
float: left;
width: 50%;
padding-left: 10px;
box-sizing: border-box;
margin: 10px 0;
}
#buyversion p.right{
float: right;
padding-left: 40px;
}
#buyversion table{
color: rgba(51, 51, 51, 0.7);
border-collapse: separate;
border-spacing: 15px;
float: left;
width: 50%;
padding-right: 30px;
}
#buyversion table.right{
padding-left: 30px;
}
#buyversion table.right tr:last-child{
margin-top: auto;
}
#buyversion table:first-of-type{
border-right: 1px solid rgba(151, 151, 151, 0.2);
}
#buyversion select,
#buyversion input:not(.counter-component-input){
border: 1px solid rgba(37, 35, 58, 0.2);
width: 100%;
height: 30px;
box-sizing: border-box;
}
#buyversion select.input-error,
#buyversion input.input-error{
border: 1px solid red;
}
#customeragreement.input-error + label{
color: red;
}
#buyversion + div .error-hint,
#customerinfocontent + div .error-hint {
color: red;
padding-left: 26px;
margin-right: auto;
}
.ui-dialog-buttonpane .buy-version-legal{
display: flex;
justify-content: flex-end;
align-items: center;
width: 280px;
}
.ui-dialog-buttonpane .buy-version-legal input{
width: 16px;
height: 16px;
}
.ui-dialog-buttonpane .buy-version-legal label{
padding-left: 7px;
}
#buyversion + .ui-dialog-buttonpane{
display: flex;
justify-content: flex-start;
align-items: center;
flex-direction: row-reverse;
}
#changecustomerinfo{
background-color: white;
width: 100%;
height: 50px;
}
#customerinfocontent .error-hint{
background-color: white;
margin: 0;
padding-top: 8px;
padding-bottom: 8px;
}
#changecustomerinfo .button{
margin-right: 25px;
}
/**
BUY LICENCE LANDING PAGE
*/
.buy-licence-landingpage {
display: flex;
padding: 30px 40px;
color: #7D7F81;
font-size: 14px;
line-height: 24px;
}
.buy-licence-landingpage h2,
.buy-licence-landingpage h3,
.buy-licence-landingpage h3 {
color: #646464;
padding-left: 0;
padding-right: 0;
}
.buy-licence-landingpage h2{
font-size: 24px;
}
.buy-licence-landingpage h3{
font-size: 16px;
font-weight: normal;
}
.buy-licence-landingpage h4{
font-size: 14px;
}
.buy-licence-landingpage strong{
font-size: 36px;
color: #646464;
}
.buy-licence-landingpage .user-amount {
display: flex;
align-items: center;
margin: 20px 0;
}
.buy-licence-landingpage .user-amount div:first-child {
margin-right: 15px;
}
.buy-licence-landingpage > div{
width: 50%;
box-sizing: border-box;
padding: 30px 40px;
}
.buy-licence-landingpage .highlight-box{
background: #FFFFFF;
border: 1px solid #F0F0F0;
box-sizing: border-box;
box-shadow: 0 0 2px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.1);
border-radius: 10px;
max-width: 550px;
}
.buy-licence-landingpage .highlight-box h2{
margin-bottom: 20px;
}
.buy-licence-landingpage .landing-price {
display: flex;
}
.buy-licence-landingpage .landing-price div:first-child {
width: 380px;
margin-right: 15px;
}
.buy-licence-landingpage .landing-usps {
display: flex;
flex-wrap: wrap;
}
.buy-licence-landingpage .landing-usps > div {
width: 50%;
}
.buy-licence-landingpage .landing-icon {
max-width: 40px;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 5px;
margin-bottom: 20px;
margin-top: 40px;
}
.buy-licence-landingpage .price-note {
font-size: 10px;
}
.buy-licence-landingpage svg{
display: inline-block;
}
.buy-licence-landingpage .landing-icon.icon-monthly-terminable {
background-color: var(--xentral-signature-violet-transparent);
}
.buy-licence-landingpage .landing-icon.icon-appstore {
background-color: var(--xentral-signature-pink-transparent);
}
.buy-licence-landingpage .landing-icon.icon-support {
background-color: var(--xentral-signature-green-transparent);
}
.buy-licence-landingpage .landing-icon.icon-possibilities {
background-color: var(--xentral-signature-petrol-transparent);
}
/** jquery ui resets **/
.ui-dialog.ui-widget-content, .ui-dialog .ui-widget-content, .ui-dialog .ui-dialog-content,
.ui-draggable .ui-dialog-titlebar{
background-color: white;
}
.ui-dialog .ui-dialog-buttonpane{
border: none;
}
.ui-dialog-titlebar-close .ui-icon-closethick{
background-image: url("../themes/new/images/icon-close.svg") !important; /** important necessary to override jquer ui **/
}
.ui-dialog a {
color: var(--link-color);
}
/**
COUNTER COMPONENT
*/
.counter-component{
width: 131px;
height: 40px;
border: 1px solid rgba(128, 128, 128, 0.2);
box-sizing: border-box;
border-radius: 10px;
display: flex;
justify-content: space-between;
align-content:center;
}
.counter-component .sub-button,
.counter-component .plus-button {
width: 24px;
height: 24px;
line-height: 22px;
font-size: 24px;
background: var(--button-primary-background);
color: var(--button-primary-color);
text-align: center;
border-radius: 24px;
cursor: pointer;
margin: 7px 10px;
}
.counter-component input{
font-size: 17px;
width: 25px;
height: 40px;
padding: 0;
text-align: center;
margin: 0;
border:none;
background: none;
box-shadow: none;
color: rgba(51, 51, 51, 0.45);
}
@@ -0,0 +1,17 @@
.tilegrid-container .tilegrid-tile {
padding-bottom: 20px;
}
.tilegrid-container .tilegrid-tile div {
text-align: center;
}
.tilegrid-container .tilegrid-tile-title {
font-size: 12px;
line-height: 15px;
display: inline-block;
text-align: center;
}
.tilegrid-container .buy-interface-button {
margin-top: auto;
}
+357
View File
@@ -0,0 +1,357 @@
$(document).ready(function () {
$('body').addClass('module-appstore');
var appstore = {
storage: {}
};
appstore.search = $('#appstore-search');
appstore.categoryPage = $('.category-page');
appstore.categoryBlock = $('.appstore-categories');
appstore.popularBlock = $('.popular');
appstore.categoryBack = $('.category-page-back');
appstore.tabs = $('span.appstore-tab');
appstore.activePhrase = '';
appstore.activeCategory = '';
if($('#modulesJson').length > 0) {
appstore.storage.apps = JSON.parse($('#modulesJson').html());
}
appstore.tabs.on("click touch", function () {
var self = $(this);
appstore.tabs.removeClass('appstore-tab-active');
self.addClass('appstore-tab-active');
appTypeVisibility(self.data("filter"));
});
appstore.categoryBack.on("click touch", function () {
window.history.back();
});
if(appstore.categoryPage.length > 0){
$('#appstore .popular').hide();
}
/**
*
* @param {String} filter
*/
function appTypeVisibility(filter){
var overview = $('#appstore .overview'),
popularApps = overview.find('.popular'),
availableApps = overview.find('.available-apps')
if(filter === 'installed'){
popularApps.hide();
availableApps.hide();
}
if(filter === 'all'){
popularApps.show();
if(availableApps.children().length > 0){
availableApps.show();
}
}
if(appstore.categoryPage.length > 0){
popularApps.hide();
}
}
// Testversion anfragen
$('.testversion').on('click', function (e) {
e.preventDefault();
var hash = $(this).data('hash');
if (typeof hash == 'undefined') {
var $modulediv = $(this).parents('div.module').first();
hash = typeof $modulediv[0].id != 'undefined' ? $modulediv[0].id : $modulediv.id;
}
getanfrage(hash);
});
// Suchen beim Tippen im Suchfeld
appstore.search.on('keyup', function () {
appstore.activePhrase = $(this).val()
searchAppsByPhrase(appstore.activePhrase, appstore.activeCategory, appstore.categoryBlock, appstore.popularBlock);
});
/**
* Dropdown-Button
*/
$('.dropdown').each(function () {
var $container = $(this);
var $link = $container.children('a.dropdown-link');
var $sublinks = $container.find('a.dropdown-sublink');
var $caret = $link.children('.caret');
// Dropdown öffen/schließen
$caret.on('click', function (e) {
e.preventDefault();
$container.toggleClass('open');
});
// Dropdown schließen, wenn Fokus verloren geht
$link.on('focusout', function () {
setTimeout(function () {
$container.removeClass('open');
}, 300);
});
// Bei Button-Click: Dropdown öffnen, wenn Linkziel '#' ist; ansonsten Link folgen
$link.on('click', function (e) {
var linkTarget = $(this).attr('href');
if (linkTarget === '#') {
$container.addClass('open');
e.preventDefault();
}
});
// Dropdown-Links öffnen für iOs-Geräte
$sublinks.on('touchend', function (e) {
e.preventDefault();
var linkTarget = $(this).attr('href');
if (linkTarget !== '#') {
window.open(linkTarget);
}
setTimeout(function () {
$container.removeClass('open');
}, 300);
});
});
$('#anfragepopup').dialog(
{
modal: true,
autoOpen: false,
minWidth: 940,
title: 'Testmodul anfragen',
buttons: {
'Testmodul anfragen': function () {
if (!confirmAppTest(false)) {
confirmAppTest(true);
}
},
'Abbrechen': function () {
$(this).dialog('close');
}
},
close: function (event, ui) {
}
}
);
$('#anfrageokpopup').dialog(
{
modal: true,
autoOpen: false,
minWidth: 940,
title: 'Testmodul anfragen',
buttons: {
OK: function () {
$(this).dialog('close');
}
},
close: function (event, ui) {
}
}
);
$('a.activate').on('click', function (e) {
e.preventDefault();
$.ajax({
url: 'index.php?module=appstore&action=list&cmd=' +
($(this).hasClass('deactivate') ? 'deactivate' : 'activate'),
type: 'POST',
dataType: 'json',
data: {
module: $(this).data('module')
}
}).done(function (data) {
if (typeof data.status != 'undefined' && data.status == 1 && typeof data.module != 'undefined') {
var $moda = $('*').find('[data-module=\'' + data.module + '\']');
if ($moda.length) {
$($moda).toggleClass('activate');
$($moda).toggleClass('deactivate');
if ($($moda).hasClass('deactivate')) {
$($moda).html('Deaktivieren');
$($moda).parents('div.dropdown').first().find('a.dropdown-link').first().toggleClass(
'deactivated', false);
$($moda).parents('div.dropdown').first().find('a.dropdown-link').first().toggleClass(
'activated', true);
} else {
$($moda).html('Aktivieren');
$($moda).parents('div.dropdown').first().find('a.dropdown-link').first().toggleClass(
'deactivated', true);
$($moda).parents('div.dropdown').first().find('a.dropdown-link').first().toggleClass(
'activated', false);
}
}
} else if (typeof data.error != 'undefined') {
alert($data.error);
}
});
});
$('a.deactivate').on('click', function (e) {
e.preventDefault();
$.ajax({
url: 'index.php?module=appstore&action=list&cmd=' +
($(this).hasClass('deactivate') ? 'deactivate' : 'activate'),
type: 'POST',
dataType: 'json',
data: {
module: $(this).data('module')
}
}).done(function (data) {
if (typeof data.status != 'undefined' && data.status == 1 && typeof data.module != 'undefined') {
var $moda = $('*').find('[data-module=\'' + data.module + '\']');
if ($moda.length) {
$($moda).toggleClass('activate');
$($moda).toggleClass('deactivate');
if ($($moda).hasClass('deactivate')) {
$($moda).html('Deaktivieren');
$($moda).parents('div.dropdown').first().find('a.dropdown-link').first().toggleClass(
'deactivated', false);
$($moda).parents('div.dropdown').first().find('a.dropdown-link').first().toggleClass(
'activated', true);
} else {
$($moda).html('Aktivieren');
$($moda).parents('div.dropdown').first().find('a.dropdown-link').first().toggleClass(
'deactivated', true);
$($moda).parents('div.dropdown').first().find('a.dropdown-link').first().toggleClass(
'activated', false);
}
}
} else if (typeof data.error != 'undefined') {
alert($data.error);
}
});
});
});
function confirmAppTest(showError) {
var ok = false;
$.ajax({
url: 'index.php?module=appstore&action=list',
type: 'POST',
dataType: 'json',
async: false,
data: {modulbestaetigen: $('#anfragemd5').val(), testen: 1},
success: function (data) {
if (typeof data.html != 'undefined' && data.html != '') {
$('#anfragepopup').dialog('close');
$('#anfragemd5').val('');
$('#anfrageokpopup').dialog('open');
$('#anfrageoknachricht').html(data.html);
ok = true;
} else {
if (showError) {
$('#anfragepopup').dialog('close');
$('#anfragemd5').val('');
$('#anfrageokpopup').dialog('open');
$('#anfrageoknachricht').html(
'<div class="error">Es ist ein Fehler bei der Anfrage aufgetreten.</div>'
);
}
}
},
beforeSend: function () {
}
});
return ok;
}
function getanfrage(anfragemd5) {
$('#anfragemd5').val(anfragemd5);
$('#anfragepopup').dialog('open');
}
/**
*
* @param {String} phrase
* @param {String} category
* @param {jQuery} categoryBlock
* @param {jQuery} popularBlock
*/
function searchAppsByPhrase(phrase, category, categoryBlock, popularBlock) {
$.ajax({
url: 'index.php?module=appstore&action=list&cmd=suche',
type: 'POST',
dataType: 'json',
data: {
val: phrase,
category: category
}
})
.done(function (data) {
if (typeof data === 'undefined' || data === null) {
return;
}
if (typeof data.ausblenden !== 'undefined' && data.ausblenden !== null) {
$.each(data.ausblenden, function (k, v) {
if (k != '') {
$('#' + k).hide();
}
});
}
if (typeof data.anzeigen !== 'undefined' && data.anzeigen !== null) {
$.each(data.anzeigen, function (k, v) {
if (k != '') {
$('#' + k).show();
}
});
}
if (typeof data.katausblenden !== 'undefined' && data.katausblenden !== null) {
$.each(data.katausblenden, function (k, v) {
if (k != '') {
$('#' + k).hide();
}
});
}
if (typeof data.kateinblenden !== 'undefined' && data.kateinblenden !== null) {
$.each(data.kateinblenden, function (k, v) {
if (k != '') {
$('#' + k).show();
}
});
}
// Meldung anzeigen wenn keine Module gefunden wurden
if (typeof data.installiertgefunden !== 'undefined' && data.installiertgefunden !== null) {
if (parseInt(data.installiertgefunden) === 0) {
$('.purchases').hide();
} else {
$('.purchases').show();
}
}
// "Käufe" ein-/ausblenden
if (typeof data.kaufbargefunden !== 'undefined' && data.kaufbargefunden !== null) {
if (parseInt(data.kaufbargefunden) === 0) {
$('#no-apps-found').show();
} else {
$('#no-apps-found').hide();
}
}
if(phrase.length > 0){
categoryBlock.hide();
categoryBlock.prev('h2').hide();
popularBlock.hide();
} else {
categoryBlock.show();
categoryBlock.prev('h2').show();
popularBlock.show();
}
});
}
@@ -0,0 +1,548 @@
var AppstoreBuy = function ($) {
'use strict';
var me = {
storage: {
actualType: null,
oldValue: null,
newValue: null,
hubspot: null,
sent: null,
conversationValue: null,
campaignLabel: null
},
elem: {
$landingTotalPrice: null,
$landingTotalPriceTimespan: null,
$landingUserCounter: null,
$landingUserCounterPopup: null
},
updateKey: function () {
$.ajax({
url: 'index.php?module=welcome&action=start&cmd=updatekey',
type: 'POST',
dataType: 'text',
data: {},
success: function () {
$.ajax({
url: 'index.php?module=appstore&action=buy&cmd=getbuyinfo',
type: 'POST',
dataType: 'text',
data: {},
success: function () {
window.location.href = 'index.php?module=appstore&action=buy';
},
beforeSend: function () {
},
error: function () {
$('#modalbeta').parent().loadingOverlay('remove');
$('#tabs-1').loadingOverlay('remove');
}
});
}
});
},
bindUnBuyButton: function ($element) {
me.storage.oldValue = $($element).data('oldvalue');
me.storage.newValue = $($element).data('newvalue');
$('#unnewvalue').val(me.storage.newValue);
me.storage.price = parseFloat($($element).data('price'));
me.storage.actualType = $($element).data('type');
if (me.storage.actualType === 'delete_module' || me.storage.actualType === 'delete_all') {
$('#unnewvalue').hide();
} else {
$('#unnewvalue').show();
}
$('#modulunbuytext').html($($element).data('info'));
$('#modalunbuy').dialog('open');
},
buyFromDemoSend: function () {
$.ajax({
url: 'index.php?module=appstore&action=buy&cmd=buyfromdemo',
type: 'POST',
dataType: 'json',
data: {
company: $('#customercompany').val(),
email: $('#customeremail').val(),
name: $('#customername').val(),
street: $('#customerstreet').val(),
street2: $('#customeraddress2').val(),
zip: $('#customerzip').val(),
city: $('#customercity').val(),
country: $('#customercountry').val(),
bank: $('#customerbank').val(),
bankname: $('#customerbankname').val(),
iban: $('#customeriban').val(),
bic: $('#customerbic').val(),
user: $('#customeruser').val(),
lightuser: $('#customerlightuser').val(),
agreement: $('#customeragreement').prop('checked') ? 1 : 0,
change: ($('#buyfromdemo').length === 0) ? 1 : 0
},
success: function (data) {
me.storage.sent = true;
if (data.errorMessage !== undefined) {
me.setError(data);
}
if (data.status === 'OK') {
me.hubspotSend($('#buyversion').data('hubspoteventok'));
me.updateKey();
} else {
me.hubspotSend($('#buyversion').data('hubspoteventerror'));
//TODO remove loading
}
},
beforeSend: function () {
},
error: function () {
//TODO remove loading
}
});
me.hubspotSend($('#buyversion').data('hubspotevent'));
},
setError: function (error) {
var current, i, inputField,
errorMessage = 'Bitte ergänze die markierten Pflichtfelder',
$errorContainer = $('#buyversion').next('div'),
$errorHint = $errorContainer.find('.error-hint');
if (error.length === 0) {
return;
}
if (typeof error.errorMessage === 'string' || error.errorMessage instanceof String) {
errorMessage = error.errorMessage;
}
if ($errorHint.length > 0) {
$errorHint.html(errorMessage);
} else {
$errorContainer.append('<p class="error-hint">' + errorMessage + '</p>');
}
if (error.invalidFields === undefined || error.invalidFields.length === 0) {
return;
}
$('[id^="customer"]').removeClass('input-error');
for (i = 0; i < error.invalidFields.length; i++) {
current = error.invalidFields[i];
inputField = $('#customer' + current);
if (inputField.length > 0) {
inputField.addClass('input-error');
}
}
},
updateDataLayerScript: function() {
if($('#datalayerscript').length > 0) {
$('#datalayerscript').remove();
}
$('body').append(
'<script id="datalayerscript">\n' +
' dataLayer = [{\n' +
' \'conversionValue\': \'' + (me.storage.conversationValue) + '\'\n' +
' },' +
' {' +
' \'campaign\': \'' + (me.storage.campaignLabel) + '\'\n' +
' }];\n' +
'</script>'
);
},
initBuyVersion: function () {
var buyFromDemo = $('#buyfromdemo'),
buyVersionContainer = $('#buyversion');
if ($('.buy-licence-landingpage').length) {
buyVersionContainer.dialog(
{
modal: true,
autoOpen: false,
width: '70%',
title: '',
buttons: {
'Jetzt mieten': function () {
me.buyFromDemoSend();
}
},
close: function () {
if (me.storage.sent === null) {
me.hubspotSend($('#buyversion').data('hubspoteventabort'));
}
}
}
);
}
buyFromDemo.on('click', function () {
buyVersionContainer.dialog('open');
me.hubspotSend($(this).data('hubspotevent'), $('#customeruserdemo').val());
});
$('#changecustomerinfos').on('click', function () {
if ($('#buy-licence-landingpage').length > 0) {
me.storage.sent = null;
$('#buyversion').dialog('open');
} else {
me.storage.oldValue = $(this).data('oldvalue');
var diffuser = parseInt($('#customeruser').val());// - parseInt(me.storage.oldValue);
me.storage.newValue = diffuser;
$('#newvalue').val(me.storage.newValue);
me.storage.price = parseFloat($(this).data('price'));
me.storage.actualType = 'add_user';
$('#newvalue').hide();
$('#modulbuytext').html(
'Weitere ' + diffuser + ' mieten für ' + (me.storage.price * diffuser) + ' EUR pro Monat?');
$('#modalbuy').dialog('open');
}
});
if ($('#customerinfocontent').length === 0) {
$('#buyversion + .ui-dialog-buttonpane').append('<div class="buy-version-legal">' +
' <input type="checkbox" id="customeragreement">' +
' <label for="customeragreement"> Ich habe die' +
' <a href="index.php?module=dataprotection&action?list" title="Datenschutzbestimmungen" target="_blank">Datenschutzbestimmungen</a> gelesen und akzeptiere die' +
' <a href="https://xentral.com/agb" title="Allgemeine Geschäftsbedingungen" target="_blank">AGB</a>.' +
' </label>' +
' </div>');
}
me.hubspotSend($('#buyversion').data('hubspoteventinit'));
},
initLandingpage: function () {
if (me.elem.$landingUserCounter.length === 0) {
return;
}
me.storage.campaignLabel = me.elem.$landingTotalPrice.data('campaign') + '';
var initialCostPerUser = parseInt(me.elem.$landingTotalPrice.data('userprice')),
cloudPrice = parseInt(me.elem.$landingCloudPricePopup.data('cloudprice')),
numberOfUser = parseInt($('#customeruserdemo').val());
me.setUserLicencePrice(numberOfUser, initialCostPerUser, cloudPrice);
me.elem.$landingUserCounter.on('change', function () {
numberOfUser = parseInt(this.value);
me.setUserLicencePrice(numberOfUser, initialCostPerUser, cloudPrice);
});
me.elem.$landingUserCounterPopup.on('change', function () {
numberOfUser = parseInt(this.value);
me.setUserLicencePrice(numberOfUser, initialCostPerUser, cloudPrice);
});
},
/**
*
* @param {Number} numberOfUser
* @param {Number} initialCostPerUser
* @param {Number} cloudPrice
*/
setUserLicencePrice: function (numberOfUser, initialCostPerUser, cloudPrice) {
if (isNaN(numberOfUser)) {
numberOfUser = 0;
}
if (isNaN(initialCostPerUser)) {
initialCostPerUser = 0;
}
if (isNaN(cloudPrice)) {
cloudPrice = 0;
}
me.storage.conversationValue = numberOfUser * initialCostPerUser + cloudPrice;
me.elem.$landingTotalPrice.html(me.storage.conversationValue);
if (me.elem.$landingTotalPricePopup !== null) {
me.elem.$landingTotalPricePopup.html(me.storage.conversationValue);
}
me.elem.$landingTotalPriceTimespan.html(numberOfUser + ' User/Monat');
me.elem.$landingTotalPriceTimespanPopup.html(numberOfUser + ' User/Monat');
me.updateDataLayerScript();
},
hubspotSend: function (eventName, value) {
if (me.storage.hubspot === null) {
return;
}
if (value === undefined || value === null) {
me.storage.hubspot.push(['trackEvent', {id: eventName}]);
return;
}
me.storage.hubspot.push(['trackEvent', {id: eventName, value: value}]);
},
init: function () {
$('#fieldsetmodules').hide();
if ($('.buy-licence-landingpage').length > 0
&& $('.buy-licence-landingpage').data('hubspotactive') + '' === '1') {
me.storage.hubspot = window._hsq = window._hsq || [];
}
me.elem.$landingTotalPrice = $('#landing-total-price');
me.elem.$landingTotalPricePopup = $('#landing-total-price-popup');
me.elem.$landingTotalPriceTimespan = $('#landing-total-price-timespan');
me.elem.$landingTotalPriceTimespanPopup = $('#landing-total-price-timespan-popup');
me.elem.$landingCloudPricePopup = $('#landing-cloud-price');
me.elem.$landingUserCounter = $('.buy-licence-landingpage .counter-component input');
me.elem.$landingUserCounterPopup = $('#buyversion .counter-component input');
$('#customeruserdemo').on('change', function () {
$('#customeruser').val($(this).val());
$('#customeruser').trigger('change');
});
$('#customeruser').on('change', function () {
if ($('#customeruserdemo').length > 0) {
$('#customeruserdemo').val($(this).val());
}
});
me.initLandingpage();
if ($('#buyversion').length > 0) {
me.initBuyVersion();
}
if ($('#changecustomerinfos').length > 0) {
$('#customerInfoTable').append(
'<input checked hidden style="display: none" type="checkbox" id="customeragreement">');
}
$('#unbuylightuser').hide();
$('#unbuyuser').hide();
$.ajax({
url: 'index.php?module=appstore&action=buy&cmd=getbuyinfo',
type: 'POST',
dataType: 'json',
data: {},
success: function (data) {
$('#buyed').html(data.data);
$('#buyed').find('input.unbuybutton').on('click', function () {
me.bindUnBuyButton($(this));
});
if (typeof data.user != 'undefined') {
$('#unbuyuser').show();
$('#unbuyuser').data('oldvalue', data.user);
if (data.user !== data.maxuser) {
$('#usercount').attr('disabled', 'disabled');
$('#unbuyuser').attr('disabled', 'disabled');
}
} else {
$('#unbuyuser').hide();
}
if (typeof data.lightuser != 'undefined') {
$('#unbuylightuser').show();
$('#unbuylightuser').data('oldvalue', data.lightuser);
if (data.lightuser !== data.maxlightuser) {
$('#lightusercount').attr('disabled', 'disabled');
$('#unbuylightuser').attr('disabled', 'disabled');
}
} else {
$('#unbuylightuser').hide();
}
if (typeof data.customerinfo != 'undefined') {
$('#customercompany').val(data.name);
$('#customeremail').val(data.email);
$('#customerstreet').val(data.strasse);
$('#customername').val(data.ansprechpartner);
$('#customeraddress2').val(data.adresszusatz);
$('#customerzip').val(data.plz);
$('#customercity').val(data.ort);
$('#customercountry').val(data.land);
$('#customerbankname').val(data.inhaber);
$('#customerbank').val(data.bank);
$('#customerbic').val(data.swift);
$('#customeriban').val(data.iban);
//$('#customeruser').val(data.maxuser);
//$('#customerinfocontent').html(data.customerinfo);
}
if (data.data !== '') {
$('#buyedmodule').html(data.data);
$('#fieldsetmodules').show();
}
}
});
$('#modalbeta').dialog(
{
modal: true,
autoOpen: false,
width: '70%',
title: '',
buttons: {
'Ja ich möchte immer Zugriff auf die nächste Beta Version haben': function () {
$('#modalbeta').parent().loadingOverlay();
$.ajax({
url: 'index.php?module=appstore&action=buy&cmd=activatebeta',
type: 'POST',
dataType: 'json',
data: {},
success: function (data) {
if (data.status === 'OK') {
me.updateKey();
} else {
$('#modalbeta').parent().loadingOverlay('remove');
}
},
beforeSend: function () {
},
error: function () {
$('#modalbeta').parent().loadingOverlay('remove');
}
});
}
}
}
);
$('#modalunbuy').dialog(
{
modal: true,
autoOpen: false,
width: '70%',
title: '',
buttons: {
Abbrechen: function () {
$(this).dialog('close');
},
'Kündigen': function () {
if (me.storage.actualType !== 'delete_module') {
me.storage.newValue = parseInt($('#unnewvalue').val());
}
if (me.storage.actualType === 'delete_module' || me.storage.actualType === 'delete_all' ||
me.storage.newValue > 0) {
if (confirm('Wirklich kündigen?')) {
$('#modalunbuy').parent().loadingOverlay();
$.ajax({
url: 'index.php?module=appstore&action=buy&cmd=sendbuy',
type: 'POST',
dataType: 'json',
data: {
old: me.storage.oldValue,
new: me.storage.actualType !== 'delete_module'
? me.storage.oldValue - me.storage.newValue : me.storage.newValue,
field: me.storage.actualType
},
success: function (data) {
if (typeof data.error != 'undefined') {
alert(data.error);
$('#modalunbuy').parent().loadingOverlay('remove');
return;
}
if (typeof data.url != 'undefined') {
me.updateKey();
}
},
beforeSend: function () {
},
error: function () {
$('#modalunbuy').parent().loadingOverlay('remove');
}
});
}
}
}
},
close: function (event, ui) {
}
});
$('#modalbuy').dialog(
{
modal: true,
autoOpen: false,
width: '50%',
title: '',
buttons: {
Abbrechen: function () {
$(this).dialog('close');
},
Mieten: function () {
if (me.storage.actualType !== 'add_module') {
me.storage.newValue = parseInt($('#newvalue').val());
}
if (me.storage.actualType === 'add_module' || me.storage.newValue > 0) {
if (confirm('Wirklich für ' + (
Number.parseFloat(me.storage.price
* (me.storage.actualType === 'add_module' ? 1 : me.storage.newValue)).toFixed(2)
) + ' EUR mieten?')) {
$('#modalbuy').parent().loadingOverlay();
$.ajax({
url: 'index.php?module=appstore&action=buy&cmd=sendbuy',
type: 'POST',
dataType: 'json',
data: {
old: me.storage.oldValue,
new: me.storage.actualType !== 'add_module'
? me.storage.oldValue + me.storage.newValue : me.storage.newValue,
field: me.storage.actualType
},
success: function (data) {
if (typeof data.error != 'undefined') {
alert(data.error);
$('#modalbuy').parent().loadingOverlay('remove');
return;
}
if (typeof data.url != 'undefined') {
me.updateKey();
}
},
beforeSend: function () {
},
error: function () {
$('#modalbuy').parent().loadingOverlay('remove');
}
});
}
}
}
},
close: function (event, ui) {
}
});
$('input.buybutton').on('click', function () {
me.bindBuyButton(this);
});
$('a.buybutton').on('click', function () {
me.bindBuyButton(this);
});
$('input.unbuybutton').on('click', function () {
me.bindUnBuyButton($(this));
});
$('input.buybutton.autoopen').trigger('click');
},
bindBuyButton: function(element)
{
me.storage.oldValue = $(element).data('oldvalue');
me.storage.newValue = $(element).data('newvalue');
$('#newvalue').val(me.storage.newValue);
me.storage.price = parseFloat($(element).data('price'));
me.storage.actualType = $(element).data('type');
if (me.storage.actualType === 'add_module') {
$('#newvalue').hide();
} else {
$('#newvalue').show();
}
$('#modulbuytext').html($(element).data('info'));
$('#modalbuy').dialog('open');
}
};
return {
init: me.init
};
}(jQuery);
$(document).ready(function () {
AppstoreBuy.init();
});