detail nav: fix button selector to full-start__button, resolve movie in enter, retry 900ms
This commit is contained in:
1 parent
b5dc8d80fa
commit
747e0bdc12
1 file changed
+13
-5
@@ -215,12 +215,12 @@
|
||||
|
||||
this.start = function () {
|
||||
var apply = function () {
|
||||
var btns = $('.mymovies-detail .detail-actions .btn.selector');
|
||||
var btns = $('.mymovies-detail .full-start-new__buttons .full-start__button.selector');
|
||||
if (!btns.length) return;
|
||||
Lampa.Controller.add('content', {
|
||||
toggle: function () {
|
||||
Lampa.Controller.collectionSet($('.mymovies-detail .detail-actions'));
|
||||
Lampa.Controller.collectionFocus(btns[0], $('.mymovies-detail .detail-actions'));
|
||||
Lampa.Controller.collectionSet($('.mymovies-detail .full-start-new__buttons'));
|
||||
Lampa.Controller.collectionFocus(btns[0], $('.mymovies-detail .full-start-new__buttons'));
|
||||
},
|
||||
back: function () {
|
||||
Lampa.Activity.backward();
|
||||
@@ -228,9 +228,16 @@
|
||||
right: function () { Navigator.move('right'); },
|
||||
left: function () { Navigator.move('left'); },
|
||||
enter: function () {
|
||||
var el = $('.mymovies-detail .detail-actions .btn.selector.focus')[0] || btns[0];
|
||||
var el = $('.mymovies-detail .full-start-new__buttons .full-start__button.selector.focus')[0] || btns[0];
|
||||
if (!el) return;
|
||||
if (el.getAttribute('data-act') === 'download') download(m);
|
||||
var m = selected || (comp.activity && comp.activity.object);
|
||||
if (!m) return;
|
||||
m = resolveMovie(m);
|
||||
if (!m || !m.poster && window.__mymovies_catalog) {
|
||||
var f = window.__mymovies_catalog.filter(function (x) { return x.id === m.id; })[0];
|
||||
if (f) m = f;
|
||||
}
|
||||
if ($(el).hasClass('button--book') || $(el).hasClass('button--download')) download(m);
|
||||
else play(m);
|
||||
},
|
||||
gone: function () { Lampa.Controller.clear('content'); }
|
||||
@@ -239,6 +246,7 @@
|
||||
};
|
||||
apply();
|
||||
setTimeout(apply, 300);
|
||||
setTimeout(apply, 900);
|
||||
};
|
||||
|
||||
this.render = function () {
|
||||
|
||||
Reference in new issue
Block a user