Commit 940273beb45beeb2634f1c01c37148e8a9bd02a9
1 parent
37dd71d9
Exists in
master
and in
5 other branches
Removing unnecessary html class and adapting JS
Removing animations from plugin and unecessary classes Signed-off-by: Álvaro Fernando <alvarofernandoms@gmail.com> Signed-off-by: ArthurJahn <stutrzbecher@gmail.com>
Showing
4 changed files
with
23 additions
and
74 deletions
Show diff stats
public/lib/software-catalog-component.js
... | ... | @@ -3,39 +3,7 @@ modulejs.define('SoftwareCatalogComponent', ['jquery'], function($) { |
3 | 3 | |
4 | 4 | var dispatch_ajax_function; |
5 | 5 | |
6 | - | |
7 | - function show_head_message() { | |
8 | - if ($("#filter-categories-select-catalog").text().length === 0){ | |
9 | - $("#filter-categories-select-catalog").hide(); | |
10 | - $("#filter-option-catalog-software").show(); | |
11 | - }else{ | |
12 | - $("#filter-categories-select-catalog").show(); | |
13 | - $("#filter-option-catalog-software").hide(); | |
14 | - } | |
15 | - } | |
16 | - | |
17 | - | |
18 | - function slideDowsCategoriesOptionAndHideOptionCatalog() { | |
19 | - $("#filter-categories-option").slideDown(); | |
20 | - $("#filter-option-catalog-software").hide(); | |
21 | - } | |
22 | - | |
23 | - | |
24 | - function slideDownCategoriesOptionAndHideCategoriesSelect() { | |
25 | - $("#filter-categories-option").slideDown(); | |
26 | - $("#filter-categories-select-catalog").hide(); | |
27 | - } | |
28 | - | |
29 | - | |
30 | - function slideUpCategoriesAndShowHeadMessage() { | |
31 | - $("#filter-categories-option").slideUp(); | |
32 | - show_head_message(); | |
33 | - } | |
34 | - | |
35 | - | |
36 | 6 | function clearCatalogCheckbox() { |
37 | - $("#filter-categories-option").slideUp(); | |
38 | - $("#filter-option-catalog-software").show(); | |
39 | 7 | $("#group-categories input:checked").each(function() { |
40 | 8 | $(this).prop('checked', false); |
41 | 9 | }); |
... | ... | @@ -45,39 +13,26 @@ modulejs.define('SoftwareCatalogComponent', ['jquery'], function($) { |
45 | 13 | |
46 | 14 | |
47 | 15 | function selectCheckboxCategory(dispatch_ajax) { |
48 | - $("#filter-categories-option").slideUp(); | |
49 | - $("#filter-categories-select-catalog").show(); | |
50 | - $("#filter-option-catalog-software").hide(); | |
51 | - | |
52 | 16 | dispatch_ajax_function(true); |
53 | 17 | } |
54 | 18 | |
55 | 19 | |
56 | 20 | function selectProjectSoftwareCheckbox() { |
57 | - $("#filter-categories-option").slideUp(); | |
58 | - $("#filter-categories-select-catalog").show(); | |
59 | - $("#filter-option-catalog-software").hide(); | |
60 | - | |
61 | 21 | dispatch_ajax_function(true); |
62 | - show_head_message(); | |
63 | 22 | } |
64 | 23 | |
65 | 24 | |
66 | 25 | function set_events() { |
67 | - $("#filter-option-catalog-software").click(slideDowsCategoriesOptionAndHideOptionCatalog); | |
68 | - $("#filter-categories-select-catalog").click(slideDownCategoriesOptionAndHideCategoriesSelect); | |
69 | - $("#close-filter-catalog").click(slideUpCategoriesAndShowHeadMessage); | |
70 | 26 | $("#cleanup-filter-catalg").click(clearCatalogCheckbox); |
71 | 27 | $(".categories-catalog").click(selectCheckboxCategory); |
72 | 28 | $(".project-software").click(selectProjectSoftwareCheckbox); |
73 | 29 | } |
74 | 30 | |
75 | - | |
76 | 31 | return { |
77 | 32 | init: function(dispatch_ajax) { |
78 | 33 | dispatch_ajax_function = dispatch_ajax; |
79 | 34 | set_events(); |
80 | - show_head_message(); | |
81 | 35 | }, |
82 | 36 | } |
83 | 37 | }); |
38 | + | ... | ... |
public/views/search-software-catalog.js
... | ... | @@ -161,10 +161,8 @@ modulejs.define('SearchSoftwareCatalog', ['jquery', 'NoosferoRoot', 'SoftwareCat |
161 | 161 | init: function() { |
162 | 162 | set_events(); |
163 | 163 | catalog_message(); |
164 | - | |
165 | - $("#filter-categories-option").hide(); | |
166 | - | |
167 | 164 | SoftwareCatalogComponent.init(dispatch_search_ajax); |
168 | 165 | } |
169 | 166 | } |
170 | -}); | |
171 | 167 | \ No newline at end of file |
168 | +}); | |
169 | + | ... | ... |
views/search/_catalog_filter.html.erb
1 | 1 | <div id="filter-catalog-software"> |
2 | 2 | |
3 | - <div id="filter-option-catalog-software"><%= _("More options") %></div> | |
4 | - <!--Quando tiver filtros(categorias)selecionados mostrar esta opção: Opções selecionadas--> | |
5 | - | |
6 | - <div id="filter-categories-select-catalog"><%= @message_selected_options %></div> | |
7 | - | |
8 | 3 | <div id="filter-categories-option"> |
9 | - | |
10 | 4 | <div id="filter-categories-catalog"><h4> <%= _("Categories") %> </h4></div> |
11 | - <div id="group-categories"> | |
12 | - <ul> | |
13 | - <% @categories_groupe_one.each do |category| %> | |
14 | - <li> | |
15 | - <%= check_box_tag("selected_categories_id[]", category.id, @selected_categories_id.include?(category.id), :class => "categories-catalog", @enabled_check_box[category] => "true") %> | |
16 | - <span><%= _("#{category.name}") %></span> | |
17 | - </li> | |
18 | - <% end %> | |
19 | - <% @categories_groupe_two.each do |category| %> | |
20 | - <li> | |
21 | - <%= check_box_tag("selected_categories_id[]", category.id, @selected_categories_id.include?(category.id), :class => "categories-catalog", @enabled_check_box[category] => "true") %> | |
22 | - <%= _("#{category.name}") %> | |
23 | - </li> | |
24 | - <% end %> | |
25 | - </ul> | |
26 | - </div> | |
5 | + <div id="group-categories"> | |
6 | + <ul> | |
7 | + <% @categories_groupe_one.each do |category| %> | |
8 | + <li> | |
9 | + <%= check_box_tag("selected_categories_id[]", category.id, @selected_categories_id.include?(category.id), :class => "categories-catalog", @enabled_check_box[category] => "true") %> | |
10 | + <span><%= _("#{category.name}") %></span> | |
11 | + </li> | |
12 | + <% end %> | |
13 | + <% @categories_groupe_two.each do |category| %> | |
14 | + <li> | |
15 | + <%= check_box_tag("selected_categories_id[]", category.id, @selected_categories_id.include?(category.id), :class => "categories-catalog", @enabled_check_box[category] => "true") %> | |
16 | + <%= _("#{category.name}") %> | |
17 | + </li> | |
18 | + <% end %> | |
19 | + </ul> | |
20 | + </div> | |
27 | 21 | |
28 | 22 | <div class="project-software"> <%= _("Software Projects:") %> |
29 | 23 | <label> |
... | ... | @@ -32,7 +26,9 @@ |
32 | 26 | </label> |
33 | 27 | <span class="doubts-catalog-software" title="<%= _('Include software development projects that are not yet officially Brazilian Public Software.') %>">?</span> |
34 | 28 | </div> |
29 | + </div> | |
30 | + <div id="filter-option-catalog-software"><%= _("More options") %></div> | |
31 | + <div id="filter-option-catalog-close"> | |
35 | 32 | <%= button_tag _("Clean up"), :id => "cleanup-filter-catalg", :type => "button" %> |
36 | 33 | <%= button_tag _("Close"), :id => "close-filter-catalog", :type => "button" %> |
37 | 34 | </div> |
38 | - | ... | ... |
views/search/_catalog_result_list.html.erb
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 | |
16 | 16 | <% display = display_filter(name, params[:display]) %> |
17 | 17 | |
18 | - <div class="search-results-innerbox search-results-type-<%= name.to_s.singularize %> <%= 'common-profile-list-block' if SearchHelper::COMMON_PROFILE_LIST_BLOCK.include?(name) %>"> | |
18 | + <div class="search-results-innerbox <%= 'common-profile-list-block' if SearchHelper::COMMON_PROFILE_LIST_BLOCK.include?(name) %>"> | |
19 | 19 | <ul> |
20 | 20 | <% search[:results].each do |hit| %> |
21 | 21 | <% partial = partial_for_class(hit.class, display) %> | ... | ... |