pagebuilder fullscreen mode
This commit is contained in:
@@ -24,21 +24,24 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
document.body.append(document.getElementById(this.id));
|
||||
this.modal = new Modal(document.getElementById(this.id))
|
||||
let vm = this;
|
||||
document.getElementById(this.id).addEventListener('hidden.bs.modal', function () {
|
||||
vm.triggerModal(false);
|
||||
})
|
||||
this.triggerModal(this.value);
|
||||
this.triggerModal(this.value, false);
|
||||
},
|
||||
methods: {
|
||||
triggerModal: function (value) {
|
||||
triggerModal: function (value, emit = true) {
|
||||
if (value == true) {
|
||||
this.modal.show();
|
||||
} else {
|
||||
this.modal.hide()
|
||||
if (emit) {
|
||||
this.$emit('hide');
|
||||
}
|
||||
}
|
||||
this.$emit('input', value);
|
||||
}
|
||||
},
|
||||
@@ -47,8 +50,20 @@ export default {
|
||||
this.triggerModal(this.value);
|
||||
}
|
||||
},
|
||||
destroy() {
|
||||
this.modal.dispose()
|
||||
onDestroy: function () {
|
||||
document.getElementById(this.id).remove();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.modal-xxl {
|
||||
width: 100% !important;
|
||||
max-width: 100% !important;
|
||||
padding: 0 10px !important;
|
||||
}
|
||||
.modal-xlg {
|
||||
width: 75% !important;
|
||||
max-width: 75% !important;
|
||||
padding: 0 10px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,11 +1,18 @@
|
||||
<template>
|
||||
<section class="content card-body " id="pagebuilder">
|
||||
<div class="d-flex justify-content-end">
|
||||
<section :class="{ 'pagebuilder-fullscreen': fullscreen }" class="content card-body " id="pagebuilder">
|
||||
<div class="pagebuilder-body">
|
||||
|
||||
|
||||
<div class="d-flex justify-content-between">
|
||||
<button @click.prevent="fullscreen = !fullscreen" title="Tryb pełnoekranowy"
|
||||
class="btn btn-outline-primary btn-icon-sm"><span class="material-icons-outlined">fullscreen</span></button>
|
||||
<div>
|
||||
|
||||
<button @click.prevent="modalLoad = !modalLoad; pageType = { name: null }" title="Wczytaj szablon do schowka"
|
||||
class="btn btn-outline-primary btn-icon-sm"><span class="material-icons-outlined">find_replace</span></button>
|
||||
<button @click.prevent="modalSave = !modalSave; pageType = { name: null }" title="Zapisz szablon do schowka"
|
||||
class="btn btn-outline-success btn-icon-sm"><span class="material-icons-outlined">save</span></button>
|
||||
</div>
|
||||
|
||||
<!-- <button v-if="showcopy" class="btn btn-outline-secondary mr-1" @click.prevent="modalCopy = !modalCopy;">Kopiuj
|
||||
układ z innej strony</button> -->
|
||||
@@ -63,6 +70,7 @@
|
||||
Dodaj sekcję
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
@@ -87,6 +95,7 @@ export default {
|
||||
},
|
||||
data: function () {
|
||||
return {
|
||||
fullscreen: false,
|
||||
grid: grid,
|
||||
namex: 'body', //podmieniane przez name
|
||||
drag: false,
|
||||
@@ -212,4 +221,22 @@ a {
|
||||
#pagebuilder {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.pagebuilder-fullscreen {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
width: 80%;
|
||||
left: 10%;
|
||||
right: 10%;
|
||||
min-height: 100vh;
|
||||
z-index: 100;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.pagebuilder-fullscreen .pagebuilder-body {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
max-height: 95vh;
|
||||
padding-right: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div style="min-height: 100px;" :class="value.name">
|
||||
<div style="min-height: 100px;" class="pagebuilder-column" :class="value.name">
|
||||
|
||||
<b-modal v-model="modalAddBox" class_other="modal-xl" v-on:onClose="modalAddBox = false" title="Dodaj widżet">
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
<div>
|
||||
<div class="from-group">
|
||||
<label>Klasa kolumny</label>
|
||||
<input v-model="value.class" type="text" class="form-control">
|
||||
<input @input="onChange" v-model="value.class" type="text" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div slot="modal-footer"><button @click="modalColumnsSettings = false"
|
||||
class="btn btn-outline-secondary">Zapisz i zamknij</button></div>
|
||||
<div slot="modal-footer"><button @click="modalColumnsSettings = false" class="btn btn-outline-secondary">Zapisz
|
||||
i zamknij</button></div>
|
||||
</b-modal>
|
||||
<draggable :options="{ handle: '.box-move' }" v-model="value.items" @start="drag = true"
|
||||
@end="drag = false; onChange()" group="people">
|
||||
@@ -32,10 +32,11 @@
|
||||
v-model="value.items[index]" @input="onChange" @change="onChange"></component>
|
||||
</div>
|
||||
</draggable>
|
||||
<div class="d-flex posistion-relative">
|
||||
<div class="flex-fill mr-0 pr-0">
|
||||
<button class="mb-3 w-100 btn btn-icon-sm btn-primary off_tooltip_off"
|
||||
@click.prevent="modalAddBox = !modalAddBox" title=" "> <i
|
||||
<div :class="value.items.length > 0 ? 'pagebuilder-column-hover-padding' : ''"></div>
|
||||
<div class="posistion-relative " :class="value.items.length > 0 ? 'pagebuilder-column-hover' : 'd-flex'">
|
||||
<div class="flex-fill mr-0 pr-0 ">
|
||||
<button class=" w-100 btn btn-icon-sm btn-outline-primary off_tooltip_off"
|
||||
@click.prevent="modalAddBox = !modalAddBox" title="Dodaj widget"> <i
|
||||
class="material-icons-outlined">add_circle_outline</i></button>
|
||||
</div>
|
||||
<div class="ml-0 pl-0">
|
||||
@@ -93,3 +94,20 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.pagebuilder-column-hover {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pagebuilder-column-hover-padding {
|
||||
padding: 17px;
|
||||
}
|
||||
|
||||
.pagebuilder-column:hover .pagebuilder-column-hover {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.pagebuilder-column:hover .pagebuilder-column-hover-padding {
|
||||
padding: 0px;
|
||||
}
|
||||
</style>
|
||||
@@ -10,23 +10,23 @@
|
||||
|
||||
|
||||
<div class="pb_section_options position-absolute" style="top: 12px; right: 14px; width: 20px;">
|
||||
<a href="#" title="pilder_addsection_moveicon');?>" class="box-settings-icon box-move"><i
|
||||
<a href="#" title="Przenieś sekcje" class="box-settings-icon box-move"><i
|
||||
class="material-icons-outlined">sort</i></a>
|
||||
<a href="#" title="pagebuilder_addsection_duplicateicon" @click.prevent="copySection"
|
||||
<a href="#" title="Duplikuj sekcje" @click.prevent="copySection"
|
||||
class="box-settings-icon box-copy text-warning"><i class="material-icons-outlined">file_copy</i></a>
|
||||
<a href="#" title="pagebuilder_addsection_settingsicon" @click.prevent="toggleSettings"
|
||||
<a href="#" title="Ustawienia sekcji" @click.prevent="toggleSettings"
|
||||
class="box-settings-icon box-settings text-secondary"><i
|
||||
class="material-icons-outlined">settings</i></a>
|
||||
<a href="#" title="pagebuilder_addsection_deleteicon" @click.prevent="deleteSection"
|
||||
<a href="#" title="Usuń sekcje" @click.prevent="deleteSection"
|
||||
class="box-settings-icon box-delete text-danger"><i class="material-icons-outlined">delete</i></a>
|
||||
<b-modal v-model="show_settings" title="pagebuilder_addsection_settings_settings"
|
||||
<b-modal v-model="show_settings" title="Ustawienia sekcji"
|
||||
@onClose="ustawieniaSave()">
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<div class="form-group mb-2">
|
||||
<label class="w-100 col-form-label">
|
||||
pagebuilder_addsection_settings_cssclass
|
||||
Klasa sekcji
|
||||
</label>
|
||||
<input type="text" class="form-control" v-model="value.class">
|
||||
</div>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
export default {
|
||||
'col_1': { label: '1 kolumna ', name: 'col_1', columns: [{ name: 'col-md-12', items: [] }] },
|
||||
'col_2': { label: '2 kolumny po 6 ', name: 'col_2', columns: [{ name: 'col-md-6', items: [] }, { name: 'col-md-6', items: [] }] },
|
||||
'col_4_8': { label: '2 kolumny 2 i 8 ', name: 'col_4_8', columns: [{ name: 'col-md-4', items: [] }, { name: 'col-md-8', items: [] }] },
|
||||
'col_8_4': { label: '2 kolkumny 8 i 2 ', name: 'col_8_4', columns: [{ name: 'col-md-8', items: [] }, { name: 'col-md-4', items: [] }] },
|
||||
'col_2_10': { label: '2 kolumny 2 i 10 ', name: 'col_2_10', columns: [{ name: 'col-md-2', items: [] }, { name: 'col-md-10', items: [] }] },
|
||||
'col_10_2': { label: '2 kolkumny 10 i 2 ', name: 'col_10_2', columns: [{ name: 'col-md-10', items: [] }, { name: 'col-md-2', items: [] }] },
|
||||
'col_3': { label: '3 kolumny po 4 ', name: 'col_3', columns: [{ name: 'col-md-4', items: [] }, { name: 'col-md-4', items: [] }, { name: 'col-md-4', items: [] }] },
|
||||
'col_3_6_3': { label: '3 kolumny: 3 ,6, 3 ', name: 'col_3_6_3', columns: [{ name: 'col-md-3', items: [] }, { name: 'col-md-6', items: [] }, { name: 'col-md-3', items: [] }] },
|
||||
'col_6_3_3': { label: '3 kolumny: 6,3,3 ', name: 'col_6_3_3', columns: [{ name: 'col-md-6', items: [] }, { name: 'col-md-3', items: [] }, { name: 'col-md-3', items: [] }] },
|
||||
'col_3_3_6': { label: '3 kolumny: 3,3,6 ', name: 'col_3_3_6', columns: [{ name: 'col-md-3', items: [] }, { name: 'col-md-3', items: [] }, { name: 'col-md-6', items: [] }] },
|
||||
'col_4': { label: '4 kolumny po 3 ', name: 'col_4', columns: [{ name: 'col-md-3', items: [] }, { name: 'col-md-3', items: [] }, { name: 'col-md-3', items: [] }, { name: 'col-md-3', items: [] }] },
|
||||
'col_6': { label: '6 kolumn po 2 ', name: 'col_6', columns: [{ name: 'col-md-2', items: [] }, { name: 'col-md-2', items: [] }, { name: 'col-md-2', items: [] }, { name: 'col-md-2', items: [] }, { name: 'col-md-2', items: [] }, { name: 'col-md-2', items: [] }] },
|
||||
'col_1': { label: '1 kolumna ', name: 'col_1', class: '', columns: [{ name: 'col-md-12', items: [] }] },
|
||||
'col_2': { label: '2 kolumny po 6 ', name: 'col_2', class: '', columns: [{ name: 'col-md-6', items: [] }, { name: 'col-md-6', items: [] }] },
|
||||
'col_4_8': { label: '2 kolumny 2 i 8 ', name: 'col_4_8', class: '', columns: [{ name: 'col-md-4', items: [] }, { name: 'col-md-8', items: [] }] },
|
||||
'col_8_4': { label: '2 kolkumny 8 i 2 ', name: 'col_8_4', class: '', columns: [{ name: 'col-md-8', items: [] }, { name: 'col-md-4', items: [] }] },
|
||||
'col_2_10': { label: '2 kolumny 2 i 10 ', name: 'col_2_10', class: '', columns: [{ name: 'col-md-2', items: [] }, { name: 'col-md-10', items: [] }] },
|
||||
'col_10_2': { label: '2 kolkumny 10 i 2 ', name: 'col_10_2', class: '', columns: [{ name: 'col-md-10', items: [] }, { name: 'col-md-2', items: [] }] },
|
||||
'col_3': { label: '3 kolumny po 4 ', name: 'col_3', class: '', columns: [{ name: 'col-md-4', items: [] }, { name: 'col-md-4', items: [] }, { name: 'col-md-4', items: [] }] },
|
||||
'col_3_6_3': { label: '3 kolumny: 3 ,6, 3 ', name: 'col_3_6_3', class: '', columns: [{ name: 'col-md-3', items: [] }, { name: 'col-md-6', items: [] }, { name: 'col-md-3', items: [] }] },
|
||||
'col_6_3_3': { label: '3 kolumny: 6,3,3 ', name: 'col_6_3_3', class: '', columns: [{ name: 'col-md-6', items: [] }, { name: 'col-md-3', items: [] }, { name: 'col-md-3', items: [] }] },
|
||||
'col_3_3_6': { label: '3 kolumny: 3,3,6 ', name: 'col_3_3_6', class: '', columns: [{ name: 'col-md-3', items: [] }, { name: 'col-md-3', items: [] }, { name: 'col-md-6', items: [] }] },
|
||||
'col_4': { label: '4 kolumny po 3 ', name: 'col_4', class: '', columns: [{ name: 'col-md-3', items: [] }, { name: 'col-md-3', items: [] }, { name: 'col-md-3', items: [] }, { name: 'col-md-3', items: [] }] },
|
||||
'col_6': { label: '6 kolumn po 2 ', name: 'col_6', class: '', columns: [{ name: 'col-md-2', items: [] }, { name: 'col-md-2', items: [] }, { name: 'col-md-2', items: [] }, { name: 'col-md-2', items: [] }, { name: 'col-md-2', items: [] }, { name: 'col-md-2', items: [] }] },
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
v-on:hide="onCloseModal">
|
||||
<div class="mb-4">
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" v-model="text"></textarea>
|
||||
<textarea rows="40" class="form-control" v-model="text"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex"><button class="btn btn-outline-secondary m-auto" @click.prevent="onCloseModal">{{
|
||||
|
||||
@@ -106,7 +106,7 @@ export default {
|
||||
valid_styles: {
|
||||
'*': 'display, margin, float, margin-left, margin-right, margin-top, margin-bottom, padding-left, padding-right, padding-top, padding-bottom, text-decoration, border,font-size,color,background,background-color,line-height,text-align,list-style-type, border-radius',
|
||||
},
|
||||
plugins: ['advlist', 'lists', 'link', 'print', 'hr', 'code', 'table', 'contextmenu', 'emoticons', 'paste', 'textcolor', 'textpattern'],
|
||||
plugins: ['advlist', 'lists', 'link', 'print', 'hr', 'code', 'table', 'contextmenu', 'emoticons', 'paste', 'textcolor', 'textpattern','autoresize'],
|
||||
removed_menuitems: 'newdocument',
|
||||
toolbarxx: "undo redo | bold italic | bullist numlist outdent indent | alignleft aligncenter alignright alignjustify | link image forecolor backcolor",
|
||||
toolbar1: 'undo redo | styles | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | media | forecolor backcolor',
|
||||
|
||||
Reference in New Issue
Block a user