diff --git a/src/lang/class.default.php b/src/lang/class.default.php index fc22905..83bced0 100644 --- a/src/lang/class.default.php +++ b/src/lang/class.default.php @@ -86,6 +86,7 @@ class DefaultLang 'list_showcompleted' => "Show completed tasks", 'list_clearcompleted' => "Clear completed tasks", 'list_select' => "Select list", + 'list_exportcsv' => "Export to CSV", 'alltags' => "All tags:", 'alltags_show' => "Show all", 'alltags_hide' => "Hide all", diff --git a/src/lang/en.php b/src/lang/en.php index bee63c1..7103245 100644 --- a/src/lang/en.php +++ b/src/lang/en.php @@ -88,6 +88,7 @@ class Lang extends DefaultLang 'list_showcompleted' => "Show completed tasks", 'list_clearcompleted' => "Clear completed tasks", 'list_select' => "Select list", + 'list_exportcsv' => "Export to CSV", 'alltags' => "All tags:", 'alltags_show' => "Show all", 'alltags_hide' => "Hide all", diff --git a/src/mytinytodo.js b/src/mytinytodo.js index 0cfdf33..a02e780 100644 --- a/src/mytinytodo.js +++ b/src/mytinytodo.js @@ -891,6 +891,7 @@ function listMenuClick(el, menu) case 'btnRenameList': renameCurList(); break; case 'btnDeleteList': deleteCurList(); break; case 'btnPublish': publishCurList(); break; + case 'btnExportCSV': exportCurListToCSV(); break; case 'btnShowCompleted': showCompletedToggle(); break; case 'btnClearCompleted': clearCompleted(); break; case 'sortByHand': setSort(0); break; @@ -1680,6 +1681,12 @@ function slmenuSelect(el, menu) }; +function exportCurListToCSV() +{ + if(!curList) return; + window.location.href = _mtt.mttUrl + 'export.php?list='+curList.id +'&format=csv'; +}; + /* Errors and Info messages */ diff --git a/src/themes/default/index.php b/src/themes/default/index.php index 19af6a3..a156766 100644 --- a/src/themes/default/index.php +++ b/src/themes/default/index.php @@ -205,6 +205,7 @@ $().ready(function(){
+