From: Lukasz Date: Wed, 2 Jun 2010 03:29:09 +0000 (+0200) Subject: 'Put on the shelf' usability improvement. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/dc572f022673aa80b64126371675a710b58e953d?ds=inline 'Put on the shelf' usability improvement. --- diff --git a/wolnelektury/static/css/master.css b/wolnelektury/static/css/master.css index 0c9128d70..98a96c0e9 100644 --- a/wolnelektury/static/css/master.css +++ b/wolnelektury/static/css/master.css @@ -875,3 +875,6 @@ div.shown-tags p, div.all-tags p { color: #FFF; text-decoration: none; } +#createNewShelf { +display: none; +} diff --git a/wolnelektury/static/js/catalogue.js b/wolnelektury/static/js/catalogue.js index a76215aa5..3aad7b40d 100644 --- a/wolnelektury/static/js/catalogue.js +++ b/wolnelektury/static/js/catalogue.js @@ -107,6 +107,7 @@ function serverTime() { (function($) { $(function() { + $('form input').labelify({labelledClass: 'blur'}); target = $('#login-register-window div.target'); @@ -347,9 +348,18 @@ function serverTime() { target.html('

'+LOCALE_TEXTS[LANGUAGE_CODE]['DELETE_SHELF']+'

'); hash.w.css({position: 'absolute', left: offset.left, top: offset.top}).show() }, onLoad: function(hash) { + try { + $('#createShelfTrigger').click(function(){ + $('#createNewShelf').show(); + }); + } catch (e){} + $('form', hash.w).ajaxForm({ target: target, - success: function() { setTimeout(function() { $('#set-window').jqmHide() }, 1000) } + success: function() { + setTimeout(function() { + $('#set-window').jqmHide(); + }, 1000)} }); } }); diff --git a/wolnelektury/templates/catalogue/book_sets.html b/wolnelektury/templates/catalogue/book_sets.html index e17c51348..2b713b465 100644 --- a/wolnelektury/templates/catalogue/book_sets.html +++ b/wolnelektury/templates/catalogue/book_sets.html @@ -1,5 +1,11 @@ {% load i18n %}

{% trans "Put a book on the shelf!" %}

+{% trans "Create new shelf" %} +
+
    +
  1. {{ new_set_form.name }}
  2. +
+
{% if not user.tag_set.count %}

{% trans "You do not have any shelves. You can create one below, if you want to."%}

{% else %} @@ -10,9 +16,3 @@ {% endif %} -
-
-
    -
  1. {{ new_set_form.name }}
  2. -
-
\ No newline at end of file