imagine_cms 3.0.28 → 3.0.29

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: 2b0da21ae3d912e76bf2f0cc1f8d440a3bdd1f59
4
- data.tar.gz: 7f17ed79a2c4176c47fd5ebd8bef128256017dc3
3
+ metadata.gz: 24219ad930d053e256b11501afe2189d3fd4a44f
4
+ data.tar.gz: dedcf2149c2a402048ae961a847754bba65a32b0
5
5
  SHA512:
6
- metadata.gz: 43b675abb58a61b18c6c357fffba7fe3c124faeccdb917e653f634ed4641a411924e0678f7d97fe79487907c1d9848de187853da681dd39ca165a4b26bbd7fe7
7
- data.tar.gz: 6828f401fc8713894bbfe52b5edbc3d184203e7cc8a5458bca3e8756146975dc954535a1120233b5c60f683b5f2b3b8d20c6281473da5673f9b1c071979e7aeb
6
+ metadata.gz: 5de4d279f700dc368a8de1c752e0716c49d3be1db81e7991fc971800dcc80eddc7e47f3c3b41e5e5022cc9dad4b16faa13ee66d9ae1fa8b91bd33c7348656e6a
7
+ data.tar.gz: ab20fd03d5344e17614193e6b70155d575328b8b3e3a1ea16dc7bf40420acff6768c39d0a64fff7d27c04957f1fb5a789966a025bbfef6ef0b32e49ea41f1023
@@ -720,37 +720,39 @@ function changeGalleryImage(galleryName, index) {
720
720
  var target = galleryName + '_image_' + index;
721
721
  var caption = galleryName + '_caption_' + index;
722
722
  if (!$(target)) return false;
723
-
723
+
724
724
  var queue = Effect.Queues.get('global');
725
725
  queue.each(function(e) { e.cancel() });
726
-
726
+
727
727
  for (var i = 0; i < gallerySize[galleryName]; i++) {
728
728
  el = $(galleryName + '_image_' + i);
729
729
  if (el.id != target && el.style.display != 'none') Effect.Fade(el, { duration: 0.6 });
730
-
730
+
731
731
  el = $(galleryName + '_thumb_' + i);
732
732
  if (el) {
733
733
  if (i == index) {
734
- el.style.borderColor = 'white';
734
+ el.oldOnmouseover = el.onmouseover;
735
+ el.oldOnmouseout = el.onmouseout;
735
736
  el.onmouseover = null;
736
737
  el.onmouseout = null;
738
+ el.addClassName('current');
737
739
  } else {
738
- el.style.borderColor = '#6B6B6B';
739
- el.onmouseover = function () { this.style.borderColor = 'white' };
740
- el.onmouseout = function () { this.style.borderColor = '#6B6B6B' };
740
+ el.removeClassName('current');
741
+ if (!el.onmouseover) el.onmouseover = el.oldOnmouseover;
742
+ if (!el.onmouseout) el.onmouseout = el.oldOnmouseout;
741
743
  }
742
744
  }
743
745
  }
744
-
746
+
745
747
  Effect.Appear(target, { duration: 0.6 });
746
-
748
+
747
749
  if($(caption).innerHTML != '') {
748
750
  $(galleryName + '_caption').style.display = 'block';
749
751
  $(galleryName + '_caption').innerHTML = $(caption).innerHTML;
750
752
  } else {
751
753
  $(galleryName + '_caption').style.display = 'none';
752
754
  }
753
-
755
+
754
756
  prevIndex = index == 0 ? gallerySize[galleryName] - 1 : index-1;
755
757
  nextIndex = index == gallerySize[galleryName] - 1 ? 0 : index+1;
756
758
  $(galleryName + '_prev_button').onclick = function () { changeGalleryImage(galleryName, prevIndex) };
@@ -1,3 +1,19 @@
1
+ /* obsolete -- use imagine_cms.css */
2
+
3
+ .slideshow { padding: 10px 10px 5px; background-color: #d8d6cd; }
4
+ .slideshow-images { width: 100%; height: 340px; margin: 15px auto; }
5
+ .slideshow-image { width: 450px; height: 340px; position: absolute; }
6
+ .slideshow-thumbs { margin-top: 20px; }
7
+ .slideshow-thumb { float: left; border: 5px solid #fff; margin: 0 5px 5px 0; cursor: pointer; }
8
+ .slideshow-nav { width: 243px; margin: 0 auto; }
9
+ .slideshow-nav-button { cursor: pointer; color: white; }
10
+ .slideshow-caption {
11
+ width: 100%; height: 80px; margin: 0 auto 40px; overflow: auto;
12
+ font-size: 14px; line-height: 18px; padding: 0; text-align: center; color: #fff;
13
+ }
14
+ .slideshow-close { position: absolute; top: -20px; right: -20px; }
15
+ .slideshow cite { font-size: 140%; text-transform: uppercase; font-style: normal; font-weight: bold; color: #F17130; }
16
+
1
17
  .imgCrop_wrap {
2
18
  /* width: 500px; @done_in_js */
3
19
  /* height: 375px; @done_in_js */
@@ -0,0 +1,196 @@
1
+ .slideshow { padding: 10px 10px 5px; background-color: #d8d6cd; }
2
+ .slideshow-images { width: 100%; height: 340px; margin: 15px auto; }
3
+ .slideshow-image { width: 450px; height: 340px; position: absolute; }
4
+ .slideshow-thumbs { margin-top: 20px; }
5
+ .slideshow-thumb { float: left; border: 5px solid #fff; margin: 0 5px 5px 0; cursor: pointer; }
6
+ .slideshow-nav { width: 243px; margin: 0 auto; }
7
+ .slideshow-nav-button { cursor: pointer; color: white; }
8
+ .slideshow-caption {
9
+ width: 100%; height: 80px; margin: 0 auto 40px; overflow: auto;
10
+ font-size: 14px; line-height: 18px; padding: 0; text-align: center; color: #fff;
11
+ }
12
+ .slideshow-close { position: absolute; top: -20px; right: -20px; }
13
+ .slideshow cite { font-size: 140%; text-transform: uppercase; font-style: normal; font-weight: bold; color: #F17130; }
14
+
15
+ .imgCrop_wrap {
16
+ /* width: 500px; @done_in_js */
17
+ /* height: 375px; @done_in_js */
18
+ position: relative;
19
+ cursor: crosshair;
20
+ }
21
+
22
+ /* an extra classname is applied for Opera < 9.0 to fix it's lack of opacity support */
23
+ .imgCrop_wrap.opera8 .imgCrop_overlay,
24
+ .imgCrop_wrap.opera8 .imgCrop_clickArea {
25
+ background-color: transparent;
26
+ }
27
+
28
+ /* fix for IE displaying all boxes at line-height by default, although they are still 1 pixel high until we combine them with the pointless span */
29
+ .imgCrop_wrap,
30
+ .imgCrop_wrap * {
31
+ font-size: 0;
32
+ }
33
+
34
+ .imgCrop_overlay {
35
+ background-color: #000;
36
+ opacity: 0.5;
37
+ filter:alpha(opacity=50);
38
+ position: absolute;
39
+ width: 100%;
40
+ height: 100%;
41
+ }
42
+
43
+ .imgCrop_selArea {
44
+ position: absolute;
45
+ /* @done_in_js
46
+ top: 20px;
47
+ left: 20px;
48
+ width: 200px;
49
+ height: 200px;
50
+ background: transparent url(castle.jpg) no-repeat -210px -110px;
51
+ */
52
+ cursor: move;
53
+ z-index: 2;
54
+ }
55
+
56
+ /* clickArea is all a fix for IE 5.5 & 6 to allow the user to click on the given area */
57
+ .imgCrop_clickArea {
58
+ width: 100%;
59
+ height: 100%;
60
+ background-color: #FFF;
61
+ opacity: 0.01;
62
+ filter:alpha(opacity=01);
63
+ }
64
+
65
+ .imgCrop_marqueeHoriz {
66
+ position: absolute;
67
+ width: 100%;
68
+ height: 1px;
69
+ background: transparent url(/assets/cropper/marqueeHoriz.gif) repeat-x 0 0;
70
+ z-index: 3;
71
+ }
72
+
73
+ .imgCrop_marqueeVert {
74
+ position: absolute;
75
+ height: 100%;
76
+ width: 1px;
77
+ background: transparent url(/assets/cropper/marqueeVert.gif) repeat-y 0 0;
78
+ z-index: 3;
79
+ }
80
+
81
+ /*
82
+ * FIX MARCHING ANTS IN IE
83
+ * As IE <6 tries to load background images we can uncomment the follwoing hack
84
+ * to remove that issue, not as pretty - but is anything in IE?
85
+ * And yes I do know that 'filter' is evil, but it will make it look semi decent in IE
86
+ *
87
+ * html .imgCrop_marqueeHoriz,
88
+ * html .imgCrop_marqueeVert {
89
+ background: transparent;
90
+ filter: Invert;
91
+ }
92
+ * html .imgCrop_marqueeNorth { border-top: 1px dashed #000; }
93
+ * html .imgCrop_marqueeEast { border-right: 1px dashed #000; }
94
+ * html .imgCrop_marqueeSouth { border-bottom: 1px dashed #000; }
95
+ * html .imgCrop_marqueeWest { border-left: 1px dashed #000; }
96
+ */
97
+
98
+ .imgCrop_marqueeNorth { top: 0; left: 0; }
99
+ .imgCrop_marqueeEast { top: 0; right: 0; }
100
+ .imgCrop_marqueeSouth { bottom: 0px; left: 0; }
101
+ .imgCrop_marqueeWest { top: 0; left: 0; }
102
+
103
+
104
+ .imgCrop_handle {
105
+ position: absolute;
106
+ border: 1px solid #333;
107
+ width: 6px;
108
+ height: 6px;
109
+ background: #FFF;
110
+ opacity: 0.5;
111
+ filter:alpha(opacity=50);
112
+ z-index: 4;
113
+ }
114
+
115
+ /* fix IE 5 box model */
116
+ * html .imgCrop_handle {
117
+ width: 8px;
118
+ height: 8px;
119
+ wid\th: 6px;
120
+ hei\ght: 6px;
121
+ }
122
+
123
+ .imgCrop_handleN {
124
+ top: -3px;
125
+ left: 0;
126
+ /* margin-left: 49%; @done_in_js */
127
+ cursor: n-resize;
128
+ }
129
+
130
+ .imgCrop_handleNE {
131
+ top: -3px;
132
+ right: -3px;
133
+ cursor: ne-resize;
134
+ }
135
+
136
+ .imgCrop_handleE {
137
+ top: 0;
138
+ right: -3px;
139
+ /* margin-top: 49%; @done_in_js */
140
+ cursor: e-resize;
141
+ }
142
+
143
+ .imgCrop_handleSE {
144
+ right: -3px;
145
+ bottom: -3px;
146
+ cursor: se-resize;
147
+ }
148
+
149
+ .imgCrop_handleS {
150
+ right: 0;
151
+ bottom: -3px;
152
+ /* margin-right: 49%; @done_in_js */
153
+ cursor: s-resize;
154
+ }
155
+
156
+ .imgCrop_handleSW {
157
+ left: -3px;
158
+ bottom: -3px;
159
+ cursor: sw-resize;
160
+ }
161
+
162
+ .imgCrop_handleW {
163
+ top: 0;
164
+ left: -3px;
165
+ /* margin-top: 49%; @done_in_js */
166
+ cursor: w-resize;
167
+ }
168
+
169
+ .imgCrop_handleNW {
170
+ top: -3px;
171
+ left: -3px;
172
+ cursor: nw-resize;
173
+ }
174
+
175
+ /**
176
+ * Create an area to click & drag around on as the default browser behaviour is to let you drag the image
177
+ */
178
+ .imgCrop_dragArea {
179
+ width: 100%;
180
+ height: 100%;
181
+ z-index: 200;
182
+ position: absolute;
183
+ top: 0;
184
+ left: 0;
185
+ }
186
+
187
+ .imgCrop_previewWrap {
188
+ /* width: 200px; @done_in_js */
189
+ /* height: 200px; @done_in_js */
190
+ overflow: hidden;
191
+ position: relative;
192
+ }
193
+
194
+ .imgCrop_previewWrap img {
195
+ position: absolute;
196
+ }
@@ -1176,13 +1176,12 @@ class Management::CmsController < Management::ApplicationController # :nodoc:
1176
1176
  def create_file_link
1177
1177
  @pg = CmsPage.find_by_id(params[:id])
1178
1178
  localfile = File.join(Rails.root, 'public', 'assets', 'content', @pg.path, File.basename(params[:filename]))
1179
+ @filename = localfile.split('/').map { |s| CGI::escape(s) }.join('/') + "?#{File.mtime(localfile).to_i}"
1179
1180
 
1180
1181
  bucket = ImagineCmsConfig['amazon_s3'][Rails.env]['file_bucket'] rescue nil
1181
1182
  prefix = ImagineCmsConfig['amazon_s3']['file_prefix'] rescue nil
1182
1183
  upload_to_s3(localfile, @pg, bucket, prefix)
1183
1184
 
1184
- @filename = localfile.split('/').map { |s| CGI::escape(s) }.join('/') + "?#{File.mtime(localfile).to_i}"
1185
-
1186
1185
  render :partial => 'create_file_link'
1187
1186
  end
1188
1187
 
@@ -0,0 +1,82 @@
1
+ <%-
2
+ timeout ||= 0
3
+ captions = []
4
+ settings = HashObject.new({})
5
+ path = File.join(Rails.root, 'public', 'images', 'content', @pg.path, name)
6
+
7
+ begin
8
+ captions = YAML.load(File.open(File.join(path, 'captions.yml')).read)
9
+ rescue
10
+ end
11
+
12
+ autoplay = true
13
+ timeout = 6
14
+
15
+ begin
16
+ settings = HashObject.new(YAML.load(File.open(File.join(path, 'settings.yml')).read))
17
+ timeout = settings.slide_duration.to_i
18
+ autoplay = (settings.autoplay == 'true')
19
+ rescue
20
+ end
21
+
22
+ timeout = 5 if timeout < 1
23
+ -%>
24
+ <%= javascript_tag "gallerySize['#{name}'] = #{images.size};" %>
25
+
26
+ <div class="slideshow">
27
+
28
+ <div class="slideshow-images">
29
+ <%- images.each_with_index do |image, index| -%>
30
+ <table width="100%" id="<%= name %>_image_<%= index %>" class="<%= name %>_image slideshow-image" border="0" cellpadding="0" cellspacing="2" style="<%= index > 0 ? 'display: none;' : '' %>">
31
+ <tr>
32
+ <td align="center" style="vertical-align:middle;">
33
+ <%= image_tag '/' + image, :style => "border: 7px solid white" %>
34
+ </td>
35
+ </tr>
36
+ </table>
37
+ <%- end -%>
38
+ <br clear="all" />
39
+ </div>
40
+
41
+ <div id="<%= name %>_caption" class="slideshow-caption" style="<%= "display: none;" if captions[1].blank? %>">
42
+ <%= captions[1] rescue '' %>
43
+ </div>
44
+
45
+ <%- images.each_with_index do |image, index| -%>
46
+ <span id="<%= name %>_caption_<%= index %>" style="display: none;"><%= (captions[index + 1].to_s).gsub("\n", '<br/>') %></span>
47
+ <%- end -%>
48
+
49
+
50
+ <div class="slideshow-nav">
51
+ <table width="100%" cellspacing="0" cellpadding="0" align="center">
52
+ <tr>
53
+ <td id="<%= name %>_prev_button" class="slideshow-nav-button" align="right" onclick="changeGalleryImage('<%= name %>', <%= images.size-1 %>);">
54
+ <img src="/assets/interface/photo_prev.gif" alt="prev" style="float: right; padding-right: 6px;" />
55
+ </td>
56
+ <td id="<%= name %>_play_button" class="slideshow-nav-button" style="<%= autoplay ? ' display: none' : '' %>" align="left" onclick="clearTimeout(galleryTimeouts['<%= name %>']); setTimeout(function () { advanceGallerySlideshow('<%= name %>', <%= timeout*1000 %>); }, <%= timeout*1000 %>); $('<%= name %>_play_button').hide(); $('<%= name %>_pause_button').show();">
57
+ <img src="/assets/interface/photo_play.gif" alt="play" style="float: left" />
58
+ </td>
59
+ <td id="<%= name %>_pause_button" class="slideshow-nav-button" style="<%= autoplay ? '' : ' display: none' %>" align="left" onclick="clearTimeout(galleryTimeouts['<%= name %>']); $('<%= name %>_pause_button').hide(); $('<%= name %>_play_button').show();">
60
+ <img src="/assets/interface/photo_pause.gif" alt="pause" style="float: left;" />
61
+ </td>
62
+ <td id="<%= name %>_next_button" class="slideshow-nav-button" align="left" onclick="changeGalleryImage('<%= name %>', 1);">
63
+ <img src="/assets/interface/photo_next.gif" alt="next" style="float: left; padding-left: 6px;" />
64
+ </td>
65
+ </tr>
66
+ </table>
67
+ </div>
68
+
69
+ <%- unless settings.show_thumbs == 'false' -%>
70
+ <div class="slideshow-thumbs">
71
+ <%- thumbs.each_with_index do |thumb, index| -%>
72
+ <div id="<%= name %>_thumb_<%= index %>" class="<%= name %>_thumb slideshow-thumb<%= index == 0 ? ' current' : '' %>" onmouseover="$(this).addClassName('current');" onmouseout="$(this).removeClassName('current');" onclick="changeGalleryImage('<%= name %>', <%= index %>);">
73
+ <%= image_tag '/' + thumb, :width => 39, :height => 39, :style => "float: left;" %>
74
+ </div>
75
+ <%- end -%>
76
+ <br clear="all" />
77
+ </div>
78
+ <%- end -%>
79
+
80
+ </div>
81
+
82
+ <%= javascript_tag("$('#{name}_play_button').onclick();") if autoplay %>
@@ -1,3 +1,3 @@
1
1
  module ImagineCms
2
- VERSION = "3.0.28"
2
+ VERSION = "3.0.29"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imagine_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.28
4
+ version: 3.0.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Namba
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-30 00:00:00.000000000 Z
11
+ date: 2014-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -165,6 +165,10 @@ files:
165
165
  - app/assets/images/codepress/line-numbers.png
166
166
  - app/assets/images/cropper/marqueeHoriz.gif
167
167
  - app/assets/images/cropper/marqueeVert.gif
168
+ - app/assets/images/interface/photo_next.gif
169
+ - app/assets/images/interface/photo_pause.gif
170
+ - app/assets/images/interface/photo_play.gif
171
+ - app/assets/images/interface/photo_prev.gif
168
172
  - app/assets/images/management/btn_add.gif
169
173
  - app/assets/images/management/btn_archive.gif
170
174
  - app/assets/images/management/btn_delete.gif
@@ -310,6 +314,7 @@ files:
310
314
  - app/assets/stylesheets/codepress/languages/sql.css
311
315
  - app/assets/stylesheets/codepress/languages/text.css
312
316
  - app/assets/stylesheets/cropper.css
317
+ - app/assets/stylesheets/imagine_cms.css
313
318
  - app/assets/stylesheets/imagine_controls.css
314
319
  - app/assets/stylesheets/management.css
315
320
  - app/controllers/cms/content_controller.rb
@@ -329,6 +334,7 @@ files:
329
334
  - app/models/user.rb
330
335
  - app/models/user_group.rb
331
336
  - app/sweepers/cms_content_sweeper.rb
337
+ - app/views/cms/content/_photo_gallery.html.erb
332
338
  - app/views/cms/content/_search.html.erb
333
339
  - app/views/cms/content/_search_result.html.erb
334
340
  - app/views/cms/content/rss_feed.xml.builder