mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-28 18:10:15 +01:00
Merge branch 'bsag'
This commit is contained in:
commit
791639b883
1360 changed files with 87015 additions and 64321 deletions
|
|
@ -1,2 +1,2 @@
|
|||
<% context = mobile_context_listing -%>
|
||||
<div id="ctx"><%= link_to context.name, formatted_context_path(context, :m) %><%= " (" + count_undone_todos_phrase(context,"actions") + ")" %></div>
|
||||
<div id="ctx"><%= link_to context.name, context_path(context, :format => 'm') %><%= " (" + count_undone_todos_phrase(context,"actions") + ")" %></div>
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ on importMessage(theMessage)
|
|||
set theSender to the sender of theMessage
|
||||
set theSubject to subject of theMessage
|
||||
if theSubject is equal to "" then set theSubject to emptySubject
|
||||
set theMessageId to message id of theMessage
|
||||
|
||||
-- Construct the description string from the email info
|
||||
set myDesc to "Email " & theSender & " about " & theSubject
|
||||
|
|
@ -42,13 +43,15 @@ on importMessage(theMessage)
|
|||
if length of myDesc > 100 then
|
||||
set myDesc to characters 1 thru 100 of myDesc
|
||||
end if
|
||||
|
||||
set myNote to "message://<" & theMessageId & ">"
|
||||
end try
|
||||
end tell
|
||||
|
||||
-- Now send all that info to Tracks
|
||||
-- Edit the URL of your Tracks installation if necessary"
|
||||
tell application "<%= home_url %>backend/api"
|
||||
set returnValue to call xmlrpc {method name:"NewTodo", parameters:{myUsername, myToken, myContextID, myDesc}}
|
||||
set returnValue to call xmlrpc {method name:"NewTodo", parameters:{myUsername, myToken, myContextID, myDesc, myNote}}
|
||||
end tell
|
||||
|
||||
(* Growl support - comment out or delete this section if
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@
|
|||
<h1><span class="count"><%= @down_count %></span> <%=
|
||||
current_user.time.strftime(@prefs.title_date_format) -%></h1>
|
||||
<div class="nav">
|
||||
<%= (link_to("0-New action", formatted_new_todo_path(:m, new_todo_params))+" | ") unless @new_mobile -%>
|
||||
<%= (link_to("1-Home", formatted_todos_path(:m))+" | ") unless @home -%>
|
||||
<%= (link_to("2-Contexts", formatted_contexts_path(:m))+" | ") -%>
|
||||
<%= (link_to("3-Projects", formatted_projects_path(:m))+" | ") -%>
|
||||
<%= (link_to("0-New action", new_todo_path(new_todo_params, :format => 'm'))+" | ") unless @new_mobile -%>
|
||||
<%= (link_to("1-Home", todos_path(:format => 'm'))+" | ") unless @home -%>
|
||||
<%= (link_to("2-Contexts", contexts_path(:format => 'm'))+" | ") -%>
|
||||
<%= (link_to("3-Projects", projects_path(:format => 'm'))+" | ") -%>
|
||||
<%= (link_to("4-Starred", {:action => "tag", :controller => "todos", :id => "starred.m"})) -%>
|
||||
<% end
|
||||
end -%><%= render_flash -%>
|
||||
|
|
@ -27,15 +27,15 @@
|
|||
<%= yield -%>
|
||||
<hr/><% if !@prefs.nil? -%>
|
||||
<div class="nav">
|
||||
<%= (link_to("Logout", formatted_logout_path(:format => 'm')) +" | ") -%>
|
||||
<%= (link_to("0-New action", formatted_new_todo_path(:m), {:accesskey => "0"})+" | ") unless @new_mobile -%>
|
||||
<%= (link_to("1-Home", formatted_todos_path(:m), {:accesskey => "1"})+" | ") unless @home -%>
|
||||
<%= (link_to("2-Contexts", formatted_contexts_path(:m), {:accesskey => "2"})+" | ") -%>
|
||||
<%= (link_to("3-Projects", formatted_projects_path(:m), {:accesskey => "3"})+" | ") -%>
|
||||
<%= (link_to("Logout", logout_path(:format => 'm')) +" | ") -%>
|
||||
<%= (link_to("0-New action", new_todo_path(:format => 'm'), {:accesskey => "0"})+" | ") unless @new_mobile -%>
|
||||
<%= (link_to("1-Home", todos_path(:format => 'm'), {:accesskey => "1"})+" | ") unless @home -%>
|
||||
<%= (link_to("2-Contexts", contexts_path(:format => 'm'), {:accesskey => "2"})+" | ") -%>
|
||||
<%= (link_to("3-Projects", projects_path(:format => 'm'), {:accesskey => "3"})+" | ") -%>
|
||||
<%= (link_to("4-Starred", {:action => "tag", :controller => "todos", :id => "starred.m"}, {:accesskey => "4"})+" | ") -%>
|
||||
<%= (link_to("Tickler", {:action => "index", :controller => "tickler.m"})+" | ") -%>
|
||||
<%= (link_to("Feeds", {:action => "index", :controller => "feeds.m"})) -%>
|
||||
</div>
|
||||
<% end -%>
|
||||
<%= render :partial => "shared/mobile_footer" -%>
|
||||
</body></html>
|
||||
</body></html>
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
<div id="minilinks">
|
||||
<%= link_to("Toggle notes", "#", {:accesskey => "S", :title => "Toggle all notes", :id => "toggle-notes-nav"}) %>
|
||||
|
|
||||
<%= link_to "Logout (#{current_user.display_name}) »", logout_path %>
|
||||
<%= link_to "Logout (#{current_user.display_name}) »", logout_path %> <p>
|
||||
</div>
|
||||
<div id="navcontainer">
|
||||
<ul class="sf-menu">
|
||||
|
|
@ -103,7 +103,7 @@
|
|||
<%= periodically_call_remote( :url => {:controller => "login", :action => "check_expiry"},
|
||||
:frequency => (5*60)) %>
|
||||
<% end -%>
|
||||
<%= periodically_call_remote( :url => formatted_check_deferred_todos_path(:js),
|
||||
<%= periodically_call_remote( :url => check_deferred_todos_path(:format => 'js'),
|
||||
:method => :post,
|
||||
:frequency => (10*60)) %>
|
||||
<%= yield %>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<% auth_schemes = Tracks::Config.auth_schemes
|
||||
show_database_form = auth_schemes.include?('database')
|
||||
show_openid_form = auth_schemes.include?('open_id')
|
||||
show_cas_form = auth_schemes.include?('cas')
|
||||
-%>
|
||||
|
||||
<div title="Account login" id="loginform" class="form">
|
||||
|
|
@ -8,9 +9,8 @@
|
|||
<%= render_flash %>
|
||||
|
||||
<h3>Please log in to use Tracks:</h3>
|
||||
|
||||
<% if show_database_form %>
|
||||
<div id="database_auth_form" style="display:block">
|
||||
<div id="database_auth_form" style="display:<%=(@prefered_auth.eql?('database')) ? "block" : "none"%>">
|
||||
<% form_tag :action=> 'login' do %>
|
||||
<table>
|
||||
<tr>
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
<% end %>
|
||||
|
||||
<% if show_openid_form %>
|
||||
<div id="openid_auth_form" style="display:none">
|
||||
<div id="openid_auth_form" style="display:<%=(@prefered_auth.eql?('openid')) ? "block" : "none"%>">
|
||||
<% form_tag :action=> 'login' do %>
|
||||
<table>
|
||||
<tr>
|
||||
|
|
@ -54,24 +54,48 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if show_cas_form %>
|
||||
<div id="cas_auth_form" style="display:<%=(@prefered_auth.eql?('cas')) ? "block" : "none"%>">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<% if @username && @user%>
|
||||
<p>Hello, <%= @username %>! You are authenticated.</p>
|
||||
<% elsif @username %>
|
||||
<p>Hello, <%= @username %>! You do not have an account on Tracks.
|
||||
<%if SITE_CONFIG['open_signups']%>
|
||||
If you like to request on please go here to <%= link_to "Request Account" , signup_url %>
|
||||
<%end%>
|
||||
</p>
|
||||
<% else %>
|
||||
<p><%= link_to("CAS Login", login_cas_url) %> </p>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
<% if show_openid_form %><p id="alternate_auth_openid" class="alternate_auth">or, <a href="#" onclick="Login.showOpenid();return false;">login with an OpenId</a></p><% end %>
|
||||
<% if show_database_form %><p id="alternate_auth_database" class="alternate_auth">or, <a href="#" onclick="Login.showDatabase();return false;">go back to the standard login</a></p><% end %>
|
||||
<% if show_cas_form %><p id="alternate_auth_cas" class="alternate_auth">or, <a href="#" onclick="Login.showCAS();return false;">go to the CAS</a></p><% end %>
|
||||
|
||||
<script type="text/javascript">
|
||||
function showPreferredAuth() {
|
||||
var preferredAuth = $.cookie('preferred_auth');
|
||||
var casEnabled = <%= show_cas_form ? 'true' : 'false' %>;
|
||||
var databaseEnabled = <%= show_database_form ? 'true' : 'false' %>;
|
||||
var openidEnabled = <%= show_openid_form ? 'true' : 'false' %>;
|
||||
if (preferredAuth && preferredAuth == 'openid' && openidEnabled) {
|
||||
Login.showOpenid();
|
||||
}
|
||||
else if (databaseEnabled) {
|
||||
else if (preferredAuth && preferredAuth == 'database' && databaseEnabled) {
|
||||
Login.showDatabase();
|
||||
}
|
||||
else if (openidEnabled) {
|
||||
Login.showOpenid();
|
||||
else if (preferredAuth && preferredAuth == 'cas' && casEnabled) {
|
||||
Login.showCAS();
|
||||
}
|
||||
}
|
||||
$(document).ready(showPreferredAuth);
|
||||
|
|
@ -81,7 +105,8 @@ var Login = {
|
|||
$('#database_auth_form').hide();
|
||||
$('#openid_auth_form').show();
|
||||
$('#alternate_auth_openid').hide();
|
||||
$('#alternate_auth_database').show();
|
||||
$('#alternate_auth_database').show(); ;
|
||||
$('#alternate_auth_cas').show();
|
||||
$('#openid_url').focus();
|
||||
$('#openid_url').select();
|
||||
$.cookie('preferred_auth', 'openid');
|
||||
|
|
@ -92,10 +117,21 @@ var Login = {
|
|||
$('#database_auth_form').show();
|
||||
$('#alternate_auth_database').hide();
|
||||
$('#alternate_auth_openid').show();
|
||||
$('#alternate_auth_cas').show();
|
||||
$('#user_login').focus();
|
||||
$('#user_login').select();
|
||||
$.cookie('preferred_auth', 'database');
|
||||
},
|
||||
showCAS: function(container) {
|
||||
$('#database_auth_form').hide();
|
||||
$('#openid_auth_form').hide();
|
||||
$('#cas_auth_form').show();
|
||||
$('#alternate_auth_cas').hide();
|
||||
$('#alternate_auth_openid').show();
|
||||
$('#alternate_auth_database').show();
|
||||
$.cookie('preferred_auth', 'cas');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<% if show_database_form %>
|
||||
<div id="database_auth_form">
|
||||
<% form_tag formatted_login_path(:format => 'm') do %>
|
||||
<% form_tag login_path(:format => 'm') do %>
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="user_login">Login:</label></td>
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
<h4>...or login with an Open ID:</h4>
|
||||
|
||||
<div id="openid_auth_form">
|
||||
<% form_tag formatted_login_path(:format => 'm') do %>
|
||||
<% form_tag login_path(:format => 'm') do %>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="100px"><label for="openid_url">Identity URL:</label></td>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
</div>
|
||||
<div class="mobile_note_info">
|
||||
<br/>
|
||||
<%= link_to("In: " + note.project.name, formatted_project_path(note.project, :m)) %>
|
||||
<%= link_to("In: " + note.project.name, project_path(note.project, :format => 'm')) %>
|
||||
Created: <%= format_date(note.created_at) %>
|
||||
<% if note.updated_at? -%>
|
||||
| Modified: <%= format_date(note.updated_at) %>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
<% note = mobile_notes_summary -%>
|
||||
<div class="note"><%= link_to( truncated_note(note), formatted_note_path(note, :m)) %></div>
|
||||
<div class="note"><%= link_to( truncated_note(note), note_path(note, :format => 'm')) %></div>
|
||||
<% note = nil -%>
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
<div id="<%= dom_id(note, 'container') %>">
|
||||
<h2><%= link_to("Note #{note.id}", note_path(note), :title => "Show note #{note.id}" ) %></h2>
|
||||
<div class="project_notes" id="<%= dom_id(note) %>">
|
||||
<%= sanitize(markdown(auto_link(note.body))) %>
|
||||
|
||||
<%= format_note(note.body) %>
|
||||
|
||||
<div class="note_footer">
|
||||
<%= link_to_remote(
|
||||
image_tag("blank.png",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<% project = mobile_project_listing -%>
|
||||
<div id="pjr"><%=
|
||||
link_to(project.name, formatted_project_path(project)) +
|
||||
" (" + count_undone_todos_and_notes_phrase(project,"actions") + ")" %></div>
|
||||
link_to(project.name, project_path(project, :format => 'm')) +
|
||||
" (" + count_undone_todos_and_notes_phrase(project,"actions") + ")" %></div>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ suppress_edit_button ||= false
|
|||
<div class="buttons">
|
||||
<span class="grey"><%= project.current_state.to_s.upcase %></span>
|
||||
<a class="delete_project_button"
|
||||
href="<%= formatted_project_path(project, :js) %>"
|
||||
href="<%= project_path(project, :format => 'js') %>"
|
||||
title="delete the project '<%= project.name %>'"><%= image_tag( "blank.png",
|
||||
:title => "Delete project",
|
||||
:class=>"delete_item") %></a>
|
||||
|
|
|
|||
|
|
@ -12,15 +12,15 @@ end -%>
|
|||
<% else
|
||||
-%><span class="m_t">
|
||||
<% end -%>
|
||||
<%= date_span -%> <%= link_to mobile_todo.description, formatted_todo_path(mobile_todo, :m) -%>
|
||||
<%= date_span -%> <%= link_to mobile_todo.description, todo_path(mobile_todo, :format => 'm') -%>
|
||||
<% if parent_container_type == 'context' or parent_container_type == 'tag' -%>
|
||||
<%= "<span class=\"prj\"> (" +
|
||||
link_to(mobile_todo.project.name, formatted_project_path(mobile_todo.project, :m)) +
|
||||
link_to(mobile_todo.project.name, project_path(mobile_todo.project, :format => 'm')) +
|
||||
")</span>" unless mobile_todo.project.nil? -%>
|
||||
<% end
|
||||
if parent_container_type == 'project' or parent_container_type == 'tag' -%>
|
||||
<%= "<span class=\"ctx\"> (" +
|
||||
link_to(mobile_todo.context.name, formatted_context_path(mobile_todo.context, :m)) +
|
||||
link_to(mobile_todo.context.name, context_path(mobile_todo.context, :format => 'm')) +
|
||||
")</span>" -%>
|
||||
<% end -%>
|
||||
<%= tag_list_mobile -%>
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ parameters += "&_tag_name=#{@tag_name}" if @source_view == 'tag'
|
|||
<li><%= remote_defer_menu_item(1, todo) %></li>
|
||||
<li><%= remote_defer_menu_item(7, todo) %></li>
|
||||
<% end %>
|
||||
<li><%= remote_promote_to_project_menu_item(todo) %></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<%= link_to(image_tag( 'blank.png', :width=>'16', :height=>'16', :border=>'0' ), "#", {:class => 'show_notes', :title => 'Show notes'}) %>
|
||||
|
||||
<div class="todo_notes" id="<%= dom_id(item, 'notes') %>" style="display:none">
|
||||
<%= sanitize(markdown( auto_link(item.notes)) ) %>
|
||||
<%= format_note(item.notes) %>
|
||||
</div>
|
||||
|
|
@ -17,7 +17,7 @@ if @saved
|
|||
if @new_context_created
|
||||
page.insert_html :top, 'display_box', :partial => 'contexts/context', :locals => { :context => @todo.context, :collapsible => true }
|
||||
else
|
||||
page.call "todoItems.ensureVisibleWithEffectAppear", "c#{@todo.context_id}" if source_view_is_one_of(:todo, :deferred)
|
||||
page.call "todoItems.ensureVisibleWithEffectAppear", "c#{@todo.context_id}" if source_view_is_one_of(:todo, :deferred, :tag)
|
||||
page.insert_html :bottom, item_container_id(@todo), :partial => 'todos/todo', :locals => { :todo => @todo, :parent_container_type => parent_container_type, :source_view => @source_view }
|
||||
page.visual_effect :highlight, dom_id(@todo), :duration => 3
|
||||
page[empty_container_msg_div_id].hide unless empty_container_msg_div_id.nil?
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<% form_tag formatted_todos_path(:m), :method => :post do %>
|
||||
<% form_tag todos_path(:format => 'm'), :method => :post do %>
|
||||
<%= render :partial => 'edit_mobile' %>
|
||||
<p><input type="submit" value="Create" tabindex="12" accesskey="#" /></p>
|
||||
<% end -%>
|
||||
<%= link_to "Back", @return_path %>
|
||||
<%= link_to "Back", @return_path %>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ if @removed
|
|||
# update display if pending->active
|
||||
if @successor.active?
|
||||
page[@successor].remove unless source_view_is_one_of(:todo, :context)
|
||||
page[empty_container_msg_div_id].hide unless empty_container_msg_div_id.nil?
|
||||
page.call "todoItems.ensureVisibleWithEffectAppear", "c#{@successor.context_id}"
|
||||
page.insert_html :bottom, item_container_id(@successor), :partial => 'todos/todo', :locals => {
|
||||
:todo => @successor, :parent_container_type => parent_container_type }
|
||||
page.visual_effect :highlight, dom_id(@successor, 'line'), {'startcolor' => "'#99ff99'"}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<% form_tag formatted_todo_path(@todo, :m), :method => :put do %>
|
||||
<% form_tag todo_path(@todo, :format => 'm'), :method => :put do %>
|
||||
<%= render :partial => 'edit_mobile', :locals => { :parent_container_type => "show_mobile" } %>
|
||||
<p><input type="submit" value="Update" tabindex="6" accesskey="#" /></p>
|
||||
<% end -%>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ if @saved
|
|||
end
|
||||
|
||||
# remove container if empty
|
||||
if @remaining_in_context == 0 && source_view_is(:todo)
|
||||
if @remaining_in_context == 0 && source_view_is_one_of(:todo, :tag)
|
||||
page.visual_effect :fade, "c"+@todo.context.id.to_s, :duration => 0.4
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -8,11 +8,22 @@
|
|||
<h3><%= @heading -%></h3>
|
||||
|
||||
<table>
|
||||
<%if Tracks::Config.auth_schemes.include?('cas') && session[:cas_user]%>
|
||||
<tr>
|
||||
<td><label for="user_login">With your CAS username:</label></td>
|
||||
<td> "<%= session[:cas_user]%>" </td>
|
||||
<td>
|
||||
<%= hidden_field "user", "login", :value => session[:cas_user] %>
|
||||
<%= hidden_field "user", "password", :value => session[:cas_user] %>
|
||||
<%= hidden_field "user", "password_confirmation", :value => session[:cas_user] %>
|
||||
<%= hidden_field"user", "auth_type", :value => "cas" %></td>
|
||||
</tr>
|
||||
<%else%>
|
||||
<tr>
|
||||
<td><label for="user_login">Desired login:</label></td>
|
||||
<td> <%= text_field "user", "login", :size => 20 %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td><label for="user_password">Choose password:</label></td>
|
||||
<td><%= password_field "user", "password", :size => 20 %></td>
|
||||
</tr>
|
||||
|
|
@ -20,6 +31,11 @@
|
|||
<td><label for="user_password_confirmation">Confirm password:</label></td>
|
||||
<td><%= password_field "user", "password_confirmation", :size => 20 %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="user_auth_type">Authentication Type:</label></td>
|
||||
<td><%= select("user", "auth_type", @auth_types, { :include_blank => false })%></td>
|
||||
</tr>
|
||||
<%end%>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input type="submit" id="signup" value="Signup »" class="primary" /></td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue