Skip to content
Code-Schnipsel Gruppen Projekte
Commit 98fbc3a8 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

vererbung fix

Übergeordneter 91ce2365
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -6,9 +6,16 @@
* @module package/quiqqer/bricks/bin/BrickAreas
* @author www.pcsg.de (Henning Leutz)
*
* @require qui/QUI
* @require qui/controls/Control
* @require qui/controls/buttons/Button
* @require package/quiqqer/bricks/bin/AreaWindow
* @require Ajax
* @require Locale
* @require css!package/quiqqer/bricks/bin/Area.css
*
* @event onLoaded [ this ]
*/
define('package/quiqqer/bricks/bin/Area', [
'qui/QUI',
......@@ -41,7 +48,7 @@ define('package/quiqqer/bricks/bin/Area', [
initialize : function(options)
{
this.parent( options );
this.parent(options);
this.$Title = false;
this.$Desc = false;
......@@ -69,19 +76,19 @@ define('package/quiqqer/bricks/bin/Area', [
}
});
this.$Title = this.$Elm.getElement( '.quiqqer-bricks-area-content-title' );
this.$Desc = this.$Elm.getElement( '.quiqqer-bricks-area-content-description' );
this.$Title = this.$Elm.getElement('.quiqqer-bricks-area-content-title');
this.$Desc = this.$Elm.getElement('.quiqqer-bricks-area-content-description');
if ( this.getAttribute( 'area' ) ) {
this.$Elm.set( 'data-area', this.getAttribute( 'area' ) );
if (this.getAttribute('area')) {
this.$Elm.set('data-area', this.getAttribute('area'));
}
if ( this.getAttribute( 'title' ) ) {
this.$Title.set( 'html', this.getAttribute( 'title' ) );
if (this.getAttribute('title')) {
this.$Title.set('html', this.getAttribute('title'));
}
if ( this.getAttribute( 'description' ) ) {
this.$Desc.set( 'html', this.getAttribute( 'description' ) );
if (this.getAttribute('description')) {
this.$Desc.set('html', this.getAttribute('description'));
}
......@@ -93,7 +100,7 @@ define('package/quiqqer/bricks/bin/Area', [
*/
toggle : function()
{
if ( this.$selected )
if (this.$selected)
{
this.unselect();
return;
......@@ -107,12 +114,12 @@ define('package/quiqqer/bricks/bin/Area', [
*/
select : function()
{
if ( this.$selected ) {
if (this.$selected) {
return;
}
this.$selected = true;
this.$Elm.addClass( 'quiqqer-bricks-area-selected' );
this.$Elm.addClass('quiqqer-bricks-area-selected');
},
/**
......@@ -120,12 +127,12 @@ define('package/quiqqer/bricks/bin/Area', [
*/
unselect : function()
{
if ( this.$selected === false ) {
if (this.$selected === false) {
return;
}
this.$selected = false;
this.$Elm.removeClass( 'quiqqer-bricks-area-selected' );
this.$Elm.removeClass('quiqqer-bricks-area-selected');
}
});
});
......@@ -6,9 +6,14 @@
* @module package/quiqqer/bricks/bin/AreaWindow
* @author www.pcsg.de (Henning Leutz)
*
* @require qui/QUI
* @require qui/controls/windows/Confirm
* @require package/quiqqer/bricks/bin/Area
* @require Ajax
* @require Locale
*
* @event onSubmit [ this, areas ]
*/
define('package/quiqqer/bricks/bin/AreaWindow', [
'qui/QUI',
......@@ -31,16 +36,27 @@ define('package/quiqqer/bricks/bin/AreaWindow', [
],
options : {
title : QUILocale.get( 'quiqqer/bricks', 'area.window.title' ),
icon : 'icon-th',
title : QUILocale.get('quiqqer/bricks', 'area.window.title'),
projectName : false,
projectLang : false,
maxHeight : 500,
maxWidth : 400
maxHeight : 600,
maxWidth : 400,
texticon : false,
cancel_button : {
text : QUILocale.get('quiqqer/system', 'cancel'),
textimage : 'icon-remove fa fa-remove'
},
ok_button : {
text : QUILocale.get('quiqqer/system', 'accept'),
textimage : 'icon-ok fa fa-check'
}
},
initialize : function(options)
{
this.parent( options );
this.parent(options);
this.addEvents({
onOpen : this.$onOpen
......@@ -61,15 +77,15 @@ define('package/quiqqer/bricks/bin/AreaWindow', [
var i, len, desc, title;
var Content = self.getContent();
for ( i = 0, len = result.length; i < len; i++ )
for (i = 0, len = result.length; i < len; i++)
{
title = result[ i ].title;
desc = result[ i ].description;
title = result[i].title;
desc = result[i].description;
new Area({
title : QUILocale.get( title.group, title['var'] ),
description : QUILocale.get( desc.group, desc['var'] ),
area : result[ i ].name
title : QUILocale.get(title.group, title['var']),
description : QUILocale.get(desc.group, desc['var']),
area : result[i].name
}).inject( Content );
}
......@@ -87,8 +103,8 @@ define('package/quiqqer/bricks/bin/AreaWindow', [
Ajax.get('package_quiqqer_bricks_ajax_project_getAreas', callback, {
'package' : 'quiqqer/brick',
project : JSON.encode({
name : this.getAttribute( 'projectName' ),
lang : this.getAttribute( 'projectLang' )
name : this.getAttribute('projectName'),
lang : this.getAttribute('projectLang')
})
});
},
......@@ -106,9 +122,9 @@ define('package/quiqqer/bricks/bin/AreaWindow', [
return Elm.get( 'data-area' );
});
this.fireEvent( 'submit', [ this, areas ] );
this.fireEvent('submit', [this, areas]);
if ( this.getAttribute( 'autoclose' ) ) {
if (this.getAttribute('autoclose')) {
this.close();
}
}
......
......@@ -6,9 +6,16 @@
* @module package/quiqqer/bricks/bin/BrickAreas
* @author www.pcsg.de (Henning Leutz)
*
* @require qui/QUI
* @require qui/controls/Control
* @require qui/controls/buttons/Button
* @require package/quiqqer/bricks/bin/AreaWindow
* @require Ajax
* @require Locale
* @require css!package/quiqqer/bricks/bin/BrickAreas.css
*
* @event onLoaded [ this ]
*/
define('package/quiqqer/bricks/bin/BrickAreas', [
'qui/QUI',
......
......@@ -412,10 +412,6 @@ define('package/quiqqer/bricks/bin/BrickEdit', [
data.settings,
QUIFormUtils.getFormData(Form)
);
console.log(data.settings);
}
if (unload == 'content') {
......
......@@ -484,7 +484,7 @@ define('package/quiqqer/bricks/bin/Site/Area', [
for (i = 0, len = bricks.length; i < len; i++)
{
custom = '';
brickId = bricks[i].get('id');
brickId = bricks[i].getParent().get('id');
if (brickId in this.$brickCustomData) {
custom = this.$brickCustomData[brickId];
......@@ -813,7 +813,7 @@ define('package/quiqqer/bricks/bin/Site/Area', [
maxHeight : 400,
autoclose : false,
ok_button : {
text : QUILocale.get('quiqqer/system', 'save'),
text : QUILocale.get('quiqqer/system', 'accept'),
textimage : 'icon-save fa fa-save'
},
cancel_button : {
......@@ -856,7 +856,7 @@ define('package/quiqqer/bricks/bin/Site/Area', [
var Form = Win.getContent().getElement('form'),
data = QUIFormUtils.getFormData(Form),
brickId = Select.get('id');
brickId = Select.getParent().get('id');
self.$brickCustomData[brickId] = JSON.encode(data);
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren