Commit edcc13059b31341eb78e58079ac2322f1142f206
1 parent
014031e1
Exists in
master
and in
21 other branches
Uses modal instead of deprecated colorbox
Showing
4 changed files
with
9 additions
and
4 deletions
Show diff stats
app/helpers/application_helper.rb
| ... | ... | @@ -1316,7 +1316,12 @@ module ApplicationHelper |
| 1316 | 1316 | options[:class] = (options[:class] || '') + ' disabled' |
| 1317 | 1317 | content_tag('a', ' '+content_tag('span', content), options) |
| 1318 | 1318 | else |
| 1319 | - link_to content, url, options | |
| 1319 | + if options[:modal] | |
| 1320 | + options.delete(:modal) | |
| 1321 | + modal_link_to content, url, options | |
| 1322 | + else | |
| 1323 | + link_to content, url, options | |
| 1324 | + end | |
| 1320 | 1325 | end |
| 1321 | 1326 | end |
| 1322 | 1327 | ... | ... |
app/helpers/cms_helper.rb
| ... | ... | @@ -35,7 +35,7 @@ module CmsHelper |
| 35 | 35 | end |
| 36 | 36 | |
| 37 | 37 | def display_spread_button(article) |
| 38 | - expirable_button article, :spread, _('Spread this'), {:action => 'publish', :id => article.id}, {:class => 'colorbox'} | |
| 38 | + expirable_button article, :spread, _('Spread this'), {:action => 'publish', :id => article.id}, {:class => 'colorbox', :modal => true} | |
| 39 | 39 | end |
| 40 | 40 | |
| 41 | 41 | def display_delete_button(article) | ... | ... |
app/views/cms/_published_media_items.html.erb
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | <div class='section-title'> |
| 5 | 5 | <h3><%= header %></h3> |
| 6 | 6 | <% if @recent_files[key].total_pages > 1 %> |
| 7 | - <%= link_to(_('View all'), {:controller => 'cms', :action => 'view_all_media', :profile => profile.identifier, :key => key}, :class => 'view-all colorbox', 'data-key' => key) %> | |
| 7 | + <%= modal_link_to(_('View all'), {:controller => 'cms', :action => 'view_all_media', :profile => profile.identifier, :key => key}, { :class => 'view-all', 'data-key' => key }) %> | |
| 8 | 8 | <% end %> |
| 9 | 9 | </div> |
| 10 | 10 | <%= render :partial => "cms/media_panel/list_published_media_items", :locals => { key: key, show_pagination_links: false } %> | ... | ... |
app/views/content_viewer/_article_toolbar.html.erb
| ... | ... | @@ -18,7 +18,7 @@ |
| 18 | 18 | |
| 19 | 19 | <% if @page.allow_spread?(user) && !remove_content_button(:spread, @page) %> |
| 20 | 20 | <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page.id }) %> |
| 21 | - <%= expirable_button @page, :spread, content_tag( 'span', _('Spread this') ), url, {:class => 'colorbox'} if url %> | |
| 21 | + <%= expirable_button @page, :spread, content_tag( 'span', _('Spread this') ), url, {:class => 'colorbox', :modal => true} if url %> | |
| 22 | 22 | <% end %> |
| 23 | 23 | |
| 24 | 24 | <% if !@page.gallery? && (@page.allow_create?(user) || (@page.parent && @page.parent.allow_create?(user))) %> | ... | ... |