Commit b5866929 authored by Patrick Müller's avatar Patrick Müller

Revert "Merge branch 'dev' of https://dev.quiqqer.com/quiqqer/quiqqer into dev"

This reverts commit 3a3d7e69
parent 3a3d7e69
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
* Create a new project * Create a new project
* *
* @param string $params - JSON Array * @param string $params - JSON Array
*
* @return string - Name of the project * @return string - Name of the project
*/ */
QUI::$Ajax->registerFunction( QUI::$Ajax->registerFunction(
...@@ -17,25 +16,6 @@ QUI::$Ajax->registerFunction( ...@@ -17,25 +16,6 @@ QUI::$Ajax->registerFunction(
$params['lang'] $params['lang']
); );
if (isset($params['template']) && !empty($params['template'])) {
$Config = QUI::getProjectManager()->getConfig();
$installedTemplates = QUI::getPackageManager()->getInstalled([
'type' => 'quiqqer-template'
]);
$template = $params['template'];
$template = \QUI\Utils\Security\Orthos::removeHTML($template);
$template = \QUI\Utils\Security\Orthos::clearPath($template);
$Config->set($Project->getName(), 'template', $template);
$Config->save();
}
if (isset($params['demodata']) && $params['demodata']) {
\QUI\Utils\Project::applyDemoDataToProject($Project, $template);
}
return $Project->getName(); return $Project->getName();
}, },
['params'], ['params'],
......
...@@ -58,16 +58,6 @@ ...@@ -58,16 +58,6 @@
</select> </select>
</td> </td>
</tr> </tr>
<tr class="even">
<td>
<label for="">
{t}quiqqer/system demodata.project.label.template{/t}
</label>
</td>
<td>
<input type="checkbox" name="demodata" />
</td>
</tr>
</tbody> </tbody>
</table> </table>
......
...@@ -3,8 +3,11 @@ ...@@ -3,8 +3,11 @@
* *
* @module DownloadManager * @module DownloadManager
* @author www.pcsg.de (Henning Leutz) * @author www.pcsg.de (Henning Leutz)
*
* @require classes/request/Downloads
*/ */
define('DownloadManager', ['classes/request/Downloads'], function (DownloadManager) {
define(['classes/request/Downloads'], function (DownloadManager) {
"use strict"; "use strict";
return new DownloadManager(); return new DownloadManager();
......
...@@ -3,8 +3,9 @@ ...@@ -3,8 +3,9 @@
* *
* @module UploadManager * @module UploadManager
* @author www.pcsg.de (Henning Leutz) * @author www.pcsg.de (Henning Leutz)
* @require controls/upload/Manager
*/ */
define('UploadManager', ['controls/upload/Manager'], function (UploadManager) { define(['controls/upload/Manager'], function (UploadManager) {
"use strict"; "use strict";
return new UploadManager(); return new UploadManager();
......
...@@ -155,10 +155,9 @@ define('classes/projects/Manager', [ ...@@ -155,10 +155,9 @@ define('classes/projects/Manager', [
* @param {String} project * @param {String} project
* @param {String} lang * @param {String} lang
* @param {String} template * @param {String} template
* @param demodata
* @param {Function} [onfinish] * @param {Function} [onfinish]
*/ */
createNewProject: function (project, lang, template, demodata, onfinish) { createNewProject: function (project, lang, template, onfinish) {
var self = this; var self = this;
this.$getList = null; this.$getList = null;
...@@ -174,8 +173,7 @@ define('classes/projects/Manager', [ ...@@ -174,8 +173,7 @@ define('classes/projects/Manager', [
params: JSON.encode({ params: JSON.encode({
project : project, project : project,
lang : lang, lang : lang,
template: template, template: template
demodata: demodata
}) })
}); });
}, },
......
This diff is collapsed.
...@@ -270,7 +270,6 @@ define('controls/projects/Manager', [ ...@@ -270,7 +270,6 @@ define('controls/projects/Manager', [
Form.elements.project.value, Form.elements.project.value,
Form.elements.lang.value, Form.elements.lang.value,
Form.elements.template.value, Form.elements.template.value,
Form.elements.demodata.value,
function (result) { function (result) {
self.Loader.hide(); self.Loader.hide();
......
...@@ -64,26 +64,4 @@ ...@@ -64,26 +64,4 @@
line-height: 36px !important; line-height: 36px !important;
margin: 0 !important; margin: 0 !important;
width: 40px !important; width: 40px !important;
}
.quiqqer-project-panel .qui-panel-icon {
display: none;
}
.quiqqer-project-panel h2.qui-panel-title {
padding-left: 10px;
}
.quiqqer-project-panel-button-home {
width: 40px;
}
.quiqqer-project-panel-button-home .image-container {
float: left;
text-align: center;
width: 100%;
}
.quiqqer-project-panel-button-home .image-container span {
float: none;
} }
\ No newline at end of file
...@@ -68,7 +68,7 @@ define('controls/projects/project/Panel', [ ...@@ -68,7 +68,7 @@ define('controls/projects/project/Panel', [
name : 'projects-panel', name : 'projects-panel',
project: false, project: false,
lang : false, lang : false,
icon : false icon : 'fa fa-home'
}); });
this.parent(options); this.parent(options);
...@@ -79,18 +79,18 @@ define('controls/projects/project/Panel', [ ...@@ -79,18 +79,18 @@ define('controls/projects/project/Panel', [
title: Locale.get('quiqqer/system', 'projects.project.panel.title') title: Locale.get('quiqqer/system', 'projects.project.panel.title')
}); });
this.$Map = null; this.$Map = null;
this.$projectmaps = {}; this.$projectmaps = {};
this.$Filter = null; this.$Filter = null;
this.$Button = null; this.$Button = null;
this.$ProjectList = null; this.$ProjectList = null;
this.$ProjectContainer = null; this.$ProjectContainer = null;
this.$ProjectSearch = null; this.$ProjectSearch = null;
this.$ProjectContent = null; this.$ProjectContent = null;
this.$LanguageSelect = null; this.$LanguageSelect = null;
this.$MediaButton = null; this.$MediaButton = null;
this.$__fx_run = false; this.$__fx_run = false;
...@@ -150,8 +150,6 @@ define('controls/projects/project/Panel', [ ...@@ -150,8 +150,6 @@ define('controls/projects/project/Panel', [
var self = this, var self = this,
Content = this.getContent(); Content = this.getContent();
this.getElm().addClass('quiqqer-project-panel');
Content.set( Content.set(
'html', 'html',
...@@ -165,9 +163,9 @@ define('controls/projects/project/Panel', [ ...@@ -165,9 +163,9 @@ define('controls/projects/project/Panel', [
Content.setStyle('opacity', 0); Content.setStyle('opacity', 0);
this.$ProjectContainer = Content.getElement('.project-container'); this.$ProjectContainer = Content.getElement('.project-container');
this.$ProjectList = Content.getElement('.project-list'); this.$ProjectList = Content.getElement('.project-list');
this.$ProjectSearch = Content.getElement('.project-search'); this.$ProjectSearch = Content.getElement('.project-search');
this.$ProjectContent = Content.getElement('.project-content'); this.$ProjectContent = Content.getElement('.project-content');
this.$ProjectContainer.setStyles({ this.$ProjectContainer.setStyles({
height: 'calc(100% - 40px)' height: 'calc(100% - 40px)'
...@@ -307,7 +305,7 @@ define('controls/projects/project/Panel', [ ...@@ -307,7 +305,7 @@ define('controls/projects/project/Panel', [
// title button // title button
this.$Button = new QUIButton({ this.$Button = new QUIButton({
name : 'projects', name : 'projects',
icon : 'fa fa-home', image : 'fa fa-arrow-circle-left',
title : Locale.get('quiqqer/system', 'projects.project.panel.projectSelect'), title : Locale.get('quiqqer/system', 'projects.project.panel.projectSelect'),
events: { events: {
onClick: function (Btn, event) { onClick: function (Btn, event) {
...@@ -334,7 +332,6 @@ define('controls/projects/project/Panel', [ ...@@ -334,7 +332,6 @@ define('controls/projects/project/Panel', [
} }
self.createList(); self.createList();
self.open();
} }
} }
}).inject(this.getHeader(), 'top'); }).inject(this.getHeader(), 'top');
...@@ -342,7 +339,6 @@ define('controls/projects/project/Panel', [ ...@@ -342,7 +339,6 @@ define('controls/projects/project/Panel', [
this.$Button.getElm().removeClass('qui-button'); this.$Button.getElm().removeClass('qui-button');
this.$Button.getElm().addClass('button'); this.$Button.getElm().addClass('button');
this.$Button.getElm().addClass('btn-blue'); this.$Button.getElm().addClass('btn-blue');
this.$Button.getElm().addClass('quiqqer-project-panel-button-home');
}, },
/** /**
...@@ -370,26 +366,24 @@ define('controls/projects/project/Panel', [ ...@@ -370,26 +366,24 @@ define('controls/projects/project/Panel', [
self.openProject(); self.openProject();
self.Loader.hide(); self.Loader.hide();
return; return;
} else { } else if (Object.getLength(result)) {
if (Object.getLength(result)) { for (key in result) {
for (key in result) { if (!result.hasOwnProperty(key)) {
if (!result.hasOwnProperty(key)) { continue;
continue; }
}
if (result[key].standard !== "1") {
continue;
}
self.setAttribute('project', key); if (result[key].standard !== "1") {
self.setAttribute('lang', result[key].default_lang); continue;
break;
} }
self.openProject(); self.setAttribute('project', key);
self.Loader.hide(); self.setAttribute('lang', result[key].default_lang);
return; break;
} }
self.openProject();
self.Loader.hide();
return;
} }
// no projects exists // no projects exists
...@@ -682,7 +676,7 @@ define('controls/projects/project/Panel', [ ...@@ -682,7 +676,7 @@ define('controls/projects/project/Panel', [
onChildClick : this.$openSitePanel, onChildClick : this.$openSitePanel,
onChildContextMenu: function (Item, MapItem, event) { onChildContextMenu: function (Item, MapItem, event) {
var title = MapItem.getAttribute('text') + ' - ' + var title = MapItem.getAttribute('text') + ' - ' +
MapItem.getAttribute('value'); MapItem.getAttribute('value');
MapItem.getContextMenu().setTitle(title).setPosition( MapItem.getContextMenu().setTitle(title).setPosition(
event.page.x, event.page.x,
......
/** /**
* @module controls/users/Login * @module controls/users/Login
* *
* @event onLoad [self] * @event onLoad
* @event onAuthBegin [self] * @event onAuthBegin
* @event onAuthNext [self] * @event onAuthNext
* @event onSuccess [self] * @event onSuccess
* @event onUserLoginError [error, self] * @event onAuthNext
* * @event onUserLoginError [error, this]
* @event onQuiqqerUserAuthLoginLoad [self]
* @event onQuiqqerUserAuthLoginUserLoginError [error, self]
* @event onQuiqqerUserAuthLoginAuthBegin [self]
* @event onQuiqqerUserAuthLoginSuccess [self]
* @event onQuiqqerUserAuthNext [self]
*/ */
define('controls/users/Login', [ define('controls/users/Login', [
...@@ -96,7 +91,6 @@ define('controls/users/Login', [ ...@@ -96,7 +91,6 @@ define('controls/users/Login', [
QUIAjax.get('ajax_users_loginControl', function (result) { QUIAjax.get('ajax_users_loginControl', function (result) {
self.$buildAuthenticator(result).then(function () { self.$buildAuthenticator(result).then(function () {
self.fireEvent('load', [self]); self.fireEvent('load', [self]);
QUI.fireEvent('quiqqerUserAuthLoginLoad', [self]);
}); });
}, { }, {
isAdminLogin : typeof QUIQQER_IS_ADMIN_LOGIN !== 'undefined' ? 1 : 0, isAdminLogin : typeof QUIQQER_IS_ADMIN_LOGIN !== 'undefined' ? 1 : 0,
...@@ -117,7 +111,6 @@ define('controls/users/Login', [ ...@@ -117,7 +111,6 @@ define('controls/users/Login', [
this.$refreshForm(); this.$refreshForm();
this.fireEvent('load', [this]); this.fireEvent('load', [this]);
QUI.fireEvent('quiqqerUserAuthLoginLoad', [this]);
}, },
/** /**
...@@ -149,7 +142,6 @@ define('controls/users/Login', [ ...@@ -149,7 +142,6 @@ define('controls/users/Login', [
this.auth(Target).catch(function (err) { this.auth(Target).catch(function (err) {
self.fireEvent('userLoginError', [err, self]); self.fireEvent('userLoginError', [err, self]);
QUI.fireEvent('quiqqerUserAuthLoginUserLoginError', [err, self]);
}); });
}.bind(this) }.bind(this)
} }
...@@ -233,7 +225,6 @@ define('controls/users/Login', [ ...@@ -233,7 +225,6 @@ define('controls/users/Login', [
} }
this.fireEvent('authBegin', [this]); this.fireEvent('authBegin', [this]);
QUI.fireEvent('quiqqerUserAuthLoginAuthBegin', [this]);
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
QUIAjax.post('ajax_users_login', function (result) { QUIAjax.post('ajax_users_login', function (result) {
...@@ -242,7 +233,6 @@ define('controls/users/Login', [ ...@@ -242,7 +233,6 @@ define('controls/users/Login', [
window.QUIQQER_USER = result.user; window.QUIQQER_USER = result.user;
self.fireEvent('success', [self]); self.fireEvent('success', [self]);
QUI.fireEvent('quiqqerUserAuthLoginSuccess', [self]);
resolve(self); resolve(self);
if (typeof self.getAttribute('onSuccess') === 'function') { if (typeof self.getAttribute('onSuccess') === 'function') {
...@@ -287,8 +277,7 @@ define('controls/users/Login', [ ...@@ -287,8 +277,7 @@ define('controls/users/Login', [
), ),
onError : function (e) { onError : function (e) {
self.Loader.hide(); self.Loader.hide();
self.fireEvent('authNext', [self]); self.fireEvent('authNext', [this]);
QUI.fireEvent('quiqqerUserAuthNext', [self]);
reject(e); reject(e);
} }
......
...@@ -4,7 +4,10 @@ ...@@ -4,7 +4,10 @@
* @author www.pcsg.de (Henning Leutz) * @author www.pcsg.de (Henning Leutz)
* @module controls/users/LogoutWindow * @module controls/users/LogoutWindow
* *
* @event onQuiqqerUserAuthLogout * @require qui/QUI
* @require qui/controls/windows/Confirm
* @require controls/users/Login
* @require Locale
*/ */
define('controls/users/LogoutWindow', [ define('controls/users/LogoutWindow', [
...@@ -61,8 +64,6 @@ define('controls/users/LogoutWindow', [ ...@@ -61,8 +64,6 @@ define('controls/users/LogoutWindow', [
this.Loader.show(); this.Loader.show();
Ajax.post('ajax_users_logout', function () { Ajax.post('ajax_users_logout', function () {
QUI.fireEvent('quiqqerUserAuthLogout');
if (window.location.hash !== '') { if (window.location.hash !== '') {
window.location.reload(); window.location.reload();
return; return;
......
...@@ -64,7 +64,6 @@ ...@@ -64,7 +64,6 @@
"quiqqer\/fontawesome": "*", "quiqqer\/fontawesome": "*",
"quiqqer\/backendsearch": "1.*|dev-master|dev-dev", "quiqqer\/backendsearch": "1.*|dev-master|dev-dev",
"quiqqer\/requirements": "2.*", "quiqqer\/requirements": "2.*",
"quiqqer\/demodata":"^1.0|dev-master|dev-dev",
"npm-asset\/intl": "1.*", "npm-asset\/intl": "1.*",
"npm-asset\/nouislider": "*", "npm-asset\/nouislider": "*",
"npm-asset\/mustache": "2.*", "npm-asset\/mustache": "2.*",
......
...@@ -71,15 +71,19 @@ HEAD; ...@@ -71,15 +71,19 @@ HEAD;
$geoIPSettings = <<<GEO $geoIPSettings = <<<GEO
### SET GEOIP Variables ### ### SET GEOIP Variables ###
#fastcgi_param GEOIP_COUNTRY_CODE \$geoip2_data_country_code; #fastcgi_param GEOIP_COUNTRY_CODE \$geoip_country_code;
#fastcgi_param GEOIP_COUNTRY_NAME \$geoip2_data_country_name; #fastcgi_param GEOIP_COUNTRY_CODE3 \$geoip_country_code3;
#fastcgi_param GEOIP_CITY_COUNTRY_CODE \$geoip2_data_city_country_code; #fastcgi_param GEOIP_COUNTRY_NAME \$geoip_country_name;
#fastcgi_param GEOIP_CITY_COUNTRY_NAME \$geoip2_data_city_country_name;
#fastcgi_param GEOIP_CITY \$geoip2_data_city_name; #fastcgi_param GEOIP_CITY_COUNTRY_CODE \$geoip_city_country_code;
#fastcgi_param GEOIP_POSTAL_CODE \$geoip2_data_postal_code; #fastcgi_param GEOIP_CITY_COUNTRY_CODE3 \$geoip_city_country_code3;
#fastcgi_param GEOIP_CITY_CONTINENT_CODE \$geoip2_data_continent_code; #fastcgi_param GEOIP_CITY_COUNTRY_NAME \$geoip_city_country_name;
#fastcgi_param GEOIP_LATITUDE \$geoip2_data_location_longitude; #fastcgi_param GEOIP_REGION \$geoip_region;
#fastcgi_param GEOIP_LONGITUDE \$geoip2_data_postal_code; #fastcgi_param GEOIP_CITY \$geoip_city;
#fastcgi_param GEOIP_POSTAL_CODE \$geoip_postal_code;
#fastcgi_param GEOIP_CITY_CONTINENT_CODE \$geoip_city_continent_code;
#fastcgi_param GEOIP_LATITUDE \$geoip_latitude;
#fastcgi_param GEOIP_LONGITUDE \$geoip_longitude;
GEO; GEO;
file_put_contents($this->subConfDir."php.include", $geoIPSettings, FILE_APPEND); file_put_contents($this->subConfDir."php.include", $geoIPSettings, FILE_APPEND);
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
namespace QUI\Utils; namespace QUI\Utils;
use QUI; use QUI;
use QUI\Demodata\Parser\DemoDataParser;
/** /**
* Class Project * Class Project
...@@ -53,6 +52,7 @@ class Project ...@@ -53,6 +52,7 @@ class Project
$First->save(); $First->save();
} }
// Search // Search
$searchType = 'quiqqer/sitetypes:types/search'; $searchType = 'quiqqer/sitetypes:types/search';
...@@ -62,17 +62,17 @@ class Project ...@@ -62,17 +62,17 @@ class Project
} catch (QUI\Exception $Exception) { } catch (QUI\Exception $Exception) {
} }
$search = $Project->getSitesIds([ $search = $Project->getSitesIds(array(
'where' => [ 'where' => array(
'active' => -1, 'active' => -1,
'type' => $searchType 'type' => $searchType
], ),
'limit' => 1 'limit' => 1
]); ));
if (empty($search)) { if (empty($search)) {
try { try {
$searchId = $First->createChild([ $searchId = $First->createChild(array(
'name' => self::parseForUrl( 'name' => self::parseForUrl(
'quiqqer/quiqqer', 'quiqqer/quiqqer',
'projects.defaultstructure.search.name', 'projects.defaultstructure.search.name',
...@@ -83,7 +83,7 @@ class Project ...@@ -83,7 +83,7 @@ class Project
'projects.defaultstructure.search.title', 'projects.defaultstructure.search.title',
$Project $Project
) )
]); ));
$Search = new QUI\Projects\Site\Edit($Project, $searchId); $Search = new QUI\Projects\Site\Edit($Project, $searchId);
$Search->setAttribute('type', $searchType); $Search->setAttribute('type', $searchType);
...@@ -94,18 +94,19 @@ class Project ...@@ -94,18 +94,19 @@ class Project
} }
} }
// Im print / legalnotes / Impressum // Im print / legalnotes / Impressum
$legalNotes = $Project->getSitesIds([ $legalNotes = $Project->getSitesIds(array(
'where' => [ 'where' => array(
'active' => -1, 'active' => -1,
'type' => 'quiqqer/sitetypes:types/legalnotes' 'type' => 'quiqqer/sitetypes:types/legalnotes'
], ),
'limit' => 1 'limit' => 1
]); ));
if (empty($legalNotes)) { if (empty($legalNotes)) {
try { try {
$legalNoteId = $First->createChild([ $legalNoteId = $First->createChild(array(
'name' => self::parseForUrl( 'name' => self::parseForUrl(
'quiqqer/quiqqer', 'quiqqer/quiqqer',
'projects.defaultstructure.legalnotes.name', 'projects.defaultstructure.legalnotes.name',
...@@ -116,7 +117,7 @@ class Project ...@@ -116,7 +117,7 @@ class Project
'projects.defaultstructure.legalnotes.name', 'projects.defaultstructure.legalnotes.name',
$Project $Project
) )
]); ));
$Legal = new QUI\Projects\Site\Edit($Project, $legalNoteId); $Legal = new QUI\Projects\Site\Edit($Project, $legalNoteId);
$Legal->setAttribute('type', 'quiqqer/sitetypes:types/legalnotes'); $Legal->setAttribute('type', 'quiqqer/sitetypes:types/legalnotes');
...@@ -128,17 +129,17 @@ class Project ...@@ -128,17 +129,17 @@ class Project
} }
// AGB / generalTermsAndConditions // AGB / generalTermsAndConditions
$generalTermsAndConditions = $Project->getSitesIds([ $generalTermsAndConditions = $Project->getSitesIds(array(
'where' => [ 'where' => array(
'active' => -1, 'active' => -1,
'type' => 'quiqqer/sitetypes:types/generalTermsAndConditions' 'type' => 'quiqqer/sitetypes:types/generalTermsAndConditions'
], ),
'limit' => 1 'limit' => 1
]); ));
if (empty($generalTermsAndConditions)) { if (empty($generalTermsAndConditions)) {
try { try {
$generalTermsAndConditionsId = $First->createChild([ $generalTermsAndConditionsId = $First->createChild(array(
'name' => self::parseForUrl( 'name' => self::parseForUrl(
'quiqqer/quiqqer', 'quiqqer/quiqqer',
'projects.defaultstructure.generalTermsAndConditions.name', 'projects.defaultstructure.generalTermsAndConditions.name',
...@@ -149,7 +150,7 @@ class Project ...@@ -149,7 +150,7 @@ class Project
'projects.defaultstructure.generalTermsAndConditions.name', 'projects.defaultstructure.generalTermsAndConditions.name',
$Project $Project
) )
]); ));
$GTC = new QUI\Projects\Site\Edit($Project, $generalTermsAndConditionsId); $GTC = new QUI\Projects\Site\Edit($Project, $generalTermsAndConditionsId);
$GTC->setAttribute('type', 'quiqqer/sitetypes:types/generalTermsAndConditions'); $GTC->setAttribute('type', 'quiqqer/sitetypes:types/generalTermsAndConditions');
...@@ -160,18 +161,19 @@ class Project ...@@ -160,18 +161,19 @@ class Project
} }
} }
// Datenschutzerklärung / privacypolicy // Datenschutzerklärung / privacypolicy
$privacyPolicy = $Project->getSitesIds([ $privacyPolicy = $Project->getSitesIds(array(
'where' => [ 'where' => array(
'active' => -1, 'active' => -1,
'type' => 'quiqqer/sitetypes:types/privacypolicy' 'type' => 'quiqqer/sitetypes:types/privacypolicy'
], ),
'limit' => 1 'limit' => 1
]); ));
if (empty($privacyPolicy)) { if (empty($privacyPolicy)) {
try { try {
$privacyPolicyId = $First->createChild([ $privacyPolicyId = $First->createChild(array(
'name' => self::parseForUrl( 'name' => self::parseForUrl(