3 "DELETE_SHELF": "Czy na pewno usunąć półkę",
4 "HIDE_DESCRIPTION": "Zwiń opis",
5 "EXPAND_DESCRIPTION": "Rozwiń opis",
6 "LOADING": "Ładowanie",
9 "DELETE_SHELF": "Translate me!",
10 "HIDE_DESCRIPTION": "Translate me!",
11 "EXPAND_DESCRIPTION": "Translate me!",
12 "LOADING": "Translate me!",
15 "DELETE_SHELF": "Translate me!",
16 "HIDE_DESCRIPTION": "Translate me!",
17 "EXPAND_DESCRIPTION": "Translate me!",
18 "LOADING": "Translate me!",
21 "DELETE_SHELF": "Translate me!",
22 "HIDE_DESCRIPTION": "Translate me!",
23 "EXPAND_DESCRIPTION": "Translate me!",
24 "LOADING": "Translate me!",
27 "DELETE_SHELF": "Translate me!",
28 "HIDE_DESCRIPTION": "Translate me!",
29 "EXPAND_DESCRIPTION": "Translate me!",
30 "LOADING": "Translate me!",
33 "DELETE_SHELF": "Translate me!",
34 "HIDE_DESCRIPTION": "Translate me!",
35 "EXPAND_DESCRIPTION": "Translate me!",
36 "LOADING": "Translate me!",
39 "DELETE_SHELF": "Translate me!",
40 "HIDE_DESCRIPTION": "Translate me!",
41 "EXPAND_DESCRIPTION": "Translate me!",
42 "LOADING": "Translate me!",
45 "DELETE_SHELF": "Translate me!",
46 "HIDE_DESCRIPTION": "Translate me!",
47 "EXPAND_DESCRIPTION": "Translate me!",
48 "LOADING": "Translate me!",
52 'Przekaż 1% żeby ukryć ten baner.',
53 'Jak dobrze wydać 1% swojego podatku? <strong>Poradnik dla opornych</strong>.',
54 'Wiadomość systemowa: wystąpił błąd brak funduszy. Wykonaj procedurę 1%.',
55 '<strong>FREE!</strong> Wygraj darmowe lektury!',
56 'Confidential business offer. Not scam! 1% for you.',
57 'Biblioteka Wolne Lektury wymaga aktualizacji. Kliknij dalej.',
58 '1000 lektur. <strong>1 procent</strong>.',
59 '1% dla biblioteki lektur szkolnych. 1% dla Twojej biblioteki.',
60 '1% na lektury szkolne.',
61 '1% dla wolności lektur szkolnych.',
62 'Podaruj Jeden Procent na rzecz szkolnej biblioteki internetowej.',
63 '1% podatku dla biblioteki szkolnej Wolne Lektury.',
64 '1% na rzecz darmowego dostępu do szkolnych lektur.',
65 'Żeby czytać teksty a nie skany. Przekaż 1%.',
66 'Czytaj teksty a nie skany. Przekaż 1%',
67 'Motyw artysty w literaturze - 47 cytatów. Pomóż znaleźć następne.',
68 'Twój 1% uwolni więcej lektur.',
69 'Ponad 400 motywów, blisko 10 000 000 cytatów. Pomóż znaleźć następne. Przekaż swój 1%.',
70 'Twój 1% uwolni lektury.',
71 'Rozlicz swój PIT z Wolnymi Lekturami. Skorzystaj z darmowego programu do rozliczania podatków.',
72 'Lektury 2010: Pan Tadeusz, Trylogia.',
73 'Pan Tadeusz też chce być w Internecie! Przekaż 1% swojego podatku.',
74 'Pomóż uwolnić 286 utworów z listy lektur szkolnych. Przekaż swój 1% na Wolne Lektury.'
78 function changeBannerText() {
79 var index = Math.floor(Math.random() * BANNER_TEXTS.length);
80 if (BANNER_TEXTS[index] == $('#onepercent-text').html()) {
84 $('#onepercent-text').fadeOut('slow', function() {
85 $(this).html(BANNER_TEXTS[index]);
86 $(this).fadeIn('slow');
89 setTimeout(changeBannerText, 30 * 1000);
93 function autocomplete_result_handler(event, item) {
94 $(event.target).closest('form').submit();
96 function serverTime() {
98 $.ajax({url: '/katalog/zegar/',
99 async: false, dataType: 'text',
100 success: function(text) {
101 time = new Date(text);
102 }, error: function(http, message, exc) {
110 $('form input').labelify({labelledClass: 'blur'});
112 target = $('#login-register-window div.target');
114 $('#show-registration-form').click(function() {
115 $('#login-form').hide();
116 $('#registration-form').show();
119 $('#show-login-form').click(function() {
120 $('#registration-form').hide();
121 $('#login-form').show();
125 $('.fragment-text').each(function() {
126 if ($(this).prev().filter('.fragment-short-text').length) {
128 function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); },
129 function() { $(this).css({background: '#FFF'}); }
131 $(this).fadeOut(function() {
132 $(this).prev().fadeIn();
139 $('.fragment-short-text').click(function() {
140 $(this).fadeOut(function() { $(this).next().fadeIn() });
143 function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); },
144 function() { $(this).css({background: '#FFF'}); }
147 $('.show-all-tags').click(function() {
148 $(this).parent().parent().fadeOut(function() {
149 $(this).next().fadeIn();
154 $('.hide-all-tags').click(function() {
155 $(this).parent().parent().fadeOut(function() {
156 $(this).prev().fadeIn();
161 $('#registration-form').ajaxForm({
163 beforeSubmit: function() {
164 $('#registration-form input[type=submit]')
165 .attr('disabled', 'disabled')
166 .after('<img src="/static/img/indicator.gif" style="margin-left: 0.5em"/>');
168 success: function(response) {
169 if (response.success) {
170 location.reload(true);
172 $('#registration-form span.error').remove();
173 $.each(response.errors, function(id, errors) {
174 $('#id_registration-' + id).before('<span class="error">' + errors[0] + '</span>');
176 $('#registration-form input[type=submit]').removeAttr('disabled');
177 $('#registration-form img').remove();
182 $('#login-form').ajaxForm({
184 beforeSubmit: function() {
185 $('#login-form input[type=submit]')
186 .attr('disabled', 'disabled')
187 .after('<img src="/static/img/indicator.gif" style="margin-left: 0.5em"/>');
189 success: function(response) {
190 if (response.success) {
191 location.reload(true);
193 $('#login-form span.error').remove();
194 $.each(response.errors, function(id, errors) {
195 $('#id_login-' + id).before('<span class="error">' + errors[0] + '</span>');
197 $('#login-form input[type=submit]').removeAttr('disabled');
198 $('#login-form img').remove();
203 $('#login-register-window').jqm({
206 trigger: '.login-register-link',
207 onShow: function(hash) {
208 var offset = $(hash.t).offset();
209 hash.w.css({position: 'absolute', left: offset.left - hash.w.width() + $(hash.t).width(), top: offset.top});
210 $('div.header', hash.w).css({width: $(hash.t).width()});
215 $('ul.shelf-list li').hover(function() {
216 $(this).css({background: '#EEE', cursor: 'pointer'});
218 $(this).css({background: 'transparent'});
219 }).click(function() {
220 location.href = $('a.visit-shelf', this).attr('href');
223 $('.delete-shelf').click(function() {
225 var shelf_name = $('.visit-shelf', link.parent()).text();
226 if (confirm(LOCALE_TEXTS[LANGUAGE_CODE]['DELETE_SHELF']+ ' '+ shelf_name + '?')) {
227 $.post(link.attr('href'), function(data, textStatus) {
228 link.parent().remove();
234 $('#user-shelves-window').jqm({
236 target: $('#user-shelves-window div.target')[0],
238 trigger: '#user-shelves-link',
239 onShow: function(hash) {
240 var offset = $(hash.t).offset();
241 hash.w.css({position: 'absolute', left: offset.left - hash.w.width() + $(hash.t).width(), top: offset.top});
242 $('div.header', hash.w).css({width: $(hash.t).width()});
245 onLoad: function(hash) {
246 $('form', hash.w).ajaxForm({
247 target: $('#user-shelves-window div.target'),
248 success: function() { setTimeout(function() { $('#user-shelves-window').jqmHide() }, 1000) }
251 $('input', hash.w).labelify({labelledClass: 'blur'});
253 $('ul.shelf-list li', hash.w).hover(function() {
254 $(this).css({background: '#EEE', cursor: 'pointer'});
256 $(this).css({background: 'transparent'});
257 }).click(function() {
258 location.href = $('a.visit-shelf', this).attr('href');
261 $('.delete-shelf').click(function() {
263 var shelf_name = $('.visit-shelf', link.parent()).text();
264 if (confirm(LOCALE_TEXTS[LANGUAGE_CODE]['DELETE_SHELF'] + ' ' + shelf_name + '?')) {
265 $.post(link.attr('href'), function(data, textStatus) {
266 link.parent().remove();
274 $('#suggest-window').jqm({
276 target: $('#suggest-window div.target')[0],
278 trigger: '#suggest-link',
279 onShow: function(hash) {
280 var offset = $(hash.t).offset();
281 hash.w.css({position: 'absolute', left: offset.left - hash.w.width() + $(hash.t).width(), top: offset.top});
282 $('div.header', hash.w).css({width: $(hash.t).width()});
285 onLoad: function(hash) {
286 $('form', hash.w).ajaxForm({
288 target: $('#suggest-window div.target'),
289 success: function(response) {
290 if (response.success) {
291 $('#suggest-window div.target').text(response.message);
292 setTimeout(function() { $('#suggest-window').jqmHide() }, 1000)
295 $('#suggest-form .error').remove();
296 $.each(response.errors, function(id, errors) {
297 $('#suggest-form #id_' + id).before('<span class="error">' + errors[0] + '</span>');
299 $('#suggest-form input[type=submit]').removeAttr('disabled');
307 $('#books-list .book').hover(
308 function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); },
309 function() { $(this).css({background: '#FFF'}); }
311 location.href = $('h2 a', this).attr('href');
314 $('#toggle-description').hover(
315 function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); },
316 function() { $(this).css({background: '#EEE'}); }
318 if ($('#description').hasClass('hidden')) {
319 $('#description').slideDown('fast').removeClass('hidden');
320 $.cookie('description-state', 'opened', {path: '/', expires: 30});
321 $('p', this).html(LOCALE_TEXTS[LANGUAGE_CODE]['HIDE_DESCRIPTION'] + ' ▲');
323 $('#description').slideUp('fast').addClass('hidden');
324 $.cookie('description-state', 'closed', {path: '/', expires: 30});
325 $('p', this).html(LOCALE_TEXTS[LANGUAGE_CODE]['EXPAND_DESCRIPTION'] + ' ▼');
329 $('#toggle-share-shelf').hover(
330 function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); },
331 function() { $(this).css({background: '#EEE'}); }
333 if ($('#share-shelf').hasClass('hidden')) {
334 $('#share-shelf').slideDown('fast').removeClass('hidden');
336 $('#share-shelf').slideUp('fast').addClass('hidden');
340 var target = $('#set-window div.target');
342 $('#set-window').jqm({
346 trigger: 'a.jqm-trigger',
347 onShow: function(hash) {
348 var offset = $(hash.t).offset();
349 target.html('<p><img src="/static/img/indicator.gif" />'+LOCALE_TEXTS[LANGUAGE_CODE]['DELETE_SHELF']+'</p>');
350 hash.w.css({position: 'absolute', left: offset.left, top: offset.top}).show() },
351 onLoad: function(hash) {
352 $('form', hash.w).ajaxForm({
354 success: function() { setTimeout(function() { $('#set-window').jqmHide() }, 1000) }
359 $('a.remove-from-shelf').click(function(event) {
360 event.preventDefault();
362 $.post(link.attr('href'), function(data, textStatus) {
363 link.parent().remove();
367 if ($.cookie('description-state') == 'closed') {
368 $('#description').hide().addClass('hidden');
369 $('#toggle-description p').html(LOCALE_TEXTS[LANGUAGE_CODE]['EXPAND_DESCRIPTION']+' ▼');
372 $('#share-shelf').hide().addClass('hidden');
373 $('#share-shelf input').focus(function(){this.select();});
375 $('#user-info').show();
377 $('#onepercent-banner').show();
379 var formatsDownloaded = false;
380 $('#download-shelf').click(function() {
381 $('#download-shelf-menu').slideDown('fast');
383 if (!formatsDownloaded) {
384 // Get info about the formats
385 formatsDownloaded = true;
387 url: $('#download-formats-form').attr('data-formats-feed'),
390 complete: function() {
391 $('#download-formats-form-submit').attr('disabled', null);
392 $('#download-formats-form-submit-li img').remove();
393 $('#updating-formats').fadeOut('fast', function() {
394 $('#formats-updated').fadeIn('fast');
397 success: function(data) {
398 $('#download-formats-form li').each(function() {
400 if (!!item.attr('data-format') && !data[item.attr('data-format')]) {
401 item.fadeOut('fast', function() {
412 $('#download-formats-form-cancel').click(function() {
413 $('#download-shelf-menu').slideUp('fast');