4 "DELETE_SHELF": "Czy na pewno usunąć półkę",
5 "HIDE_DESCRIPTION": "Zwiń opis",
6 "EXPAND DESCRIPTION": "Rozwiń opis",
7 "LOADING": "Ładowanie",
10 "DELETE_SHELF": "Translate me!",
11 "HIDE_DESCRIPTION": "Translate me!",
12 "EXPAND DESCRIPTION": "Translate me!",
13 "LOADING": "Translate me!",
16 "DELETE_SHELF": "Translate me!",
17 "HIDE_DESCRIPTION": "Translate me!",
18 "EXPAND DESCRIPTION": "Translate me!",
19 "LOADING": "Translate me!",
22 "DELETE_SHELF": "Translate me!",
23 "HIDE_DESCRIPTION": "Translate me!",
24 "EXPAND DESCRIPTION": "Translate me!",
25 "LOADING": "Translate me!",
28 "DELETE_SHELF": "Translate me!",
29 "HIDE_DESCRIPTION": "Translate me!",
30 "EXPAND DESCRIPTION": "Translate me!",
31 "LOADING": "Translate me!",
34 "DELETE_SHELF": "Translate me!",
35 "HIDE_DESCRIPTION": "Translate me!",
36 "EXPAND DESCRIPTION": "Translate me!",
37 "LOADING": "Translate me!",
40 "DELETE_SHELF": "Translate me!",
41 "HIDE_DESCRIPTION": "Translate me!",
42 "EXPAND DESCRIPTION": "Translate me!",
43 "LOADING": "Translate me!",
47 alert(LOCALE_TEXTS[LANGUAGE_CODE]['DELETE_SHELF']);
49 'Przekaż 1% żeby ukryć ten baner.',
50 'Jak dobrze wydać 1% swojego podatku? <strong>Poradnik dla opornych</strong>.',
51 'Wiadomość systemowa: wystąpił błąd brak funduszy. Wykonaj procedurę 1%.',
52 '<strong>FREE!</strong> Wygraj darmowe lektury!',
53 'Confidential business offer. Not scam! 1% for you.',
54 'Biblioteka Wolne Lektury wymaga aktualizacji. Kliknij dalej.',
55 '1000 lektur. <strong>1 procent</strong>.',
56 '1% dla biblioteki lektur szkolnych. 1% dla Twojej biblioteki.',
57 '1% na lektury szkolne.',
58 '1% dla wolności lektur szkolnych.',
59 'Podaruj Jeden Procent na rzecz szkolnej biblioteki internetowej.',
60 '1% podatku dla biblioteki szkolnej Wolne Lektury.',
61 '1% na rzecz darmowego dostępu do szkolnych lektur.',
62 'Żeby czytać teksty a nie skany. Przekaż 1%.',
63 'Czytaj teksty a nie skany. Przekaż 1%',
64 'Motyw artysty w literaturze - 47 cytatów. Pomóż znaleźć następne.',
65 'Twój 1% uwolni więcej lektur.',
66 'Ponad 400 motywów, blisko 10 000 000 cytatów. Pomóż znaleźć następne. Przekaż swój 1%.',
67 'Twój 1% uwolni lektury.',
68 'Rozlicz swój PIT z Wolnymi Lekturami. Skorzystaj z darmowego programu do rozliczania podatków.',
69 'Lektury 2010: Pan Tadeusz, Trylogia.',
70 'Pan Tadeusz też chce być w Internecie! Przekaż 1% swojego podatku.',
71 'Pomóż uwolnić 286 utworów z listy lektur szkolnych. Przekaż swój 1% na Wolne Lektury.'
75 function changeBannerText() {
76 var index = Math.floor(Math.random() * BANNER_TEXTS.length);
77 if (BANNER_TEXTS[index] == $('#onepercent-text').html()) {
81 $('#onepercent-text').fadeOut('slow', function() {
82 $(this).html(BANNER_TEXTS[index]);
83 $(this).fadeIn('slow');
86 setTimeout(changeBannerText, 30 * 1000);
90 function autocomplete_result_handler(event, item) {
91 $(event.target).closest('form').submit();
93 function serverTime() {
95 $.ajax({url: '/katalog/zegar/',
96 async: false, dataType: 'text',
97 success: function(text) {
98 time = new Date(text);
99 }, error: function(http, message, exc) {
107 $('form input').labelify({labelledClass: 'blur'});
109 target = $('#login-register-window div.target');
111 $('#show-registration-form').click(function() {
112 $('#login-form').hide();
113 $('#registration-form').show();
116 $('#show-login-form').click(function() {
117 $('#registration-form').hide();
118 $('#login-form').show();
122 $('.fragment-text').each(function() {
123 if ($(this).prev().filter('.fragment-short-text').length) {
125 function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); },
126 function() { $(this).css({background: '#FFF'}); }
128 $(this).fadeOut(function() {
129 $(this).prev().fadeIn()
135 $('.fragment-short-text').click(function() {
136 $(this).fadeOut(function() { $(this).next().fadeIn() });
138 function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); },
139 function() { $(this).css({background: '#FFF'}); }
142 $('.show-all-tags').click(function() {
143 $(this).parent().parent().fadeOut(function() {
144 $(this).next().fadeIn();
149 $('.hide-all-tags').click(function() {
150 $(this).parent().parent().fadeOut(function() {
151 $(this).prev().fadeIn();
156 $('#registration-form').ajaxForm({
158 beforeSubmit: function() {
159 $('#registration-form input[type=submit]')
160 .attr('disabled', 'disabled')
161 .after('<img src="/static/img/indicator.gif" style="margin-left: 0.5em"/>');
163 success: function(response) {
164 if (response.success) {
165 location.reload(true);
167 $('#registration-form span.error').remove();
168 $.each(response.errors, function(id, errors) {
169 $('#id_registration-' + id).before('<span class="error">' + errors[0] + '</span>');
171 $('#registration-form input[type=submit]').removeAttr('disabled');
172 $('#registration-form img').remove();
177 $('#login-form').ajaxForm({
179 beforeSubmit: function() {
180 $('#login-form input[type=submit]')
181 .attr('disabled', 'disabled')
182 .after('<img src="/static/img/indicator.gif" style="margin-left: 0.5em"/>');
184 success: function(response) {
185 if (response.success) {
186 location.reload(true);
188 $('#login-form span.error').remove();
189 $.each(response.errors, function(id, errors) {
190 $('#id_login-' + id).before('<span class="error">' + errors[0] + '</span>');
192 $('#login-form input[type=submit]').removeAttr('disabled');
193 $('#login-form img').remove();
198 $('#login-register-window').jqm({
201 trigger: '.login-register-link',
202 onShow: function(hash) {
203 var offset = $(hash.t).offset();
204 hash.w.css({position: 'absolute', left: offset.left - hash.w.width() + $(hash.t).width(), top: offset.top});
205 $('div.header', hash.w).css({width: $(hash.t).width()});
210 $('ul.shelf-list li').hover(function() {
211 $(this).css({background: '#EEE', cursor: 'pointer'});
213 $(this).css({background: 'transparent'});
214 }).click(function() {
215 location.href = $('a.visit-shelf', this).attr('href');
218 $('.delete-shelf').click(function() {
220 var shelf_name = $('.visit-shelf', link.parent()).text();
221 if (confirm(LOCALE_TEXTS[LANGUAGE_CODE]['DELETE_SHELF']+ ' '+ shelf_name + '?')) {
222 $.post(link.attr('href'), function(data, textStatus) {
223 link.parent().remove();
229 $('#user-shelves-window').jqm({
231 target: $('#user-shelves-window div.target')[0],
233 trigger: '#user-shelves-link',
234 onShow: function(hash) {
235 var offset = $(hash.t).offset();
236 hash.w.css({position: 'absolute', left: offset.left - hash.w.width() + $(hash.t).width(), top: offset.top});
237 $('div.header', hash.w).css({width: $(hash.t).width()});
240 onLoad: function(hash) {
241 $('form', hash.w).ajaxForm({
242 target: $('#user-shelves-window div.target'),
243 success: function() { setTimeout(function() { $('#user-shelves-window').jqmHide() }, 1000) }
246 $('input', hash.w).labelify({labelledClass: 'blur'});
248 $('ul.shelf-list li', hash.w).hover(function() {
249 $(this).css({background: '#EEE', cursor: 'pointer'});
251 $(this).css({background: 'transparent'});
252 }).click(function() {
253 location.href = $('a.visit-shelf', this).attr('href');
256 $('.delete-shelf').click(function() {
258 var shelf_name = $('.visit-shelf', link.parent()).text();
259 if (confirm(LOCALE_TEXTS[LANGUAGE_CODE]['DELETE_SHELF'] + ' ' + shelf_name + '?')) {
260 $.post(link.attr('href'), function(data, textStatus) {
261 link.parent().remove();
269 $('#books-list .book').hover(
270 function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); },
271 function() { $(this).css({background: '#FFF'}); }
273 location.href = $('h2 a', this).attr('href');
276 $('#toggle-description').hover(
277 function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); },
278 function() { $(this).css({background: '#EEE'}); }
280 if ($('#description').hasClass('hidden')) {
281 $('#description').slideDown('fast').removeClass('hidden');
282 $.cookie('description-state', 'opened', {path: '/', expires: 30});
283 $('p', this).html(LOCALE_TEXTS[LANGUAGE_CODE]['HIDE_DESCRIPTION'] + ' ▲');
285 $('#description').slideUp('fast').addClass('hidden');
286 $.cookie('description-state', 'closed', {path: '/', expires: 30});
287 $('p', this).html(LOCALE_TEXTS[LANGUAGE_CODE]['HIDE_DESCRIPTION'] + ' ▼');
291 var target = $('#set-window div.target');
293 $('#set-window').jqm({
297 trigger: 'a.jqm-trigger',
298 onShow: function(hash) {
299 var offset = $(hash.t).offset();
300 target.html('<p><img src="/static/img/indicator.gif" />'+LOCALE_TEXTS[LANGUAGE_CODE]['DELETE_SHELF']+'</p>');
301 hash.w.css({position: 'absolute', left: offset.left, top: offset.top}).show() },
302 onLoad: function(hash) {
303 $('form', hash.w).ajaxForm({
305 success: function() { setTimeout(function() { $('#set-window').jqmHide() }, 1000) }
310 $('a.remove-from-shelf').click(function(event) {
311 event.preventDefault();
313 $.post(link.attr('href'), function(data, textStatus) {
314 link.parent().remove();
318 if ($.cookie('description-state') == 'closed') {
319 $('#description').hide().addClass('hidden');
320 $('#toggle-description p').html(LOCALE_TEXTS[LANGUAGE_CODE]['EXPAND_SHELF']+' ▼');
323 $('#user-info').show();
325 $('#onepercent-banner').show();
327 var formatsDownloaded = false;
328 $('#download-shelf').click(function() {
329 $('#download-shelf-menu').slideDown('fast');
331 if (!formatsDownloaded) {
332 // Get info about the formats
333 formatsDownloaded = true;
335 url: $('#download-formats-form').attr('data-formats-feed'),
338 complete: function() {
339 $('#download-formats-form-submit').attr('disabled', null);
340 $('#download-formats-form-submit-li img').remove();
341 $('#updating-formats').fadeOut('fast', function() {
342 $('#formats-updated').fadeIn('fast');
345 success: function(data) {
346 $('#download-formats-form li').each(function() {
348 if (!!item.attr('data-format') && !data[item.attr('data-format')]) {
349 item.fadeOut('fast', function() {
360 $('#download-formats-form-cancel').click(function() {
361 $('#download-shelf-menu').slideUp('fast');