Various style fixes.
authorMarek Stępniowski <marek@stepniowski.com>
Thu, 11 Sep 2008 15:13:18 +0000 (17:13 +0200)
committerMarek Stępniowski <marek@stepniowski.com>
Thu, 11 Sep 2008 15:13:18 +0000 (17:13 +0200)
apps/catalogue/forms.py
apps/catalogue/views.py
wolnelektury/media/css/master.css
wolnelektury/media/js/catalogue.js
wolnelektury/templates/catalogue/main_page.html

index e20adba..523b1d6 100644 (file)
@@ -13,7 +13,7 @@ class SearchForm(forms.Form):
     def __init__(self, *args, **kwargs):
         tags = kwargs.pop('tags', [])
         super(SearchForm, self).__init__(*args, **kwargs)
-        self.fields['q'].widget.attrs['title'] = u'tytuł utworu, motyw lub kategoria'
+        self.fields['q'].widget.attrs['title'] = u'tytuł utworu, kategoria lub motyw literacki'
         self.fields['tags'].initial = '/'.join(tag.slug for tag in Tag.get_tag_list(tags))
 
 
index 3b9f31d..607b4d2 100644 (file)
@@ -73,14 +73,15 @@ def main_page(request):
     if request.user.is_authenticated():
         shelves = models.Tag.objects.filter(category='set', user=request.user)
         new_set_form = forms.NewSetForm()
-        extra_where = '((NOT catalogue_tag.category = "set" AND catalogue_tag.main_page = 1) OR catalogue_tag.user_id = %d)' % request.user.id
+        extra_where = '(NOT catalogue_tag.category = "set" OR catalogue_tag.user_id = %d)' % request.user.id
     else:
-        extra_where = 'NOT catalogue_tag.category = "set" AND catalogue_tag.main_page = 1'
+        extra_where = 'NOT catalogue_tag.category = "set"'
     tags = models.Tag.objects.usage_for_model(models.Book, counts=True, extra={'where': [extra_where]})
     fragment_tags = models.Tag.objects.usage_for_model(models.Fragment, counts=True,
         extra={'where': ['catalogue_tag.category = "theme"'] + [extra_where]})
     categories = split_tags(tags)
     
+    print categories
     form = forms.SearchForm()
     
     return render_to_response('catalogue/main_page.html', locals(),
index d2fc0fc..aa16cb7 100644 (file)
@@ -470,9 +470,16 @@ p .ac_input {
     padding: 0;
 }
 
+.shelf-list li {
+    padding: 0.25em;
+    margin: 0 -0.25em;
+}
+
 .shelf-list a.delete-shelf {
     color: #900;
     float: right;
+    padding: 0.25em 0.25em 0.25em 1em;
+    margin: -0.25em;
 }
 
 .shelf-list a.delete-shelf:active, .shelf-list a.delete-shelf:hover {
index 1d631e3..c9d5457 100644 (file)
             }
         });
         
+        $('ul.shelf-list li').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() { 
             var link = $(this);
             var shelf_name = $('.visit-shelf', link.parent()).text();
index a1418ce..6af8d69 100644 (file)
@@ -13,7 +13,7 @@
     </form>
     
     <div id="intro">
-        <p id="tags-description">↓ Przeglądaj lektury według wybranych kategorii i motywów ↓</p>
+        <p id="tags-description">↓ Przeglądaj lektury według wybranych kategorii i motywów literackich ↓</p>
         <div id="propaganda">
             <h2>Twoje półki z lekturami</h2>
             {% if user.is_authenticated %}