mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
fix #1181. The project listing now had the small drag handle and all the controls to the left.
This commit is contained in:
parent
8b13ee88ab
commit
e935066c18
6 changed files with 18 additions and 28 deletions
|
|
@ -455,7 +455,7 @@ class StatsController < ApplicationController
|
|||
@completed_actions = current_user.todos.completed.find(:all, { :select => "completed_at, created_at" })
|
||||
|
||||
actions_sum, actions_max = 0,0
|
||||
actions_min = @completed_actions.first.completed_at - @completed_actions.first.created_at
|
||||
actions_min = @completed_actions.first ? @completed_actions.first.completed_at - @completed_actions.first.created_at : 0
|
||||
|
||||
@completed_actions.each do |r|
|
||||
actions_sum += (r.completed_at - r.created_at)
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ module ApplicationHelper
|
|||
def link_to_edit_project (project, descriptor = sanitize(project.name))
|
||||
link_to(descriptor,
|
||||
url_for({:controller => 'projects', :action => 'edit', :id => project.id}),
|
||||
{:id => "link_edit_#{dom_id(project)}", :class => "project_edit_settings"})
|
||||
{:id => "link_edit_#{dom_id(project)}", :class => "project_edit_settings icon"})
|
||||
end
|
||||
|
||||
def link_to_edit_context (context, descriptor = sanitize(context.name))
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ module ProjectsHelper
|
|||
project_path(project, :format => 'js'),
|
||||
{
|
||||
:id => "delete_project_#{project.id}",
|
||||
:class => "delete_project_button",
|
||||
:class => "delete_project_button icon",
|
||||
:x_confirm_message => t('projects.delete_project_confirmation', :name => project.name),
|
||||
:title => t('projects.delete_project_title')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,27 +6,17 @@ suppress_delete_button ||= false
|
|||
-%>
|
||||
<div id="<%= dom_id(project, "container") %>" class="list">
|
||||
<div id="<%= dom_id(project) %>" class="project sortable_row" style="display:block">
|
||||
|
||||
<% unless suppress_drag_handle -%>
|
||||
<div class="position">
|
||||
<span class="handle"><%= t('common.drag_handle') %></span>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
||||
|
||||
<div class="data">
|
||||
<%= suppress_delete_button ? "" : link_to_delete_project(project, image_tag( "blank.png", :title => t('projects.delete_project_title'), :class=>"delete_item")) %>
|
||||
<%= suppress_edit_button ? "" : link_to_edit_project(project, image_tag( "blank.png", :title => t('projects.edit_project_title'), :class=>"edit_item")) %>
|
||||
<%= image_tag('grip.png',
|
||||
:width => '7', :height => '16', :border => '0',
|
||||
:title => t('common.drag_handle'), :class => 'grip') unless suppress_drag_handle -%>
|
||||
<div class="project_description">
|
||||
<span class="<%= needsreview_class( project ) %>">
|
||||
<%= link_to_project( project ) %>
|
||||
<%= " (" + count_undone_todos_and_notes_phrase(project,"actions") + ")" %>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="buttons">
|
||||
<span class="grey"><%= project.aasm_current_state.to_s.upcase %></span>
|
||||
<%= suppress_delete_button ? "" : link_to_delete_project(project, image_tag( "blank.png", :title => t('projects.delete_project_title'), :class=>"delete_item")) %>
|
||||
<%= suppress_edit_button ? "" : link_to_edit_project(project, image_tag( "blank.png", :title => t('projects.edit_project_title'), :class=>"edit_item")) %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="<%= dom_id(project, 'edit') %>" class="edit-form" style="display:none;"></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -806,7 +806,7 @@ var ProjectListPage = {
|
|||
/* make the three lists of project sortable */
|
||||
$(['active', 'hidden', 'completed']).each(function() {
|
||||
$("#list-"+this+"-projects").sortable({
|
||||
handle: '.handle',
|
||||
handle: '.grip',
|
||||
update: update_order
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -426,13 +426,13 @@ input.item-checkbox {
|
|||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.rec_description, .description {
|
||||
.rec_description, .description, .project_description {
|
||||
margin-left: 80px;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
.rec_description {
|
||||
margin-left: 80px;
|
||||
.project_description {
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
.stale_l1 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue