.project
.settings
.pydevproject
+.tmp_*
+
class SearchForm(forms.Form):
- q = JQueryAutoCompleteField('/katalog/tags/', {'minChars': 2, 'selectFirst': True, 'cacheLength': 50})
+ q = JQueryAutoCompleteField('/katalog/tags/', {'minChars': 2, 'selectFirst': True, 'cacheLength': 50, 'matchContains': "word"})
tags = forms.CharField(widget=forms.HiddenInput, required=False)
def __init__(self, *args, **kwargs):
* Revision: $Id: jquery.autocomplete.js 15 2009-08-22 10:30:27Z joern.zaefferer $
*/
+/*
+ * Modified by Radek Czajka, Fundacja Nowoczesna Polska, 2010-05-10:
+ * escape regex for word start checking in matchSubset
+ */
+
;(function($) {
$.fn.extend({
s = s.toLowerCase();
var i = s.indexOf(sub);
if (options.matchContains == "word"){
- i = s.toLowerCase().search("\\b" + sub.toLowerCase());
+ i = s.toLowerCase().search("\\b" + sub.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1").toLowerCase());
}
if (i == -1) return false;
return i == 0 || options.matchContains;
labels: ['lat', 'miesięcy', 'tygodni', 'dni', 'godzin', 'minut', 'sekund'],\r
labels1: ['rok', 'miesiąc', 'tydzień', 'dzień', 'godzina', 'minuta', 'sekunda'],\r
labels2: ['lata', 'miesiące', 'tygodnie', 'dni', 'godziny', 'minuty', 'sekundy'],\r
- compactLabels: ['l', 'm', 't', 'd'], compactLabels1: ['r', 'm', 't', 'd'],\r
+ compactLabels: ['l', 'm', 't', 'd'],\r
+ compactLabels1: ['r', 'm', 't', 'd'],\r
+ compactLabels2: ['l', 'm', 't', 'd'],\r
timeSeparator: ':', isRTL: false,\r
which: function(n){\r
return n==1 ? 1 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 2 : 0;\r
Please attribute the author if you use it. */
/* Modified by Radek Czajka, Fundacja Nowoczesna Polska (radoslaw.czajka(at)nowoczesnapolska.org.pl) */
-
+w
/* Display a countdown timer.
Attach it with options like:
$('div selector').countdown(
var timeSeparator = this._get(inst, 'timeSeparator');
var description = this._get(inst, 'description') || '';
var showCompact = function(period) {
- var labelsNum = $.countdown._get(inst, 'compactLabels' + periods[period]);
+ var which = $.countdown._get(inst, 'which');
+ if (which) {
+ var labelsNum = $.countdown._get(inst, 'compactLabels' + which(periods[period]));
+ }
return (show[period] ? periods[period] +
(labelsNum ? labelsNum[period] : labels[period]) + ' ' : '');
};
-{% load i18n %}
{% extends 'base.html' %}
+{% load i18n %}
{% block title %}1% podatku na WolneLektury.pl{% endblock title %}
-{% load i18n %}
{% extends "admin/base.html" %}
+{% load i18n %}
{% block title %}{{ title }} | {% trans "Site administration" %} - WolneLektury.pl{% endblock %}
-{% load i18n %}
{% extends "admin/change_list.html" %}
+{% load i18n %}
{% block content %}
<form action="{% url import_book %}" method="post" enctype="multipart/form-data">
-{% load i18n %}
{% extends "base.html" %}
+{% load i18n %}
{% block title %}{% trans "Sign in" %} / {% trans "Register on"%} WolneLektury.pl{% endblock %}
-{% load i18n %}
{% extends "base.html" %}
+{% load i18n %}
{% load catalogue_tags pagination_tags %}
{% block title %}{{ book.title }} w WolneLektury.pl{% endblock %}
<a href="{{ book.pdf_file.url }}">{% trans "Download PDF" %}</a>
{% endif %}
{% if book.odt_file %}
- <a href="{{ book.odt_file.url }}">{% trans "Download ODT %}</a>
+ <a href="{{ book.odt_file.url }}">{% trans "Download ODT" %}</a>
{% endif %}
{% if book.txt_file %}
- <a href="{{ book.txt_file.url }}">{% trans "Download TXT %}</a>
+ <a href="{{ book.txt_file.url }}">{% trans "Download TXT" %}</a>
{% endif %}
{% if book.mp3_file %}
<div id="czytamy-sluchajac-info">
-{% load i18n %}
{% extends "base.html" %}
+{% load i18n %}
{% load catalogue_tags pagination_tags %}
{% block title %}{% trans "Theme" %} {{ theme }} {% trans "in work " %} {{ book }} {% "on " %} WolneLektury.pl{% endblock %}
-{% load i18n %}
{% extends "base.html" %}
+{% load i18n %}
{% load catalogue_tags chunks %}
{% block bodyid %}book-a-list{% endblock %}
-{% load i18n %}
{% extends "base.html" %}
+{% load i18n %}
{% load catalogue_tags pagination_tags %}
{% block title %}{% title_from_tags tags %} w WolneLektury.pl{% endblock %}
-{% load i18n %}
{% extends 'base.html' %}
+{% load i18n %}
{% block title %}{{ object.title }} w WolneLektury.pl{% endblock %}
-{% load i18n %}
{% extends "base.html" %}
+{% load i18n %}
{% load catalogue_tags chunks %}
{% block bodyid %}document-list-body{% endblock %}