Piwigo Bugtracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000803Piwigonavigationpublic2008.02.12 16:282008.02.15 23:12
Reporterrvelices 
Assigned Torvelices 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.7.1 
Target VersionFixed in Version1.7.2 
Summary0000803: Implement keyboard navigation (left/right arrows) on the picture page
DescriptionI will do a simple Javascript
TagsNo tags attached.
browserany
Database engine and version
PHP version
Web serverApache 1.3.x
Attached Files

- Relationships

-  Notes
(0002121)
rvelices (developer)
2008.02.12 16:28

<script type="text/javascript">
<!-- BEGIN next -->
  var nextUrl = "{next.U_IMG}".replace( "&", "&" );
<!-- END next -->
<!-- BEGIN previous -->
  var prevUrl = "{previous.U_IMG}".replace( "&", "&" );
<!-- END previous -->
function keypress(e)
{
    if(!e) var e=window.event;
    if (e.altKey) return true;
    if (e.target) var target = e.target;
    else if (e.srcElement) var target = e.srcElement;
    if (target && target.type) return true; //an input editable element
    if(e.keyCode) var keyCode=e.keyCode;
    else if(e.which) var keyCode=e.which;
    var docElem = document.documentElement;
    switch(keyCode) {
        case 63235: case 39: if (nextUrl && (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth) ){window.location=nextUrl; return false; } break;
        case 63234: case 37: if (prevUrl && (e.ctrlKey || docElem.scrollLeft==0) ){ window.location=prevUrl; return false; } break;
    }
    return true;
}
document.onkeydown = keypress;
</script>
(0002122)
rvelices (developer)
2008.02.13 02:24

trunk [Subversion] r2205
branch 1.7 [Subversion] r2207
(0002123)
rub (developer)
2008.02.13 07:11

No key for first, last and thumbails?
(0002124)
rub (developer)
2008.02.13 07:12

No hints or others indications in order to indicate the use of this keys?
(0002125)
rvelices (developer)
2008.02.13 12:44

What do you propose for first/last/thumbnails ? Home/End/Page Up ?
(dont forget the scrollbars)
(0002126)
rub (developer)
2008.02.13 14:51

for first / last / thumbnails:
  1 ctrl+left / ctrl+righ / home
  2 ctrl+left / ctrl+righ / up
  3 up / down / home
  4 home / end / up

For me, 4 was a good choice.
(0002128)
rvelices (developer)
2008.02.13 23:59

Rub, I propose:
prev: left arrow or Ctrl+left arrow
next: right arrow or Ctrl+right arrow
thumbnails: Ctrl+up arrow
first: Ctrl+Home
last: Ctrl+End

Are you OK ?

Note that:
- Ctrl+PgUp and Ctrl+PgDown are used by FF.
- PgUp, PgDown are usually used by people to scroll the page
(0002129)
rub (developer)
2008.02.14 00:20

It's OK for me.

Perhaps for thumbnails, you can do "up arrow or Ctrl+up arrow"?
(0002140)
rvelices (developer)
2008.02.15 23:12

OK now it is in [Subversion] r2210 (1.7) and [Subversion] r2211 (trunk)

- Issue History
Date Modified Username Field Change
2008.02.12 16:28 rvelices New Issue
2008.02.12 16:28 rvelices Status new => assigned
2008.02.12 16:28 rvelices Assigned To => rvelices
2008.02.12 16:28 rvelices browser => any
2008.02.12 16:28 rvelices Web server => Apache 1.3.x
2008.02.12 16:28 rvelices Note Added: 0002121
2008.02.13 02:24 rvelices Note Added: 0002122
2008.02.13 02:24 rvelices Status assigned => closed
2008.02.13 02:24 rvelices Resolution open => fixed
2008.02.13 02:24 rvelices Fixed in Version => 1.7.2
2008.02.13 07:11 rub Status closed => feedback
2008.02.13 07:11 rub Resolution fixed => reopened
2008.02.13 07:11 rub Note Added: 0002123
2008.02.13 07:12 rub Note Added: 0002124
2008.02.13 12:44 rvelices Note Added: 0002125
2008.02.13 14:51 rub Note Added: 0002126
2008.02.13 23:59 rvelices Note Added: 0002128
2008.02.14 00:20 rub Note Added: 0002129
2008.02.15 23:12 rvelices Note Added: 0002140
2008.02.15 23:12 rvelices Status feedback => closed
2008.02.15 23:12 rvelices Resolution reopened => fixed


Copyright © 2000 - 2015 MantisBT Team
Contact
Powered by Mantis Bugtracker