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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0a4a7b6eb4181e5078406454520df1f294ff8f17
4
- data.tar.gz: 5c514110b283093e0513b47b09046bcec87aca82
3
+ metadata.gz: 24b2c2773708e0df6476395b505a74b78cc1054f
4
+ data.tar.gz: dd0e10e569b6413eb902ffac451c4617277fec77
5
5
  SHA512:
6
- metadata.gz: 6bf3db3474bec28e88a6d0db4fb0f7847b97d37a34d1ce023c030f4d2f1c18c18d3d0e6370e777f53b12c5e40e57ee97426f18042497a418ea8633238fa2c8ea
7
- data.tar.gz: b7f4efc333b40433ef3e85a87f4df66a867a4f5ffc06c583d7510013f9c21ebb25db5a955b92aea09341f94de402c987092c32dea561e0297408a42ba8ab3337
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/editing
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("", "B", "table-bold") +
117
- $.fn.edittable.button("", "I", "table-italic") +
118
- $.fn.edittable.button("", "L", "table-left") +
119
- $.fn.edittable.button("", "C", "table-center") +
120
- $.fn.edittable.button("", "R", "table-right");
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("none", "striped", "stripe-table alert-gray") +
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);
@@ -116,4 +116,12 @@ tr.delete-marker {
116
116
 
117
117
  td.active-field {
118
118
  outline: 2px solid #444;
119
+ }
120
+
121
+ .table-options.main div {
122
+ display: none;
123
+ }
124
+
125
+ .table-options.main div:first-child {
126
+ display: block;
119
127
  }
@@ -0,0 +1,4 @@
1
+ /*
2
+ *= require_tree .
3
+ *= require_self
4
+ */
@@ -1,13 +1,11 @@
1
- <div class="editing-dialog-thumbnail">
2
- <div class="visualization">
3
- <span class="icon editing-icon-headline"></span>
4
- </div>
1
+ <div class="scrivito_editing_widget_visualization">
2
+ <%= image_tag("table.png") %>
3
+ </div>
5
4
 
6
- <div class="title">
7
- Table
8
- </div>
5
+ <div class="scrivito_editing_widget_title">
6
+ Table
7
+ </div>
9
8
 
10
- <div class="description">
11
- A Table.
12
- </div>
9
+ <div class="scrivito_editing_widget_description">
10
+ Add an inline editable table to your page.
13
11
  </div>
@@ -1,3 +1,3 @@
1
1
  module ScrivitoTableWidget
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
@@ -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.0
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