MagicMirror² v2.4.1 is available! For more information about this release, check out this topic.
Please read the release notes carefully since this update requires adjustments to your Raspberry Pi configuration!

MMM-Todoist - adding reminder priority owner

  • Hello,

    i’m working on the MMM-Todoist from @cbrooker

    A good way to learn - Im trying to add the priority (want an icon and sort by) the due date and some little informations.

    i found in the fetcher how to add the informations (in an array?) - but i dont really understand how the data are used after

    	 for (var i = 0; i < JSON.parse(body).items.length; i++) {
    		 if (JSON.parse(body).items[i].project_id == listID) {

    and after i understand in the MMM-Todoist.js here

    for (var i = 0; i < todos.length; i++) {
    var titleWrapper = document.createElement(“tr”);
    titleWrapper.innerHTML = todos[i];
    titleWrapper.className = “title bright”;

     // Create fade effect by MichMich (MIT)
     if (this.config.fade && this.config.fadePoint < 1) {
    	if (this.config.fadePoint < 0) {
    	 this.config.fadePoint = 0;
    	var startingPoint = todos.length * this.config.fadePoint;
    	var steps = todos.length - startingPoint;
    	if (i >= startingPoint) {
    	 var currentStep = i - startingPoint; = 1 - (1 / steps * currentStep);

    we make the view

    for now i have that - if someone can help me to understand - thankssssss

    0_1481658850398_Screen Shot 2016-12-13 at 20.50.54.png

  • This post is deleted!

  • Yop,

    im progressing ^^
    i understand how it’s working now - just dont know how to add an icon 😕

    Someone can help me ?

    if (JSON.parse(body).items[i].priority == '1') {icontodo ='P1'}
    	else if (JSON.parse(body).items[i].priority == '2') {icontodo ='P2'}
    	else if (JSON.parse(body).items[i].priority == '3') {icontodo ='P3'}
    	else {icontodo ='P4'};

    0_1481751363565_Screen Shot 2016-12-14 at 22.35.44.png

    icontodo = document.createElement(“span”);
    icontodo.className = “wi wi-day-rain-mix”;
    icontodo =‘img:wi wi-day-rain-mix’;

    any help is welcome 🙂

  • Yop,

    i did it 🙂

    @cbrooker could you just tell me - how you hide the task tagged like done ?
    if i understand correctly the API documentation in the form you receive all - so normally the checked’s status can be used. but i only have items with checked = 0

    thanks 🙂

    0_1482769770022_Screen Shot 2016-12-26 at 17.27.30.png

  • Can you share your code for this module? Thx

  • Oki, have a nice holiday 🙂