Verified Commit fb9af1f6 authored by Jan Wennrich's avatar Jan Wennrich 🎓

feat: reworked project side-panel header (#800)

parent 311415d2
...@@ -64,4 +64,26 @@ ...@@ -64,4 +64,26 @@
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 : 'fa fa-home' icon : false
}); });
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,6 +150,8 @@ define('controls/projects/project/Panel', [ ...@@ -150,6 +150,8 @@ 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',
...@@ -163,9 +165,9 @@ define('controls/projects/project/Panel', [ ...@@ -163,9 +165,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)'
...@@ -305,7 +307,7 @@ define('controls/projects/project/Panel', [ ...@@ -305,7 +307,7 @@ define('controls/projects/project/Panel', [
// title button // title button
this.$Button = new QUIButton({ this.$Button = new QUIButton({
name : 'projects', name : 'projects',
image : 'fa fa-arrow-circle-left', icon : 'fa fa-home',
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) {
...@@ -339,6 +341,7 @@ define('controls/projects/project/Panel', [ ...@@ -339,6 +341,7 @@ 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');
}, },
/** /**
...@@ -366,24 +369,26 @@ define('controls/projects/project/Panel', [ ...@@ -366,24 +369,26 @@ define('controls/projects/project/Panel', [
self.openProject(); self.openProject();
self.Loader.hide(); self.Loader.hide();
return; return;
} else if (Object.getLength(result)) { } else {
for (key in result) { if (Object.getLength(result)) {
if (!result.hasOwnProperty(key)) { for (key in result) {
continue; if (!result.hasOwnProperty(key)) {
} continue;
}
if (result[key].standard !== "1") {
continue;
}
if (result[key].standard !== "1") { self.setAttribute('project', key);
continue; self.setAttribute('lang', result[key].default_lang);
break;
} }
self.setAttribute('project', key); self.openProject();
self.setAttribute('lang', result[key].default_lang); self.Loader.hide();
break; return;
} }
self.openProject();
self.Loader.hide();
return;
} }
// no projects exists // no projects exists
...@@ -676,7 +681,7 @@ define('controls/projects/project/Panel', [ ...@@ -676,7 +681,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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment