Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
package-bricks
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QUIQQER
package-bricks
Commits
0d2412dd
Commit
0d2412dd
authored
Oct 10, 2019
by
Henning Leutz
🥋
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev'
parents
f615135c
4eb93282
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
144 additions
and
182 deletions
+144
-182
ajax/brick/templates/extras.html
ajax/brick/templates/extras.html
+11
-13
ajax/brick/templates/information.html
ajax/brick/templates/information.html
+29
-26
ajax/brick/templates/settings.html
ajax/brick/templates/settings.html
+15
-88
bin/BrickEdit.css
bin/BrickEdit.css
+2
-2
bin/BrickEdit.js
bin/BrickEdit.js
+60
-21
bin/Controls/Slider/PromosliderSettings.js
bin/Controls/Slider/PromosliderSettings.js
+14
-28
bin/Controls/Slider/ToggleMobileSlidesSetting.js
bin/Controls/Slider/ToggleMobileSlidesSetting.js
+5
-4
src/QUI/Bricks/Manager.php
src/QUI/Bricks/Manager.php
+8
-0
No files found.
ajax/brick/templates/extras.html
View file @
0d2412dd
<form
class=
"quiqqer-bricks-brickedit"
>
<table
class=
"data-table brick-edit-extra-header"
>
<table
class=
"data-table
data-table-flexbox
brick-edit-extra-header"
>
<thead>
<tr>
<th
colspan=
"2"
>
<th>
{locale group="quiqqer/bricks" var="brick.edit.extra.header"}
</th>
</tr>
</thead>
<tbody>
<tr
class=
"{cycle values="
odd
,
even
"}"
>
<td>
<label
for=
"frontendTitle"
>
{locale group="quiqqer/bricks" var="brick.edit.frontendTitle"}
</label>
</td>
<td>
<input
type=
"text"
name=
"frontendTitle"
id=
"frontendTitle"
/>
</td>
<tr>
<td>
<label
for=
"frontendTitle"
class=
"field-container"
>
<span
class=
"field-container-item"
>
{locale group="quiqqer/bricks" var="brick.edit.frontendTitle"}
</span>
<input
type=
"text"
name=
"frontendTitle"
id=
"frontendTitle"
class=
"field-container-field"
/>
</label>
</td>
</tr>
</tbody>
</table>
...
...
ajax/brick/templates/information.html
View file @
0d2412dd
<form
class=
"quiqqer-bricks-brickedit"
name=
""
>
<table
class=
"data-table"
>
<thead>
<form
class=
"quiqqer-bricks-brickedit"
>
<table
class=
"data-table data-table-flexbox"
>
<thead>
<tr>
<th
colspan=
"2"
>
<th>
{locale group="quiqqer/bricks" var="brick.edit.header"}
</th>
</tr>
</thead>
<tbody>
<tr
class=
"{cycle values="
odd
,
even
"}"
>
</thead>
<tbody>
<tr>
<td>
<label
for=
"title"
>
{locale group="quiqqer/bricks" var="brick.edit.backendTitle"}
<label
for=
"title"
class=
"field-container"
>
<span
class=
"field-container-item"
>
{locale group="quiqqer/bricks" var="brick.edit.backendTitle"}
</span>
<input
type=
"text"
name=
"title"
id=
"title"
class=
"field-container-field"
/>
</label>
</td>
<td>
<input
type=
"text"
name=
"title"
id=
"title"
/>
</td>
</tr>
<tr
class=
"{cycle values="
odd
,
even
"}"
>
<tr>
<td>
<label
for=
"description"
>
{locale group="quiqqer/bricks" var="brick.edit.description"}
<label
for=
"description"
class=
"field-container"
>
<span
class=
"field-container-item"
>
{locale group="quiqqer/bricks" var="brick.edit.description"}
</span>
<textarea
name=
"description"
id=
"description"
class=
"field-container-field"
style=
"height: 100px"
></textarea>
</label>
</td>
<td>
<textarea
name=
"description"
id=
"description"
></textarea>
</td>
</tr>
<tr
class=
"{cycle values="
odd
,
even
"}"
>
<tr>
<td>
<label
for=
"type"
>
{locale group="quiqqer/bricks" var="brick.edit.type"}
<label
for=
"type"
class=
"field-container"
>
<span
class=
"field-container-item"
>
{locale group="quiqqer/bricks" var="brick.edit.type"}
</span>
<input
type=
"text"
name=
"type"
id=
"type"
disabled=
"disabled"
class=
"field-container-field"
/>
</label>
</td>
<td>
<input
type=
"text"
name=
"type"
id=
"type"
disabled=
"disabled"
/>
</td>
</tr>
</tbody>
</tbody>
</table>
</form>
\ No newline at end of file
ajax/brick/templates/settings.html
View file @
0d2412dd
<form
class=
"quiqqer-bricks-brickedit"
>
<table
class=
"data-table"
>
<thead>
<table
class=
"data-table
data-table-flexbox
"
>
<thead>
<tr>
<th>
{locale group="quiqqer/bricks" var="brick.edit.allowed.areas"}
</th>
</tr>
</thead>
<tbody>
<tr
class=
"{cycle values="
odd
,
even
"}"
>
</thead>
<tbody>
<tr>
<td>
<div
class=
"quiqqer-bricks-areas"
></div>
</td>
</tr>
</tbody>
</tbody>
</table>
<!--
<table class="data-table">
<thead>
<table
class=
"data-table data-table-flexbox brick-table-flexible"
>
<thead>
<tr>
<th colspan="2">
{locale group="quiqqer/bricks" var="brick.edit.settings.proportion.header"}
<th>
{locale group="quiqqer/bricks" var="brick.edit.settings.flexible.header"}
<div
class=
"description"
>
{locale group="quiqqer/bricks" var="brick.edit.settings.flexible.header.description"}
</div>
</th>
</tr>
</thead>
<tbody>
<tr class="{cycle values="odd,even" reset=true}">
<td>
<label for="height">
{locale group="quiqqer/bricks" var="brick.edit.height"}
</label>
</td>
<td>
<input type="text" name="height" id="height" />
</td>
</tr>
<tr class="{cycle values="odd,even"}">
<td>
<label for="width">
{locale group="quiqqer/bricks" var="brick.edit.width"}
</label>
</td>
<td>
<input type="text" name="width" id="width" />
</td>
</tr>
<tr class="{cycle values="odd,even"}">
<td>
<label for="classes">
{locale group="quiqqer/bricks" var="brick.edit.classes"}
</label>
</td>
<td>
<input type="text" name="classes" id="classes" />
</td>
</tr>
</tbody>
</thead>
<tbody></tbody>
</table>
-->
<table
class=
"data-table brick-table-flexible"
>
<thead>
<tr>
<th>
{locale group="quiqqer/bricks" var="brick.edit.settings.flexible.header"}
<div
class=
"description"
>
{locale group="quiqqer/bricks" var="brick.edit.settings.flexible.header.description"}
</div>
</th>
</tr>
</thead>
<tbody>
<!--
<tr class="{cycle values="odd,even" reset=true}">
<td>
<label>
<input type="checkbox" name="flexible-height">
<span>{locale group="quiqqer/bricks" var="brick.edit.height"}</span>
</label>
</td>
</tr>
<tr class="{cycle values="odd,even"}">
<td>
<label>
<input type="checkbox" name="flexible-width">
<span>{locale group="quiqqer/bricks" var="brick.edit.width"}</span>
</label>
</td>
</tr>
<tr class="{cycle values="odd,even"}">
<td>
<label>
<input type="checkbox" name="flexible-classes">
<span>{locale group="quiqqer/bricks" var="brick.edit.classes"}</span>
</label>
</td>
</tr>
-->
</tbody>
</table>
</form>
\ No newline at end of file
bin/BrickEdit.css
View file @
0d2412dd
...
...
@@ -14,7 +14,7 @@
.brick-edit-content
{
margin-bottom
:
0
;
}
/*
.quiqqer-bricks-brickedit label {
clear: both;
float: left;
...
...
@@ -30,7 +30,7 @@
max-width: 300px;
width: 100%;
}
*/
.quiqqer-bricks-brickedit
.cke_source
{
max-width
:
100%
;
}
...
...
bin/BrickEdit.js
View file @
0d2412dd
...
...
@@ -258,7 +258,7 @@ define('package/quiqqer/bricks/bin/BrickEdit', [
data
.
customfields
=
self
.
$customfields
;
return
Bricks
.
saveBrick
(
self
.
getAttribute
(
'
id
'
),
data
).
then
(
function
(
attributes
)
{
return
Bricks
.
saveBrick
(
self
.
getAttribute
(
'
id
'
),
data
).
then
(
function
()
{
QUI
.
getMessageHandler
().
then
(
function
(
MH
)
{
MH
.
addSuccess
(
QUILocale
.
get
(
lg
,
'
message.brick.save.success
'
)
...
...
@@ -459,22 +459,38 @@ define('package/quiqqer/bricks/bin/BrickEdit', [
}).
inject
(
Content
.
getElement
(
'
.quiqqer-bricks-areas
'
));
// flexble settings
var
i
,
len
,
data
;
// flex
i
ble settings
var
i
,
len
,
data
,
description
,
Row
;
var
TBody
=
Content
.
getElement
(
'
.brick-table-flexible tbody
'
);
for
(
i
=
0
,
len
=
self
.
$availableSettings
.
length
;
i
<
len
;
i
++
)
{
data
=
self
.
$availableSettings
[
i
];
new
Element
(
'
tr
'
,
{
'
class
'
:
i
%
2
?
'
odd
'
:
'
even
'
,
html
:
'
<td>
'
+
'
<label>
'
+
Row
=
new
Element
(
'
tr
'
,
{
html
:
'
<td>
'
+
'
<label class="field-container">
'
+
'
<span class="field-container-item">
'
+
QUILocale
.
get
(
data
.
text
[
0
],
data
.
text
[
1
])
+
''
+
'
</span>
'
+
'
<div class="field-container-field">
'
+
'
<input type="checkbox" name="flexible-
'
+
data
.
name
+
'
" />
'
+
'
<
span>
'
+
QUILocale
.
get
(
data
.
text
[
0
],
data
.
text
[
1
])
+
'
</span
>
'
+
'
<
/div
>
'
+
'
</label>
'
+
'
</td>
'
}).
inject
(
TBody
);
description
=
data
.
description
;
if
(
typeOf
(
data
.
description
)
===
'
array
'
)
{
description
=
QUILocale
.
get
(
data
.
description
[
0
],
data
.
description
[
1
]);
}
if
(
typeof
description
!==
'
undefined
'
&&
description
!==
''
)
{
new
Element
(
'
div
'
,
{
'
class
'
:
'
field-container-item-desc
'
,
html
:
description
}).
inject
(
Row
.
getElement
(
'
td
'
));
}
}
if
(
customfields
)
{
...
...
@@ -688,7 +704,7 @@ define('package/quiqqer/bricks/bin/BrickEdit', [
TableExtra
.
setStyle
(
'
display
'
,
null
);
var
i
,
c
,
len
,
cLen
,
attr
,
Row
,
text
,
Value
,
setting
,
var
i
,
c
,
len
,
cLen
,
attr
,
Row
,
text
,
description
,
Value
,
setting
,
extraFieldId
,
dataAttributes
;
var
self
=
this
,
...
...
@@ -701,30 +717,40 @@ define('package/quiqqer/bricks/bin/BrickEdit', [
extraFieldId
=
'
extraField_
'
+
id
+
'
_
'
+
i
;
dataAttributes
=
setting
[
'
data-attributes
'
];
text
=
setting
.
text
;
text
=
setting
.
text
;
description
=
setting
.
description
;
if
(
typeOf
(
setting
.
text
)
===
'
array
'
)
{
text
=
QUILocale
.
get
(
setting
.
text
[
0
],
setting
.
text
[
1
]);
}
if
(
typeOf
(
setting
.
description
)
===
'
array
'
)
{
description
=
QUILocale
.
get
(
setting
.
description
[
0
],
setting
.
description
[
1
]);
}
Row
=
new
Element
(
'
tr
'
,
{
'
class
'
:
i
%
2
?
'
odd
'
:
'
even
'
,
html
:
'
<td>
'
+
'
<label class="quiqqer-bricks-areas" for="
'
+
extraFieldId
+
'
">
'
+
text
+
'
</label>
'
+
'
</td>
'
+
'
<td></td>
'
html
:
'
<td>
'
+
'
<label class="field-container" for="
'
+
extraFieldId
+
'
">
'
+
'
<span class="field-container-item">
'
+
text
+
'
</span>
'
+
'
</label>
'
+
'
</td>
'
}).
inject
(
TableBody
);
if
(
typeof
description
!==
'
undefined
'
&&
description
!==
''
)
{
new
Element
(
'
div
'
,
{
'
class
'
:
'
field-container-item-desc
'
,
html
:
description
}).
inject
(
Row
.
getElement
(
'
td
'
));
}
if
(
setting
.
type
!==
'
select
'
)
{
Value
=
new
Element
(
'
input
'
,
{
type
:
setting
.
type
,
name
:
setting
.
name
,
'
class
'
:
setting
.
class
,
id
:
extraFieldId
})
.
inject
(
Row
.
getElement
(
'
td:last-child
'
))
;
});
if
(
setting
[
'
data-qui
'
]
!==
''
)
{
Value
.
set
(
'
data-qui
'
,
setting
[
'
data-qui
'
]);
...
...
@@ -738,6 +764,19 @@ define('package/quiqqer/bricks/bin/BrickEdit', [
}
}
if
(
Value
.
type
===
'
checkbox
'
||
Value
.
type
===
'
radio
'
||
Value
.
type
===
'
hidden
'
)
{
var
Container
=
new
Element
(
'
div
'
,
{
'
class
'
:
'
field-container-field
'
}).
inject
(
Row
.
getElement
(
'
.field-container
'
));
Value
.
inject
(
Container
);
continue
;
}
Value
.
classList
.
add
(
'
field-container-field
'
);
Value
.
inject
(
Row
.
getElement
(
'
.field-container
'
));
continue
;
}
...
...
@@ -745,7 +784,9 @@ define('package/quiqqer/bricks/bin/BrickEdit', [
name
:
setting
.
name
,
'
class
'
:
setting
.
class
,
id
:
extraFieldId
}).
inject
(
Row
.
getElement
(
'
td:last-child
'
));
}).
inject
(
Row
.
getElement
(
'
.field-container
'
));
Value
.
addClass
(
'
field-container-field
'
);
for
(
c
=
0
,
cLen
=
setting
.
options
.
length
;
c
<
cLen
;
c
++
)
{
...
...
@@ -800,9 +841,7 @@ define('package/quiqqer/bricks/bin/BrickEdit', [
});
resolve
();
}).
catch
(
reject
);
}.
bind
(
this
));
},
...
...
bin/Controls/Slider/PromosliderSettings.js
View file @
0d2412dd
...
...
@@ -70,20 +70,6 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderSettings', [
}
}).
wraps
(
this
.
$Input
);
// exist label?
var
id
=
this
.
$Input
.
get
(
'
id
'
),
Label
=
document
.
getElement
(
'
label[for="
'
+
id
+
'
"]
'
);
if
(
Label
)
{
var
Cell
=
Label
.
getParent
(
'
td
'
),
OldCell
=
this
.
$Elm
.
getParent
(
'
td
'
);
Cell
.
set
(
'
colspan
'
,
2
);
this
.
$Elm
.
inject
(
Cell
);
OldCell
.
destroy
();
}
// grid and sizes
var
size
=
this
.
$Elm
.
getSize
();
...
...
@@ -233,7 +219,7 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderSettings', [
*
* @param {Object} [caller] - the object calling this event
*/
$toggleSlideStatus
:
function
(
caller
)
{
$toggleSlideStatus
:
function
(
caller
)
{
if
(
!
caller
)
{
return
;
}
...
...
@@ -277,8 +263,8 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderSettings', [
insert
.
isDisabled
=
new
QUISwitch
({
status
:
entry
.
isDisabled
===
"
1
"
,
name
:
i
,
uid
:
i
,
name
:
i
,
uid
:
i
,
events
:
{
onChange
:
this
.
$toggleSlideStatus
}
...
...
@@ -310,7 +296,7 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderSettings', [
if
(
"
newTab
"
in
entry
)
{
insert
.
newTab
=
new
Element
(
'
span
'
,
{
'
class
'
:
entry
.
newTab
===
"
1
"
?
'
fa fa-check
'
:
'
fa fa-times
'
,
'
class
'
:
entry
.
newTab
===
"
1
"
?
'
fa fa-check
'
:
'
fa fa-times
'
,
'
data-enabled
'
:
entry
.
newTab
});
}
...
...
@@ -392,7 +378,7 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderSettings', [
entry
.
url
=
params
.
url
;
}
if
(
"
newTab
"
in
params
)
{
if
(
"
newTab
"
in
params
)
{
entry
.
newTab
=
params
.
newTab
;
}
...
...
@@ -652,13 +638,13 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderSettings', [
var
Content
=
Dialog
.
getContent
();
var
Form
=
Content
.
getElement
(
'
form
'
);
var
IsDisabled
=
Form
.
elements
.
isDisabled
;
var
Image
=
Form
.
elements
.
image
;
var
Title
=
Form
.
elements
.
title
;
var
Description
=
Form
.
elements
.
description
;
var
Type
=
Form
.
elements
.
type
;
var
Url
=
Form
.
elements
.
url
;
var
NewTab
=
Form
.
elements
.
newTab
;
var
IsDisabled
=
Form
.
elements
.
isDisabled
;
var
Image
=
Form
.
elements
.
image
;
var
Title
=
Form
.
elements
.
title
;
var
Description
=
Form
.
elements
.
description
;
var
Type
=
Form
.
elements
.
type
;
var
Url
=
Form
.
elements
.
url
;
var
NewTab
=
Form
.
elements
.
newTab
;
self
.
add
({
isDisabled
:
IsDisabled
.
value
,
...
...
@@ -722,7 +708,7 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderSettings', [
this
.
IsDisabledSwitch
=
new
QUISwitch
({
name
:
'
isDisabled
'
,
name
:
'
isDisabled
'
,
status
:
false
});
this
.
IsDisabledSwitch
.
inject
(
Container
.
getElement
(
'
#isDisabledWrapper
'
));
...
...
@@ -732,7 +718,7 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderSettings', [
});
this
.
NewTabSwitch
.
inject
(
Container
.
getElement
(
'
#newTabWrapper
'
));
QUI
.
parse
(
Container
).
then
(
function
()
{
return
ControlsUtils
.
parse
(
Container
);
}).
then
(
function
()
{
...
...
bin/Controls/Slider/ToggleMobileSlidesSetting.js
View file @
0d2412dd
...
...
@@ -13,8 +13,6 @@ define('package/quiqqer/bricks/bin/Controls/Slider/ToggleMobileSlidesSetting', [
],
function
(
QUI
,
QUIControl
,
QUISwitch
)
{
"
use strict
"
;
var
lg
=
'
quiqqer/bricks
'
;
return
new
Class
({
Extends
:
QUIControl
,
...
...
@@ -47,7 +45,7 @@ define('package/quiqqer/bricks/bin/Controls/Slider/ToggleMobileSlidesSetting', [
status
:
this
.
getElm
().
value
===
"
true
"
,
events
:
{
onChange
:
this
.
$switchToggled
,
onLoad
:
function
()
{
onLoad
:
function
()
{
if
(
!
this
.
$Switch
.
getStatus
())
{
this
.
hideMobileSlidesSetting
();
}
...
...
@@ -74,7 +72,10 @@ define('package/quiqqer/bricks/bin/Controls/Slider/ToggleMobileSlidesSetting', [
* @return {HTMLElement | null}
.*/
getMobileSlidesSettingElement
:
function
()
{
return
document
.
getElementsByName
(
'
mobileslides
'
)[
0
].
parentElement
.
parentElement
.
parentElement
;
return
this
.
getElm
()
.
getParent
(
'
table
'
)
.
getElement
(
'
[name="mobileslides"]
'
)
.
getParent
(
'
label
'
);
},
...
...
src/QUI/Bricks/Manager.php
View file @
0d2412dd
...
...
@@ -637,6 +637,7 @@ class Manager
}
$dataAttributes
=
[];
$description
=
''
;
foreach
(
$Setting
->
attributes
as
$attribute
)
{
if
(
$attribute
->
nodeName
===
'data-qui'
)
{
...
...
@@ -648,9 +649,16 @@ class Manager
}
}
$Description
=
$Setting
->
getElementsByTagName
(
'description'
);
if
(
$Description
->
length
)
{
$description
=
QUI\Utils\DOM
::
getTextFromNode
(
$Description
->
item
(
0
),
false
);
}
return
[
'name'
=>
$Setting
->
getAttribute
(
'name'
),
'text'
=>
QUI\Utils\DOM
::
getTextFromNode
(
$Setting
,
false
),
'description'
=>
$description
,
'type'
=>
$Setting
->
getAttribute
(
'type'
),
'class'
=>
$Setting
->
getAttribute
(
'class'
),
'data-qui'
=>
$Setting
->
getAttribute
(
'data-qui'
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment