cortex-plugins-core 0.9.1 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 42fefb19a3e4ba0108019141f7dd337368e337f4
4
- data.tar.gz: 5415a13a52f2fb77dc481df4153019a8288b0c47
3
+ metadata.gz: e2bc26a1367433e86202de829fb12807904851f1
4
+ data.tar.gz: 387e17d0795c2011582759c393c1b2092e46a050
5
5
  SHA512:
6
- metadata.gz: '0390b31b219b1971df70590f1252b4097e5d289327c863d4b94acce1b645493c541a8d052514d1d83b883807e29d26b15afb4d5dd3359343944aebe8cd5dac4b'
7
- data.tar.gz: ef8de171358afa14ee9a59b7a409eeda3c09de8dbe552a66f5f463971d8067062c1f711d07a24e33da0593f2a4dfc010186773324ac669c0084e8f41fd075eea
6
+ metadata.gz: e7ab2f2f4b14fd5cc30cccaf431424601560303f4360493bee5627b5edeaf772f677e950c35161044767b8097df11b9eda5bfa379aeac064f0cc9e0446cac599
7
+ data.tar.gz: 7ba6d872a21da3fedc7981c9cfed4675cf008246131aa2dddf9acd898c59c8fe4aaac9157e4ca5c39445708ae24bff864ab8d43cd950640a9db8ffa8e6c26edc
@@ -49,14 +49,16 @@
49
49
 
50
50
  editor.addCommand('insertMedia', {
51
51
  exec: function (editor) {
52
- window.MODALS.wysiwyg.open();
52
+ global.blur_backdrop();
53
+ global.dialogs.wysiwyg.showModal();
53
54
 
54
55
  global.media_select = {};
55
56
  global.media_select_defer = $.Deferred();
56
57
  global.media_select_defer.promise(global.media_select);
57
58
 
58
59
  global.media_select.done(function (media) {
59
- window.MODALS.wysiwyg.close();
60
+ global.unblur_backdrop();
61
+ global.dialogs.wysiwyg.close();
60
62
 
61
63
  editor.execCommand('media', {
62
64
  startupData: {
@@ -1,19 +1,30 @@
1
- $('.media-select--featured').click(function (elem) {
2
- var id = $(this).data().id;
3
- var title = $(this).data().title;
4
- var thumb_url = $(this).data().thumb;
1
+ (function (global) {
2
+ 'use strict';
5
3
 
6
- $(".association_content_item_id").val(id);
4
+ $("#featured-button__select").on("click", function (event) {
5
+ event.preventDefault();
6
+ global.blur_backdrop();
7
+ global.dialogs.featured.showModal();
8
+ });
7
9
 
8
- $('.content-item-button__selection').remove();
9
- $('.content-item-button').append(
10
- '<div class="content-item-button__selection">' +
11
- '<img src="' + thumb_url + '" height="50px">' +
12
- '<div class="content-item-button__selection__text">' +
13
- 'Selected Media: ' +
14
- title +
15
- '</div></div>'
16
- );
10
+ $('.media-select--featured').click(function (elem) {
11
+ var id = $(this).data().id;
12
+ var title = $(this).data().title;
13
+ var thumb_url = $(this).data().thumb;
17
14
 
18
- window.MODALS.featured.close();
19
- });
15
+ $(".association_content_item_id").val(id);
16
+
17
+ $('.content-item-button__selection').remove();
18
+ $('.content-item-button').append(
19
+ '<div class="content-item-button__selection">' +
20
+ '<img src="' + thumb_url + '" height="50px">' +
21
+ '<div class="content-item-button__selection__text">' +
22
+ 'Selected Media: ' +
23
+ title +
24
+ '</div></div>'
25
+ );
26
+
27
+ global.unblur_backdrop();
28
+ global.dialogs.featured.close();
29
+ });
30
+ }(this));
@@ -0,0 +1,15 @@
1
+ (function (global) {
2
+ 'use strict';
3
+
4
+ $('.media-select--wysiwyg').on("click", function (event) {
5
+ event.preventDefault();
6
+ var element = $(this),
7
+ id = element.data().id,
8
+ title = element.data().title,
9
+ url = element.data().url,
10
+ alt = element.data().alt,
11
+ asset_type = element.data().assetType;
12
+
13
+ media_select_defer.resolve({id: id, title: title, url: url, alt: alt, asset_type: asset_type});
14
+ });
15
+ }(this));
@@ -3,7 +3,7 @@
3
3
 
4
4
  = render_label
5
5
  %br
6
- %button.content-item-button.popup--open
6
+ %button.content-item-button#featured-button__select
7
7
  .content-item-button__select.content-item-button__select--selected
8
8
  %i{ class: "material-icons icon" }
9
9
  cloud_upload
@@ -1,7 +1,7 @@
1
1
  module Cortex
2
2
  module Plugins
3
3
  module Core
4
- VERSION = '0.9.1'
4
+ VERSION = '0.10.0'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cortex-plugins-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - CareerBuilder Employer Site & Content Products
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-07 00:00:00.000000000 Z
11
+ date: 2017-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -109,6 +109,7 @@ files:
109
109
  - app/assets/javascripts/ckeditor/turbolinks.js
110
110
  - app/assets/javascripts/cortex-plugins-core/application.js
111
111
  - app/assets/javascripts/cortex-plugins-core/cells/content_item.js
112
+ - app/assets/javascripts/cortex-plugins-core/cells/text.js
112
113
  - app/cells/plugins/core/asset/association.haml
113
114
  - app/cells/plugins/core/asset/input.haml
114
115
  - app/cells/plugins/core/asset_cell.rb