mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-22 05:50:47 +02:00
get context, dependencies and admin scenarios running
This commit is contained in:
parent
7bce774daa
commit
d7aebf03a0
16 changed files with 49 additions and 40 deletions
|
@ -434,7 +434,7 @@ var TodoItems = {
|
||||||
return confirm(i18n['contexts.new_context_pre'] + givenContextName + i18n['contexts.new_context_post']);
|
return confirm(i18n['contexts.new_context_pre'] + givenContextName + i18n['contexts.new_context_post']);
|
||||||
},
|
},
|
||||||
generate_predecessor: function(todo_id, todo_spec) {
|
generate_predecessor: function(todo_id, todo_spec) {
|
||||||
var img = "<img id=\"delete_dep_"+todo_id+"\" class=\"icon_delete_dep\" src=\""+ relative_to_root('images/blank.png') + "\">";
|
var img = "<img id=\"delete_dep_"+todo_id+"\" class=\"icon_delete_dep\" src=\""+ relative_to_root('assets/blank.png') + "\">";
|
||||||
var anchor = "<a class=\"icon_delete_dep\" id=\""+todo_id+"\" href=\"#\">" + img + "</a>";
|
var anchor = "<a class=\"icon_delete_dep\" id=\""+todo_id+"\" href=\"#\">" + img + "</a>";
|
||||||
var li = "<li style=\"display:none\" id=\"pred_"+todo_id+"\">"+ anchor +" "+ todo_spec + "</li>";
|
var li = "<li style=\"display:none\" id=\"pred_"+todo_id+"\">"+ anchor +" "+ todo_spec + "</li>";
|
||||||
return li;
|
return li;
|
||||||
|
@ -728,7 +728,8 @@ var ProjectListPage = {
|
||||||
};
|
};
|
||||||
$.post(relative_to_root('projects/update/'+project_id), {
|
$.post(relative_to_root('projects/update/'+project_id), {
|
||||||
'project[name]': value,
|
'project[name]': value,
|
||||||
'update_project_name': 'true'
|
'update_project_name': 'true',
|
||||||
|
'_method': 'put'
|
||||||
}, highlight, 'script');
|
}, highlight, 'script');
|
||||||
return(value);
|
return(value);
|
||||||
},
|
},
|
||||||
|
@ -843,8 +844,9 @@ var ContextListPage = {
|
||||||
var highlight = function(){
|
var highlight = function(){
|
||||||
$('div.context span#context_name').effect('highlight', {}, 500);
|
$('div.context span#context_name').effect('highlight', {}, 500);
|
||||||
};
|
};
|
||||||
$.post(relative_to_root('contexts/update/'+context_id), {
|
$.post(relative_to_root('contexts/'+context_id), {
|
||||||
'context[name]': value
|
'context[name]': value,
|
||||||
|
'_method': 'put'
|
||||||
}, highlight);
|
}, highlight);
|
||||||
return value;
|
return value;
|
||||||
},
|
},
|
||||||
|
|
|
@ -259,20 +259,20 @@ input#todo_description, input#todo_tag_list, textarea#todo_notes, select#todo_pr
|
||||||
}
|
}
|
||||||
|
|
||||||
.prev a {
|
.prev a {
|
||||||
background: url(images/previous.png) left center no-repeat;
|
background: url(assets/previous.png) left center no-repeat;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.prev a:hover {
|
.prev a:hover {
|
||||||
background: #cc3334 url(images/previous.png) left center no-repeat;
|
background: #cc3334 url(assets/previous.png) left center no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
.next a {
|
.next a {
|
||||||
text-align:right;
|
text-align:right;
|
||||||
background: url(images/next.png) right center no-repeat;
|
background: url(assets/next.png) right center no-repeat;
|
||||||
padding-right: 20px;
|
padding-right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.next a:hover {
|
.next a:hover {
|
||||||
background: #cc3334 url(images/next.png) right center no-repeat;
|
background: #cc3334 url(assets/next.png) right center no-repeat;
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,7 @@ input.login_text {
|
||||||
width:200px;
|
width:200px;
|
||||||
}
|
}
|
||||||
input.open_id {
|
input.open_id {
|
||||||
background: url(../images/open-id-login-bg.gif) no-repeat;
|
background: url(/assets/open-id-login-bg.gif) no-repeat;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
background-position: 0 50%;
|
background-position: 0 50%;
|
||||||
color: #000;
|
color: #000;
|
||||||
|
|
|
@ -1313,7 +1313,7 @@ button.positive, .widgets a.positive{
|
||||||
}
|
}
|
||||||
|
|
||||||
.blockUI.blockOverlay {
|
.blockUI.blockOverlay {
|
||||||
background-image:url('../images/waiting.gif');
|
background-image:url('/assets/waiting.gif');
|
||||||
background-repeat:no-repeat;
|
background-repeat:no-repeat;
|
||||||
background-position:center center;
|
background-position:center center;
|
||||||
background-color:white;
|
background-color:white;
|
||||||
|
@ -1321,21 +1321,21 @@ button.positive, .widgets a.positive{
|
||||||
}
|
}
|
||||||
|
|
||||||
.bigWaiting {
|
.bigWaiting {
|
||||||
background-image:url('../images/bigWaiting.gif');
|
background-image:url('/assets/bigWaiting.gif');
|
||||||
background-repeat:no-repeat;
|
background-repeat:no-repeat;
|
||||||
background-position:center 20%;
|
background-position:center 20%;
|
||||||
background-color:white;
|
background-color:white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.blackWaiting {
|
.blackWaiting {
|
||||||
background-image:url('../images/blackWaiting.gif');
|
background-image:url('/assets/blackWaiting.gif');
|
||||||
background-repeat:no-repeat;
|
background-repeat:no-repeat;
|
||||||
background-position:center center;
|
background-position:center center;
|
||||||
background-color:black;
|
background-color:black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bigBlackWaiting {
|
.bigBlackWaiting {
|
||||||
background-image:url('../images/bigBlackWaiting.gif');
|
background-image:url('/assets/bigBlackWaiting.gif');
|
||||||
background-repeat:no-repeat;
|
background-repeat:no-repeat;
|
||||||
background-position:center center;
|
background-position:center center;
|
||||||
background-color:black;
|
background-color:black;
|
||||||
|
|
|
@ -190,6 +190,10 @@ class ApplicationController < ActionController::Base
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def sanitize(arg)
|
||||||
|
ActionController::Base.helpers.sanitize(arg)
|
||||||
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def admin_login_required
|
def admin_login_required
|
||||||
|
|
|
@ -28,7 +28,7 @@ class IntegrationsController < ApplicationController
|
||||||
|
|
||||||
def search_plugin
|
def search_plugin
|
||||||
# TODO: ASSET PATH!!
|
# TODO: ASSET PATH!!
|
||||||
@icon_data = [File.open(Rails.root + '/public/images/done.png').read].
|
@icon_data = [File.open(Rails.root + '/app/assets/images/done.png').read].
|
||||||
pack('m').gsub(/\n/, '')
|
pack('m').gsub(/\n/, '')
|
||||||
|
|
||||||
render :layout => false
|
render :layout => false
|
||||||
|
|
|
@ -386,7 +386,7 @@ class TodosController < ApplicationController
|
||||||
@source_view = params['_source_view'] || 'todo'
|
@source_view = params['_source_view'] || 'todo'
|
||||||
@predecessor = current_user.todos.find_by_id(params['predecessor'])
|
@predecessor = current_user.todos.find_by_id(params['predecessor'])
|
||||||
@predecessors = @predecessor.predecessors
|
@predecessors = @predecessor.predecessors
|
||||||
@todo = current_user.todos.find_by_id(params['successor']).includes(Todo::DEFAULT_INCLUDES)
|
@todo = current_user.todos.includes(Todo::DEFAULT_INCLUDES).find_by_id(params['successor'])
|
||||||
@original_state = @todo.state
|
@original_state = @todo.state
|
||||||
unless @predecessor.completed?
|
unless @predecessor.completed?
|
||||||
@todo.add_predecessor(@predecessor)
|
@todo.add_predecessor(@predecessor)
|
||||||
|
@ -757,7 +757,7 @@ class TodosController < ApplicationController
|
||||||
# Set defaults for new_action
|
# Set defaults for new_action
|
||||||
@initial_tags = @tag_name
|
@initial_tags = @tag_name
|
||||||
unless @not_done_todos.empty?
|
unless @not_done_todos.empty?
|
||||||
@context = current_user.contexts.find_by_id(@not_done_todos[0].context_id)
|
@context = current_user.contexts.find(@not_done_todos.first.context_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Set count badge to number of items with this tag
|
# Set count badge to number of items with this tag
|
||||||
|
|
|
@ -43,13 +43,13 @@ class Todo < ActiveRecord::Base
|
||||||
|
|
||||||
# other scopes
|
# other scopes
|
||||||
scope :are_due, :conditions => ['NOT (todos.due IS NULL)']
|
scope :are_due, :conditions => ['NOT (todos.due IS NULL)']
|
||||||
scope :with_tag, lambda { |tag_id| {:joins => :taggings, :conditions => ["taggings.tag_id = ? ", tag_id] } }
|
scope :with_tag, lambda { |tag_id| joins("INNER JOIN taggings ON todos.id = taggings.taggable_id").where("taggings.tag_id = ? ", tag_id) }
|
||||||
scope :with_tags, lambda { |tag_ids| {:conditions => ["EXISTS(SELECT * from taggings t WHERE t.tag_id IN (?) AND t.taggable_id=todos.id AND t.taggable_type='Todo')", tag_ids] } }
|
scope :with_tags, lambda { |tag_ids| where("EXISTS(SELECT * from taggings t WHERE t.tag_id IN (?) AND t.taggable_id=todos.id AND t.taggable_type='Todo')", tag_ids) }
|
||||||
scope :of_user, lambda { |user_id| {:conditions => ["todos.user_id = ? ", user_id] } }
|
# scope :of_user, lambda { |user_id| {:conditions => ["todos.user_id = ? ", user_id] } }
|
||||||
scope :completed_after, lambda { |date| {:conditions => ["todos.completed_at > ?", date] } }
|
# scope :completed_after, lambda { |date| {:conditions => ["todos.completed_at > ?", date] } }
|
||||||
scope :completed_before, lambda { |date| {:conditions => ["todos.completed_at < ?", date] } }
|
# scope :completed_before, lambda { |date| {:conditions => ["todos.completed_at < ?", date] } }
|
||||||
scope :created_after, lambda { |date| {:conditions => ["todos.created_at > ?", date] } }
|
# scope :created_after, lambda { |date| {:conditions => ["todos.created_at > ?", date] } }
|
||||||
scope :created_before, lambda { |date| {:conditions => ["todos.created_at < ?", date] } }
|
# scope :created_before, lambda { |date| {:conditions => ["todos.created_at < ?", date] } }
|
||||||
|
|
||||||
STARRED_TAG_NAME = "starred"
|
STARRED_TAG_NAME = "starred"
|
||||||
DEFAULT_INCLUDES = [ :project, :context, :tags, :taggings, :pending_successors, :uncompleted_predecessors, :recurring_todo ]
|
DEFAULT_INCLUDES = [ :project, :context, :tags, :taggings, :pending_successors, :uncompleted_predecessors, :recurring_todo ]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<Module>
|
<Module>
|
||||||
<ModulePrefs title="Tracks" directory_title="Tracks" description="<%= t('integrations.gmail_description') %>" author="Tracks" author_email="butshesagirl@rousette.org.uk" author_affiliation="Tracks" author_location="UK" title_url="http://www.getontracks.org/" screenshot="http://www.getontracks.org/images/uploads/tracks_home_thumb.png" thumbnail="http://www.getontracks.org/images/uploads/tracks_tickler.png" category="communication" category2="tools" height="300">
|
<ModulePrefs title="Tracks" directory_title="Tracks" description="<%= t('integrations.gmail_description') %>" author="Tracks" author_email="butshesagirl@rousette.org.uk" author_affiliation="Tracks" author_location="UK" title_url="http://www.getontracks.org/" screenshot="http://getontracks.org/images/screens/tracks_home.png" thumbnail="http://getontracks.org/images/screens/tracks_home_thumb.png" category="communication" category2="tools" height="300">
|
||||||
</ModulePrefs>
|
</ModulePrefs>
|
||||||
<Content type="url" href="<%= root_url %>mobile"/>
|
<Content type="url" href="<%= root_url %>mobile"/>
|
||||||
</Module>
|
</Module>
|
|
@ -1,5 +1,5 @@
|
||||||
<div id="display_box">
|
<div id="display_box">
|
||||||
<div id="no_todos_in_view" class="container context" <%= "style=\"display:none\"" unless @not_done_todos.empty? %> >
|
<div id="no_todos_in_view" class="container context" <%= "style=\"display:none\"".html_safe unless @not_done_todos.empty? %> >
|
||||||
<h2><%= t('todos.no_actions_found_title')%></h2>
|
<h2><%= t('todos.no_actions_found_title')%></h2>
|
||||||
<div class="message"><p><%= t('todos.no_actions_with', :tag_name=>@tag_name) %></p></div>
|
<div class="message"><p><%= t('todos.no_actions_with', :tag_name=>@tag_name) %></p></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -29,5 +29,5 @@
|
||||||
|
|
||||||
<div id="input_box">
|
<div id="input_box">
|
||||||
<%= render :partial => "shared/add_new_item_form" %>
|
<%= render :partial => "shared/add_new_item_form" %>
|
||||||
<%= render :file => "sidebar/sidebar.html.erb" %>
|
<%= render :file => "sidebar/sidebar" %>
|
||||||
</div><!-- End of input box -->
|
</div><!-- End of input box -->
|
||||||
|
|
|
@ -4,5 +4,5 @@ rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'pr
|
||||||
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
|
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
|
||||||
%>
|
%>
|
||||||
default: <%= std_opts %> features
|
default: <%= std_opts %> features
|
||||||
wip: --tags @wip:3 --wip features
|
wip: --tags @wip:10 --wip features
|
||||||
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
|
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
|
||||||
|
|
|
@ -112,9 +112,12 @@ Tracksapp::Application.routes.draw do
|
||||||
post 'check_deferred'
|
post 'check_deferred'
|
||||||
post 'filter_to_context'
|
post 'filter_to_context'
|
||||||
post 'filter_to_project'
|
post 'filter_to_project'
|
||||||
|
post 'add_predecessor'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
match 'todos/tag/:name' => 'todos#tag', :as => :tag
|
match 'todos/tag/:name' => 'todos#tag', :as => :tag
|
||||||
|
match 'todos/done/tag/:name' => "todos#done_tag", :as => :done_tag
|
||||||
|
match 'todos/all_done/tag/:name' => "todos#all_done_tag", :as => :all_done_tag
|
||||||
|
|
||||||
resources :recurring_todos do
|
resources :recurring_todos do
|
||||||
member do
|
member do
|
||||||
|
|
4
vendor/assets/stylesheets/superfish.css
vendored
4
vendor/assets/stylesheets/superfish.css
vendored
|
@ -161,7 +161,7 @@ ul.sf-menu li li li.sfHover ul {
|
||||||
height: 10px;
|
height: 10px;
|
||||||
text-indent: -999em;
|
text-indent: -999em;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: url('../images/arrows-ffffff.png') no-repeat -10px -100px; /* 8-bit indexed alpha png. IE6 gets solid image only */
|
background: url('/assets/arrows-ffffff.png') no-repeat -10px -100px; /* 8-bit indexed alpha png. IE6 gets solid image only */
|
||||||
}
|
}
|
||||||
a > .sf-sub-indicator { /* give all except IE6 the correct values */
|
a > .sf-sub-indicator { /* give all except IE6 the correct values */
|
||||||
top: .8em;
|
top: .8em;
|
||||||
|
@ -190,7 +190,7 @@ li.sfHover > a > .sf-sub-indicator {
|
||||||
|
|
||||||
/*** shadows for all but IE6 ***/
|
/*** shadows for all but IE6 ***/
|
||||||
.sf-shadow ul {
|
.sf-shadow ul {
|
||||||
background: url('../images/shadow.png') no-repeat bottom right;
|
background: url('/assets/shadow.png') no-repeat bottom right;
|
||||||
padding: 0 8px 9px 0;
|
padding: 0 8px 9px 0;
|
||||||
-moz-border-radius-bottomleft: 17px;
|
-moz-border-radius-bottomleft: 17px;
|
||||||
-moz-border-radius-topright: 17px;
|
-moz-border-radius-topright: 17px;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue