tenon 1.0.7 → 1.0.8

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: 894387aba75120755e60cf203f663147d8fe8096
4
- data.tar.gz: 59d61b67d710353edd4024185febaafa3d97c271
3
+ metadata.gz: 3dfb548908695c38e60f7abe4b367fc01dfd23ad
4
+ data.tar.gz: 3b459fbfb37b249878e3eb640873d90526f8eb49
5
5
  SHA512:
6
- metadata.gz: 4ff8910d4e089cfdaa33e66565f2885aa099a9db253d2677455a12459cdfeed8c344da4691024478f3eac8a21f7318d6a0c371b5d3bd13a6c20cd78a3635a3a6
7
- data.tar.gz: 748cd5a0cbf9b5a0d76ca187b2eabc38b10811c49aba54c10147f999d2c4848d223b6b186b59a1d605227b5e4158220946f911f1585ee976b0fa9c6cb4d5c7a1
6
+ metadata.gz: 6ff4f71707443668d98d351e48ff8b67c87e43487f28ed6de5be21e0a74e1d5551297abcbe5a49eb26a46e0c15acc9ee17bc791cbc6967b2005615f65a6880b9
7
+ data.tar.gz: 428b4ddb9985664ef8802f824eca53c20c622dbc3a65c557985046e8b97894fe345f30eb53c80e31b76b68732ff62fed409e6efd48be7bc917db5bc1a72e7acc
@@ -0,0 +1,5 @@
1
+ class Tenon.features.tenonContent.AssetLink extends Tenon.features.tenonContent.AssetAttachment
2
+ _setFields: ($li) =>
3
+ $input = @$browseButton.closest('div').find('input')
4
+ $input[0].value = $li.data('style-urls')['original']
5
+ Tenon.mediumEditor.createLink($input[0])
@@ -0,0 +1,65 @@
1
+ MediumEditor.prototype.toolbarFormAnchor = function () {
2
+ var anchor = document.createElement('div'),
3
+ input = document.createElement('input'),
4
+ a = document.createElement('a'),
5
+ button = document.createElement('a');
6
+ icon = document.createElement('i');
7
+
8
+ a.setAttribute('href', '#');
9
+ a.innerHTML = '×';
10
+ a.className = 'medium-editor-cancel';
11
+
12
+ button.id = 'medium-editor-link-to-asset';
13
+ button.setAttribute('href', '/tenon/item_assets/new?hide_upload=true');
14
+ button.setAttribute('data-modal-remote', 'true');
15
+ button.setAttribute('data-tooltip', 'true');
16
+ button.setAttribute('title', 'Link to an Asset');
17
+ button.setAttribute('data-modal-title', 'Link to Asset');
18
+ button.setAttribute('data-modal-handler', 'Tenon.features.tenonContent.AssetLink');
19
+
20
+ icon.className = 'fa fa-file-pdf-o';
21
+
22
+ button.appendChild(icon);
23
+
24
+ input.setAttribute('type', 'text');
25
+ input.setAttribute('placeholder', this.options.anchorInputPlaceholder);
26
+
27
+ anchor.className = 'medium-editor-toolbar-form-anchor';
28
+ anchor.id = 'medium-editor-toolbar-form-anchor';
29
+ anchor.appendChild(input);
30
+ anchor.appendChild(button);
31
+ anchor.appendChild(a);
32
+
33
+ return anchor;
34
+ };
35
+
36
+ MediumEditor.prototype.bindAnchorForm = function () {
37
+ var linkCancel = this.anchorForm.querySelector('a.medium-editor-cancel'),
38
+ self = this;
39
+ this.anchorForm.addEventListener('click', function (e) {
40
+ if ( !$(e.target).is('#medium-editor-link-to-asset *, #medium-editor-link-to-asset') ) {
41
+ e.stopPropagation();
42
+ }
43
+ });
44
+ this.anchorInput.addEventListener('keyup', function (e) {
45
+ if (e.keyCode === 13) {
46
+ e.preventDefault();
47
+ self.createLink(this);
48
+ }
49
+ });
50
+ this.anchorInput.addEventListener('click', function (e) {
51
+ // make sure not to hide form when cliking into the input
52
+ e.stopPropagation();
53
+ self.keepToolbarAlive = true;
54
+ });
55
+ this.anchorInput.addEventListener('blur', function () {
56
+ // self.keepToolbarAlive = false;
57
+ self.checkSelection();
58
+ });
59
+ linkCancel.addEventListener('click', function (e) {
60
+ e.preventDefault();
61
+ self.showToolbarActions();
62
+ restoreSelection(self.savedSelection);
63
+ });
64
+ return this;
65
+ };
@@ -21,6 +21,7 @@
21
21
  //= require jquery.twoLevelSort
22
22
  //= require jquery.ui.sortable
23
23
  //= require medium-editor
24
+ //= require ./medium_customizations
24
25
  //= require select2
25
26
  //= require uri
26
27
 
@@ -16,14 +16,14 @@ $tn-z-content-popped: 1029;
16
16
  $tn-z-tc-sizer: 1029;
17
17
 
18
18
  // modals
19
- $tn-z-modal-backdrop: 1030;
20
- $tn-z-asset-cropping: 1040;
21
- $tn-z-modal: 1040;
22
- $tn-z-modal-dialog: 1050;
19
+ $tn-z-modal-backdrop: 2030;
20
+ $tn-z-asset-cropping: 2040;
21
+ $tn-z-modal: 2040;
22
+ $tn-z-modal-dialog: 2050;
23
23
 
24
24
  // spinners
25
- $tn-z-generic-loader: 1050;
26
- $tn-z-asset-cropping-spinner: 2000;
25
+ $tn-z-generic-loader: 2050;
26
+ $tn-z-asset-cropping-spinner: 3000;
27
27
 
28
28
  // header menu
29
- $tn-z-header-menu: 3000;
29
+ $tn-z-header-menu: 4000;
@@ -1,16 +1,17 @@
1
1
  .modal-tab-pane.tab-content
2
- #upload-asset
3
- %h5 From Your Computer
4
- #progress
5
- = form_for Tenon::Asset.new, format: 'json', builder: Tenon::FormBuilder do |f|
6
- = error_messages_for :asset
7
- .fields.full
8
- .form-group
9
- .browse-button-holder.solo
10
- .fileupload.btn.btn-comp.browse
11
- %span#choose-files Browse
12
- %input{ :type => 'file', :class => 'upload', multiple: defined?(multiple) && multiple, style: 'width: 100%;', name: 'asset[attachment]' }
13
- .spacer
2
+ - unless params[:hide_upload]
3
+ #upload-asset
4
+ %h5 From Your Computer
5
+ #progress
6
+ = form_for Tenon::Asset.new, format: 'json', builder: Tenon::FormBuilder do |f|
7
+ = error_messages_for :asset
8
+ .fields.full
9
+ .form-group
10
+ .browse-button-holder.solo
11
+ .fileupload.btn.btn-comp.browse
12
+ %span#choose-files Browse
13
+ %input{ :type => 'file', :class => 'upload', multiple: defined?(multiple) && multiple, style: 'width: 100%;', name: 'asset[attachment]' }
14
+ .spacer
14
15
 
15
16
  #pick-asset
16
17
  %h5 From the Asset Library
data/lib/tenon/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tenon
2
- VERSION = '1.0.7'
2
+ VERSION = '1.0.8'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tenon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - factor[e] design initiative
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-28 00:00:00.000000000 Z
11
+ date: 2014-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: better_errors
@@ -196,16 +196,16 @@ dependencies:
196
196
  name: rails
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - "~>"
199
+ - - ">="
200
200
  - !ruby/object:Gem::Version
201
- version: '4.0'
201
+ version: 4.0.0
202
202
  type: :runtime
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - "~>"
206
+ - - ">="
207
207
  - !ruby/object:Gem::Version
208
- version: '4.0'
208
+ version: 4.0.0
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: acts-as-taggable-on
211
211
  requirement: !ruby/object:Gem::Requirement
@@ -596,14 +596,14 @@ dependencies:
596
596
  requirements:
597
597
  - - '='
598
598
  - !ruby/object:Gem::Version
599
- version: 0.4.0
599
+ version: 0.9.3
600
600
  type: :runtime
601
601
  prerelease: false
602
602
  version_requirements: !ruby/object:Gem::Requirement
603
603
  requirements:
604
604
  - - '='
605
605
  - !ruby/object:Gem::Version
606
- version: 0.4.0
606
+ version: 0.9.3
607
607
  - !ruby/object:Gem::Dependency
608
608
  name: mime-types
609
609
  requirement: !ruby/object:Gem::Requirement
@@ -952,6 +952,7 @@ files:
952
952
  - app/assets/javascripts/tenon/features/tenon_content.js.coffee
953
953
  - app/assets/javascripts/tenon/features/tenon_content/aesthetics.js.coffee
954
954
  - app/assets/javascripts/tenon/features/tenon_content/asset_attachment.js.coffee
955
+ - app/assets/javascripts/tenon/features/tenon_content/asset_link.js.coffee
955
956
  - app/assets/javascripts/tenon/features/tenon_content/base.js.coffee
956
957
  - app/assets/javascripts/tenon/features/tenon_content/bottombar_toggler.js.coffee
957
958
  - app/assets/javascripts/tenon/features/tenon_content/caption_toggler.js.coffee
@@ -968,6 +969,7 @@ files:
968
969
  - app/assets/javascripts/tenon/features/tenon_content/sortable.js.coffee
969
970
  - app/assets/javascripts/tenon/features/tenon_content/wrapped_sizing.js.coffee
970
971
  - app/assets/javascripts/tenon/features/video_feeds.js.coffee
972
+ - app/assets/javascripts/tenon/medium_customizations.js
971
973
  - app/assets/javascripts/tenon/templates/assets/asset_field.jst.eco
972
974
  - app/assets/javascripts/tenon/templates/assets/asset_progress.jst.eco
973
975
  - app/assets/javascripts/tenon/templates/assets/asset_row.jst.eco
@@ -1434,7 +1436,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1434
1436
  version: '0'
1435
1437
  requirements: []
1436
1438
  rubyforge_project:
1437
- rubygems_version: 2.2.0
1439
+ rubygems_version: 2.2.2
1438
1440
  signing_key:
1439
1441
  specification_version: 4
1440
1442
  summary: A highly flexible mountable Rails CMS built for rapid application development.