scrivito_table_widget 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4f784f71fa91ad643cb5d419eb622b6ad5a3257
|
4
|
+
data.tar.gz: 4a77f6cc2b58a2abc8e250376ed4e86badc4ebfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 889691053b3913e9366ca2db203e632cb2744bd85438cd21dd23bdfa4360e25668eb499e4b69348ecdab9b84df424abc3e8d7a2ae34becb02aa8b2757916aca1
|
7
|
+
data.tar.gz: 1a4a876e771dfe2f148ba004ee9d098f2e2f6bd66c3d0a1f07a4c076b4bbaf074719364807433e8916180d679ef3bb1a37f69d568f682e768b71535e89b7e51f
|
@@ -97,7 +97,7 @@
|
|
97
97
|
}
|
98
98
|
|
99
99
|
$.fn.edittable.clear = function() {
|
100
|
-
if(initialized) {
|
100
|
+
if(initialized && activeTable.length > 0) {
|
101
101
|
var text = activeTable.get(0).outerHTML;
|
102
102
|
var field = cmsField;
|
103
103
|
activeTable = null;
|
@@ -110,6 +110,9 @@
|
|
110
110
|
cols = 0;
|
111
111
|
return {text: text, cmsField: field};
|
112
112
|
}
|
113
|
+
else {
|
114
|
+
initialized = false;
|
115
|
+
}
|
113
116
|
}
|
114
117
|
|
115
118
|
$.fn.edittable.save = function() {
|
@@ -282,8 +285,15 @@
|
|
282
285
|
|
283
286
|
$.fn.edittable.addBottom = function() {
|
284
287
|
var newRow = "<tr>"+ new Array(cols + 1).join("<td>Content</td>"); +"</tr>";
|
288
|
+
var insertPoint;
|
289
|
+
|
290
|
+
if (activeElement.closest('thead').length) {
|
291
|
+
insertPoint = activeTable.find("tbody tr").first();
|
292
|
+
} else {
|
293
|
+
insertPoint = activeElement.parents('tr');
|
294
|
+
}
|
285
295
|
|
286
|
-
$(newRow).insertAfter(
|
296
|
+
$(newRow).insertAfter(insertPoint);
|
287
297
|
rows += 1;
|
288
298
|
$.fn.edittable.setButtonPositions();
|
289
299
|
$.fn.edittable.save();
|
@@ -293,7 +303,7 @@
|
|
293
303
|
var pos = activeElement.index();
|
294
304
|
|
295
305
|
activeTable.find("thead tr").each(function(index, row) {
|
296
|
-
$($(row).find("th")[pos]).before("<th>
|
306
|
+
$($(row).find("th")[pos]).before("<th>Headline</th>");
|
297
307
|
});
|
298
308
|
|
299
309
|
activeTable.find("tbody tr").each(function(index, row) {
|
@@ -309,7 +319,7 @@
|
|
309
319
|
var pos = activeElement.index();
|
310
320
|
|
311
321
|
activeTable.find("thead tr").each(function(index, row) {
|
312
|
-
$($(row).find("th")[pos]).after("<th>
|
322
|
+
$($(row).find("th")[pos]).after("<th>Headline</th>");
|
313
323
|
});
|
314
324
|
|
315
325
|
activeTable.find("tbody tr").each(function(index, row) {
|
@@ -414,4 +424,4 @@
|
|
414
424
|
$.fn.edittable.save();
|
415
425
|
};
|
416
426
|
|
417
|
-
})(jQuery, this);
|
427
|
+
})(jQuery, this);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scrivito_table_widget
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scrivito
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: scrivito
|