From dc572f022673aa80b64126371675a710b58e953d Mon Sep 17 00:00:00 2001 From: Lukasz Date: Wed, 2 Jun 2010 05:29:09 +0200 Subject: [PATCH] 'Put on the shelf' usability improvement. --- wolnelektury/static/css/master.css | 3 +++ wolnelektury/static/js/catalogue.js | 12 +++++++++++- wolnelektury/templates/catalogue/book_sets.html | 12 ++++++------ 3 files changed, 20 insertions(+), 7 deletions(-) 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 -- 2.20.1