|
110 |
this.own(this._progressBar); |
110 |
this.own(this._progressBar); |
111 |
this._grid = new AppCenterGallery({}); |
111 |
this._grid = new AppCenterGallery({}); |
112 |
this.own(this._grid); |
112 |
this.own(this._grid); |
113 |
|
|
|
114 |
this.headerButtons = [{ |
115 |
name: 'close', |
116 |
iconClass: this.isSubPage ? 'umcArrowLeftIconWhite' : 'umcCloseIconWhite', |
117 |
label: this.backLabel, |
118 |
align: 'left', |
119 |
callback: lang.hitch(this, 'onBack') |
120 |
}]; |
121 |
}, |
113 |
}, |
122 |
|
114 |
|
123 |
_setAppAttr: function(app) { |
115 |
_setAppAttr: function(app) { |
|
206 |
return buttons; |
198 |
return buttons; |
207 |
}, |
199 |
}, |
208 |
|
200 |
|
|
|
201 |
getHeaderButtons: function() { |
202 |
var buttons = [{ |
203 |
name: 'close', |
204 |
iconClass: this.isSubPage ? 'umcArrowLeftIconWhite' : 'umcCloseIconWhite', |
205 |
label: this.backLabel, |
206 |
align: 'left', |
207 |
callback: lang.hitch(this, 'onBack') |
208 |
}]; |
209 |
|
210 |
if (this.visibleApps && this.visibleApps.length) { |
211 |
var currentIndex; |
212 |
array.some(this.visibleApps, lang.hitch(this, function(iapp, idx) { |
213 |
currentIndex = iapp.id === this.app.id ? idx : undefined; |
214 |
return currentIndex >= 0; |
215 |
})); |
216 |
var prevApp = this.visibleApps[currentIndex - 1]; |
217 |
var nextApp = this.visibleApps[currentIndex + 1]; |
218 |
buttons.push({ |
219 |
name: 'prev', |
220 |
iconClass: 'umcLeftIconWhite', |
221 |
label: prevApp ? _('Previous app') : '', |
222 |
align: 'left', |
223 |
disabled: !prevApp, |
224 |
callback: lang.hitch(this, 'set', 'app', prevApp) |
225 |
}); |
226 |
buttons.push({ |
227 |
name: 'next', |
228 |
iconClass: 'umcRightIconWhite', |
229 |
label: nextApp ? _('Next app') : '', |
230 |
align: 'left', |
231 |
disabled: !nextApp, |
232 |
callback: lang.hitch(this, 'set', 'app', nextApp) |
233 |
}); |
234 |
} |
235 |
return buttons; |
236 |
}, |
237 |
|
209 |
getActionButtons: function() { |
238 |
getActionButtons: function() { |
210 |
var buttons = []; |
239 |
var buttons = []; |
211 |
if (this.app.canInstall) { |
240 |
if (this.app.canInstall) { |
|
382 |
} |
411 |
} |
383 |
|
412 |
|
384 |
this.set('navButtons', this.getButtons()); |
413 |
this.set('navButtons', this.getButtons()); |
|
|
414 |
this.set('headerButtons', this.getHeaderButtons()); |
385 |
this._navButtons.set('style', {'margin-left': '-0.2em', 'margin-top': '1em'}); |
415 |
this._navButtons.set('style', {'margin-left': '-0.2em', 'margin-top': '1em'}); |
386 |
this._navHeaderButtonContainer.addChild(this._navButtons); |
416 |
this._navHeaderButtonContainer.addChild(this._navButtons); |
387 |
|
417 |
|
|
551 |
}); |
581 |
}); |
552 |
for (var i = 0; i < rating.value; i++) { |
582 |
for (var i = 0; i < rating.value; i++) { |
553 |
domConstruct.create('div', { |
583 |
domConstruct.create('div', { |
554 |
'class': 'umcAppRatingIcon', |
584 |
'class': 'umcAppRatingIcon' |
555 |
}, ratingText.domNode |
585 |
}, ratingText.domNode |
556 |
); |
586 |
); |
557 |
} |
587 |
} |
558 |
domConstruct.create('div', { |
588 |
domConstruct.create('div', { |
559 |
'class': 'umcAppRatingText', |
589 |
'class': 'umcAppRatingText', |
560 |
textContent: rating.label, |
590 |
textContent: rating.label |
561 |
}, ratingText.domNode |
591 |
}, ratingText.domNode |
562 |
); |
592 |
); |
563 |
domConstruct.create('div', { |
593 |
domConstruct.create('div', { |