]> git.andy128k.dev Git - ipf.git/commitdiff
reindent
authorAndrey Kutejko <andy128k@gmail.com>
Sun, 15 Apr 2018 21:13:28 +0000 (23:13 +0200)
committerAndrey Kutejko <andy128k@gmail.com>
Sun, 15 Apr 2018 21:13:28 +0000 (23:13 +0200)
ipf/admin/assets/js/filebrowser_popup.js

index c2106dccf344d2762d1a7f8626741251b7f9c8dd..a940d9d9681bfccb525cdeb95974bd5ffc195e19 100644 (file)
@@ -3,50 +3,50 @@
 var selected_url = null;
 
 function fileSelected(event) {
-  event.preventDefault();
-
-  var row = $(this).closest('tr');
-  var url = row.data('url');
-  var filename = row.data('name');
-
-  selected_url = url;
-  $('.file-selected').show();
-  $('.select-and-close').removeAttr('disabled');
-  $('#id_old_name').val(filename);
-  $('#id_old_name2').val(filename);
-  $('#id_new_name').val(filename);
-
-  if (row.hasClass('image')) {
-    var img = $('#pic img');
-    img.attr('src', url);
-    img.show();
-  } else {
-    $('#pic img').hide();
-  }
+    event.preventDefault();
+
+    var row = $(this).closest('tr');
+    var url = row.data('url');
+    var filename = row.data('name');
+
+    selected_url = url;
+    $('.file-selected').show();
+    $('.select-and-close').removeAttr('disabled');
+    $('#id_old_name').val(filename);
+    $('#id_old_name2').val(filename);
+    $('#id_new_name').val(filename);
+
+    if (row.hasClass('image')) {
+        var img = $('#pic img');
+        img.attr('src', url);
+        img.show();
+    } else {
+        $('#pic img').hide();
+    }
 }
 
 function imagePreview() {
-  var mouseX = 0, mouseY = 0;
-
-  $('#changelist tr.image').on({
-    mouseover: function() {
-      var url = $(this).data('url');
-      $('#prop img').attr('src', url);
-      $('#prop').css('top', mouseY+5);
-      $('#prop').css('left', mouseX+10);
-      $('#prop').show();
-    },
-    mouseout: function() {
-      $('#prop').hide();
-    }
-  });
-
-  $(document).mousemove(function(event) {
-    mouseX = event.pageX;
-    mouseY = event.pageY;
-    $('#prop').css('top', mouseY+5);
-    $('#prop').css('left', mouseX+10);
-  });
+    var mouseX = 0, mouseY = 0;
+
+    $('#changelist tr.image').on({
+        mouseover: function() {
+            var url = $(this).data('url');
+            $('#prop img').attr('src', url);
+            $('#prop').css('top', mouseY+5);
+            $('#prop').css('left', mouseX+10);
+            $('#prop').show();
+        },
+        mouseout: function() {
+            $('#prop').hide();
+        }
+    });
+
+    $(document).mousemove(function(event) {
+        mouseX = event.pageX;
+        mouseY = event.pageY;
+        $('#prop').css('top', mouseY+5);
+        $('#prop').css('left', mouseX+10);
+    });
 }
 
 function FileBrowserSelect() {