scrivito_table_widget 0.5.7.rc1 → 0.5.7.rc2
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d48f33865f6e775d054e1b01339da4e479606a5
|
4
|
+
data.tar.gz: e448e36e1c8ffedd1a9fdaac9484a25dd649b47d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e08a3aaaf381cce6b3668fba7a293671ca4bd9c42f6e5721e8b0d8647d7852953bc1bff6cdd08eebd7d90daecf76e0e2a67e17a117a48f2c69ef347ee4ff06d3
|
7
|
+
data.tar.gz: f4b56c8178cdab45da4c4792e1f323dddfb0a9e62c8aeed768ea860202955e036ab1deca4fb5c35509da3ea9d4c4be3edcd76f208a250fc53a61181a9fda1506
|
@@ -11,7 +11,7 @@
|
|
11
11
|
|
12
12
|
$.fn.edittable = function(opts) {
|
13
13
|
// initialize
|
14
|
-
if(!initialized) {
|
14
|
+
if(!initialized && !$(this).hasClass('table-responsive')) {
|
15
15
|
activeTable = this.parents('table');
|
16
16
|
cmsField = this.parents('[data-editor=table-editor]');
|
17
17
|
|
@@ -45,9 +45,6 @@
|
|
45
45
|
$('body').keyup(function(e) {
|
46
46
|
var code = e.keyCode || e.which;
|
47
47
|
$.fn.edittable.save();
|
48
|
-
if(initialized) {
|
49
|
-
$.fn.edittable.setButtonPositions();
|
50
|
-
}
|
51
48
|
});
|
52
49
|
keysBound = true;
|
53
50
|
};
|
@@ -108,7 +105,7 @@
|
|
108
105
|
}
|
109
106
|
}
|
110
107
|
|
111
|
-
$.fn.edittable.save = function(
|
108
|
+
$.fn.edittable.save = function() {
|
112
109
|
var text = activeTable.get(0).outerHTML;
|
113
110
|
$(cmsField).scrivito('save', text);
|
114
111
|
}
|
@@ -124,6 +121,9 @@
|
|
124
121
|
|
125
122
|
$.fn.edittable.buttonsEdit = function() {
|
126
123
|
return $.fn.edittable.button("pencil", "", "edit-the-cell alert-gray") +
|
124
|
+
$.fn.edittable.button("align-left", "", "table-left alert-gray") +
|
125
|
+
$.fn.edittable.button("align-center", "", "table-center alert-gray") +
|
126
|
+
$.fn.edittable.button("align-right", "", "table-right alert-gray") +
|
127
127
|
$.fn.edittable.button("crosshairs", "", "add-success alert-success") +
|
128
128
|
$.fn.edittable.button("crosshairs", "", "add-info alert-info") +
|
129
129
|
$.fn.edittable.button("crosshairs", "", "add-warning alert-warning") +
|
@@ -176,6 +176,10 @@
|
|
176
176
|
$('.table-widget').find('.hover-table').on('click', function() { $.fn.edittable.tableHover(); });
|
177
177
|
$('.table-widget').find('.border-table').on('click', function() { $.fn.edittable.tableBorder(); });
|
178
178
|
$('.table-widget').find('.first-column').on('click', function() { $.fn.edittable.firstColumn(); });
|
179
|
+
$('.table-widget').find('.table-left').on('click', function() { $.fn.edittable.tableLeft(); });
|
180
|
+
$('.table-widget').find('.table-center').on('click', function() { $.fn.edittable.tableCenter(); });
|
181
|
+
$('.table-widget').find('.table-right').on('click', function() { $.fn.edittable.tableRight(); });
|
182
|
+
|
179
183
|
$('.table-widget').find('.add-success').on('click', function() { $.fn.edittable.addSuccess(); });
|
180
184
|
$('.table-widget').find('.add-info').on('click', function() { $.fn.edittable.addInfo(); });
|
181
185
|
$('.table-widget').find('.add-warning').on('click', function() { $.fn.edittable.addWarning(); });
|
@@ -265,7 +269,7 @@
|
|
265
269
|
$(newRow).insertBefore( activeElement.parents('tr') );
|
266
270
|
rows += 1;
|
267
271
|
$.fn.edittable.setButtonPositions();
|
268
|
-
$.fn.edittable.save(
|
272
|
+
$.fn.edittable.save();
|
269
273
|
}
|
270
274
|
|
271
275
|
$.fn.edittable.addBottom = function() {
|
@@ -274,7 +278,7 @@
|
|
274
278
|
$(newRow).insertAfter( activeElement.parents('tr') );
|
275
279
|
rows += 1;
|
276
280
|
$.fn.edittable.setButtonPositions();
|
277
|
-
$.fn.edittable.save(
|
281
|
+
$.fn.edittable.save();
|
278
282
|
}
|
279
283
|
|
280
284
|
$.fn.edittable.addLeft = function() {
|
@@ -290,7 +294,7 @@
|
|
290
294
|
|
291
295
|
cols += 1;
|
292
296
|
$.fn.edittable.setButtonPositions();
|
293
|
-
$.fn.edittable.save(
|
297
|
+
$.fn.edittable.save();
|
294
298
|
};
|
295
299
|
|
296
300
|
$.fn.edittable.addRight = function() {
|
@@ -306,7 +310,7 @@
|
|
306
310
|
|
307
311
|
cols += 1;
|
308
312
|
$.fn.edittable.setButtonPositions();
|
309
|
-
$.fn.edittable.save(
|
313
|
+
$.fn.edittable.save();
|
310
314
|
};
|
311
315
|
|
312
316
|
$.fn.edittable.removeColumn = function() {
|
@@ -326,7 +330,7 @@
|
|
326
330
|
|
327
331
|
|
328
332
|
$.fn.edittable.setButtonPositions();
|
329
|
-
$.fn.edittable.save(
|
333
|
+
$.fn.edittable.save();
|
330
334
|
};
|
331
335
|
|
332
336
|
$.fn.edittable.removeRow = function() {
|
@@ -339,33 +343,33 @@
|
|
339
343
|
$(activeTable.find('tbody tr')[activeRowIndex]).find('td').click();
|
340
344
|
}
|
341
345
|
$.fn.edittable.setButtonPositions();
|
342
|
-
$.fn.edittable.save(
|
346
|
+
$.fn.edittable.save();
|
343
347
|
};
|
344
348
|
|
345
349
|
$.fn.edittable.tableStriped = function() {
|
346
350
|
activeTable.toggleClass('table-striped');
|
347
|
-
$.fn.edittable.save(
|
351
|
+
$.fn.edittable.save();
|
348
352
|
};
|
349
353
|
|
350
354
|
$.fn.edittable.tableCondensed = function() {
|
351
355
|
activeTable.toggleClass('table-condensed');
|
352
356
|
$.fn.edittable.setButtonPositions();
|
353
|
-
$.fn.edittable.save(
|
357
|
+
$.fn.edittable.save();
|
354
358
|
};
|
355
359
|
|
356
360
|
$.fn.edittable.tableHover = function() {
|
357
361
|
activeTable.toggleClass('table-hover');
|
358
|
-
$.fn.edittable.save(
|
362
|
+
$.fn.edittable.save();
|
359
363
|
};
|
360
364
|
|
361
365
|
$.fn.edittable.tableBorder = function() {
|
362
366
|
activeTable.toggleClass('table-bordered');
|
363
|
-
$.fn.edittable.save(
|
367
|
+
$.fn.edittable.save();
|
364
368
|
};
|
365
369
|
|
366
370
|
$.fn.edittable.firstColumn = function() {
|
367
371
|
activeTable.toggleClass('column-first');
|
368
|
-
$.fn.edittable.save(
|
372
|
+
$.fn.edittable.save();
|
369
373
|
};
|
370
374
|
|
371
375
|
$.fn.edittable.addSuccess = function() {
|
@@ -373,7 +377,7 @@
|
|
373
377
|
activeElement.removeClass('warning');
|
374
378
|
activeElement.removeClass('danger');
|
375
379
|
activeElement.toggleClass('success');
|
376
|
-
$.fn.edittable.save(
|
380
|
+
$.fn.edittable.save();
|
377
381
|
};
|
378
382
|
|
379
383
|
$.fn.edittable.addInfo = function() {
|
@@ -381,7 +385,7 @@
|
|
381
385
|
activeElement.removeClass('warning');
|
382
386
|
activeElement.removeClass('danger');
|
383
387
|
activeElement.toggleClass('info');
|
384
|
-
$.fn.edittable.save(
|
388
|
+
$.fn.edittable.save();
|
385
389
|
};
|
386
390
|
|
387
391
|
$.fn.edittable.addWarning = function() {
|
@@ -389,7 +393,7 @@
|
|
389
393
|
activeElement.removeClass('success');
|
390
394
|
activeElement.removeClass('danger');
|
391
395
|
activeElement.toggleClass('warning');
|
392
|
-
$.fn.edittable.save(
|
396
|
+
$.fn.edittable.save();
|
393
397
|
};
|
394
398
|
|
395
399
|
$.fn.edittable.addDanger = function() {
|
@@ -397,28 +401,28 @@
|
|
397
401
|
activeElement.removeClass('warning');
|
398
402
|
activeElement.removeClass('success');
|
399
403
|
activeElement.toggleClass('danger');
|
400
|
-
$.fn.edittable.save(
|
404
|
+
$.fn.edittable.save();
|
401
405
|
};
|
402
406
|
|
403
407
|
$.fn.edittable.tableLeft = function() {
|
404
408
|
activeElement.removeClass('center');
|
405
409
|
activeElement.removeClass('right');
|
406
410
|
activeElement.addClass('left');
|
407
|
-
$.fn.edittable.save(
|
411
|
+
$.fn.edittable.save();
|
408
412
|
};
|
409
413
|
|
410
414
|
$.fn.edittable.tableCenter = function() {
|
411
415
|
activeElement.removeClass('left');
|
412
416
|
activeElement.removeClass('right');
|
413
417
|
activeElement.addClass('center');
|
414
|
-
$.fn.edittable.save(
|
418
|
+
$.fn.edittable.save();
|
415
419
|
};
|
416
420
|
|
417
421
|
$.fn.edittable.tableRight = function() {
|
418
422
|
activeElement.removeClass('center');
|
419
423
|
activeElement.removeClass('left');
|
420
424
|
activeElement.addClass('right');
|
421
|
-
$.fn.edittable.save(
|
425
|
+
$.fn.edittable.save();
|
422
426
|
};
|
423
427
|
|
424
428
|
})(jQuery, this);
|