initial changes to add an option to select either context or project as grouping of todos on home or tag page

* new menu item in view menu
* js to toggle view
* store setting in cookie to keep de choice of view persistent
* refactor index and tag page of todos to look more alike
* refactor context and project partials to look more alike
This commit is contained in:
Reinier Balt 2013-03-05 14:04:01 +01:00
parent 55aa387ab9
commit f22dfc1f9b
15 changed files with 160 additions and 84 deletions

View file

@ -318,6 +318,17 @@ var TracksPages = {
}
});
$("a#group_view_by_link").click(function () {
var state = $(this).attr("x_current_group_by")
if(state =='context'){
state='project';
} else {
state='context';
}
$.cookie('group_view_by', state);
refresh_page();
});
/* fade flashes and alerts in automatically */
$(".alert").fadeOut(8000);
}
@ -696,7 +707,7 @@ var ProjectListPage = {
},
setup_behavior: function() {
/* in-place edit of project name */
$('div#project_name').editable(ProjectListPage.save_project_name, {
$('span#project_name').editable(ProjectListPage.save_project_name, {
style: 'padding: 0px; width=100%;',
submit: i18n['common.ok'],
cancel: i18n['common.cancel'],