mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
+ export to iCalendar menu item (via submenu)
This commit is contained in:
parent
9a6d274e6c
commit
5074e77861
5 changed files with 22 additions and 9 deletions
|
|
@ -32,7 +32,7 @@ while($r = $q->fetch_assoc($q))
|
|||
|
||||
$format = _get('format');
|
||||
|
||||
if($format = 'ical') printICal($listData, $data);
|
||||
if($format == 'ical') printICal($listData, $data);
|
||||
else printCSV($listData, $data);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,9 @@ class DefaultLang
|
|||
'list_showcompleted' => "Show completed tasks",
|
||||
'list_clearcompleted' => "Clear completed tasks",
|
||||
'list_select' => "Select list",
|
||||
'list_exportcsv' => "Export to CSV",
|
||||
'list_export' => "Export",
|
||||
'list_export_csv' => "CSV",
|
||||
'list_export_ical' => "iCalendar",
|
||||
'list_rssfeed' => "RSS Feed",
|
||||
'alltags' => "All tags:",
|
||||
'alltags_show' => "Show all",
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
Original name: English
|
||||
Author: Max Pozdeev
|
||||
Author Url: http://www.mytinytodo.net
|
||||
AppVersion: v1.4
|
||||
Date: 2010-12-15
|
||||
AppVersion: v1.4b2
|
||||
Date: 2011-01-07
|
||||
*/
|
||||
|
||||
class Lang extends DefaultLang
|
||||
|
|
@ -91,7 +91,9 @@ class Lang extends DefaultLang
|
|||
'list_showcompleted' => "Show completed tasks",
|
||||
'list_clearcompleted' => "Clear completed tasks",
|
||||
'list_select' => "Select list",
|
||||
'list_exportcsv' => "Export to CSV",
|
||||
'list_export' => "Export",
|
||||
'list_export_csv' => "CSV",
|
||||
'list_export_ical' => "iCalendar",
|
||||
'list_rssfeed' => "RSS Feed",
|
||||
'alltags' => "All tags:",
|
||||
'alltags_show' => "Show all",
|
||||
|
|
|
|||
|
|
@ -1152,7 +1152,8 @@ function listMenuClick(el, menu)
|
|||
case 'btnRenameList': renameCurList(); break;
|
||||
case 'btnDeleteList': deleteCurList(); break;
|
||||
case 'btnPublish': publishCurList(); break;
|
||||
case 'btnExportCSV': exportCurListToCSV(); break;
|
||||
case 'btnExportCSV': exportCurList('csv'); break;
|
||||
case 'btnExportICAL': exportCurList('ical'); break;
|
||||
case 'btnRssFeed': feedCurList(); break;
|
||||
case 'btnShowCompleted': showCompletedToggle(); break;
|
||||
case 'btnClearCompleted': clearCompleted(); break;
|
||||
|
|
@ -1936,10 +1937,11 @@ function slmenuSelect(el, menu)
|
|||
};
|
||||
|
||||
|
||||
function exportCurListToCSV()
|
||||
function exportCurList(format)
|
||||
{
|
||||
if(!curList) return;
|
||||
window.location.href = _mtt.mttUrl + 'export.php?list='+curList.id +'&format=csv';
|
||||
if(!format.match(/^[a-z0-9-]+$/i)) return;
|
||||
window.location.href = _mtt.mttUrl + 'export.php?list='+curList.id +'&format='+format;
|
||||
};
|
||||
|
||||
function feedCurList()
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ $().ready(function(){
|
|||
<li class="mtt-need-list mtt-need-real-list" id="btnRenameList"><?php _e('list_rename');?></li>
|
||||
<li class="mtt-need-list mtt-need-real-list" id="btnDeleteList"><?php _e('list_delete');?></li>
|
||||
<li class="mtt-need-list mtt-need-real-list" id="btnClearCompleted"><?php _e('list_clearcompleted');?></li>
|
||||
<li class="mtt-need-list mtt-need-real-list" id="btnExportCSV"><?php _e('list_exportcsv');?></li>
|
||||
<li class="mtt-need-list mtt-need-real-list mtt-menu-indicator" submenu="listexportmenucontainer"><div class="submenu-icon"></div><?php _e('list_export'); ?></li>
|
||||
<li class="mtt-menu-delimiter mtt-need-real-list"></li>
|
||||
<li class="mtt-need-list mtt-need-real-list" id="btnPublish"><div class="menu-icon"></div><?php _e('list_publish');?></li>
|
||||
<li class="mtt-need-list mtt-need-real-list" id="btnRssFeed"><div class="menu-icon"></div><?php _e('list_rssfeed');?></li>
|
||||
|
|
@ -235,6 +235,13 @@ $().ready(function(){
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="listexportmenucontainer" class="mtt-menu-container" style="display:none">
|
||||
<ul>
|
||||
<li class="mtt-need-list mtt-need-real-list" id="btnExportCSV"><?php _e('list_export_csv');?></li>
|
||||
<li class="mtt-need-list mtt-need-real-list" id="btnExportICAL"><?php _e('list_export_ical');?></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="taskcontextcontainer" class="mtt-menu-container" style="display:none">
|
||||
<ul>
|
||||
<li id="cmenu_edit"><b><?php _e('action_edit');?></b></li>
|
||||
|
|
|
|||
Loading…
Reference in a new issue