@themarioga/grid-editor 3.2.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BUILDING.md +12 -3
- package/CHANGELOG.md +51 -0
- package/README.md +27 -7
- package/UPGRADING.md +79 -0
- package/dist/grideditor.css +40 -20
- package/dist/grideditor.min.css +1 -1
- package/dist/grideditor.min.css.map +1 -1
- package/dist/jquery.grideditor.bundle.min.js +10 -0
- package/dist/jquery.grideditor.js +369 -165
- package/dist/jquery.grideditor.min.js +1 -1
- package/dist/jquery.grideditor.min.js.map +1 -1
- package/dist/locales/grideditor.es.js +2 -0
- package/dist/locales/grideditor.es.min.js +1 -1
- package/dist/locales/grideditor.es.min.js.map +1 -1
- package/dist/plugins/grideditor.accordion.js +8 -0
- package/dist/plugins/grideditor.accordion.min.js +1 -1
- package/dist/plugins/grideditor.accordion.min.js.map +1 -1
- package/dist/plugins/grideditor.elements.js +5 -5
- package/dist/plugins/grideditor.elements.min.js +1 -1
- package/dist/plugins/grideditor.elements.min.js.map +1 -1
- package/dist/plugins/grideditor.tabs.js +8 -0
- package/dist/plugins/grideditor.tabs.min.js +1 -1
- package/dist/plugins/grideditor.tabs.min.js.map +1 -1
- package/docs/events.md +6 -7
- package/docs/locale-keys.md +2 -0
- package/docs/plugins.md +21 -7
- package/example/autosave.html +1 -1
- package/example/basic.html +3 -2
- package/example/breakpoints.html +1 -1
- package/example/ckeditor.html +1 -1
- package/example/containers.html +31 -7
- package/example/elements.html +1 -1
- package/example/index.html +1 -1
- package/example/locale.html +1 -1
- package/example/plugins.html +1 -1
- package/example/summernote.html +1 -1
- package/example/wrap_content.html +1 -1
- package/package.json +3 -2
- package/src/js/jquery.grideditor.js +369 -165
- package/src/js/locales/grideditor.es.js +2 -0
- package/src/js/plugins/grideditor.accordion.js +8 -0
- package/src/js/plugins/grideditor.elements.js +5 -5
- package/src/js/plugins/grideditor.tabs.js +8 -0
- package/src/less/grideditor.less +43 -18
|
@@ -69,6 +69,8 @@
|
|
|
69
69
|
'view.lg': 'Escritorio',
|
|
70
70
|
'view.xl': 'Escritorio grande',
|
|
71
71
|
'view.xxl': 'Pantalla panorámica',
|
|
72
|
+
'error.sortable_missing': '¡SortableJS no está disponible! Asegúrate de haber cargado el archivo js de Sortable; sin él no se puede arrastrar.',
|
|
73
|
+
'warning.setting_removed': 'El ajuste {setting} se eliminó en la 4.0. Usa {replacement} en su lugar.',
|
|
72
74
|
'error.tinymce_missing': '¡tinyMCE no está disponible! Asegúrate de haber cargado el archivo js de tinyMCE.',
|
|
73
75
|
'error.ckeditor_missing': '¡CKEditor no está disponible! Asegúrate de haber cargado los archivos js de ckeditor y del adaptador de jQuery.',
|
|
74
76
|
'error.summernote_missing': '¡Summernote no está disponible! Asegúrate de haber cargado el archivo js de Summernote.',
|
|
@@ -99,6 +99,14 @@ $.fn.gridEditor.containers.accordion = function(ge) {
|
|
|
99
99
|
|
|
100
100
|
return {
|
|
101
101
|
labelKey: 'container.add_accordion',
|
|
102
|
+
|
|
103
|
+
// Items sort within their accordion and into any other one
|
|
104
|
+
onSortable: function(sortable) {
|
|
105
|
+
sortable(ge.canvas.find('.ge-container-accordion > .accordion'), {
|
|
106
|
+
draggable: '.ge-accordion-item',
|
|
107
|
+
group: 'accordion',
|
|
108
|
+
});
|
|
109
|
+
},
|
|
102
110
|
addPaneKey: 'container.add_accordion_item',
|
|
103
111
|
paneKind: 'accordion-item',
|
|
104
112
|
|
|
@@ -127,13 +127,13 @@ $.fn.gridEditor.features.elements = function(ge) {
|
|
|
127
127
|
onContentReady: markElements,
|
|
128
128
|
|
|
129
129
|
/** Elements move within a content area and between them. */
|
|
130
|
-
onSortable: function(
|
|
130
|
+
onSortable: function(sortable) {
|
|
131
131
|
if (!elementsEnabled()) { return; }
|
|
132
132
|
|
|
133
|
-
ge.canvas.find('.ge-content')
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
133
|
+
sortable(ge.canvas.find('.ge-content'), {
|
|
134
|
+
draggable: '.ge-element',
|
|
135
|
+
group: 'element',
|
|
136
|
+
});
|
|
137
137
|
},
|
|
138
138
|
};
|
|
139
139
|
};
|
|
@@ -73,6 +73,14 @@ $.fn.gridEditor.containers.tabs = function(ge) {
|
|
|
73
73
|
|
|
74
74
|
return {
|
|
75
75
|
labelKey: 'container.add_tabs',
|
|
76
|
+
|
|
77
|
+
// A tab strip sorts its own tabs, and the panes follow them. No
|
|
78
|
+
// group: a tab belongs to the strip it was made in.
|
|
79
|
+
onSortable: function(sortable) {
|
|
80
|
+
sortable(ge.canvas.find('.ge-container-tabs > .nav-tabs'), {
|
|
81
|
+
draggable: '.ge-tab',
|
|
82
|
+
});
|
|
83
|
+
},
|
|
76
84
|
addPaneKey: 'container.add_tab',
|
|
77
85
|
paneKind: 'tab',
|
|
78
86
|
|
package/src/less/grideditor.less
CHANGED
|
@@ -106,7 +106,24 @@
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
/* The button following the pointer must not be what the pointer is over */
|
|
109
|
+
.ge-drag-helper {
|
|
110
|
+
opacity: .85;
|
|
111
|
+
pointer-events: none;
|
|
112
|
+
|
|
113
|
+
.ge-tools-drawer {
|
|
114
|
+
pointer-events: none;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* A toolbar button that can be carried onto the canvas */
|
|
119
|
+
.ge-palette-button {
|
|
120
|
+
cursor: move;
|
|
121
|
+
touch-action: none;
|
|
122
|
+
}
|
|
123
|
+
|
|
109
124
|
.ge-toolbar-helper {
|
|
125
|
+
position: absolute;
|
|
126
|
+
z-index: 1000;
|
|
110
127
|
pointer-events: none;
|
|
111
128
|
opacity: 0.85;
|
|
112
129
|
}
|
|
@@ -131,10 +148,9 @@
|
|
|
131
148
|
|
|
132
149
|
.ge-tools-drawer {
|
|
133
150
|
/* Positioned, so a tool can hang a picker off itself. Deliberately
|
|
134
|
-
not stacked above anything the rest of the time:
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
the handle. */
|
|
151
|
+
not stacked above anything the rest of the time: the resize handle
|
|
152
|
+
runs down the column's edge, and a drawer sitting over it would take
|
|
153
|
+
the clicks meant for the handle. */
|
|
138
154
|
position: relative;
|
|
139
155
|
-webkit-touch-callout: none;
|
|
140
156
|
|
|
@@ -423,12 +439,18 @@
|
|
|
423
439
|
}
|
|
424
440
|
}
|
|
425
441
|
|
|
426
|
-
/* Sorting
|
|
427
|
-
|
|
442
|
+
/* Sorting. The dragged node stays in the list and shows where it would
|
|
443
|
+
land - that is the placeholder - while a copy of it follows the
|
|
444
|
+
pointer. */
|
|
445
|
+
.ge-drag-placeholder {
|
|
428
446
|
background: fadeout(yellow, 80%);
|
|
429
|
-
|
|
447
|
+
opacity: 1;
|
|
430
448
|
min-height: 50px;
|
|
431
449
|
max-height: 100px;
|
|
450
|
+
|
|
451
|
+
> * {
|
|
452
|
+
visibility: hidden;
|
|
453
|
+
}
|
|
432
454
|
}
|
|
433
455
|
|
|
434
456
|
/* A size change should read as a movement rather than a jump, but not
|
|
@@ -437,23 +459,26 @@
|
|
|
437
459
|
.column {
|
|
438
460
|
transition: width 120ms ease, margin-left 120ms ease;
|
|
439
461
|
}
|
|
440
|
-
.column.
|
|
462
|
+
.column.ge-resizing {
|
|
441
463
|
transition: none;
|
|
442
464
|
/* Follow the pointer in pixels: the layout mode's max-width is what
|
|
443
465
|
the column will snap back into once the drag lands */
|
|
444
466
|
max-width: none;
|
|
445
467
|
}
|
|
446
468
|
|
|
447
|
-
/* Resizing
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
.column > .ui-resizable-handle {
|
|
469
|
+
/* Resizing: a grip on the column's edge, clear of the drawer, which is
|
|
470
|
+
what keeps the resize gesture and the sort gesture apart */
|
|
471
|
+
.column > .ge-resize-handle {
|
|
451
472
|
position: absolute;
|
|
452
473
|
display: block;
|
|
453
474
|
z-index: 10;
|
|
475
|
+
|
|
476
|
+
/* The gesture is the editor's, not the page's: without this a touch
|
|
477
|
+
drag on the handle scrolls instead of resizing */
|
|
478
|
+
touch-action: none;
|
|
454
479
|
}
|
|
455
|
-
.column > .
|
|
456
|
-
.column > .
|
|
480
|
+
.column > .ge-resize-e,
|
|
481
|
+
.column > .ge-resize-w {
|
|
457
482
|
top: 0;
|
|
458
483
|
bottom: 0;
|
|
459
484
|
width: 8px;
|
|
@@ -464,10 +489,10 @@
|
|
|
464
489
|
background: @colColor;
|
|
465
490
|
}
|
|
466
491
|
}
|
|
467
|
-
.column > .
|
|
492
|
+
.column > .ge-resize-e {
|
|
468
493
|
right: -1px;
|
|
469
494
|
}
|
|
470
|
-
.column > .
|
|
495
|
+
.column > .ge-resize-w {
|
|
471
496
|
left: -1px;
|
|
472
497
|
}
|
|
473
498
|
|
|
@@ -479,13 +504,13 @@
|
|
|
479
504
|
font-size: 11px;
|
|
480
505
|
color: @colTextColor;
|
|
481
506
|
}
|
|
482
|
-
.column.
|
|
507
|
+
.column.ge-resizing > .ge-tools-drawer > .ge-resize-size {
|
|
483
508
|
display: block;
|
|
484
509
|
}
|
|
485
510
|
}
|
|
486
511
|
|
|
487
512
|
/* The handle belongs to editing, and never to the output */
|
|
488
|
-
.ge-canvas:not(.ge-editing) .
|
|
513
|
+
.ge-canvas:not(.ge-editing) .ge-resize-handle {
|
|
489
514
|
display: none;
|
|
490
515
|
}
|
|
491
516
|
|