From ab76a5c2c90d386b3d5f40aee3d784b02cb92434 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 30 Nov 2010 15:03:12 +0100 Subject: [PATCH] #965: "all" option for annotations index --- apps/wiki/locale/pl/LC_MESSAGES/django.mo | Bin 5151 -> 5088 bytes apps/wiki/locale/pl/LC_MESSAGES/django.po | 28 ++++++++++-------- .../templates/wiki/tabs/annotations_view.html | 9 +++--- redakcja/static/js/wiki/view_annotations.js | 14 ++++----- 4 files changed, 27 insertions(+), 24 deletions(-) diff --git a/apps/wiki/locale/pl/LC_MESSAGES/django.mo b/apps/wiki/locale/pl/LC_MESSAGES/django.mo index c334eadcf0502cef0d00b7ac8fab72f6624dc746..1f5e5140300fe6d1738fdcfbb7d9fc5e450acd2d 100644 GIT binary patch delta 1861 zcmYk-Z%oZm9LMo*x02HBp9rCQ{a31cB~l{fZ{^zu)zMOlcDO$y?t)P^ z5tE6l91hQSsEPSe{Xt~LwiK118Z~e&>bf1Se?Ka52>0O$WN7>1`hTG& zI;b}JEhT9+x(1D@PygKC)?`zo_dHn3X2rMV*ao)P0Lxy8^YN zJ8>EwKyCebWD~3_h5e^)cib1$Kp+7(e?;+ z|4Y=0-=ik{3AKRFScu=lRCIx#X=x>MQ3EVOJ^Pi&CAJ;OZH=fzM^V?ELv3-p`~Es= z!VgdhpW#V-iCS?LCtcTX#Y_zErlJWPMqO|WHS;s5t!zi`wJz6=Ab z@}1>4pLPxEcjGu}0T)r@-9%07{!p9e|Il?jMC^EVZC{cnjTzC^ zmhNqD+vOeYDfLBed%Hc6mb8+X$dmL9o+-^uM?y`98tV7hfx08jb+-TDp-}ViXUP5m D`~IAb delta 1953 zcmYk+Uu;ul7{~EvUD@1L<~D{Rb5i`XO`vevvBKt`iQCu|M+bOej29kj(Us9+*K8?? zRxlxoi3u4P%@Vo63-wB>7l`i4Eio}hqKO8L&IFB#UT8?BBqsX(oxSSb?Ahmi-=6b6 z@1JwdV&~be@^>xaGe+4*+)SJcnH|P0tN2G*tTDS0f4~O3hWy#8TC+xs;96`$^~YWR zPK?kV#x{HyoA3zM;W1ooR<@U^Tu;aA&bM$q?F*=cU!oE$VmmJ3PHer-tQ$wM1&^T; zoJQUECUU90i($Or+H<&#_5!w&-@qGwSF zUP4{>itB#^HG#J=i|3J4)?UBd-+@i!x2>+D-#Lt$KngYBW2giZs0luU+Uk?2m7hXQ z=p1T7=TV90kes&Q+MnYF+FzsY{}an2RQ{&22}ihF$3BTSVF@?l3~IplQ8#{s+L@1C z{}-qUe}kIH&(0rn|h@pc@-4$NXdp29VF30b`Th`RrG)I!5#)r2Fc1+2+qpcf=aLsc@~4!Ku|QWe(NFb40@K2OI3YU^#x?L{}sJmoy2YAw^8CjLfgjI zH#mO?ir$7Xf}FOU(1bP+{}w&X_YijxI|zNMtBI9mBaJ@d{*|4st~V>#R-JXP>(uA< zAwo~|X5t3oUSfn$=_a&OcMx5~1H@iJB}(if^p?a4mHP-zFZc$;P-U3lfi2q*m92zc zr!B}9??PQIY<(=E0@a`{o;5&7ac3) z^9Ku+%QcBm^W>3CdfcCgrl0l;e!7?`RKj(Us_KJlpJcGupkK`NMH61!i~WCHa^~B}Y~}dsi=oD&IsZ^pS+f2_u2e}j k^;gxUo}8bZ9?#5wSSdEALThsV(P`ff=ZmH3<^Lu72hobQjQ{`u 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(); } }); - } + }); } } -- 2.20.1