]> www.vanbest.org Git - motioneye-debian/commitdiff
media browser: prev/next arrows are no longer reversed
authorCalin Crisan <ccrisan@gmail.com>
Sat, 20 Aug 2016 18:01:41 +0000 (21:01 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Sat, 20 Aug 2016 18:01:41 +0000 (21:01 +0300)
motioneye/static/js/main.js

index 261568239a9853de01ed6773f86fa0eaee4a4e8d..205019ab6877f0198127b5c4d853e2ea30b14abc 100644 (file)
@@ -3054,8 +3054,8 @@ function runPictureDialog(entries, pos, mediaType) {
                 img.height(height);
             }
             updateModalDialogPosition();
-            prevArrow.css('display', pos > 0 ? '' : 'none');
-            nextArrow.css('display', pos < entries.length - 1 ? '' : 'none');
+            prevArrow.css('display', pos < entries.length - 1 ? '' : 'none');
+            nextArrow.css('display', pos > 0 ? '' : 'none');
             progressImg.remove();
         });
         
@@ -3064,16 +3064,16 @@ function runPictureDialog(entries, pos, mediaType) {
     }
     
     prevArrow.click(function () {
-        if (pos > 0) {
-            pos--;
+        if (pos < entries.length - 1) {
+            pos++;
         }
         
         updatePicture();
     });
     
     nextArrow.click(function () {
-        if (pos < entries.length - 1) {
-            pos++;
+        if (pos > 0) {
+            pos--;
         }
         
         updatePicture();