Commit 96cb988ce7ea4ca43cb5fc3f233db8cd54a52ede
1 parent
9c4dd907
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Fix merge with next
Showing
5 changed files
with
8 additions
and
55 deletions
Show diff stats
app/helpers/box_organizer_helper.rb
... | ... | @@ -10,9 +10,9 @@ module BoxOrganizerHelper |
10 | 10 | elsif plugin && File.exists?(File.join(Rails.root, 'public', plugin.public_path, 'images', block.icon_path)) |
11 | 11 | image_path = File.join('/', plugin.public_path, 'images', block.icon_path) |
12 | 12 | elsif File.exists?(File.join(Rails.root, 'public', 'images', block.icon_path)) |
13 | - image_path = block.icon_path | |
13 | + image_path = File.join('images', block.icon_path) | |
14 | 14 | else |
15 | - image_path = block.default_icon_path | |
15 | + image_path = File.join('images', block.default_icon_path) | |
16 | 16 | end |
17 | 17 | |
18 | 18 | image_tag(image_path, height: '48', width: '48', class: 'block-type-icon', alt: '' ) |
... | ... | @@ -33,7 +33,7 @@ module BoxOrganizerHelper |
33 | 33 | images_path = Dir.glob(File.join(Rails.root, 'public', 'images', block.preview_path, '*')) if images_path.empty? |
34 | 34 | images_path = images_path.map{|path| path.gsub(File.join(Rails.root, 'public'), '') } unless images_path.empty? |
35 | 35 | |
36 | - images_path = 1.upto(3).map{block.default_preview_path} if images_path.empty? | |
36 | + images_path = 1.upto(3).map{File.join('images', block.default_preview_path)} if images_path.empty? | |
37 | 37 | |
38 | 38 | content_tag(:ul, |
39 | 39 | images_path.map do |preview| | ... | ... |
app/helpers/layout_helper.rb
... | ... | @@ -28,7 +28,7 @@ module LayoutHelper |
28 | 28 | end |
29 | 29 | |
30 | 30 | def noosfero_javascript |
31 | - plugins_javascripts = @plugins.flat_map{ |plugin| plugin.js_files.map{ |js| plugin.class.public_path(js, true) } }.flatten | |
31 | + plugins_javascripts = @plugins.flat_map{ |plugin| Array.wrap(plugin.js_files).map{ |js| plugin.class.public_path(js, true) } }.flatten | |
32 | 32 | |
33 | 33 | output = '' |
34 | 34 | output += render 'layouts/javascript' | ... | ... |
public/javascripts/application.js
public/javascripts/block_store.js
... | ... | @@ -1,51 +0,0 @@ |
1 | -jQuery(document).ready(function () { | |
2 | - jQuery("#block-types-navigation a.previous").hide(); | |
3 | - jQuery('.block-types-group').first().show( 'slide', { direction : 'down' }, 1000, function() { | |
4 | - jQuery('.block-types-group').first().addClass('active'); | |
5 | - jQuery(".block-types-group.active + .block-types-group").addClass('next'); | |
6 | - jQuery('#block-types-navigation a.previous').click(PreviousSlide); | |
7 | - jQuery('#block-types-navigation a.next').click(NextSlide); | |
8 | - }); | |
9 | - | |
10 | - firstBlockTypesGroup = jQuery(".block-types-group").first(); | |
11 | - lastBlockTypesGroup = jQuery(".block-types-group").last(); | |
12 | -}); | |
13 | - | |
14 | -function NextSlide() { | |
15 | - activeBlockTypesGroup = jQuery(".block-types-group.active"); | |
16 | - nextBlockTypesGroup = jQuery(".block-types-group.next").first(); | |
17 | - | |
18 | - activeBlockTypesGroup.hide( 'slide', { direction : 'left' }, 1000); | |
19 | - nextBlockTypesGroup.show( 'slide', { direction : 'right' }, 1000, function() { | |
20 | - activeBlockTypesGroup.removeClass('active'); | |
21 | - activeBlockTypesGroup.addClass('prev'); | |
22 | - nextBlockTypesGroup.removeClass('next'); | |
23 | - nextBlockTypesGroup.addClass('active'); | |
24 | - jQuery(".block-types-group.active + .block-types-group").addClass('next'); | |
25 | - activeBlockTypesGroup = jQuery(".block-types-group.active"); | |
26 | - jQuery("#block-types-navigation a.previous").show(); | |
27 | - | |
28 | - if ( activeBlockTypesGroup.is( lastBlockTypesGroup ) ) { | |
29 | - jQuery("#block-types-navigation a.next").hide(); | |
30 | - } | |
31 | - }); | |
32 | -} | |
33 | - | |
34 | -function PreviousSlide() { | |
35 | - activeBlockTypesGroup = jQuery(".block-types-group.active"); | |
36 | - previousBlockTypesGroup = jQuery(".block-types-group.prev").last(); | |
37 | - | |
38 | - activeBlockTypesGroup.hide( 'slide', { direction : 'right' }, 1000 ); | |
39 | - previousBlockTypesGroup.show( 'slide', { direction : 'left' }, 1000, function() { | |
40 | - activeBlockTypesGroup.removeClass('active'); | |
41 | - activeBlockTypesGroup.addClass('next'); | |
42 | - previousBlockTypesGroup.removeClass('prev'); | |
43 | - previousBlockTypesGroup.addClass('active'); | |
44 | - activeBlockTypesGroup = jQuery(".block-types-group.active"); | |
45 | - jQuery("#block-types-navigation a.next").show(); | |
46 | - | |
47 | - if ( activeBlockTypesGroup.is( firstBlockTypesGroup ) ) { | |
48 | - jQuery("#block-types-navigation a.previous").hide(); | |
49 | - } | |
50 | - }); | |
51 | -} |