Fixed editable state in public mode

pull/331/head
Tobias Reich 10 years ago
parent 1e3fdc680d
commit dd2a57e5f8

@ -58,6 +58,15 @@ header.hide = function(e, delay) {
}
header.setTitle = function(title) {
var $title = header.dom('#title'),
title = title || 'Untitled';
$title.html(title + build.iconic('caret-bottom'));
}
header.setMode = function(mode) {
var albumID = album.getID();
@ -105,4 +114,16 @@ header.setMode = function(mode) {
}
}
header.setEditable = function(editable) {
var $title = header.dom('#title');
// Hide editable icon when not logged in
if (lychee.publicMode===true) editable = false;
if (editable) $title.addClass('editable');
else $title.removeClass('editable');
}

@ -230,14 +230,10 @@ lychee.getUpdate = function() {
lychee.setTitle = function(title, editable) {
var $title = header.dom('#title');
document.title = lychee.title + ' - ' + title;
if (editable) $title.addClass('editable');
else $title.removeClass('editable');
$title.html(title + build.iconic('caret-bottom'));
header.setEditable(editable);
header.setTitle(title);
}
@ -247,7 +243,6 @@ lychee.setMode = function(mode) {
$('#button_trash, #button_move, #button_share, #button_star').remove();
$(document)
.on('mouseenter', '#title.editable', function() { $(this).removeClass('editable') })
.off('click', '#title.editable')
.off('touchend', '#title.editable')
.off('contextmenu', '.photo')

@ -35,13 +35,14 @@
&:hover { background: linear-gradient(to bottom, $colorBlue, darken($colorBlue, 5%)); }
}
tr td .albumCover {
tr td .cover {
background-color: #222;
border-radius: 2px;
box-shadow: 0 0 0 1px black(.5);
position: absolute;
}
tr td .albumTitle {
tr td .title {
display: inline-block;
margin: 0 0 3px 26px;
}

Loading…
Cancel
Save