This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ | |
$('.inline').colorbox({ | |
inline:true, | |
width:"50%", | |
}); | |
$(".contact-card:even").addClass("pull-left"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="add-task arrow_box hide"> | |
<%= form_for ([@company, @task]), :remote => true do |f| %> | |
<%= f.label :description %> | |
<%= f.text_field :description, :class => "input-width bottom-border" %> | |
<%= f.label :task_category_id, "Choose a category" %> | |
<%= f.collection_select(:task_category_id, TaskCategory.all, :id, :task_category) %> | |
<%= f.label :due_date %> | |
<%= f.select :due_date_word, ['Today', 'Tomorrow', 'Next Week']%> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="deals-wrapper"> | |
<% @deals.each do |d| %> | |
<div class="deal"> | |
<ul> | |
<li><%= d.value %></li> | |
<li><%= d.background %></li> | |
</ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".deals_status :radio").on('change', function(){ | |
$(this).closest("form").submit(); | |
alert('ss'); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form accept-charset="UTF-8" action="deal_status" class="deals_status" data-remote="true" id="deal22" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"><input name="authenticity_token" type="hidden" value="Nhflt/o9HdfsWXpsSaKddd5yvItOsGtDoFD5N/Rbfns="></div> | |
<input id="deal_id" name="deal_id" type="hidden" value="22"> | |
<input id="state_won" name="state" type="radio" value="won"> | |
<label for="state_won">Won</label> | |
<input checked="checked" id="state_lost" name="state" type="radio" value="lost"> | |
<label for="state_lost">Lost</label> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".deals_status :radio").on('change', function(){ | |
$(this).closest("form").submit(); | |
$(this).prop('checked', true); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= form_tag("deal_status", :remote=>true, :id=>"deal_" + @deal.id.to_s, :class => "deals_status") do %> | |
<%= hidden_field_tag 'deal_id', @deal.id.to_s %> | |
<%= radio_button_tag( :state, "won", @deal.state == 'won' ) %> | |
<%= label_tag( :state_won, "Won" ) %> | |
<%= radio_button_tag( :state, "lost", @deal.state == 'lost' ) %> | |
<%= label_tag( :state_lost, "Lost" ) %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def deal_status | |
deal_id = params[:deal_id] | |
d = Deal.find_by_id(deal_id) | |
d.state = params[:state] | |
d.save | |
@deal_id = deal_id | |
@deal = d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= form_tag ("deal_status"), :remote => true, :class => "deals_status" do %> | |
<%= hidden_field_tag 'deal_id', d.id.to_s %> | |
<%= radio_button_tag( :state, "won"+d.id.to_s, d.state == "won", :class => "toggle-btn-left toggle-btn", :value =>"won") %> | |
<%= label_tag 'state_won'+d.id.to_s, "won", :class=>"btn" %> | |
<%= radio_button_tag :state, "lost"+d.id.to_s, d.state == 'lost', :class => "toggle-btn-center toggle-btn",:value => "lost" %> | |
<%= label_tag 'state_lost'+d.id.to_s, "lost",:class=>"btn" %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tasks_tasklist /tasks/tasklist(.:format) tasks#image_gallery | |
tasks_status POST /tasks/status(.:format) tasks#status | |
companies_deal_status POST /companies/deal_status(.:format) companies#deal_status | |
companies_status POST /companies/status(.:format) companies#status | |
deals GET /deals(.:format) deals#index | |
POST /deals(.:format) deals#create | |
new_deal GET /deals/new(.:format) deals#new | |
edit_deal GET /deals/:id/edit(.:format) deals#edit | |
deal GET /deals/:id(.:format) deals#show | |
PUT /deals/:id(.:format) deals#update |