Changeset View
Changeset View
Standalone View
Standalone View
applets/kicker/package/contents/ui/code/tools.js
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Line(s) | 123 | actionArgument : { | |||
---|---|---|---|---|---|
125 | favoriteId : favoriteId, | 125 | favoriteId : favoriteId, | ||
126 | favoriteActivity : activityId | 126 | favoriteActivity : activityId | ||
127 | } | 127 | } | ||
128 | }); | 128 | }); | ||
129 | }; | 129 | }; | ||
130 | 130 | | |||
131 | // Adding the item to link/unlink to the current activity | 131 | // Adding the item to link/unlink to the current activity | ||
132 | 132 | | |||
133 | addActivityItem(favoriteModel.activities.currentActivity, i18n("On The Current Activity")); | 133 | addActivityItem(favoriteModel.activities.currentActivity, i18n("On the Current Activity")); | ||
134 | 134 | | |||
135 | actions.push({ | 135 | actions.push({ | ||
136 | type: "separator", | 136 | type: "separator", | ||
137 | actionId: "_kicker_favorite_separator" | 137 | actionId: "_kicker_favorite_separator" | ||
138 | }); | 138 | }); | ||
139 | 139 | | |||
140 | // Adding the items for each activity | 140 | // Adding the items for each activity | ||
141 | 141 | | |||
142 | activities.forEach(function(activityId) { | 142 | activities.forEach(function(activityId) { | ||
143 | addActivityItem(activityId, favoriteModel.activityNameForId(activityId)); | 143 | addActivityItem(activityId, favoriteModel.activityNameForId(activityId)); | ||
144 | }); | 144 | }); | ||
145 | 145 | | |||
146 | return [{ | 146 | return [{ | ||
147 | text : i18n("Show In Favorites"), | 147 | text : i18n("Show in Favorites"), | ||
148 | icon : "favorite", | 148 | icon : "favorite", | ||
149 | subActions : actions | 149 | subActions : actions | ||
150 | }]; | 150 | }]; | ||
151 | } | 151 | } | ||
152 | } | 152 | } | ||
153 | 153 | | |||
154 | function triggerAction(model, index, actionId, actionArgument) { | 154 | function triggerAction(model, index, actionId, actionArgument) { | ||
155 | function startsWith(txt, needle) { | 155 | function startsWith(txt, needle) { | ||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |