JsHint fixes

This commit is contained in:
Tobias Reich 2014-08-31 22:11:04 +02:00
parent b0a4089dc0
commit 066d3be697
7 changed files with 20 additions and 14 deletions

View File

@ -86,7 +86,7 @@ album = {
}, },
parse: function(photo) { parse: function() {
if (!album.json.title) album.json.title = "Untitled"; if (!album.json.title) album.json.title = "Untitled";
@ -143,7 +143,7 @@ album = {
if (visible.albums()) { if (visible.albums()) {
albumIDs.forEach(function(id, index, array) { albumIDs.forEach(function(id) {
albums.json.num--; albums.json.num--;
view.albums.content.delete(id); view.albums.content.delete(id);
}); });
@ -224,7 +224,7 @@ album = {
} else if (visible.albums()) { } else if (visible.albums()) {
albumIDs.forEach(function(id, index, array) { albumIDs.forEach(function(id) {
albums.json.content[id].title = newTitle; albums.json.content[id].title = newTitle;
view.albums.content.title(id); view.albums.content.title(id);
}); });

View File

@ -270,7 +270,8 @@ contextMenu = {
var mouse_x = e.pageX, var mouse_x = e.pageX,
mouse_y = e.pageY, mouse_y = e.pageY,
items; items,
link = "";
mouse_y -= $(document).scrollTop(); mouse_y -= $(document).scrollTop();

View File

@ -149,7 +149,7 @@ var lychee = {
logout: function() { logout: function() {
lychee.api("logout", function(data) { lychee.api("logout", function() {
window.location.reload(); window.location.reload();
}); });

View File

@ -38,7 +38,9 @@ multiselect = {
selectAll: function() { selectAll: function() {
var e; var e,
newWidth,
newHeight;
if (mobileBrowser()) return false; if (mobileBrowser()) return false;
if (lychee.publicMode) return false; if (lychee.publicMode) return false;
@ -65,7 +67,7 @@ multiselect = {
e = { e = {
pageX: $(document).width() - (multiselect.position.right / 2), pageX: $(document).width() - (multiselect.position.right / 2),
pageY: $(document).height() - multiselect.position.bottom pageY: $(document).height() - multiselect.position.bottom
} };
multiselect.getSelection(e); multiselect.getSelection(e);
@ -172,7 +174,7 @@ multiselect = {
id = $(this).data('id'); id = $(this).data('id');
if (id!=='0'&&id!==0&&id!=='f'&&id!=='s'&&id!=='r'&&id!==null&id!==undefined) { if (id!=='0'&&id!==0&&id!=='f'&&id!=='s'&&id!=='r'&&id!==null&&id!==undefined) {
ids.push(id); ids.push(id);
$(this).addClass('active'); $(this).addClass('active');

View File

@ -153,6 +153,9 @@ photo = {
buttons = [ buttons = [
["", function() { ["", function() {
var nextPhoto,
previousPhoto;
photoIDs.forEach(function(id, index, array) { photoIDs.forEach(function(id, index, array) {
// Change reference for the next and previous photo // Change reference for the next and previous photo

View File

@ -12,7 +12,7 @@ upload = {
upload.close(true); upload.close(true);
$("body").append(build.uploadModal(title, files)); $("body").append(build.uploadModal(title, files));
if (callback!=null&&callback!=undefined) callback(); if (callback!==null&&callback!==undefined) callback();
}, },
@ -158,7 +158,7 @@ upload = {
if (e.lengthComputable) { if (e.lengthComputable) {
// Calculate progress // Calculate progress
progress = (e.loaded / e.total * 100 | 0); progress = (e.loaded / e.total * 100) || 0;
// Set progress when progress has changed // Set progress when progress has changed
if (progress>pre_progress) { if (progress>pre_progress) {

File diff suppressed because one or more lines are too long