add doubleclick-on-title-bar-to-scroll-up-list functionality to item clips view, map/calendar clips list, folders, lists and context browser

This commit is contained in:
rolux 2013-07-08 11:30:33 +00:00
parent 1bad405a53
commit 7986b2487c
4 changed files with 32 additions and 5 deletions

View file

@ -17,6 +17,13 @@ pandora.ui.clipsView = function(videoRatio) {
elements: [ elements: [
{ {
element: Ox.Bar({size: 24}) element: Ox.Bar({size: 24})
.bindEvent({
doubleclick: function(e) {
if ($(e.target).is('.OxBar')) {
pandora.$ui.clipList.animate({scrollTop: 0}, 250);
}
}
})
.append( .append(
pandora.$ui.sortElement = pandora.ui.sortElement() pandora.$ui.sortElement = pandora.ui.sortElement()
) )

View file

@ -19,7 +19,14 @@ pandora.ui.navigationView = function(type, videoRatio) {
$toolbar = Ox.Bar({size: 24}) $toolbar = Ox.Bar({size: 24})
.append( .append(
pandora.$ui.sortElement = pandora.ui.sortElement(true) pandora.$ui.sortElement = pandora.ui.sortElement(true)
), )
.bindEvent({
doubleclick: function(e) {
if ($(e.target).is('.OxBar')) {
$list.animate({scrollTop: 0}, 250);
}
}
}),
$list = pandora.ui.clipList(videoRatio) $list = pandora.ui.clipList(videoRatio)
.bindEvent({ .bindEvent({

View file

@ -8,10 +8,14 @@ pandora.ui.sectionbar = function(mode) {
mode == 'buttons' mode == 'buttons'
? pandora.$ui.sectionButtons = pandora.ui.sectionButtons() ? pandora.$ui.sectionButtons = pandora.ui.sectionButtons()
: pandora.$ui.sectionSelect = pandora.ui.sectionSelect() : pandora.$ui.sectionSelect = pandora.ui.sectionSelect()
); )
that.toggle = function() { .bindEvent({
doubleclick: function(e) {
}; if ($(e.target).is('.OxBar')) {
pandora.$ui.folders.animate({scrollTop: 0}, 250);
}
}
});
return that; return that;
}; };

View file

@ -45,6 +45,15 @@ pandora.ui.toolbar = function() {
}) })
.hide() .hide()
); );
(!ui.item ? pandora.$ui.listTitle : pandora.$ui.itemTitle).bindEvent({
doubleclick: function() {
if (!ui.item) {
pandora.$ui.list && pandora.$ui.list.animate({scrollTop: 0}, 250);
} else {
pandora.$ui.browser.scrollToSelection();
}
}
})
that.append( that.append(
pandora.$ui.findElement = pandora.ui.findElement() pandora.$ui.findElement = pandora.ui.findElement()
); );