scrivito_table_widget 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/app/assets/images/table.png +0 -0
- data/app/assets/javascripts/scrivito_table_widget/jquery.edit.table.js +14 -6
- data/app/assets/javascripts/scrivito_table_widget/{editing.js → scripts.js} +0 -0
- data/app/assets/stylesheets/scrivito_table_widget/editing.css +8 -0
- data/app/assets/stylesheets/scrivito_table_widget/styles.css +4 -0
- data/app/views/table_widget/thumbnail.html.erb +8 -10
- data/lib/scrivito_table_widget/version.rb +1 -1
- data/scrivito/migrate/0_create_table_widget.rb +0 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24b2c2773708e0df6476395b505a74b78cc1054f
|
4
|
+
data.tar.gz: dd0e10e569b6413eb902ffac451c4617277fec77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30682abf63cd5eda5168b2ffefeff5aacbc6317d2bad48d9080263301fb9100866cb57cb60e45439855ccd06e087e2a7c5dde528f3a6a457b8410853859b0946
|
7
|
+
data.tar.gz: 4c995dcc44cfc2e49be8608913b4f2de156bc0627d56955a64c9de2f00abfb43416dfc10444e182135d61e580ecbfe1435f5e832dcccf769c56e4641220bf2e8
|
data/README.md
CHANGED
@@ -14,7 +14,11 @@ Add this line to your application's `Gemfile`:
|
|
14
14
|
|
15
15
|
Add this line to your editing javascript manifest:
|
16
16
|
|
17
|
-
/= require scrivito_table_widget/
|
17
|
+
/= require scrivito_table_widget/scripts
|
18
|
+
|
19
|
+
Add this line to your application stylesheet manifest:
|
20
|
+
|
21
|
+
/= require scrivito_table_widget/styles
|
18
22
|
|
19
23
|
After that, execute:
|
20
24
|
|
Binary file
|
@@ -92,6 +92,7 @@
|
|
92
92
|
initialized = false;
|
93
93
|
cmsField = null;
|
94
94
|
$('.edit-table').remove();
|
95
|
+
$('.helper-line').remove();
|
95
96
|
rows = 0;
|
96
97
|
cols = 0;
|
97
98
|
return {text: text, cmsField: field};
|
@@ -113,11 +114,11 @@
|
|
113
114
|
}
|
114
115
|
|
115
116
|
$.fn.edittable.buttonsEdit = function() {
|
116
|
-
return $.fn.edittable.button("", "
|
117
|
-
$.fn.edittable.button("", "
|
118
|
-
$.fn.edittable.button("", "
|
119
|
-
$.fn.edittable.button("", "
|
120
|
-
$.fn.edittable.button("", "
|
117
|
+
return $.fn.edittable.button("bold", "", "table-bold") +
|
118
|
+
$.fn.edittable.button("italic", "", "table-italic") +
|
119
|
+
$.fn.edittable.button("align-left", "", "table-left") +
|
120
|
+
$.fn.edittable.button("align-center", "", "table-center") +
|
121
|
+
$.fn.edittable.button("align-right", "", "table-right");
|
121
122
|
}
|
122
123
|
|
123
124
|
$.fn.edittable.buttonsBottom = function() {
|
@@ -134,7 +135,8 @@
|
|
134
135
|
}
|
135
136
|
|
136
137
|
$.fn.edittable.buttonsMain = function() {
|
137
|
-
return $.fn.edittable.button("
|
138
|
+
return $.fn.edittable.button("pencil", "", "edit-the-table alert-gray") +
|
139
|
+
$.fn.edittable.button("none", "striped", "stripe-table alert-gray") +
|
138
140
|
$.fn.edittable.button("none", "condenced", "condence-table alert-gray") +
|
139
141
|
$.fn.edittable.button("none", "hover", "hover-table alert-gray") +
|
140
142
|
$.fn.edittable.button("none", "border", "border-table alert-gray") +
|
@@ -177,6 +179,8 @@
|
|
177
179
|
$('.table-widget').find('.table-center').on('click', function() { $.fn.edittable.tableCenter(); });
|
178
180
|
$('.table-widget').find('.table-right').on('click', function() { $.fn.edittable.tableRight(); });
|
179
181
|
|
182
|
+
$('.table-widget').find('.edit-the-table').on('click', function() { $.fn.edittable.toggleTableOptions(); });
|
183
|
+
|
180
184
|
$('.table-widget').find('.add-left, .add-right').on('mouseover', function() { $.fn.edittable.addHoverVerticalAdd($(this)); });
|
181
185
|
$('.table-widget').find('.add-top, .add-bottom').on('mouseover', function() { $.fn.edittable.addHoverHorizontalAdd($(this)); });
|
182
186
|
|
@@ -245,6 +249,10 @@
|
|
245
249
|
* Button methods
|
246
250
|
****/
|
247
251
|
|
252
|
+
$.fn.edittable.toggleTableOptions = function() {
|
253
|
+
$('.table-options.main div').not(':first').fadeToggle(100);
|
254
|
+
}
|
255
|
+
|
248
256
|
$.fn.edittable.bold = function() {
|
249
257
|
activeElement.toggleClass('bold');
|
250
258
|
$.fn.edittable.save(cmsField);
|
File without changes
|
@@ -1,13 +1,11 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
|
4
|
-
</div>
|
1
|
+
<div class="scrivito_editing_widget_visualization">
|
2
|
+
<%= image_tag("table.png") %>
|
3
|
+
</div>
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
<div class="scrivito_editing_widget_title">
|
6
|
+
Table
|
7
|
+
</div>
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
</div>
|
9
|
+
<div class="scrivito_editing_widget_description">
|
10
|
+
Add an inline editable table to your page.
|
13
11
|
</div>
|
@@ -6,7 +6,6 @@ class CreateTableWidget < ::Scrivito::Migration
|
|
6
6
|
is_binary: false,
|
7
7
|
title: 'TableWidget',
|
8
8
|
attributes: [
|
9
|
-
{name: "style", type: "enum", values: ["table","table-striped","table-bordered","table-hover","table-condensed"]},
|
10
9
|
{name: "table", type: "html"}
|
11
10
|
],
|
12
11
|
)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scrivito_table_widget
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scrivito
|
@@ -62,12 +62,14 @@ files:
|
|
62
62
|
- LICENSE
|
63
63
|
- README.md
|
64
64
|
- Rakefile
|
65
|
+
- app/assets/images/table.png
|
65
66
|
- app/assets/javascripts/scrivito_table_widget/createTable.js
|
66
|
-
- app/assets/javascripts/scrivito_table_widget/editing.js
|
67
67
|
- app/assets/javascripts/scrivito_table_widget/jquery.edit.table.js
|
68
|
+
- app/assets/javascripts/scrivito_table_widget/scripts.js
|
68
69
|
- app/assets/javascripts/scrivito_table_widget/tableEditor.js
|
69
70
|
- app/assets/stylesheets/scrivito_table_widget/application.css
|
70
71
|
- app/assets/stylesheets/scrivito_table_widget/editing.css
|
72
|
+
- app/assets/stylesheets/scrivito_table_widget/styles.css
|
71
73
|
- app/models/table_widget.rb
|
72
74
|
- app/views/table_widget/details.html.erb
|
73
75
|
- app/views/table_widget/show.html.erb
|