You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by ke...@apache.org on 2018/10/30 18:39:19 UTC

allura git commit: fixup! Add delay to screenshots sort

Repository: allura
Updated Branches:
  refs/heads/kt/8256 bbc06d9c4 -> 6365d0c51


fixup! Add delay to screenshots sort


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/6365d0c5
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/6365d0c5
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/6365d0c5

Branch: refs/heads/kt/8256
Commit: 6365d0c51403965fd6803279d25813c348794240
Parents: bbc06d9
Author: Kenton Taylor <kt...@slashdotmedia.com>
Authored: Tue Oct 30 18:39:01 2018 +0000
Committer: Kenton Taylor <kt...@slashdotmedia.com>
Committed: Tue Oct 30 18:39:01 2018 +0000

----------------------------------------------------------------------
 Allura/allura/lib/widgets/resources/js/screenshots.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/6365d0c5/Allura/allura/lib/widgets/resources/js/screenshots.js
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/resources/js/screenshots.js b/Allura/allura/lib/widgets/resources/js/screenshots.js
index d5b2a4d..3e0c183 100644
--- a/Allura/allura/lib/widgets/resources/js/screenshots.js
+++ b/Allura/allura/lib/widgets/resources/js/screenshots.js
@@ -33,7 +33,9 @@ $(function() {
     };
 
     var el = document.getElementsByClassName('sortable')[0];
-    var sortable = Sortable.create(el, {onUpdate: updateSortOrder, animation: 150});
+    if (el) {
+        var sortable = Sortable.create(el, {onUpdate: updateSortOrder, animation: 150, delay: 100});
+    }
 
     $('.delete_screenshot_form').submit(function () {
         return confirm('Really delete this screenshot?');