From: Radek Czajka Date: Wed, 19 May 2010 09:58:42 +0000 (+0200) Subject: Shelf sharing (#301) X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/ba44660a1a87d1c385b3a9e101ce946672fed755?hp=2e1d485a0f3ca0949bea0c922e3b095b3d8d4d95 Shelf sharing (#301) --- diff --git a/wolnelektury/static/css/master.css b/wolnelektury/static/css/master.css index ba6e0aaaf..a0e5e3c22 100644 --- a/wolnelektury/static/css/master.css +++ b/wolnelektury/static/css/master.css @@ -459,6 +459,36 @@ div.shown-tags p, div.all-tags p { color: #900; } +#toggle-share-shelf { + display: block; + width: 100%; + height: 1.5em; + background-color: #EEE; + margin-top: 0.5em; + padding: 0.5em 0; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + text-align: center; + outline: none; +} +#toggle-share-shelf p { + margin:0; +} + +#share-shelf { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + border: 3px solid #EEE; + padding: 5px; + margin-top: -5px; +} +#share-shelf input { + width: 100%; +} + + /* ============================ */ /* = Books and fragments list = */ /* ============================ */ diff --git a/wolnelektury/static/js/catalogue.js b/wolnelektury/static/js/catalogue.js index d57f74339..b37c57734 100644 --- a/wolnelektury/static/js/catalogue.js +++ b/wolnelektury/static/js/catalogue.js @@ -286,7 +286,18 @@ function serverTime() { $('p', this).html(LOCALE_TEXTS[LANGUAGE_CODE]['HIDE_DESCRIPTION'] + ' ▼'); } }); - + + $('#toggle-share-shelf').hover( + function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); }, + function() { $(this).css({background: '#EEE'}); } + ).click(function() { + if ($('#share-shelf').hasClass('hidden')) { + $('#share-shelf').slideDown('fast').removeClass('hidden'); + } else { + $('#share-shelf').slideUp('fast').addClass('hidden'); + } + }); + var target = $('#set-window div.target'); $('#set-window').jqm({ @@ -318,6 +329,9 @@ function serverTime() { $('#description').hide().addClass('hidden'); $('#toggle-description p').html(LOCALE_TEXTS[LANGUAGE_CODE]['EXPAND_SHELF']+' ▼'); } + + $('#share-shelf').hide().addClass('hidden'); + $('#share-shelf input').focus(function(){this.select();}); $('#user-info').show(); changeBannerText(); diff --git a/wolnelektury/templates/catalogue/tagged_object_list.html b/wolnelektury/templates/catalogue/tagged_object_list.html index 3f9c5ba67..b105c70bd 100644 --- a/wolnelektury/templates/catalogue/tagged_object_list.html +++ b/wolnelektury/templates/catalogue/tagged_object_list.html @@ -42,6 +42,12 @@
+

{% trans "Share this shelf" %}

+
+

{% trans "Copy this link and share it with other people to let them see your shelf." %} + +

+
{% endif %} {% if last_tag.gazeta_link %}