Code adjustments

This commit is contained in:
Tobias Reich 2014-10-18 18:02:06 +02:00
parent 263eed3447
commit fbea4b4dac
4 changed files with 513 additions and 517 deletions

BIN
dist/main.js vendored

Binary file not shown.

BIN
dist/view.js vendored

Binary file not shown.

View File

@ -5,27 +5,27 @@
* @copyright 2014 by Tobias Reich
*/
build = {
build = {};
divider: function(title) {
build.divider = function(title) {
return "<div class='divider fadeIn'><h1>" + title + "</h1></div>";
},
},
editIcon: function(id) {
build.editIcon = function(id) {
return "<div id='" + id + "' class='edit'><a class='icon-pencil'></a></div>";
},
},
multiselect: function(top, left) {
build.multiselect = function(top, left) {
return "<div id='multiselect' style='top: " + top + "px; left: " + left + "px;'></div>";
},
},
album: function(albumJSON) {
build.album = function(albumJSON) {
if (!albumJSON) return "";
@ -66,9 +66,9 @@ build = {
return album;
},
},
photo: function(photoJSON) {
build.photo = function(photoJSON) {
if (!photoJSON) return "";
@ -101,9 +101,9 @@ build = {
return photo;
},
},
imageview: function(photoJSON, size, visibleControls) {
build.imageview = function(photoJSON, size, visibleControls) {
if (!photoJSON) return "";
@ -138,9 +138,9 @@ build = {
return view;
},
},
no_content: function(typ) {
build.no_content = function(typ) {
var no_content = "";
@ -155,9 +155,9 @@ build = {
return no_content;
},
},
modal: function(title, text, button, marginTop, closeButton) {
build.modal = function(title, text, button, marginTop, closeButton) {
var modal = "",
custom_style = "";
@ -192,9 +192,9 @@ build = {
return modal;
},
},
signInModal: function() {
build.signInModal = function() {
var modal = "";
@ -213,9 +213,9 @@ build = {
return modal;
},
},
uploadModal: function(title, files) {
build.uploadModal = function(title, files) {
var modal = "";
@ -246,9 +246,9 @@ build = {
return modal;
},
},
contextMenu: function(items) {
build.contextMenu = function(items) {
var menu = "";
@ -272,9 +272,9 @@ build = {
return menu;
},
},
tags: function(tags, forView) {
build.tags = function(tags, forView) {
var html = "",
editTagsHTML = (forView===true||lychee.publicMode) ? "" : " " + build.editIcon("edit_tags");
@ -300,9 +300,9 @@ build = {
return html;
},
},
infoboxPhoto: function(photoJSON, forView) {
build.infoboxPhoto = function(photoJSON, forView) {
if (!photoJSON) return "";
@ -405,9 +405,9 @@ build = {
return infobox;
},
},
infoboxAlbum: function(albumJSON, forView) {
build.infoboxAlbum = function(albumJSON, forView) {
if (!albumJSON) return "";
@ -492,6 +492,4 @@ build = {
return infobox;
}
};
}

View File

@ -5,63 +5,61 @@
* @copyright 2014 by Tobias Reich
*/
visible = {
visible = {};
albums: function() {
visible.albums = function() {
if ($('#tools_albums').css('display')==='block') return true;
else return false;
},
},
album: function() {
visible.album = function() {
if ($('#tools_album').css('display')==='block') return true;
else return false;
},
},
photo: function() {
visible.photo = function() {
if ($('#imageview.fadeIn').length>0) return true;
else return false;
},
},
search: function() {
visible.search = function() {
if (search.code!==null&&search.code!=='') return true;
else return false;
},
},
infobox: function() {
visible.infobox = function() {
if ($('#infobox.active').length>0) return true;
else return false;
},
},
infoboxbutton: function() {
visible.infoboxbutton = function() {
if (visible.albums()) return false;
if (visible.photo()) return true;
if (visible.album()&&$('#button_info_album:visible').length>0) return true;
else return false;
},
},
controls: function() {
visible.controls = function() {
if (lychee.loadingBar.css('opacity')<1) return false;
else return true;
},
},
message: function() {
visible.message = function() {
if ($('.message').length>0) return true;
else return false;
},
},
signin: function() {
visible.signin = function() {
if ($('.message .sign_in').length>0) return true;
else return false;
},
},
contextMenu: function() {
visible.contextMenu = function() {
if ($('.contextmenu').length>0) return true;
else return false;
},
},
multiselect: function() {
visible.multiselect = function() {
if ($('#multiselect').length>0) return true;
else return false;
}
};
}