X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/735368cfb54c8954518179993dcd3bc55e3878e7..23f7301cbde3aacf470c0e4f419d9743f9ad9372:/wolnelektury/static/js/catalogue.js diff --git a/wolnelektury/static/js/catalogue.js b/wolnelektury/static/js/catalogue.js index d57f74339..ad9768edf 100644 --- a/wolnelektury/static/js/catalogue.js +++ b/wolnelektury/static/js/catalogue.js @@ -2,43 +2,43 @@ var LOCALE_TEXTS = { "pl": { "DELETE_SHELF": "Czy na pewno usunąć półkę", "HIDE_DESCRIPTION": "Zwiń opis", - "EXPAND DESCRIPTION": "Rozwiń opis", + "EXPAND_DESCRIPTION": "Rozwiń opis", "LOADING": "Ładowanie", }, "fr": { "DELETE_SHELF": "Translate me!", "HIDE_DESCRIPTION": "Translate me!", - "EXPAND DESCRIPTION": "Translate me!", + "EXPAND_DESCRIPTION": "Translate me!", "LOADING": "Translate me!", }, "ru": { "DELETE_SHELF": "Translate me!", "HIDE_DESCRIPTION": "Translate me!", - "EXPAND DESCRIPTION": "Translate me!", + "EXPAND_DESCRIPTION": "Translate me!", "LOADING": "Translate me!", }, "en": { "DELETE_SHELF": "Translate me!", "HIDE_DESCRIPTION": "Translate me!", - "EXPAND DESCRIPTION": "Translate me!", + "EXPAND_DESCRIPTION": "Translate me!", "LOADING": "Translate me!", }, "ru": { "DELETE_SHELF": "Translate me!", "HIDE_DESCRIPTION": "Translate me!", - "EXPAND DESCRIPTION": "Translate me!", + "EXPAND_DESCRIPTION": "Translate me!", "LOADING": "Translate me!", }, "es": { "DELETE_SHELF": "Translate me!", "HIDE_DESCRIPTION": "Translate me!", - "EXPAND DESCRIPTION": "Translate me!", + "EXPAND_DESCRIPTION": "Translate me!", "LOADING": "Translate me!", }, "lt":{ "DELETE_SHELF": "Translate me!", "HIDE_DESCRIPTION": "Translate me!", - "EXPAND DESCRIPTION": "Translate me!", + "EXPAND_DESCRIPTION": "Translate me!", "LOADING": "Translate me!", } } @@ -283,10 +283,21 @@ function serverTime() { } else { $('#description').slideUp('fast').addClass('hidden'); $.cookie('description-state', 'closed', {path: '/', expires: 30}); - $('p', this).html(LOCALE_TEXTS[LANGUAGE_CODE]['HIDE_DESCRIPTION'] + ' ▼'); + $('p', this).html(LOCALE_TEXTS[LANGUAGE_CODE]['EXPAND_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({ @@ -316,8 +327,11 @@ function serverTime() { if ($.cookie('description-state') == 'closed') { $('#description').hide().addClass('hidden'); - $('#toggle-description p').html(LOCALE_TEXTS[LANGUAGE_CODE]['EXPAND_SHELF']+' ▼'); + $('#toggle-description p').html(LOCALE_TEXTS[LANGUAGE_CODE]['EXPAND_DESCRIPTION']+' ▼'); } + + $('#share-shelf').hide().addClass('hidden'); + $('#share-shelf input').focus(function(){this.select();}); $('#user-info').show(); changeBannerText();