Small class names and html refactor

This commit is contained in:
Carlos Ruiz
2017-09-19 19:40:50 +02:00
parent 12d34a3ea1
commit cf2dff1013
6 changed files with 24 additions and 26 deletions

View File

@@ -60,7 +60,7 @@
//= require legislation_annotatable
//= require watch_form_changes
//= require followable
//= require flagable
//= require flaggable
//= require documentable
//= require tree_navigator
//= require custom

View File

@@ -1,4 +0,0 @@
App.Flagable =
update: (proposal_id, button) ->
$("#" + proposal_id + " .js-flag-actions-container").html(button).foundation()

View File

@@ -0,0 +1,4 @@
App.Flaggable =
update: (resource_id, button) ->
$("#" + resource_id + " .js-flag-actions").html(button).foundation()

View File

@@ -1,4 +1,3 @@
<span class="js-flag-actions">
<span class="flag-content">
<% if show_flag_action? proposal %>
<a id="flag-expand-proposal-<%= proposal.id %>" data-toggle="flag-drop-proposal-<%= proposal.id %>" title="<%= t('shared.flag') %>">
@@ -18,4 +17,3 @@
</span>
<% end %>
</span>
</span>

View File

@@ -1,2 +1,2 @@
App.Flagable.update("<%= dom_id(@proposal) %>",
App.Flaggable.update("<%= dom_id(@proposal) %>",
"<%= j render("proposals/flag_actions", proposal: @proposal) %>")

View File

@@ -59,7 +59,7 @@
<% if current_user %>
<span class="bullet">&nbsp;&bull;&nbsp;</span>
<span class="js-flag-actions-container">
<span class="js-flag-actions">
<%= render 'proposals/flag_actions', proposal: @proposal %>
</span>
<% end %>