~dpm/ubuntu-calendar-app/fixes-1282500

« back to all changes in this revision

Viewing changes to EventDetails.qml

  • Committer: Tarmac
  • Author(s): Mario Guerriero
  • Date: 2014-02-08 04:53:28 UTC
  • mfrom: (191.2.1 ubuntu-calendar-app)
  • Revision ID: tarmac-20140208045328-09kiywjx2puu39j2
added support for recurrence. Fixes: https://bugs.launchpad.net/bugs/1270242.

Approved by Ubuntu Phone Apps Jenkins Bot, Kunal Parmar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
import Ubuntu.Components.Popups 0.1
4
4
import Ubuntu.Components.ListItems 0.1
5
5
import Ubuntu.Components.Themes.Ambiance 0.1
 
6
import QtOrganizer 5.0
6
7
 
7
8
import "GlobalEventModel.js" as GlobalModel
8
9
 
62
63
                contactModel.append( {"name": attendees[j].name } );
63
64
            }
64
65
        }
 
66
 
 
67
        var index = 0;
 
68
        var recurrenceLabel= [ i18n.tr("Once"),
 
69
                              i18n.tr("Daily"),
 
70
                              i18n.tr("Weekly"),
 
71
                              i18n.tr("Monthly"),
 
72
                              i18n.tr("Yearly")];
 
73
 
 
74
        if(e.recurrence ) {
 
75
            var recurrenceRule = e.recurrence.recurrenceRules;
 
76
            index = ( recurrenceRule.length > 0 ) ? recurrenceRule[0].frequency : 0;
 
77
        }
 
78
        recurrentHeader.value = recurrenceLabel[index];
 
79
 
65
80
        // FIXME: need to cache map image to avoid duplicate download every time
66
81
        var imageSrc = "http://maps.googleapis.com/maps/api/staticmap?center="+location+
67
82
                "&markers=color:red|"+location+"&zoom=15&size="+mapContainer.width+