From: Radek Czajka Date: Tue, 30 Nov 2010 14:03:12 +0000 (+0100) Subject: #965: "all" option for annotations index X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/ab76a5c2c90d386b3d5f40aee3d784b02cb92434 #965: "all" option for annotations index --- diff --git a/apps/wiki/locale/pl/LC_MESSAGES/django.mo b/apps/wiki/locale/pl/LC_MESSAGES/django.mo index c334eadc..1f5e5140 100644 Binary files a/apps/wiki/locale/pl/LC_MESSAGES/django.mo and b/apps/wiki/locale/pl/LC_MESSAGES/django.mo differ diff --git a/apps/wiki/locale/pl/LC_MESSAGES/django.po b/apps/wiki/locale/pl/LC_MESSAGES/django.po index 568e8441..0b102e90 100644 --- a/apps/wiki/locale/pl/LC_MESSAGES/django.po +++ b/apps/wiki/locale/pl/LC_MESSAGES/django.po @@ -7,10 +7,11 @@ msgid "" msgstr "" "Project-Id-Version: Platforma Redakcyjna\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-09-29 15:34+0200\n" -"PO-Revision-Date: 2010-09-29 15:36+0100\n" +"POT-Creation-Date: 2010-11-30 15:00+0100\n" +"PO-Revision-Date: 2010-11-30 15:00+0100\n" "Last-Translator: Radek Czajka \n" "Language-Team: Fundacja Nowoczesna Polska \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -92,20 +93,20 @@ msgstr "Ukończono" msgid "If you completed a life cycle stage, select it." msgstr "Jeśli został ukończony etap prac, wskaż go." -#: models.py:93 +#: models.py:94 #, python-format msgid "Finished stage: %s" msgstr "Ukończony etap: %s" -#: models.py:152 +#: models.py:153 msgid "name" msgstr "nazwa" -#: models.py:156 +#: models.py:157 msgid "theme" msgstr "motyw" -#: models.py:157 +#: models.py:158 msgid "themes" msgstr "motywy" @@ -223,9 +224,9 @@ msgstr "Pliki pominięte z powodu braku rozszerzenia .xml." msgid "Cancel" msgstr "Anuluj" -#: templates/wiki/tabs/annotations_view.html:5 -msgid "Refresh" -msgstr "Odśwież" +#: templates/wiki/tabs/annotations_view.html:9 +msgid "all" +msgstr "wszystkie" #: templates/wiki/tabs/gallery_view.html:7 msgid "Previous" @@ -336,11 +337,12 @@ msgstr "Wstaw motyw" msgid "Insert annotation" msgstr "Wstaw przypis" -#: templates/wiki/tabs/wysiwyg_editor.html:15 -msgid "Insert special character" -msgstr "Wstaw znak specjalny" - #: templates/wiki/tabs/wysiwyg_editor_item.html:3 msgid "Visual editor" msgstr "Edytor wizualny" +#~ msgid "Refresh" +#~ msgstr "Odśwież" +#~ msgid "Insert special character" +#~ msgstr "Wstaw znak specjalny" + diff --git a/apps/wiki/templates/wiki/tabs/annotations_view.html b/apps/wiki/templates/wiki/tabs/annotations_view.html index c118d0fa..f7a08516 100644 --- a/apps/wiki/templates/wiki/tabs/annotations_view.html +++ b/apps/wiki/templates/wiki/tabs/annotations_view.html @@ -2,10 +2,11 @@
- - - - + + + + +
diff --git a/redakcja/static/js/wiki/view_annotations.js b/redakcja/static/js/wiki/view_annotations.js index f62cd65c..071e7ee6 100644 --- a/redakcja/static/js/wiki/view_annotations.js +++ b/redakcja/static/js/wiki/view_annotations.js @@ -23,7 +23,7 @@ self.$refresh.removeClass('active'); $this.addClass('active'); - atype = $this.text(); + atype = $this.attr('data-tag'); self.$annos.hide(); self.$error.hide(); @@ -77,8 +77,10 @@ else { self.$annos.html(''); var anno_list = new Array(); - var annos = doc.getElementsByTagName(atype); + var annos = $(atype, doc); var counter = annos.length; + var atype_rx = atype.replace(/,/g, '|'); + var ann_expr = new RegExp("^<("+atype_rx+")[^>]*>|$", "g") if (annos.length == 0) { @@ -86,10 +88,8 @@ self.$spinner.hide(); self.$annos.show(); } - for (var i=0; i]*>|$", "g") - xml_text = serializer.serializeToString(annos[i]).replace(ann_expr, ""); + annos.each(function (i, elem) { + xml_text = serializer.serializeToString(elem).replace(ann_expr, ""); xml2html({ xml: "" + xml_text + "", success: function(xml_text){ @@ -115,7 +115,7 @@ self.$error.show(); } }); - } + }); } }