concerto_iframe 0.0.2 → 0.0.3
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
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5e354e2e6ba771ef0dc3efb41cd99ecf68bf23a6
|
4
|
+
data.tar.gz: f5a151bcac7adfa6419b6a4d08721ad4e0307eaf
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 90d2efd9eb633c59285d13c7b4f7abab66fe6b37b04504d9cc398db246ba49ee964bb47e7190939303db8052bebaf6faede406049adc93b394afaae1d8768940
|
7
|
+
data.tar.gz: 2591ef75921d7b0f2a089f838d0a97dfad5b13ada42d79cf080a42172d491628c55ceda6fc9fdcf397137b4cd2df3e52168375d2cd66ac5b8389970a0c8d9907
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
//= require_tree .
|
@@ -0,0 +1,28 @@
|
|
1
|
+
function previewIframe() {
|
2
|
+
// get url for loading preview and url for iframe
|
3
|
+
var url = $('input#iframe_config_url').data('url');
|
4
|
+
var iframe_url = $('input#iframe_config_url').val();
|
5
|
+
if (iframe_url) {
|
6
|
+
// load iframe preview
|
7
|
+
$('#preview_div').load(url, { data: {
|
8
|
+
iframe_url: iframe_url
|
9
|
+
}, type: 'Iframe' });
|
10
|
+
} else {
|
11
|
+
// clear preview when iframe url is not specified
|
12
|
+
$('#preview_div').text("");
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
function resizePreview() {
|
17
|
+
var new_height = $(window).height() * .50;
|
18
|
+
$('#preview_div').height(new_height);
|
19
|
+
}
|
20
|
+
|
21
|
+
function initializeIframeHandlers() {
|
22
|
+
$('input#iframe_config_url').on('blur', previewIframe);
|
23
|
+
$('input#iframe_config_url').on('change', previewIframe);
|
24
|
+
resizePreview();
|
25
|
+
}
|
26
|
+
|
27
|
+
$(document).ready(initializeIframeHandlers);
|
28
|
+
$(document).on('page:change', initializeIframeHandlers);
|
data/app/models/iframe.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
<%= javascript_include_tag "concerto_iframe/application.js" %>
|
1
2
|
<fieldset>
|
2
3
|
<legend><span><%= Iframe::DISPLAY_NAME %></span></legend>
|
3
4
|
<div class="row-fluid">
|
@@ -6,10 +7,10 @@
|
|
6
7
|
<div class="clearfix">
|
7
8
|
<%= config.label :url, 'Url' %>
|
8
9
|
<div class="input">
|
9
|
-
<%= config.text_field :url, :placeholder => "http://www.concerto-signage.org", :class => "input-xxlarge" %>
|
10
|
+
<%= config.text_field :url, :placeholder => "http://www.concerto-signage.org", "data-url" => preview_contents_path , :class => "input-xxlarge" %>
|
10
11
|
</div>
|
11
12
|
</div>
|
12
13
|
</div>
|
13
14
|
<% end %>
|
14
15
|
</div>
|
15
|
-
</fieldset>
|
16
|
+
</fieldset>
|
metadata
CHANGED
@@ -1,39 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: concerto_iframe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Marvin Frederickson
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
13
|
-
default_executable:
|
11
|
+
date: 2014-05-28 00:00:00.000000000 Z
|
14
12
|
dependencies:
|
15
13
|
- !ruby/object:Gem::Dependency
|
16
14
|
name: rails
|
17
|
-
requirement:
|
18
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
19
16
|
requirements:
|
20
17
|
- - ~>
|
21
18
|
- !ruby/object:Gem::Version
|
22
19
|
version: '3.2'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.2'
|
26
27
|
- !ruby/object:Gem::Dependency
|
27
28
|
name: sqlite3
|
28
|
-
requirement:
|
29
|
-
none: false
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
|
-
version_requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
37
41
|
description: Adds support for custom iframes, in Concerto 2
|
38
42
|
email:
|
39
43
|
- marvin.frederickson@gmail.com
|
@@ -41,6 +45,8 @@ executables: []
|
|
41
45
|
extensions: []
|
42
46
|
extra_rdoc_files: []
|
43
47
|
files:
|
48
|
+
- app/assets/javascripts/concerto_iframe/application.js
|
49
|
+
- app/assets/javascripts/concerto_iframe/iframe.js
|
44
50
|
- app/assets/stylesheets/concerto_iframe/application.css
|
45
51
|
- app/controllers/concerto_iframe/application_controller.rb
|
46
52
|
- app/helpers/concerto_iframe/application_helper.rb
|
@@ -93,31 +99,29 @@ files:
|
|
93
99
|
- test/integration/navigation_test.rb
|
94
100
|
- test/test_helper.rb
|
95
101
|
- test/unit/concerto_iframe/iframe_test.rb
|
96
|
-
has_rdoc: true
|
97
102
|
homepage: https://github.com/concerto/concerto-iframe
|
98
103
|
licenses:
|
99
104
|
- Apache 2.0
|
105
|
+
metadata: {}
|
100
106
|
post_install_message:
|
101
107
|
rdoc_options: []
|
102
108
|
require_paths:
|
103
109
|
- lib
|
104
110
|
required_ruby_version: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
111
|
requirements:
|
107
|
-
- -
|
112
|
+
- - '>='
|
108
113
|
- !ruby/object:Gem::Version
|
109
114
|
version: '0'
|
110
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
|
-
none: false
|
112
116
|
requirements:
|
113
|
-
- -
|
117
|
+
- - '>='
|
114
118
|
- !ruby/object:Gem::Version
|
115
119
|
version: '0'
|
116
120
|
requirements: []
|
117
121
|
rubyforge_project:
|
118
|
-
rubygems_version:
|
122
|
+
rubygems_version: 2.0.14
|
119
123
|
signing_key:
|
120
|
-
specification_version:
|
124
|
+
specification_version: 4
|
121
125
|
summary: custom iframe support for Concerto 2
|
122
126
|
test_files:
|
123
127
|
- test/concerto_iframe_test.rb
|