From 5761df5a5d4d40ba7c82e1b1277af30cedeb8306 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Fri, 5 Sep 2008 11:02:38 +0200 Subject: [PATCH 01/16] Renamed BookSetsForm to ObjectSetsForm. --- catalogue/forms.py | 8 ++++---- catalogue/views.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/catalogue/forms.py b/catalogue/forms.py index 583c9aed7..279ec7193 100644 --- a/catalogue/forms.py +++ b/catalogue/forms.py @@ -25,14 +25,14 @@ class UserSetsForm(forms.Form): ) -class BookSetsForm(forms.Form): - def __init__(self, book, user, *args, **kwargs): - super(BookSetsForm, self).__init__(*args, **kwargs) +class ObjectSetsForm(forms.Form): + def __init__(self, obj, user, *args, **kwargs): + super(ObjectSetsForm, self).__init__(*args, **kwargs) self.fields['set_ids'] = forms.MultipleChoiceField( label=u'Półki', required=False, choices=[(tag.id, tag.name) for tag in Tag.objects.filter(category='set', user=user)], - initial=[tag.id for tag in book.tags.filter(category='set', user=user)], + initial=[tag.id for tag in obj.tags.filter(category='set', user=user)], widget=forms.CheckboxSelectMultiple ) diff --git a/catalogue/views.py b/catalogue/views.py index de41e1518..02e77c2d4 100644 --- a/catalogue/views.py +++ b/catalogue/views.py @@ -174,7 +174,7 @@ def book_sets(request, slug): return HttpResponse('

Aby zarządzać swoimi półkami, musisz się zalogować.

') if request.method == 'POST': - form = forms.BookSetsForm(book, request.user, request.POST) + form = forms.ObjectSetsForm(book, request.user, request.POST) if form.is_valid(): book.tags = ([models.Tag.objects.get(pk=id) for id in form.cleaned_data['set_ids']] + list(book.tags.filter(~Q(category='set') | ~Q(user=request.user)))) @@ -183,7 +183,7 @@ def book_sets(request, slug): else: return HttpResponseRedirect('/') else: - form = forms.BookSetsForm(book, request.user) + form = forms.ObjectSetsForm(book, request.user) new_set_form = forms.NewSetForm() return render_to_response('catalogue/book_sets.html', locals(), -- 2.20.1 From 633b91cf88a2ff369d7d3dbcc8bdc3fd20cc68e9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Fri, 5 Sep 2008 11:07:38 +0200 Subject: [PATCH 02/16] Created fragment_sets view and template. --- catalogue/urls.py | 1 + catalogue/views.py | 27 +++++++++++++++++++++++++- templates/catalogue/fragment_sets.html | 17 ++++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 templates/catalogue/fragment_sets.html diff --git a/catalogue/urls.py b/catalogue/urls.py index c253ba1b0..d454fd478 100644 --- a/catalogue/urls.py +++ b/catalogue/urls.py @@ -6,6 +6,7 @@ urlpatterns = patterns('catalogue.views', url(r'^$', 'main_page', name='main_page'), url(r'^lektury/', 'book_list'), url(r'^lektura/(?P[a-zA-Z0-9-]+)/polki/', 'book_sets'), + url(r'^fragment/(?P[0-9]+)/polki/', 'fragment_sets'), url(r'^polki/nowa/$', 'new_set'), url(r'^lektura/(?P[a-zA-Z0-9-]+)/$', 'book_detail'), url(r'^tags/$', 'tags_starting_with', name='hint'), diff --git a/catalogue/views.py b/catalogue/views.py index 02e77c2d4..08d940164 100644 --- a/catalogue/views.py +++ b/catalogue/views.py @@ -179,7 +179,7 @@ def book_sets(request, slug): book.tags = ([models.Tag.objects.get(pk=id) for id in form.cleaned_data['set_ids']] + list(book.tags.filter(~Q(category='set') | ~Q(user=request.user)))) if request.is_ajax(): - return HttpResponse('

Półki zostały zapisane

') + return HttpResponse('

Półki zostały zapisane.

') else: return HttpResponseRedirect('/') else: @@ -190,6 +190,31 @@ def book_sets(request, slug): context_instance=RequestContext(request)) +def fragment_sets(request, id): + fragment = get_object_or_404(models.Fragment, pk=id) + user_sets = models.Tag.objects.filter(category='set', user=request.user) + fragment_sets = fragment.tags.filter(category='set', user=request.user) + + if not request.user.is_authenticated(): + return HttpResponse('

Aby zarządzać swoimi półkami, musisz się zalogować.

') + + if request.method == 'POST': + form = forms.ObjectSetsForm(fragment, request.user, request.POST) + if form.is_valid(): + fragment.tags = ([models.Tag.objects.get(pk=id) for id in form.cleaned_data['set_ids']] + + list(fragment.tags.filter(~Q(category='set') | ~Q(user=request.user)))) + if request.is_ajax(): + return HttpResponse('

Półki zostały zapisane.

') + else: + return HttpResponseRedirect('/') + else: + form = forms.ObjectSetsForm(book, request.user) + new_set_form = forms.NewSetForm() + + return render_to_response('catalogue/fragment_sets.html', locals(), + context_instance=RequestContext(request)) + + @login_required @require_POST def new_set(request): diff --git a/templates/catalogue/fragment_sets.html b/templates/catalogue/fragment_sets.html new file mode 100644 index 000000000..c7d641ca2 --- /dev/null +++ b/templates/catalogue/fragment_sets.html @@ -0,0 +1,17 @@ +

Półki zawierające fragment

+{% if not user.tag_set.count %} +

Nie posiadasz żadnych półek. Jeśli chcesz, możesz utworzyć nową półkę poniżej.

+{% else %} +
+
    +
  1. {{ form.set_ids }}
  2. +
  3. +
+
+{% endif %} +
+
+
    +
  1. {{ new_set_form.name }}
  2. +
+
\ No newline at end of file -- 2.20.1 From 4727a417dfb92338b0a1969ca64f14c556d8d6a0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Fri, 5 Sep 2008 11:11:09 +0200 Subject: [PATCH 03/16] Removed old commented out code from book_short.html. --- templates/catalogue/book_short.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/templates/catalogue/book_short.html b/templates/catalogue/book_short.html index 019a7b8a6..e6a3748b8 100644 --- a/templates/catalogue/book_short.html +++ b/templates/catalogue/book_short.html @@ -1,9 +1,7 @@
- {# {% if request.user.is_authenticated %} #} - {# {% endif %} #}

{{ book.title }}

-- 2.20.1 From e388c13ff66e64e4266cdb216eca98970c6a8651 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Fri, 5 Sep 2008 11:44:46 +0200 Subject: [PATCH 04/16] Added fragment_short.html to repository. --- templates/catalogue/fragment_short.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 templates/catalogue/fragment_short.html diff --git a/templates/catalogue/fragment_short.html b/templates/catalogue/fragment_short.html new file mode 100644 index 000000000..a05ba4586 --- /dev/null +++ b/templates/catalogue/fragment_short.html @@ -0,0 +1,20 @@ +
+ {#
#} + {# Półki #} + {#
#} + {% if fragment.short_text %} +
+ {{ fragment.short_text|safe }} + ↓ Rozwiń fragment ↓ +
+ {% endif %} +
+ {{ fragment.text|safe }} + {% if fragment.short_text %} + ↑ Zwiń fragment ↑ + {% endif %} +
+ +
-- 2.20.1 From 3bf093e9bc0b4a6057c6c287376d748eb3c78b7f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Fri, 5 Sep 2008 11:45:04 +0200 Subject: [PATCH 05/16] Fixed a typo. --- catalogue/views.py | 2 +- media/css/master.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/catalogue/views.py b/catalogue/views.py index 08d940164..2719884df 100644 --- a/catalogue/views.py +++ b/catalogue/views.py @@ -208,7 +208,7 @@ def fragment_sets(request, id): else: return HttpResponseRedirect('/') else: - form = forms.ObjectSetsForm(book, request.user) + form = forms.ObjectSetsForm(fragment, request.user) new_set_form = forms.NewSetForm() return render_to_response('catalogue/fragment_sets.html', locals(), diff --git a/media/css/master.css b/media/css/master.css index 2fe2e3424..da61511cb 100644 --- a/media/css/master.css +++ b/media/css/master.css @@ -298,7 +298,7 @@ em { padding: 0.5em 0.5em 1.5em 0.5em; } -.book .change-sets { +.change-sets { float: right; } -- 2.20.1 From 88b3243c6edfa61660920d5a9e31f8dd77415b32 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Fri, 5 Sep 2008 13:21:35 +0200 Subject: [PATCH 06/16] Added fragment styles. --- media/css/master.plain.css | 116 +++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 media/css/master.plain.css diff --git a/media/css/master.plain.css b/media/css/master.plain.css new file mode 100644 index 000000000..55bc023ff --- /dev/null +++ b/media/css/master.plain.css @@ -0,0 +1,116 @@ +/* =================================================== */ +/* = Common elements: headings, paragraphs and lines = */ +/* =================================================== */ +.fragment h1 { + font-size: 3em; + margin: 1.5em 0; + text-align: center; + line-height: 1.5em; + font-weight: bold; +} + +.fragment h2 { + font-size: 2em; + margin: 1.5em 0 0; + font-weight: bold; + line-height: 1.5em; +} + +.fragment h3 { + font-size: 1.5em; + margin: 1.5em 0 0; + font-weight: normal; + line-height: 1.5em; +} + +.fragment h4 { + font-size: 1em; + margin: 1.5em 0 0; + line-height: 1.5em; +} + +.fragment p { + margin: 0; +} + +/* ======================== */ +/* = Footnotes and themes = */ +/* ======================== */ +.theme-begin { + display: none; +} + +.annotation { + display: none; +} + +/* =================== */ +/* = Custom elements = */ +/* =================== */ +span.author { + font-size: 0.75em; + display: block; + line-height: 1.5em; + margin-bottom: 0.25em; +} + +span.collection { + font-size: 0.75em; + display: block; + line-height: 1.5em; + margin-bottom: -0.25em; +} + +span.subtitle { + font-size: 0.75em; + display: block; + line-height: 1.5em; + margin-top: -0.25em; +} + +div.didaskalia { + font-style: italic; + margin: 0.5em 0 0; +} + +div.kwestia { + margin: 0.5em 0 0; +} + +div.stanza { + margin: 1.5em 0 0; +} + +div.kwestia div.stanza { + margin: 0; +} + +p.paragraph { + text-align: justify; + margin: 1.5em 0 0; +} + +p.motto { + text-align: justify; + font-style: italic; + margin: 1.5em 0 0; +} + +p.motto_podpis { + font-size: 0.875em; +} + +/*div.fragment { + border-bottom: 0.1em solid #999; + padding-bottom: 1.5em; +}*/ + +div.note p, div.note p.paragraph { + text-align: right; + font-style: italic; +} + +hr.spacer { + height: 3em; + visibility: hidden; +} -- 2.20.1 From 6fe9513613b3d0dcfc934c41a5bfa9b71f341b06 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Fri, 5 Sep 2008 13:22:08 +0200 Subject: [PATCH 07/16] Added 'user shelves' tool menu. --- catalogue/urls.py | 12 ++++---- catalogue/views.py | 18 ++++++++++- media/css/master.css | 43 +++++++++++++++++++++++++-- media/js/catalogue.js | 36 +++++++++++++++++++++- templates/base.html | 8 ++++- templates/catalogue/user_shelves.html | 15 ++++++++++ 6 files changed, 121 insertions(+), 11 deletions(-) create mode 100644 templates/catalogue/user_shelves.html diff --git a/catalogue/urls.py b/catalogue/urls.py index d454fd478..12eaa47a4 100644 --- a/catalogue/urls.py +++ b/catalogue/urls.py @@ -4,11 +4,13 @@ from django.conf.urls.defaults import * urlpatterns = patterns('catalogue.views', url(r'^$', 'main_page', name='main_page'), - url(r'^lektury/', 'book_list'), - url(r'^lektura/(?P[a-zA-Z0-9-]+)/polki/', 'book_sets'), - url(r'^fragment/(?P[0-9]+)/polki/', 'fragment_sets'), - url(r'^polki/nowa/$', 'new_set'), - url(r'^lektura/(?P[a-zA-Z0-9-]+)/$', 'book_detail'), + url(r'^polki/$', 'user_shelves', name='user_shelves'), + url(r'^polki/(?P[a-zA-Z0-9-]+)/usun/$', 'delete_shelf', name='delete_shelf'), + url(r'^lektury/', 'book_list', name='book_list'), + url(r'^lektura/(?P[a-zA-Z0-9-]+)/polki/', 'book_sets', name='book_shelves'), + url(r'^fragment/(?P[0-9]+)/polki/', 'fragment_sets', name='fragment_shelves'), + url(r'^polki/nowa/$', 'new_set', name='new_set'), + url(r'^lektura/(?P[a-zA-Z0-9-]+)/$', 'book_detail', name='book_detail'), url(r'^tags/$', 'tags_starting_with', name='hint'), url(r'^szukaj/$', 'search', name='search'), url(r'^(?P[a-zA-Z-/]+)/$', 'tagged_object_list', name='tagged_object_list'), diff --git a/catalogue/views.py b/catalogue/views.py index 2719884df..b3f2d5bfb 100644 --- a/catalogue/views.py +++ b/catalogue/views.py @@ -221,8 +221,24 @@ def new_set(request): new_set_form = forms.NewSetForm(request.POST) if new_set_form.is_valid(): new_set = new_set_form.save(request.user) - return HttpResponse('

Zestaw %s został utworzony

' % new_set) + return HttpResponse(u'

Zestaw %s został utworzony

' % new_set) return render_to_response('catalogue/book_sets.html', locals(), context_instance=RequestContext(request)) + +@login_required +@require_POST +def delete_shelf(request, slug): + user_set = get_object_or_404(models.Tag, slug=slug, category='set', user=request.user) + user_set.delete() + return HttpResponse(u'

Zestaw %s został usunięty

' % user_set.name) + + +@login_required +def user_shelves(request): + shelves = models.Tag.objects.filter(category='set', user=request.user) + new_set_form = forms.NewSetForm() + return render_to_response('catalogue/user_shelves.html', locals(), + context_instance=RequestContext(request)) + diff --git a/media/css/master.css b/media/css/master.css index da61511cb..a7b33e6a3 100644 --- a/media/css/master.css +++ b/media/css/master.css @@ -343,6 +343,8 @@ em { /* ================ */ /* = Modal Window = */ /* ================ */ +.jqmOverlay { background-color: #000; } + #set-window { position: absolute; display: none; @@ -366,9 +368,6 @@ em { padding: 1em; } -.jqmOverlay { background-color: #000; } - - #login-register-window { position: absolute; display: none; @@ -397,6 +396,44 @@ em { padding: 1em; } +#user-shelves-window { + position: absolute; + display: none; + width: 28em; + background-color: transparent; + margin-top: -0.5em; + margin-left: 1em; +} + +#user-shelves-window div.header { + background-color: #FFF; + border-right: 0.3em solid #DDD; + width: 4em; + right: 0; + left: auto; + padding: 0.5em 1em 0.5em 1em; + float: right; + text-align: center; +} + +#user-shelves-window div.target { + clear: both; + background-color: #FFF; + border-right: 0.3em solid #DDD; + border-bottom: 0.3em solid #DDD; + padding: 1em; +} + +#user-shelves-window ul { + list-style: none; + padding: 0; +} + +#user-shelves-window a.delete-shelf { + color: #900; + float: right; +} + /* ======================== */ /* = Alphabetic book list = */ /* ======================== */ diff --git a/media/js/catalogue.js b/media/js/catalogue.js index bdceb1a64..d403a702b 100644 --- a/media/js/catalogue.js +++ b/media/js/catalogue.js @@ -88,6 +88,40 @@ hash.w.show(); } }); - $('#login-register-window').labelify({labelledClass: 'blur'}); + + $('#user-shelves-window').jqm({ + ajax: '@href', + target: $('#user-shelves-window div.target')[0], + overlay: 60, + trigger: '#user-shelves-link', + onShow: function(hash) { + var offset = $(hash.t).offset(); + hash.w.css({position: 'absolute', left: offset.left - hash.w.width() + $(hash.t).width(), top: offset.top}); + $('div.header', hash.w).css({width: $(hash.t).width()}); + hash.w.show(); + }, + onLoad: function(hash) { + $('form', hash.w).ajaxForm({ + target: $('#user-shelves-window div.target'), + success: function() { setTimeout(function() { $('#user-shelves-window').jqmHide() }, 1000) } + }); + + $('ul.shelf-list li', hash.w).hover(function() { + $(this).css({background: '#EEE', cursor: 'pointer'}); + }, function() { + $(this).css({background: 'transparent'}); + }).click(function() { + location.href = $('a.visit-shelf', this).attr('href'); + }); + + $('.delete-shelf').click(function() { + $.post($(this).attr('href'), function(data, textStatus) { + $('#user-shelves-window div.target').html(data); + setTimeout(function() { $('#user-shelves-window').jqmHide() }, 1000); + }); + return false; + }); + } + }); }); })(jQuery) \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index aa0f01c9c..8c8f1c68b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -23,7 +23,7 @@ {% if user.is_authenticated %}

Zalogowany jako {{ user.username }} - | Moje półki + | Moje półki {% if user.is_staff %} | Administracja {% endif %} @@ -89,5 +89,11 @@

+
+ +
+

* Ładowanie

+
+
diff --git a/templates/catalogue/user_shelves.html b/templates/catalogue/user_shelves.html new file mode 100644 index 000000000..44517c550 --- /dev/null +++ b/templates/catalogue/user_shelves.html @@ -0,0 +1,15 @@ +

Moje półki

+{% if shelves %} + +{% else %} +

Nie posiadasz żadnych półek. Jeśli chcesz, możesz utworzyć półkę poniżej.

+{% endif %} +
+
+
    +
  1. {{ new_set_form.name }}
  2. +
-- 2.20.1 From af81c15fd869f9bf9dab6fd14b75e10bbd4e1ed0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Fri, 5 Sep 2008 13:26:04 +0200 Subject: [PATCH 08/16] Moved fragment metadata to the right. --- media/css/master.css | 1 + templates/catalogue/fragment_short.html | 1 + 2 files changed, 2 insertions(+) diff --git a/media/css/master.css b/media/css/master.css index a7b33e6a3..6615ee6c8 100644 --- a/media/css/master.css +++ b/media/css/master.css @@ -296,6 +296,7 @@ em { .fragment-metadata { padding: 0.5em 0.5em 1.5em 0.5em; + float: right; } .change-sets { diff --git a/templates/catalogue/fragment_short.html b/templates/catalogue/fragment_short.html index a05ba4586..99ffacef0 100644 --- a/templates/catalogue/fragment_short.html +++ b/templates/catalogue/fragment_short.html @@ -17,4 +17,5 @@ +
-- 2.20.1 From 2f43b57dbef744441d2db1adadcfe16cd0ab1053 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Fri, 5 Sep 2008 16:13:12 +0200 Subject: [PATCH 09/16] Changed references to 'set' to 'shelf'. --- catalogue/templatetags/catalogue_tags.py | 4 ++-- catalogue/views.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/catalogue/templatetags/catalogue_tags.py b/catalogue/templatetags/catalogue_tags.py index 0e05fa52a..12460a0c8 100644 --- a/catalogue/templatetags/catalogue_tags.py +++ b/catalogue/templatetags/catalogue_tags.py @@ -54,9 +54,9 @@ def title_from_tags(tags): title = u'' - # Specjalny przypadek oglądania wszystkich lektur w danym zestawie + # Specjalny przypadek oglądania wszystkich lektur na danej półce if len(self) == 1 and 'set' in self: - return u'Zestaw %s' % self['set'] + return u'Półka %s' % self['set'] # Specjalny przypadek "Twórczość w pozytywizmie", wtedy gdy tylko epoka # jest wybrana przez użytkownika diff --git a/catalogue/views.py b/catalogue/views.py index b3f2d5bfb..ad9bde747 100644 --- a/catalogue/views.py +++ b/catalogue/views.py @@ -221,7 +221,7 @@ def new_set(request): new_set_form = forms.NewSetForm(request.POST) if new_set_form.is_valid(): new_set = new_set_form.save(request.user) - return HttpResponse(u'

Zestaw %s został utworzony

' % new_set) + return HttpResponse(u'

Półka %s została utworzona

' % new_set) return render_to_response('catalogue/book_sets.html', locals(), context_instance=RequestContext(request)) @@ -232,7 +232,7 @@ def new_set(request): def delete_shelf(request, slug): user_set = get_object_or_404(models.Tag, slug=slug, category='set', user=request.user) user_set.delete() - return HttpResponse(u'

Zestaw %s został usunięty

' % user_set.name) + return HttpResponse(u'

Półka %s została usunięta

' % user_set.name) @login_required -- 2.20.1 From ea1a90033eb53ae995f71943e57653fff30d4b8e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Fri, 5 Sep 2008 16:15:20 +0200 Subject: [PATCH 10/16] Fixed slug regex for tags (now allows numbers in tag name). --- catalogue/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalogue/urls.py b/catalogue/urls.py index 12eaa47a4..f4779067c 100644 --- a/catalogue/urls.py +++ b/catalogue/urls.py @@ -13,6 +13,6 @@ urlpatterns = patterns('catalogue.views', url(r'^lektura/(?P[a-zA-Z0-9-]+)/$', 'book_detail', name='book_detail'), url(r'^tags/$', 'tags_starting_with', name='hint'), url(r'^szukaj/$', 'search', name='search'), - url(r'^(?P[a-zA-Z-/]+)/$', 'tagged_object_list', name='tagged_object_list'), + url(r'^(?P[a-zA-Z0-9-/]+)/$', 'tagged_object_list', name='tagged_object_list'), ) -- 2.20.1 From c5aff19e408ee9b1f9f8561549de7473a134e47f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Fri, 5 Sep 2008 16:23:59 +0200 Subject: [PATCH 11/16] Asking for confirmation before deleting shelf. --- media/js/catalogue.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/media/js/catalogue.js b/media/js/catalogue.js index d403a702b..ad5a7c2c8 100644 --- a/media/js/catalogue.js +++ b/media/js/catalogue.js @@ -101,6 +101,8 @@ hash.w.show(); }, onLoad: function(hash) { + var shelf_name = $('a.visit-shelf', this).html(); + $('form', hash.w).ajaxForm({ target: $('#user-shelves-window div.target'), success: function() { setTimeout(function() { $('#user-shelves-window').jqmHide() }, 1000) } @@ -115,10 +117,12 @@ }); $('.delete-shelf').click(function() { - $.post($(this).attr('href'), function(data, textStatus) { - $('#user-shelves-window div.target').html(data); - setTimeout(function() { $('#user-shelves-window').jqmHide() }, 1000); - }); + if (confirm('Czy na pewno usunąć półkę ' + shelf_name + '?')) { + $.post($(this).attr('href'), function(data, textStatus) { + $('#user-shelves-window div.target').html(data); + setTimeout(function() { $('#user-shelves-window').jqmHide() }, 1000); + }); + } return false; }); } -- 2.20.1 From 7cc8b95ca00f23d96e631fb7425fd2e7da5feae0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Fri, 5 Sep 2008 17:11:03 +0200 Subject: [PATCH 12/16] Made annotation links smaller. Removed numbers from person list style. Added handling of tags "dedykacja" and "miejsce_czas". --- lib/librarian/bin/master.css | 13 +++++++++++-- lib/librarian/book2html.xslt | 8 ++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/lib/librarian/bin/master.css b/lib/librarian/bin/master.css index f07e41cef..53209b205 100644 --- a/lib/librarian/bin/master.css +++ b/lib/librarian/bin/master.css @@ -64,7 +64,7 @@ p { .annotation { font-style: normal; font-weight: normal; - font-size: 16px; + font-size: 12px; } #footnotes .annotation { @@ -143,7 +143,7 @@ div.fragment { padding-bottom: 1.5em; } -div.note p, div.note p.paragraph { +div.note p, div.dedication p, div.note p.paragraph, div.dedication p.paragraph { text-align: right; font-style: italic; } @@ -152,3 +152,12 @@ hr.spacer { height: 3em; visibility: hidden; } + +div.person-list ol { + list-style: none; + padding: 0 0 0 1.5em; +} + +p.place-and-time { + font-style: italic; +} diff --git a/lib/librarian/book2html.xslt b/lib/librarian/book2html.xslt index f52d83089..6694c7b9a 100644 --- a/lib/librarian/book2html.xslt +++ b/lib/librarian/book2html.xslt @@ -76,6 +76,10 @@
+ +
+
+

@@ -88,6 +92,10 @@

+ +

+
+
-- 2.20.1 From d8609eec1d48b2a66fe2a043c5348c50edd27c1d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Fri, 5 Sep 2008 17:13:57 +0200 Subject: [PATCH 13/16] Added handling of tag "naglowek_podrozdzial". Fixed handling of tag "miejsce_czas". --- lib/librarian/book2html.xslt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/librarian/book2html.xslt b/lib/librarian/book2html.xslt index 6694c7b9a..a83cc0c06 100644 --- a/lib/librarian/book2html.xslt +++ b/lib/librarian/book2html.xslt @@ -80,6 +80,9 @@
+ + +

@@ -88,11 +91,11 @@

- +

- +

-- 2.20.1 From e8d7c808919ca6a8546832e260d4449b77909317 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Fri, 5 Sep 2008 17:37:49 +0200 Subject: [PATCH 14/16] Added comments to book2html.xslt stylesheet. --- lib/librarian/book2html.xslt | 202 +++++++++++++++++++++-------------- 1 file changed, 120 insertions(+), 82 deletions(-) diff --git a/lib/librarian/book2html.xslt b/lib/librarian/book2html.xslt index a83cc0c06..f7bb9a225 100644 --- a/lib/librarian/book2html.xslt +++ b/lib/librarian/book2html.xslt @@ -3,13 +3,6 @@ - - - - - - - @@ -44,6 +37,10 @@ + + + +

@@ -53,9 +50,48 @@ - - - + + + + + + +
+
+ + +
+

+
    + +
+
+
+ + +
+
+ + +
+ +
+
+ + +
+
+ + +
+
+ + + + + + + @@ -72,17 +108,7 @@ - -
-
- - -
-
- - - - +

@@ -95,67 +121,21 @@

+

- -
- -
-
-
- -
-

-
    - -
-
-
-
  • - - - - - - - - - - - - - - - - - - -

    - - - indent: 1em - - - indent: 2em - - - -

    -
    - - - - [] + +

    @@ -167,7 +147,7 @@ - + @@ -186,26 +166,84 @@

    - -

    + + + +

    + + + indent: 1em + + + indent: 2em + + + +

    - - - -
    + +

    - -

    -
    - -

    + + + + + + + + [] + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.20.1 From 14b70eccc2fec2c214671ca2aeb169baf40dacf2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Fri, 5 Sep 2008 17:44:02 +0200 Subject: [PATCH 15/16] Fixed styles of "wers_wciety" tags. --- lib/librarian/book2html.xslt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librarian/book2html.xslt b/lib/librarian/book2html.xslt index f7bb9a225..35f633d94 100644 --- a/lib/librarian/book2html.xslt +++ b/lib/librarian/book2html.xslt @@ -108,7 +108,7 @@ - +

    @@ -172,10 +172,10 @@

    - indent: 1em + padding-left: 1em - indent: 2em + padding-left: em -- 2.20.1 From 10430ce6805296c89ac4cefd2943d9902cd8aa26 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Fri, 5 Sep 2008 17:44:59 +0200 Subject: [PATCH 16/16] Added handling of "poezja_cyt" tag. --- lib/librarian/book2html.xslt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librarian/book2html.xslt b/lib/librarian/book2html.xslt index 35f633d94..f22c97842 100644 --- a/lib/librarian/book2html.xslt +++ b/lib/librarian/book2html.xslt @@ -78,7 +78,7 @@ - +

    -- 2.20.1