scrivito_pdf_widget 1.0.12 → 1.0.13

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: faf81214dc320a20bf74ac7d95efeeb06b0eded8
4
- data.tar.gz: c130a4ff4a345a14e15e40a9f774ac30ff0eb076
3
+ metadata.gz: f956f48f80e9325207531931b6dc57a17033e180
4
+ data.tar.gz: 5965ff5c1b527dae0cd0d066b6c78dc07040b651
5
5
  SHA512:
6
- metadata.gz: 3913dee2c2a7cc812ffe531ef5092ee480d200c6ef140aac703b03dae352e4d836c28f7f1bea8efa42fe82b2537c038a392b3b95a560527c21506fbf16781bd8
7
- data.tar.gz: c598cc262169c74250bbaee63b407add4100b90dc2606110b594228ae49bba14f15a4e63d1f46c794f74d9b3d2133ba9bf2c5d76e02aa8c2050d8fb2638e0c27
6
+ metadata.gz: acfab0b41a40a4cdf79b468ce0de92103a6075f5d76a7989941f20479224b3e317e6d54db47b806ac6023f89944deb2b5e0a32acf2a1314abbf1658ca11a48bd
7
+ data.tar.gz: b691a6cf796f04a65b9c391aed93e3acf4b2d2e469df427b2b22c95d76f9ac348f7ba23b40a5d8cfd3fc6a213439043e47064ee5ee27efd23567f06ad21fc25e
Binary file
@@ -1,16 +1,11 @@
1
1
  (function($, App) {
2
2
  'use strict';
3
3
 
4
- $(function() {
4
+ scrivito.on('content', function() {
5
5
  if(scrivito.in_editable_view()) {
6
6
  scrivito.register_default_obj_class_for_content_type({
7
7
  'application/pdf': 'Pdf'
8
8
  });
9
-
10
- scrivito.content_browser.filters.pdfs = {
11
- 'title': 'PDF',
12
- 'query': App.scrivito.obj_where('_obj_class', 'equals', 'Pdf')
13
- };
14
9
  }
15
10
  });
16
11
  })(jQuery, this);
@@ -1,3 +1,7 @@
1
1
  class PdfWidget < Widget
2
2
  attribute :pdf, :reference
3
+
4
+ def self.filter
5
+ {_obj_class: {field: '_obj_class', options: {images: {selected: true, title: 'Pdfs', value: 'Pdf'}}}}
6
+ end
3
7
  end
@@ -1,2 +1,2 @@
1
1
  <h4>Select PDF</h4>
2
- <%= scrivito_tag(:div, widget, :pdf) %>
2
+ <%= scrivito_tag(:div, widget, :pdf, data: {filter: PdfWidget.filter}) %>
@@ -1,13 +1,3 @@
1
- <div class="editing-dialog-thumbnail">
2
- <div class="visualization">
3
- <span class="icon editing-icon-pdf"></span>
4
- </div>
5
-
6
- <div class="title">
7
- PDF
8
- </div>
9
-
10
- <div class="description">
11
- Display a PDF on your page.
12
- </div>
13
- </div>
1
+ <%= scrivito_thumbnail 'PDF', image_tag("pdf.png") do %>
2
+ Display a PDF on your page.
3
+ <% end %>
@@ -1,3 +1,3 @@
1
1
  module ScrivitoPdfWidget
2
- VERSION = "1.0.12"
2
+ VERSION = "1.0.13"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_pdf_widget
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.12
4
+ version: 1.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-21 00:00:00.000000000 Z
11
+ date: 2015-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -61,6 +61,7 @@ extra_rdoc_files: []
61
61
  files:
62
62
  - LICENSE
63
63
  - Rakefile
64
+ - app/assets/images/pdf.png
64
65
  - app/assets/javascripts/scrivito_pdf_widget.js
65
66
  - app/assets/javascripts/scrivito_pdf_widget/application.js
66
67
  - app/assets/javascripts/scrivito_pdf_widget/editing.js