3 "DELETE_SHELF": "Czy na pewno usunąć półkę",
4 "HIDE_DESCRIPTION": "Zwiń opis",
5 "EXPAND_DESCRIPTION": "Rozwiń opis",
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) {
111 $('form input').labelify({labelledClass: 'blur'});
113 target = $('#login-register-window div.target');
115 $('#show-registration-form').click(function() {
116 $('#login-form').hide();
117 $('#registration-form').show();
120 $('#show-login-form').click(function() {
121 $('#registration-form').hide();
122 $('#login-form').show();
126 $('.fragment-text').each(function() {
127 if ($(this).prev().filter('.fragment-short-text').length) {
129 function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); },
130 function() { $(this).css({background: '#FFF'}); }
132 $(this).fadeOut(function() {
133 $(this).prev().fadeIn();
140 $('.fragment-short-text').click(function() {
141 $(this).fadeOut(function() { $(this).next().fadeIn() });
144 function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); },
145 function() { $(this).css({background: '#FFF'}); }
148 $('.show-all-tags').click(function() {
149 $(this).parent().parent().fadeOut(function() {
150 $(this).next().fadeIn();
155 $('.hide-all-tags').click(function() {
156 $(this).parent().parent().fadeOut(function() {
157 $(this).prev().fadeIn();
162 $('#registration-form').ajaxForm({
164 beforeSubmit: function() {
165 $('#registration-form input[type=submit]')
166 .attr('disabled', 'disabled')
167 .after('<img src="/static/img/indicator.gif" style="margin-left: 0.5em"/>');
169 success: function(response) {
170 if (response.success) {
171 location.reload(true);
173 $('#registration-form span.error').remove();
174 $.each(response.errors, function(id, errors) {
175 $('#id_registration-' + id).before('<span class="error">' + errors[0] + '</span>');
177 $('#registration-form input[type=submit]').removeAttr('disabled');
178 $('#registration-form img').remove();
183 $('#login-form').ajaxForm({
185 beforeSubmit: function() {
186 $('#login-form input[type=submit]')
187 .attr('disabled', 'disabled')
188 .after('<img src="/static/img/indicator.gif" style="margin-left: 0.5em"/>');
190 success: function(response) {
191 if (response.success) {
192 location.reload(true);
194 $('#login-form span.error').remove();
195 $.each(response.errors, function(id, errors) {
196 $('#id_login-' + id).before('<span class="error">' + errors[0] + '</span>');
198 $('#login-form input[type=submit]').removeAttr('disabled');
199 $('#login-form img').remove();
204 $('#login-register-window').jqm({
207 trigger: '.login-register-link',
208 onShow: function(hash) {
209 var offset = $(hash.t).offset();
210 hash.w.css({position: 'absolute', left: offset.left - hash.w.width() + $(hash.t).width(), top: offset.top});
211 $('div.header', hash.w).css({width: $(hash.t).width()});
216 $('ul.shelf-list li').hover(function() {
217 $(this).css({background: '#EEE', cursor: 'pointer'});
219 $(this).css({background: 'transparent'});
220 }).click(function() {
221 location.href = $('a.visit-shelf', this).attr('href');
224 $('.delete-shelf').click(function() {
226 var shelf_name = $('.visit-shelf', link.parent()).text();
227 if (confirm(LOCALE_TEXTS[LANGUAGE_CODE]['DELETE_SHELF']+ ' '+ shelf_name + '?')) {
228 $.post(link.attr('href'), function(data, textStatus) {
229 link.parent().remove();
235 $('#user-shelves-window').jqm({
237 target: $('#user-shelves-window div.target')[0],
239 trigger: '#user-shelves-link',
240 onShow: function(hash) {
241 var offset = $(hash.t).offset();
242 hash.w.css({position: 'absolute', left: offset.left - hash.w.width() + $(hash.t).width(), top: offset.top});
243 $('div.header', hash.w).css({width: $(hash.t).width()});
246 onLoad: function(hash) {
247 $('form', hash.w).ajaxForm({
248 target: $('#user-shelves-window div.target'),
249 success: function() { setTimeout(function() { $('#user-shelves-window').jqmHide() }, 1000) }
252 $('input', hash.w).labelify({labelledClass: 'blur'});
254 $('ul.shelf-list li', hash.w).hover(function() {
255 $(this).css({background: '#EEE', cursor: 'pointer'});
257 $(this).css({background: 'transparent'});
258 }).click(function() {
259 location.href = $('a.visit-shelf', this).attr('href');
262 $('.delete-shelf').click(function() {
264 var shelf_name = $('.visit-shelf', link.parent()).text();
265 if (confirm(LOCALE_TEXTS[LANGUAGE_CODE]['DELETE_SHELF'] + ' ' + shelf_name + '?')) {
266 $.post(link.attr('href'), function(data, textStatus) {
267 link.parent().remove();
275 $('#suggest-window').jqm({
277 target: $('#suggest-window div.target')[0],
279 trigger: '#suggest-link',
280 onShow: function(hash) {
281 var offset = $(hash.t).offset();
282 hash.w.css({position: 'absolute', left: offset.left - hash.w.width() + $(hash.t).width(), top: offset.top});
283 $('div.header', hash.w).css({width: $(hash.t).width()});
286 onLoad: function(hash) {
287 $('form', hash.w).ajaxForm({
289 target: $('#suggest-window div.target'),
290 success: function(response) {
291 if (response.success) {
292 $('#suggest-window div.target').text(response.message);
293 setTimeout(function() { $('#suggest-window').jqmHide() }, 1000)
296 $('#suggest-form .error').remove();
297 $.each(response.errors, function(id, errors) {
298 $('#suggest-form #id_' + id).before('<span class="error">' + errors[0] + '</span>');
300 $('#suggest-form input[type=submit]').removeAttr('disabled');
308 $('#books-list .book').hover(
309 function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); },
310 function() { $(this).css({background: '#FFF'}); }
312 location.href = $('h2 a', this).attr('href');
315 function toggled_by_slide(cont, short_el, long_el, button, short_text, long_text) {
316 function toggle(cont, short_el, long_el, button, short_text, long_text) {
317 if (cont.hasClass('short')) {
318 cont.animate({"height": long_el.attr("cont_h")+'px'}, {duration: "fast" }).removeClass('short');
321 button.html(long_text);
323 cont.animate({"height": short_el.attr("cont_h")+'px'}, {duration: "fast" }).addClass('short');
326 button.html(short_text);
329 long_el.attr("cont_h", cont.height()).hide();
330 short_el.show().attr("cont_h", cont.height());
331 cont.addClass('short');
332 button.html(short_text);
334 function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); },
335 function() { $(this).css({background: '#EEE'}); }
337 toggle(cont, short_el, long_el, button, short_text, long_text)
340 function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); },
341 function() { $(this).css({background: '#FFF'}); }
343 toggle(cont, short_el, long_el, button, short_text, long_text)
346 toggled_by_slide($('#description'), $('#description-short'), $('#description-long'),
347 $('#toggle-description p'),
348 LOCALE_TEXTS[LANGUAGE_CODE]['EXPAND_DESCRIPTION']+' ▼',
349 LOCALE_TEXTS[LANGUAGE_CODE]['HIDE_DESCRIPTION'] + ' ▲'
352 $('#toggle-share-shelf').hover(
353 function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); },
354 function() { $(this).css({background: '#EEE'}); }
356 if ($('#share-shelf').hasClass('hidden')) {
357 $('#share-shelf').slideDown('fast').removeClass('hidden');
359 $('#share-shelf').slideUp('fast').addClass('hidden');
363 var target = $('#set-window div.target');
365 $('#set-window').jqm({
369 trigger: 'a.jqm-trigger',
370 onShow: function(hash) {
371 var offset = $(hash.t).offset();
372 target.html('<p><img src="/static/img/indicator.gif" />'+LOCALE_TEXTS[LANGUAGE_CODE]['DELETE_SHELF']+'</p>');
373 hash.w.css({position: 'absolute', left: offset.left, top: offset.top}).show() },
374 onLoad: function(hash) {
376 $('#createShelfTrigger').click(function(){
377 $('#createNewShelf').show();
381 $('form', hash.w).ajaxForm({
383 success: function() {
384 setTimeout(function() {
385 $('#set-window').jqmHide();
391 $('a.remove-from-shelf').click(function(event) {
392 event.preventDefault();
394 $.post(link.attr('href'), function(data, textStatus) {
395 link.parent().remove();
399 $('#share-shelf').hide().addClass('hidden');
400 $('#share-shelf input').focus(function(){this.select();});
402 $('#user-info').show();
404 $('#onepercent-banner').show();
406 var formatsDownloaded = false;
407 $('#download-shelf').click(function() {
408 $('#download-shelf-menu').slideDown('fast');
410 if (!formatsDownloaded) {
411 // Get info about the formats
412 formatsDownloaded = true;
414 url: $('#download-formats-form').attr('data-formats-feed'),
417 complete: function() {
418 $('#download-formats-form-submit').attr('disabled', null);
419 $('#download-formats-form-submit-li img').remove();
420 $('#updating-formats').fadeOut('fast', function() {
421 $('#formats-updated').fadeIn('fast');
424 success: function(data) {
425 $('#download-formats-form li').each(function() {
427 if (!!item.attr('data-format') && !data[item.attr('data-format')]) {
428 item.fadeOut('fast', function() {
439 $('#download-formats-form-cancel').click(function() {
440 $('#download-shelf-menu').slideUp('fast');