Toolbar in HTML panel fixed. Allow dot in names.
authorŁukasz Rekucki <lrekucki@gmail.com>
Fri, 11 Sep 2009 17:05:30 +0000 (19:05 +0200)
committerŁukasz Rekucki <lrekucki@gmail.com>
Fri, 11 Sep 2009 17:05:30 +0000 (19:05 +0200)
apps/explorer/forms.py
apps/explorer/views.py
project/templates/explorer/panels/dceditor.html
project/templates/explorer/panels/gallery.html
project/templates/explorer/panels/htmleditor.html

index c6aa09d..fffdeb8 100644 (file)
@@ -61,7 +61,7 @@ class MergeForm(forms.Form):
 
 class BookUploadForm(forms.Form):
     file = forms.FileField(label='Source OCR file')
-    bookname = forms.RegexField(regex='[0-9\w_-]+',  \
+    bookname = forms.RegexField(regex=r'[0-9\.\w_-]+',  \
         label='Publication name', help_text='Example: slowacki-beniowski')
     autoxml = forms.BooleanField(required=False, initial=True, label=u"Generate DublinCore template")
 
@@ -73,7 +73,7 @@ class ImageFoldersForm(forms.Form):
         self.fields['folders'].choices = [('', '-- Wybierz folder z obrazkami --')] + [(fn, fn) for fn in models.get_image_folders()]
 
 class SplitForm(forms.Form):
-    partname = forms.RegexField(regex='[0-9\w_-]+',  \
+    partname = forms.RegexField(regex='[0-9\.\w_-]+',  \
         label='Part name', help_text='Example: rozdział-2')
     autoxml = forms.BooleanField(required=False, initial=False, label=u"Split as new publication")
     fulltext = forms.CharField(widget=forms.HiddenInput(), required=False)
index 52ff963..601f689 100644 (file)
@@ -61,7 +61,7 @@ def file_list(request, repo):
 
     fl = []
     for file in repo.repo[latest_default]:
-        m = re.match(u'^pub_([\\w\\$0-9_-]+).xml$', file.decode('utf-8'), re.UNICODE)
+        m = re.match(u'^pub_([\\w\\$\\.0-9_-]+).xml$', file.decode('utf-8'), re.UNICODE)
         if m is not None:
             fl.append(m.group(1))
             
index fd61369..215f54f 100644 (file)
@@ -15,6 +15,7 @@ panel_hooks = {
                                self.contentDiv.trigger('panel:contentChanged', self);
                        });
                });
+                self._endload();       
        },
        saveInfo: function(saveInfo) {
                var myInfo = {
index 565a636..ac8cf6a 100644 (file)
@@ -34,6 +34,8 @@ panel_hooks = {
         $('.images-wrap', contentDiv).lazyload('.image-box', 
             {threshold: 640 * 10, scrollTreshold: 640 * 5}
         );
+        
+        self._endload();
     },
     refresh: function() {
         return true; // gallery is always fresh
index 3599dfe..d27d8cc 100644 (file)
@@ -5,9 +5,8 @@
 
 <script type="text/javascript" charset="utf-8">
 panel_hooks = {
-       load: function() 
-
-       {
+       load: function() {
+            this._endload();   
        },
        unload: function() {