Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%= stylesheet_link_tag "main" %>
- <div id="main">
- <div id="AlertDiv"><h1>Задачи</h1></div>
- <div id="ab">
- <% @proj.each do |product| %>
- <div id="showTodos">
- <h3><%= product.title %></h3>
- <div id="line">
- </div>
- <dl>
- <% @todos.where(id_project: product.id).each do |td| %>
- <%= link_to getForm_url, remote: true,:class => 'specific_service',
- :data => {:id => td.id},:onclick =>
- " var id = $(this).data('id');
- alert(id);
- var thisInput = $(this).find('input[type=checkbox]');
- var checked = thisInput.is(':checked');
- thisInput[0].checked = (checked) ? false : true;
- var latDisplay = document.getElementById('id_todo');
- latDisplay.value = id;
- var latDisplay = document.getElementById('todo_completed');
- latDisplay.value = checked;
- $('#form_post_id').submit();" do %>
- <div id="my-div">
- <%= form_for :article, url: postForm_url,:method=> 'post',remote:true, :html => {:id=>'form_post_id'}, class: "nifty_form" do |f| %>
- <%=hidden_field_tag :id_todo %>
- <%=hidden_field_tag :todo_completed %>
- <dd>
- <div class="row"><input type="checkbox" value="<%=td.id %>> <span id="span"><%= td.text %></span></div>
- </dd>
- <script type="application/javascript">
- var isCompleted = <%=td.isCompleted%>;
- var thisInput = $(187).find('input[type=checkbox]');
- var id = thisInput.attr('value');
- alert(id);
- </script>
- <% end %>
- </div>
- <% end %>
- <% end %>
- </dl>
- </div>
- <% end %>
- </div>
- <h3>Новая задача</h3>
- <%= link_to new_post_path,remote:true,id:"new_link2" do %>
- <%= image_tag "addTodoIcon.png", class: "some css class here" %>
- <% end %>
- <div id="without_button" style="display: none">
- <%= form_for :post1, url: posts_path,:method=> 'post', :html => {:id=>'form_id'} do |f| %>
- <p><%= f.text_field :text, placeholder: "Название задачи.." %></p>
- <%= f.collection_select :category, Project.all, :id, :title, id: "1234" %>
- <p>
- <%= link_to "ОТМЕНА",posts_path, remote: true, id:"new_link" %>
- <%= link_to 'ОК', "#", :onclick => "$('#form_id').submit()" %>
- </p>
- </div>
- <% end %>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement