mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-01 07:21:15 +00:00
disable calendar for now, crazy issues
This commit is contained in:
parent
50c230ba1e
commit
332080ca94
2 changed files with 7 additions and 5 deletions
|
|
@ -13,7 +13,8 @@ module.exports = (expressApp, root, derby) ->
|
||||||
expressApp.get '/terms', (req, res) ->
|
expressApp.get '/terms', (req, res) ->
|
||||||
staticPages.render 'terms', res
|
staticPages.render 'terms', res
|
||||||
|
|
||||||
expressApp.get '/v1/users/:uid/calendar.ics', (req, res) ->
|
expressApp.get '/v1/users/:uid/calendar.ics', (req, res, next) ->
|
||||||
|
return next() #disable for now
|
||||||
{uid} = req.params
|
{uid} = req.params
|
||||||
{apiToken} = req.query
|
{apiToken} = req.query
|
||||||
|
|
||||||
|
|
@ -23,6 +24,7 @@ module.exports = (expressApp, root, derby) ->
|
||||||
require('mongoskin').db(process.env.NODE_DB_URI, {safe:true}).collection('users').find({_id:uid, apiToken:apiToken}).toArray (err, result) ->
|
require('mongoskin').db(process.env.NODE_DB_URI, {safe:true}).collection('users').find({_id:uid, apiToken:apiToken}).toArray (err, result) ->
|
||||||
return res.send(500, err) if err
|
return res.send(500, err) if err
|
||||||
# tasks = result.at(0).get('tasks')
|
# tasks = result.at(0).get('tasks')
|
||||||
|
return next() if _.isEmpty(result)
|
||||||
tasks = result[0].tasks
|
tasks = result[0].tasks
|
||||||
tasksWithDates = _.filter tasks, (task) -> !!task.date
|
tasksWithDates = _.filter tasks, (task) -> !!task.date
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -340,8 +340,8 @@ do a find for the string after "→"
|
||||||
{#if _user.history.todos}
|
{#if _user.history.todos}
|
||||||
<a x-bind=click:toggleChart data-toggle-id="todos-chart" data-history-path="_user.history.todos" rel=tooltip title="Progress"><i class=icon-signal></i></a>
|
<a x-bind=click:toggleChart data-toggle-id="todos-chart" data-history-path="_user.history.todos" rel=tooltip title="Progress"><i class=icon-signal></i></a>
|
||||||
{/}
|
{/}
|
||||||
<a href="/v1/users/{{_user.id}}/calendar.ics?apiToken={{_user.apiToken}}"><img src='/img/calendar_ical.png' title="iCal" alt="iCal" rel=tooltip /></a>
|
<!-- <a href="/v1/users/{{_user.id}}/calendar.ics?apiToken={{_user.apiToken}}"><img src='/img/calendar_ical.png' title="iCal" alt="iCal" rel=tooltip /></a>
|
||||||
<a target="_blank" href="https://www.google.com/calendar/render?cid={{encodeiCalLink(_user.id, _user.apiToken)}}"><img src='/img/calendar_google.png' title="Google Calendar" alt="Google Calendar" rel=tooltip /></a>
|
<a target="_blank" href="https://www.google.com/calendar/render?cid={{encodeiCalLink(_user.id, _user.apiToken)}}"><img src='/img/calendar_google.png' title="Google Calendar" alt="Google Calendar" rel=tooltip /></a>-->
|
||||||
</span>
|
</span>
|
||||||
<div id="todos-chart" style="display:none;"></div>
|
<div id="todos-chart" style="display:none;"></div>
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
|
|
@ -609,10 +609,10 @@ do a find for the string after "→"
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
{else if equal(:task.type, 'todo')}
|
{else if equal(:task.type, 'todo')}
|
||||||
<div class=control-group>
|
<!--<div class=control-group>
|
||||||
<label>Date</label>
|
<label>Date</label>
|
||||||
<input type="date" value="{:task.date}" />
|
<input type="date" value="{:task.date}" />
|
||||||
</div>
|
</div>-->
|
||||||
{/}
|
{/}
|
||||||
<button type=submit class="btn">Save & Close</button>
|
<button type=submit class="btn">Save & Close</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue