From e9c650c2478ef53822215cf6b3ddd2ff2009f090 Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Tue, 9 Sep 2014 20:56:01 +0800 Subject: [PATCH 001/180] Add app config to auto load xadmin on startup. --- demo_app/app/tests.py | 3 +++ demo_app/data.db | Bin 339968 -> 208896 bytes demo_app/demo/urls.py | 2 -- xadmin/__init__.py | 2 ++ xadmin/apps.py | 13 +++++++++++++ 5 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 demo_app/app/tests.py create mode 100644 xadmin/apps.py diff --git a/demo_app/app/tests.py b/demo_app/app/tests.py new file mode 100644 index 000000000..7ce503c2d --- /dev/null +++ b/demo_app/app/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/demo_app/data.db b/demo_app/data.db index 0c51655b07316cd4932da51314dd36eb3b4a3c3e..d8dbc402a35eade9e5da9fc92a3553babd41aa8f 100644 GIT binary patch literal 208896 zcmeI53v3)odf%rxFV3?iQQVQ1;<7msmmHB4=fS6LwYOYpq~oqQTvFsplyjLhXPUzn z=cVZ$QIvLlA$Rus#Yh#jP=`Z+yAO1oNVweo*J7N@Je`s%A+J-Vv8x_E8*s;o-FX01^XRUzX#;^H{h zD}vy1xn3o|8S-m7XQ64?~i3O+}^lcElPLqip7dt%{LXPp-8GKS4&EMIy0Fp zOlJxm!j4>A$vm|1dI z5k1@r1LJ{KSP+U~e{6i5+rO`h8)ZqX*YjebASp^iD%2W9=XFF+cXj^Nt63rL3?>;2 z3gisxhtBc%`rJei%BEiJog^)isJk0ISnc3W`DQc-vYu0Hd%!_b)2FgF_K9qoS7_2N}(awRk>D;3#xQiH3fo+{aC;s%VfBB*4pi7#w#tk z(7b|&cgWXgzK#ZoOQnP{(j#C3`u$lFePrUehWPm830%woNVaT5e%^Ela#w zQW_K3HETSwE_)`BVqb5b3Bq``g|A*yt$tUc`i4 z5lJm3zvWtq#CcOPf2_Zs`%@p(e56`*zTY^a$PL3k*As8^i+GV zuUYP>eN)M{4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uevcdq+BR zT^$3E;naejYcE zewpp)=+6z{4^X{yj#~TRKq23q>u>AqaPPAN);e+n?fsp-?n!mdS!}>0riyLF)g=aJ zi~AFyG6t*81RR^ep}t(-P_B|ixaHjSFzMbICySms%6Wv%{qgrI7<94&gRDtsh2koA zNFSONxrHAO4Be*VFiP&|V75QoQ^@7Y)&0aiF&rCyzDGpE$-pbUCj;No$R`8i{(pY$ z_ptvT5dPs3;1b{x;1b{x;1b{x;1b{x;1b{x;1b{x;1ZZj5@-rUe16>j5AFYE?dxR! zYyYMFQu~?qL+$@+Pio(SoBYEiz$L&Xz$L&Xz$L&Xz$L&Xz$L&Xz$L&Xz$GvdC4hE) XGm;1r5lI+H2uTo06OsTDvj6`-s6U}+ diff --git a/demo_app/demo/urls.py b/demo_app/demo/urls.py index 7b677eca3..2ecfd6469 100644 --- a/demo_app/demo/urls.py +++ b/demo_app/demo/urls.py @@ -2,13 +2,11 @@ # Uncomment the next two lines to enable the admin: import xadmin -xadmin.autodiscover() # from xadmin.plugins import xversion # xversion.register_models() from django.contrib import admin -admin.autodiscover() urlpatterns = patterns('', url(https://github.com/r'%5Eadmin/',%20include(admin.site.urls)), diff --git a/xadmin/__init__.py b/xadmin/__init__.py index 2eaa6c267..7aa7c8e46 100644 --- a/xadmin/__init__.py +++ b/xadmin/__init__.py @@ -65,3 +65,5 @@ def autodiscover(): # attempting to import it, otherwise we want it to bubble up. if module_has_submodule(mod, 'adminx'): raise + +default_app_config = 'xadmin.apps.XAdminConfig' \ No newline at end of file diff --git a/xadmin/apps.py b/xadmin/apps.py new file mode 100644 index 000000000..252a6cbed --- /dev/null +++ b/xadmin/apps.py @@ -0,0 +1,13 @@ +from django.apps import AppConfig +from django.core import checks +from django.utils.translation import ugettext_lazy as _ + + +class XAdminConfig(AppConfig): + """Simple AppConfig which does not do automatic discovery.""" + + name = 'xadmin' + verbose_name = _("Administration") + + def ready(self): + self.module.autodiscover() From 392922bb98b18ff72b19902b394741feba37aad7 Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Tue, 9 Sep 2014 21:13:20 +0800 Subject: [PATCH 002/180] Fix HttpResponse keyword argument name. --- xadmin/views/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xadmin/views/base.py b/xadmin/views/base.py index 5966690b1..252d15b9e 100644 --- a/xadmin/views/base.py +++ b/xadmin/views/base.py @@ -182,7 +182,7 @@ def get_form_params(self, new_params=None, remove=None): def render_response(self, content, response_type='json'): if response_type == 'json': - response = HttpResponse(mimetype="application/json; charset=UTF-8") + response = HttpResponse(content_type="application/json; charset=UTF-8") response.write( json.dumps(content, cls=JSONEncoder, ensure_ascii=False)) return response From 627563c748a87f49e9ab35547721df1e29f7df22 Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Tue, 9 Sep 2014 21:14:52 +0800 Subject: [PATCH 003/180] Fix related field label demo bug. --- demo_app/app/adminx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo_app/app/adminx.py b/demo_app/app/adminx.py index 30c0d1742..716188884 100644 --- a/demo_app/app/adminx.py +++ b/demo_app/app/adminx.py @@ -43,7 +43,7 @@ class MaintainInline(object): class IDCAdmin(object): - list_display = ('name', 'description', 'create_time','host__name') + list_display = ('name', 'description', 'create_time') list_display_links = ('name',) wizard_form_list = [ ('First\'s Form', ('name', 'description')), From 4df0ce6a36a21b1d6f407a2601aa6e81af0ad53b Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Tue, 9 Sep 2014 21:17:11 +0800 Subject: [PATCH 004/180] Untrack demo data.db --- demo_app/data.db | Bin 208896 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 demo_app/data.db diff --git a/demo_app/data.db b/demo_app/data.db deleted file mode 100644 index d8dbc402a35eade9e5da9fc92a3553babd41aa8f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 208896 zcmeI53v3)odf%rxFV3?iQQVQ1;<7msmmHB4=fS6LwYOYpq~oqQ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B00@8p2!H?xfB*=900@A<6D5H8 z{}aWH#6SQ9KmY_l00ck)1V8`;KmY_l;A0^`_y2RzA9ax*d_VvMKmY_l00ck)1V8`; zKmY_l;Gqa`|7h{O=KQ_MyVC__s?jJZGo`95Pu|NU3vyB@5E=B>rl{x;`bd{=s)p4|22dyDt7yGvKrlQ&nhsoeF2 zouy0jyGyH!$@P0>Id`dakN78-uCMRpE)|mN>E)@Lm+CVM<+-imjg{Js%$xUa-gs?O zyuK_i-O4Hp+jn1EORa3Kz4_+lweq&SR8}_@DwlT(7Z;R;%GRAiW~ExF%%ut!Un^d{ zxFFxSwj`vXU=75ZZ?%p&(6{3{~Z5YF7ks92!H?xfB*=900@8p2!H?xfB*=9z$cKvY4>8_ yL8~#^{Qvtd{`;T648mj(009sH0T2KI5C8!X009sH0T2KIoj|{PK5+2!|NjrK8)rEH From 9440e162546890de1058c0ab21c9cd355b5b1b51 Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Tue, 9 Sep 2014 22:12:49 +0800 Subject: [PATCH 005/180] Change `module_name` to `model_name` --- requirements.txt | 2 +- xadmin/filters.py | 2 +- xadmin/locale/de_DE/LC_MESSAGES/django.mo | Bin 16281 -> 16279 bytes xadmin/locale/de_DE/LC_MESSAGES/django.po | 4 ++-- xadmin/locale/en/LC_MESSAGES/django.po | 2 +- xadmin/locale/es_MX/LC_MESSAGES/django.mo | Bin 19470 -> 19468 bytes xadmin/locale/es_MX/LC_MESSAGES/django.po | 4 ++-- xadmin/locale/eu/LC_MESSAGES/django.mo | Bin 19019 -> 19017 bytes xadmin/locale/eu/LC_MESSAGES/django.po | 4 ++-- xadmin/locale/id_ID/LC_MESSAGES/django.po | 2 +- xadmin/locale/ja/LC_MESSAGES/django.po | 2 +- xadmin/locale/lt/LC_MESSAGES/django.po | 2 +- xadmin/locale/nl_NL/LC_MESSAGES/django.po | 2 +- xadmin/locale/pl/LC_MESSAGES/django.mo | Bin 21958 -> 21956 bytes xadmin/locale/pl/LC_MESSAGES/django.po | 4 ++-- xadmin/locale/pt_BR/LC_MESSAGES/django.mo | Bin 20579 -> 20577 bytes xadmin/locale/pt_BR/LC_MESSAGES/django.po | 4 ++-- xadmin/locale/ru_RU/LC_MESSAGES/django.po | 2 +- xadmin/locale/zh_CN/LC_MESSAGES/django.mo | Bin 18983 -> 18981 bytes xadmin/locale/zh_CN/LC_MESSAGES/django.po | 4 ++-- xadmin/models.py | 2 +- xadmin/plugins/__init__.py | 2 +- xadmin/plugins/bookmark.py | 8 ++++---- xadmin/plugins/details.py | 4 ++-- xadmin/plugins/editable.py | 2 +- xadmin/plugins/inline.py | 2 +- xadmin/plugins/portal.py | 4 ++-- xadmin/plugins/relate.py | 2 +- xadmin/plugins/relfield.py | 2 +- xadmin/plugins/topnav.py | 4 ++-- xadmin/plugins/xversion.py | 6 +++--- xadmin/sites.py | 6 +++--- .../xadmin/auth/user/change_password.html | 2 +- .../model_list.results_bottom.actions.html | 2 +- .../xadmin/views/batch_change_form.html | 2 +- xadmin/templates/xadmin/views/form.html | 2 +- xadmin/templates/xadmin/views/model_form.html | 2 +- xadmin/templates/xadmin/views/quick_form.html | 2 +- xadmin/templatetags/xadmin_tags.py | 2 +- xadmin/util.py | 2 +- xadmin/views/base.py | 12 ++++++------ xadmin/views/dashboard.py | 16 ++++++++-------- xadmin/views/delete.py | 2 +- xadmin/views/edit.py | 2 +- xadmin/views/form.py | 2 +- xadmin/views/list.py | 2 +- 46 files changed, 68 insertions(+), 68 deletions(-) diff --git a/requirements.txt b/requirements.txt index 8a51b4d65..9f2f0677d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -django>=1.5 +django>=1.7 django-crispy-forms>=1.4.0 \ No newline at end of file diff --git a/xadmin/filters.py b/xadmin/filters.py index f4eb6e9d9..178ea6581 100644 --- a/xadmin/filters.py +++ b/xadmin/filters.py @@ -333,7 +333,7 @@ def __init__(self, field, request, params, model, model_admin, field_path): self.lookup_title = other_model._meta.verbose_name self.title = self.lookup_title self.search_url = model_admin.get_admin_url('%s_%s_changelist' % ( - other_model._meta.app_label, other_model._meta.module_name)) + other_model._meta.app_label, other_model._meta.model_name)) self.label = self.label_for_value(other_model, rel_name, self.lookup_exact_val) if self.lookup_exact_val else "" self.choices = '?' if field.rel.limit_choices_to: diff --git a/xadmin/locale/de_DE/LC_MESSAGES/django.mo b/xadmin/locale/de_DE/LC_MESSAGES/django.mo index 83384667b07df1f5c90f7ce511396bb604353b46..823faffb04ab0c0a40223fc1da866ec6bb5baf21 100644 GIT binary patch delta 2705 zcmXZd4@{L+7{~E*FNj|Lc)9#lNVtkHMS&C(ia!oC5o;sK(pK0i3L6o+qKPZ7P?2nf zQ<{z#IVB1jP%_$$hK0#R=H*El554P@2`6{ub*?y`@ZLS&NRyB8Xt38C>81Dd!O6=)EP@f5Od^A~1g{32r#a2+<_ zgQx)GsEH@A1s!R|gyTL`V(qryh5yGvC*y-@zTm(I3@F1P)CxvWyZjj{p-UKrmr=X@ zlO3N%-S6Ot6e!#phng=1^DqOOaU1IXtEl^b@zIz|V;U78Bt00=g9?;_$}|&0Fbj3x z3S5S3Z~@lhE!c_$_%;^dBx+~88NtBisCg)Er4?{go9RnM`9{wpcb|sa`4Q=5c7>3T}!3kZc zl_sGJ(=Z;h?De(w`exMDSK$V%M>fR_;|iQa1&qrI?rxPN_0~P8Pxx!7??5kZ!BOne z`=7Lm&msfExDFF}`StC82v=h#YAe4$t>7{$z!b(~0F{V~n>V5t_1e{b5|zM{sKC#lYNi#nBky1=p10S(#YFnQ zqmI}`;pm7HP>C$SDB_z88q}Lvg(}8s)B{bZ%-gI-QHh*D9oa?HPK@Icyn;&5b$c+u zSkyw6q5>CN??g7++>O3W8cj4bVLxiCkE5#gBI@%2y(K$Q zftpdz@3(fK=Iut+Mj!U$G%BH^MeM&G7$^!(IE0$;JZi!TRL0j(uibCffW3Yb`Da3? z*laAp<+uY&unX7Y_s9!lGS&oZ>;crm8@x1>KqD&C7f~y3MZKp7+g* z&hL4C1MP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18`Msm#X=lHB^Wz9oS+Z2 zkRnvzdDcb9W}AC){O^A=4NZ6mwbe&aRojF5#t)!sz;j#p(^`N^3YO1>}V>g>%C-_6Ta>4LLNFz(!Q2n^7x&4fUSx3`QqZ`;O3B!0&T@ zb^KoBXM(E|s$C}3n~>>peH9!`e8#&F8}}l diff --git a/xadmin/locale/de_DE/LC_MESSAGES/django.po b/xadmin/locale/de_DE/LC_MESSAGES/django.po index 07c19c358..fcf6a567c 100644 --- a/xadmin/locale/de_DE/LC_MESSAGES/django.po +++ b/xadmin/locale/de_DE/LC_MESSAGES/django.po @@ -742,8 +742,8 @@ msgstr "Klicken Sie hier, um alle Objekte über alle Seiten hinweg auszuwählen. #: templates/xadmin/blocks/model_list.results_bottom.actions.html:19 #, python-format -msgid "Select all %(total_count)s %(module_name)s" -msgstr "Alles auswählen %(total_count)s %(module_name)s" +msgid "Select all %(total_count)s %(model_name)s" +msgstr "Alles auswählen %(total_count)s %(model_name)s" #: templates/xadmin/blocks/model_list.results_bottom.actions.html:20 msgid "Clear selection" diff --git a/xadmin/locale/en/LC_MESSAGES/django.po b/xadmin/locale/en/LC_MESSAGES/django.po index df836c5f6..b9e77c1c7 100644 --- a/xadmin/locale/en/LC_MESSAGES/django.po +++ b/xadmin/locale/en/LC_MESSAGES/django.po @@ -738,7 +738,7 @@ msgstr "" #: templates/xadmin/blocks/model_list.results_bottom.actions.html:19 #, python-format -msgid "Select all %(total_count)s %(module_name)s" +msgid "Select all %(total_count)s %(model_name)s" msgstr "" #: templates/xadmin/blocks/model_list.results_bottom.actions.html:20 diff --git a/xadmin/locale/es_MX/LC_MESSAGES/django.mo b/xadmin/locale/es_MX/LC_MESSAGES/django.mo index af31b601894e57954395440c8a1462dc140195c6..4aed4ac37ff89c2bfcc69f22ec74380524504db9 100644 GIT binary patch delta 2679 zcmXZedrVe!9LMqB0R*|^13V-b0dIhSng}R8kyvt(OPQKF5S>|}7L2wsw_^DOR?~Tl z9uk^sb2X;~qV5T-Niv;t>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LUgz`3Y14XHXlul284I65O&Kp_7c6N;?iSa4}M4vjw$q z8)`=#w*3QY;;X1i{EAAnA5}?zZm_geClxdJX@@FR<=Gw{rP~?)=3VOMf{gU=^y;n;imWvdeaSjM_;v zs`k1ygW^uuYKmp-c*sKiQbdm(DRrKlr&0UyS7sBtHeJK&ge1j^(J zR^V;-fmtxkeerqJ5v)bsfz9Z{_fQFZjylsX(H~Ev66&<=9@LRtL|x`Ps7eGsq&Da8 zCD4n$dma2xz(Cp)FaUE=FBG7TW+slrxwgFuQ)sV6?Q{<&V23u^ zU^MHSbOPOyOMVK?gm^|E$+$(b)N27Np7Y`?5Db}GD>Ov)a4ON-nP?ycj zaubL^rZzrwLI{=-=uE0nrP_dcaR&zCLDXk;*gpRjwUbMzqq~Xvo&$>AOB#ck$A?;Y z66!NAw(TXT-woBp)IW$|BORLXE!1t@gSyQ}P!o5eCc2C%*oR6uhVAS9Q8)loQRA|3 zJQkupw;EJswxSZQN3D0Hg!*e|?R03OZq$O8(1(4f7bCg4O*jHW@jQm%Mbvx0Sa0H3 z+P5(SlV-bjs|+=6K5D*&s6T8f9fAykM$}pN;M15r$L)U~`2}g(tpA{nCS$IfU?J|J zU4dHQKg>pdE<_{dVL1Mb%kUNk;}d1>Mw}%CdT}M{b6SlWunu)M98_svNA37s)LHJe zwxG`PEUL6uQ3?KydOviYYqT{U^XVUrFX{WQAkcz8p-S6}k$4Ne==X?QvcaeXl2D0` zLw&YcsBzgi24`XtuEuoSfi>8Q{4?3*?k}k~F-tuc2~v3wIp5uB4yqzWn257bC0v2p z(Rz%=TGY>h?Wn|BPzjyb*5GaRoZhxF>M@ULZi}k(^W15k6|>mmxz^k;q$%2e&5EVX Pi_!;-x)&@jSs401AIw=o diff --git a/xadmin/locale/pl/LC_MESSAGES/django.po b/xadmin/locale/pl/LC_MESSAGES/django.po index bc62d634f..56bc418d7 100644 --- a/xadmin/locale/pl/LC_MESSAGES/django.po +++ b/xadmin/locale/pl/LC_MESSAGES/django.po @@ -792,8 +792,8 @@ msgstr "Kliknij tutaj, aby wybrać wszystkie obiekty na wszystkich stronach" #: templates/xadmin/blocks/model_list.results_bottom.actions.html:19 #, python-format -msgid "Select all %(total_count)s %(module_name)s" -msgstr "Wybierz wszystkie %(total_count)s %(module_name)s" +msgid "Select all %(total_count)s %(model_name)s" +msgstr "Wybierz wszystkie %(total_count)s %(model_name)s" #: templates/xadmin/blocks/model_list.results_bottom.actions.html:20 msgid "Clear selection" diff --git a/xadmin/locale/pt_BR/LC_MESSAGES/django.mo b/xadmin/locale/pt_BR/LC_MESSAGES/django.mo index 890ff8c36815981c2c5b1ad932b291d20ee713a3..d29992f30f4609d26a196f794f662257ee51de24 100644 GIT binary patch delta 2998 zcmXZdeN5F=9LMqVyMS;3k!Ll0x`2uo$p@rRtWXi~;fgqz&8KV=(2=I5Xkz;nLXBo? zdTmRV4OzzAQj?oG+iaArvc^)It!!aFG&7sc{%DkDy+8iWKfKO4_x#TJe!stSeq8Hx zu5>!@*F?F=#+ceM#-w3A4#yoBgZnTRJFphJFc$}K1C9(B6OFqu4)LM2K8$@h8ShyO@{P%)zY4eFR#X7DP#gb=FJsn3*O+)3T@#IY5|5xC2NihZ z$*6#`(1!ur&qZYtL}fY^^>#{7ftTW73}FH;x8n_{`CCx?yx`i#E2stc;G?)7Tkt&U zff~}(11m8J8*nf-p*CzqZL|j!=mAtkJ5lrAL6SB-I1>AD1iJTVG}0J8iRiHnAHz>j zrTPyQKpyqgf>ThXEJ9UgCMxsU)(Sl87_$)d3hqwvo==@>Ofmf|oQpL`;I8SQq0G8b z85~D#cp7!MKF6W>Giu%drlPOV%RB><>1X3OEW`?2h6=0;$6`0C5`Cyj|A;TKzqv-E zoq@V(-ok&N0`V1jnI<90m<-fL<){Fc;zC@F3hW3fu#>1W^%ZKJi>Ucma2WoE+(8rd z2=mzAjH96kr=TJ%!%SR)I`!)?4O>yAdlQFXKc?Vq)blzx3NQ_|VJ<4L0!-4+cDx*G z=~tnv4G+=K#0cu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J@)4%Kzk2jwBE#4(l5#$8;qFrM*z9D~EK3D>yewztaJFcY<4 zHtJ9np$^GpOvJeufy>Z?FQewaf&tu$eKCxx=vCZ+W{UGC+eYMTY|f+puZXLDl2|`8 znuZoEMZKd6R7Ivb6U+?v_j#d%$-S&op|i=GthJ%al;^Bvq5Ubv#1y)jvd%K0IjLu? zogshPB&#D-m-d5Ri}^QHo}O*}7+RLzY6U|X882C(P-DjG2+Iopmr)yUtqi}|`;-;- YXZ;-Isb9Jv{5bbu&nJzKOOMC>4=gfSXaE2J diff --git a/xadmin/locale/pt_BR/LC_MESSAGES/django.po b/xadmin/locale/pt_BR/LC_MESSAGES/django.po index e07295cdd..6fca08fae 100644 --- a/xadmin/locale/pt_BR/LC_MESSAGES/django.po +++ b/xadmin/locale/pt_BR/LC_MESSAGES/django.po @@ -743,8 +743,8 @@ msgstr "Clique aqui para selecionar os objetos através de todas as páginas" #: templates/xadmin/blocks/model_list.results_bottom.actions.html:19 #, python-format -msgid "Select all %(total_count)s %(module_name)s" -msgstr "Selecionar todos %(total_count)s %(module_name)s" +msgid "Select all %(total_count)s %(model_name)s" +msgstr "Selecionar todos %(total_count)s %(model_name)s" #: templates/xadmin/blocks/model_list.results_bottom.actions.html:20 msgid "Clear selection" diff --git a/xadmin/locale/ru_RU/LC_MESSAGES/django.po b/xadmin/locale/ru_RU/LC_MESSAGES/django.po index 44584cb25..dc2508b5e 100644 --- a/xadmin/locale/ru_RU/LC_MESSAGES/django.po +++ b/xadmin/locale/ru_RU/LC_MESSAGES/django.po @@ -744,7 +744,7 @@ msgstr "" #: templates/xadmin/blocks/model_list.results_bottom.actions.html:19 #, python-format -msgid "Select all %(total_count)s %(module_name)s" +msgid "Select all %(total_count)s %(model_name)s" msgstr "" #: templates/xadmin/blocks/model_list.results_bottom.actions.html:20 diff --git a/xadmin/locale/zh_CN/LC_MESSAGES/django.mo b/xadmin/locale/zh_CN/LC_MESSAGES/django.mo index ea9ad22357d9d33f5a0aa7e1cc1e8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zn&2|(_Fh9xd$?y8_Dx&XrW@% zLUT|9%1{$knd|L&9X?tZ7xBCiv++;djG+m^&oqqc*K8g^&Hs`4G3t`~r)hAX+y&Hv z|DY<2;Ul29KhDH#)C8-{_4d5h;s%R%qh9GDQ~~eX^JC@-97O&UGQaPBqM?pA%-g65 z?gbs(ebmCy{2@?25mi_UDxZNmu^fxXSzL_j_pHU0<~r2Q>oNM#@1KS`Hlqsp5LID2 z*5Eg&6PR2a{QP#HZvRQ-kE^?l{2*N7WWN7cikhd++=;sFO{jH_nC&>;CvldBc5)AO ziMp{rMokF@q@$kaTRhU7gxdLR)GJ$z>bDyEVGU}&ckFo+s<2j6Asy&zz^9h@5(f}} zkGh?=P!m72=Sh4uGKkYqJ1RnrpMhFvE^6Wm)Cny`_1}k@=Op&Ui>Q9Tm2m#5=oSgR z+b(!{xQ-g}rv6eU&wP1^R%sgS9LVX85H~+AFQfV-*A8O%r)GNy`<@{CQOC)%W z?oIO?W)iz;fm!Bs)DBkQi?{_<&~?*n#GT!Dj#kZqKI4tqP&|#)ZDxP_<_K8X2v1=(=Ei+;v_*QgUnv3P*R zX%=UNk0w9noeO`Ryw%$no|97HtqQlM6h$}}zM1ld=faD6U-b5dbNbBo9)#ES`7w&Q z+`r*jeY3ou!>jtXdDY=iXpI*R*M~MlcwXm!q2=-3tDQ>+pYu9%GJlDRta*7^=fm7x M10OZsEoqMVAC!nrO#lD@ diff --git a/xadmin/locale/zh_CN/LC_MESSAGES/django.po b/xadmin/locale/zh_CN/LC_MESSAGES/django.po index 404dbddb6..7b1ae13fb 100644 --- a/xadmin/locale/zh_CN/LC_MESSAGES/django.po +++ b/xadmin/locale/zh_CN/LC_MESSAGES/django.po @@ -735,8 +735,8 @@ msgstr "点击此处选择所有页面中包含的对象。" #: templates/xadmin/blocks/model_list.results_bottom.actions.html:19 #, python-format -msgid "Select all %(total_count)s %(module_name)s" -msgstr "选中所有的 %(total_count)s 个 %(module_name)s" +msgid "Select all %(total_count)s %(model_name)s" +msgstr "选中所有的 %(total_count)s 个 %(model_name)s" #: templates/xadmin/blocks/model_list.results_bottom.actions.html:20 msgid "Clear selection" diff --git a/xadmin/models.py b/xadmin/models.py index 614f40490..6f33a7606 100644 --- a/xadmin/models.py +++ b/xadmin/models.py @@ -75,7 +75,7 @@ def default(self, o): elif isinstance(o, decimal.Decimal): return str(o) elif isinstance(o, ModelBase): - return '%s.%s' % (o._meta.app_label, o._meta.module_name) + return '%s.%s' % (o._meta.app_label, o._meta.model_name) else: try: return super(JSONEncoder, self).default(o) diff --git a/xadmin/plugins/__init__.py b/xadmin/plugins/__init__.py index d6c7b2840..395a0f4c2 100644 --- a/xadmin/plugins/__init__.py +++ b/xadmin/plugins/__init__.py @@ -2,7 +2,7 @@ PLUGINS = ('actions', 'filters', 'bookmark', 'export', 'layout', 'refresh', 'sortable', 'details', 'editable', 'relate', 'chart', 'ajax', 'relfield', 'inline', 'topnav', 'portal', 'quickform', 'wizard', 'images', 'auth', 'multiselect', 'themes', 'aggregation', 'mobile', 'passwords', - 'sitemenu', 'language', 'comments','quickfilter') + 'sitemenu', 'language', 'quickfilter') def register_builtin_plugins(site): diff --git a/xadmin/plugins/bookmark.py b/xadmin/plugins/bookmark.py index 7c7dcb610..a30276b16 100644 --- a/xadmin/plugins/bookmark.py +++ b/xadmin/plugins/bookmark.py @@ -44,7 +44,7 @@ def get_context(self, context): filter(lambda i: bool(i[1] and (i[0] in (COL_LIST_VAR, ORDER_VAR, SEARCH_VAR) or i[0].startswith(FILTER_PREFIX) or i[0].startswith(RELATE_PREFIX))), self.request.GET.items()))]) - model_info = (self.opts.app_label, self.opts.module_name) + model_info = (self.opts.app_label, self.opts.model_name) has_selected = False menu_title = _(u"Bookmark") list_base_url = reverse('xadmin:%s_%s_changelist' % @@ -75,7 +75,7 @@ def check_item(i): has_selected = True content_type = ContentType.objects.get_for_model(self.model) - bk_model_info = (Bookmark._meta.app_label, Bookmark._meta.module_name) + bk_model_info = (Bookmark._meta.app_label, Bookmark._meta.model_name) bookmarks_queryset = Bookmark.objects.filter( content_type=content_type, url_name='xadmin:%s_%s_changelist' % model_info @@ -125,9 +125,9 @@ def block_nav_menu(self, context, nodes): class BookmarkView(ModelAdminView): @csrf_protect_m - @transaction.commit_on_success + @transaction.atomic def post(self, request): - model_info = (self.opts.app_label, self.opts.module_name) + model_info = (self.opts.app_label, self.opts.model_name) url_name = 'xadmin:%s_%s_changelist' % model_info bookmark = Bookmark( content_type=ContentType.objects.get_for_model(self.model), diff --git a/xadmin/plugins/details.py b/xadmin/plugins/details.py index 2c37fe118..0b5ed919e 100644 --- a/xadmin/plugins/details.py +++ b/xadmin/plugins/details.py @@ -39,12 +39,12 @@ def result_item(self, item, obj, field_name, row): try: item_res_uri = reverse( '%s:%s_%s_detail' % (self.admin_site.app_name, - opts.app_label, opts.module_name), + opts.app_label, opts.model_name), args=(getattr(rel_obj, opts.pk.attname),)) if item_res_uri: if has_change_perm: edit_url = reverse( - '%s:%s_%s_change' % (self.admin_site.app_name, opts.app_label, opts.module_name), + '%s:%s_%s_change' % (self.admin_site.app_name, opts.app_label, opts.model_name), args=(getattr(rel_obj, opts.pk.attname),)) else: edit_url = '' diff --git a/xadmin/plugins/editable.py b/xadmin/plugins/editable.py index 6a20cc79c..b2ddd7c92 100644 --- a/xadmin/plugins/editable.py +++ b/xadmin/plugins/editable.py @@ -129,7 +129,7 @@ def get(self, request, object_id): @filter_hook @csrf_protect_m - @transaction.commit_on_success + @transaction.atomic def post(self, request, object_id): model_fields = [f.name for f in self.opts.fields] fields = [f for f in request.POST.keys() if f in model_fields] diff --git a/xadmin/plugins/inline.py b/xadmin/plugins/inline.py index 56a0a5c18..23dfae2a2 100644 --- a/xadmin/plugins/inline.py +++ b/xadmin/plugins/inline.py @@ -441,7 +441,7 @@ def _get_detail_formset_instance(self, inline): replace_field_to_value(formset.helper.layout, inline) model = inline.model opts = model._meta - fake_admin_class = type(str('%s%sFakeAdmin' % (opts.app_label, opts.module_name)), (object, ), {'model': model}) + fake_admin_class = type(str('%s%sFakeAdmin' % (opts.app_label, opts.model_name)), (object, ), {'model': model}) for form in formset.forms: instance = form.instance if instance.pk: diff --git a/xadmin/plugins/portal.py b/xadmin/plugins/portal.py index de433a5cd..40199a249 100644 --- a/xadmin/plugins/portal.py +++ b/xadmin/plugins/portal.py @@ -23,7 +23,7 @@ def get_layout_objects(layout, clz, objects): class ModelFormPlugin(BasePortalPlugin): def _portal_key(self): - return '%s_%s_editform_portal' % (self.opts.app_label, self.opts.module_name) + return '%s_%s_editform_portal' % (self.opts.app_label, self.opts.model_name) def get_form_helper(self, helper): cs = [] @@ -64,7 +64,7 @@ def block_form_top(self, context, node): class ModelDetailPlugin(ModelFormPlugin): def _portal_key(self): - return '%s_%s_detail_portal' % (self.opts.app_label, self.opts.module_name) + return '%s_%s_detail_portal' % (self.opts.app_label, self.opts.model_name) def block_after_fieldsets(self, context, node): # put portal key and submit url to page diff --git a/xadmin/plugins/relate.py b/xadmin/plugins/relate.py index 37b8aee97..c3ac56ff5 100644 --- a/xadmin/plugins/relate.py +++ b/xadmin/plugins/relate.py @@ -43,7 +43,7 @@ def related_link(self, instance): links = [] for r, view_perm, add_perm in self.get_related_list(): label = r.opts.app_label - model_name = r.opts.module_name + model_name = r.opts.model_name f = r.field rel_name = f.rel.get_related_field().name diff --git a/xadmin/plugins/relfield.py b/xadmin/plugins/relfield.py index 14248b44d..9a5f5e4fb 100644 --- a/xadmin/plugins/relfield.py +++ b/xadmin/plugins/relfield.py @@ -25,7 +25,7 @@ def render(self, name, value, attrs=None): else: attrs['class'] = attrs['class'] + ' select-search' attrs['data-search-url'] = self.admin_view.get_admin_url( - '%s_%s_changelist' % (to_opts.app_label, to_opts.module_name)) + '%s_%s_changelist' % (to_opts.app_label, to_opts.model_name)) attrs['data-placeholder'] = _('Search %s') % to_opts.verbose_name attrs['data-choices'] = '?' if self.rel.limit_choices_to: diff --git a/xadmin/plugins/topnav.py b/xadmin/plugins/topnav.py index d7a81ddad..daa58bd9b 100644 --- a/xadmin/plugins/topnav.py +++ b/xadmin/plugins/topnav.py @@ -31,7 +31,7 @@ def block_top_navbar(self, context, nodes): app_label = model._meta.app_label if self.has_model_perm(model, "view"): - info = (app_label, model._meta.module_name) + info = (app_label, model._meta.model_name) if getattr(self.admin_site._registry[model], 'search_fields', None): try: search_models.append({ @@ -57,7 +57,7 @@ def block_top_navmenu(self, context, nodes): app_label = model._meta.app_label if self.has_model_perm(model, "add"): - info = (app_label, model._meta.module_name) + info = (app_label, model._meta.model_name) try: add_models.append({ 'title': _('Add %s') % capfirst(model._meta.verbose_name), diff --git a/xadmin/plugins/xversion.py b/xadmin/plugins/xversion.py index d4ff5f727..680561cce 100644 --- a/xadmin/plugins/xversion.py +++ b/xadmin/plugins/xversion.py @@ -221,7 +221,7 @@ def get_context(self): context.update({ "opts": opts, "app_label": opts.app_label, - "module_name": capfirst(opts.verbose_name), + "model_name": capfirst(opts.verbose_name), "title": _("Recover deleted %(name)s") % {"name": force_unicode(opts.verbose_name_plural)}, "deleted": deleted, "changelist_url": self.model_admin_url("https://github.com/changelist"), @@ -262,7 +262,7 @@ def get_context(self): context.update({ 'title': _('Change history: %s') % force_unicode(self.obj), 'action_list': action_list, - 'module_name': capfirst(force_unicode(opts.verbose_name_plural)), + 'model_name': capfirst(force_unicode(opts.verbose_name_plural)), 'object': self.obj, 'app_label': opts.app_label, "changelist_url": self.model_admin_url("https://github.com/changelist"), @@ -580,7 +580,7 @@ def total_form_count_hack(count): if self.request.method == 'GET' and formset.helper and formset.helper.layout: helper = formset.helper helper.filter(basestring).wrap(InlineDiffField) - fake_admin_class = type(str('%s%sFakeAdmin' % (self.opts.app_label, self.opts.module_name)), (object, ), {'model': self.model}) + fake_admin_class = type(str('%s%sFakeAdmin' % (self.opts.app_label, self.opts.model_name)), (object, ), {'model': self.model}) for form in formset.forms: instance = form.instance if instance.pk: diff --git a/xadmin/sites.py b/xadmin/sites.py index 5ad923afd..222dbaf6f 100644 --- a/xadmin/sites.py +++ b/xadmin/sites.py @@ -107,7 +107,7 @@ def register(self, model_or_iterable, admin_class=object, **options): # which causes issues later on. options['__module__'] = __name__ - admin_class = type(str("%s%sAdmin" % (model._meta.app_label, model._meta.module_name)), (admin_class,), options or {}) + admin_class = type(str("%s%sAdmin" % (model._meta.app_label, model._meta.model_name)), (admin_class,), options or {}) admin_class.model = model admin_class.order = self.model_admins_order self.model_admins_order += 1 @@ -309,12 +309,12 @@ def wrapper(*args, **kwargs): view_urls = [url( path, wrap( self.create_model_admin_view(clz, model, admin_class)), - name=name % (model._meta.app_label, model._meta.module_name)) + name=name % (model._meta.app_label, model._meta.model_name)) for path, clz, name in self._registry_modelviews] urlpatterns += patterns('', url( r'^%s/%s/' % ( - model._meta.app_label, model._meta.module_name), + model._meta.app_label, model._meta.model_name), include(patterns('', *view_urls))) ) diff --git a/xadmin/templates/xadmin/auth/user/change_password.html b/xadmin/templates/xadmin/auth/user/change_password.html index a7e5f3308..6a93649b0 100644 --- a/xadmin/templates/xadmin/auth/user/change_password.html +++ b/xadmin/templates/xadmin/auth/user/change_password.html @@ -25,7 +25,7 @@ {% endblock %} {% block content %} -
{% csrf_token %}{% block form_top %}{% endblock %} +{% csrf_token %}{% block form_top %}{% endblock %} {% if errors %}
{% blocktrans count counter=errors|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %} diff --git a/xadmin/templates/xadmin/blocks/model_list.results_bottom.actions.html b/xadmin/templates/xadmin/blocks/model_list.results_bottom.actions.html index 37c568af0..8705a0431 100644 --- a/xadmin/templates/xadmin/blocks/model_list.results_bottom.actions.html +++ b/xadmin/templates/xadmin/blocks/model_list.results_bottom.actions.html @@ -16,7 +16,7 @@
{% if actions_selection_counter %} {% if cl.result_count != cl.result_list|length %} - + {% endif %} diff --git a/xadmin/templates/xadmin/views/batch_change_form.html b/xadmin/templates/xadmin/views/batch_change_form.html index 6c65408fd..11ce46d6c 100644 --- a/xadmin/templates/xadmin/views/batch_change_form.html +++ b/xadmin/templates/xadmin/views/batch_change_form.html @@ -17,7 +17,7 @@ {% endblock %} {% block content %} -{% csrf_token %} +{% csrf_token %} {% if errors %}
diff --git a/xadmin/templates/xadmin/views/form.html b/xadmin/templates/xadmin/views/form.html index b2691ba80..6f84b11b9 100644 --- a/xadmin/templates/xadmin/views/form.html +++ b/xadmin/templates/xadmin/views/form.html @@ -8,7 +8,7 @@ {{ title }}{% endblock %} {% block content %} -{% csrf_token %} +{% csrf_token %} {% block form_top %}{% endblock %} {% view_block 'form_top' %} diff --git a/xadmin/templates/xadmin/views/model_form.html b/xadmin/templates/xadmin/views/model_form.html index bc5ca8082..c09901f3d 100644 --- a/xadmin/templates/xadmin/views/model_form.html +++ b/xadmin/templates/xadmin/views/model_form.html @@ -10,7 +10,7 @@ {{ title }}{% endblock %} {% block content %} -{% csrf_token %} +{% csrf_token %} {% block form_top %}{% endblock %} {% view_block 'form_top' %} diff --git a/xadmin/templates/xadmin/views/quick_form.html b/xadmin/templates/xadmin/views/quick_form.html index 293e3ff59..5de7a89e4 100644 --- a/xadmin/templates/xadmin/views/quick_form.html +++ b/xadmin/templates/xadmin/views/quick_form.html @@ -1,7 +1,7 @@ {% load i18n %} {% load xadmin_tags %} {% load crispy_forms_tags %} -{% csrf_token %} +{% csrf_token %} {% crispy form %} {{ media.css }} diff --git a/xadmin/templatetags/xadmin_tags.py b/xadmin/templatetags/xadmin_tags.py index a99ae7fb0..4ccc885f5 100644 --- a/xadmin/templatetags/xadmin_tags.py +++ b/xadmin/templatetags/xadmin_tags.py @@ -27,7 +27,7 @@ def view_block(context, block_name, *args, **kwargs): @register.filter def admin_urlname(value, arg): - return 'xadmin:%s_%s_%s' % (value.app_label, value.module_name, arg) + return 'xadmin:%s_%s_%s' % (value.app_label, value.model_name, arg) static = register.simple_tag(static) diff --git a/xadmin/util.py b/xadmin/util.py index 04731dbdc..879ccd194 100644 --- a/xadmin/util.py +++ b/xadmin/util.py @@ -427,7 +427,7 @@ def help_text_for_field(name, model): def admin_urlname(value, arg): - return 'xadmin:%s_%s_%s' % (value.app_label, value.module_name, arg) + return 'xadmin:%s_%s_%s' % (value.app_label, value.model_name, arg) def boolean_icon(field_val): diff --git a/xadmin/views/base.py b/xadmin/views/base.py index 252d15b9e..ad46ad2b0 100644 --- a/xadmin/views/base.py +++ b/xadmin/views/base.py @@ -133,11 +133,11 @@ def get_admin_url(https://github.com/self,%20name,%20*args,%20**kwargs): def get_model_url(https://github.com/self,%20model,%20name,%20*args,%20**kwargs): return reverse( '%s:%s_%s_%s' % (self.admin_site.app_name, model._meta.app_label, - model._meta.module_name, name), + model._meta.model_name, name), args=args, kwargs=kwargs, current_app=self.admin_site.name) def get_model_perm(self, model, name): - return '%s.%s_%s' % (model._meta.app_label, name, model._meta.module_name) + return '%s.%s_%s' % (model._meta.app_label, name, model._meta.model_name) def has_model_perm(self, model, name, user=None): user = user or self.user @@ -473,8 +473,8 @@ class ModelAdminView(CommAdminView): def __init__(self, request, *args, **kwargs): self.opts = self.model._meta self.app_label = self.model._meta.app_label - self.module_name = self.model._meta.module_name - self.model_info = (self.app_label, self.module_name) + self.model_name = self.model._meta.model_name + self.model_info = (self.app_label, self.model_name) super(ModelAdminView, self).__init__(request, *args, **kwargs) @@ -483,7 +483,7 @@ def get_context(self): new_context = { "opts": self.opts, "app_label": self.app_label, - "module_name": self.module_name, + "model_name": self.model_name, "verbose_name": force_unicode(self.opts.verbose_name), 'model_icon': self.get_model_icon(self.model), } @@ -526,7 +526,7 @@ def get_object_url(https://github.com/self,%20obj): def model_admin_url(https://github.com/self,%20name,%20*args,%20**kwargs): return reverse( "%s:%s_%s_%s" % (self.admin_site.app_name, self.opts.app_label, - self.module_name, name), args=args, kwargs=kwargs) + self.model_name, name), args=args, kwargs=kwargs) def get_model_perms(self): """ diff --git a/xadmin/views/dashboard.py b/xadmin/views/dashboard.py index 4b711cd91..1762626e5 100644 --- a/xadmin/views/dashboard.py +++ b/xadmin/views/dashboard.py @@ -265,7 +265,7 @@ def __init__(self, field): def __iter__(self): from xadmin import site as g_admin_site for m, ma in g_admin_site._registry.items(): - yield ('%s.%s' % (m._meta.app_label, m._meta.module_name), + yield ('%s.%s' % (m._meta.app_label, m._meta.model_name), m._meta.verbose_name) @@ -296,7 +296,7 @@ def to_python(self, value): def prepare_value(self, value): if isinstance(value, ModelBase): - value = '%s.%s' % (value._meta.app_label, value._meta.module_name) + value = '%s.%s' % (value._meta.app_label, value._meta.model_name) return value def valid_value(self, value): @@ -310,7 +310,7 @@ def valid_value(self, value): class ModelBaseWidget(BaseWidget): app_label = None - module_name = None + model_name = None model_perm = 'change' model = ModelChoiceField(label=_(u'Target Model'), widget=exwidgets.AdminSelectWidget) @@ -321,7 +321,7 @@ def __init__(self, dashboard, data): def setup(self): self.model = self.cleaned_data['model'] self.app_label = self.model._meta.app_label - self.module_name = self.model._meta.module_name + self.model_name = self.model._meta.model_name super(ModelBaseWidget, self).setup() @@ -334,7 +334,7 @@ def filte_choices_model(self, model, modeladmin): def model_admin_url(https://github.com/self,%20name,%20*args,%20**kwargs): return reverse( "%s:%s_%s_%s" % (self.admin_site.app_name, self.app_label, - self.module_name, name), args=args, kwargs=kwargs) + self.model_name, name), args=args, kwargs=kwargs) class PartialBaseWidget(BaseWidget): @@ -383,10 +383,10 @@ def context(self, context): btn = {} if 'model' in b: model = self.get_model(b['model']) - if not self.user.has_perm("%s.view_%s" % (model._meta.app_label, model._meta.module_name)): + if not self.user.has_perm("%s.view_%s" % (model._meta.app_label, model._meta.model_name)): continue btn['url'] = reverse("%s:%s_%s_%s" % (self.admin_site.app_name, model._meta.app_label, - model._meta.module_name, b.get('view', 'changelist'))) + model._meta.model_name, b.get('view', 'changelist'))) btn['title'] = model._meta.verbose_name btn['icon'] = self.dashboard.get_model_icon(model) else: @@ -575,7 +575,7 @@ def get_context(self): 'portal_key': self.get_portal_key(), 'columns': [('col-sm-%d' % int(12 / len(self.widgets)), ws) for ws in self.widgets], 'has_add_widget_permission': self.has_model_perm(UserWidget, 'add') and self.widget_customiz, - 'add_widget_url': self.get_admin_url('https://github.com/%s_%s_add'%20%%20(UserWidget._meta.app_label,%20UserWidget._meta.module_name)) + + 'add_widget_url': self.get_admin_url('https://github.com/%s_%s_add'%20%%20(UserWidget._meta.app_label,%20UserWidget._meta.model_name)) + "?user=%s&page_id=%s&_redirect=%s" % (self.user.id, self.get_page_id(), urlquote(self.request.get_full_path())) } context = super(Dashboard, self).get_context() diff --git a/xadmin/views/delete.py b/xadmin/views/delete.py index 78140cf79..9c15aefb7 100644 --- a/xadmin/views/delete.py +++ b/xadmin/views/delete.py @@ -41,7 +41,7 @@ def get(self, request, object_id): self.get_template_list("views/model_delete_confirm.html"), context, current_app=self.admin_site.name) @csrf_protect_m - @transaction.commit_on_success + @transaction.atomic @filter_hook def post(self, request, object_id): if self.perms_needed: diff --git a/xadmin/views/edit.py b/xadmin/views/edit.py index 81c0baa01..a0a23c318 100644 --- a/xadmin/views/edit.py +++ b/xadmin/views/edit.py @@ -250,7 +250,7 @@ def get(self, request, *args, **kwargs): return self.get_response() @csrf_protect_m - @transaction.commit_on_success + @transaction.atomic @filter_hook def post(self, request, *args, **kwargs): self.instance_forms() diff --git a/xadmin/views/form.py b/xadmin/views/form.py index 544c52a25..1be1a90ec 100644 --- a/xadmin/views/form.py +++ b/xadmin/views/form.py @@ -100,7 +100,7 @@ def get(self, request, *args, **kwargs): return self.get_response() @csrf_protect_m - @transaction.commit_on_success + @transaction.atomic @filter_hook def post(self, request, *args, **kwargs): self.instance_forms() diff --git a/xadmin/views/list.py b/xadmin/views/list.py index 457cd237f..7cd62b03e 100644 --- a/xadmin/views/list.py +++ b/xadmin/views/list.py @@ -375,7 +375,7 @@ def get_context(self): for f in (self.opts.fields + self.get_model_method_fields()) if f.name not in self.list_exclude] new_context = { - 'module_name': force_unicode(self.opts.verbose_name_plural), + 'model_name': force_unicode(self.opts.verbose_name_plural), 'title': self.title, 'cl': self, 'model_fields': model_fields, From 91e290719dd3f65c6ca1a19c05bfee8230bfd173 Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Wed, 10 Sep 2014 16:40:50 +0800 Subject: [PATCH 006/180] change django-reversion project changlog page url. --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index f863e6695..ae8d226ca 100644 --- a/README.rst +++ b/README.rst @@ -81,7 +81,7 @@ Install Requires .. _django: http://djangoproject.com .. _django-crispy-forms: http://django-crispy-forms.rtfd.org .. _django-reversion: https://github.com/etianen/django-reversion -.. _changelog: https://github.com/etianen/django-reversion/blob/master/CHANGELOG.markdown +.. _changelog: https://github.com/etianen/django-reversion/blob/master/CHANGELOG.rst .. _xlwt: http://www.python-excel.org/ .. _xlsxwriter: https://github.com/jmcnamara/XlsxWriter From 2fe0b1057493360df59c2c3672137a247b82cd81 Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Wed, 10 Sep 2014 17:21:35 +0800 Subject: [PATCH 007/180] silence the system check warning. --- demo_app/demo/settings.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/demo_app/demo/settings.py b/demo_app/demo/settings.py index 67907560a..5f2e2348f 100644 --- a/demo_app/demo/settings.py +++ b/demo_app/demo/settings.py @@ -146,6 +146,8 @@ DATETIME_FORMAT = 'Y-m-d H:i' TIME_FORMAT = 'H:i' +TEST_RUNNER = 'django.test.runner.DiscoverRunner' + # A sample logging configuration. The only tangible logging # performed by this configuration is to send an email to # the site admins on every HTTP 500 error when DEBUG=False. From c2aa33908919a9b7063a9991f3de72253a9694d2 Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Thu, 11 Sep 2014 16:15:15 +0800 Subject: [PATCH 008/180] Xadmin demo will force show reversion feature. --- demo_app/demo/settings.py | 2 +- demo_app/demo/urls.py | 4 ++-- requirements.txt | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/demo_app/demo/settings.py b/demo_app/demo/settings.py index 5f2e2348f..678c1c369 100644 --- a/demo_app/demo/settings.py +++ b/demo_app/demo/settings.py @@ -137,7 +137,7 @@ 'xadmin', 'crispy_forms', - #'reversion', + 'reversion', 'app', ) diff --git a/demo_app/demo/urls.py b/demo_app/demo/urls.py index 2ecfd6469..7c425d02c 100644 --- a/demo_app/demo/urls.py +++ b/demo_app/demo/urls.py @@ -3,8 +3,8 @@ # Uncomment the next two lines to enable the admin: import xadmin -# from xadmin.plugins import xversion -# xversion.register_models() +from xadmin.plugins import xversion +xversion.register_models() from django.contrib import admin diff --git a/requirements.txt b/requirements.txt index 9f2f0677d..6e311f1b4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ django>=1.7 -django-crispy-forms>=1.4.0 \ No newline at end of file +django-crispy-forms>=1.4.0 +django-reversion>=1.8.3 \ No newline at end of file From 6bb4833b5f8aca3f39a28ceaebe99a99b826bd37 Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Thu, 11 Sep 2014 16:15:45 +0800 Subject: [PATCH 009/180] Provisional Django 1.7 support --- xadmin/plugins/inline.py | 24 ++++++++++++++++-------- xadmin/plugins/quickform.py | 4 +++- xadmin/templates/xadmin/base_site.html | 3 ++- xadmin/views/base.py | 19 +++++++++++++------ xadmin/views/edit.py | 16 +++++++++++++--- xadmin/widgets.py | 4 ++-- 6 files changed, 49 insertions(+), 21 deletions(-) diff --git a/xadmin/plugins/inline.py b/xadmin/plugins/inline.py index 23dfae2a2..ca8b61daf 100644 --- a/xadmin/plugins/inline.py +++ b/xadmin/plugins/inline.py @@ -2,10 +2,11 @@ import inspect from django import forms from django.forms.formsets import all_valid, DELETION_FIELD_NAME -from django.forms.models import inlineformset_factory, BaseInlineFormSet +from django.forms.models import inlineformset_factory, BaseInlineFormSet, modelform_defines_fields from django.contrib.contenttypes.generic import BaseGenericInlineFormSet, generic_inlineformset_factory from django.template import loader from django.template.loader import render_to_string +from django.contrib.auth import get_permission_codename from xadmin.layout import FormHelper, Layout, flatatt, Container, Column, Field, Fieldset from xadmin.sites import site from xadmin.views import BaseAdminPlugin, ModelFormAdminView, DetailAdminView, filter_hook @@ -157,6 +158,7 @@ def get_formset(self, **kwargs): "form": self.form, "formset": self.formset, "fk_name": self.fk_name, + 'fields': forms.ALL_FIELDS, "exclude": exclude, "formfield_callback": self.formfield_for_dbfield, "extra": self.extra, @@ -164,6 +166,7 @@ def get_formset(self, **kwargs): "can_delete": can_delete, } defaults.update(kwargs) + return inlineformset_factory(self.parent_model, self.model, **defaults) @filter_hook @@ -250,8 +253,9 @@ def queryset(self): def has_add_permission(self): if self.opts.auto_created: return self.has_change_permission() - return self.user.has_perm( - self.opts.app_label + '.' + self.opts.get_add_permission()) + + codename = get_permission_codename('add', self.opts) + return self.user.has_perm("%s.%s" % (self.opts.app_label, codename)) def has_change_permission(self): opts = self.opts @@ -260,14 +264,16 @@ def has_change_permission(self): if field.rel and field.rel.to != self.parent_model: opts = field.rel.to._meta break - return self.user.has_perm( - opts.app_label + '.' + opts.get_change_permission()) + + codename = get_permission_codename('change', opts) + return self.user.has_perm("%s.%s" % (opts.app_label, codename)) def has_delete_permission(self): if self.opts.auto_created: return self.has_change_permission() - return self.user.has_perm( - self.opts.app_label + '.' + self.opts.get_delete_permission()) + + codename = get_permission_codename('delete', self.opts) + return self.user.has_perm("%s.%s" % (self.opts.app_label, codename)) class GenericInlineModelAdmin(InlineModelAdmin): @@ -298,9 +304,11 @@ def get_formset(self, **kwargs): "can_delete": can_delete, "can_order": False, "max_num": self.max_num, - "exclude": exclude + "exclude": exclude, + 'fields': forms.ALL_FIELDS } defaults.update(kwargs) + return generic_inlineformset_factory(self.model, **defaults) diff --git a/xadmin/plugins/quickform.py b/xadmin/plugins/quickform.py index 823965add..e06f9a822 100644 --- a/xadmin/plugins/quickform.py +++ b/xadmin/plugins/quickform.py @@ -45,7 +45,6 @@ class RelatedFieldWidgetWrapper(forms.Widget): admin interface. """ def __init__(self, widget, rel, add_url, rel_add_url): - self.is_hidden = widget.is_hidden self.needs_multipart_form = widget.needs_multipart_form self.attrs = widget.attrs self.choices = widget.choices @@ -56,6 +55,9 @@ def __init__(self, widget, rel, add_url, rel_add_url): self.add_url = add_url self.rel_add_url = rel_add_url + if hasattr(self, 'input_type'): + self.input_type = widget.input_type + def __deepcopy__(self, memo): obj = copy.copy(self) obj.widget = copy.deepcopy(self.widget, memo) diff --git a/xadmin/templates/xadmin/base_site.html b/xadmin/templates/xadmin/base_site.html index 14fbc399a..6b4be49ab 100644 --- a/xadmin/templates/xadmin/base_site.html +++ b/xadmin/templates/xadmin/base_site.html @@ -1,6 +1,7 @@ {% extends 'xadmin/base.html' %} {% load i18n xadmin_tags %} {% load url from future %} +{% load firstof from future %} {% block title %}{{ title }} | {{ site_title }}{% endblock %} @@ -16,7 +17,7 @@ {% if user.is_active and user.is_staff %}
'); $('body').append(modal); } modal.find('.modal-title').html(el.attr('title')); From bced97554c03929e6ea74812837cfe3e37ca2648 Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Mon, 25 May 2015 12:15:41 +0800 Subject: [PATCH 026/180] Add select2 widget language support --- xadmin/templates/xadmin/base.html | 1 + xadmin/widgets.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/xadmin/templates/xadmin/base.html b/xadmin/templates/xadmin/base.html index 003503057..09488dc57 100644 --- a/xadmin/templates/xadmin/base.html +++ b/xadmin/templates/xadmin/base.html @@ -23,6 +23,7 @@ {% block extrahead %}{% endblock %} diff --git a/xadmin/widgets.py b/xadmin/widgets.py index c860c7c25..cca441684 100644 --- a/xadmin/widgets.py +++ b/xadmin/widgets.py @@ -8,8 +8,9 @@ from django.utils.safestring import mark_safe from django.utils.html import conditional_escape from django.utils.translation import ugettext as _ +from django.forms import Media -from util import vendor +from util import vendor, static, get_language class AdminDateWidget(forms.DateInput): @@ -52,7 +53,8 @@ class AdminSelectWidget(forms.Select): @property def media(self): - return vendor('select.js', 'select.css', 'xadmin.widget.select.js') + return vendor('select.js', 'select.css', 'xadmin.widget.select.js') + \ + Media(js=[static('xadmin/vendor/select2/select2_locale_%s.js' % get_language())]) class AdminSplitDateTime(forms.SplitDateTimeWidget): From db1327d2590f25d51a76aa72ad101c3a9d27af93 Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Mon, 25 May 2015 15:25:23 +0800 Subject: [PATCH 027/180] Fix select2 locale for zh_CN --- xadmin/widgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xadmin/widgets.py b/xadmin/widgets.py index cca441684..5fb06b09c 100644 --- a/xadmin/widgets.py +++ b/xadmin/widgets.py @@ -54,7 +54,7 @@ class AdminSelectWidget(forms.Select): @property def media(self): return vendor('select.js', 'select.css', 'xadmin.widget.select.js') + \ - Media(js=[static('xadmin/vendor/select2/select2_locale_%s.js' % get_language())]) + Media(js=[static('xadmin/vendor/select2/select2_locale_%s.js' % get_language().replace('_','-'))]) class AdminSplitDateTime(forms.SplitDateTimeWidget): From 8c5f6c466fc1709b99f74a3e03911438c8e509de Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Mon, 25 May 2015 15:52:55 +0800 Subject: [PATCH 028/180] Fix select2 widget locale --- xadmin/util.py | 2 +- xadmin/vendors.py | 4 ++-- xadmin/widgets.py | 6 ++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/xadmin/util.py b/xadmin/util.py index 879ccd194..38e308728 100644 --- a/xadmin/util.py +++ b/xadmin/util.py @@ -77,7 +77,7 @@ def xstatic(*tags): files = node[mode] files = type(files) in (list, tuple) and files or [files, ] - fs.extend(files) + fs.extend([f % {'lang': lang.replace('_', '-')} for f in files]) return [f.startswith('http://') and f or static(f) for f in fs] diff --git a/xadmin/vendors.py b/xadmin/vendors.py index 8eb947e2f..3ce79d642 100644 --- a/xadmin/vendors.py +++ b/xadmin/vendors.py @@ -81,8 +81,8 @@ 'dev': ['xadmin/vendor/select2/select2.css', 'xadmin/vendor/selectize/selectize.css', 'xadmin/vendor/selectize/selectize.bootstrap3.css'], }, "js": { - 'dev': ['xadmin/vendor/selectize/selectize.js', 'xadmin/vendor/select2/select2.js'], - 'production': ['xadmin/vendor/selectize/selectize.min.js', 'xadmin/vendor/select2/select2.min.js'] + 'dev': ['xadmin/vendor/selectize/selectize.js', 'xadmin/vendor/select2/select2.js', 'xadmin/vendor/select2/select2_locale_%(lang)s.js'], + 'production': ['xadmin/vendor/selectize/selectize.min.js', 'xadmin/vendor/select2/select2.min.js', 'xadmin/vendor/select2/select2_locale_%(lang)s.js'] } }, "multiselect": { diff --git a/xadmin/widgets.py b/xadmin/widgets.py index 5fb06b09c..c860c7c25 100644 --- a/xadmin/widgets.py +++ b/xadmin/widgets.py @@ -8,9 +8,8 @@ from django.utils.safestring import mark_safe from django.utils.html import conditional_escape from django.utils.translation import ugettext as _ -from django.forms import Media -from util import vendor, static, get_language +from util import vendor class AdminDateWidget(forms.DateInput): @@ -53,8 +52,7 @@ class AdminSelectWidget(forms.Select): @property def media(self): - return vendor('select.js', 'select.css', 'xadmin.widget.select.js') + \ - Media(js=[static('xadmin/vendor/select2/select2_locale_%s.js' % get_language().replace('_','-'))]) + return vendor('select.js', 'select.css', 'xadmin.widget.select.js') class AdminSplitDateTime(forms.SplitDateTimeWidget): From 1e132e437b6cfe4d25b0d9eba8d38badca72a35f Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Mon, 25 May 2015 17:46:11 +0800 Subject: [PATCH 029/180] Fix datepicker widget icon. --- .../vendor/bootstrap-datepicker/js/bootstrap-datepicker.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xadmin/static/xadmin/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js b/xadmin/static/xadmin/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js index 1653b5518..da25ad2d4 100644 --- a/xadmin/static/xadmin/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js +++ b/xadmin/static/xadmin/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js @@ -65,7 +65,7 @@ if (this.isRTL){ this.picker.addClass('datepicker-rtl'); this.picker.find('.prev i, .next i') - .toggleClass('icon-arrow-left icon-arrow-right'); + .toggleClass('fa fa-arrow-left fa-arrow-right'); } this.autoclose = false; @@ -1010,9 +1010,9 @@ }, headTemplate: ''+ ''+ - ''+ + ''+ ''+ - ''+ + ''+ ''+ '', contTemplate: '', From ef5e3c7f0f1e335ef151276a3719903864c66801 Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Wed, 17 Jun 2015 11:23:58 +0800 Subject: [PATCH 030/180] Add min-height style to content div. --- xadmin/static/xadmin/css/xadmin.responsive.css | 1 + 1 file changed, 1 insertion(+) diff --git a/xadmin/static/xadmin/css/xadmin.responsive.css b/xadmin/static/xadmin/css/xadmin.responsive.css index d6e53153f..6fad0a94d 100644 --- a/xadmin/static/xadmin/css/xadmin.responsive.css +++ b/xadmin/static/xadmin/css/xadmin.responsive.css @@ -28,6 +28,7 @@ @media (min-width: 768px) { #content-block:not(.full-content) { padding-left: 5px; + min-height: 450px; } .form-actions .more-btns{ display: inline-block !important; From aeba185943143a8034bb8ac2b25a1a19e5946da2 Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Wed, 17 Jun 2015 11:25:22 +0800 Subject: [PATCH 031/180] If user did't has change object permission, don't display edit button is popup object detail page. --- xadmin/static/xadmin/js/xadmin.plugin.details.js | 7 ++++++- xadmin/static/xadmin/js/xadmin.plugin.editable.js | 4 ++-- xadmin/views/list.py | 5 ++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/xadmin/static/xadmin/js/xadmin.plugin.details.js b/xadmin/static/xadmin/js/xadmin.plugin.details.js index bc58a9434..12b4a0b8a 100644 --- a/xadmin/static/xadmin/js/xadmin.plugin.details.js +++ b/xadmin/static/xadmin/js/xadmin.plugin.details.js @@ -26,7 +26,12 @@ $('body').append(modal); } modal.find('.modal-title').html(el.attr('title')); - modal.find('.edit-btn').attr('href', this.edit_uri); + var edit_btn = modal.find('.edit-btn'); + if(this.edit_uri != ""){ + edit_btn.attr('href', this.edit_uri); + }else{ + edit_btn.remove(); + } modal.find('.modal-body').html('

'); modal.find('.modal-body').load(this.res_uri + '?_format=html', function(response, status, xhr) { if (status == "error") { diff --git a/xadmin/static/xadmin/js/xadmin.plugin.editable.js b/xadmin/static/xadmin/js/xadmin.plugin.editable.js index 31cb89f31..881edf5b3 100644 --- a/xadmin/static/xadmin/js/xadmin.plugin.editable.js +++ b/xadmin/static/xadmin/js/xadmin.plugin.editable.js @@ -67,11 +67,11 @@ if(this.content == null){ var that = this - $el.find('>i').removeClass('fa fa-edit').addClass('fa-spinner fa-spin') + $el.find('>i').removeClass('fa fa-edit').addClass('fa fa-spinner fa-spin') $.ajax({ url: $el.data('editable-loadurl'), success: function(content){ - $el.find('>i').removeClass('fa-spinner fa-spin').addClass('fa fa-edit') + $el.find('>i').removeClass('fa fa-spinner fa-spin').addClass('fa fa-edit') that.content = content that.toggle() }, diff --git a/xadmin/views/list.py b/xadmin/views/list.py index 7cd62b03e..c05e6f9bb 100644 --- a/xadmin/views/list.py +++ b/xadmin/views/list.py @@ -571,7 +571,10 @@ def result_item(self, obj, field_name, row): if self.list_display_links_details: item_res_uri = self.model_admin_url("https://github.com/detail%22,%20getattr(obj,%20self.pk_attname)) if item_res_uri: - edit_url = self.model_admin_url("https://github.com/change%22,%20getattr(obj,%20self.pk_attname)) + if self.has_change_permission(obj): + edit_url = self.model_admin_url("https://github.com/change%22,%20getattr(obj,%20self.pk_attname)) + else: + edit_url = "" item.wraps.append('%%s' % (item_res_uri, edit_url, _(u'Details of %s') % str(obj))) else: From d2995e4ae7565e6bd70fc2f306d3723aa26a10d6 Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Sun, 21 Jun 2015 21:50:56 +0800 Subject: [PATCH 032/180] Fixed editable plugin popover hide bug. --- xadmin/static/xadmin/js/xadmin.plugin.editable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xadmin/static/xadmin/js/xadmin.plugin.editable.js b/xadmin/static/xadmin/js/xadmin.plugin.editable.js index 881edf5b3..efc72eea3 100644 --- a/xadmin/static/xadmin/js/xadmin.plugin.editable.js +++ b/xadmin/static/xadmin/js/xadmin.plugin.editable.js @@ -139,7 +139,7 @@ this.$form.find('.controls').append(err_html.join('\n')) } else { this.$text.html(data['new_html'][this.field]) - this.hide() + this.leave(this) } }, this)) .fail($.proxy(function(xhr) { From f0f5a2db10ded50751ce808d74b853ab440114cf Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Mon, 29 Jun 2015 23:19:02 +0800 Subject: [PATCH 033/180] Fix auth permission models words translate. --- xadmin/locale/zh_CN/LC_MESSAGES/django.mo | Bin 19551 -> 19541 bytes xadmin/locale/zh_CN/LC_MESSAGES/django.po | 10 +++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xadmin/locale/zh_CN/LC_MESSAGES/django.mo b/xadmin/locale/zh_CN/LC_MESSAGES/django.mo index 21ed5b16ad0dfde7303c7994e59a14d3b02389de..bf053f42f1f17d206b8d7231021aa5181e19daa8 100644 GIT binary patch delta 2016 zcmXZceQ1?s7{~Ej1&`Cs>Bw0&!^P1ZjGUUCvu2uh*0gEn%Mi>)1tKDmokVj?d6qad zmy$Si^L2(pm>7ncrcM8ejNbk!K~WU6O{4H7Fj92%{q_9*`rOxb-}iN2&;2~-Ty5=h zzO~QMpYo!-5JGP{1UVoRTVzY@80^pdc+AHP4#O(Xzkx->OFaLf;|+GF?ZjtU*M+L{ zXC_2pD1(1V6ym^&cwz)5h|5q1mph+!oW+;P*Eqig^#Hp(f6)2EsJbUn4Sw(ZC47$f zW%&!dL37mvWaSm?4n#{ z97oF;sNVjRT24!{_k`>cH!$2JbiyFNH9ZxB#_(;s5gf z>lkRm5>MnDuR%4?gu0=RJ-^-VLS69z)c!8ix*zOssQp(we+_l;ZRh_{J|gkJ6Nzc@ zl?_HMEOneh9WdGPOuHEMtq5_0>0_4%%k-A>VH}jB2PG^)3B{!|@(!eL*&!ACcw#D^W^9 z3&x@1YShQG0QC-+q6)6YVqAwR+~WDYs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!c5G=4XCTG!wmd`x}l75{<^(UaX*U(Vp1m(Ve2R`3vIxR>S=*!_nd~Zi;YL3 oZx3znzTCa3yU@7jDh-lvu0<%j>r{2yQ4E30SnU#T$lRR910 diff --git a/xadmin/locale/zh_CN/LC_MESSAGES/django.po b/xadmin/locale/zh_CN/LC_MESSAGES/django.po index a9bdeafe4..22de0274e 100644 --- a/xadmin/locale/zh_CN/LC_MESSAGES/django.po +++ b/xadmin/locale/zh_CN/LC_MESSAGES/django.po @@ -201,27 +201,27 @@ msgstr "总数" #: plugins/auth.py:21 #, python-format msgid "Can add %s" -msgstr "可查看%s" +msgstr "添加:%s" #: plugins/auth.py:22 #, python-format msgid "Can change %s" -msgstr "修改%s" +msgstr "修改:%s" #: plugins/auth.py:23 #, python-format msgid "Can edit %s" -msgstr "可查看%s" +msgstr "编辑:%s" #: plugins/auth.py:24 #, python-format msgid "Can delete %s" -msgstr "可以删除%s" +msgstr "删除:%s" #: plugins/auth.py:25 #, python-format msgid "Can view %s" -msgstr "可查看%s" +msgstr "查看:%s" #: plugins/auth.py:87 msgid "Personal info" From 9affafad3201edc839d9bbd71e07fe8391dc5bc5 Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Thu, 19 Nov 2015 10:39:32 +0800 Subject: [PATCH 034/180] Update requirement packages version --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 6e311f1b4..b01d52b17 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -django>=1.7 -django-crispy-forms>=1.4.0 -django-reversion>=1.8.3 \ No newline at end of file +django~=1.7 +django-crispy-forms~=1.4 +django-reversion~=1.8 From 278af43f260b7ab83656d59d91eb184716b2cdce Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Thu, 19 Nov 2015 19:13:23 +0800 Subject: [PATCH 035/180] Update requirements.txt --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index b01d52b17..d6c24a534 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -django~=1.7 -django-crispy-forms~=1.4 -django-reversion~=1.8 +django~=1.7.0 +django-crispy-forms~=1.4.0 +django-reversion~=1.8.0 From 638bf9c9ceefd6c60384be953310e49431442d8d Mon Sep 17 00:00:00 2001 From: Alex Sandro Date: Mon, 1 Feb 2016 19:39:18 -0200 Subject: [PATCH 036/180] Fix for when the 'source attr' attribute is an unknown attribute. --- xadmin/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xadmin/util.py b/xadmin/util.py index 38e308728..b84480a62 100644 --- a/xadmin/util.py +++ b/xadmin/util.py @@ -233,7 +233,7 @@ def add_edge(self, source, target): def collect(self, objs, source_attr=None, **kwargs): for obj in objs: - if source_attr: + if source_attr and hasattr(obj, source_attr): self.add_edge(getattr(obj, source_attr), obj) else: self.add_edge(None, obj) From a7d797befbd7005170426028ba10429cfd0e142d Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Wed, 3 Feb 2016 09:49:24 +0800 Subject: [PATCH 037/180] Fixed error when get bootswatch API. --- xadmin/plugins/themes.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/xadmin/plugins/themes.py b/xadmin/plugins/themes.py index cc202e252..19f577a4c 100644 --- a/xadmin/plugins/themes.py +++ b/xadmin/plugins/themes.py @@ -1,5 +1,5 @@ #coding:utf-8 -import urllib +import urllib, httplib2 from django.template import loader from django.core.cache import cache from django.utils.translation import ugettext as _ @@ -60,14 +60,16 @@ def block_top_navmenu(self, context, nodes): else: ex_themes = [] try: - watch_themes = json.loads(urllib.urlopen( - 'http://api.bootswatch.com/3/').read())['themes'] + h = httplib2.Http(".cache", disable_ssl_certificate_validation=True) + resp, content = h.request("http://bootswatch.com/api/3.json", 'GET', \ + "", headers={"Accept": "application/json", "User-Agent": self.request.META['HTTP_USER_AGENT']}) + watch_themes = json.loads(content)['themes'] ex_themes.extend([ {'name': t['name'], 'description': t['description'], 'css': t['cssMin'], 'thumbnail': t['thumbnail']} for t in watch_themes]) - except Exception: - pass + except Exception, e: + print e cache.set(THEME_CACHE_KEY, json.dumps(ex_themes), 24 * 3600) themes.extend(ex_themes) From 50e736c1a2d754b747544807651bfe9b50807e5a Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Wed, 3 Feb 2016 09:49:47 +0800 Subject: [PATCH 038/180] Add language switch demo in demo app. --- demo_app/demo/settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/demo_app/demo/settings.py b/demo_app/demo/settings.py index 678c1c369..431019ebc 100644 --- a/demo_app/demo/settings.py +++ b/demo_app/demo/settings.py @@ -45,7 +45,7 @@ LANGUAGES = ( ('en', gettext('English')), - ('zh_CN', gettext('Chinese')), + ('zh-cn', gettext('Chinese')), ) SITE_ID = 1 @@ -111,6 +111,7 @@ 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.locale.LocaleMiddleware', # Uncomment the next line for simple clickjacking protection: # 'django.middleware.clickjacking.XFrameOptionsMiddleware', ) From f4eee00cb62d689c862adae2c260007b7a22d0e3 Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Sat, 27 Feb 2016 11:48:37 +0800 Subject: [PATCH 039/180] BootsWatch Api use http request. --- xadmin/plugins/themes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xadmin/plugins/themes.py b/xadmin/plugins/themes.py index 19f577a4c..534429f3a 100644 --- a/xadmin/plugins/themes.py +++ b/xadmin/plugins/themes.py @@ -60,7 +60,7 @@ def block_top_navmenu(self, context, nodes): else: ex_themes = [] try: - h = httplib2.Http(".cache", disable_ssl_certificate_validation=True) + h = httplib2.Http() resp, content = h.request("http://bootswatch.com/api/3.json", 'GET', \ "", headers={"Accept": "application/json", "User-Agent": self.request.META['HTTP_USER_AGENT']}) watch_themes = json.loads(content)['themes'] From 122fa6ece676dc0404f822465b9af2f6572d6bb2 Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Sat, 27 Feb 2016 11:48:56 +0800 Subject: [PATCH 040/180] Include page.form.js into detail model pages. --- xadmin/views/detail.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xadmin/views/detail.py b/xadmin/views/detail.py index 4db265638..36fc75032 100644 --- a/xadmin/views/detail.py +++ b/xadmin/views/detail.py @@ -256,10 +256,8 @@ def get_breadcrumb(self): @filter_hook def get_media(self): - media = super(DetailAdminView, self).get_media() - media = media + self.form_obj.media - media.add_css({'screen': [self.static('xadmin/css/xadmin.form.css')]}) - return media + return super(DetailAdminView, self).get_media() + self.form_obj.media + \ + self.vendor('xadmin.page.form.js', 'xadmin.form.css') @filter_hook def get_field_result(self, field_name): From a7f7ef469d34068d93da9b261b6236ad6c18258a Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Sat, 27 Feb 2016 11:49:49 +0800 Subject: [PATCH 041/180] Upgrade selectize.js => 0.12.0 --- .../vendor/selectize/selectize.bootstrap2.css | 487 ++++++++++ .../vendor/selectize/selectize.bootstrap3.css | 301 +++---- .../xadmin/vendor/selectize/selectize.css | 225 ++--- .../vendor/selectize/selectize.default.css | 257 +++--- .../xadmin/vendor/selectize/selectize.js | 839 ++++++++++++------ .../vendor/selectize/selectize.legacy.css | 247 +++--- .../xadmin/vendor/selectize/selectize.min.js | 6 +- 7 files changed, 1497 insertions(+), 865 deletions(-) create mode 100644 xadmin/static/xadmin/vendor/selectize/selectize.bootstrap2.css diff --git a/xadmin/static/xadmin/vendor/selectize/selectize.bootstrap2.css b/xadmin/static/xadmin/vendor/selectize/selectize.bootstrap2.css new file mode 100644 index 000000000..16b792cd7 --- /dev/null +++ b/xadmin/static/xadmin/vendor/selectize/selectize.bootstrap2.css @@ -0,0 +1,487 @@ +/** + * selectize.bootstrap2.css (v0.12.1) - Bootstrap 2 Theme + * Copyright (c) 2013–2015 Brian Reavis & contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at: + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF + * ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + * + * @author Brian Reavis + */ +.selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder { + visibility: visible !important; + background: #f2f2f2 !important; + background: rgba(0, 0, 0, 0.06) !important; + border: 0 none !important; + -webkit-box-shadow: inset 0 0 12px 4px #ffffff; + box-shadow: inset 0 0 12px 4px #ffffff; +} +.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after { + content: '!'; + visibility: hidden; +} +.selectize-control.plugin-drag_drop .ui-sortable-helper { + -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); +} +.selectize-dropdown-header { + position: relative; + padding: 3px 10px; + border-bottom: 1px solid #d0d0d0; + background: #f8f8f8; + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} +.selectize-dropdown-header-close { + position: absolute; + right: 10px; + top: 50%; + color: #333333; + opacity: 0.4; + margin-top: -12px; + line-height: 20px; + font-size: 20px !important; +} +.selectize-dropdown-header-close:hover { + color: #000000; +} +.selectize-dropdown.plugin-optgroup_columns .optgroup { + border-right: 1px solid #f2f2f2; + border-top: 0 none; + float: left; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child { + border-right: 0 none; +} +.selectize-dropdown.plugin-optgroup_columns .optgroup:before { + display: none; +} +.selectize-dropdown.plugin-optgroup_columns .optgroup-header { + border-top: 0 none; +} +.selectize-control.plugin-remove_button [data-value] { + position: relative; + padding-right: 24px !important; +} +.selectize-control.plugin-remove_button [data-value] .remove { + z-index: 1; + /* fixes ie bug (see #392) */ + position: absolute; + top: 0; + right: 0; + bottom: 0; + width: 17px; + text-align: center; + font-weight: bold; + font-size: 12px; + color: inherit; + text-decoration: none; + vertical-align: middle; + display: inline-block; + padding: 1px 0 0 0; + border-left: 1px solid #cccccc; + -webkit-border-radius: 0 2px 2px 0; + -moz-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.selectize-control.plugin-remove_button [data-value] .remove:hover { + background: rgba(0, 0, 0, 0.05); +} +.selectize-control.plugin-remove_button [data-value].active .remove { + border-left-color: #0077b3; +} +.selectize-control.plugin-remove_button .disabled [data-value] .remove:hover { + background: none; +} +.selectize-control.plugin-remove_button .disabled [data-value] .remove { + border-left-color: #e0e0e0; +} +.selectize-control { + position: relative; +} +.selectize-dropdown, +.selectize-input, +.selectize-input input { + color: #333333; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 20px; + -webkit-font-smoothing: inherit; +} +.selectize-input, +.selectize-control.single .selectize-input.input-active { + background: #ffffff; + cursor: text; + display: inline-block; +} +.selectize-input { + border: 1px solid #d0d0d0; + padding: 7px 10px; + display: inline-block; + width: 100%; + overflow: hidden; + position: relative; + z-index: 1; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-box-shadow: none; + box-shadow: none; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.selectize-control.multi .selectize-input.has-items { + padding: 5px 10px 2px; +} +.selectize-input.full { + background-color: #ffffff; +} +.selectize-input.disabled, +.selectize-input.disabled * { + cursor: default !important; +} +.selectize-input.focus { + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); +} +.selectize-input.dropdown-active { + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} +.selectize-input > * { + vertical-align: baseline; + display: -moz-inline-stack; + display: inline-block; + zoom: 1; + *display: inline; +} +.selectize-control.multi .selectize-input > div { + cursor: pointer; + margin: 0 3px 3px 0; + padding: 1px 3px; + background: #e6e6e6; + color: #333333; + border: 1px solid #cccccc; +} +.selectize-control.multi .selectize-input > div.active { + background: #0088cc; + color: #ffffff; + border: 1px solid #0077b3; +} +.selectize-control.multi .selectize-input.disabled > div, +.selectize-control.multi .selectize-input.disabled > div.active { + color: #474747; + background: #fafafa; + border: 1px solid #e0e0e0; +} +.selectize-input > input { + display: inline-block !important; + padding: 0 !important; + min-height: 0 !important; + max-height: none !important; + max-width: 100% !important; + margin: 0 !important; + text-indent: 0 !important; + border: 0 none !important; + background: none !important; + line-height: inherit !important; + -webkit-user-select: auto !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; +} +.selectize-input > input::-ms-clear { + display: none; +} +.selectize-input > input:focus { + outline: none !important; +} +.selectize-input::after { + content: ' '; + display: block; + clear: left; +} +.selectize-input.dropdown-active::before { + content: ' '; + display: block; + position: absolute; + background: #e5e5e5; + height: 1px; + bottom: 0; + left: 0; + right: 0; +} +.selectize-dropdown { + position: absolute; + z-index: 10; + border: 1px solid #cccccc; + background: #ffffff; + margin: -1px 0 0 0; + border-top: 0 none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} +.selectize-dropdown [data-selectable] { + cursor: pointer; + overflow: hidden; +} +.selectize-dropdown [data-selectable] .highlight { + background: rgba(255, 237, 40, 0.4); + -webkit-border-radius: 1px; + -moz-border-radius: 1px; + border-radius: 1px; +} +.selectize-dropdown [data-selectable], +.selectize-dropdown .optgroup-header { + padding: 3px 10px; +} +.selectize-dropdown .optgroup:first-child .optgroup-header { + border-top: 0 none; +} +.selectize-dropdown .optgroup-header { + color: #999999; + background: #ffffff; + cursor: default; +} +.selectize-dropdown .active { + background-color: #0088cc; + color: #ffffff; +} +.selectize-dropdown .active.create { + color: #ffffff; +} +.selectize-dropdown .create { + color: rgba(51, 51, 51, 0.5); +} +.selectize-dropdown-content { + overflow-y: auto; + overflow-x: hidden; + max-height: 200px; +} +.selectize-control.single .selectize-input, +.selectize-control.single .selectize-input input { + cursor: pointer; +} +.selectize-control.single .selectize-input.input-active, +.selectize-control.single .selectize-input.input-active input { + cursor: text; +} +.selectize-control.single .selectize-input:after { + content: ' '; + display: block; + position: absolute; + top: 50%; + right: 15px; + margin-top: -3px; + width: 0; + height: 0; + border-style: solid; + border-width: 5px 5px 0 5px; + border-color: #000000 transparent transparent transparent; +} +.selectize-control.single .selectize-input.dropdown-active:after { + margin-top: -4px; + border-width: 0 5px 5px 5px; + border-color: transparent transparent #000000 transparent; +} +.selectize-control.rtl.single .selectize-input:after { + left: 15px; + right: auto; +} +.selectize-control.rtl .selectize-input > input { + margin: 0 4px 0 -2px !important; +} +.selectize-control .selectize-input.disabled { + opacity: 0.5; + background-color: #ffffff; +} +.selectize-dropdown { + margin: 2px 0 0 0; + z-index: 1000; + border: 1px solid rgba(0, 0, 0, 0.2); + border-radius: 4px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); +} +.selectize-dropdown .optgroup-header { + font-size: 11px; + font-weight: bold; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + text-transform: uppercase; +} +.selectize-dropdown .optgroup:first-child:before { + display: none; +} +.selectize-dropdown .optgroup:before { + content: ' '; + display: block; + *width: 100%; + height: 1px; + margin: 9px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; + margin-left: -10px; + margin-right: -10px; +} +.selectize-dropdown [data-selectable].active { + background-color: #0081c2; + background-image: -moz-linear-gradient(top, #0088cc, #0077b3); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); + background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); + background-image: -o-linear-gradient(top, #0088cc, #0077b3); + background-image: linear-gradient(to bottom, #0088cc, #0077b3); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); +} +.selectize-dropdown-content { + padding: 5px 0; +} +.selectize-dropdown-header { + padding: 6px 10px; +} +.selectize-input { + -webkit-transition: border linear .2s, box-shadow linear .2s; + -moz-transition: border linear .2s, box-shadow linear .2s; + -o-transition: border linear .2s, box-shadow linear .2s; + transition: border linear .2s, box-shadow linear .2s; +} +.selectize-input.dropdown-active { + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.selectize-input.dropdown-active::before { + display: none; +} +.selectize-input.input-active, +.selectize-input.input-active:hover, +.selectize-control.multi .selectize-input.focus { + background: #ffffff !important; + border-color: rgba(82, 168, 236, 0.8) !important; + outline: 0 !important; + outline: thin dotted \9 !important; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6) !important; + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6) !important; + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6) !important; +} +.selectize-control.single .selectize-input { + color: #333333; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e6e6e6; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); +} +.selectize-control.single .selectize-input:hover, +.selectize-control.single .selectize-input:focus, +.selectize-control.single .selectize-input:active, +.selectize-control.single .selectize-input.active, +.selectize-control.single .selectize-input.disabled, +.selectize-control.single .selectize-input[disabled] { + color: #333333; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.selectize-control.single .selectize-input:active, +.selectize-control.single .selectize-input.active { + background-color: #cccccc \9; +} +.selectize-control.single .selectize-input:hover { + color: #333333; + text-decoration: none; + background-position: 0 -15px; + -webkit-transition: background-position 0.1s linear; + -moz-transition: background-position 0.1s linear; + -o-transition: background-position 0.1s linear; + transition: background-position 0.1s linear; +} +.selectize-control.single .selectize-input.disabled { + background: #e6e6e6 !important; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.selectize-control.multi .selectize-input { + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.selectize-control.multi .selectize-input.has-items { + padding-left: 7px; + padding-right: 7px; +} +.selectize-control.multi .selectize-input > div { + color: #333333; + text-shadow: none; + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e6e6e6; + border: 1px solid #cccccc; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); +} +.selectize-control.multi .selectize-input > div.active { + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05); + box-shadow: 0 1px 2px rgba(0,0,0,.05); + color: #ffffff; + text-shadow: none; + background-color: #0081c2; + background-image: -moz-linear-gradient(top, #0088cc, #0077b3); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); + background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); + background-image: -o-linear-gradient(top, #0088cc, #0077b3); + background-image: linear-gradient(to bottom, #0088cc, #0077b3); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); + border-color: #0077b3 #0077b3 #004466; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #0088cc; + border: 1px solid #0088cc; +} diff --git a/xadmin/static/xadmin/vendor/selectize/selectize.bootstrap3.css b/xadmin/static/xadmin/vendor/selectize/selectize.bootstrap3.css index f385e3310..cfb2bfa2f 100644 --- a/xadmin/static/xadmin/vendor/selectize/selectize.bootstrap3.css +++ b/xadmin/static/xadmin/vendor/selectize/selectize.bootstrap3.css @@ -1,6 +1,6 @@ /** - * selectize.bootstrap3.css (v0.8.4) - Bootstrap 3 Theme - * Copyright (c) 2013 Brian Reavis & contributors + * selectize.bootstrap3.css (v0.12.1) - Bootstrap 3 Theme + * Copyright (c) 2013–2015 Brian Reavis & contributors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this * file except in compliance with the License. You may obtain a copy of the License at: @@ -13,436 +13,389 @@ * * @author Brian Reavis */ - .selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder { + visibility: visible !important; background: #f2f2f2 !important; background: rgba(0, 0, 0, 0.06) !important; border: 0 none !important; - visibility: visible !important; -webkit-box-shadow: inset 0 0 12px 4px #ffffff; - box-shadow: inset 0 0 12px 4px #ffffff; + box-shadow: inset 0 0 12px 4px #ffffff; } - .selectize-control.plugin-drag_drop .ui-sortable-placeholder::after { content: '!'; visibility: hidden; } - .selectize-control.plugin-drag_drop .ui-sortable-helper { -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); - box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); } - .selectize-dropdown-header { position: relative; padding: 3px 12px; - background: #f8f8f8; border-bottom: 1px solid #d0d0d0; + background: #f8f8f8; -webkit-border-radius: 4px 4px 0 0; - -moz-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; } - .selectize-dropdown-header-close { position: absolute; - top: 50%; right: 12px; - margin-top: -12px; - font-size: 20px !important; - line-height: 20px; + top: 50%; color: #333333; opacity: 0.4; + margin-top: -12px; + line-height: 20px; + font-size: 20px !important; } - .selectize-dropdown-header-close:hover { color: #000000; } - .selectize-dropdown.plugin-optgroup_columns .optgroup { - float: left; - border-top: 0 none; border-right: 1px solid #f2f2f2; + border-top: 0 none; + float: left; -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } - .selectize-dropdown.plugin-optgroup_columns .optgroup:last-child { border-right: 0 none; } - .selectize-dropdown.plugin-optgroup_columns .optgroup:before { display: none; } - .selectize-dropdown.plugin-optgroup_columns .optgroup-header { border-top: 0 none; } - .selectize-control.plugin-remove_button [data-value] { position: relative; padding-right: 24px !important; } - .selectize-control.plugin-remove_button [data-value] .remove { + z-index: 1; + /* fixes ie bug (see #392) */ position: absolute; top: 0; right: 0; bottom: 0; - display: inline-block; width: 17px; - padding: 1px 0 0 0; - font-size: 12px; + text-align: center; font-weight: bold; + font-size: 12px; color: inherit; - text-align: center; text-decoration: none; vertical-align: middle; + display: inline-block; + padding: 1px 0 0 0; border-left: 1px solid rgba(0, 0, 0, 0); -webkit-border-radius: 0 2px 2px 0; - -moz-border-radius: 0 2px 2px 0; - border-radius: 0 2px 2px 0; + -moz-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } - .selectize-control.plugin-remove_button [data-value] .remove:hover { background: rgba(0, 0, 0, 0.05); } - .selectize-control.plugin-remove_button [data-value].active .remove { border-left-color: rgba(0, 0, 0, 0); } - .selectize-control.plugin-remove_button .disabled [data-value] .remove:hover { background: none; } - .selectize-control.plugin-remove_button .disabled [data-value] .remove { border-left-color: rgba(77, 77, 77, 0); } - .selectize-control { position: relative; } - .selectize-dropdown, .selectize-input, .selectize-input input { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - -webkit-font-smoothing: inherit; - line-height: 20px; color: #333333; + font-family: inherit; + font-size: inherit; + line-height: 20px; + -webkit-font-smoothing: inherit; } - .selectize-input, .selectize-control.single .selectize-input.input-active { - display: inline-block; - cursor: text; background: #ffffff; + cursor: text; + display: inline-block; } - .selectize-input { - position: relative; - z-index: 1; + border: 1px solid #cccccc; + padding: 6px 12px; display: inline-block; width: 100%; - padding: 6px 12px; overflow: hidden; - border: 1px solid #cccccc; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - -webkit-box-shadow: none; - box-shadow: none; + position: relative; + z-index: 1; -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-box-shadow: none; + box-shadow: none; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; } - .selectize-control.multi .selectize-input.has-items { padding: 5px 12px 2px; } - .selectize-input.full { background-color: #ffffff; } - .selectize-input.disabled, .selectize-input.disabled * { cursor: default !important; } - .selectize-input.focus { -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); } - .selectize-input.dropdown-active { -webkit-border-radius: 4px 4px 0 0; - -moz-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; } - .selectize-input > * { + vertical-align: baseline; display: -moz-inline-stack; display: inline-block; - *display: inline; - vertical-align: baseline; zoom: 1; + *display: inline; } - .selectize-control.multi .selectize-input > div { - padding: 1px 3px; - margin: 0 3px 3px 0; - color: #333333; cursor: pointer; + margin: 0 3px 3px 0; + padding: 1px 3px; background: #efefef; + color: #333333; border: 0 solid rgba(0, 0, 0, 0); } - .selectize-control.multi .selectize-input > div.active { - color: #ffffff; background: #428bca; + color: #ffffff; border: 0 solid rgba(0, 0, 0, 0); } - .selectize-control.multi .selectize-input.disabled > div, .selectize-control.multi .selectize-input.disabled > div.active { color: #808080; background: #ffffff; border: 0 solid rgba(77, 77, 77, 0); } - .selectize-input > input { - max-width: 100% !important; - max-height: none !important; - min-height: 0 !important; + display: inline-block !important; padding: 0 !important; + min-height: 0 !important; + max-height: none !important; + max-width: 100% !important; margin: 0 !important; - line-height: inherit !important; text-indent: 0 !important; - background: none !important; border: 0 none !important; - -webkit-box-shadow: none !important; - box-shadow: none !important; + background: none !important; + line-height: inherit !important; -webkit-user-select: auto !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; +} +.selectize-input > input::-ms-clear { + display: none; } - .selectize-input > input:focus { outline: none !important; } - .selectize-input::after { + content: ' '; display: block; clear: left; - content: ' '; } - .selectize-input.dropdown-active::before { + content: ' '; + display: block; position: absolute; - right: 0; + background: #ffffff; + height: 1px; bottom: 0; left: 0; - display: block; - height: 1px; - background: #ffffff; - content: ' '; + right: 0; } - .selectize-dropdown { position: absolute; z-index: 10; - margin: -1px 0 0 0; + border: 1px solid #d0d0d0; background: #ffffff; - border: 1px solid #cccccc; + margin: -1px 0 0 0; border-top: 0 none; - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; } - .selectize-dropdown [data-selectable] { - overflow: hidden; cursor: pointer; + overflow: hidden; } - .selectize-dropdown [data-selectable] .highlight { background: rgba(255, 237, 40, 0.4); -webkit-border-radius: 1px; - -moz-border-radius: 1px; - border-radius: 1px; + -moz-border-radius: 1px; + border-radius: 1px; } - .selectize-dropdown [data-selectable], .selectize-dropdown .optgroup-header { padding: 3px 12px; } - .selectize-dropdown .optgroup:first-child .optgroup-header { border-top: 0 none; } - .selectize-dropdown .optgroup-header { - color: #999999; - cursor: default; + color: #777777; background: #ffffff; + cursor: default; } - .selectize-dropdown .active { - color: #ffffff; - background-color: #428bca; + background-color: #f5f5f5; + color: #262626; } - .selectize-dropdown .active.create { - color: #ffffff; + color: #262626; } - .selectize-dropdown .create { color: rgba(51, 51, 51, 0.5); } - .selectize-dropdown-content { - max-height: 200px; - overflow-x: hidden; overflow-y: auto; + overflow-x: hidden; + max-height: 200px; } - .selectize-control.single .selectize-input, .selectize-control.single .selectize-input input { cursor: pointer; } - .selectize-control.single .selectize-input.input-active, .selectize-control.single .selectize-input.input-active input { cursor: text; } - .selectize-control.single .selectize-input:after { + content: ' '; + display: block; position: absolute; top: 50%; right: 17px; - display: block; + margin-top: -3px; width: 0; height: 0; - margin-top: -3px; - border-color: #000000 transparent transparent transparent; border-style: solid; border-width: 5px 5px 0 5px; - content: ' '; + border-color: #333333 transparent transparent transparent; } - .selectize-control.single .selectize-input.dropdown-active:after { margin-top: -4px; - border-color: transparent transparent #000000 transparent; border-width: 0 5px 5px 5px; + border-color: transparent transparent #333333 transparent; } - .selectize-control.rtl.single .selectize-input:after { - right: auto; left: 17px; + right: auto; } - .selectize-control.rtl .selectize-input > input { margin: 0 4px 0 -2px !important; } - .selectize-control .selectize-input.disabled { - background-color: #ffffff; opacity: 0.5; + background-color: #ffffff; } - .selectize-dropdown, .selectize-dropdown.form-control { - z-index: 1000; height: auto; padding: 0; margin: 2px 0 0 0; + z-index: 1000; background: #ffffff; border: 1px solid #cccccc; border: 1px solid rgba(0, 0, 0, 0.15); -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); - box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); } - .selectize-dropdown .optgroup-header { font-size: 12px; - line-height: 1.428571429; + line-height: 1.42857143; } - .selectize-dropdown .optgroup:first-child:before { display: none; } - .selectize-dropdown .optgroup:before { + content: ' '; display: block; height: 1px; margin: 9px 0; - margin-right: -12px; - margin-left: -12px; overflow: hidden; background-color: #e5e5e5; - content: ' '; + margin-left: -12px; + margin-right: -12px; } - .selectize-dropdown-content { padding: 5px 0; } - .selectize-dropdown-header { padding: 6px 12px; } - .selectize-input { min-height: 34px; } - .selectize-input.dropdown-active { -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; } - .selectize-input.dropdown-active::before { display: none; } - .selectize-input.focus { border-color: #66afe9; outline: 0; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); +} +.has-error .selectize-input { + border-color: #a94442; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.has-error .selectize-input:focus { + border-color: #843534; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483; } - .selectize-control.multi .selectize-input.has-items { - padding-right: 9px; padding-left: 9px; + padding-right: 9px; } - .selectize-control.multi .selectize-input > div { -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; } - .form-control.selectize-control { - height: auto; padding: 0; - background: none; + height: auto; border: none; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; + background: none; -webkit-box-shadow: none; - box-shadow: none; -} \ No newline at end of file + box-shadow: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} diff --git a/xadmin/static/xadmin/vendor/selectize/selectize.css b/xadmin/static/xadmin/vendor/selectize/selectize.css index aab32d5e0..6c3ba0b24 100644 --- a/xadmin/static/xadmin/vendor/selectize/selectize.css +++ b/xadmin/static/xadmin/vendor/selectize/selectize.css @@ -1,6 +1,6 @@ /** - * selectize.css (v0.8.4) - * Copyright (c) 2013 Brian Reavis & contributors + * selectize.css (v0.12.1) + * Copyright (c) 2013–2015 Brian Reavis & contributors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this * file except in compliance with the License. You may obtain a copy of the License at: @@ -15,346 +15,303 @@ */ .selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder { + visibility: visible !important; background: #f2f2f2 !important; background: rgba(0, 0, 0, 0.06) !important; border: 0 none !important; - visibility: visible !important; -webkit-box-shadow: inset 0 0 12px 4px #ffffff; - box-shadow: inset 0 0 12px 4px #ffffff; + box-shadow: inset 0 0 12px 4px #ffffff; } - .selectize-control.plugin-drag_drop .ui-sortable-placeholder::after { content: '!'; visibility: hidden; } - .selectize-control.plugin-drag_drop .ui-sortable-helper { -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); - box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); } - .selectize-dropdown-header { position: relative; padding: 5px 8px; - background: #f8f8f8; border-bottom: 1px solid #d0d0d0; + background: #f8f8f8; -webkit-border-radius: 3px 3px 0 0; - -moz-border-radius: 3px 3px 0 0; - border-radius: 3px 3px 0 0; + -moz-border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0; } - .selectize-dropdown-header-close { position: absolute; - top: 50%; right: 8px; - margin-top: -12px; - font-size: 20px !important; - line-height: 20px; + top: 50%; color: #303030; opacity: 0.4; + margin-top: -12px; + line-height: 20px; + font-size: 20px !important; } - .selectize-dropdown-header-close:hover { color: #000000; } - .selectize-dropdown.plugin-optgroup_columns .optgroup { - float: left; - border-top: 0 none; border-right: 1px solid #f2f2f2; + border-top: 0 none; + float: left; -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } - .selectize-dropdown.plugin-optgroup_columns .optgroup:last-child { border-right: 0 none; } - .selectize-dropdown.plugin-optgroup_columns .optgroup:before { display: none; } - .selectize-dropdown.plugin-optgroup_columns .optgroup-header { border-top: 0 none; } - .selectize-control.plugin-remove_button [data-value] { position: relative; padding-right: 24px !important; } - .selectize-control.plugin-remove_button [data-value] .remove { + z-index: 1; + /* fixes ie bug (see #392) */ position: absolute; top: 0; right: 0; bottom: 0; - display: inline-block; width: 17px; - padding: 2px 0 0 0; - font-size: 12px; + text-align: center; font-weight: bold; + font-size: 12px; color: inherit; - text-align: center; text-decoration: none; vertical-align: middle; + display: inline-block; + padding: 2px 0 0 0; border-left: 1px solid #d0d0d0; -webkit-border-radius: 0 2px 2px 0; - -moz-border-radius: 0 2px 2px 0; - border-radius: 0 2px 2px 0; + -moz-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } - .selectize-control.plugin-remove_button [data-value] .remove:hover { background: rgba(0, 0, 0, 0.05); } - .selectize-control.plugin-remove_button [data-value].active .remove { border-left-color: #cacaca; } - .selectize-control.plugin-remove_button .disabled [data-value] .remove:hover { background: none; } - .selectize-control.plugin-remove_button .disabled [data-value] .remove { border-left-color: #ffffff; } - .selectize-control { position: relative; } - .selectize-dropdown, .selectize-input, .selectize-input input { + color: #303030; font-family: inherit; font-size: 13px; - -webkit-font-smoothing: inherit; line-height: 18px; - color: #303030; + -webkit-font-smoothing: inherit; } - .selectize-input, .selectize-control.single .selectize-input.input-active { - display: inline-block; - cursor: text; background: #ffffff; + cursor: text; + display: inline-block; } - .selectize-input { - position: relative; - z-index: 1; + border: 1px solid #d0d0d0; + padding: 8px 8px; display: inline-block; width: 100%; - padding: 8px 8px; overflow: hidden; - border: 1px solid #d0d0d0; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1); + position: relative; + z-index: 1; -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; } - .selectize-control.multi .selectize-input.has-items { padding: 6px 8px 3px; } - .selectize-input.full { background-color: #ffffff; } - .selectize-input.disabled, .selectize-input.disabled * { cursor: default !important; } - .selectize-input.focus { -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); } - .selectize-input.dropdown-active { -webkit-border-radius: 3px 3px 0 0; - -moz-border-radius: 3px 3px 0 0; - border-radius: 3px 3px 0 0; + -moz-border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0; } - .selectize-input > * { + vertical-align: baseline; display: -moz-inline-stack; display: inline-block; - *display: inline; - vertical-align: baseline; zoom: 1; + *display: inline; } - .selectize-control.multi .selectize-input > div { - padding: 2px 6px; - margin: 0 3px 3px 0; - color: #303030; cursor: pointer; + margin: 0 3px 3px 0; + padding: 2px 6px; background: #f2f2f2; + color: #303030; border: 0 solid #d0d0d0; } - .selectize-control.multi .selectize-input > div.active { - color: #303030; background: #e8e8e8; + color: #303030; border: 0 solid #cacaca; } - .selectize-control.multi .selectize-input.disabled > div, .selectize-control.multi .selectize-input.disabled > div.active { color: #7d7d7d; background: #ffffff; border: 0 solid #ffffff; } - .selectize-input > input { - max-width: 100% !important; - max-height: none !important; - min-height: 0 !important; + display: inline-block !important; padding: 0 !important; + min-height: 0 !important; + max-height: none !important; + max-width: 100% !important; margin: 0 2px 0 0 !important; - line-height: inherit !important; text-indent: 0 !important; - background: none !important; border: 0 none !important; - -webkit-box-shadow: none !important; - box-shadow: none !important; + background: none !important; + line-height: inherit !important; -webkit-user-select: auto !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; +} +.selectize-input > input::-ms-clear { + display: none; } - .selectize-input > input:focus { outline: none !important; } - .selectize-input::after { + content: ' '; display: block; clear: left; - content: ' '; } - .selectize-input.dropdown-active::before { + content: ' '; + display: block; position: absolute; - right: 0; + background: #f0f0f0; + height: 1px; bottom: 0; left: 0; - display: block; - height: 1px; - background: #f0f0f0; - content: ' '; + right: 0; } - .selectize-dropdown { position: absolute; z-index: 10; - margin: -1px 0 0 0; - background: #ffffff; border: 1px solid #d0d0d0; + background: #ffffff; + margin: -1px 0 0 0; border-top: 0 none; - -webkit-border-radius: 0 0 3px 3px; - -moz-border-radius: 0 0 3px 3px; - border-radius: 0 0 3px 3px; - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; } - .selectize-dropdown [data-selectable] { - overflow: hidden; cursor: pointer; + overflow: hidden; } - .selectize-dropdown [data-selectable] .highlight { background: rgba(125, 168, 208, 0.2); -webkit-border-radius: 1px; - -moz-border-radius: 1px; - border-radius: 1px; + -moz-border-radius: 1px; + border-radius: 1px; } - .selectize-dropdown [data-selectable], .selectize-dropdown .optgroup-header { padding: 5px 8px; } - .selectize-dropdown .optgroup:first-child .optgroup-header { border-top: 0 none; } - .selectize-dropdown .optgroup-header { color: #303030; - cursor: default; background: #ffffff; + cursor: default; } - .selectize-dropdown .active { - color: #495c68; background-color: #f5fafd; + color: #495c68; } - .selectize-dropdown .active.create { color: #495c68; } - .selectize-dropdown .create { color: rgba(48, 48, 48, 0.5); } - .selectize-dropdown-content { - max-height: 200px; - overflow-x: hidden; overflow-y: auto; + overflow-x: hidden; + max-height: 200px; } - .selectize-control.single .selectize-input, .selectize-control.single .selectize-input input { cursor: pointer; } - .selectize-control.single .selectize-input.input-active, .selectize-control.single .selectize-input.input-active input { cursor: text; } - .selectize-control.single .selectize-input:after { + content: ' '; + display: block; position: absolute; top: 50%; right: 15px; - display: block; + margin-top: -3px; width: 0; height: 0; - margin-top: -3px; - border-color: #808080 transparent transparent transparent; border-style: solid; border-width: 5px 5px 0 5px; - content: ' '; + border-color: #808080 transparent transparent transparent; } - .selectize-control.single .selectize-input.dropdown-active:after { margin-top: -4px; - border-color: transparent transparent #808080 transparent; border-width: 0 5px 5px 5px; + border-color: transparent transparent #808080 transparent; } - .selectize-control.rtl.single .selectize-input:after { - right: auto; left: 15px; + right: auto; } - .selectize-control.rtl .selectize-input > input { margin: 0 4px 0 -2px !important; } - .selectize-control .selectize-input.disabled { - background-color: #fafafa; opacity: 0.5; -} \ No newline at end of file + background-color: #fafafa; +} diff --git a/xadmin/static/xadmin/vendor/selectize/selectize.default.css b/xadmin/static/xadmin/vendor/selectize/selectize.default.css index cfdc0151d..ffd219c46 100644 --- a/xadmin/static/xadmin/vendor/selectize/selectize.default.css +++ b/xadmin/static/xadmin/vendor/selectize/selectize.default.css @@ -1,6 +1,6 @@ /** - * selectize.default.css (v0.8.4) - Default Theme - * Copyright (c) 2013 Brian Reavis & contributors + * selectize.default.css (v0.12.1) - Default Theme + * Copyright (c) 2013–2015 Brian Reavis & contributors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this * file except in compliance with the License. You may obtain a copy of the License at: @@ -13,376 +13,330 @@ * * @author Brian Reavis */ - .selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder { + visibility: visible !important; background: #f2f2f2 !important; background: rgba(0, 0, 0, 0.06) !important; border: 0 none !important; - visibility: visible !important; -webkit-box-shadow: inset 0 0 12px 4px #ffffff; - box-shadow: inset 0 0 12px 4px #ffffff; + box-shadow: inset 0 0 12px 4px #ffffff; } - .selectize-control.plugin-drag_drop .ui-sortable-placeholder::after { content: '!'; visibility: hidden; } - .selectize-control.plugin-drag_drop .ui-sortable-helper { -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); - box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); } - .selectize-dropdown-header { position: relative; padding: 5px 8px; - background: #f8f8f8; border-bottom: 1px solid #d0d0d0; + background: #f8f8f8; -webkit-border-radius: 3px 3px 0 0; - -moz-border-radius: 3px 3px 0 0; - border-radius: 3px 3px 0 0; + -moz-border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0; } - .selectize-dropdown-header-close { position: absolute; - top: 50%; right: 8px; - margin-top: -12px; - font-size: 20px !important; - line-height: 20px; + top: 50%; color: #303030; opacity: 0.4; + margin-top: -12px; + line-height: 20px; + font-size: 20px !important; } - .selectize-dropdown-header-close:hover { color: #000000; } - .selectize-dropdown.plugin-optgroup_columns .optgroup { - float: left; - border-top: 0 none; border-right: 1px solid #f2f2f2; + border-top: 0 none; + float: left; -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } - .selectize-dropdown.plugin-optgroup_columns .optgroup:last-child { border-right: 0 none; } - .selectize-dropdown.plugin-optgroup_columns .optgroup:before { display: none; } - .selectize-dropdown.plugin-optgroup_columns .optgroup-header { border-top: 0 none; } - .selectize-control.plugin-remove_button [data-value] { position: relative; padding-right: 24px !important; } - .selectize-control.plugin-remove_button [data-value] .remove { + z-index: 1; + /* fixes ie bug (see #392) */ position: absolute; top: 0; right: 0; bottom: 0; - display: inline-block; width: 17px; - padding: 2px 0 0 0; - font-size: 12px; + text-align: center; font-weight: bold; + font-size: 12px; color: inherit; - text-align: center; text-decoration: none; vertical-align: middle; + display: inline-block; + padding: 2px 0 0 0; border-left: 1px solid #0073bb; -webkit-border-radius: 0 2px 2px 0; - -moz-border-radius: 0 2px 2px 0; - border-radius: 0 2px 2px 0; + -moz-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } - .selectize-control.plugin-remove_button [data-value] .remove:hover { background: rgba(0, 0, 0, 0.05); } - .selectize-control.plugin-remove_button [data-value].active .remove { border-left-color: #00578d; } - .selectize-control.plugin-remove_button .disabled [data-value] .remove:hover { background: none; } - .selectize-control.plugin-remove_button .disabled [data-value] .remove { border-left-color: #aaaaaa; } - .selectize-control { position: relative; } - .selectize-dropdown, .selectize-input, .selectize-input input { + color: #303030; font-family: inherit; font-size: 13px; - -webkit-font-smoothing: inherit; line-height: 18px; - color: #303030; + -webkit-font-smoothing: inherit; } - .selectize-input, .selectize-control.single .selectize-input.input-active { - display: inline-block; - cursor: text; background: #ffffff; + cursor: text; + display: inline-block; } - .selectize-input { - position: relative; - z-index: 1; + border: 1px solid #d0d0d0; + padding: 8px 8px; display: inline-block; width: 100%; - padding: 8px 8px; overflow: hidden; - border: 1px solid #d0d0d0; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1); + position: relative; + z-index: 1; -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; } - .selectize-control.multi .selectize-input.has-items { padding: 5px 8px 2px; } - .selectize-input.full { background-color: #ffffff; } - .selectize-input.disabled, .selectize-input.disabled * { cursor: default !important; } - .selectize-input.focus { -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); } - .selectize-input.dropdown-active { -webkit-border-radius: 3px 3px 0 0; - -moz-border-radius: 3px 3px 0 0; - border-radius: 3px 3px 0 0; + -moz-border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0; } - .selectize-input > * { + vertical-align: baseline; display: -moz-inline-stack; display: inline-block; - *display: inline; - vertical-align: baseline; zoom: 1; + *display: inline; } - .selectize-control.multi .selectize-input > div { - padding: 2px 6px; - margin: 0 3px 3px 0; - color: #ffffff; cursor: pointer; + margin: 0 3px 3px 0; + padding: 2px 6px; background: #1da7ee; + color: #ffffff; border: 1px solid #0073bb; } - .selectize-control.multi .selectize-input > div.active { - color: #ffffff; background: #92c836; + color: #ffffff; border: 1px solid #00578d; } - .selectize-control.multi .selectize-input.disabled > div, .selectize-control.multi .selectize-input.disabled > div.active { color: #ffffff; background: #d2d2d2; border: 1px solid #aaaaaa; } - .selectize-input > input { - max-width: 100% !important; - max-height: none !important; - min-height: 0 !important; + display: inline-block !important; padding: 0 !important; + min-height: 0 !important; + max-height: none !important; + max-width: 100% !important; margin: 0 1px !important; - line-height: inherit !important; text-indent: 0 !important; - background: none !important; border: 0 none !important; - -webkit-box-shadow: none !important; - box-shadow: none !important; + background: none !important; + line-height: inherit !important; -webkit-user-select: auto !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; +} +.selectize-input > input::-ms-clear { + display: none; } - .selectize-input > input:focus { outline: none !important; } - .selectize-input::after { + content: ' '; display: block; clear: left; - content: ' '; } - .selectize-input.dropdown-active::before { + content: ' '; + display: block; position: absolute; - right: 0; + background: #f0f0f0; + height: 1px; bottom: 0; left: 0; - display: block; - height: 1px; - background: #f0f0f0; - content: ' '; + right: 0; } - .selectize-dropdown { position: absolute; z-index: 10; - margin: -1px 0 0 0; - background: #ffffff; border: 1px solid #d0d0d0; + background: #ffffff; + margin: -1px 0 0 0; border-top: 0 none; - -webkit-border-radius: 0 0 3px 3px; - -moz-border-radius: 0 0 3px 3px; - border-radius: 0 0 3px 3px; - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; } - .selectize-dropdown [data-selectable] { - overflow: hidden; cursor: pointer; + overflow: hidden; } - .selectize-dropdown [data-selectable] .highlight { background: rgba(125, 168, 208, 0.2); -webkit-border-radius: 1px; - -moz-border-radius: 1px; - border-radius: 1px; + -moz-border-radius: 1px; + border-radius: 1px; } - .selectize-dropdown [data-selectable], .selectize-dropdown .optgroup-header { padding: 5px 8px; } - .selectize-dropdown .optgroup:first-child .optgroup-header { border-top: 0 none; } - .selectize-dropdown .optgroup-header { color: #303030; - cursor: default; background: #ffffff; + cursor: default; } - .selectize-dropdown .active { - color: #495c68; background-color: #f5fafd; + color: #495c68; } - .selectize-dropdown .active.create { color: #495c68; } - .selectize-dropdown .create { color: rgba(48, 48, 48, 0.5); } - .selectize-dropdown-content { - max-height: 200px; - overflow-x: hidden; overflow-y: auto; + overflow-x: hidden; + max-height: 200px; } - .selectize-control.single .selectize-input, .selectize-control.single .selectize-input input { cursor: pointer; } - .selectize-control.single .selectize-input.input-active, .selectize-control.single .selectize-input.input-active input { cursor: text; } - .selectize-control.single .selectize-input:after { + content: ' '; + display: block; position: absolute; top: 50%; right: 15px; - display: block; + margin-top: -3px; width: 0; height: 0; - margin-top: -3px; - border-color: #808080 transparent transparent transparent; border-style: solid; border-width: 5px 5px 0 5px; - content: ' '; + border-color: #808080 transparent transparent transparent; } - .selectize-control.single .selectize-input.dropdown-active:after { margin-top: -4px; - border-color: transparent transparent #808080 transparent; border-width: 0 5px 5px 5px; + border-color: transparent transparent #808080 transparent; } - .selectize-control.rtl.single .selectize-input:after { - right: auto; left: 15px; + right: auto; } - .selectize-control.rtl .selectize-input > input { margin: 0 4px 0 -2px !important; } - .selectize-control .selectize-input.disabled { - background-color: #fafafa; opacity: 0.5; + background-color: #fafafa; } - .selectize-control.multi .selectize-input.has-items { - padding-right: 5px; padding-left: 5px; + padding-right: 5px; } - .selectize-control.multi .selectize-input.disabled [data-value] { color: #999; text-shadow: none; background: none; -webkit-box-shadow: none; - box-shadow: none; + box-shadow: none; } - .selectize-control.multi .selectize-input.disabled [data-value], .selectize-control.multi .selectize-input.disabled [data-value] .remove { border-color: #e6e6e6; } - .selectize-control.multi .selectize-input.disabled [data-value] .remove { background: none; } - .selectize-control.multi .selectize-input [data-value] { text-shadow: 0 1px 0 rgba(0, 51, 83, 0.3); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; background-color: #1b9dec; background-image: -moz-linear-gradient(top, #1da7ee, #178ee9); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#1da7ee), to(#178ee9)); @@ -390,14 +344,10 @@ background-image: -o-linear-gradient(top, #1da7ee, #178ee9); background-image: linear-gradient(to bottom, #1da7ee, #178ee9); background-repeat: repeat-x; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff1da7ee', endColorstr='#ff178ee9', GradientType=0); - -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), inset 0 1px rgba(255, 255, 255, 0.03); - box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), inset 0 1px rgba(255, 255, 255, 0.03); + -webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.2),inset 0 1px rgba(255,255,255,0.03); + box-shadow: 0 1px 0 rgba(0,0,0,0.2),inset 0 1px rgba(255,255,255,0.03); } - .selectize-control.multi .selectize-input [data-value].active { background-color: #0085d4; background-image: -moz-linear-gradient(top, #008fd8, #0075cf); @@ -408,8 +358,9 @@ background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff008fd8', endColorstr='#ff0075cf', GradientType=0); } - .selectize-control.single .selectize-input { + -webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.8); + box-shadow: 0 1px 0 rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.8); background-color: #f9f9f9; background-image: -moz-linear-gradient(top, #fefefe, #f2f2f2); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fefefe), to(#f2f2f2)); @@ -418,25 +369,19 @@ background-image: linear-gradient(to bottom, #fefefe, #f2f2f2); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffefefe', endColorstr='#fff2f2f2', GradientType=0); - -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8); - box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8); } - .selectize-control.single .selectize-input, .selectize-dropdown.single { border-color: #b8b8b8; } - .selectize-dropdown .optgroup-header { padding-top: 7px; - font-size: 0.85em; font-weight: bold; + font-size: 0.85em; } - .selectize-dropdown .optgroup { border-top: 1px solid #f0f0f0; } - .selectize-dropdown .optgroup:first-child { border-top: 0 none; -} \ No newline at end of file +} diff --git a/xadmin/static/xadmin/vendor/selectize/selectize.js b/xadmin/static/xadmin/vendor/selectize/selectize.js index 28d56bbc9..e8c091408 100644 --- a/xadmin/static/xadmin/vendor/selectize/selectize.js +++ b/xadmin/static/xadmin/vendor/selectize/selectize.js @@ -16,7 +16,7 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { - define(factory); + define('sifter', factory); } else if (typeof exports === 'object') { module.exports = factory(); } else { @@ -221,7 +221,7 @@ * @param {object} result * @return {mixed} */ - get_field = function(name, result) { + get_field = function(name, result) { if (name === '$score') return result.score; return self.items[result.id][name]; }; @@ -391,8 +391,8 @@ if (typeof a === 'number' && typeof b === 'number') { return a > b ? 1 : (a < b ? -1 : 0); } - a = String(a || '').toLowerCase(); - b = String(b || '').toLowerCase(); + a = asciifold(String(a || '')); + b = asciifold(String(b || '')); if (a > b) return 1; if (b > a) return -1; return 0; @@ -425,19 +425,44 @@ }; var DIACRITICS = { - 'a': '[aÀÁÂÃÄÅàáâãäå]', + 'a': '[aÀÁÂÃÄÅàáâãäåĀāąĄ]', 'c': '[cÇçćĆčČ]', - 'd': '[dđĐ]', - 'e': '[eÈÉÊËèéêë]', - 'i': '[iÌÍÎÏìíîï]', - 'n': '[nÑñ]', - 'o': '[oÒÓÔÕÕÖØòóôõöø]', - 's': '[sŠš]', - 'u': '[uÙÚÛÜùúûü]', - 'y': '[yŸÿý]', - 'z': '[zŽž]' + 'd': '[dđĐďĎ]', + 'e': '[eÈÉÊËèéêëěĚĒēęĘ]', + 'i': '[iÌÍÎÏìíîïĪī]', + 'l': '[lłŁ]', + 'n': '[nÑñňŇńŃ]', + 'o': '[oÒÓÔÕÕÖØòóôõöøŌō]', + 'r': '[rřŘ]', + 's': '[sŠšśŚ]', + 't': '[tťŤ]', + 'u': '[uÙÚÛÜùúûüůŮŪū]', + 'y': '[yŸÿýÝ]', + 'z': '[zŽžżŻźŹ]' }; + var asciifold = (function() { + var i, n, k, chunk; + var foreignletters = ''; + var lookup = {}; + for (k in DIACRITICS) { + if (DIACRITICS.hasOwnProperty(k)) { + chunk = DIACRITICS[k].substring(2, DIACRITICS[k].length - 1); + foreignletters += chunk; + for (i = 0, n = chunk.length; i < n; i++) { + lookup[chunk.charAt(i)] = k; + } + } + } + var regexp = new RegExp('[' + foreignletters + ']', 'g'); + return function(str) { + return str.replace(regexp, function(foreignletter) { + return lookup[foreignletter]; + }).toLowerCase(); + }; + })(); + + // export // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -464,7 +489,7 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { - define(factory); + define('microplugin', factory); } else if (typeof exports === 'object') { module.exports = factory(); } else { @@ -583,8 +608,8 @@ })); /** - * selectize.js (v0.8.4) - * Copyright (c) 2013 Brian Reavis & contributors + * selectize.js (v0.12.1) + * Copyright (c) 2013–2015 Brian Reavis & contributors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this * file except in compliance with the License. You may obtain a copy of the License at: @@ -603,7 +628,9 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { - define(['jquery','sifter','microplugin'], factory); + define('selectize', ['jquery','sifter','microplugin'], factory); + } else if (typeof exports === 'object') { + module.exports = factory(require('jquery'), require('sifter'), require('microplugin')); } else { root.Selectize = factory(root.jQuery, root.Sifter, root.MicroPlugin); } @@ -689,8 +716,10 @@ var KEY_ESC = 27; var KEY_LEFT = 37; var KEY_UP = 38; + var KEY_P = 80; var KEY_RIGHT = 39; var KEY_DOWN = 40; + var KEY_N = 78; var KEY_BACKSPACE = 8; var KEY_DELETE = 46; var KEY_SHIFT = 16; @@ -701,6 +730,9 @@ var TAG_SELECT = 1; var TAG_INPUT = 2; + // for now, android support in general is too spotty to support validity + var SUPPORTS_VALIDITY_API = !/android/i.test(window.navigator.userAgent) && !!document.createElement('form').validity; + var isset = function(object) { return typeof object !== 'undefined'; }; @@ -719,10 +751,10 @@ * 1 -> '1' * * @param {string} value - * @returns {string} + * @returns {string|null} */ var hash_key = function(value) { - if (typeof value === 'undefined' || value === null) return ''; + if (typeof value === 'undefined' || value === null) return null; if (typeof value === 'boolean') return value ? '1' : '0'; return value + ''; }; @@ -786,25 +818,6 @@ }; }; - /** - * Builds a hash table out of an array of - * objects, using the specified `key` within - * each object. - * - * @param {string} key - * @param {mixed} objects - */ - var build_hash_table = function(key, objects) { - if (!$.isArray(objects)) return objects; - var i, n, table = {}; - for (i = 0, n = objects.length; i < n; i++) { - if (objects[i].hasOwnProperty(key)) { - table[objects[i][key]] = objects[i]; - } - } - return table; - }; - /** * Wraps `fn` so that it can only be invoked once. * @@ -947,6 +960,10 @@ * @returns {int} */ var measureString = function(str, $parent) { + if (!str) { + return 0; + } + var $test = $('').css({ position: 'absolute', top: -99999, @@ -980,13 +997,16 @@ * @param {object} $input */ var autoGrow = function($input) { - var update = function(e) { + var currentWidth = null; + + var update = function(e, options) { var value, keyCode, printable, placeholder, width; var shift, character, selection; e = e || window.event || {}; + options = options || {}; if (e.metaKey || e.altKey) return; - if ($input.data('grow') === false) return; + if (!options.force && $input.data('grow') === false) return; value = $input.val(); if (e.type && e.type.toLowerCase() === 'keydown') { @@ -1016,13 +1036,14 @@ } } - placeholder = $input.attr('placeholder') || ''; - if (!value.length && placeholder.length) { + placeholder = $input.attr('placeholder'); + if (!value && placeholder) { value = placeholder; } width = measureString(value, $input) + 4; - if (width !== $input.width()) { + if (width !== currentWidth) { + currentWidth = width; $input.width(width); $input.triggerHandler('resize'); } @@ -1038,13 +1059,16 @@ input.selectize = self; // detect rtl environment - dir = window.getComputedStyle ? window.getComputedStyle(input, null).getPropertyValue('direction') : input.currentStyle && input.currentStyle.direction; + var computedStyle = window.getComputedStyle && window.getComputedStyle(input, null); + dir = computedStyle ? computedStyle.getPropertyValue('direction') : input.currentStyle && input.currentStyle.direction; dir = dir || $input.parents('[dir]:first').attr('dir') || ''; // setup default state $.extend(self, { + order : 0, settings : settings, $input : $input, + tabIndex : $input.attr('tabindex') || '', tagType : input.tagName.toLowerCase() === 'select' ? TAG_SELECT : TAG_INPUT, rtl : /rtl/i.test(dir), @@ -1062,6 +1086,7 @@ isCmdDown : false, isCtrlDown : false, ignoreFocus : false, + ignoreBlur : false, ignoreHover : false, hasOptions : false, currentResults : null, @@ -1078,19 +1103,27 @@ userOptions : {}, items : [], renderCache : {}, - onSearchChange : debounce(self.onSearchChange, settings.loadThrottle) + onSearchChange : settings.loadThrottle === null ? self.onSearchChange : debounce(self.onSearchChange, settings.loadThrottle) }); // search system self.sifter = new Sifter(this.options, {diacritics: settings.diacritics}); // build options table - $.extend(self.options, build_hash_table(settings.valueField, settings.options)); - delete self.settings.options; + if (self.settings.options) { + for (i = 0, n = self.settings.options.length; i < n; i++) { + self.registerOption(self.settings.options[i]); + } + delete self.settings.options; + } // build optgroup table - $.extend(self.optgroups, build_hash_table(settings.optgroupValueField, settings.optgroups)); - delete self.settings.optgroups; + if (self.settings.optgroups) { + for (i = 0, n = self.settings.optgroups.length; i < n; i++) { + self.registerOptionGroup(self.settings.optgroups[i]); + } + delete self.settings.optgroups; + } // option-dependent defaults self.settings.mode = self.settings.mode || (self.settings.maxItems === 1 ? 'single' : 'multi'); @@ -1124,6 +1157,7 @@ var eventNS = self.eventNS; var $window = $(window); var $document = $(document); + var $input = self.$input; var $wrapper; var $control; @@ -1134,23 +1168,25 @@ var inputMode; var timeout_blur; var timeout_focus; - var tab_index; var classes; var classes_plugins; inputMode = self.settings.mode; - tab_index = self.$input.attr('tabindex') || ''; - classes = self.$input.attr('class') || ''; + classes = $input.attr('class') || ''; $wrapper = $('
').addClass(settings.wrapperClass).addClass(classes).addClass(inputMode); $control = $('
').addClass(settings.inputClass).addClass('items').appendTo($wrapper); - $control_input = $('').appendTo($control).attr('tabindex', tab_index); + $control_input = $('').appendTo($control).attr('tabindex', $input.is(':disabled') ? '-1' : self.tabIndex); $dropdown_parent = $(settings.dropdownParent || $wrapper); - $dropdown = $('
').addClass(settings.dropdownClass).addClass(classes).addClass(inputMode).hide().appendTo($dropdown_parent); + $dropdown = $('
').addClass(settings.dropdownClass).addClass(inputMode).hide().appendTo($dropdown_parent); $dropdown_content = $('
').addClass(settings.dropdownContentClass).appendTo($dropdown); + if(self.settings.copyClassesToDropdown) { + $dropdown.addClass(classes); + } + $wrapper.css({ - width: self.$input[0].style.width + width: $input[0].style.width }); if (self.plugins.names.length) { @@ -1160,13 +1196,27 @@ } if ((settings.maxItems === null || settings.maxItems > 1) && self.tagType === TAG_SELECT) { - self.$input.attr('multiple', 'multiple'); + $input.attr('multiple', 'multiple'); } if (self.settings.placeholder) { $control_input.attr('placeholder', settings.placeholder); } + // if splitOn was not passed in, construct it from the delimiter to allow pasting universally + if (!self.settings.splitOn && self.settings.delimiter) { + var delimiterEscaped = self.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + self.settings.splitOn = new RegExp('\\s*' + delimiterEscaped + '+\\s*'); + } + + if ($input.attr('autocorrect')) { + $control_input.attr('autocorrect', $input.attr('autocorrect')); + } + + if ($input.attr('autocapitalize')) { + $control_input.attr('autocapitalize', $input.attr('autocapitalize')); + } + self.$wrapper = $wrapper; self.$control = $control; self.$control_input = $control_input; @@ -1174,7 +1224,7 @@ self.$dropdown_content = $dropdown_content; $dropdown.on('mouseenter', '[data-selectable]', function() { return self.onOptionHover.apply(self, arguments); }); - $dropdown.on('mousedown', '[data-selectable]', function() { return self.onOptionSelect.apply(self, arguments); }); + $dropdown.on('mousedown click', '[data-selectable]', function() { return self.onOptionSelect.apply(self, arguments); }); watchChildEvent($control, 'mousedown', '*:not(input)', function() { return self.onItemSelect.apply(self, arguments); }); autoGrow($control_input); @@ -1190,7 +1240,8 @@ keypress : function() { return self.onKeyPress.apply(self, arguments); }, resize : function() { self.positionDropdown.apply(self, []); }, blur : function() { return self.onBlur.apply(self, arguments); }, - focus : function() { return self.onFocus.apply(self, arguments); } + focus : function() { self.ignoreBlur = false; return self.onFocus.apply(self, arguments); }, + paste : function() { return self.onPaste.apply(self, arguments); } }); $document.on('keydown' + eventNS, function(e) { @@ -1213,7 +1264,7 @@ } // blur on click outside if (!self.$control.has(e.target).length && e.target !== self.$control[0]) { - self.blur(); + self.blur(e.target); } } }); @@ -1230,11 +1281,11 @@ // store original children and tab index so that they can be // restored when the destroy() method is called. this.revertSettings = { - $children : self.$input.children().detach(), - tabindex : self.$input.attr('tabindex') + $children : $input.children().detach(), + tabindex : $input.attr('tabindex') }; - self.$input.attr('tabindex', -1).hide().after(self.$wrapper); + $input.attr('tabindex', -1).hide().after(self.$wrapper); if ($.isArray(settings.items)) { self.setValue(settings.items); @@ -1242,8 +1293,8 @@ } // feature detect for the validation API - if (self.$input[0].validity) { - self.$input.on('invalid' + eventNS, function(e) { + if (SUPPORTS_VALIDITY_API) { + $input.on('invalid' + eventNS, function(e) { e.preventDefault(); self.isInvalid = true; self.refreshState(); @@ -1256,17 +1307,21 @@ self.updatePlaceholder(); self.isSetup = true; - if (self.$input.is(':disabled')) { + if ($input.is(':disabled')) { self.disable(); } self.on('change', this.onChange); + + $input.data('selectize', self); + $input.addClass('selectized'); self.trigger('initialize'); // preload options - if (settings.preload) { + if (settings.preload === true) { self.onSearchChange(''); } + }, /** @@ -1304,17 +1359,23 @@ */ setupCallbacks: function() { var key, fn, callbacks = { - 'initialize' : 'onInitialize', - 'change' : 'onChange', - 'item_add' : 'onItemAdd', - 'item_remove' : 'onItemRemove', - 'clear' : 'onClear', - 'option_add' : 'onOptionAdd', - 'option_remove' : 'onOptionRemove', - 'option_clear' : 'onOptionClear', - 'dropdown_open' : 'onDropdownOpen', - 'dropdown_close' : 'onDropdownClose', - 'type' : 'onType' + 'initialize' : 'onInitialize', + 'change' : 'onChange', + 'item_add' : 'onItemAdd', + 'item_remove' : 'onItemRemove', + 'clear' : 'onClear', + 'option_add' : 'onOptionAdd', + 'option_remove' : 'onOptionRemove', + 'option_clear' : 'onOptionClear', + 'optgroup_add' : 'onOptionGroupAdd', + 'optgroup_remove' : 'onOptionGroupRemove', + 'optgroup_clear' : 'onOptionGroupClear', + 'dropdown_open' : 'onDropdownOpen', + 'dropdown_close' : 'onDropdownClose', + 'type' : 'onType', + 'load' : 'onLoad', + 'focus' : 'onFocus', + 'blur' : 'onBlur' }; for (key in callbacks) { @@ -1387,6 +1448,30 @@ this.$input.trigger('change'); }, + /** + * Triggered on paste. + * + * @param {object} e + * @returns {boolean} + */ + onPaste: function(e) { + var self = this; + if (self.isFull() || self.isInputHidden || self.isLocked) { + e.preventDefault(); + } else { + // If a regex or string is included, this will split the pasted + // input and create Items for each separate value + if (self.settings.splitOn) { + setTimeout(function() { + var splitInput = $.trim(self.$control_input.val() || '').split(self.settings.splitOn); + for (var i = 0, n = splitInput.length; i < n; i++) { + self.createItem(splitInput[i]); + } + }, 0); + } + } + }, + /** * Triggered on keypress. * @@ -1396,7 +1481,7 @@ onKeyPress: function(e) { if (this.isLocked) return e && e.preventDefault(); var character = String.fromCharCode(e.keyCode || e.which); - if (this.settings.create && character === this.settings.delimiter) { + if (this.settings.create && this.settings.mode === 'multi' && character === this.settings.delimiter) { this.createItem(); e.preventDefault(); return false; @@ -1428,8 +1513,14 @@ } break; case KEY_ESC: - self.close(); + if (self.isOpen) { + e.preventDefault(); + e.stopPropagation(); + self.close(); + } return; + case KEY_N: + if (!e.ctrlKey || e.altKey) break; case KEY_DOWN: if (!self.isOpen && self.hasOptions) { self.open(); @@ -1440,6 +1531,8 @@ } e.preventDefault(); return; + case KEY_P: + if (!e.ctrlKey || e.altKey) break; case KEY_UP: if (self.$activeOption) { self.ignoreHover = true; @@ -1451,8 +1544,8 @@ case KEY_RETURN: if (self.isOpen && self.$activeOption) { self.onOptionSelect({currentTarget: self.$activeOption}); + e.preventDefault(); } - e.preventDefault(); return; case KEY_LEFT: self.advanceSelection(-1, e); @@ -1461,6 +1554,15 @@ self.advanceSelection(1, e); return; case KEY_TAB: + if (self.settings.selectOnTab && self.isOpen && self.$activeOption) { + self.onOptionSelect({currentTarget: self.$activeOption}); + + // Default behaviour is to jump to the next field, we only want this + // if the current field doesn't accept any more entries + if (!self.isFull()) { + e.preventDefault(); + } + } if (self.settings.create && self.createItem()) { e.preventDefault(); } @@ -1470,7 +1572,8 @@ self.deleteSelection(e); return; } - if (self.isFull() || self.isInputHidden) { + + if ((self.isFull() || self.isInputHidden) && !(IS_MAC ? e.metaKey : e.ctrlKey)) { e.preventDefault(); return; } @@ -1522,8 +1625,8 @@ */ onFocus: function(e) { var self = this; + var wasFocused = self.isFocused; - self.isFocused = true; if (self.isDisabled) { self.blur(); e && e.preventDefault(); @@ -1531,8 +1634,11 @@ } if (self.ignoreFocus) return; + self.isFocused = true; if (self.settings.preload === 'focus') self.onSearchChange(''); + if (!wasFocused) self.trigger('focus'); + if (!self.$activeItems.length) { self.showInput(); self.setActiveItem(null); @@ -1546,23 +1652,43 @@ * Triggered on blur. * * @param {object} e - * @returns {boolean} + * @param {Element} dest */ - onBlur: function(e) { + onBlur: function(e, dest) { var self = this; + if (!self.isFocused) return; self.isFocused = false; - if (self.ignoreFocus) return; - if (self.settings.create && self.settings.createOnBlur) { - self.createItem(); + if (self.ignoreFocus) { + return; + } else if (!self.ignoreBlur && document.activeElement === self.$dropdown_content[0]) { + // necessary to prevent IE closing the dropdown when the scrollbar is clicked + self.ignoreBlur = true; + self.onFocus(e); + return; } - self.close(); - self.setTextboxValue(''); - self.setActiveItem(null); - self.setActiveOption(null); - self.setCaret(self.items.length); - self.refreshState(); + var deactivate = function() { + self.close(); + self.setTextboxValue(''); + self.setActiveItem(null); + self.setActiveOption(null); + self.setCaret(self.items.length); + self.refreshState(); + + // IE11 bug: element still marked as active + (dest || document.body).focus(); + + self.ignoreFocus = false; + self.trigger('blur'); + }; + + self.ignoreFocus = true; + if (self.settings.create && self.settings.createOnBlur) { + self.createItem(null, false, deactivate); + } else { + deactivate(); + } }, /** @@ -1594,14 +1720,20 @@ $target = $(e.currentTarget); if ($target.hasClass('create')) { - self.createItem(); + self.createItem(null, function() { + if (self.settings.closeAfterSelect) { + self.close(); + } + }); } else { value = $target.attr('data-value'); - if (value) { + if (typeof value !== 'undefined') { self.lastQuery = null; self.setTextboxValue(''); self.addItem(value); - if (!self.settings.hideSelected && e.type && /mouse/.test(e.type)) { + if (self.settings.closeAfterSelect) { + self.close(); + } else if (!self.settings.hideSelected && e.type && /mouse/.test(e.type)) { self.setActiveOption(self.getOption(value)); } } @@ -1634,7 +1766,7 @@ */ load: function(fn) { var self = this; - var $wrapper = self.$wrapper.addClass('loading'); + var $wrapper = self.$wrapper.addClass(self.settings.loadingClass); self.loading++; fn.apply(self, [function(results) { @@ -1644,7 +1776,7 @@ self.refreshOptions(self.isFocused && !self.isInputHidden); } if (!self.loading) { - $wrapper.removeClass('loading'); + $wrapper.removeClass(self.settings.loadingClass); } self.trigger('load', results); }]); @@ -1656,8 +1788,12 @@ * @param {string} value */ setTextboxValue: function(value) { - this.$control_input.val(value).triggerHandler('update'); - this.lastValue = value; + var $input = this.$control_input; + var changed = $input.val() !== value; + if (changed) { + $input.val(value).triggerHandler('update'); + this.lastValue = value; + } }, /** @@ -1681,13 +1817,12 @@ * * @param {mixed} value */ - setValue: function(value) { - debounce_events(this, ['change'], function() { - this.clear(); - var items = $.isArray(value) ? value : [value]; - for (var i = 0, n = items.length; i < n; i++) { - this.addItem(items[i]); - } + setValue: function(value, silent) { + var events = silent ? [] : ['change']; + + debounce_events(this, events, function() { + this.clear(silent); + this.addItems(value, silent); }); }, @@ -1799,12 +1934,15 @@ * Selects all items (CTRL + A). */ selectAll: function() { - this.$activeItems = Array.prototype.slice.apply(this.$control.children(':not(input)').addClass('active')); - if (this.$activeItems.length) { - this.hideInput(); - this.close(); + var self = this; + if (self.settings.mode === 'single') return; + + self.$activeItems = Array.prototype.slice.apply(self.$control.children(':not(input)').addClass('active')); + if (self.$activeItems.length) { + self.hideInput(); + self.close(); } - this.focus(); + self.focus(); }, /** @@ -1828,11 +1966,7 @@ }, /** - * Gives the control focus. If "trigger" is falsy, - * focus handlers won't be fired--causing the focus - * to happen silently in the background. - * - * @param {boolean} trigger + * Gives the control focus. */ focus: function() { var self = this; @@ -1848,9 +1982,12 @@ /** * Forces the control out of focus. + * + * @param {Element} dest */ - blur: function() { - this.$control_input.trigger('blur'); + blur: function(dest) { + this.$control_input[0].blur(); + this.onBlur(null, dest); }, /** @@ -1877,7 +2014,7 @@ var settings = this.settings; var sort = settings.sortField; if (typeof sort === 'string') { - sort = {field: sort}; + sort = [{field: sort}]; } return { @@ -1951,7 +2088,7 @@ } var self = this; - var query = self.$control_input.val(); + var query = $.trim(self.$control_input.val()); var results = self.search(query); var $dropdown_content = self.$dropdown_content; var active_before = self.$activeOption && hash_key(self.$activeOption.attr('data-value')); @@ -1964,15 +2101,7 @@ // render and group available options individually groups = {}; - - if (self.settings.optgroupOrder) { - groups_order = self.settings.optgroupOrder; - for (i = 0; i < groups_order.length; i++) { - groups[groups_order[i]] = []; - } - } else { - groups_order = []; - } + groups_order = []; for (i = 0; i < n; i++) { option = self.options[results.items[i].id]; @@ -1993,6 +2122,15 @@ } } + // sort optgroups + if (this.settings.lockOptgroupOrder) { + groups_order.sort(function(a, b) { + var a_order = self.optgroups[a].$order || 0; + var b_order = self.optgroups[b].$order || 0; + return a_order - b_order; + }); + } + // render optgroup headers & join groups html = []; for (i = 0, n = groups_order.length; i < n; i++) { @@ -2027,7 +2165,7 @@ } // add create option - has_create_option = self.settings.create && results.query.length; + has_create_option = self.canCreate(query); if (has_create_option) { $dropdown_content.prepend(self.render('option_create', {input: query})); $create = $($dropdown_content[0].childNodes[0]); @@ -2071,10 +2209,10 @@ * * this.addOption(data) * - * @param {object} data + * @param {object|array} data */ addOption: function(data) { - var i, n, optgroup, value, self = this; + var i, n, value, self = this; if ($.isArray(data)) { for (i = 0, n = data.length; i < n; i++) { @@ -2083,13 +2221,40 @@ return; } - value = hash_key(data[self.settings.valueField]); - if (!value || self.options.hasOwnProperty(value)) return; + if (value = self.registerOption(data)) { + self.userOptions[value] = true; + self.lastQuery = null; + self.trigger('option_add', value, data); + } + }, - self.userOptions[value] = true; - self.options[value] = data; - self.lastQuery = null; - self.trigger('option_add', value, data); + /** + * Registers an option to the pool of options. + * + * @param {object} data + * @return {boolean|string} + */ + registerOption: function(data) { + var key = hash_key(data[this.settings.valueField]); + if (!key || this.options.hasOwnProperty(key)) return false; + data.$order = data.$order || ++this.order; + this.options[key] = data; + return key; + }, + + /** + * Registers an option group to the pool of option groups. + * + * @param {object} data + * @return {boolean|string} + */ + registerOptionGroup: function(data) { + var key = hash_key(data[this.settings.optgroupValueField]); + if (!key) return false; + + data.$order = data.$order || ++this.order; + this.optgroups[key] = data; + return key; }, /** @@ -2100,8 +2265,32 @@ * @param {object} data */ addOptionGroup: function(id, data) { - this.optgroups[id] = data; - this.trigger('optgroup_add', id, data); + data[this.settings.optgroupValueField] = id; + if (id = this.registerOptionGroup(data)) { + this.trigger('optgroup_add', id, data); + } + }, + + /** + * Removes an existing option group. + * + * @param {string} id + */ + removeOptionGroup: function(id) { + if (this.optgroups.hasOwnProperty(id)) { + delete this.optgroups[id]; + this.renderCache = {}; + this.trigger('optgroup_remove', id); + } + }, + + /** + * Clears all existing option groups. + */ + clearOptionGroups: function() { + this.optgroups = {}; + this.renderCache = {}; + this.trigger('optgroup_clear'); }, /** @@ -2115,14 +2304,17 @@ updateOption: function(value, data) { var self = this; var $item, $item_new; - var value_new, index_item, cache_items, cache_options; + var value_new, index_item, cache_items, cache_options, order_old; value = hash_key(value); value_new = hash_key(data[self.settings.valueField]); // sanity checks + if (value === null) return; if (!self.options.hasOwnProperty(value)) return; - if (!value_new) throw new Error('Value must be set in option data'); + if (typeof value_new !== 'string') throw new Error('Value must be set in option data'); + + order_old = self.options[value].$order; // update references if (value_new !== value) { @@ -2132,17 +2324,18 @@ self.items.splice(index_item, 1, value_new); } } + data.$order = data.$order || order_old; self.options[value_new] = data; // invalidate render cache cache_items = self.renderCache['item']; cache_options = self.renderCache['option']; - if (isset(cache_items)) { + if (cache_items) { delete cache_items[value]; delete cache_items[value_new]; } - if (isset(cache_options)) { + if (cache_options) { delete cache_options[value]; delete cache_options[value_new]; } @@ -2155,6 +2348,9 @@ $item.replaceWith($item_new); } + // invalidate last query because we might have updated the sortField + self.lastQuery = null; + // update dropdown contents if (self.isOpen) { self.refreshOptions(false); @@ -2165,16 +2361,22 @@ * Removes a single option. * * @param {string} value + * @param {boolean} silent */ - removeOption: function(value) { + removeOption: function(value, silent) { var self = this; - value = hash_key(value); + + var cache_items = self.renderCache['item']; + var cache_options = self.renderCache['option']; + if (cache_items) delete cache_items[value]; + if (cache_options) delete cache_options[value]; + delete self.userOptions[value]; delete self.options[value]; self.lastQuery = null; self.trigger('option_remove', value); - self.removeItem(value); + self.removeItem(value, silent); }, /** @@ -2185,6 +2387,7 @@ self.loadedSearches = {}; self.userOptions = {}; + self.renderCache = {}; self.options = self.sifter.items = {}; self.lastQuery = null; self.trigger('option_clear'); @@ -2228,7 +2431,7 @@ getElementWithValue: function(value, $els) { value = hash_key(value); - if (value) { + if (typeof value !== 'undefined' && value !== null) { for (var i = 0, n = $els.length; i < n; i++) { if ($els[i].getAttribute('data-value') === value) { return $($els[i]); @@ -2250,18 +2453,36 @@ return this.getElementWithValue(value, this.$control.children()); }, + /** + * "Selects" multiple items at once. Adds them to the list + * at the current caret position. + * + * @param {string} value + * @param {boolean} silent + */ + addItems: function(values, silent) { + var items = $.isArray(values) ? values : [values]; + for (var i = 0, n = items.length; i < n; i++) { + this.isPending = (i < n - 1); + this.addItem(items[i], silent); + } + }, + /** * "Selects" an item. Adds it to the list * at the current caret position. * * @param {string} value + * @param {boolean} silent */ - addItem: function(value) { - debounce_events(this, ['change'], function() { - var $item, $option; + addItem: function(value, silent) { + var events = silent ? [] : ['change']; + + debounce_events(this, events, function() { + var $item, $option, $options; var self = this; var inputMode = self.settings.mode; - var i, active, options, value_next; + var i, active, value_next, wasFull; value = hash_key(value); if (self.items.indexOf(value) !== -1) { @@ -2270,27 +2491,32 @@ } if (!self.options.hasOwnProperty(value)) return; - if (inputMode === 'single') self.clear(); + if (inputMode === 'single') self.clear(silent); if (inputMode === 'multi' && self.isFull()) return; $item = $(self.render('item', self.options[value])); + wasFull = self.isFull(); self.items.splice(self.caretPos, 0, value); self.insertAtCaret($item); - self.refreshState(); + if (!self.isPending || (!wasFull && self.isFull())) { + self.refreshState(); + } if (self.isSetup) { - options = self.$dropdown_content.find('[data-selectable]'); - - // update menu / remove the option - $option = self.getOption(value); - value_next = self.getAdjacentOption($option, 1).attr('data-value'); - self.refreshOptions(self.isFocused && inputMode !== 'single'); - if (value_next) { - self.setActiveOption(self.getOption(value_next)); + $options = self.$dropdown_content.find('[data-selectable]'); + + // update menu / remove the option (if this is not one item being added as part of series) + if (!self.isPending) { + $option = self.getOption(value); + value_next = self.getAdjacentOption($option, 1).attr('data-value'); + self.refreshOptions(self.isFocused && inputMode !== 'single'); + if (value_next) { + self.setActiveOption(self.getOption(value_next)); + } } // hide the menu if the maximum number of items have been selected or no options are left - if (!options.length || (self.settings.maxItems !== null && self.items.length >= self.settings.maxItems)) { + if (!$options.length || self.isFull()) { self.close(); } else { self.positionDropdown(); @@ -2298,7 +2524,7 @@ self.updatePlaceholder(); self.trigger('item_add', value, $item); - self.updateOriginalInput(); + self.updateOriginalInput({silent: silent}); } }); }, @@ -2309,7 +2535,7 @@ * * @param {string} value */ - removeItem: function(value) { + removeItem: function(value, silent) { var self = this; var $item, i, idx; @@ -2327,7 +2553,7 @@ self.items.splice(i, 1); self.lastQuery = null; if (!self.settings.persist && self.userOptions.hasOwnProperty(value)) { - self.removeOption(value); + self.removeOption(value, silent); } if (i < self.caretPos) { @@ -2336,9 +2562,9 @@ self.refreshState(); self.updatePlaceholder(); - self.updateOriginalInput(); + self.updateOriginalInput({silent: silent}); self.positionDropdown(); - self.trigger('item_remove', value); + self.trigger('item_remove', value, $item); } }, @@ -2350,13 +2576,28 @@ * Once this completes, it will be added * to the item list. * + * @param {string} value + * @param {boolean} [triggerDropdown] + * @param {function} [callback] * @return {boolean} */ - createItem: function() { + createItem: function(input, triggerDropdown) { var self = this; - var input = $.trim(self.$control_input.val() || ''); var caret = self.caretPos; - if (!input.length) return false; + input = input || $.trim(self.$control_input.val() || ''); + + var callback = arguments[arguments.length - 1]; + if (typeof callback !== 'function') callback = function() {}; + + if (typeof triggerDropdown !== 'boolean') { + triggerDropdown = true; + } + + if (!self.canCreate(input)) { + callback(); + return false; + } + self.lock(); var setup = (typeof self.settings.create === 'function') ? this.settings.create : function(input) { @@ -2369,15 +2610,16 @@ var create = once(function(data) { self.unlock(); - if (!data || typeof data !== 'object') return; + if (!data || typeof data !== 'object') return callback(); var value = hash_key(data[self.settings.valueField]); - if (!value) return; + if (typeof value !== 'string') return callback(); self.setTextboxValue(''); self.addOption(data); self.setCaret(caret); self.addItem(value); - self.refreshOptions(self.settings.mode !== 'single'); + self.refreshOptions(triggerDropdown && self.settings.mode !== 'single'); + callback(data); }); var output = setup.apply(this, [input, create]); @@ -2395,9 +2637,7 @@ this.lastQuery = null; if (this.isSetup) { - for (var i = 0; i < this.items.length; i++) { - this.addItem(this.items); - } + this.addItem(this.items); } this.refreshState(); @@ -2409,10 +2649,11 @@ * and CSS classes. */ refreshState: function() { - var self = this; - var invalid = self.isRequired && !self.items.length; - if (!invalid) self.isInvalid = false; - self.$control_input.prop('required', invalid); + var invalid, self = this; + if (self.isRequired) { + if (self.items.length) self.isInvalid = false; + self.$control_input.prop('required', invalid); + } self.refreshClasses(); }, @@ -2456,13 +2697,15 @@ * Refreshes the original * element to reflect the current state. */ - updateOriginalInput: function() { - var i, n, options, self = this; + updateOriginalInput: function(opts) { + var i, n, options, label, self = this; + opts = opts || {}; - if (self.$input[0].tagName.toLowerCase() === 'select') { + if (self.tagType === TAG_SELECT) { options = []; for (i = 0, n = self.items.length; i < n; i++) { - options.push(''); + label = self.options[self.items[i]][self.settings.labelField] || ''; + options.push(''); } if (!options.length && !this.$input.attr('multiple')) { options.push(''); @@ -2470,10 +2713,13 @@ self.$input.html(options.join('')); } else { self.$input.val(self.getValue()); + self.$input.attr('value',self.$input.val()); } if (self.isSetup) { - self.trigger('change', self.$input.val()); + if (!opts.silent) { + self.trigger('change', self.$input.val()); + } } }, @@ -2490,7 +2736,7 @@ } else { $input.attr('placeholder', this.settings.placeholder); } - $input.triggerHandler('update'); + $input.triggerHandler('update', {force: true}); }, /** @@ -2548,16 +2794,20 @@ /** * Resets / clears all selected items * from the control. + * + * @param {boolean} silent */ - clear: function() { + clear: function(silent) { var self = this; if (!self.items.length) return; self.$control.children(':not(input)').remove(); self.items = []; + self.lastQuery = null; self.setCaret(0); + self.setActiveItem(null); self.updatePlaceholder(); - self.updateOriginalInput(); + self.updateOriginalInput({silent: silent}); self.refreshState(); self.showInput(); self.trigger('clear'); @@ -2633,6 +2883,7 @@ } self.showInput(); + self.positionDropdown(); self.refreshOptions(true); // select previous option @@ -2723,17 +2974,19 @@ i = Math.max(0, Math.min(self.items.length, i)); } - // the input must be moved by leaving it in place and moving the - // siblings, due to the fact that focus cannot be restored once lost - // on mobile webkit devices - var j, n, fn, $children, $child; - $children = self.$control.children(':not(input)'); - for (j = 0, n = $children.length; j < n; j++) { - $child = $($children[j]).detach(); - if (j < i) { - self.$control_input.before($child); - } else { - self.$control.append($child); + if(!self.isPending) { + // the input must be moved by leaving it in place and moving the + // siblings, due to the fact that focus cannot be restored once lost + // on mobile webkit devices + var j, n, fn, $children, $child; + $children = self.$control.children(':not(input)'); + for (j = 0, n = $children.length; j < n; j++) { + $child = $($children[j]).detach(); + if (j < i) { + self.$control_input.before($child); + } else { + self.$control.append($child); + } } } @@ -2765,6 +3018,7 @@ disable: function() { var self = this; self.$input.prop('disabled', true); + self.$control_input.prop('disabled', true).prop('tabindex', -1); self.isDisabled = true; self.lock(); }, @@ -2776,6 +3030,7 @@ enable: function() { var self = this; self.$input.prop('disabled', false); + self.$control_input.prop('disabled', false).prop('tabindex', self.tabIndex); self.isDisabled = false; self.unlock(); }, @@ -2799,9 +3054,13 @@ .html('') .append(revertSettings.$children) .removeAttr('tabindex') + .removeClass('selectized') .attr({tabindex: revertSettings.tabindex}) .show(); + self.$control_input.removeData('grow'); + self.$input.removeData('selectize'); + $(window).off(eventNS); $(document).off(eventNS); $(document.body).off(eventNS); @@ -2822,7 +3081,7 @@ var html = ''; var cache = false; var self = this; - var regex_tag = /^[\t ]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i; + var regex_tag = /^[\t \r\n]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i; if (templateName === 'option' || templateName === 'item') { value = hash_key(data[self.settings.valueField]); @@ -2860,6 +3119,39 @@ } return html; + }, + + /** + * Clears the render cache for a template. If + * no template is given, clears all render + * caches. + * + * @param {string} templateName + */ + clearCache: function(templateName) { + var self = this; + if (typeof templateName === 'undefined') { + self.renderCache = {}; + } else { + delete self.renderCache[templateName]; + } + }, + + /** + * Determines whether or not to display the + * create item prompt, given a user input. + * + * @param {string} input + * @return {boolean} + */ + canCreate: function(input) { + var self = this; + if (!self.settings.create) return false; + var filter = self.settings.createFilter; + return input.length + && (typeof filter !== 'function' || filter.apply(self, [input])) + && (typeof filter !== 'string' || new RegExp(filter).test(input)) + && (!(filter instanceof RegExp) || filter.test(input)); } }); @@ -2867,22 +3159,31 @@ Selectize.count = 0; Selectize.defaults = { + options: [], + optgroups: [], + plugins: [], delimiter: ',', + splitOn: null, // regexp or string for splitting up values from a paste command persist: true, diacritics: true, create: false, createOnBlur: false, + createFilter: null, highlight: true, openOnFocus: true, maxOptions: 1000, maxItems: null, hideSelected: null, addPrecedence: false, + selectOnTab: false, preload: false, + allowEmptyOption: false, + closeAfterSelect: false, scrollDuration: 60, loadThrottle: 300, + loadingClass: 'loading', dataAttr: 'data-data', optgroupField: 'optgroup', @@ -2890,7 +3191,7 @@ labelField: 'text', optgroupLabelField: 'label', optgroupValueField: 'value', - optgroupOrder: null, + lockOptgroupOrder: false, sortField: '$order', searchField: ['text'], @@ -2904,21 +3205,26 @@ dropdownParent: null, + copyClassesToDropdown: true, + /* - load : null, // function(query, callback) { ... } - score : null, // function(search) { ... } - onInitialize : null, // function() { ... } - onChange : null, // function(value) { ... } - onItemAdd : null, // function(value, $item) { ... } - onItemRemove : null, // function(value) { ... } - onClear : null, // function() { ... } - onOptionAdd : null, // function(value, data) { ... } - onOptionRemove : null, // function(value) { ... } - onOptionClear : null, // function() { ... } - onDropdownOpen : null, // function($dropdown) { ... } - onDropdownClose : null, // function($dropdown) { ... } - onType : null, // function(str) { ... } - onDelete : null, // function(values) { ... } + load : null, // function(query, callback) { ... } + score : null, // function(search) { ... } + onInitialize : null, // function() { ... } + onChange : null, // function(value) { ... } + onItemAdd : null, // function(value, $item) { ... } + onItemRemove : null, // function(value) { ... } + onClear : null, // function() { ... } + onOptionAdd : null, // function(value, data) { ... } + onOptionRemove : null, // function(value) { ... } + onOptionClear : null, // function() { ... } + onOptionGroupAdd : null, // function(id, data) { ... } + onOptionGroupRemove : null, // function(id) { ... } + onOptionGroupClear : null, // function() { ... } + onDropdownOpen : null, // function($dropdown) { ... } + onDropdownClose : null, // function($dropdown) { ... } + onType : null, // function(str) { ... } + onDelete : null, // function(values) { ... } */ render: { @@ -2932,6 +3238,7 @@ } }; + $.fn.selectize = function(settings_user) { var defaults = $.fn.selectize.defaults; var settings = $.extend({}, defaults, settings_user); @@ -2949,19 +3256,27 @@ * @param {object} settings_element */ var init_textbox = function($input, settings_element) { - var i, n, values, option, value = $.trim($input.val() || ''); - if (!value.length) return; + var i, n, values, option; - values = value.split(settings.delimiter); - for (i = 0, n = values.length; i < n; i++) { - option = {}; - option[field_label] = values[i]; - option[field_value] = values[i]; + var data_raw = $input.attr(attr_data); - settings_element.options[values[i]] = option; + if (!data_raw) { + var value = $.trim($input.val() || ''); + if (!settings.allowEmptyOption && !value.length) return; + values = value.split(settings.delimiter); + for (i = 0, n = values.length; i < n; i++) { + option = {}; + option[field_label] = values[i]; + option[field_value] = values[i]; + settings_element.options.push(option); + } + settings_element.items = values; + } else { + settings_element.options = JSON.parse(data_raw); + for (i = 0, n = settings_element.options.length; i < n; i++) { + settings_element.items.push(settings_element.options[i][field_value]); + } } - - settings_element.items = values; }; /** @@ -2973,6 +3288,7 @@ var init_select = function($input, settings_element) { var i, n, tagName, $children, order = 0; var options = settings_element.options; + var optionsMap = {}; var readData = function($el) { var data = attr_data && $el.attr(attr_data); @@ -2983,37 +3299,36 @@ }; var addOption = function($option, group) { - var value, option; - $option = $($option); - value = $option.attr('value') || ''; - if (!value.length) return; + var value = hash_key($option.attr('value')); + if (!value && !settings.allowEmptyOption) return; // if the option already exists, it's probably been // duplicated in another optgroup. in this case, push // the current group to the "optgroup" property on the // existing option so that it's rendered in both places. - if (options.hasOwnProperty(value)) { + if (optionsMap.hasOwnProperty(value)) { if (group) { - if (!options[value].optgroup) { - options[value].optgroup = group; - } else if (!$.isArray(options[value].optgroup)) { - options[value].optgroup = [options[value].optgroup, group]; + var arr = optionsMap[value][field_optgroup]; + if (!arr) { + optionsMap[value][field_optgroup] = group; + } else if (!$.isArray(arr)) { + optionsMap[value][field_optgroup] = [arr, group]; } else { - options[value].optgroup.push(group); + arr.push(group); } } return; } - option = readData($option) || {}; + var option = readData($option) || {}; option[field_label] = option[field_label] || $option.text(); option[field_value] = option[field_value] || value; option[field_optgroup] = option[field_optgroup] || group; - option.$order = ++order; - options[value] = option; + optionsMap[value] = option; + options.push(option); if ($option.is(':selected')) { settings_element.items.push(value); @@ -3030,7 +3345,7 @@ optgroup = readData($optgroup) || {}; optgroup[field_optgroup_label] = id; optgroup[field_optgroup_value] = id; - settings_element.optgroups[id] = optgroup; + settings_element.optgroups.push(optgroup); } $options = $('option', $optgroup); @@ -3058,10 +3373,15 @@ var instance; var $input = $(this); var tag_name = this.tagName.toLowerCase(); + var placeholder = $input.attr('placeholder') || $input.attr('data-placeholder'); + if (!placeholder && !settings.allowEmptyOption) { + placeholder = $input.children('option[value=""]').text(); + } + var settings_element = { - 'placeholder' : $input.children('option[value=""]').text() || $input.attr('placeholder'), - 'options' : {}, - 'optgroups' : {}, + 'placeholder' : placeholder, + 'options' : [], + 'optgroups' : [], 'items' : [] }; @@ -3072,12 +3392,14 @@ } instance = new Selectize($input, $.extend(true, {}, defaults, settings_element, settings_user)); - $input.data('selectize', instance); - $input.addClass('selectized'); }); }; $.fn.selectize.defaults = Selectize.defaults; + $.fn.selectize.support = { + validity: SUPPORTS_VALIDITY_API + }; + Selectize.define('drag_drop', function(options) { if (!$.fn.sortable) throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".'); @@ -3207,6 +3529,22 @@ }; })(); + var getScrollbarWidth = function() { + var div; + var width = getScrollbarWidth.width; + var doc = document; + + if (typeof width === 'undefined') { + div = doc.createElement('div'); + div.innerHTML = '
'; + div = div.firstChild; + doc.body.appendChild(div); + width = getScrollbarWidth.width = div.offsetWidth - div.clientWidth; + doc.body.removeChild(div); + } + return width; + }; + var equalizeSizes = function() { var i, n, height_max, width, width_last, width_parent, $optgroups; @@ -3223,7 +3561,7 @@ } if (options.equalizeWidth) { - width_parent = self.$dropdown_content.innerWidth(); + width_parent = self.$dropdown_content.innerWidth() - getScrollbarWidth(); width = Math.round(width_parent / n); $optgroups.css({width: width}); if (n > 1) { @@ -3284,7 +3622,7 @@ e.preventDefault(); if (self.isLocked) return; - var $item = $(e.target).parent(); + var $item = $(e.currentTarget).parent(); self.setActiveItem($item); if (self.deleteSelection()) { self.setCaret(self.items.length); @@ -3303,7 +3641,7 @@ return option[this.settings.labelField]; }; - this.onKeyDown = (function(e) { + this.onKeyDown = (function() { var original = self.onKeyDown; return function(e) { var index, option; @@ -3323,6 +3661,7 @@ }; })(); }); + return Selectize; })); \ No newline at end of file diff --git a/xadmin/static/xadmin/vendor/selectize/selectize.legacy.css b/xadmin/static/xadmin/vendor/selectize/selectize.legacy.css index fa85c09bf..0dccdb6cc 100644 --- a/xadmin/static/xadmin/vendor/selectize/selectize.legacy.css +++ b/xadmin/static/xadmin/vendor/selectize/selectize.legacy.css @@ -1,6 +1,6 @@ /** - * selectize.legacy.css (v0.8.4) - Default Theme - * Copyright (c) 2013 Brian Reavis & contributors + * selectize.legacy.css (v0.12.1) - Default Theme + * Copyright (c) 2013–2015 Brian Reavis & contributors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this * file except in compliance with the License. You may obtain a copy of the License at: @@ -13,354 +13,312 @@ * * @author Brian Reavis */ - .selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder { + visibility: visible !important; background: #f2f2f2 !important; background: rgba(0, 0, 0, 0.06) !important; border: 0 none !important; - visibility: visible !important; -webkit-box-shadow: inset 0 0 12px 4px #ffffff; - box-shadow: inset 0 0 12px 4px #ffffff; + box-shadow: inset 0 0 12px 4px #ffffff; } - .selectize-control.plugin-drag_drop .ui-sortable-placeholder::after { content: '!'; visibility: hidden; } - .selectize-control.plugin-drag_drop .ui-sortable-helper { -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); - box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); } - .selectize-dropdown-header { position: relative; padding: 7px 10px; - background: #f8f8f8; border-bottom: 1px solid #d0d0d0; + background: #f8f8f8; -webkit-border-radius: 3px 3px 0 0; - -moz-border-radius: 3px 3px 0 0; - border-radius: 3px 3px 0 0; + -moz-border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0; } - .selectize-dropdown-header-close { position: absolute; - top: 50%; right: 10px; - margin-top: -12px; - font-size: 20px !important; - line-height: 20px; + top: 50%; color: #303030; opacity: 0.4; + margin-top: -12px; + line-height: 20px; + font-size: 20px !important; } - .selectize-dropdown-header-close:hover { color: #000000; } - .selectize-dropdown.plugin-optgroup_columns .optgroup { - float: left; - border-top: 0 none; border-right: 1px solid #f2f2f2; + border-top: 0 none; + float: left; -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } - .selectize-dropdown.plugin-optgroup_columns .optgroup:last-child { border-right: 0 none; } - .selectize-dropdown.plugin-optgroup_columns .optgroup:before { display: none; } - .selectize-dropdown.plugin-optgroup_columns .optgroup-header { border-top: 0 none; } - .selectize-control.plugin-remove_button [data-value] { position: relative; padding-right: 24px !important; } - .selectize-control.plugin-remove_button [data-value] .remove { + z-index: 1; + /* fixes ie bug (see #392) */ position: absolute; top: 0; right: 0; bottom: 0; - display: inline-block; width: 17px; - padding: 1px 0 0 0; - font-size: 12px; + text-align: center; font-weight: bold; + font-size: 12px; color: inherit; - text-align: center; text-decoration: none; vertical-align: middle; + display: inline-block; + padding: 1px 0 0 0; border-left: 1px solid #74b21e; -webkit-border-radius: 0 2px 2px 0; - -moz-border-radius: 0 2px 2px 0; - border-radius: 0 2px 2px 0; + -moz-border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } - .selectize-control.plugin-remove_button [data-value] .remove:hover { background: rgba(0, 0, 0, 0.05); } - .selectize-control.plugin-remove_button [data-value].active .remove { border-left-color: #6f9839; } - .selectize-control.plugin-remove_button .disabled [data-value] .remove:hover { background: none; } - .selectize-control.plugin-remove_button .disabled [data-value] .remove { border-left-color: #b4b4b4; } - .selectize-control { position: relative; } - .selectize-dropdown, .selectize-input, .selectize-input input { + color: #303030; font-family: inherit; font-size: 13px; - -webkit-font-smoothing: inherit; line-height: 20px; - color: #303030; + -webkit-font-smoothing: inherit; } - .selectize-input, .selectize-control.single .selectize-input.input-active { - display: inline-block; - cursor: text; background: #ffffff; + cursor: text; + display: inline-block; } - .selectize-input { - position: relative; - z-index: 1; + border: 1px solid #d0d0d0; + padding: 10px 10px; display: inline-block; width: 100%; - padding: 10px 10px; overflow: hidden; - border: 1px solid #d0d0d0; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1); + position: relative; + z-index: 1; -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; } - .selectize-control.multi .selectize-input.has-items { padding: 8px 10px 4px; } - .selectize-input.full { background-color: #f2f2f2; } - .selectize-input.disabled, .selectize-input.disabled * { cursor: default !important; } - .selectize-input.focus { -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); } - .selectize-input.dropdown-active { -webkit-border-radius: 3px 3px 0 0; - -moz-border-radius: 3px 3px 0 0; - border-radius: 3px 3px 0 0; + -moz-border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0; } - .selectize-input > * { + vertical-align: baseline; display: -moz-inline-stack; display: inline-block; - *display: inline; - vertical-align: baseline; zoom: 1; + *display: inline; } - .selectize-control.multi .selectize-input > div { - padding: 1px 5px; - margin: 0 4px 4px 0; - color: #3d5d18; cursor: pointer; + margin: 0 4px 4px 0; + padding: 1px 5px; background: #b8e76f; + color: #3d5d18; border: 1px solid #74b21e; } - .selectize-control.multi .selectize-input > div.active { - color: #303030; background: #92c836; + color: #303030; border: 1px solid #6f9839; } - .selectize-control.multi .selectize-input.disabled > div, .selectize-control.multi .selectize-input.disabled > div.active { color: #878787; background: #f8f8f8; border: 1px solid #b4b4b4; } - .selectize-input > input { - max-width: 100% !important; - max-height: none !important; - min-height: 0 !important; + display: inline-block !important; padding: 0 !important; + min-height: 0 !important; + max-height: none !important; + max-width: 100% !important; margin: 0 2px 0 0 !important; - line-height: inherit !important; text-indent: 0 !important; - background: none !important; border: 0 none !important; - -webkit-box-shadow: none !important; - box-shadow: none !important; + background: none !important; + line-height: inherit !important; -webkit-user-select: auto !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; +} +.selectize-input > input::-ms-clear { + display: none; } - .selectize-input > input:focus { outline: none !important; } - .selectize-input::after { + content: ' '; display: block; clear: left; - content: ' '; } - .selectize-input.dropdown-active::before { + content: ' '; + display: block; position: absolute; - right: 0; + background: #f0f0f0; + height: 1px; bottom: 0; left: 0; - display: block; - height: 1px; - background: #f0f0f0; - content: ' '; + right: 0; } - .selectize-dropdown { position: absolute; z-index: 10; - margin: -1px 0 0 0; - background: #ffffff; border: 1px solid #d0d0d0; + background: #ffffff; + margin: -1px 0 0 0; border-top: 0 none; - -webkit-border-radius: 0 0 3px 3px; - -moz-border-radius: 0 0 3px 3px; - border-radius: 0 0 3px 3px; - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; } - .selectize-dropdown [data-selectable] { - overflow: hidden; cursor: pointer; + overflow: hidden; } - .selectize-dropdown [data-selectable] .highlight { background: rgba(255, 237, 40, 0.4); -webkit-border-radius: 1px; - -moz-border-radius: 1px; - border-radius: 1px; + -moz-border-radius: 1px; + border-radius: 1px; } - .selectize-dropdown [data-selectable], .selectize-dropdown .optgroup-header { padding: 7px 10px; } - .selectize-dropdown .optgroup:first-child .optgroup-header { border-top: 0 none; } - .selectize-dropdown .optgroup-header { color: #303030; - cursor: default; background: #f8f8f8; + cursor: default; } - .selectize-dropdown .active { - color: #303030; background-color: #fffceb; + color: #303030; } - .selectize-dropdown .active.create { color: #303030; } - .selectize-dropdown .create { color: rgba(48, 48, 48, 0.5); } - .selectize-dropdown-content { - max-height: 200px; - overflow-x: hidden; overflow-y: auto; + overflow-x: hidden; + max-height: 200px; } - .selectize-control.single .selectize-input, .selectize-control.single .selectize-input input { cursor: pointer; } - .selectize-control.single .selectize-input.input-active, .selectize-control.single .selectize-input.input-active input { cursor: text; } - .selectize-control.single .selectize-input:after { + content: ' '; + display: block; position: absolute; top: 50%; right: 15px; - display: block; + margin-top: -3px; width: 0; height: 0; - margin-top: -3px; - border-color: #808080 transparent transparent transparent; border-style: solid; border-width: 5px 5px 0 5px; - content: ' '; + border-color: #808080 transparent transparent transparent; } - .selectize-control.single .selectize-input.dropdown-active:after { margin-top: -4px; - border-color: transparent transparent #808080 transparent; border-width: 0 5px 5px 5px; + border-color: transparent transparent #808080 transparent; } - .selectize-control.rtl.single .selectize-input:after { - right: auto; left: 15px; + right: auto; } - .selectize-control.rtl .selectize-input > input { margin: 0 4px 0 -2px !important; } - .selectize-control .selectize-input.disabled { - background-color: #fafafa; opacity: 0.5; + background-color: #fafafa; } - .selectize-control.multi .selectize-input [data-value] { text-shadow: 0 1px 0 rgba(255, 255, 255, 0.1); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; background-color: #b2e567; background-image: -moz-linear-gradient(top, #b8e76f, #a9e25c); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b8e76f), to(#a9e25c)); @@ -368,14 +326,10 @@ background-image: -o-linear-gradient(top, #b8e76f, #a9e25c); background-image: linear-gradient(to bottom, #b8e76f, #a9e25c); background-repeat: repeat-x; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffb8e76f', endColorstr='#ffa9e25c', GradientType=0); -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); } - .selectize-control.multi .selectize-input [data-value].active { background-color: #88c332; background-image: -moz-linear-gradient(top, #92c836, #7abc2c); @@ -386,8 +340,9 @@ background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff92c836', endColorstr='#ff7abc2c', GradientType=0); } - .selectize-control.single .selectize-input { + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 2px 0 #e0e0e0, 0 3px 0 #c8c8c8, 0 4px 1px rgba(0,0,0,0.1); + box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 2px 0 #e0e0e0, 0 3px 0 #c8c8c8, 0 4px 1px rgba(0,0,0,0.1); background-color: #f3f3f3; background-image: -moz-linear-gradient(top, #f5f5f5, #efefef); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#efefef)); @@ -396,18 +351,14 @@ background-image: linear-gradient(to bottom, #f5f5f5, #efefef); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffefefef', GradientType=0); - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 0 #e0e0e0, 0 3px 0 #c8c8c8, 0 4px 1px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 0 #e0e0e0, 0 3px 0 #c8c8c8, 0 4px 1px rgba(0, 0, 0, 0.1); } - .selectize-control.single .selectize-input, .selectize-dropdown.single { border-color: #b8b8b8; } - .selectize-dropdown .optgroup-header { - font-size: 0.8em; font-weight: bold; - border-top: 1px solid #f0f0f0; + font-size: 0.8em; border-bottom: 1px solid #f0f0f0; -} \ No newline at end of file + border-top: 1px solid #f0f0f0; +} diff --git a/xadmin/static/xadmin/vendor/selectize/selectize.min.js b/xadmin/static/xadmin/vendor/selectize/selectize.min.js index 622fcacc3..fe955bc00 100644 --- a/xadmin/static/xadmin/vendor/selectize/selectize.min.js +++ b/xadmin/static/xadmin/vendor/selectize/selectize.min.js @@ -1,3 +1,3 @@ -/*! selectize.js - v0.8.4 | https://github.com/brianreavis/selectize.js | Apache License (v2) */ -!function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.Sifter=b()}(this,function(){var a=function(a,b){this.items=a,this.settings=b||{diacritics:!0}};a.prototype.tokenize=function(a){if(a=d(String(a||"").toLowerCase()),!a||!a.length)return[];var b,c,f,h,i=[],j=a.split(/ +/);for(b=0,c=j.length;c>b;b++){if(f=e(j[b]),this.settings.diacritics)for(h in g)g.hasOwnProperty(h)&&(f=f.replace(new RegExp(h,"g"),g[h]));i.push({string:j[b],regex:new RegExp(f,"i")})}return i},a.prototype.iterator=function(a,b){var c;c=f(a)?Array.prototype.forEach||function(a){for(var b=0,c=this.length;c>b;b++)a(this[b],b,this)}:function(a){for(var b in this)this.hasOwnProperty(b)&&a(this[b],b,this)},c.apply(a,[b])},a.prototype.getScoreFunction=function(a,b){var c,d,e,f;c=this,a=c.prepareSearch(a,b),e=a.tokens,d=a.options.fields,f=e.length;var g=function(a,b){var c,d;return a?(a=String(a||""),d=a.search(b.regex),-1===d?0:(c=b.string.length/a.length,0===d&&(c+=.5),c)):0},h=function(){var a=d.length;return a?1===a?function(a,b){return g(b[d[0]],a)}:function(b,c){for(var e=0,f=0;a>e;e++)f+=g(c[d[e]],b);return f/a}:function(){return 0}}();return f?1===f?function(a){return h(e[0],a)}:"and"===a.options.conjunction?function(a){for(var b,c=0,d=0;f>c;c++){if(b=h(e[c],a),0>=b)return 0;d+=b}return d/f}:function(a){for(var b=0,c=0;f>b;b++)c+=h(e[b],a);return c/f}:function(){return 0}},a.prototype.getSortFunction=function(a,c){var d,e,f,g,h,i,j,k,l,m,n;if(f=this,a=f.prepareSearch(a,c),n=!a.query&&c.sort_empty||c.sort,l=function(a,b){return"$score"===a?b.score:f.items[b.id][a]},h=[],n)for(d=0,e=n.length;e>d;d++)(a.query||"$score"!==n[d].field)&&h.push(n[d]);if(a.query){for(m=!0,d=0,e=h.length;e>d;d++)if("$score"===h[d].field){m=!1;break}m&&h.unshift({field:"$score",direction:"desc"})}else for(d=0,e=h.length;e>d;d++)if("$score"===h[d].field){h.splice(d,1);break}for(k=[],d=0,e=h.length;e>d;d++)k.push("desc"===h[d].direction?-1:1);return i=h.length,i?1===i?(g=h[0].field,j=k[0],function(a,c){return j*b(l(g,a),l(g,c))}):function(a,c){var d,e,f;for(d=0;i>d;d++)if(f=h[d].field,e=k[d]*b(l(f,a),l(f,c)))return e;return 0}:null},a.prototype.prepareSearch=function(a,b){if("object"==typeof a)return a;b=c({},b);var d=b.fields,e=b.sort,g=b.sort_empty;return d&&!f(d)&&(b.fields=[d]),e&&!f(e)&&(b.sort=[e]),g&&!f(g)&&(b.sort_empty=[g]),{options:b,query:String(a||"").toLowerCase(),tokens:this.tokenize(a),total:0,items:[]}},a.prototype.search=function(a,b){var c,d,e,f,g=this;return d=this.prepareSearch(a,b),b=d.options,a=d.query,f=b.score||g.getScoreFunction(d),a.length?g.iterator(g.items,function(a,e){c=f(a),(b.filter===!1||c>0)&&d.items.push({score:c,id:e})}):g.iterator(g.items,function(a,b){d.items.push({score:1,id:b})}),e=g.getSortFunction(d,b),e&&d.items.sort(e),d.total=d.items.length,"number"==typeof b.limit&&(d.items=d.items.slice(0,b.limit)),d};var b=function(a,b){return"number"==typeof a&&"number"==typeof b?a>b?1:b>a?-1:0:(a=String(a||"").toLowerCase(),b=String(b||"").toLowerCase(),a>b?1:b>a?-1:0)},c=function(a){var b,c,d,e;for(b=1,c=arguments.length;c>b;b++)if(e=arguments[b])for(d in e)e.hasOwnProperty(d)&&(a[d]=e[d]);return a},d=function(a){return(a+"").replace(/^\s+|\s+$|/g,"")},e=function(a){return(a+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},f=Array.isArray||$&&$.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)},g={a:"[aÀÁÂÃÄÅàáâãäå]",c:"[cÇçćĆčČ]",d:"[dđĐ]",e:"[eÈÉÊËèéêë]",i:"[iÌÍÎÏìíîï]",n:"[nÑñ]",o:"[oÒÓÔÕÕÖØòóôõöø]",s:"[sŠš]",u:"[uÙÚÛÜùúûü]",y:"[yŸÿý]",z:"[zŽž]"};return a}),function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.MicroPlugin=b()}(this,function(){var a={};a.mixin=function(a){a.plugins={},a.prototype.initializePlugins=function(a){var c,d,e,f=this,g=[];if(f.plugins={names:[],settings:{},requested:{},loaded:{}},b.isArray(a))for(c=0,d=a.length;d>c;c++)"string"==typeof a[c]?g.push(a[c]):(f.plugins.settings[a[c].name]=a[c].options,g.push(a[c].name));else if(a)for(e in a)a.hasOwnProperty(e)&&(f.plugins.settings[e]=a[e],g.push(e));for(;g.length;)f.require(g.shift())},a.prototype.loadPlugin=function(b){var c=this,d=c.plugins,e=a.plugins[b];if(!a.plugins.hasOwnProperty(b))throw new Error('Unable to find "'+b+'" plugin');d.requested[b]=!0,d.loaded[b]=e.fn.apply(c,[c.plugins.settings[b]||{}]),d.names.push(b)},a.prototype.require=function(a){var b=this,c=b.plugins;if(!b.plugins.loaded.hasOwnProperty(a)){if(c.requested[a])throw new Error('Plugin has circular dependency ("'+a+'")');b.loadPlugin(a)}return c.loaded[a]},a.define=function(b,c){a.plugins[b]={name:b,fn:c}}};var b={isArray:Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)}};return a}),function(a,b){"function"==typeof define&&define.amd?define(["jquery","sifter","microplugin"],b):a.Selectize=b(a.jQuery,a.Sifter,a.MicroPlugin)}(this,function(a,b,c){"use strict";var d=function(a,b){if("string"!=typeof b||b.length){var c="string"==typeof b?new RegExp(b,"i"):b,d=function(a){var b=0;if(3===a.nodeType){var e=a.data.search(c);if(e>=0&&a.data.length>0){var f=a.data.match(c),g=document.createElement("span");g.className="highlight";var h=a.splitText(e);h.splitText(f[0].length);var i=h.cloneNode(!0);g.appendChild(i),h.parentNode.replaceChild(g,h),b=1}}else if(1===a.nodeType&&a.childNodes&&!/(script|style)/i.test(a.tagName))for(var j=0;j/g,">").replace(/"/g,""")},y=function(a){return(a+"").replace(/\$/g,"$$$$")},z={};z.before=function(a,b,c){var d=a[b];a[b]=function(){return c.apply(a,arguments),d.apply(a,arguments)}},z.after=function(a,b,c){var d=a[b];a[b]=function(){var b=d.apply(a,arguments);return c.apply(a,arguments),b}};var A=function(b,c){if(!a.isArray(c))return c;var d,e,f={};for(d=0,e=c.length;e>d;d++)c[d].hasOwnProperty(b)&&(f[c[d][b]]=c[d]);return f},B=function(a){var b=!1;return function(){b||(b=!0,a.apply(this,arguments))}},C=function(a,b){var c;return function(){var d=this,e=arguments;window.clearTimeout(c),c=window.setTimeout(function(){a.apply(d,e)},b)}},D=function(a,b,c){var d,e=a.trigger,f={};a.trigger=function(){var c=arguments[0];return-1===b.indexOf(c)?e.apply(a,arguments):(f[c]=arguments,void 0)},c.apply(a,[]),a.trigger=e;for(d in f)f.hasOwnProperty(d)&&e.apply(a,f[d])},E=function(a,b,c,d){a.on(b,c,function(b){for(var c=b.target;c&&c.parentNode!==a[0];)c=c.parentNode;return b.currentTarget=c,d.apply(this,[b])})},F=function(a){var b={};if("selectionStart"in a)b.start=a.selectionStart,b.length=a.selectionEnd-b.start;else if(document.selection){a.focus();var c=document.selection.createRange(),d=document.selection.createRange().text.length;c.moveStart("character",-a.value.length),b.start=c.text.length-d,b.length=d}return b},G=function(a,b,c){var d,e,f={};if(c)for(d=0,e=c.length;e>d;d++)f[c[d]]=a.css(c[d]);else f=a.css();b.css(f)},H=function(b,c){var d=a("").css({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).text(b).appendTo("body");G(c,d,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]);var e=d.width();return d.remove(),e},I=function(a){var b=function(b){var c,d,e,f,g,h,i,j;b=b||window.event||{},b.metaKey||b.altKey||a.data("grow")!==!1&&(c=a.val(),b.type&&"keydown"===b.type.toLowerCase()&&(d=b.keyCode,e=d>=97&&122>=d||d>=65&&90>=d||d>=48&&57>=d||32===d,d===o||d===n?(j=F(a[0]),j.length?c=c.substring(0,j.start)+c.substring(j.start+j.length):d===n&&j.start?c=c.substring(0,j.start-1)+c.substring(j.start+1):d===o&&"undefined"!=typeof j.start&&(c=c.substring(0,j.start)+c.substring(j.start+1))):e&&(h=b.shiftKey,i=String.fromCharCode(b.keyCode),i=h?i.toUpperCase():i.toLowerCase(),c+=i)),f=a.attr("placeholder")||"",!c.length&&f.length&&(c=f),g=H(c,a)+4,g!==a.width()&&(a.width(g),a.triggerHandler("resize")))};a.on("keydown keyup update blur",b),b()},J=function(c,d){var e,f,g=this;f=c[0],f.selectize=g,e=window.getComputedStyle?window.getComputedStyle(f,null).getPropertyValue("direction"):f.currentStyle&&f.currentStyle.direction,e=e||c.parents("[dir]:first").attr("dir")||"",a.extend(g,{settings:d,$input:c,tagType:"select"===f.tagName.toLowerCase()?t:u,rtl:/rtl/i.test(e),eventNS:".selectize"+ ++J.count,highlightedValue:null,isOpen:!1,isDisabled:!1,isRequired:c.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:C(g.onSearchChange,d.loadThrottle)}),g.sifter=new b(this.options,{diacritics:d.diacritics}),a.extend(g.options,A(d.valueField,d.options)),delete g.settings.options,a.extend(g.optgroups,A(d.optgroupValueField,d.optgroups)),delete g.settings.optgroups,g.settings.mode=g.settings.mode||(1===g.settings.maxItems?"single":"multi"),"boolean"!=typeof g.settings.hideSelected&&(g.settings.hideSelected="multi"===g.settings.mode),g.initializePlugins(g.settings.plugins),g.setupCallbacks(),g.setupTemplates(),g.setup()};return e.mixin(J),c.mixin(J),a.extend(J.prototype,{setup:function(){var b,c,d,e,g,h,i,j,k,l,m=this,n=m.settings,o=m.eventNS,s=a(window),u=a(document);i=m.settings.mode,j=m.$input.attr("tabindex")||"",k=m.$input.attr("class")||"",b=a("
").addClass(n.wrapperClass).addClass(k).addClass(i),c=a("
").addClass(n.inputClass).addClass("items").appendTo(b),d=a('').appendTo(c).attr("tabindex",j),h=a(n.dropdownParent||b),e=a("
").addClass(n.dropdownClass).addClass(k).addClass(i).hide().appendTo(h),g=a("
").addClass(n.dropdownContentClass).appendTo(e),b.css({width:m.$input[0].style.width}),m.plugins.names.length&&(l="plugin-"+m.plugins.names.join(" plugin-"),b.addClass(l),e.addClass(l)),(null===n.maxItems||n.maxItems>1)&&m.tagType===t&&m.$input.attr("multiple","multiple"),m.settings.placeholder&&d.attr("placeholder",n.placeholder),m.$wrapper=b,m.$control=c,m.$control_input=d,m.$dropdown=e,m.$dropdown_content=g,e.on("mouseenter","[data-selectable]",function(){return m.onOptionHover.apply(m,arguments)}),e.on("mousedown","[data-selectable]",function(){return m.onOptionSelect.apply(m,arguments)}),E(c,"mousedown","*:not(input)",function(){return m.onItemSelect.apply(m,arguments)}),I(d),c.on({mousedown:function(){return m.onMouseDown.apply(m,arguments)},click:function(){return m.onClick.apply(m,arguments)}}),d.on({mousedown:function(a){a.stopPropagation()},keydown:function(){return m.onKeyDown.apply(m,arguments)},keyup:function(){return m.onKeyUp.apply(m,arguments)},keypress:function(){return m.onKeyPress.apply(m,arguments)},resize:function(){m.positionDropdown.apply(m,[])},blur:function(){return m.onBlur.apply(m,arguments)},focus:function(){return m.onFocus.apply(m,arguments)}}),u.on("keydown"+o,function(a){m.isCmdDown=a[f?"metaKey":"ctrlKey"],m.isCtrlDown=a[f?"altKey":"ctrlKey"],m.isShiftDown=a.shiftKey}),u.on("keyup"+o,function(a){a.keyCode===r&&(m.isCtrlDown=!1),a.keyCode===p&&(m.isShiftDown=!1),a.keyCode===q&&(m.isCmdDown=!1)}),u.on("mousedown"+o,function(a){if(m.isFocused){if(a.target===m.$dropdown[0]||a.target.parentNode===m.$dropdown[0])return!1;m.$control.has(a.target).length||a.target===m.$control[0]||m.blur()}}),s.on(["scroll"+o,"resize"+o].join(" "),function(){m.isOpen&&m.positionDropdown.apply(m,arguments)}),s.on("mousemove"+o,function(){m.ignoreHover=!1}),this.revertSettings={$children:m.$input.children().detach(),tabindex:m.$input.attr("tabindex")},m.$input.attr("tabindex",-1).hide().after(m.$wrapper),a.isArray(n.items)&&(m.setValue(n.items),delete n.items),m.$input[0].validity&&m.$input.on("invalid"+o,function(a){a.preventDefault(),m.isInvalid=!0,m.refreshState()}),m.updateOriginalInput(),m.refreshItems(),m.refreshState(),m.updatePlaceholder(),m.isSetup=!0,m.$input.is(":disabled")&&m.disable(),m.on("change",this.onChange),m.trigger("initialize"),n.preload&&m.onSearchChange("")},setupTemplates:function(){var b=this,c=b.settings.labelField,d=b.settings.optgroupLabelField,e={optgroup:function(a){return'
'+a.html+"
"},optgroup_header:function(a,b){return'
'+b(a[d])+"
"},option:function(a,b){return'
'+b(a[c])+"
"},item:function(a,b){return'
'+b(a[c])+"
"},option_create:function(a,b){return'
Add '+b(a.input)+"
"}};b.settings.render=a.extend({},e,b.settings.render)},setupCallbacks:function(){var a,b,c={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType"};for(a in c)c.hasOwnProperty(a)&&(b=this.settings[c[a]],b&&this.on(a,b))},onClick:function(a){var b=this;b.isFocused||(b.focus(),a.preventDefault())},onMouseDown:function(b){var c=this,d=b.isDefaultPrevented();if(a(b.target),c.isFocused){if(b.target!==c.$control_input[0])return"single"===c.settings.mode?c.isOpen?c.close():c.open():d||c.setActiveItem(null),!1}else d||window.setTimeout(function(){c.focus()},0)},onChange:function(){this.$input.trigger("change")},onKeyPress:function(a){if(this.isLocked)return a&&a.preventDefault();var b=String.fromCharCode(a.keyCode||a.which);return this.settings.create&&b===this.settings.delimiter?(this.createItem(),a.preventDefault(),!1):void 0},onKeyDown:function(a){a.target===this.$control_input[0];var b=this;if(b.isLocked)return a.keyCode!==s&&a.preventDefault(),void 0;switch(a.keyCode){case g:if(b.isCmdDown)return b.selectAll(),void 0;break;case i:return b.close(),void 0;case m:if(!b.isOpen&&b.hasOptions)b.open();else if(b.$activeOption){b.ignoreHover=!0;var c=b.getAdjacentOption(b.$activeOption,1);c.length&&b.setActiveOption(c,!0,!0)}return a.preventDefault(),void 0;case k:if(b.$activeOption){b.ignoreHover=!0;var d=b.getAdjacentOption(b.$activeOption,-1);d.length&&b.setActiveOption(d,!0,!0)}return a.preventDefault(),void 0;case h:return b.isOpen&&b.$activeOption&&b.onOptionSelect({currentTarget:b.$activeOption}),a.preventDefault(),void 0;case j:return b.advanceSelection(-1,a),void 0;case l:return b.advanceSelection(1,a),void 0;case s:return b.settings.create&&b.createItem()&&a.preventDefault(),void 0;case n:case o:return b.deleteSelection(a),void 0}return b.isFull()||b.isInputHidden?(a.preventDefault(),void 0):void 0},onKeyUp:function(a){var b=this;if(b.isLocked)return a&&a.preventDefault();var c=b.$control_input.val()||"";b.lastValue!==c&&(b.lastValue=c,b.onSearchChange(c),b.refreshOptions(),b.trigger("type",c))},onSearchChange:function(a){var b=this,c=b.settings.load;c&&(b.loadedSearches.hasOwnProperty(a)||(b.loadedSearches[a]=!0,b.load(function(d){c.apply(b,[a,d])})))},onFocus:function(a){var b=this;return b.isFocused=!0,b.isDisabled?(b.blur(),a&&a.preventDefault(),!1):(b.ignoreFocus||("focus"===b.settings.preload&&b.onSearchChange(""),b.$activeItems.length||(b.showInput(),b.setActiveItem(null),b.refreshOptions(!!b.settings.openOnFocus)),b.refreshState()),void 0)},onBlur:function(){var a=this;a.isFocused=!1,a.ignoreFocus||(a.settings.create&&a.settings.createOnBlur&&a.createItem(),a.close(),a.setTextboxValue(""),a.setActiveItem(null),a.setActiveOption(null),a.setCaret(a.items.length),a.refreshState())},onOptionHover:function(a){this.ignoreHover||this.setActiveOption(a.currentTarget,!1)},onOptionSelect:function(b){var c,d,e=this;b.preventDefault&&(b.preventDefault(),b.stopPropagation()),d=a(b.currentTarget),d.hasClass("create")?e.createItem():(c=d.attr("data-value"),c&&(e.lastQuery=null,e.setTextboxValue(""),e.addItem(c),!e.settings.hideSelected&&b.type&&/mouse/.test(b.type)&&e.setActiveOption(e.getOption(c))))},onItemSelect:function(a){var b=this;b.isLocked||"multi"===b.settings.mode&&(a.preventDefault(),b.setActiveItem(a.currentTarget,a))},load:function(a){var b=this,c=b.$wrapper.addClass("loading");b.loading++,a.apply(b,[function(a){b.loading=Math.max(b.loading-1,0),a&&a.length&&(b.addOption(a),b.refreshOptions(b.isFocused&&!b.isInputHidden)),b.loading||c.removeClass("loading"),b.trigger("load",a)}])},setTextboxValue:function(a){this.$control_input.val(a).triggerHandler("update"),this.lastValue=a},getValue:function(){return this.tagType===t&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(b){D(this,["change"],function(){this.clear();for(var c=a.isArray(b)?b:[b],d=0,e=c.length;e>d;d++)this.addItem(c[d])})},setActiveItem:function(b,c){var d,e,f,g,h,i,j,k,l=this;if("single"!==l.settings.mode){if(b=a(b),!b.length)return a(l.$activeItems).removeClass("active"),l.$activeItems=[],l.isFocused&&l.showInput(),void 0;if(d=c&&c.type.toLowerCase(),"mousedown"===d&&l.isShiftDown&&l.$activeItems.length){for(k=l.$control.children(".active:last"),g=Array.prototype.indexOf.apply(l.$control[0].childNodes,[k[0]]),h=Array.prototype.indexOf.apply(l.$control[0].childNodes,[b[0]]),g>h&&(j=g,g=h,h=j),e=g;h>=e;e++)i=l.$control[0].childNodes[e],-1===l.$activeItems.indexOf(i)&&(a(i).addClass("active"),l.$activeItems.push(i));c.preventDefault()}else"mousedown"===d&&l.isCtrlDown||"keydown"===d&&this.isShiftDown?b.hasClass("active")?(f=l.$activeItems.indexOf(b[0]),l.$activeItems.splice(f,1),b.removeClass("active")):l.$activeItems.push(b.addClass("active")[0]):(a(l.$activeItems).removeClass("active"),l.$activeItems=[b.addClass("active")[0]]);l.hideInput(),this.isFocused||l.focus()}},setActiveOption:function(b,c,d){var e,f,g,h,i,j=this;j.$activeOption&&j.$activeOption.removeClass("active"),j.$activeOption=null,b=a(b),b.length&&(j.$activeOption=b.addClass("active"),(c||!v(c))&&(e=j.$dropdown_content.height(),f=j.$activeOption.outerHeight(!0),c=j.$dropdown_content.scrollTop()||0,g=j.$activeOption.offset().top-j.$dropdown_content.offset().top+c,h=g,i=g-e+f,g+f>e+c?j.$dropdown_content.stop().animate({scrollTop:i},d?j.settings.scrollDuration:0):c>g&&j.$dropdown_content.stop().animate({scrollTop:h},d?j.settings.scrollDuration:0)))},selectAll:function(){this.$activeItems=Array.prototype.slice.apply(this.$control.children(":not(input)").addClass("active")),this.$activeItems.length&&(this.hideInput(),this.close()),this.focus()},hideInput:function(){var a=this;a.setTextboxValue(""),a.$control_input.css({opacity:0,position:"absolute",left:a.rtl?1e4:-1e4}),a.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1,position:"relative",left:0}),this.isInputHidden=!1},focus:function(){var a=this;a.isDisabled||(a.ignoreFocus=!0,a.$control_input[0].focus(),window.setTimeout(function(){a.ignoreFocus=!1,a.onFocus()},0))},blur:function(){this.$control_input.trigger("blur")},getScoreFunction:function(a){return this.sifter.getScoreFunction(a,this.getSearchOptions())},getSearchOptions:function(){var a=this.settings,b=a.sortField;return"string"==typeof b&&(b={field:b}),{fields:a.searchField,conjunction:a.searchConjunction,sort:b}},search:function(b){var c,d,e,f=this,g=f.settings,h=this.getSearchOptions();if(g.score&&(e=f.settings.score.apply(this,[b]),"function"!=typeof e))throw new Error('Selectize "score" setting must be a function that returns a function');if(b!==f.lastQuery?(f.lastQuery=b,d=f.sifter.search(b,a.extend(h,{score:e})),f.currentResults=d):d=a.extend(!0,{},f.currentResults),g.hideSelected)for(c=d.items.length-1;c>=0;c--)-1!==f.items.indexOf(w(d.items[c].id))&&d.items.splice(c,1);return d},refreshOptions:function(b){var c,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;"undefined"==typeof b&&(b=!0);var t=this,u=t.$control_input.val(),v=t.search(u),x=t.$dropdown_content,y=t.$activeOption&&w(t.$activeOption.attr("data-value"));if(g=v.items.length,"number"==typeof t.settings.maxOptions&&(g=Math.min(g,t.settings.maxOptions)),h={},t.settings.optgroupOrder)for(i=t.settings.optgroupOrder,c=0;cc;c++)for(j=t.options[v.items[c].id],k=t.render("option",j),l=j[t.settings.optgroupField]||"",m=a.isArray(l)?l:[l],e=0,f=m&&m.length;f>e;e++)l=m[e],t.optgroups.hasOwnProperty(l)||(l=""),h.hasOwnProperty(l)||(h[l]=[],i.push(l)),h[l].push(k);for(n=[],c=0,g=i.length;g>c;c++)l=i[c],t.optgroups.hasOwnProperty(l)&&h[l].length?(o=t.render("optgroup_header",t.optgroups[l])||"",o+=h[l].join(""),n.push(t.render("optgroup",a.extend({},t.optgroups[l],{html:o})))):n.push(h[l].join(""));if(x.html(n.join("")),t.settings.highlight&&v.query.length&&v.tokens.length)for(c=0,g=v.tokens.length;g>c;c++)d(x,v.tokens[c].regex);if(!t.settings.hideSelected)for(c=0,g=t.items.length;g>c;c++)t.getOption(t.items[c]).addClass("selected");p=t.settings.create&&v.query.length,p&&(x.prepend(t.render("option_create",{input:u})),s=a(x[0].childNodes[0])),t.hasOptions=v.items.length>0||p,t.hasOptions?(v.items.length>0?(r=y&&t.getOption(y),r&&r.length?q=r:"single"===t.settings.mode&&t.items.length&&(q=t.getOption(t.items[0])),q&&q.length||(q=s&&!t.settings.addPrecedence?t.getAdjacentOption(s,1):x.find("[data-selectable]:first"))):q=s,t.setActiveOption(q),b&&!t.isOpen&&t.open()):(t.setActiveOption(null),b&&t.isOpen&&t.close())},addOption:function(b){var c,d,e,f=this;if(a.isArray(b))for(c=0,d=b.length;d>c;c++)f.addOption(b[c]);else e=w(b[f.settings.valueField]),e&&!f.options.hasOwnProperty(e)&&(f.userOptions[e]=!0,f.options[e]=b,f.lastQuery=null,f.trigger("option_add",e,b))},addOptionGroup:function(a,b){this.optgroups[a]=b,this.trigger("optgroup_add",a,b)},updateOption:function(b,c){var d,e,f,g,h,i,j=this;if(b=w(b),f=w(c[j.settings.valueField]),j.options.hasOwnProperty(b)){if(!f)throw new Error("Value must be set in option data");f!==b&&(delete j.options[b],g=j.items.indexOf(b),-1!==g&&j.items.splice(g,1,f)),j.options[f]=c,h=j.renderCache.item,i=j.renderCache.option,v(h)&&(delete h[b],delete h[f]),v(i)&&(delete i[b],delete i[f]),-1!==j.items.indexOf(f)&&(d=j.getItem(b),e=a(j.render("item",c)),d.hasClass("active")&&e.addClass("active"),d.replaceWith(e)),j.isOpen&&j.refreshOptions(!1)}},removeOption:function(a){var b=this;a=w(a),delete b.userOptions[a],delete b.options[a],b.lastQuery=null,b.trigger("option_remove",a),b.removeItem(a)},clearOptions:function(){var a=this;a.loadedSearches={},a.userOptions={},a.options=a.sifter.items={},a.lastQuery=null,a.trigger("option_clear"),a.clear()},getOption:function(a){return this.getElementWithValue(a,this.$dropdown_content.find("[data-selectable]"))},getAdjacentOption:function(b,c){var d=this.$dropdown.find("[data-selectable]"),e=d.index(b)+c;return e>=0&&ed;d++)if(c[d].getAttribute("data-value")===b)return a(c[d]);return a()},getItem:function(a){return this.getElementWithValue(a,this.$control.children())},addItem:function(b){D(this,["change"],function(){var c,d,e,f,g=this,h=g.settings.mode;return b=w(b),-1!==g.items.indexOf(b)?("single"===h&&g.close(),void 0):(g.options.hasOwnProperty(b)&&("single"===h&&g.clear(),"multi"===h&&g.isFull()||(c=a(g.render("item",g.options[b])),g.items.splice(g.caretPos,0,b),g.insertAtCaret(c),g.refreshState(),g.isSetup&&(e=g.$dropdown_content.find("[data-selectable]"),d=g.getOption(b),f=g.getAdjacentOption(d,1).attr("data-value"),g.refreshOptions(g.isFocused&&"single"!==h),f&&g.setActiveOption(g.getOption(f)),!e.length||null!==g.settings.maxItems&&g.items.length>=g.settings.maxItems?g.close():g.positionDropdown(),g.updatePlaceholder(),g.trigger("item_add",b,c),g.updateOriginalInput()))),void 0)})},removeItem:function(a){var b,c,d,e=this;b="object"==typeof a?a:e.getItem(a),a=w(b.attr("data-value")),c=e.items.indexOf(a),-1!==c&&(b.remove(),b.hasClass("active")&&(d=e.$activeItems.indexOf(b[0]),e.$activeItems.splice(d,1)),e.items.splice(c,1),e.lastQuery=null,!e.settings.persist&&e.userOptions.hasOwnProperty(a)&&e.removeOption(a),c0),b.$control_input.data("grow",!c&&!d)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(){var a,b,c,d=this;if("select"===d.$input[0].tagName.toLowerCase()){for(c=[],a=0,b=d.items.length;b>a;a++)c.push('');c.length||this.$input.attr("multiple")||c.push(''),d.$input.html(c.join(""))}else d.$input.val(d.getValue());d.isSetup&&d.trigger("change",d.$input.val())},updatePlaceholder:function(){if(this.settings.placeholder){var a=this.$control_input;this.items.length?a.removeAttr("placeholder"):a.attr("placeholder",this.settings.placeholder),a.triggerHandler("update")}},open:function(){var a=this;a.isLocked||a.isOpen||"multi"===a.settings.mode&&a.isFull()||(a.focus(),a.isOpen=!0,a.refreshState(),a.$dropdown.css({visibility:"hidden",display:"block"}),a.positionDropdown(),a.$dropdown.css({visibility:"visible"}),a.trigger("dropdown_open",a.$dropdown))},close:function(){var a=this,b=a.isOpen;"single"===a.settings.mode&&a.items.length&&a.hideInput(),a.isOpen=!1,a.$dropdown.hide(),a.setActiveOption(null),a.refreshState(),b&&a.trigger("dropdown_close",a.$dropdown)},positionDropdown:function(){var a=this.$control,b="body"===this.settings.dropdownParent?a.offset():a.position();b.top+=a.outerHeight(!0),this.$dropdown.css({width:a.outerWidth(),top:b.top,left:b.left})},clear:function(){var a=this;a.items.length&&(a.$control.children(":not(input)").remove(),a.items=[],a.setCaret(0),a.updatePlaceholder(),a.updateOriginalInput(),a.refreshState(),a.showInput(),a.trigger("clear"))},insertAtCaret:function(b){var c=Math.min(this.caretPos,this.items.length);0===c?this.$control.prepend(b):a(this.$control[0].childNodes[c]).before(b),this.setCaret(c+1)},deleteSelection:function(b){var c,d,e,f,g,h,i,j,k,l=this;if(e=b&&b.keyCode===n?-1:1,f=F(l.$control_input[0]),l.$activeOption&&!l.settings.hideSelected&&(i=l.getAdjacentOption(l.$activeOption,-1).attr("data-value")),g=[],l.$activeItems.length){for(k=l.$control.children(".active:"+(e>0?"last":"first")),h=l.$control.children(":not(input)").index(k),e>0&&h++,c=0,d=l.$activeItems.length;d>c;c++)g.push(a(l.$activeItems[c]).attr("data-value"));b&&(b.preventDefault(),b.stopPropagation())}else(l.isFocused||"single"===l.settings.mode)&&l.items.length&&(0>e&&0===f.start&&0===f.length?g.push(l.items[l.caretPos-1]):e>0&&f.start===l.$control_input.val().length&&g.push(l.items[l.caretPos]));if(!g.length||"function"==typeof l.settings.onDelete&&l.settings.onDelete.apply(l,[g])===!1)return!1;for("undefined"!=typeof h&&l.setCaret(h);g.length;)l.removeItem(g.pop());return l.showInput(),l.refreshOptions(!0),i&&(j=l.getOption(i),j.length&&l.setActiveOption(j)),!0},advanceSelection:function(a,b){var c,d,e,f,g,h,i=this;0!==a&&(i.rtl&&(a*=-1),c=a>0?"last":"first",d=F(i.$control_input[0]),i.isFocused&&!i.isInputHidden?(f=i.$control_input.val().length,g=0>a?0===d.start&&0===d.length:d.start===f,g&&!f&&i.advanceCaret(a,b)):(h=i.$control.children(".active:"+c),h.length&&(e=i.$control.children(":not(input)").index(h),i.setActiveItem(null),i.setCaret(a>0?e+1:e))))},advanceCaret:function(a,b){var c,d,e=this;0!==a&&(c=a>0?"next":"prev",e.isShiftDown?(d=e.$control_input[c](),d.length&&(e.hideInput(),e.setActiveItem(d),b&&b.preventDefault())):e.setCaret(e.caretPos+a))},setCaret:function(b){var c=this;b="single"===c.settings.mode?c.items.length:Math.max(0,Math.min(c.items.length,b));var d,e,f,g;for(f=c.$control.children(":not(input)"),d=0,e=f.length;e>d;d++)g=a(f[d]).detach(),b>d?c.$control_input.before(g):c.$control.append(g);c.caretPos=b},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){var a=this;a.$input.prop("disabled",!0),a.isDisabled=!0,a.lock()},enable:function(){var a=this;a.$input.prop("disabled",!1),a.isDisabled=!1,a.unlock()},destroy:function(){var b=this,c=b.eventNS,d=b.revertSettings;b.trigger("destroy"),b.off(),b.$wrapper.remove(),b.$dropdown.remove(),b.$input.html("").append(d.$children).removeAttr("tabindex").attr({tabindex:d.tabindex}).show(),a(window).off(c),a(document).off(c),a(document.body).off(c),delete b.$input[0].selectize},render:function(a,b){var c,d,e="",f=!1,g=this,h=/^[\t ]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;return("option"===a||"item"===a)&&(c=w(b[g.settings.valueField]),f=!!c),f&&(v(g.renderCache[a])||(g.renderCache[a]={}),g.renderCache[a].hasOwnProperty(c))?g.renderCache[a][c]:(e=g.settings.render[a].apply(this,[b,x]),("option"===a||"option_create"===a)&&(e=e.replace(h,"<$1 data-selectable")),"optgroup"===a&&(d=b[g.settings.optgroupValueField]||"",e=e.replace(h,'<$1 data-group="'+y(x(d))+'"')),("option"===a||"item"===a)&&(e=e.replace(h,'<$1 data-value="'+y(x(c||""))+'"')),f&&(g.renderCache[a][c]=e),e)}}),J.count=0,J.defaults={plugins:[],delimiter:",",persist:!0,diacritics:!0,create:!1,createOnBlur:!1,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,preload:!1,scrollDuration:60,loadThrottle:300,dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",optgroupLabelField:"label",optgroupValueField:"value",optgroupOrder:null,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"selectize-control",inputClass:"selectize-input",dropdownClass:"selectize-dropdown",dropdownContentClass:"selectize-dropdown-content",dropdownParent:null,render:{}},a.fn.selectize=function(b){var c=a.fn.selectize.defaults,d=a.extend({},c,b),e=d.dataAttr,f=d.labelField,g=d.valueField,h=d.optgroupField,i=d.optgroupLabelField,j=d.optgroupValueField,k=function(b,c){var e,h,i,j,k=a.trim(b.val()||""); -if(k.length){for(i=k.split(d.delimiter),e=0,h=i.length;h>e;e++)j={},j[f]=i[e],j[g]=i[e],c.options[i[e]]=j;c.items=i}},l=function(b,c){var d,k,l,m,n=0,o=c.options,p=function(a){var b=e&&a.attr(e);return"string"==typeof b&&b.length?JSON.parse(b):null},q=function(b,d){var e,i;if(b=a(b),e=b.attr("value")||"",e.length){if(o.hasOwnProperty(e))return d&&(o[e].optgroup?a.isArray(o[e].optgroup)?o[e].optgroup.push(d):o[e].optgroup=[o[e].optgroup,d]:o[e].optgroup=d),void 0;i=p(b)||{},i[f]=i[f]||b.text(),i[g]=i[g]||e,i[h]=i[h]||d,i.$order=++n,o[e]=i,b.is(":selected")&&c.items.push(e)}},r=function(b){var d,e,f,g,h;for(b=a(b),f=b.attr("label"),f&&(g=p(b)||{},g[i]=f,g[j]=f,c.optgroups[f]=g),h=a("option",b),d=0,e=h.length;e>d;d++)q(h[d],f)};for(c.maxItems=b.attr("multiple")?null:1,m=b.children(),d=0,k=m.length;k>d;d++)l=m[d].tagName.toLowerCase(),"optgroup"===l?r(m[d]):"option"===l&&q(m[d])};return this.each(function(){if(!this.selectize){var d,e=a(this),f=this.tagName.toLowerCase(),g={placeholder:e.children('option[value=""]').text()||e.attr("placeholder"),options:{},optgroups:{},items:[]};"select"===f?l(e,g):k(e,g),d=new J(e,a.extend(!0,{},c,g,b)),e.data("selectize",d),e.addClass("selectized")}})},a.fn.selectize.defaults=J.defaults,J.define("drag_drop",function(){if(!a.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===this.settings.mode){var b=this;b.lock=function(){var a=b.lock;return function(){var c=b.$control.data("sortable");return c&&c.disable(),a.apply(b,arguments)}}(),b.unlock=function(){var a=b.unlock;return function(){var c=b.$control.data("sortable");return c&&c.enable(),a.apply(b,arguments)}}(),b.setup=function(){var c=b.setup;return function(){c.apply(this,arguments);var d=b.$control.sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:b.isLocked,start:function(a,b){b.placeholder.css("width",b.helper.css("width")),d.css({overflow:"visible"})},stop:function(){d.css({overflow:"hidden"});var c=b.$activeItems?b.$activeItems.slice():null,e=[];d.children("[data-value]").each(function(){e.push(a(this).attr("data-value"))}),b.setValue(e),b.setActiveItem(c)}})}}()}}),J.define("dropdown_header",function(b){var c=this;b=a.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(a){return'
'+'
'+''+a.title+""+'×'+"
"+"
"}},b),c.setup=function(){var d=c.setup;return function(){d.apply(c,arguments),c.$dropdown_header=a(b.html(b)),c.$dropdown.prepend(c.$dropdown_header)}}()}),J.define("optgroup_columns",function(b){var c=this;b=a.extend({equalizeWidth:!0,equalizeHeight:!0},b),this.getAdjacentOption=function(b,c){var d=b.closest("[data-group]").find("[data-selectable]"),e=d.index(b)+c;return e>=0&&ed;d++)f=Math.max(f,j.eq(d).height());j.css({height:f})}b.equalizeWidth&&(i=c.$dropdown_content.innerWidth(),g=Math.round(i/e),j.css({width:g}),e>1&&(h=i-g*(e-1),j.eq(e-1).css({width:h})))}};(b.equalizeHeight||b.equalizeWidth)&&(z.after(this,"positionDropdown",d),z.after(this,"refreshOptions",d))}),J.define("remove_button",function(b){if("single"!==this.settings.mode){b=a.extend({label:"×",title:"Remove",className:"remove",append:!0},b);var c=this,d=''+b.label+"",e=function(a,b){var c=a.search(/(<\/[^>]+>\s*)$/);return a.substring(0,c)+b+a.substring(c)};this.setup=function(){var f=c.setup;return function(){if(b.append){var g=c.settings.render.item;c.settings.render.item=function(){return e(g.apply(this,arguments),d)}}f.apply(this,arguments),this.$control.on("click","."+b.className,function(b){if(b.preventDefault(),!c.isLocked){var d=a(b.target).parent();c.setActiveItem(d),c.deleteSelection()&&c.setCaret(c.items.length)}})}}()}}),J.define("restore_on_backspace",function(a){var b=this;a.text=a.text||function(a){return a[this.settings.labelField]},this.onKeyDown=function(){var c=b.onKeyDown;return function(b){var d,e;return b.keyCode===n&&""===this.$control_input.val()&&!this.$activeItems.length&&(d=this.caretPos-1,d>=0&&db;b++){if(f=e(j[b]),this.settings.diacritics)for(h in g)g.hasOwnProperty(h)&&(f=f.replace(new RegExp(h,"g"),g[h]));i.push({string:j[b],regex:new RegExp(f,"i")})}return i},a.prototype.iterator=function(a,b){var c;c=f(a)?Array.prototype.forEach||function(a){for(var b=0,c=this.length;c>b;b++)a(this[b],b,this)}:function(a){for(var b in this)this.hasOwnProperty(b)&&a(this[b],b,this)},c.apply(a,[b])},a.prototype.getScoreFunction=function(a,b){var c,d,e,f;c=this,a=c.prepareSearch(a,b),e=a.tokens,d=a.options.fields,f=e.length;var g=function(a,b){var c,d;return a?(a=String(a||""),d=a.search(b.regex),-1===d?0:(c=b.string.length/a.length,0===d&&(c+=.5),c)):0},h=function(){var a=d.length;return a?1===a?function(a,b){return g(b[d[0]],a)}:function(b,c){for(var e=0,f=0;a>e;e++)f+=g(c[d[e]],b);return f/a}:function(){return 0}}();return f?1===f?function(a){return h(e[0],a)}:"and"===a.options.conjunction?function(a){for(var b,c=0,d=0;f>c;c++){if(b=h(e[c],a),0>=b)return 0;d+=b}return d/f}:function(a){for(var b=0,c=0;f>b;b++)c+=h(e[b],a);return c/f}:function(){return 0}},a.prototype.getSortFunction=function(a,c){var d,e,f,g,h,i,j,k,l,m,n;if(f=this,a=f.prepareSearch(a,c),n=!a.query&&c.sort_empty||c.sort,l=function(a,b){return"$score"===a?b.score:f.items[b.id][a]},h=[],n)for(d=0,e=n.length;e>d;d++)(a.query||"$score"!==n[d].field)&&h.push(n[d]);if(a.query){for(m=!0,d=0,e=h.length;e>d;d++)if("$score"===h[d].field){m=!1;break}m&&h.unshift({field:"$score",direction:"desc"})}else for(d=0,e=h.length;e>d;d++)if("$score"===h[d].field){h.splice(d,1);break}for(k=[],d=0,e=h.length;e>d;d++)k.push("desc"===h[d].direction?-1:1);return i=h.length,i?1===i?(g=h[0].field,j=k[0],function(a,c){return j*b(l(g,a),l(g,c))}):function(a,c){var d,e,f;for(d=0;i>d;d++)if(f=h[d].field,e=k[d]*b(l(f,a),l(f,c)))return e;return 0}:null},a.prototype.prepareSearch=function(a,b){if("object"==typeof a)return a;b=c({},b);var d=b.fields,e=b.sort,g=b.sort_empty;return d&&!f(d)&&(b.fields=[d]),e&&!f(e)&&(b.sort=[e]),g&&!f(g)&&(b.sort_empty=[g]),{options:b,query:String(a||"").toLowerCase(),tokens:this.tokenize(a),total:0,items:[]}},a.prototype.search=function(a,b){var c,d,e,f,g=this;return d=this.prepareSearch(a,b),b=d.options,a=d.query,f=b.score||g.getScoreFunction(d),a.length?g.iterator(g.items,function(a,e){c=f(a),(b.filter===!1||c>0)&&d.items.push({score:c,id:e})}):g.iterator(g.items,function(a,b){d.items.push({score:1,id:b})}),e=g.getSortFunction(d,b),e&&d.items.sort(e),d.total=d.items.length,"number"==typeof b.limit&&(d.items=d.items.slice(0,b.limit)),d};var b=function(a,b){return"number"==typeof a&&"number"==typeof b?a>b?1:b>a?-1:0:(a=h(String(a||"")),b=h(String(b||"")),a>b?1:b>a?-1:0)},c=function(a){var b,c,d,e;for(b=1,c=arguments.length;c>b;b++)if(e=arguments[b])for(d in e)e.hasOwnProperty(d)&&(a[d]=e[d]);return a},d=function(a){return(a+"").replace(/^\s+|\s+$|/g,"")},e=function(a){return(a+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},f=Array.isArray||$&&$.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)},g={a:"[aÀÁÂÃÄÅàáâãäåĀāąĄ]",c:"[cÇçćĆčČ]",d:"[dđĐďĎ]",e:"[eÈÉÊËèéêëěĚĒēęĘ]",i:"[iÌÍÎÏìíîïĪī]",l:"[lłŁ]",n:"[nÑñňŇńŃ]",o:"[oÒÓÔÕÕÖØòóôõöøŌō]",r:"[rřŘ]",s:"[sŠšśŚ]",t:"[tťŤ]",u:"[uÙÚÛÜùúûüůŮŪū]",y:"[yŸÿýÝ]",z:"[zŽžżŻźŹ]"},h=function(){var a,b,c,d,e="",f={};for(c in g)if(g.hasOwnProperty(c))for(d=g[c].substring(2,g[c].length-1),e+=d,a=0,b=d.length;b>a;a++)f[d.charAt(a)]=c;var h=new RegExp("["+e+"]","g");return function(a){return a.replace(h,function(a){return f[a]}).toLowerCase()}}();return a}),function(a,b){"function"==typeof define&&define.amd?define("microplugin",b):"object"==typeof exports?module.exports=b():a.MicroPlugin=b()}(this,function(){var a={};a.mixin=function(a){a.plugins={},a.prototype.initializePlugins=function(a){var c,d,e,f=this,g=[];if(f.plugins={names:[],settings:{},requested:{},loaded:{}},b.isArray(a))for(c=0,d=a.length;d>c;c++)"string"==typeof a[c]?g.push(a[c]):(f.plugins.settings[a[c].name]=a[c].options,g.push(a[c].name));else if(a)for(e in a)a.hasOwnProperty(e)&&(f.plugins.settings[e]=a[e],g.push(e));for(;g.length;)f.require(g.shift())},a.prototype.loadPlugin=function(b){var c=this,d=c.plugins,e=a.plugins[b];if(!a.plugins.hasOwnProperty(b))throw new Error('Unable to find "'+b+'" plugin');d.requested[b]=!0,d.loaded[b]=e.fn.apply(c,[c.plugins.settings[b]||{}]),d.names.push(b)},a.prototype.require=function(a){var b=this,c=b.plugins;if(!b.plugins.loaded.hasOwnProperty(a)){if(c.requested[a])throw new Error('Plugin has circular dependency ("'+a+'")');b.loadPlugin(a)}return c.loaded[a]},a.define=function(b,c){a.plugins[b]={name:b,fn:c}}};var b={isArray:Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)}};return a}),function(a,b){"function"==typeof define&&define.amd?define("selectize",["jquery","sifter","microplugin"],b):"object"==typeof exports?module.exports=b(require("jquery"),require("sifter"),require("microplugin")):a.Selectize=b(a.jQuery,a.Sifter,a.MicroPlugin)}(this,function(a,b,c){"use strict";var d=function(a,b){if("string"!=typeof b||b.length){var c="string"==typeof b?new RegExp(b,"i"):b,d=function(a){var b=0;if(3===a.nodeType){var e=a.data.search(c);if(e>=0&&a.data.length>0){var f=a.data.match(c),g=document.createElement("span");g.className="highlight";var h=a.splitText(e),i=(h.splitText(f[0].length),h.cloneNode(!0));g.appendChild(i),h.parentNode.replaceChild(g,h),b=1}}else if(1===a.nodeType&&a.childNodes&&!/(script|style)/i.test(a.tagName))for(var j=0;j/g,">").replace(/"/g,""")},B=function(a){return(a+"").replace(/\$/g,"$$$$")},C={};C.before=function(a,b,c){var d=a[b];a[b]=function(){return c.apply(a,arguments),d.apply(a,arguments)}},C.after=function(a,b,c){var d=a[b];a[b]=function(){var b=d.apply(a,arguments);return c.apply(a,arguments),b}};var D=function(a){var b=!1;return function(){b||(b=!0,a.apply(this,arguments))}},E=function(a,b){var c;return function(){var d=this,e=arguments;window.clearTimeout(c),c=window.setTimeout(function(){a.apply(d,e)},b)}},F=function(a,b,c){var d,e=a.trigger,f={};a.trigger=function(){var c=arguments[0];return-1===b.indexOf(c)?e.apply(a,arguments):void(f[c]=arguments)},c.apply(a,[]),a.trigger=e;for(d in f)f.hasOwnProperty(d)&&e.apply(a,f[d])},G=function(a,b,c,d){a.on(b,c,function(b){for(var c=b.target;c&&c.parentNode!==a[0];)c=c.parentNode;return b.currentTarget=c,d.apply(this,[b])})},H=function(a){var b={};if("selectionStart"in a)b.start=a.selectionStart,b.length=a.selectionEnd-b.start;else if(document.selection){a.focus();var c=document.selection.createRange(),d=document.selection.createRange().text.length;c.moveStart("character",-a.value.length),b.start=c.text.length-d,b.length=d}return b},I=function(a,b,c){var d,e,f={};if(c)for(d=0,e=c.length;e>d;d++)f[c[d]]=a.css(c[d]);else f=a.css();b.css(f)},J=function(b,c){if(!b)return 0;var d=a("").css({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).text(b).appendTo("body");I(c,d,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]);var e=d.width();return d.remove(),e},K=function(a){var b=null,c=function(c,d){var e,f,g,h,i,j,k,l;c=c||window.event||{},d=d||{},c.metaKey||c.altKey||(d.force||a.data("grow")!==!1)&&(e=a.val(),c.type&&"keydown"===c.type.toLowerCase()&&(f=c.keyCode,g=f>=97&&122>=f||f>=65&&90>=f||f>=48&&57>=f||32===f,f===q||f===p?(l=H(a[0]),l.length?e=e.substring(0,l.start)+e.substring(l.start+l.length):f===p&&l.start?e=e.substring(0,l.start-1)+e.substring(l.start+1):f===q&&"undefined"!=typeof l.start&&(e=e.substring(0,l.start)+e.substring(l.start+1))):g&&(j=c.shiftKey,k=String.fromCharCode(c.keyCode),k=j?k.toUpperCase():k.toLowerCase(),e+=k)),h=a.attr("placeholder"),!e&&h&&(e=h),i=J(e,a)+4,i!==b&&(b=i,a.width(i),a.triggerHandler("resize")))};a.on("keydown keyup update blur",c),c()},L=function(c,d){var e,f,g,h,i=this;h=c[0],h.selectize=i;var j=window.getComputedStyle&&window.getComputedStyle(h,null);if(g=j?j.getPropertyValue("direction"):h.currentStyle&&h.currentStyle.direction,g=g||c.parents("[dir]:first").attr("dir")||"",a.extend(i,{order:0,settings:d,$input:c,tabIndex:c.attr("tabindex")||"",tagType:"select"===h.tagName.toLowerCase()?v:w,rtl:/rtl/i.test(g),eventNS:".selectize"+ ++L.count,highlightedValue:null,isOpen:!1,isDisabled:!1,isRequired:c.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===d.loadThrottle?i.onSearchChange:E(i.onSearchChange,d.loadThrottle)}),i.sifter=new b(this.options,{diacritics:d.diacritics}),i.settings.options){for(e=0,f=i.settings.options.length;f>e;e++)i.registerOption(i.settings.options[e]);delete i.settings.options}if(i.settings.optgroups){for(e=0,f=i.settings.optgroups.length;f>e;e++)i.registerOptionGroup(i.settings.optgroups[e]);delete i.settings.optgroups}i.settings.mode=i.settings.mode||(1===i.settings.maxItems?"single":"multi"),"boolean"!=typeof i.settings.hideSelected&&(i.settings.hideSelected="multi"===i.settings.mode),i.initializePlugins(i.settings.plugins),i.setupCallbacks(),i.setupTemplates(),i.setup()};return e.mixin(L),c.mixin(L),a.extend(L.prototype,{setup:function(){var b,c,d,e,g,h,i,j,k,l=this,m=l.settings,n=l.eventNS,o=a(window),p=a(document),q=l.$input;if(i=l.settings.mode,j=q.attr("class")||"",b=a("
").addClass(m.wrapperClass).addClass(j).addClass(i),c=a("
").addClass(m.inputClass).addClass("items").appendTo(b),d=a('').appendTo(c).attr("tabindex",q.is(":disabled")?"-1":l.tabIndex),h=a(m.dropdownParent||b),e=a("
").addClass(m.dropdownClass).addClass(i).hide().appendTo(h),g=a("
").addClass(m.dropdownContentClass).appendTo(e),l.settings.copyClassesToDropdown&&e.addClass(j),b.css({width:q[0].style.width}),l.plugins.names.length&&(k="plugin-"+l.plugins.names.join(" plugin-"),b.addClass(k),e.addClass(k)),(null===m.maxItems||m.maxItems>1)&&l.tagType===v&&q.attr("multiple","multiple"),l.settings.placeholder&&d.attr("placeholder",m.placeholder),!l.settings.splitOn&&l.settings.delimiter){var u=l.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");l.settings.splitOn=new RegExp("\\s*"+u+"+\\s*")}q.attr("autocorrect")&&d.attr("autocorrect",q.attr("autocorrect")),q.attr("autocapitalize")&&d.attr("autocapitalize",q.attr("autocapitalize")),l.$wrapper=b,l.$control=c,l.$control_input=d,l.$dropdown=e,l.$dropdown_content=g,e.on("mouseenter","[data-selectable]",function(){return l.onOptionHover.apply(l,arguments)}),e.on("mousedown click","[data-selectable]",function(){return l.onOptionSelect.apply(l,arguments)}),G(c,"mousedown","*:not(input)",function(){return l.onItemSelect.apply(l,arguments)}),K(d),c.on({mousedown:function(){return l.onMouseDown.apply(l,arguments)},click:function(){return l.onClick.apply(l,arguments)}}),d.on({mousedown:function(a){a.stopPropagation()},keydown:function(){return l.onKeyDown.apply(l,arguments)},keyup:function(){return l.onKeyUp.apply(l,arguments)},keypress:function(){return l.onKeyPress.apply(l,arguments)},resize:function(){l.positionDropdown.apply(l,[])},blur:function(){return l.onBlur.apply(l,arguments)},focus:function(){return l.ignoreBlur=!1,l.onFocus.apply(l,arguments)},paste:function(){return l.onPaste.apply(l,arguments)}}),p.on("keydown"+n,function(a){l.isCmdDown=a[f?"metaKey":"ctrlKey"],l.isCtrlDown=a[f?"altKey":"ctrlKey"],l.isShiftDown=a.shiftKey}),p.on("keyup"+n,function(a){a.keyCode===t&&(l.isCtrlDown=!1),a.keyCode===r&&(l.isShiftDown=!1),a.keyCode===s&&(l.isCmdDown=!1)}),p.on("mousedown"+n,function(a){if(l.isFocused){if(a.target===l.$dropdown[0]||a.target.parentNode===l.$dropdown[0])return!1;l.$control.has(a.target).length||a.target===l.$control[0]||l.blur(a.target)}}),o.on(["scroll"+n,"resize"+n].join(" "),function(){l.isOpen&&l.positionDropdown.apply(l,arguments)}),o.on("mousemove"+n,function(){l.ignoreHover=!1}),this.revertSettings={$children:q.children().detach(),tabindex:q.attr("tabindex")},q.attr("tabindex",-1).hide().after(l.$wrapper),a.isArray(m.items)&&(l.setValue(m.items),delete m.items),x&&q.on("invalid"+n,function(a){a.preventDefault(),l.isInvalid=!0,l.refreshState()}),l.updateOriginalInput(),l.refreshItems(),l.refreshState(),l.updatePlaceholder(),l.isSetup=!0,q.is(":disabled")&&l.disable(),l.on("change",this.onChange),q.data("selectize",l),q.addClass("selectized"),l.trigger("initialize"),m.preload===!0&&l.onSearchChange("")},setupTemplates:function(){var b=this,c=b.settings.labelField,d=b.settings.optgroupLabelField,e={optgroup:function(a){return'
'+a.html+"
"},optgroup_header:function(a,b){return'
'+b(a[d])+"
"},option:function(a,b){return'
'+b(a[c])+"
"},item:function(a,b){return'
'+b(a[c])+"
"},option_create:function(a,b){return'
Add '+b(a.input)+"
"}};b.settings.render=a.extend({},e,b.settings.render)},setupCallbacks:function(){var a,b,c={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(a in c)c.hasOwnProperty(a)&&(b=this.settings[c[a]],b&&this.on(a,b))},onClick:function(a){var b=this;b.isFocused||(b.focus(),a.preventDefault())},onMouseDown:function(b){{var c=this,d=b.isDefaultPrevented();a(b.target)}if(c.isFocused){if(b.target!==c.$control_input[0])return"single"===c.settings.mode?c.isOpen?c.close():c.open():d||c.setActiveItem(null),!1}else d||window.setTimeout(function(){c.focus()},0)},onChange:function(){this.$input.trigger("change")},onPaste:function(b){var c=this;c.isFull()||c.isInputHidden||c.isLocked?b.preventDefault():c.settings.splitOn&&setTimeout(function(){for(var b=a.trim(c.$control_input.val()||"").split(c.settings.splitOn),d=0,e=b.length;e>d;d++)c.createItem(b[d])},0)},onKeyPress:function(a){if(this.isLocked)return a&&a.preventDefault();var b=String.fromCharCode(a.keyCode||a.which);return this.settings.create&&"multi"===this.settings.mode&&b===this.settings.delimiter?(this.createItem(),a.preventDefault(),!1):void 0},onKeyDown:function(a){var b=(a.target===this.$control_input[0],this);if(b.isLocked)return void(a.keyCode!==u&&a.preventDefault());switch(a.keyCode){case g:if(b.isCmdDown)return void b.selectAll();break;case i:return void(b.isOpen&&(a.preventDefault(),a.stopPropagation(),b.close()));case o:if(!a.ctrlKey||a.altKey)break;case n:if(!b.isOpen&&b.hasOptions)b.open();else if(b.$activeOption){b.ignoreHover=!0;var c=b.getAdjacentOption(b.$activeOption,1);c.length&&b.setActiveOption(c,!0,!0)}return void a.preventDefault();case l:if(!a.ctrlKey||a.altKey)break;case k:if(b.$activeOption){b.ignoreHover=!0;var d=b.getAdjacentOption(b.$activeOption,-1);d.length&&b.setActiveOption(d,!0,!0)}return void a.preventDefault();case h:return void(b.isOpen&&b.$activeOption&&(b.onOptionSelect({currentTarget:b.$activeOption}),a.preventDefault()));case j:return void b.advanceSelection(-1,a);case m:return void b.advanceSelection(1,a);case u:return b.settings.selectOnTab&&b.isOpen&&b.$activeOption&&(b.onOptionSelect({currentTarget:b.$activeOption}),b.isFull()||a.preventDefault()),void(b.settings.create&&b.createItem()&&a.preventDefault());case p:case q:return void b.deleteSelection(a)}return!b.isFull()&&!b.isInputHidden||(f?a.metaKey:a.ctrlKey)?void 0:void a.preventDefault()},onKeyUp:function(a){var b=this;if(b.isLocked)return a&&a.preventDefault();var c=b.$control_input.val()||"";b.lastValue!==c&&(b.lastValue=c,b.onSearchChange(c),b.refreshOptions(),b.trigger("type",c))},onSearchChange:function(a){var b=this,c=b.settings.load;c&&(b.loadedSearches.hasOwnProperty(a)||(b.loadedSearches[a]=!0,b.load(function(d){c.apply(b,[a,d])})))},onFocus:function(a){var b=this,c=b.isFocused;return b.isDisabled?(b.blur(),a&&a.preventDefault(),!1):void(b.ignoreFocus||(b.isFocused=!0,"focus"===b.settings.preload&&b.onSearchChange(""),c||b.trigger("focus"),b.$activeItems.length||(b.showInput(),b.setActiveItem(null),b.refreshOptions(!!b.settings.openOnFocus)),b.refreshState()))},onBlur:function(a,b){var c=this;if(c.isFocused&&(c.isFocused=!1,!c.ignoreFocus)){if(!c.ignoreBlur&&document.activeElement===c.$dropdown_content[0])return c.ignoreBlur=!0,void c.onFocus(a);var d=function(){c.close(),c.setTextboxValue(""),c.setActiveItem(null),c.setActiveOption(null),c.setCaret(c.items.length),c.refreshState(),(b||document.body).focus(),c.ignoreFocus=!1,c.trigger("blur")};c.ignoreFocus=!0,c.settings.create&&c.settings.createOnBlur?c.createItem(null,!1,d):d()}},onOptionHover:function(a){this.ignoreHover||this.setActiveOption(a.currentTarget,!1)},onOptionSelect:function(b){var c,d,e=this;b.preventDefault&&(b.preventDefault(),b.stopPropagation()),d=a(b.currentTarget),d.hasClass("create")?e.createItem(null,function(){e.settings.closeAfterSelect&&e.close()}):(c=d.attr("data-value"),"undefined"!=typeof c&&(e.lastQuery=null,e.setTextboxValue(""),e.addItem(c),e.settings.closeAfterSelect?e.close():!e.settings.hideSelected&&b.type&&/mouse/.test(b.type)&&e.setActiveOption(e.getOption(c))))},onItemSelect:function(a){var b=this;b.isLocked||"multi"===b.settings.mode&&(a.preventDefault(),b.setActiveItem(a.currentTarget,a))},load:function(a){var b=this,c=b.$wrapper.addClass(b.settings.loadingClass);b.loading++,a.apply(b,[function(a){b.loading=Math.max(b.loading-1,0),a&&a.length&&(b.addOption(a),b.refreshOptions(b.isFocused&&!b.isInputHidden)),b.loading||c.removeClass(b.settings.loadingClass),b.trigger("load",a)}])},setTextboxValue:function(a){var b=this.$control_input,c=b.val()!==a;c&&(b.val(a).triggerHandler("update"),this.lastValue=a)},getValue:function(){return this.tagType===v&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(a,b){var c=b?[]:["change"];F(this,c,function(){this.clear(b),this.addItems(a,b)})},setActiveItem:function(b,c){var d,e,f,g,h,i,j,k,l=this;if("single"!==l.settings.mode){if(b=a(b),!b.length)return a(l.$activeItems).removeClass("active"),l.$activeItems=[],void(l.isFocused&&l.showInput());if(d=c&&c.type.toLowerCase(),"mousedown"===d&&l.isShiftDown&&l.$activeItems.length){for(k=l.$control.children(".active:last"),g=Array.prototype.indexOf.apply(l.$control[0].childNodes,[k[0]]),h=Array.prototype.indexOf.apply(l.$control[0].childNodes,[b[0]]),g>h&&(j=g,g=h,h=j),e=g;h>=e;e++)i=l.$control[0].childNodes[e],-1===l.$activeItems.indexOf(i)&&(a(i).addClass("active"),l.$activeItems.push(i));c.preventDefault()}else"mousedown"===d&&l.isCtrlDown||"keydown"===d&&this.isShiftDown?b.hasClass("active")?(f=l.$activeItems.indexOf(b[0]),l.$activeItems.splice(f,1),b.removeClass("active")):l.$activeItems.push(b.addClass("active")[0]):(a(l.$activeItems).removeClass("active"),l.$activeItems=[b.addClass("active")[0]]);l.hideInput(),this.isFocused||l.focus()}},setActiveOption:function(b,c,d){var e,f,g,h,i,j=this;j.$activeOption&&j.$activeOption.removeClass("active"),j.$activeOption=null,b=a(b),b.length&&(j.$activeOption=b.addClass("active"),(c||!y(c))&&(e=j.$dropdown_content.height(),f=j.$activeOption.outerHeight(!0),c=j.$dropdown_content.scrollTop()||0,g=j.$activeOption.offset().top-j.$dropdown_content.offset().top+c,h=g,i=g-e+f,g+f>e+c?j.$dropdown_content.stop().animate({scrollTop:i},d?j.settings.scrollDuration:0):c>g&&j.$dropdown_content.stop().animate({scrollTop:h},d?j.settings.scrollDuration:0)))},selectAll:function(){var a=this;"single"!==a.settings.mode&&(a.$activeItems=Array.prototype.slice.apply(a.$control.children(":not(input)").addClass("active")),a.$activeItems.length&&(a.hideInput(),a.close()),a.focus())},hideInput:function(){var a=this;a.setTextboxValue(""),a.$control_input.css({opacity:0,position:"absolute",left:a.rtl?1e4:-1e4}),a.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1,position:"relative",left:0}),this.isInputHidden=!1},focus:function(){var a=this;a.isDisabled||(a.ignoreFocus=!0,a.$control_input[0].focus(),window.setTimeout(function(){a.ignoreFocus=!1,a.onFocus()},0))},blur:function(a){this.$control_input[0].blur(),this.onBlur(null,a)},getScoreFunction:function(a){return this.sifter.getScoreFunction(a,this.getSearchOptions())},getSearchOptions:function(){var a=this.settings,b=a.sortField;return"string"==typeof b&&(b=[{field:b}]),{fields:a.searchField,conjunction:a.searchConjunction,sort:b}},search:function(b){var c,d,e,f=this,g=f.settings,h=this.getSearchOptions();if(g.score&&(e=f.settings.score.apply(this,[b]),"function"!=typeof e))throw new Error('Selectize "score" setting must be a function that returns a function');if(b!==f.lastQuery?(f.lastQuery=b,d=f.sifter.search(b,a.extend(h,{score:e})),f.currentResults=d):d=a.extend(!0,{},f.currentResults),g.hideSelected)for(c=d.items.length-1;c>=0;c--)-1!==f.items.indexOf(z(d.items[c].id))&&d.items.splice(c,1);return d},refreshOptions:function(b){var c,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;"undefined"==typeof b&&(b=!0);var t=this,u=a.trim(t.$control_input.val()),v=t.search(u),w=t.$dropdown_content,x=t.$activeOption&&z(t.$activeOption.attr("data-value"));for(g=v.items.length,"number"==typeof t.settings.maxOptions&&(g=Math.min(g,t.settings.maxOptions)),h={},i=[],c=0;g>c;c++)for(j=t.options[v.items[c].id],k=t.render("option",j),l=j[t.settings.optgroupField]||"",m=a.isArray(l)?l:[l],e=0,f=m&&m.length;f>e;e++)l=m[e],t.optgroups.hasOwnProperty(l)||(l=""),h.hasOwnProperty(l)||(h[l]=[],i.push(l)),h[l].push(k);for(this.settings.lockOptgroupOrder&&i.sort(function(a,b){var c=t.optgroups[a].$order||0,d=t.optgroups[b].$order||0;return c-d}),n=[],c=0,g=i.length;g>c;c++)l=i[c],t.optgroups.hasOwnProperty(l)&&h[l].length?(o=t.render("optgroup_header",t.optgroups[l])||"",o+=h[l].join(""),n.push(t.render("optgroup",a.extend({},t.optgroups[l],{html:o})))):n.push(h[l].join(""));if(w.html(n.join("")),t.settings.highlight&&v.query.length&&v.tokens.length)for(c=0,g=v.tokens.length;g>c;c++)d(w,v.tokens[c].regex);if(!t.settings.hideSelected)for(c=0,g=t.items.length;g>c;c++)t.getOption(t.items[c]).addClass("selected");p=t.canCreate(u),p&&(w.prepend(t.render("option_create",{input:u})),s=a(w[0].childNodes[0])),t.hasOptions=v.items.length>0||p,t.hasOptions?(v.items.length>0?(r=x&&t.getOption(x),r&&r.length?q=r:"single"===t.settings.mode&&t.items.length&&(q=t.getOption(t.items[0])),q&&q.length||(q=s&&!t.settings.addPrecedence?t.getAdjacentOption(s,1):w.find("[data-selectable]:first"))):q=s,t.setActiveOption(q),b&&!t.isOpen&&t.open()):(t.setActiveOption(null),b&&t.isOpen&&t.close())},addOption:function(b){var c,d,e,f=this;if(a.isArray(b))for(c=0,d=b.length;d>c;c++)f.addOption(b[c]);else(e=f.registerOption(b))&&(f.userOptions[e]=!0,f.lastQuery=null,f.trigger("option_add",e,b))},registerOption:function(a){var b=z(a[this.settings.valueField]);return!b||this.options.hasOwnProperty(b)?!1:(a.$order=a.$order||++this.order,this.options[b]=a,b)},registerOptionGroup:function(a){var b=z(a[this.settings.optgroupValueField]);return b?(a.$order=a.$order||++this.order,this.optgroups[b]=a,b):!1},addOptionGroup:function(a,b){b[this.settings.optgroupValueField]=a,(a=this.registerOptionGroup(b))&&this.trigger("optgroup_add",a,b)},removeOptionGroup:function(a){this.optgroups.hasOwnProperty(a)&&(delete this.optgroups[a],this.renderCache={},this.trigger("optgroup_remove",a))},clearOptionGroups:function(){this.optgroups={},this.renderCache={},this.trigger("optgroup_clear")},updateOption:function(b,c){var d,e,f,g,h,i,j,k=this;if(b=z(b),f=z(c[k.settings.valueField]),null!==b&&k.options.hasOwnProperty(b)){if("string"!=typeof f)throw new Error("Value must be set in option data");j=k.options[b].$order,f!==b&&(delete k.options[b],g=k.items.indexOf(b),-1!==g&&k.items.splice(g,1,f)),c.$order=c.$order||j,k.options[f]=c,h=k.renderCache.item,i=k.renderCache.option,h&&(delete h[b],delete h[f]),i&&(delete i[b],delete i[f]),-1!==k.items.indexOf(f)&&(d=k.getItem(b),e=a(k.render("item",c)),d.hasClass("active")&&e.addClass("active"),d.replaceWith(e)),k.lastQuery=null,k.isOpen&&k.refreshOptions(!1)}},removeOption:function(a,b){var c=this;a=z(a);var d=c.renderCache.item,e=c.renderCache.option;d&&delete d[a],e&&delete e[a],delete c.userOptions[a],delete c.options[a],c.lastQuery=null,c.trigger("option_remove",a),c.removeItem(a,b)},clearOptions:function(){var a=this;a.loadedSearches={},a.userOptions={},a.renderCache={},a.options=a.sifter.items={},a.lastQuery=null,a.trigger("option_clear"),a.clear()},getOption:function(a){return this.getElementWithValue(a,this.$dropdown_content.find("[data-selectable]"))},getAdjacentOption:function(b,c){var d=this.$dropdown.find("[data-selectable]"),e=d.index(b)+c;return e>=0&&ed;d++)if(c[d].getAttribute("data-value")===b)return a(c[d]);return a()},getItem:function(a){return this.getElementWithValue(a,this.$control.children())},addItems:function(b,c){for(var d=a.isArray(b)?b:[b],e=0,f=d.length;f>e;e++)this.isPending=f-1>e,this.addItem(d[e],c)},addItem:function(b,c){var d=c?[]:["change"];F(this,d,function(){var d,e,f,g,h,i=this,j=i.settings.mode;return b=z(b),-1!==i.items.indexOf(b)?void("single"===j&&i.close()):void(i.options.hasOwnProperty(b)&&("single"===j&&i.clear(c),"multi"===j&&i.isFull()||(d=a(i.render("item",i.options[b])),h=i.isFull(),i.items.splice(i.caretPos,0,b),i.insertAtCaret(d),(!i.isPending||!h&&i.isFull())&&i.refreshState(),i.isSetup&&(f=i.$dropdown_content.find("[data-selectable]"),i.isPending||(e=i.getOption(b),g=i.getAdjacentOption(e,1).attr("data-value"),i.refreshOptions(i.isFocused&&"single"!==j),g&&i.setActiveOption(i.getOption(g))),!f.length||i.isFull()?i.close():i.positionDropdown(),i.updatePlaceholder(),i.trigger("item_add",b,d),i.updateOriginalInput({silent:c})))))})},removeItem:function(a,b){var c,d,e,f=this;c="object"==typeof a?a:f.getItem(a),a=z(c.attr("data-value")),d=f.items.indexOf(a),-1!==d&&(c.remove(),c.hasClass("active")&&(e=f.$activeItems.indexOf(c[0]),f.$activeItems.splice(e,1)),f.items.splice(d,1),f.lastQuery=null,!f.settings.persist&&f.userOptions.hasOwnProperty(a)&&f.removeOption(a,b),d0),b.$control_input.data("grow",!c&&!d)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(a){var b,c,d,e,f=this;if(a=a||{},f.tagType===v){for(d=[],b=0,c=f.items.length;c>b;b++)e=f.options[f.items[b]][f.settings.labelField]||"",d.push('");d.length||this.$input.attr("multiple")||d.push(''),f.$input.html(d.join(""))}else f.$input.val(f.getValue()),f.$input.attr("value",f.$input.val());f.isSetup&&(a.silent||f.trigger("change",f.$input.val()))},updatePlaceholder:function(){if(this.settings.placeholder){var a=this.$control_input;this.items.length?a.removeAttr("placeholder"):a.attr("placeholder",this.settings.placeholder),a.triggerHandler("update",{force:!0})}},open:function(){var a=this;a.isLocked||a.isOpen||"multi"===a.settings.mode&&a.isFull()||(a.focus(),a.isOpen=!0,a.refreshState(),a.$dropdown.css({visibility:"hidden",display:"block"}),a.positionDropdown(),a.$dropdown.css({visibility:"visible"}),a.trigger("dropdown_open",a.$dropdown))},close:function(){var a=this,b=a.isOpen;"single"===a.settings.mode&&a.items.length&&a.hideInput(),a.isOpen=!1,a.$dropdown.hide(),a.setActiveOption(null),a.refreshState(),b&&a.trigger("dropdown_close",a.$dropdown)},positionDropdown:function(){var a=this.$control,b="body"===this.settings.dropdownParent?a.offset():a.position();b.top+=a.outerHeight(!0),this.$dropdown.css({width:a.outerWidth(),top:b.top,left:b.left})},clear:function(a){var b=this;b.items.length&&(b.$control.children(":not(input)").remove(),b.items=[],b.lastQuery=null,b.setCaret(0),b.setActiveItem(null),b.updatePlaceholder(),b.updateOriginalInput({silent:a}),b.refreshState(),b.showInput(),b.trigger("clear"))},insertAtCaret:function(b){var c=Math.min(this.caretPos,this.items.length);0===c?this.$control.prepend(b):a(this.$control[0].childNodes[c]).before(b),this.setCaret(c+1)},deleteSelection:function(b){var c,d,e,f,g,h,i,j,k,l=this;if(e=b&&b.keyCode===p?-1:1,f=H(l.$control_input[0]),l.$activeOption&&!l.settings.hideSelected&&(i=l.getAdjacentOption(l.$activeOption,-1).attr("data-value")),g=[],l.$activeItems.length){for(k=l.$control.children(".active:"+(e>0?"last":"first")),h=l.$control.children(":not(input)").index(k),e>0&&h++,c=0,d=l.$activeItems.length;d>c;c++)g.push(a(l.$activeItems[c]).attr("data-value")); +b&&(b.preventDefault(),b.stopPropagation())}else(l.isFocused||"single"===l.settings.mode)&&l.items.length&&(0>e&&0===f.start&&0===f.length?g.push(l.items[l.caretPos-1]):e>0&&f.start===l.$control_input.val().length&&g.push(l.items[l.caretPos]));if(!g.length||"function"==typeof l.settings.onDelete&&l.settings.onDelete.apply(l,[g])===!1)return!1;for("undefined"!=typeof h&&l.setCaret(h);g.length;)l.removeItem(g.pop());return l.showInput(),l.positionDropdown(),l.refreshOptions(!0),i&&(j=l.getOption(i),j.length&&l.setActiveOption(j)),!0},advanceSelection:function(a,b){var c,d,e,f,g,h,i=this;0!==a&&(i.rtl&&(a*=-1),c=a>0?"last":"first",d=H(i.$control_input[0]),i.isFocused&&!i.isInputHidden?(f=i.$control_input.val().length,g=0>a?0===d.start&&0===d.length:d.start===f,g&&!f&&i.advanceCaret(a,b)):(h=i.$control.children(".active:"+c),h.length&&(e=i.$control.children(":not(input)").index(h),i.setActiveItem(null),i.setCaret(a>0?e+1:e))))},advanceCaret:function(a,b){var c,d,e=this;0!==a&&(c=a>0?"next":"prev",e.isShiftDown?(d=e.$control_input[c](),d.length&&(e.hideInput(),e.setActiveItem(d),b&&b.preventDefault())):e.setCaret(e.caretPos+a))},setCaret:function(b){var c=this;if(b="single"===c.settings.mode?c.items.length:Math.max(0,Math.min(c.items.length,b)),!c.isPending){var d,e,f,g;for(f=c.$control.children(":not(input)"),d=0,e=f.length;e>d;d++)g=a(f[d]).detach(),b>d?c.$control_input.before(g):c.$control.append(g)}c.caretPos=b},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){var a=this;a.$input.prop("disabled",!0),a.$control_input.prop("disabled",!0).prop("tabindex",-1),a.isDisabled=!0,a.lock()},enable:function(){var a=this;a.$input.prop("disabled",!1),a.$control_input.prop("disabled",!1).prop("tabindex",a.tabIndex),a.isDisabled=!1,a.unlock()},destroy:function(){var b=this,c=b.eventNS,d=b.revertSettings;b.trigger("destroy"),b.off(),b.$wrapper.remove(),b.$dropdown.remove(),b.$input.html("").append(d.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:d.tabindex}).show(),b.$control_input.removeData("grow"),b.$input.removeData("selectize"),a(window).off(c),a(document).off(c),a(document.body).off(c),delete b.$input[0].selectize},render:function(a,b){var c,d,e="",f=!1,g=this,h=/^[\t \r\n]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;return("option"===a||"item"===a)&&(c=z(b[g.settings.valueField]),f=!!c),f&&(y(g.renderCache[a])||(g.renderCache[a]={}),g.renderCache[a].hasOwnProperty(c))?g.renderCache[a][c]:(e=g.settings.render[a].apply(this,[b,A]),("option"===a||"option_create"===a)&&(e=e.replace(h,"<$1 data-selectable")),"optgroup"===a&&(d=b[g.settings.optgroupValueField]||"",e=e.replace(h,'<$1 data-group="'+B(A(d))+'"')),("option"===a||"item"===a)&&(e=e.replace(h,'<$1 data-value="'+B(A(c||""))+'"')),f&&(g.renderCache[a][c]=e),e)},clearCache:function(a){var b=this;"undefined"==typeof a?b.renderCache={}:delete b.renderCache[a]},canCreate:function(a){var b=this;if(!b.settings.create)return!1;var c=b.settings.createFilter;return!(!a.length||"function"==typeof c&&!c.apply(b,[a])||"string"==typeof c&&!new RegExp(c).test(a)||c instanceof RegExp&&!c.test(a))}}),L.count=0,L.defaults={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:!1,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!1,preload:!1,allowEmptyOption:!1,closeAfterSelect:!1,scrollDuration:60,loadThrottle:300,loadingClass:"loading",dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"selectize-control",inputClass:"selectize-input",dropdownClass:"selectize-dropdown",dropdownContentClass:"selectize-dropdown-content",dropdownParent:null,copyClassesToDropdown:!0,render:{}},a.fn.selectize=function(b){var c=a.fn.selectize.defaults,d=a.extend({},c,b),e=d.dataAttr,f=d.labelField,g=d.valueField,h=d.optgroupField,i=d.optgroupLabelField,j=d.optgroupValueField,k=function(b,c){var h,i,j,k,l=b.attr(e);if(l)for(c.options=JSON.parse(l),h=0,i=c.options.length;i>h;h++)c.items.push(c.options[h][g]);else{var m=a.trim(b.val()||"");if(!d.allowEmptyOption&&!m.length)return;for(j=m.split(d.delimiter),h=0,i=j.length;i>h;h++)k={},k[f]=j[h],k[g]=j[h],c.options.push(k);c.items=j}},l=function(b,c){var k,l,m,n,o=c.options,p={},q=function(a){var b=e&&a.attr(e);return"string"==typeof b&&b.length?JSON.parse(b):null},r=function(b,e){b=a(b);var i=z(b.attr("value"));if(i||d.allowEmptyOption)if(p.hasOwnProperty(i)){if(e){var j=p[i][h];j?a.isArray(j)?j.push(e):p[i][h]=[j,e]:p[i][h]=e}}else{var k=q(b)||{};k[f]=k[f]||b.text(),k[g]=k[g]||i,k[h]=k[h]||e,p[i]=k,o.push(k),b.is(":selected")&&c.items.push(i)}},s=function(b){var d,e,f,g,h;for(b=a(b),f=b.attr("label"),f&&(g=q(b)||{},g[i]=f,g[j]=f,c.optgroups.push(g)),h=a("option",b),d=0,e=h.length;e>d;d++)r(h[d],f)};for(c.maxItems=b.attr("multiple")?null:1,n=b.children(),k=0,l=n.length;l>k;k++)m=n[k].tagName.toLowerCase(),"optgroup"===m?s(n[k]):"option"===m&&r(n[k])};return this.each(function(){if(!this.selectize){var e,f=a(this),g=this.tagName.toLowerCase(),h=f.attr("placeholder")||f.attr("data-placeholder");h||d.allowEmptyOption||(h=f.children('option[value=""]').text());var i={placeholder:h,options:[],optgroups:[],items:[]};"select"===g?l(f,i):k(f,i),e=new L(f,a.extend(!0,{},c,i,b))}})},a.fn.selectize.defaults=L.defaults,a.fn.selectize.support={validity:x},L.define("drag_drop",function(){if(!a.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===this.settings.mode){var b=this;b.lock=function(){var a=b.lock;return function(){var c=b.$control.data("sortable");return c&&c.disable(),a.apply(b,arguments)}}(),b.unlock=function(){var a=b.unlock;return function(){var c=b.$control.data("sortable");return c&&c.enable(),a.apply(b,arguments)}}(),b.setup=function(){var c=b.setup;return function(){c.apply(this,arguments);var d=b.$control.sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:b.isLocked,start:function(a,b){b.placeholder.css("width",b.helper.css("width")),d.css({overflow:"visible"})},stop:function(){d.css({overflow:"hidden"});var c=b.$activeItems?b.$activeItems.slice():null,e=[];d.children("[data-value]").each(function(){e.push(a(this).attr("data-value"))}),b.setValue(e),b.setActiveItem(c)}})}}()}}),L.define("dropdown_header",function(b){var c=this;b=a.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(a){return'
'+a.title+'×
'}},b),c.setup=function(){var d=c.setup;return function(){d.apply(c,arguments),c.$dropdown_header=a(b.html(b)),c.$dropdown.prepend(c.$dropdown_header)}}()}),L.define("optgroup_columns",function(b){var c=this;b=a.extend({equalizeWidth:!0,equalizeHeight:!0},b),this.getAdjacentOption=function(b,c){var d=b.closest("[data-group]").find("[data-selectable]"),e=d.index(b)+c;return e>=0&&e
',a=a.firstChild,c.body.appendChild(a),b=d.width=a.offsetWidth-a.clientWidth,c.body.removeChild(a)),b},e=function(){var e,f,g,h,i,j,k;if(k=a("[data-group]",c.$dropdown_content),f=k.length,f&&c.$dropdown_content.width()){if(b.equalizeHeight){for(g=0,e=0;f>e;e++)g=Math.max(g,k.eq(e).height());k.css({height:g})}b.equalizeWidth&&(j=c.$dropdown_content.innerWidth()-d(),h=Math.round(j/f),k.css({width:h}),f>1&&(i=j-h*(f-1),k.eq(f-1).css({width:i})))}};(b.equalizeHeight||b.equalizeWidth)&&(C.after(this,"positionDropdown",e),C.after(this,"refreshOptions",e))}),L.define("remove_button",function(b){if("single"!==this.settings.mode){b=a.extend({label:"×",title:"Remove",className:"remove",append:!0},b);var c=this,d=''+b.label+"",e=function(a,b){var c=a.search(/(<\/[^>]+>\s*)$/);return a.substring(0,c)+b+a.substring(c)};this.setup=function(){var f=c.setup;return function(){if(b.append){var g=c.settings.render.item;c.settings.render.item=function(){return e(g.apply(this,arguments),d)}}f.apply(this,arguments),this.$control.on("click","."+b.className,function(b){if(b.preventDefault(),!c.isLocked){var d=a(b.currentTarget).parent();c.setActiveItem(d),c.deleteSelection()&&c.setCaret(c.items.length)}})}}()}}),L.define("restore_on_backspace",function(a){var b=this;a.text=a.text||function(a){return a[this.settings.labelField]},this.onKeyDown=function(){var c=b.onKeyDown;return function(b){var d,e;return b.keyCode===p&&""===this.$control_input.val()&&!this.$activeItems.length&&(d=this.caretPos-1,d>=0&&d Date: Sat, 27 Feb 2016 11:55:54 +0800 Subject: [PATCH 042/180] Update LC --- xadmin/locale/de_DE/LC_MESSAGES/django.mo | Bin 16279 -> 16279 bytes xadmin/locale/de_DE/LC_MESSAGES/django.po | 179 ++++++++------ xadmin/locale/en/LC_MESSAGES/django.mo | Bin 414 -> 414 bytes xadmin/locale/en/LC_MESSAGES/django.po | 178 ++++++++------ xadmin/locale/es_MX/LC_MESSAGES/django.mo | Bin 19468 -> 19468 bytes xadmin/locale/es_MX/LC_MESSAGES/django.po | 179 ++++++++------ xadmin/locale/eu/LC_MESSAGES/django.mo | Bin 19017 -> 19017 bytes xadmin/locale/eu/LC_MESSAGES/django.po | 179 ++++++++------ xadmin/locale/id_ID/LC_MESSAGES/django.mo | Bin 480 -> 480 bytes xadmin/locale/id_ID/LC_MESSAGES/django.po | 178 ++++++++------ xadmin/locale/ja/LC_MESSAGES/django.mo | Bin 460 -> 460 bytes xadmin/locale/ja/LC_MESSAGES/django.po | 178 ++++++++------ xadmin/locale/lt/LC_MESSAGES/django.mo | Bin 532 -> 532 bytes xadmin/locale/lt/LC_MESSAGES/django.po | 178 ++++++++------ xadmin/locale/nl_NL/LC_MESSAGES/django.mo | Bin 484 -> 484 bytes xadmin/locale/nl_NL/LC_MESSAGES/django.po | 178 ++++++++------ xadmin/locale/pl/LC_MESSAGES/django.mo | Bin 21956 -> 21876 bytes xadmin/locale/pl/LC_MESSAGES/django.po | 284 ++++++++-------------- xadmin/locale/pt_BR/LC_MESSAGES/django.mo | Bin 20577 -> 20577 bytes xadmin/locale/pt_BR/LC_MESSAGES/django.po | 179 ++++++++------ xadmin/locale/ru_RU/LC_MESSAGES/django.mo | Bin 6741 -> 6741 bytes xadmin/locale/ru_RU/LC_MESSAGES/django.po | 178 ++++++++------ xadmin/locale/zh_CN/LC_MESSAGES/django.mo | Bin 19541 -> 19576 bytes xadmin/locale/zh_CN/LC_MESSAGES/django.po | 9 +- 24 files changed, 1085 insertions(+), 992 deletions(-) diff --git a/xadmin/locale/de_DE/LC_MESSAGES/django.mo b/xadmin/locale/de_DE/LC_MESSAGES/django.mo index 823faffb04ab0c0a40223fc1da866ec6bb5baf21..2c5c369dac80e2ecbe53841beb6a9cb5df4bd6aa 100644 GIT binary patch delta 26 icmbPUKfQj#E;U{=T>~RsBXb2qLn~9`&BxU)NB{tSK?u\n" "Language-Team: German (Germany) (http://www.transifex.com/projects/p/xadmin/language/de_DE/)\n" @@ -20,47 +20,51 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: filters.py:157 filters.py:189 filters.py:401 filters.py:451 +#: apps.py:10 +msgid "Administration" +msgstr "" + +#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 msgid "All" msgstr "Alle" -#: filters.py:158 plugins/export.py:117 +#: filters.py:159 plugins/export.py:162 msgid "Yes" msgstr "Ja" -#: filters.py:159 plugins/export.py:117 +#: filters.py:160 plugins/export.py:162 msgid "No" msgstr "Nein" -#: filters.py:173 +#: filters.py:174 msgid "Unknown" msgstr "Unbekannt" -#: filters.py:265 +#: filters.py:266 msgid "Any date" msgstr "Beliebiges Datum" -#: filters.py:266 +#: filters.py:267 msgid "Has date" msgstr "Hat ein Datum" -#: filters.py:269 +#: filters.py:270 msgid "Has no date" msgstr "Hat kein Datum" -#: filters.py:272 widgets.py:30 +#: filters.py:273 widgets.py:30 msgid "Today" msgstr "Heute" -#: filters.py:276 +#: filters.py:277 msgid "Past 7 days" msgstr "Letzten 7 Tage" -#: filters.py:280 +#: filters.py:281 msgid "This month" msgstr "Diesen Monat" -#: filters.py:284 +#: filters.py:285 msgid "This year" msgstr "Dieses Jahr" @@ -97,7 +101,7 @@ msgstr "Abfrage String" msgid "Is Shared" msgstr "Wird geteilt" -#: models.py:65 plugins/bookmark.py:49 plugins/bookmark.py:177 +#: models.py:65 plugins/bookmark.py:49 plugins/bookmark.py:178 msgid "Bookmark" msgstr "Lesezeichen" @@ -141,42 +145,38 @@ msgstr "Benutzer Widget" msgid "User Widgets" msgstr "Benutzer Widgets" -#: widgets.py:48 -msgid "Now" -msgstr "Jetzt" - #: plugins/actions.py:54 #, python-format msgid "Delete selected %(verbose_name_plural)s" msgstr "Lösche ausgewählte %(verbose_name_plural)s" -#: plugins/actions.py:67 +#: plugins/actions.py:73 #, python-format msgid "Successfully deleted %(count)d %(items)s." msgstr "Erfolgreich gelöscht %(count)d %(items)s." -#: plugins/actions.py:99 views/delete.py:68 +#: plugins/actions.py:105 views/delete.py:68 #, python-format msgid "Cannot delete %(name)s" msgstr "Kann nicht gelöscht werden %(name)s" -#: plugins/actions.py:101 views/delete.py:71 +#: plugins/actions.py:107 views/delete.py:71 msgid "Are you sure?" msgstr "Sind Sie sicher?" -#: plugins/actions.py:147 +#: plugins/actions.py:153 #, python-format msgid "%(total_count)s selected" msgid_plural "All %(total_count)s selected" msgstr[0] "%(total_count)s ausgewählt" msgstr[1] "Alle %(total_count)s ausgewählt" -#: plugins/actions.py:151 +#: plugins/actions.py:157 #, python-format msgid "0 of %(cnt)s selected" msgstr "0 von %(cnt)s ausgewählt" -#: plugins/actions.py:168 plugins/actions.py:178 +#: plugins/actions.py:174 plugins/actions.py:184 msgid "Items must be selected in order to perform actions on them. No items have been changed." msgstr "" @@ -246,20 +246,20 @@ msgstr "Status" msgid "Permission Name" msgstr "Berechtigungen" -#: plugins/auth.py:159 +#: plugins/auth.py:167 msgid "Change Password" msgstr "Passwort ändern" -#: plugins/auth.py:189 +#: plugins/auth.py:197 #, python-format msgid "Change password: %s" msgstr "Passwort ändern: %s" -#: plugins/auth.py:214 plugins/auth.py:246 +#: plugins/auth.py:222 plugins/auth.py:254 msgid "Password changed successfully." msgstr "Passwort erfolgreich geändert." -#: plugins/auth.py:233 templates/xadmin/auth/user/change_password.html:11 +#: plugins/auth.py:241 templates/xadmin/auth/user/change_password.html:11 #: templates/xadmin/auth/user/change_password.html:22 #: templates/xadmin/auth/user/change_password.html:55 msgid "Change password" @@ -274,12 +274,12 @@ msgstr "Änderung des Feldes" msgid "Batch Change selected %(verbose_name_plural)s" msgstr "Anpassung aller gewählten %(verbose_name_plural)s" -#: plugins/batch.py:90 +#: plugins/batch.py:88 #, python-format msgid "Successfully change %(count)d %(items)s." msgstr "Es wurden %(count)d %(items)s erfolgreich geändert." -#: plugins/batch.py:138 +#: plugins/batch.py:136 #, python-format msgid "Batch change %s" msgstr "" @@ -288,7 +288,7 @@ msgstr "" msgid "bookmark" msgstr "Als Lesezeichen abspeichern" -#: plugins/bookmark.py:173 +#: plugins/bookmark.py:174 msgid "Bookmark Widget, can show user's bookmark list data in widget." msgstr "" @@ -296,7 +296,7 @@ msgstr "" msgid "Show models simple chart." msgstr "Einfaches Diagramm der Modelle anzeigen." -#: plugins/chart.py:49 +#: plugins/chart.py:50 #, python-format msgid "%s Charts" msgstr "%s Diagramme" @@ -344,27 +344,27 @@ msgid_plural "%(count)s comments were successfully %(action)s." msgstr[0] "" msgstr[1] "" -#: plugins/details.py:52 views/list.py:576 +#: plugins/details.py:52 views/list.py:579 #, python-format msgid "Details of %s" msgstr "Einzelheiten von %s" -#: plugins/editable.py:47 +#: plugins/editable.py:46 #, python-format msgid "Enter %s" msgstr "Eingabe %s" -#: plugins/editable.py:74 views/dashboard.py:638 views/delete.py:26 -#: views/detail.py:144 views/edit.py:428 +#: plugins/editable.py:73 views/dashboard.py:645 views/delete.py:26 +#: views/detail.py:144 views/edit.py:438 #, python-format msgid "%(name)s object with primary key %(key)r does not exist." msgstr "%(name)s bezeichnetes Objekt mit dem Primärschlüssel %(key)r existiert nicht." -#: plugins/export.py:87 +#: plugins/export.py:95 plugins/export.py:132 msgid "Sheet" msgstr "Seite" -#: plugins/filters.py:125 +#: plugins/filters.py:132 plugins/quickfilter.py:140 #, python-format msgid "Filtering error: %s" msgstr "Fehlerhaftes Filtern: %s" @@ -401,7 +401,7 @@ msgstr "Thumbnails" msgid "Forgotten your password or username?" msgstr "Haben Sie Ihr Passwort oder den Benutzernamen vergessen?" -#: plugins/quickform.py:77 +#: plugins/quickform.py:79 #, python-format msgid "Create New %s" msgstr "Erstelle %s neu" @@ -410,11 +410,17 @@ msgstr "Erstelle %s neu" msgid "Related Objects" msgstr "Abhängige Objekte" -#: plugins/relfield.py:29 plugins/topnav.py:35 +#: plugins/relfield.py:29 plugins/topnav.py:38 #, python-format msgid "Search %s" msgstr "Suche %s" +#: plugins/relfield.py:67 +#, fuzzy, python-format +#| msgid "Select Date" +msgid "Select %s" +msgstr "Datum wählen" + #: plugins/themes.py:47 msgid "Default" msgstr "Standard" @@ -431,8 +437,8 @@ msgstr "Bootstrap2" msgid "Bootstrap 2.x theme" msgstr "Bootstrap 2.x Thema" -#: plugins/topnav.py:58 views/dashboard.py:455 views/edit.py:361 -#: views/edit.py:370 +#: plugins/topnav.py:63 views/dashboard.py:462 views/edit.py:371 +#: views/edit.py:380 #, python-format msgid "Add %s" msgstr "Hinzufügen %s" @@ -520,9 +526,10 @@ msgstr "Seite konnte nicht gefunden werden" msgid "We're sorry, but the requested page could not be found." msgstr "Es tut uns leid, aber die angeforderte Seite konnte nicht gefunden werden." -#: templates/xadmin/500.html:7 templates/xadmin/base_site.html:53 +#: templates/xadmin/500.html:7 #: templates/xadmin/auth/user/change_password.html:10 #: templates/xadmin/auth/user/change_password.html:15 +#: templates/xadmin/base_site.html:56 #: templates/xadmin/includes/sitemenu_default.html:7 #: templates/xadmin/views/app_index.html:9 #: templates/xadmin/views/batch_change_form.html:9 @@ -533,7 +540,7 @@ msgstr "Es tut uns leid, aber die angeforderte Seite konnte nicht gefunden werde #: templates/xadmin/views/recover_form.html:8 #: templates/xadmin/views/recover_list.html:8 #: templates/xadmin/views/revision_diff.html:8 -#: templates/xadmin/views/revision_form.html:8 views/base.py:448 +#: templates/xadmin/views/revision_form.html:8 views/base.py:463 msgid "Home" msgstr "Startseite" @@ -553,18 +560,6 @@ msgstr "Server Fehler (500)" msgid "There's been an error. It's been reported to the site administrators via e-mail and should be fixed shortly. Thanks for your patience." msgstr "Es ist ein Fehler aufgetreten. Der Siteadmin wurde via E-Mail informiert und wird sich in Kürze um die Behebung des Fehlers kümmern. Wir danken für Ihre Geduld." -#: templates/xadmin/base_site.html:19 -msgid "Welcome," -msgstr "Willkommen," - -#: templates/xadmin/base_site.html:25 -msgid "Log out" -msgstr "Abmelden" - -#: templates/xadmin/base_site.html:37 -msgid "You don't have permission to edit anything." -msgstr "Sie haben nicht die notwendige Berechtigung etwas zu ändern." - #: templates/xadmin/auth/password_reset/complete.html:11 #: templates/xadmin/auth/password_reset/done.html:11 msgid "Password reset successful" @@ -666,11 +661,24 @@ msgstr "Geben Sie Ihr neues Passwort ein." msgid "Enter a new password for the user %(username)s." msgstr "Vergeben Sie ein neues Passwort für den Benutzer %(username)s." +#: templates/xadmin/base_site.html:21 +msgid "Welcome," +msgstr "Willkommen," + +#: templates/xadmin/base_site.html:27 +msgid "Log out" +msgstr "Abmelden" + +#: templates/xadmin/base_site.html:39 +msgid "You don't have permission to edit anything." +msgstr "Sie haben nicht die notwendige Berechtigung etwas zu ändern." + #: templates/xadmin/blocks/comm.top.theme.html:4 msgid "Themes" msgstr "Themeneinstellungen" #: templates/xadmin/blocks/comm.top.topnav.html:8 +#: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 #: templates/xadmin/filters/fk_search.html:14 @@ -696,7 +704,7 @@ msgstr "Nächstes" #: templates/xadmin/blocks/model_form.submit_line.wizard.html:31 #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Save" msgstr "Speichern" @@ -756,26 +764,27 @@ msgstr "Diagramme" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:4 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:8 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:19 -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:44 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:47 msgid "Export" msgstr "Exportieren" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:26 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:29 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:32 msgid "Export with table header." msgstr "Export mit Tabellenkopf." -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:32 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:35 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:38 msgid "Export with format." msgstr "Exportieren mit Formatierung." -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:39 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:42 msgid "Export all data." msgstr "Komplette Daten exportieren." -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:43 -#: templates/xadmin/widgets/base.html:40 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:46 +#: templates/xadmin/widgets/base.html:41 msgid "Close" msgstr "Schließen" @@ -885,7 +894,7 @@ msgid "Choose" msgstr "Wähle" #: templates/xadmin/forms/transfer.html:19 -#: templates/xadmin/widgets/base.html:39 +#: templates/xadmin/widgets/base.html:40 msgid "Remove" msgstr "Entferne" @@ -907,7 +916,7 @@ msgstr "Alles anzeigen" #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Saving.." msgstr "Speichern..." @@ -1147,18 +1156,22 @@ msgstr "" msgid "Quick Add" msgstr "Schnelles Hinzufügen" -#: templates/xadmin/widgets/base.html:30 +#: templates/xadmin/widgets/base.html:31 msgid "Widget Options" msgstr "Widget Optionen" -#: templates/xadmin/widgets/base.html:41 +#: templates/xadmin/widgets/base.html:42 msgid "Save changes" msgstr "Änderungen speichern" -#: views/base.py:430 +#: views/base.py:444 msgid "Django Xadmin" msgstr "Django Xadmin" +#: views/base.py:445 +msgid "my-company.inc" +msgstr "" + #: views/dashboard.py:185 msgid "Widget ID" msgstr "Widget ID" @@ -1167,39 +1180,39 @@ msgstr "Widget ID" msgid "Widget Title" msgstr "Widget Titel" -#: views/dashboard.py:248 +#: views/dashboard.py:249 msgid "Html Content Widget, can write any html content in widget." msgstr "" -#: views/dashboard.py:251 +#: views/dashboard.py:252 msgid "Html Content" msgstr "Html Inhalt" -#: views/dashboard.py:314 +#: views/dashboard.py:315 msgid "Target Model" msgstr "Zielmodell" -#: views/dashboard.py:365 +#: views/dashboard.py:366 msgid "Quick button Widget, quickly open any page." msgstr "Schnellauswahlbutton Widget, zum schnellen Öffnen einer beliebigen Seite." -#: views/dashboard.py:367 +#: views/dashboard.py:368 msgid "Quick Buttons" msgstr "Schnellauswahl Buttons" -#: views/dashboard.py:408 +#: views/dashboard.py:413 msgid "Any Objects list Widget." msgstr "Beliebige Objektliste Widget." -#: views/dashboard.py:447 +#: views/dashboard.py:453 msgid "Add any model object Widget." msgstr "Fügen Sie ein beliebiges Modell Objekt Widget hinzu." -#: views/dashboard.py:481 +#: views/dashboard.py:488 msgid "Dashboard" msgstr "Armaturentafel" -#: views/dashboard.py:622 +#: views/dashboard.py:629 #, python-format msgid "%s Dashboard" msgstr "%s Armaturentafel" @@ -1209,7 +1222,7 @@ msgstr "%s Armaturentafel" msgid "The %(name)s \"%(obj)s\" was deleted successfully." msgstr "" -#: views/detail.py:172 views/edit.py:199 views/form.py:72 +#: views/detail.py:172 views/edit.py:209 views/form.py:72 msgid "Other Fields" msgstr "Andere Felder" @@ -1218,26 +1231,26 @@ msgstr "Andere Felder" msgid "%s Detail" msgstr "%s Einzelheiten" -#: views/edit.py:394 +#: views/edit.py:404 #, python-format msgid "The %(name)s \"%(obj)s\" was added successfully." msgstr "%(name)s \"%(obj)s\" wurde erfolgreich hinzugefügt." -#: views/edit.py:399 views/edit.py:494 +#: views/edit.py:409 views/edit.py:504 msgid "You may edit it again below." msgstr "Sie können es trotzdem nochmals bearbeiten." -#: views/edit.py:403 views/edit.py:497 +#: views/edit.py:413 views/edit.py:507 #, python-format msgid "You may add another %s below." msgstr "Sie können unten ein weiteres %s hinzufügen." -#: views/edit.py:445 +#: views/edit.py:455 #, python-format msgid "Change %s" msgstr "Ändern %s" -#: views/edit.py:490 +#: views/edit.py:500 #, python-format msgid "The %(name)s \"%(obj)s\" was changed successfully." msgstr "" @@ -1271,3 +1284,7 @@ msgstr "Sortierung abbrechen" #: views/website.py:16 msgid "Main Dashboard" msgstr "Hauptübersicht" + +#: widgets.py:48 +msgid "Now" +msgstr "Jetzt" diff --git a/xadmin/locale/en/LC_MESSAGES/django.mo b/xadmin/locale/en/LC_MESSAGES/django.mo index 8b93a210452d564fa2f3727bab1859bfaba1289c..47822d849899ae09e279d9725c86af4b651cdc3c 100644 GIT binary patch delta 24 fcmbQoJdb%o7q6MFfsw9}xq_jgm8tQ@>FkUEQ$z+i delta 24 fcmbQoJdb%o7q5w~fuXLUfr6odm9gQ*>FkUEQk@1V diff --git a/xadmin/locale/en/LC_MESSAGES/django.po b/xadmin/locale/en/LC_MESSAGES/django.po index b9e77c1c7..4fd99de82 100644 --- a/xadmin/locale/en/LC_MESSAGES/django.po +++ b/xadmin/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-10 10:31+0800\n" +"POT-Creation-Date: 2016-02-27 11:53+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,47 +18,51 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=1;\n" -#: filters.py:157 filters.py:189 filters.py:401 filters.py:451 +#: apps.py:10 +msgid "Administration" +msgstr "" + +#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 msgid "All" msgstr "" -#: filters.py:158 plugins/export.py:117 +#: filters.py:159 plugins/export.py:162 msgid "Yes" msgstr "" -#: filters.py:159 plugins/export.py:117 +#: filters.py:160 plugins/export.py:162 msgid "No" msgstr "" -#: filters.py:173 +#: filters.py:174 msgid "Unknown" msgstr "" -#: filters.py:265 +#: filters.py:266 msgid "Any date" msgstr "" -#: filters.py:266 +#: filters.py:267 msgid "Has date" msgstr "" -#: filters.py:269 +#: filters.py:270 msgid "Has no date" msgstr "" -#: filters.py:272 widgets.py:30 +#: filters.py:273 widgets.py:30 msgid "Today" msgstr "" -#: filters.py:276 +#: filters.py:277 msgid "Past 7 days" msgstr "" -#: filters.py:280 +#: filters.py:281 msgid "This month" msgstr "" -#: filters.py:284 +#: filters.py:285 msgid "This year" msgstr "" @@ -95,7 +99,7 @@ msgstr "" msgid "Is Shared" msgstr "" -#: models.py:65 plugins/bookmark.py:49 plugins/bookmark.py:177 +#: models.py:65 plugins/bookmark.py:49 plugins/bookmark.py:178 msgid "Bookmark" msgstr "" @@ -139,42 +143,38 @@ msgstr "" msgid "User Widgets" msgstr "" -#: widgets.py:48 -msgid "Now" -msgstr "" - #: plugins/actions.py:54 #, python-format msgid "Delete selected %(verbose_name_plural)s" msgstr "" -#: plugins/actions.py:67 +#: plugins/actions.py:73 #, python-format msgid "Successfully deleted %(count)d %(items)s." msgstr "" -#: plugins/actions.py:99 views/delete.py:68 +#: plugins/actions.py:105 views/delete.py:68 #, python-format msgid "Cannot delete %(name)s" msgstr "" -#: plugins/actions.py:101 views/delete.py:71 +#: plugins/actions.py:107 views/delete.py:71 msgid "Are you sure?" msgstr "" -#: plugins/actions.py:147 +#: plugins/actions.py:153 #, python-format msgid "%(total_count)s selected" msgid_plural "All %(total_count)s selected" msgstr[0] "" msgstr[1] "" -#: plugins/actions.py:151 +#: plugins/actions.py:157 #, python-format msgid "0 of %(cnt)s selected" msgstr "" -#: plugins/actions.py:168 plugins/actions.py:178 +#: plugins/actions.py:174 plugins/actions.py:184 msgid "Items must be selected in order to perform actions on them. No items have been changed." msgstr "" @@ -243,21 +243,21 @@ msgstr "" msgid "Permission Name" msgstr "" -#: plugins/auth.py:159 +#: plugins/auth.py:167 #, fuzzy msgid "Change Password" msgstr "Changed Password" -#: plugins/auth.py:189 +#: plugins/auth.py:197 #, python-format msgid "Change password: %s" msgstr "" -#: plugins/auth.py:214 plugins/auth.py:246 +#: plugins/auth.py:222 plugins/auth.py:254 msgid "Password changed successfully." msgstr "" -#: plugins/auth.py:233 templates/xadmin/auth/user/change_password.html:11 +#: plugins/auth.py:241 templates/xadmin/auth/user/change_password.html:11 #: templates/xadmin/auth/user/change_password.html:22 #: templates/xadmin/auth/user/change_password.html:55 msgid "Change password" @@ -272,12 +272,12 @@ msgstr "" msgid "Batch Change selected %(verbose_name_plural)s" msgstr "" -#: plugins/batch.py:90 +#: plugins/batch.py:88 #, python-format msgid "Successfully change %(count)d %(items)s." msgstr "" -#: plugins/batch.py:138 +#: plugins/batch.py:136 #, python-format msgid "Batch change %s" msgstr "" @@ -286,7 +286,7 @@ msgstr "" msgid "bookmark" msgstr "" -#: plugins/bookmark.py:173 +#: plugins/bookmark.py:174 msgid "Bookmark Widget, can show user's bookmark list data in widget." msgstr "" @@ -294,7 +294,7 @@ msgstr "" msgid "Show models simple chart." msgstr "" -#: plugins/chart.py:49 +#: plugins/chart.py:50 #, python-format msgid "%s Charts" msgstr "" @@ -340,27 +340,27 @@ msgid_plural "%(count)s comments were successfully %(action)s." msgstr[0] "" msgstr[1] "" -#: plugins/details.py:52 views/list.py:576 +#: plugins/details.py:52 views/list.py:579 #, python-format msgid "Details of %s" msgstr "" -#: plugins/editable.py:47 +#: plugins/editable.py:46 #, python-format msgid "Enter %s" msgstr "" -#: plugins/editable.py:74 views/dashboard.py:638 views/delete.py:26 -#: views/detail.py:144 views/edit.py:428 +#: plugins/editable.py:73 views/dashboard.py:645 views/delete.py:26 +#: views/detail.py:144 views/edit.py:438 #, python-format msgid "%(name)s object with primary key %(key)r does not exist." msgstr "" -#: plugins/export.py:87 +#: plugins/export.py:95 plugins/export.py:132 msgid "Sheet" msgstr "" -#: plugins/filters.py:125 +#: plugins/filters.py:132 plugins/quickfilter.py:140 #, python-format msgid "Filtering error: %s" msgstr "" @@ -397,7 +397,7 @@ msgstr "" msgid "Forgotten your password or username?" msgstr "" -#: plugins/quickform.py:77 +#: plugins/quickform.py:79 #, python-format msgid "Create New %s" msgstr "" @@ -406,11 +406,16 @@ msgstr "" msgid "Related Objects" msgstr "" -#: plugins/relfield.py:29 plugins/topnav.py:35 +#: plugins/relfield.py:29 plugins/topnav.py:38 #, python-format msgid "Search %s" msgstr "" +#: plugins/relfield.py:67 +#, python-format +msgid "Select %s" +msgstr "" + #: plugins/themes.py:47 msgid "Default" msgstr "" @@ -427,8 +432,8 @@ msgstr "" msgid "Bootstrap 2.x theme" msgstr "" -#: plugins/topnav.py:58 views/dashboard.py:455 views/edit.py:361 -#: views/edit.py:370 +#: plugins/topnav.py:63 views/dashboard.py:462 views/edit.py:371 +#: views/edit.py:380 #, python-format msgid "Add %s" msgstr "" @@ -516,9 +521,10 @@ msgstr "" msgid "We're sorry, but the requested page could not be found." msgstr "" -#: templates/xadmin/500.html:7 templates/xadmin/base_site.html:53 +#: templates/xadmin/500.html:7 #: templates/xadmin/auth/user/change_password.html:10 #: templates/xadmin/auth/user/change_password.html:15 +#: templates/xadmin/base_site.html:56 #: templates/xadmin/includes/sitemenu_default.html:7 #: templates/xadmin/views/app_index.html:9 #: templates/xadmin/views/batch_change_form.html:9 @@ -529,7 +535,7 @@ msgstr "" #: templates/xadmin/views/recover_form.html:8 #: templates/xadmin/views/recover_list.html:8 #: templates/xadmin/views/revision_diff.html:8 -#: templates/xadmin/views/revision_form.html:8 views/base.py:448 +#: templates/xadmin/views/revision_form.html:8 views/base.py:463 msgid "Home" msgstr "" @@ -549,18 +555,6 @@ msgstr "" msgid "There's been an error. It's been reported to the site administrators via e-mail and should be fixed shortly. Thanks for your patience." msgstr "" -#: templates/xadmin/base_site.html:19 -msgid "Welcome," -msgstr "" - -#: templates/xadmin/base_site.html:25 -msgid "Log out" -msgstr "" - -#: templates/xadmin/base_site.html:37 -msgid "You don't have permission to edit anything." -msgstr "" - #: templates/xadmin/auth/password_reset/complete.html:11 #: templates/xadmin/auth/password_reset/done.html:11 msgid "Password reset successful" @@ -662,11 +656,24 @@ msgstr "" msgid "Enter a new password for the user %(username)s." msgstr "" +#: templates/xadmin/base_site.html:21 +msgid "Welcome," +msgstr "" + +#: templates/xadmin/base_site.html:27 +msgid "Log out" +msgstr "" + +#: templates/xadmin/base_site.html:39 +msgid "You don't have permission to edit anything." +msgstr "" + #: templates/xadmin/blocks/comm.top.theme.html:4 msgid "Themes" msgstr "" #: templates/xadmin/blocks/comm.top.topnav.html:8 +#: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 #: templates/xadmin/filters/fk_search.html:14 @@ -692,7 +699,7 @@ msgstr "" #: templates/xadmin/blocks/model_form.submit_line.wizard.html:31 #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Save" msgstr "" @@ -752,26 +759,27 @@ msgstr "" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:4 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:8 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:19 -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:44 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:47 msgid "Export" msgstr "" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:26 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:29 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:32 msgid "Export with table header." msgstr "" -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:32 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:35 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:38 msgid "Export with format." msgstr "" -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:39 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:42 msgid "Export all data." msgstr "" -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:43 -#: templates/xadmin/widgets/base.html:40 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:46 +#: templates/xadmin/widgets/base.html:41 msgid "Close" msgstr "" @@ -881,7 +889,7 @@ msgid "Choose" msgstr "" #: templates/xadmin/forms/transfer.html:19 -#: templates/xadmin/widgets/base.html:39 +#: templates/xadmin/widgets/base.html:40 msgid "Remove" msgstr "" @@ -903,7 +911,7 @@ msgstr "" #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Saving.." msgstr "" @@ -1142,18 +1150,22 @@ msgstr "" msgid "Quick Add" msgstr "" -#: templates/xadmin/widgets/base.html:30 +#: templates/xadmin/widgets/base.html:31 msgid "Widget Options" msgstr "" -#: templates/xadmin/widgets/base.html:41 +#: templates/xadmin/widgets/base.html:42 msgid "Save changes" msgstr "" -#: views/base.py:430 +#: views/base.py:444 msgid "Django Xadmin" msgstr "" +#: views/base.py:445 +msgid "my-company.inc" +msgstr "" + #: views/dashboard.py:185 msgid "Widget ID" msgstr "" @@ -1162,39 +1174,39 @@ msgstr "" msgid "Widget Title" msgstr "" -#: views/dashboard.py:248 +#: views/dashboard.py:249 msgid "Html Content Widget, can write any html content in widget." msgstr "" -#: views/dashboard.py:251 +#: views/dashboard.py:252 msgid "Html Content" msgstr "" -#: views/dashboard.py:314 +#: views/dashboard.py:315 msgid "Target Model" msgstr "" -#: views/dashboard.py:365 +#: views/dashboard.py:366 msgid "Quick button Widget, quickly open any page." msgstr "" -#: views/dashboard.py:367 +#: views/dashboard.py:368 msgid "Quick Buttons" msgstr "" -#: views/dashboard.py:408 +#: views/dashboard.py:413 msgid "Any Objects list Widget." msgstr "" -#: views/dashboard.py:447 +#: views/dashboard.py:453 msgid "Add any model object Widget." msgstr "" -#: views/dashboard.py:481 +#: views/dashboard.py:488 msgid "Dashboard" msgstr "" -#: views/dashboard.py:622 +#: views/dashboard.py:629 #, python-format msgid "%s Dashboard" msgstr "" @@ -1204,7 +1216,7 @@ msgstr "" msgid "The %(name)s \"%(obj)s\" was deleted successfully." msgstr "" -#: views/detail.py:172 views/edit.py:199 views/form.py:72 +#: views/detail.py:172 views/edit.py:209 views/form.py:72 msgid "Other Fields" msgstr "" @@ -1213,26 +1225,26 @@ msgstr "" msgid "%s Detail" msgstr "" -#: views/edit.py:394 +#: views/edit.py:404 #, python-format msgid "The %(name)s \"%(obj)s\" was added successfully." msgstr "" -#: views/edit.py:399 views/edit.py:494 +#: views/edit.py:409 views/edit.py:504 msgid "You may edit it again below." msgstr "" -#: views/edit.py:403 views/edit.py:497 +#: views/edit.py:413 views/edit.py:507 #, python-format msgid "You may add another %s below." msgstr "" -#: views/edit.py:445 +#: views/edit.py:455 #, python-format msgid "Change %s" msgstr "" -#: views/edit.py:490 +#: views/edit.py:500 #, python-format msgid "The %(name)s \"%(obj)s\" was changed successfully." msgstr "" @@ -1266,3 +1278,7 @@ msgstr "" #: views/website.py:16 msgid "Main Dashboard" msgstr "" + +#: widgets.py:48 +msgid "Now" +msgstr "" diff --git a/xadmin/locale/es_MX/LC_MESSAGES/django.mo b/xadmin/locale/es_MX/LC_MESSAGES/django.mo index 4aed4ac37ff89c2bfcc69f22ec74380524504db9..34f3b04b09154dc68f56dfe5e3f16724bd940fe8 100644 GIT binary patch delta 28 jcmeB~!Pql{al=|2UNc<-BV8kN1w%tCQ{&CMbb{mog1QK5 delta 28 jcmeB~!Pql{al=|2UK3pdLtR4y1w#WXW5dn6bb{mof&&Oz diff --git a/xadmin/locale/es_MX/LC_MESSAGES/django.po b/xadmin/locale/es_MX/LC_MESSAGES/django.po index 926e94116..e983f586d 100644 --- a/xadmin/locale/es_MX/LC_MESSAGES/django.po +++ b/xadmin/locale/es_MX/LC_MESSAGES/django.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: xadmin-core\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-10 10:31+0800\n" +"POT-Creation-Date: 2016-02-27 11:53+0800\n" "PO-Revision-Date: 2013-05-12 18:45+0000\n" "Last-Translator: sacrac \n" "Language-Team: Spanish (Mexico) (http://www.transifex.com/projects/p/xadmin/language/es_MX/)\n" @@ -24,49 +24,53 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: filters.py:157 filters.py:189 filters.py:401 filters.py:451 +#: apps.py:10 +msgid "Administration" +msgstr "" + +#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 msgid "All" msgstr "Todo" -#: filters.py:158 plugins/export.py:117 +#: filters.py:159 plugins/export.py:162 msgid "Yes" msgstr "Sí" -#: filters.py:159 plugins/export.py:117 +#: filters.py:160 plugins/export.py:162 msgid "No" msgstr "No" -#: filters.py:173 +#: filters.py:174 msgid "Unknown" msgstr "Desconocido" -#: filters.py:265 +#: filters.py:266 msgid "Any date" msgstr "Cualquier fecha" -#: filters.py:266 +#: filters.py:267 #, fuzzy msgid "Has date" msgstr "Cualquier fecha" -#: filters.py:269 +#: filters.py:270 #, fuzzy msgid "Has no date" msgstr "Cualquier fecha" -#: filters.py:272 widgets.py:30 +#: filters.py:273 widgets.py:30 msgid "Today" msgstr "Hoy" -#: filters.py:276 +#: filters.py:277 msgid "Past 7 days" msgstr "Pasados ​​7 días" -#: filters.py:280 +#: filters.py:281 msgid "This month" msgstr "Este mes" -#: filters.py:284 +#: filters.py:285 msgid "This year" msgstr "Este año" @@ -103,7 +107,7 @@ msgstr "Cadena de consulta" msgid "Is Shared" msgstr "Es compartido" -#: models.py:65 plugins/bookmark.py:49 plugins/bookmark.py:177 +#: models.py:65 plugins/bookmark.py:49 plugins/bookmark.py:178 msgid "Bookmark" msgstr "Marcador" @@ -147,42 +151,38 @@ msgstr "Widget del Usuario" msgid "User Widgets" msgstr "Widgets del Usuario" -#: widgets.py:48 -msgid "Now" -msgstr "Ahora" - #: plugins/actions.py:54 #, python-format msgid "Delete selected %(verbose_name_plural)s" msgstr "Borrar selección %(verbose_name_plural)s" -#: plugins/actions.py:67 +#: plugins/actions.py:73 #, python-format msgid "Successfully deleted %(count)d %(items)s." msgstr "Correctamente eliminado %(count)d %(items)s." -#: plugins/actions.py:99 views/delete.py:68 +#: plugins/actions.py:105 views/delete.py:68 #, python-format msgid "Cannot delete %(name)s" msgstr "No se puede eliminar %(name)s" -#: plugins/actions.py:101 views/delete.py:71 +#: plugins/actions.py:107 views/delete.py:71 msgid "Are you sure?" msgstr "Esta seguro?" -#: plugins/actions.py:147 +#: plugins/actions.py:153 #, python-format msgid "%(total_count)s selected" msgid_plural "All %(total_count)s selected" msgstr[0] "%(total_count)s seleccionados" msgstr[1] "Todos los %(total_count)s seleccionados" -#: plugins/actions.py:151 +#: plugins/actions.py:157 #, python-format msgid "0 of %(cnt)s selected" msgstr "0 de %(cnt)s seleccionado" -#: plugins/actions.py:168 plugins/actions.py:178 +#: plugins/actions.py:174 plugins/actions.py:184 msgid "Items must be selected in order to perform actions on them. No items have been changed." msgstr "Los articulos deben de ser seleccionados en orden para realizar la acción. No existen artículos que han cambiado" @@ -252,21 +252,21 @@ msgstr "Estados" msgid "Permission Name" msgstr "Permisos" -#: plugins/auth.py:159 +#: plugins/auth.py:167 #, fuzzy msgid "Change Password" msgstr "Cambiar Contraseña" -#: plugins/auth.py:189 +#: plugins/auth.py:197 #, python-format msgid "Change password: %s" msgstr "Cambiar contraseña: %s" -#: plugins/auth.py:214 plugins/auth.py:246 +#: plugins/auth.py:222 plugins/auth.py:254 msgid "Password changed successfully." msgstr "Contraseña cambiada correctamente" -#: plugins/auth.py:233 templates/xadmin/auth/user/change_password.html:11 +#: plugins/auth.py:241 templates/xadmin/auth/user/change_password.html:11 #: templates/xadmin/auth/user/change_password.html:22 #: templates/xadmin/auth/user/change_password.html:55 msgid "Change password" @@ -282,12 +282,12 @@ msgstr "Historial de cambios: %s" msgid "Batch Change selected %(verbose_name_plural)s" msgstr "Cambio de grupo seleccionado %(verbose_name_plural)s" -#: plugins/batch.py:90 +#: plugins/batch.py:88 #, fuzzy, python-format msgid "Successfully change %(count)d %(items)s." msgstr "Correctamente eliminado %(count)d %(items)s." -#: plugins/batch.py:138 +#: plugins/batch.py:136 #, fuzzy, python-format msgid "Batch change %s" msgstr "Cambiar %s" @@ -297,7 +297,7 @@ msgstr "Cambiar %s" msgid "bookmark" msgstr "Marcador" -#: plugins/bookmark.py:173 +#: plugins/bookmark.py:174 msgid "Bookmark Widget, can show user's bookmark list data in widget." msgstr "Widget de marcador, puede mostrar datos de la lista de favoritos del usuario en el widget." @@ -305,7 +305,7 @@ msgstr "Widget de marcador, puede mostrar datos de la lista de favoritos del usu msgid "Show models simple chart." msgstr "Mostrar simple grafos para los modelos" -#: plugins/chart.py:49 +#: plugins/chart.py:50 #, python-format msgid "%s Charts" msgstr "%s Graficos" @@ -353,27 +353,27 @@ msgid_plural "%(count)s comments were successfully %(action)s." msgstr[0] "" msgstr[1] "" -#: plugins/details.py:52 views/list.py:576 +#: plugins/details.py:52 views/list.py:579 #, python-format msgid "Details of %s" msgstr "Detalles de %s" -#: plugins/editable.py:47 +#: plugins/editable.py:46 #, python-format msgid "Enter %s" msgstr "Entre %s" -#: plugins/editable.py:74 views/dashboard.py:638 views/delete.py:26 -#: views/detail.py:144 views/edit.py:428 +#: plugins/editable.py:73 views/dashboard.py:645 views/delete.py:26 +#: views/detail.py:144 views/edit.py:438 #, python-format msgid "%(name)s object with primary key %(key)r does not exist." msgstr "%(name)s el objeto con la llave primaria %(key)r no existe." -#: plugins/export.py:87 +#: plugins/export.py:95 plugins/export.py:132 msgid "Sheet" msgstr "Hoja" -#: plugins/filters.py:125 +#: plugins/filters.py:132 plugins/quickfilter.py:140 #, python-format msgid "Filtering error: %s" msgstr "" @@ -410,7 +410,7 @@ msgstr "" msgid "Forgotten your password or username?" msgstr "¿Olvidó su contraseña o nombre de usuario?" -#: plugins/quickform.py:77 +#: plugins/quickform.py:79 #, python-format msgid "Create New %s" msgstr "" @@ -419,11 +419,17 @@ msgstr "" msgid "Related Objects" msgstr "Objetos relacionados" -#: plugins/relfield.py:29 plugins/topnav.py:35 +#: plugins/relfield.py:29 plugins/topnav.py:38 #, python-format msgid "Search %s" msgstr "Buscar %s" +#: plugins/relfield.py:67 +#, fuzzy, python-format +#| msgid "Select Date" +msgid "Select %s" +msgstr "Seleccionar Fecha" + #: plugins/themes.py:47 #, fuzzy msgid "Default" @@ -443,8 +449,8 @@ msgstr "" msgid "Bootstrap 2.x theme" msgstr "Tema bootstrap por defecto" -#: plugins/topnav.py:58 views/dashboard.py:455 views/edit.py:361 -#: views/edit.py:370 +#: plugins/topnav.py:63 views/dashboard.py:462 views/edit.py:371 +#: views/edit.py:380 #, python-format msgid "Add %s" msgstr "Añadir %s" @@ -532,9 +538,10 @@ msgstr "Pagina no encontrada" msgid "We're sorry, but the requested page could not be found." msgstr "Lo sentimos pero la pagina que usted solicita no se encuentra." -#: templates/xadmin/500.html:7 templates/xadmin/base_site.html:53 +#: templates/xadmin/500.html:7 #: templates/xadmin/auth/user/change_password.html:10 #: templates/xadmin/auth/user/change_password.html:15 +#: templates/xadmin/base_site.html:56 #: templates/xadmin/includes/sitemenu_default.html:7 #: templates/xadmin/views/app_index.html:9 #: templates/xadmin/views/batch_change_form.html:9 @@ -545,7 +552,7 @@ msgstr "Lo sentimos pero la pagina que usted solicita no se encuentra." #: templates/xadmin/views/recover_form.html:8 #: templates/xadmin/views/recover_list.html:8 #: templates/xadmin/views/revision_diff.html:8 -#: templates/xadmin/views/revision_form.html:8 views/base.py:448 +#: templates/xadmin/views/revision_form.html:8 views/base.py:463 msgid "Home" msgstr "Inicio" @@ -565,18 +572,6 @@ msgstr "Error en el servidor (500)" msgid "There's been an error. It's been reported to the site administrators via e-mail and should be fixed shortly. Thanks for your patience." msgstr "Ha habido un error. Se nos ha informado a los administradores del sitio a través de un correo electrónico y debe repararse en la breve. Gracias por su paciencia." -#: templates/xadmin/base_site.html:19 -msgid "Welcome," -msgstr "Bienvenidos," - -#: templates/xadmin/base_site.html:25 -msgid "Log out" -msgstr "Salir" - -#: templates/xadmin/base_site.html:37 -msgid "You don't have permission to edit anything." -msgstr "No tiene permiso para editar nada. " - #: templates/xadmin/auth/password_reset/complete.html:11 #: templates/xadmin/auth/password_reset/done.html:11 msgid "Password reset successful" @@ -678,11 +673,24 @@ msgstr "Ingresa una nueva contraseña" msgid "Enter a new password for the user %(username)s." msgstr "Introduzca una nueva contraseña para el usuario %(username)s" +#: templates/xadmin/base_site.html:21 +msgid "Welcome," +msgstr "Bienvenidos," + +#: templates/xadmin/base_site.html:27 +msgid "Log out" +msgstr "Salir" + +#: templates/xadmin/base_site.html:39 +msgid "You don't have permission to edit anything." +msgstr "No tiene permiso para editar nada. " + #: templates/xadmin/blocks/comm.top.theme.html:4 msgid "Themes" msgstr "Temas" #: templates/xadmin/blocks/comm.top.topnav.html:8 +#: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 #: templates/xadmin/filters/fk_search.html:14 @@ -708,7 +716,7 @@ msgstr "Próximo paso" #: templates/xadmin/blocks/model_form.submit_line.wizard.html:31 #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Save" msgstr "Guardar" @@ -768,26 +776,27 @@ msgstr "Graficos" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:4 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:8 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:19 -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:44 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:47 msgid "Export" msgstr "Exportar" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:26 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:29 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:32 msgid "Export with table header." msgstr "Exportar con la cabecera de la tabla." -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:32 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:35 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:38 msgid "Export with format." msgstr "Exportar con formato" -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:39 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:42 msgid "Export all data." msgstr "Exportar todos los datos." -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:43 -#: templates/xadmin/widgets/base.html:40 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:46 +#: templates/xadmin/widgets/base.html:41 msgid "Close" msgstr "Cerrar" @@ -897,7 +906,7 @@ msgid "Choose" msgstr "Elegir" #: templates/xadmin/forms/transfer.html:19 -#: templates/xadmin/widgets/base.html:39 +#: templates/xadmin/widgets/base.html:40 msgid "Remove" msgstr "Eliminar" @@ -919,7 +928,7 @@ msgstr "Mostrar todos" #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Saving.." msgstr "" @@ -1162,18 +1171,22 @@ msgstr "Agregado exitosa mente, presiona edit para edit msgid "Quick Add" msgstr "Agregar rápidamente." -#: templates/xadmin/widgets/base.html:30 +#: templates/xadmin/widgets/base.html:31 msgid "Widget Options" msgstr "Opciones del Widget" -#: templates/xadmin/widgets/base.html:41 +#: templates/xadmin/widgets/base.html:42 msgid "Save changes" msgstr "Guardar cambios" -#: views/base.py:430 +#: views/base.py:444 msgid "Django Xadmin" msgstr "Django Xadmin" +#: views/base.py:445 +msgid "my-company.inc" +msgstr "" + #: views/dashboard.py:185 msgid "Widget ID" msgstr "ID del Widget" @@ -1182,39 +1195,39 @@ msgstr "ID del Widget" msgid "Widget Title" msgstr "Titulo del Widget" -#: views/dashboard.py:248 +#: views/dashboard.py:249 msgid "Html Content Widget, can write any html content in widget." msgstr "Contenido html del Widget, puede escribir cualquier contenido del widget." -#: views/dashboard.py:251 +#: views/dashboard.py:252 msgid "Html Content" msgstr "Contenido HTML" -#: views/dashboard.py:314 +#: views/dashboard.py:315 msgid "Target Model" msgstr "Modelo objeto" -#: views/dashboard.py:365 +#: views/dashboard.py:366 msgid "Quick button Widget, quickly open any page." msgstr "botón rapido del widget, abrir rápidamente cualquier página." -#: views/dashboard.py:367 +#: views/dashboard.py:368 msgid "Quick Buttons" msgstr "Botones rapidos" -#: views/dashboard.py:408 +#: views/dashboard.py:413 msgid "Any Objects list Widget." msgstr "Cualquier objeto listado en el widget" -#: views/dashboard.py:447 +#: views/dashboard.py:453 msgid "Add any model object Widget." msgstr "Añadir cualquier modelo de objeto al Widget." -#: views/dashboard.py:481 +#: views/dashboard.py:488 msgid "Dashboard" msgstr "Panel de control" -#: views/dashboard.py:622 +#: views/dashboard.py:629 #, fuzzy, python-format msgid "%s Dashboard" msgstr "Panel de control" @@ -1224,7 +1237,7 @@ msgstr "Panel de control" msgid "The %(name)s \"%(obj)s\" was deleted successfully." msgstr "El %(name)s \"%(obj)s\" fue eliminado exitosa mente." -#: views/detail.py:172 views/edit.py:199 views/form.py:72 +#: views/detail.py:172 views/edit.py:209 views/form.py:72 msgid "Other Fields" msgstr "Otros campos" @@ -1233,26 +1246,26 @@ msgstr "Otros campos" msgid "%s Detail" msgstr "%s Detalles" -#: views/edit.py:394 +#: views/edit.py:404 #, python-format msgid "The %(name)s \"%(obj)s\" was added successfully." msgstr "El %(name)s \"%(obj)s\" fue agregado exitosa mente." -#: views/edit.py:399 views/edit.py:494 +#: views/edit.py:409 views/edit.py:504 msgid "You may edit it again below." msgstr "Puedes editarlo de nuevo abajo." -#: views/edit.py:403 views/edit.py:497 +#: views/edit.py:413 views/edit.py:507 #, python-format msgid "You may add another %s below." msgstr "Puedes agregar otro %s debajo." -#: views/edit.py:445 +#: views/edit.py:455 #, python-format msgid "Change %s" msgstr "Cambiar %s" -#: views/edit.py:490 +#: views/edit.py:500 #, python-format msgid "The %(name)s \"%(obj)s\" was changed successfully." msgstr "El %(name)s \"%(obj)s\" fue editado exitosa mente." @@ -1287,6 +1300,10 @@ msgstr "Cancelar ordenación" msgid "Main Dashboard" msgstr "Dashboard principal." +#: widgets.py:48 +msgid "Now" +msgstr "Ahora" + #~ msgid "Add Other %s" #~ msgstr "Añadir otro %s" diff --git a/xadmin/locale/eu/LC_MESSAGES/django.mo b/xadmin/locale/eu/LC_MESSAGES/django.mo index 447238977cf3a1125b1f789b005c2d07d7a33443..9e6fb3489e7d2a3a4bba24a4a9aea5511704a982 100644 GIT binary patch delta 28 kcmX>(h4JJR#tmn6c+GSTjC7666$}lnOpQ0+(#e+v0FmbjHvj+t delta 28 kcmX>(h4JJR#tmn6cujN-40R0+6buclj14#6(#e+v0Ff{WCjbBd diff --git a/xadmin/locale/eu/LC_MESSAGES/django.po b/xadmin/locale/eu/LC_MESSAGES/django.po index 49534a164..7bfa3f193 100644 --- a/xadmin/locale/eu/LC_MESSAGES/django.po +++ b/xadmin/locale/eu/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: xadmin-core\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-10 10:31+0800\n" +"POT-Creation-Date: 2016-02-27 11:53+0800\n" "PO-Revision-Date: 2013-11-20 10:21+0000\n" "Last-Translator: sshwsfc \n" "Language-Team: Basque (http://www.transifex.com/projects/p/xadmin/language/eu/)\n" @@ -18,47 +18,51 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: filters.py:157 filters.py:189 filters.py:401 filters.py:451 +#: apps.py:10 +msgid "Administration" +msgstr "" + +#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 msgid "All" msgstr "Guztia" -#: filters.py:158 plugins/export.py:117 +#: filters.py:159 plugins/export.py:162 msgid "Yes" msgstr "Bai" -#: filters.py:159 plugins/export.py:117 +#: filters.py:160 plugins/export.py:162 msgid "No" msgstr "Ez" -#: filters.py:173 +#: filters.py:174 msgid "Unknown" msgstr "Ezezaguna" -#: filters.py:265 +#: filters.py:266 msgid "Any date" msgstr "Edozein data" -#: filters.py:266 +#: filters.py:267 msgid "Has date" msgstr "" -#: filters.py:269 +#: filters.py:270 msgid "Has no date" msgstr "" -#: filters.py:272 widgets.py:30 +#: filters.py:273 widgets.py:30 msgid "Today" msgstr "Gaur" -#: filters.py:276 +#: filters.py:277 msgid "Past 7 days" msgstr "Duela 7 egun" -#: filters.py:280 +#: filters.py:281 msgid "This month" msgstr "Hilabete hau" -#: filters.py:284 +#: filters.py:285 msgid "This year" msgstr "Urte hau" @@ -95,7 +99,7 @@ msgstr "Kontsulta Katea" msgid "Is Shared" msgstr "Partekatua da." -#: models.py:65 plugins/bookmark.py:49 plugins/bookmark.py:177 +#: models.py:65 plugins/bookmark.py:49 plugins/bookmark.py:178 msgid "Bookmark" msgstr "Laster-marketara gehitu" @@ -139,42 +143,38 @@ msgstr "Erabiltzaile Widgeta" msgid "User Widgets" msgstr "Erabiltzaile Widgetak" -#: widgets.py:48 -msgid "Now" -msgstr "Orain" - #: plugins/actions.py:54 #, python-format msgid "Delete selected %(verbose_name_plural)s" msgstr "Aukeratutako %(verbose_name_plural)s ezabatu" -#: plugins/actions.py:67 +#: plugins/actions.py:73 #, python-format msgid "Successfully deleted %(count)d %(items)s." msgstr "Aukeratutako %(count)d %(items)s arrakastaz ezabatuak." -#: plugins/actions.py:99 views/delete.py:68 +#: plugins/actions.py:105 views/delete.py:68 #, python-format msgid "Cannot delete %(name)s" msgstr "Ezin izan da %(name)s ezabatu" -#: plugins/actions.py:101 views/delete.py:71 +#: plugins/actions.py:107 views/delete.py:71 msgid "Are you sure?" msgstr "Ziur al zaude?" -#: plugins/actions.py:147 +#: plugins/actions.py:153 #, python-format msgid "%(total_count)s selected" msgid_plural "All %(total_count)s selected" msgstr[0] "%(total_count)s aukeratua" msgstr[1] "%(total_count)s guztiak aukeratuak" -#: plugins/actions.py:151 +#: plugins/actions.py:157 #, python-format msgid "0 of %(cnt)s selected" msgstr "%(cnt)stik 0 aukeratuak" -#: plugins/actions.py:168 plugins/actions.py:178 +#: plugins/actions.py:174 plugins/actions.py:184 msgid "Items must be selected in order to perform actions on them. No items have been changed." msgstr "Elementuren bat aukeratzea beharrezkoa da ekintza bat burutzeko. Ez da elementurik aldatu." @@ -244,20 +244,20 @@ msgstr "Egoera" msgid "Permission Name" msgstr "Baimenak" -#: plugins/auth.py:159 +#: plugins/auth.py:167 msgid "Change Password" msgstr "Pasahitza Aldatu" -#: plugins/auth.py:189 +#: plugins/auth.py:197 #, python-format msgid "Change password: %s" msgstr "Pasahitza aldatu: %s" -#: plugins/auth.py:214 plugins/auth.py:246 +#: plugins/auth.py:222 plugins/auth.py:254 msgid "Password changed successfully." msgstr "Pasahitza arrakastaz aldatua." -#: plugins/auth.py:233 templates/xadmin/auth/user/change_password.html:11 +#: plugins/auth.py:241 templates/xadmin/auth/user/change_password.html:11 #: templates/xadmin/auth/user/change_password.html:22 #: templates/xadmin/auth/user/change_password.html:55 msgid "Change password" @@ -272,12 +272,12 @@ msgstr "" msgid "Batch Change selected %(verbose_name_plural)s" msgstr "Sorta moduko Aldaketa aukeratua %(verbose_name_plural)s" -#: plugins/batch.py:90 +#: plugins/batch.py:88 #, python-format msgid "Successfully change %(count)d %(items)s." msgstr "" -#: plugins/batch.py:138 +#: plugins/batch.py:136 #, python-format msgid "Batch change %s" msgstr "" @@ -286,7 +286,7 @@ msgstr "" msgid "bookmark" msgstr "" -#: plugins/bookmark.py:173 +#: plugins/bookmark.py:174 msgid "Bookmark Widget, can show user's bookmark list data in widget." msgstr "Laster-marken Widgeta, erabiltzailearen laster-marka zerrenda widgetean erakutsi dezake." @@ -294,7 +294,7 @@ msgstr "Laster-marken Widgeta, erabiltzailearen laster-marka zerrenda widgetean msgid "Show models simple chart." msgstr "Erabili modeluen diagrama sinplea." -#: plugins/chart.py:49 +#: plugins/chart.py:50 #, python-format msgid "%s Charts" msgstr "%s Diagrama" @@ -342,27 +342,27 @@ msgid_plural "%(count)s comments were successfully %(action)s." msgstr[0] "" msgstr[1] "" -#: plugins/details.py:52 views/list.py:576 +#: plugins/details.py:52 views/list.py:579 #, python-format msgid "Details of %s" msgstr "%sren xehetasunak" -#: plugins/editable.py:47 +#: plugins/editable.py:46 #, python-format msgid "Enter %s" msgstr "Sartu %s" -#: plugins/editable.py:74 views/dashboard.py:638 views/delete.py:26 -#: views/detail.py:144 views/edit.py:428 +#: plugins/editable.py:73 views/dashboard.py:645 views/delete.py:26 +#: views/detail.py:144 views/edit.py:438 #, python-format msgid "%(name)s object with primary key %(key)r does not exist." msgstr "Ez da %(key)r eremua nagusitzat duen %(name)srik." -#: plugins/export.py:87 +#: plugins/export.py:95 plugins/export.py:132 msgid "Sheet" msgstr "Xafla" -#: plugins/filters.py:125 +#: plugins/filters.py:132 plugins/quickfilter.py:140 #, python-format msgid "Filtering error: %s" msgstr "" @@ -399,7 +399,7 @@ msgstr "" msgid "Forgotten your password or username?" msgstr "Zure pasahitza edo erabiltzailea ahaztu duzu?" -#: plugins/quickform.py:77 +#: plugins/quickform.py:79 #, python-format msgid "Create New %s" msgstr "" @@ -408,11 +408,17 @@ msgstr "" msgid "Related Objects" msgstr "Erlazionatutako Objetuak" -#: plugins/relfield.py:29 plugins/topnav.py:35 +#: plugins/relfield.py:29 plugins/topnav.py:38 #, python-format msgid "Search %s" msgstr "Bilatu %s" +#: plugins/relfield.py:67 +#, fuzzy, python-format +#| msgid "Select Date" +msgid "Select %s" +msgstr "Data Aukeratu" + #: plugins/themes.py:47 msgid "Default" msgstr "" @@ -429,8 +435,8 @@ msgstr "" msgid "Bootstrap 2.x theme" msgstr "" -#: plugins/topnav.py:58 views/dashboard.py:455 views/edit.py:361 -#: views/edit.py:370 +#: plugins/topnav.py:63 views/dashboard.py:462 views/edit.py:371 +#: views/edit.py:380 #, python-format msgid "Add %s" msgstr "%s gehitu" @@ -518,9 +524,10 @@ msgstr "Orria ez da aurkitu" msgid "We're sorry, but the requested page could not be found." msgstr "Sentitzen dugu baina eskatutako orria ezin izan da aurkitu." -#: templates/xadmin/500.html:7 templates/xadmin/base_site.html:53 +#: templates/xadmin/500.html:7 #: templates/xadmin/auth/user/change_password.html:10 #: templates/xadmin/auth/user/change_password.html:15 +#: templates/xadmin/base_site.html:56 #: templates/xadmin/includes/sitemenu_default.html:7 #: templates/xadmin/views/app_index.html:9 #: templates/xadmin/views/batch_change_form.html:9 @@ -531,7 +538,7 @@ msgstr "Sentitzen dugu baina eskatutako orria ezin izan da aurkitu." #: templates/xadmin/views/recover_form.html:8 #: templates/xadmin/views/recover_list.html:8 #: templates/xadmin/views/revision_diff.html:8 -#: templates/xadmin/views/revision_form.html:8 views/base.py:448 +#: templates/xadmin/views/revision_form.html:8 views/base.py:463 msgid "Home" msgstr "Hasiera" @@ -551,18 +558,6 @@ msgstr "Zerbitzariaren errorea " msgid "There's been an error. It's been reported to the site administrators via e-mail and should be fixed shortly. Thanks for your patience." msgstr "Errore bat egon da. Eposta bidez bidali zaio webgunearen kudeatzaileari eta laister konpondu beharko litzake. Milesker zure pazientziagatik." -#: templates/xadmin/base_site.html:19 -msgid "Welcome," -msgstr "Ongietorri," - -#: templates/xadmin/base_site.html:25 -msgid "Log out" -msgstr "Saioa amaitu" - -#: templates/xadmin/base_site.html:37 -msgid "You don't have permission to edit anything." -msgstr "Ez daukazu ezer editatzeko baimenik." - #: templates/xadmin/auth/password_reset/complete.html:11 #: templates/xadmin/auth/password_reset/done.html:11 msgid "Password reset successful" @@ -664,11 +659,24 @@ msgstr "Zure pasahitz berria sartu." msgid "Enter a new password for the user %(username)s." msgstr "%(username)s erabiltzailearentzat pasahitz berri bat sartu." +#: templates/xadmin/base_site.html:21 +msgid "Welcome," +msgstr "Ongietorri," + +#: templates/xadmin/base_site.html:27 +msgid "Log out" +msgstr "Saioa amaitu" + +#: templates/xadmin/base_site.html:39 +msgid "You don't have permission to edit anything." +msgstr "Ez daukazu ezer editatzeko baimenik." + #: templates/xadmin/blocks/comm.top.theme.html:4 msgid "Themes" msgstr "Itsura-gaiak" #: templates/xadmin/blocks/comm.top.topnav.html:8 +#: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 #: templates/xadmin/filters/fk_search.html:14 @@ -694,7 +702,7 @@ msgstr "Ondo pausua" #: templates/xadmin/blocks/model_form.submit_line.wizard.html:31 #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Save" msgstr "Gorde" @@ -754,26 +762,27 @@ msgstr "Diagramak" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:4 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:8 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:19 -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:44 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:47 msgid "Export" msgstr "Esportatu" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:26 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:29 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:32 msgid "Export with table header." msgstr "Esportatu taularen goiburuarekin." -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:32 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:35 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:38 msgid "Export with format." msgstr "Formatuarekin esportatu." -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:39 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:42 msgid "Export all data." msgstr "Data guztiak esportatu." -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:43 -#: templates/xadmin/widgets/base.html:40 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:46 +#: templates/xadmin/widgets/base.html:41 msgid "Close" msgstr "Itxi" @@ -883,7 +892,7 @@ msgid "Choose" msgstr "Aukeratu" #: templates/xadmin/forms/transfer.html:19 -#: templates/xadmin/widgets/base.html:39 +#: templates/xadmin/widgets/base.html:40 msgid "Remove" msgstr "Ezabatu" @@ -905,7 +914,7 @@ msgstr "Guztia erakutsi" #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Saving.." msgstr "" @@ -1144,18 +1153,22 @@ msgstr "Gehitze arrakastatsua, klikatu editatu editatzek msgid "Quick Add" msgstr "Gehitze Azkarra" -#: templates/xadmin/widgets/base.html:30 +#: templates/xadmin/widgets/base.html:31 msgid "Widget Options" msgstr "Widget Aukerak" -#: templates/xadmin/widgets/base.html:41 +#: templates/xadmin/widgets/base.html:42 msgid "Save changes" msgstr "Aldaketak gorde" -#: views/base.py:430 +#: views/base.py:444 msgid "Django Xadmin" msgstr "Django Xadmin" +#: views/base.py:445 +msgid "my-company.inc" +msgstr "" + #: views/dashboard.py:185 msgid "Widget ID" msgstr "Widget IDa" @@ -1164,39 +1177,39 @@ msgstr "Widget IDa" msgid "Widget Title" msgstr "Widget Izenburua" -#: views/dashboard.py:248 +#: views/dashboard.py:249 msgid "Html Content Widget, can write any html content in widget." msgstr "Html Eduki Widgeta, edozein html eduki idatzi daiteke widgetan." -#: views/dashboard.py:251 +#: views/dashboard.py:252 msgid "Html Content" msgstr "Html Edukia" -#: views/dashboard.py:314 +#: views/dashboard.py:315 msgid "Target Model" msgstr "Helburu den Modelua" -#: views/dashboard.py:365 +#: views/dashboard.py:366 msgid "Quick button Widget, quickly open any page." msgstr "Botoi azkarra Widgeta, edozein orri azkar ireki." -#: views/dashboard.py:367 +#: views/dashboard.py:368 msgid "Quick Buttons" msgstr "Botoi Azkarrak" -#: views/dashboard.py:408 +#: views/dashboard.py:413 msgid "Any Objects list Widget." msgstr "Edozein Objetu zerrenda Widgeta." -#: views/dashboard.py:447 +#: views/dashboard.py:453 msgid "Add any model object Widget." msgstr "Edozein objetu gehitu Widgeta." -#: views/dashboard.py:481 +#: views/dashboard.py:488 msgid "Dashboard" msgstr "Arbela" -#: views/dashboard.py:622 +#: views/dashboard.py:629 #, python-format msgid "%s Dashboard" msgstr "" @@ -1206,7 +1219,7 @@ msgstr "" msgid "The %(name)s \"%(obj)s\" was deleted successfully." msgstr "\"%(obj)s\" %(name)sa arrakastaz ezabatua izan da." -#: views/detail.py:172 views/edit.py:199 views/form.py:72 +#: views/detail.py:172 views/edit.py:209 views/form.py:72 msgid "Other Fields" msgstr "Beste Eremuak" @@ -1215,26 +1228,26 @@ msgstr "Beste Eremuak" msgid "%s Detail" msgstr "%s Xehetasunak" -#: views/edit.py:394 +#: views/edit.py:404 #, python-format msgid "The %(name)s \"%(obj)s\" was added successfully." msgstr "\"%(obj)s\" %(name)sa arrakastaz gehitua izan da." -#: views/edit.py:399 views/edit.py:494 +#: views/edit.py:409 views/edit.py:504 msgid "You may edit it again below." msgstr "Behean editatu dezakezu berriro." -#: views/edit.py:403 views/edit.py:497 +#: views/edit.py:413 views/edit.py:507 #, python-format msgid "You may add another %s below." msgstr "Behean beste %s bat gehitu dezakezu." -#: views/edit.py:445 +#: views/edit.py:455 #, python-format msgid "Change %s" msgstr "Aldaketa %s" -#: views/edit.py:490 +#: views/edit.py:500 #, python-format msgid "The %(name)s \"%(obj)s\" was changed successfully." msgstr "\"%(obj)s\" %(name)sa arrakastaz gehitua izan da." @@ -1268,3 +1281,7 @@ msgstr "Ezeztatu Ordenaketa" #: views/website.py:16 msgid "Main Dashboard" msgstr "Arbela Nagusia" + +#: widgets.py:48 +msgid "Now" +msgstr "Orain" diff --git a/xadmin/locale/id_ID/LC_MESSAGES/django.mo b/xadmin/locale/id_ID/LC_MESSAGES/django.mo index be9342ad506ed074158e526d06a9bdd95d102563..f1de6064d259faceea4b28f2449a307b2b53ece1 100644 GIT binary patch delta 24 fcmaFB{D65v8?TwJfsw9}xq_jgm8tQ@$-ayLUsMMB delta 24 fcmaFB{D65v8?TA3fuXLUfr6odm9gQ*$-ayLUabb} diff --git a/xadmin/locale/id_ID/LC_MESSAGES/django.po b/xadmin/locale/id_ID/LC_MESSAGES/django.po index bdf15a7fe..1550f73ba 100644 --- a/xadmin/locale/id_ID/LC_MESSAGES/django.po +++ b/xadmin/locale/id_ID/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: xadmin-core\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-10 10:31+0800\n" +"POT-Creation-Date: 2016-02-27 11:53+0800\n" "PO-Revision-Date: 2013-11-20 10:21+0000\n" "Last-Translator: sshwsfc \n" "Language-Team: Indonesian (Indonesia) (http://www.transifex.com/projects/p/xadmin/language/id_ID/)\n" @@ -17,47 +17,51 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: filters.py:157 filters.py:189 filters.py:401 filters.py:451 +#: apps.py:10 +msgid "Administration" +msgstr "" + +#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 msgid "All" msgstr "" -#: filters.py:158 plugins/export.py:117 +#: filters.py:159 plugins/export.py:162 msgid "Yes" msgstr "" -#: filters.py:159 plugins/export.py:117 +#: filters.py:160 plugins/export.py:162 msgid "No" msgstr "" -#: filters.py:173 +#: filters.py:174 msgid "Unknown" msgstr "" -#: filters.py:265 +#: filters.py:266 msgid "Any date" msgstr "" -#: filters.py:266 +#: filters.py:267 msgid "Has date" msgstr "" -#: filters.py:269 +#: filters.py:270 msgid "Has no date" msgstr "" -#: filters.py:272 widgets.py:30 +#: filters.py:273 widgets.py:30 msgid "Today" msgstr "" -#: filters.py:276 +#: filters.py:277 msgid "Past 7 days" msgstr "" -#: filters.py:280 +#: filters.py:281 msgid "This month" msgstr "" -#: filters.py:284 +#: filters.py:285 msgid "This year" msgstr "" @@ -94,7 +98,7 @@ msgstr "" msgid "Is Shared" msgstr "" -#: models.py:65 plugins/bookmark.py:49 plugins/bookmark.py:177 +#: models.py:65 plugins/bookmark.py:49 plugins/bookmark.py:178 msgid "Bookmark" msgstr "" @@ -138,41 +142,37 @@ msgstr "" msgid "User Widgets" msgstr "" -#: widgets.py:48 -msgid "Now" -msgstr "" - #: plugins/actions.py:54 #, python-format msgid "Delete selected %(verbose_name_plural)s" msgstr "" -#: plugins/actions.py:67 +#: plugins/actions.py:73 #, python-format msgid "Successfully deleted %(count)d %(items)s." msgstr "" -#: plugins/actions.py:99 views/delete.py:68 +#: plugins/actions.py:105 views/delete.py:68 #, python-format msgid "Cannot delete %(name)s" msgstr "" -#: plugins/actions.py:101 views/delete.py:71 +#: plugins/actions.py:107 views/delete.py:71 msgid "Are you sure?" msgstr "" -#: plugins/actions.py:147 +#: plugins/actions.py:153 #, python-format msgid "%(total_count)s selected" msgid_plural "All %(total_count)s selected" msgstr[0] "" -#: plugins/actions.py:151 +#: plugins/actions.py:157 #, python-format msgid "0 of %(cnt)s selected" msgstr "" -#: plugins/actions.py:168 plugins/actions.py:178 +#: plugins/actions.py:174 plugins/actions.py:184 msgid "Items must be selected in order to perform actions on them. No items have been changed." msgstr "" @@ -241,20 +241,20 @@ msgstr "" msgid "Permission Name" msgstr "" -#: plugins/auth.py:159 +#: plugins/auth.py:167 msgid "Change Password" msgstr "" -#: plugins/auth.py:189 +#: plugins/auth.py:197 #, python-format msgid "Change password: %s" msgstr "" -#: plugins/auth.py:214 plugins/auth.py:246 +#: plugins/auth.py:222 plugins/auth.py:254 msgid "Password changed successfully." msgstr "" -#: plugins/auth.py:233 templates/xadmin/auth/user/change_password.html:11 +#: plugins/auth.py:241 templates/xadmin/auth/user/change_password.html:11 #: templates/xadmin/auth/user/change_password.html:22 #: templates/xadmin/auth/user/change_password.html:55 msgid "Change password" @@ -269,12 +269,12 @@ msgstr "" msgid "Batch Change selected %(verbose_name_plural)s" msgstr "" -#: plugins/batch.py:90 +#: plugins/batch.py:88 #, python-format msgid "Successfully change %(count)d %(items)s." msgstr "" -#: plugins/batch.py:138 +#: plugins/batch.py:136 #, python-format msgid "Batch change %s" msgstr "" @@ -283,7 +283,7 @@ msgstr "" msgid "bookmark" msgstr "" -#: plugins/bookmark.py:173 +#: plugins/bookmark.py:174 msgid "Bookmark Widget, can show user's bookmark list data in widget." msgstr "" @@ -291,7 +291,7 @@ msgstr "" msgid "Show models simple chart." msgstr "" -#: plugins/chart.py:49 +#: plugins/chart.py:50 #, python-format msgid "%s Charts" msgstr "" @@ -333,27 +333,27 @@ msgid "1 comment was successfully %(action)s." msgid_plural "%(count)s comments were successfully %(action)s." msgstr[0] "" -#: plugins/details.py:52 views/list.py:576 +#: plugins/details.py:52 views/list.py:579 #, python-format msgid "Details of %s" msgstr "" -#: plugins/editable.py:47 +#: plugins/editable.py:46 #, python-format msgid "Enter %s" msgstr "" -#: plugins/editable.py:74 views/dashboard.py:638 views/delete.py:26 -#: views/detail.py:144 views/edit.py:428 +#: plugins/editable.py:73 views/dashboard.py:645 views/delete.py:26 +#: views/detail.py:144 views/edit.py:438 #, python-format msgid "%(name)s object with primary key %(key)r does not exist." msgstr "" -#: plugins/export.py:87 +#: plugins/export.py:95 plugins/export.py:132 msgid "Sheet" msgstr "" -#: plugins/filters.py:125 +#: plugins/filters.py:132 plugins/quickfilter.py:140 #, python-format msgid "Filtering error: %s" msgstr "" @@ -390,7 +390,7 @@ msgstr "" msgid "Forgotten your password or username?" msgstr "" -#: plugins/quickform.py:77 +#: plugins/quickform.py:79 #, python-format msgid "Create New %s" msgstr "" @@ -399,11 +399,16 @@ msgstr "" msgid "Related Objects" msgstr "" -#: plugins/relfield.py:29 plugins/topnav.py:35 +#: plugins/relfield.py:29 plugins/topnav.py:38 #, python-format msgid "Search %s" msgstr "" +#: plugins/relfield.py:67 +#, python-format +msgid "Select %s" +msgstr "" + #: plugins/themes.py:47 msgid "Default" msgstr "" @@ -420,8 +425,8 @@ msgstr "" msgid "Bootstrap 2.x theme" msgstr "" -#: plugins/topnav.py:58 views/dashboard.py:455 views/edit.py:361 -#: views/edit.py:370 +#: plugins/topnav.py:63 views/dashboard.py:462 views/edit.py:371 +#: views/edit.py:380 #, python-format msgid "Add %s" msgstr "" @@ -509,9 +514,10 @@ msgstr "" msgid "We're sorry, but the requested page could not be found." msgstr "" -#: templates/xadmin/500.html:7 templates/xadmin/base_site.html:53 +#: templates/xadmin/500.html:7 #: templates/xadmin/auth/user/change_password.html:10 #: templates/xadmin/auth/user/change_password.html:15 +#: templates/xadmin/base_site.html:56 #: templates/xadmin/includes/sitemenu_default.html:7 #: templates/xadmin/views/app_index.html:9 #: templates/xadmin/views/batch_change_form.html:9 @@ -522,7 +528,7 @@ msgstr "" #: templates/xadmin/views/recover_form.html:8 #: templates/xadmin/views/recover_list.html:8 #: templates/xadmin/views/revision_diff.html:8 -#: templates/xadmin/views/revision_form.html:8 views/base.py:448 +#: templates/xadmin/views/revision_form.html:8 views/base.py:463 msgid "Home" msgstr "" @@ -542,18 +548,6 @@ msgstr "" msgid "There's been an error. It's been reported to the site administrators via e-mail and should be fixed shortly. Thanks for your patience." msgstr "" -#: templates/xadmin/base_site.html:19 -msgid "Welcome," -msgstr "" - -#: templates/xadmin/base_site.html:25 -msgid "Log out" -msgstr "" - -#: templates/xadmin/base_site.html:37 -msgid "You don't have permission to edit anything." -msgstr "" - #: templates/xadmin/auth/password_reset/complete.html:11 #: templates/xadmin/auth/password_reset/done.html:11 msgid "Password reset successful" @@ -654,11 +648,24 @@ msgstr "" msgid "Enter a new password for the user %(username)s." msgstr "" +#: templates/xadmin/base_site.html:21 +msgid "Welcome," +msgstr "" + +#: templates/xadmin/base_site.html:27 +msgid "Log out" +msgstr "" + +#: templates/xadmin/base_site.html:39 +msgid "You don't have permission to edit anything." +msgstr "" + #: templates/xadmin/blocks/comm.top.theme.html:4 msgid "Themes" msgstr "" #: templates/xadmin/blocks/comm.top.topnav.html:8 +#: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 #: templates/xadmin/filters/fk_search.html:14 @@ -684,7 +691,7 @@ msgstr "" #: templates/xadmin/blocks/model_form.submit_line.wizard.html:31 #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Save" msgstr "" @@ -744,26 +751,27 @@ msgstr "" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:4 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:8 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:19 -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:44 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:47 msgid "Export" msgstr "" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:26 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:29 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:32 msgid "Export with table header." msgstr "" -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:32 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:35 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:38 msgid "Export with format." msgstr "" -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:39 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:42 msgid "Export all data." msgstr "" -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:43 -#: templates/xadmin/widgets/base.html:40 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:46 +#: templates/xadmin/widgets/base.html:41 msgid "Close" msgstr "" @@ -873,7 +881,7 @@ msgid "Choose" msgstr "" #: templates/xadmin/forms/transfer.html:19 -#: templates/xadmin/widgets/base.html:39 +#: templates/xadmin/widgets/base.html:40 msgid "Remove" msgstr "" @@ -895,7 +903,7 @@ msgstr "" #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Saving.." msgstr "" @@ -1133,18 +1141,22 @@ msgstr "" msgid "Quick Add" msgstr "" -#: templates/xadmin/widgets/base.html:30 +#: templates/xadmin/widgets/base.html:31 msgid "Widget Options" msgstr "" -#: templates/xadmin/widgets/base.html:41 +#: templates/xadmin/widgets/base.html:42 msgid "Save changes" msgstr "" -#: views/base.py:430 +#: views/base.py:444 msgid "Django Xadmin" msgstr "" +#: views/base.py:445 +msgid "my-company.inc" +msgstr "" + #: views/dashboard.py:185 msgid "Widget ID" msgstr "" @@ -1153,39 +1165,39 @@ msgstr "" msgid "Widget Title" msgstr "" -#: views/dashboard.py:248 +#: views/dashboard.py:249 msgid "Html Content Widget, can write any html content in widget." msgstr "" -#: views/dashboard.py:251 +#: views/dashboard.py:252 msgid "Html Content" msgstr "" -#: views/dashboard.py:314 +#: views/dashboard.py:315 msgid "Target Model" msgstr "" -#: views/dashboard.py:365 +#: views/dashboard.py:366 msgid "Quick button Widget, quickly open any page." msgstr "" -#: views/dashboard.py:367 +#: views/dashboard.py:368 msgid "Quick Buttons" msgstr "" -#: views/dashboard.py:408 +#: views/dashboard.py:413 msgid "Any Objects list Widget." msgstr "" -#: views/dashboard.py:447 +#: views/dashboard.py:453 msgid "Add any model object Widget." msgstr "" -#: views/dashboard.py:481 +#: views/dashboard.py:488 msgid "Dashboard" msgstr "" -#: views/dashboard.py:622 +#: views/dashboard.py:629 #, python-format msgid "%s Dashboard" msgstr "" @@ -1195,7 +1207,7 @@ msgstr "" msgid "The %(name)s \"%(obj)s\" was deleted successfully." msgstr "" -#: views/detail.py:172 views/edit.py:199 views/form.py:72 +#: views/detail.py:172 views/edit.py:209 views/form.py:72 msgid "Other Fields" msgstr "" @@ -1204,26 +1216,26 @@ msgstr "" msgid "%s Detail" msgstr "" -#: views/edit.py:394 +#: views/edit.py:404 #, python-format msgid "The %(name)s \"%(obj)s\" was added successfully." msgstr "" -#: views/edit.py:399 views/edit.py:494 +#: views/edit.py:409 views/edit.py:504 msgid "You may edit it again below." msgstr "" -#: views/edit.py:403 views/edit.py:497 +#: views/edit.py:413 views/edit.py:507 #, python-format msgid "You may add another %s below." msgstr "" -#: views/edit.py:445 +#: views/edit.py:455 #, python-format msgid "Change %s" msgstr "" -#: views/edit.py:490 +#: views/edit.py:500 #, python-format msgid "The %(name)s \"%(obj)s\" was changed successfully." msgstr "" @@ -1257,3 +1269,7 @@ msgstr "" #: views/website.py:16 msgid "Main Dashboard" msgstr "" + +#: widgets.py:48 +msgid "Now" +msgstr "" diff --git a/xadmin/locale/ja/LC_MESSAGES/django.mo b/xadmin/locale/ja/LC_MESSAGES/django.mo index 6e431fe54659fa970b881b5d49c2622911509ba6..8547086cf949eeed7b410888118d1fed5c55424f 100644 GIT binary patch delta 24 fcmX@Ze1>^K8?TwJfsw9}xq_jgm8tQ@$(D=&Ta*UB delta 24 fcmX@Ze1>^K8?TA3fuXLUfr6odm9gQ*$(D=&TI~j} diff --git a/xadmin/locale/ja/LC_MESSAGES/django.po b/xadmin/locale/ja/LC_MESSAGES/django.po index 679989292..60d664494 100644 --- a/xadmin/locale/ja/LC_MESSAGES/django.po +++ b/xadmin/locale/ja/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: xadmin-core\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-10 10:31+0800\n" +"POT-Creation-Date: 2016-02-27 11:53+0800\n" "PO-Revision-Date: 2013-11-20 10:21+0000\n" "Last-Translator: sshwsfc \n" "Language-Team: Japanese (http://www.transifex.com/projects/p/xadmin/language/ja/)\n" @@ -17,47 +17,51 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: filters.py:157 filters.py:189 filters.py:401 filters.py:451 +#: apps.py:10 +msgid "Administration" +msgstr "" + +#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 msgid "All" msgstr "" -#: filters.py:158 plugins/export.py:117 +#: filters.py:159 plugins/export.py:162 msgid "Yes" msgstr "" -#: filters.py:159 plugins/export.py:117 +#: filters.py:160 plugins/export.py:162 msgid "No" msgstr "" -#: filters.py:173 +#: filters.py:174 msgid "Unknown" msgstr "" -#: filters.py:265 +#: filters.py:266 msgid "Any date" msgstr "" -#: filters.py:266 +#: filters.py:267 msgid "Has date" msgstr "" -#: filters.py:269 +#: filters.py:270 msgid "Has no date" msgstr "" -#: filters.py:272 widgets.py:30 +#: filters.py:273 widgets.py:30 msgid "Today" msgstr "" -#: filters.py:276 +#: filters.py:277 msgid "Past 7 days" msgstr "" -#: filters.py:280 +#: filters.py:281 msgid "This month" msgstr "" -#: filters.py:284 +#: filters.py:285 msgid "This year" msgstr "" @@ -94,7 +98,7 @@ msgstr "" msgid "Is Shared" msgstr "" -#: models.py:65 plugins/bookmark.py:49 plugins/bookmark.py:177 +#: models.py:65 plugins/bookmark.py:49 plugins/bookmark.py:178 msgid "Bookmark" msgstr "" @@ -138,41 +142,37 @@ msgstr "" msgid "User Widgets" msgstr "" -#: widgets.py:48 -msgid "Now" -msgstr "" - #: plugins/actions.py:54 #, python-format msgid "Delete selected %(verbose_name_plural)s" msgstr "" -#: plugins/actions.py:67 +#: plugins/actions.py:73 #, python-format msgid "Successfully deleted %(count)d %(items)s." msgstr "" -#: plugins/actions.py:99 views/delete.py:68 +#: plugins/actions.py:105 views/delete.py:68 #, python-format msgid "Cannot delete %(name)s" msgstr "" -#: plugins/actions.py:101 views/delete.py:71 +#: plugins/actions.py:107 views/delete.py:71 msgid "Are you sure?" msgstr "" -#: plugins/actions.py:147 +#: plugins/actions.py:153 #, python-format msgid "%(total_count)s selected" msgid_plural "All %(total_count)s selected" msgstr[0] "" -#: plugins/actions.py:151 +#: plugins/actions.py:157 #, python-format msgid "0 of %(cnt)s selected" msgstr "" -#: plugins/actions.py:168 plugins/actions.py:178 +#: plugins/actions.py:174 plugins/actions.py:184 msgid "Items must be selected in order to perform actions on them. No items have been changed." msgstr "" @@ -241,20 +241,20 @@ msgstr "" msgid "Permission Name" msgstr "" -#: plugins/auth.py:159 +#: plugins/auth.py:167 msgid "Change Password" msgstr "" -#: plugins/auth.py:189 +#: plugins/auth.py:197 #, python-format msgid "Change password: %s" msgstr "" -#: plugins/auth.py:214 plugins/auth.py:246 +#: plugins/auth.py:222 plugins/auth.py:254 msgid "Password changed successfully." msgstr "" -#: plugins/auth.py:233 templates/xadmin/auth/user/change_password.html:11 +#: plugins/auth.py:241 templates/xadmin/auth/user/change_password.html:11 #: templates/xadmin/auth/user/change_password.html:22 #: templates/xadmin/auth/user/change_password.html:55 msgid "Change password" @@ -269,12 +269,12 @@ msgstr "" msgid "Batch Change selected %(verbose_name_plural)s" msgstr "" -#: plugins/batch.py:90 +#: plugins/batch.py:88 #, python-format msgid "Successfully change %(count)d %(items)s." msgstr "" -#: plugins/batch.py:138 +#: plugins/batch.py:136 #, python-format msgid "Batch change %s" msgstr "" @@ -283,7 +283,7 @@ msgstr "" msgid "bookmark" msgstr "" -#: plugins/bookmark.py:173 +#: plugins/bookmark.py:174 msgid "Bookmark Widget, can show user's bookmark list data in widget." msgstr "" @@ -291,7 +291,7 @@ msgstr "" msgid "Show models simple chart." msgstr "" -#: plugins/chart.py:49 +#: plugins/chart.py:50 #, python-format msgid "%s Charts" msgstr "" @@ -333,27 +333,27 @@ msgid "1 comment was successfully %(action)s." msgid_plural "%(count)s comments were successfully %(action)s." msgstr[0] "" -#: plugins/details.py:52 views/list.py:576 +#: plugins/details.py:52 views/list.py:579 #, python-format msgid "Details of %s" msgstr "" -#: plugins/editable.py:47 +#: plugins/editable.py:46 #, python-format msgid "Enter %s" msgstr "" -#: plugins/editable.py:74 views/dashboard.py:638 views/delete.py:26 -#: views/detail.py:144 views/edit.py:428 +#: plugins/editable.py:73 views/dashboard.py:645 views/delete.py:26 +#: views/detail.py:144 views/edit.py:438 #, python-format msgid "%(name)s object with primary key %(key)r does not exist." msgstr "" -#: plugins/export.py:87 +#: plugins/export.py:95 plugins/export.py:132 msgid "Sheet" msgstr "" -#: plugins/filters.py:125 +#: plugins/filters.py:132 plugins/quickfilter.py:140 #, python-format msgid "Filtering error: %s" msgstr "" @@ -390,7 +390,7 @@ msgstr "" msgid "Forgotten your password or username?" msgstr "" -#: plugins/quickform.py:77 +#: plugins/quickform.py:79 #, python-format msgid "Create New %s" msgstr "" @@ -399,11 +399,16 @@ msgstr "" msgid "Related Objects" msgstr "" -#: plugins/relfield.py:29 plugins/topnav.py:35 +#: plugins/relfield.py:29 plugins/topnav.py:38 #, python-format msgid "Search %s" msgstr "" +#: plugins/relfield.py:67 +#, python-format +msgid "Select %s" +msgstr "" + #: plugins/themes.py:47 msgid "Default" msgstr "" @@ -420,8 +425,8 @@ msgstr "" msgid "Bootstrap 2.x theme" msgstr "" -#: plugins/topnav.py:58 views/dashboard.py:455 views/edit.py:361 -#: views/edit.py:370 +#: plugins/topnav.py:63 views/dashboard.py:462 views/edit.py:371 +#: views/edit.py:380 #, python-format msgid "Add %s" msgstr "" @@ -509,9 +514,10 @@ msgstr "" msgid "We're sorry, but the requested page could not be found." msgstr "" -#: templates/xadmin/500.html:7 templates/xadmin/base_site.html:53 +#: templates/xadmin/500.html:7 #: templates/xadmin/auth/user/change_password.html:10 #: templates/xadmin/auth/user/change_password.html:15 +#: templates/xadmin/base_site.html:56 #: templates/xadmin/includes/sitemenu_default.html:7 #: templates/xadmin/views/app_index.html:9 #: templates/xadmin/views/batch_change_form.html:9 @@ -522,7 +528,7 @@ msgstr "" #: templates/xadmin/views/recover_form.html:8 #: templates/xadmin/views/recover_list.html:8 #: templates/xadmin/views/revision_diff.html:8 -#: templates/xadmin/views/revision_form.html:8 views/base.py:448 +#: templates/xadmin/views/revision_form.html:8 views/base.py:463 msgid "Home" msgstr "" @@ -542,18 +548,6 @@ msgstr "" msgid "There's been an error. It's been reported to the site administrators via e-mail and should be fixed shortly. Thanks for your patience." msgstr "" -#: templates/xadmin/base_site.html:19 -msgid "Welcome," -msgstr "" - -#: templates/xadmin/base_site.html:25 -msgid "Log out" -msgstr "" - -#: templates/xadmin/base_site.html:37 -msgid "You don't have permission to edit anything." -msgstr "" - #: templates/xadmin/auth/password_reset/complete.html:11 #: templates/xadmin/auth/password_reset/done.html:11 msgid "Password reset successful" @@ -654,11 +648,24 @@ msgstr "" msgid "Enter a new password for the user %(username)s." msgstr "" +#: templates/xadmin/base_site.html:21 +msgid "Welcome," +msgstr "" + +#: templates/xadmin/base_site.html:27 +msgid "Log out" +msgstr "" + +#: templates/xadmin/base_site.html:39 +msgid "You don't have permission to edit anything." +msgstr "" + #: templates/xadmin/blocks/comm.top.theme.html:4 msgid "Themes" msgstr "" #: templates/xadmin/blocks/comm.top.topnav.html:8 +#: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 #: templates/xadmin/filters/fk_search.html:14 @@ -684,7 +691,7 @@ msgstr "" #: templates/xadmin/blocks/model_form.submit_line.wizard.html:31 #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Save" msgstr "" @@ -744,26 +751,27 @@ msgstr "" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:4 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:8 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:19 -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:44 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:47 msgid "Export" msgstr "" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:26 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:29 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:32 msgid "Export with table header." msgstr "" -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:32 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:35 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:38 msgid "Export with format." msgstr "" -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:39 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:42 msgid "Export all data." msgstr "" -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:43 -#: templates/xadmin/widgets/base.html:40 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:46 +#: templates/xadmin/widgets/base.html:41 msgid "Close" msgstr "" @@ -873,7 +881,7 @@ msgid "Choose" msgstr "" #: templates/xadmin/forms/transfer.html:19 -#: templates/xadmin/widgets/base.html:39 +#: templates/xadmin/widgets/base.html:40 msgid "Remove" msgstr "" @@ -895,7 +903,7 @@ msgstr "" #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Saving.." msgstr "" @@ -1133,18 +1141,22 @@ msgstr "" msgid "Quick Add" msgstr "" -#: templates/xadmin/widgets/base.html:30 +#: templates/xadmin/widgets/base.html:31 msgid "Widget Options" msgstr "" -#: templates/xadmin/widgets/base.html:41 +#: templates/xadmin/widgets/base.html:42 msgid "Save changes" msgstr "" -#: views/base.py:430 +#: views/base.py:444 msgid "Django Xadmin" msgstr "" +#: views/base.py:445 +msgid "my-company.inc" +msgstr "" + #: views/dashboard.py:185 msgid "Widget ID" msgstr "" @@ -1153,39 +1165,39 @@ msgstr "" msgid "Widget Title" msgstr "" -#: views/dashboard.py:248 +#: views/dashboard.py:249 msgid "Html Content Widget, can write any html content in widget." msgstr "" -#: views/dashboard.py:251 +#: views/dashboard.py:252 msgid "Html Content" msgstr "" -#: views/dashboard.py:314 +#: views/dashboard.py:315 msgid "Target Model" msgstr "" -#: views/dashboard.py:365 +#: views/dashboard.py:366 msgid "Quick button Widget, quickly open any page." msgstr "" -#: views/dashboard.py:367 +#: views/dashboard.py:368 msgid "Quick Buttons" msgstr "" -#: views/dashboard.py:408 +#: views/dashboard.py:413 msgid "Any Objects list Widget." msgstr "" -#: views/dashboard.py:447 +#: views/dashboard.py:453 msgid "Add any model object Widget." msgstr "" -#: views/dashboard.py:481 +#: views/dashboard.py:488 msgid "Dashboard" msgstr "" -#: views/dashboard.py:622 +#: views/dashboard.py:629 #, python-format msgid "%s Dashboard" msgstr "" @@ -1195,7 +1207,7 @@ msgstr "" msgid "The %(name)s \"%(obj)s\" was deleted successfully." msgstr "" -#: views/detail.py:172 views/edit.py:199 views/form.py:72 +#: views/detail.py:172 views/edit.py:209 views/form.py:72 msgid "Other Fields" msgstr "" @@ -1204,26 +1216,26 @@ msgstr "" msgid "%s Detail" msgstr "" -#: views/edit.py:394 +#: views/edit.py:404 #, python-format msgid "The %(name)s \"%(obj)s\" was added successfully." msgstr "" -#: views/edit.py:399 views/edit.py:494 +#: views/edit.py:409 views/edit.py:504 msgid "You may edit it again below." msgstr "" -#: views/edit.py:403 views/edit.py:497 +#: views/edit.py:413 views/edit.py:507 #, python-format msgid "You may add another %s below." msgstr "" -#: views/edit.py:445 +#: views/edit.py:455 #, python-format msgid "Change %s" msgstr "" -#: views/edit.py:490 +#: views/edit.py:500 #, python-format msgid "The %(name)s \"%(obj)s\" was changed successfully." msgstr "" @@ -1257,3 +1269,7 @@ msgstr "" #: views/website.py:16 msgid "Main Dashboard" msgstr "" + +#: widgets.py:48 +msgid "Now" +msgstr "" diff --git a/xadmin/locale/lt/LC_MESSAGES/django.mo b/xadmin/locale/lt/LC_MESSAGES/django.mo index 9a7add4cdd147292c5aa04f241db3b8278be0a2a..fb2acc120b3003d23f53c6f8a1c8c9e2754e9aa8 100644 GIT binary patch delta 24 fcmbQjGKFPA8?TwJfsw9}xq_jgm8tQ@$&HKvQa}co delta 24 fcmbQjGKFPA8?TA3fuXLUfr6odm9gQ*$&HKvQJDsb diff --git a/xadmin/locale/lt/LC_MESSAGES/django.po b/xadmin/locale/lt/LC_MESSAGES/django.po index 4fe768a5e..c2f89d55a 100644 --- a/xadmin/locale/lt/LC_MESSAGES/django.po +++ b/xadmin/locale/lt/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: xadmin-core\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-10 10:31+0800\n" +"POT-Creation-Date: 2016-02-27 11:53+0800\n" "PO-Revision-Date: 2013-11-20 10:21+0000\n" "Last-Translator: sshwsfc \n" "Language-Team: Lithuanian (http://www.transifex.com/projects/p/xadmin/language/lt/)\n" @@ -17,47 +17,51 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: filters.py:157 filters.py:189 filters.py:401 filters.py:451 +#: apps.py:10 +msgid "Administration" +msgstr "" + +#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 msgid "All" msgstr "" -#: filters.py:158 plugins/export.py:117 +#: filters.py:159 plugins/export.py:162 msgid "Yes" msgstr "" -#: filters.py:159 plugins/export.py:117 +#: filters.py:160 plugins/export.py:162 msgid "No" msgstr "" -#: filters.py:173 +#: filters.py:174 msgid "Unknown" msgstr "" -#: filters.py:265 +#: filters.py:266 msgid "Any date" msgstr "" -#: filters.py:266 +#: filters.py:267 msgid "Has date" msgstr "" -#: filters.py:269 +#: filters.py:270 msgid "Has no date" msgstr "" -#: filters.py:272 widgets.py:30 +#: filters.py:273 widgets.py:30 msgid "Today" msgstr "" -#: filters.py:276 +#: filters.py:277 msgid "Past 7 days" msgstr "" -#: filters.py:280 +#: filters.py:281 msgid "This month" msgstr "" -#: filters.py:284 +#: filters.py:285 msgid "This year" msgstr "" @@ -94,7 +98,7 @@ msgstr "" msgid "Is Shared" msgstr "" -#: models.py:65 plugins/bookmark.py:49 plugins/bookmark.py:177 +#: models.py:65 plugins/bookmark.py:49 plugins/bookmark.py:178 msgid "Bookmark" msgstr "" @@ -138,30 +142,26 @@ msgstr "" msgid "User Widgets" msgstr "" -#: widgets.py:48 -msgid "Now" -msgstr "" - #: plugins/actions.py:54 #, python-format msgid "Delete selected %(verbose_name_plural)s" msgstr "" -#: plugins/actions.py:67 +#: plugins/actions.py:73 #, python-format msgid "Successfully deleted %(count)d %(items)s." msgstr "" -#: plugins/actions.py:99 views/delete.py:68 +#: plugins/actions.py:105 views/delete.py:68 #, python-format msgid "Cannot delete %(name)s" msgstr "" -#: plugins/actions.py:101 views/delete.py:71 +#: plugins/actions.py:107 views/delete.py:71 msgid "Are you sure?" msgstr "" -#: plugins/actions.py:147 +#: plugins/actions.py:153 #, python-format msgid "%(total_count)s selected" msgid_plural "All %(total_count)s selected" @@ -169,12 +169,12 @@ msgstr[0] "" msgstr[1] "" msgstr[2] "" -#: plugins/actions.py:151 +#: plugins/actions.py:157 #, python-format msgid "0 of %(cnt)s selected" msgstr "" -#: plugins/actions.py:168 plugins/actions.py:178 +#: plugins/actions.py:174 plugins/actions.py:184 msgid "Items must be selected in order to perform actions on them. No items have been changed." msgstr "" @@ -243,20 +243,20 @@ msgstr "" msgid "Permission Name" msgstr "" -#: plugins/auth.py:159 +#: plugins/auth.py:167 msgid "Change Password" msgstr "" -#: plugins/auth.py:189 +#: plugins/auth.py:197 #, python-format msgid "Change password: %s" msgstr "" -#: plugins/auth.py:214 plugins/auth.py:246 +#: plugins/auth.py:222 plugins/auth.py:254 msgid "Password changed successfully." msgstr "" -#: plugins/auth.py:233 templates/xadmin/auth/user/change_password.html:11 +#: plugins/auth.py:241 templates/xadmin/auth/user/change_password.html:11 #: templates/xadmin/auth/user/change_password.html:22 #: templates/xadmin/auth/user/change_password.html:55 msgid "Change password" @@ -271,12 +271,12 @@ msgstr "" msgid "Batch Change selected %(verbose_name_plural)s" msgstr "" -#: plugins/batch.py:90 +#: plugins/batch.py:88 #, python-format msgid "Successfully change %(count)d %(items)s." msgstr "" -#: plugins/batch.py:138 +#: plugins/batch.py:136 #, python-format msgid "Batch change %s" msgstr "" @@ -285,7 +285,7 @@ msgstr "" msgid "bookmark" msgstr "" -#: plugins/bookmark.py:173 +#: plugins/bookmark.py:174 msgid "Bookmark Widget, can show user's bookmark list data in widget." msgstr "" @@ -293,7 +293,7 @@ msgstr "" msgid "Show models simple chart." msgstr "" -#: plugins/chart.py:49 +#: plugins/chart.py:50 #, python-format msgid "%s Charts" msgstr "" @@ -343,27 +343,27 @@ msgstr[0] "" msgstr[1] "" msgstr[2] "" -#: plugins/details.py:52 views/list.py:576 +#: plugins/details.py:52 views/list.py:579 #, python-format msgid "Details of %s" msgstr "" -#: plugins/editable.py:47 +#: plugins/editable.py:46 #, python-format msgid "Enter %s" msgstr "" -#: plugins/editable.py:74 views/dashboard.py:638 views/delete.py:26 -#: views/detail.py:144 views/edit.py:428 +#: plugins/editable.py:73 views/dashboard.py:645 views/delete.py:26 +#: views/detail.py:144 views/edit.py:438 #, python-format msgid "%(name)s object with primary key %(key)r does not exist." msgstr "" -#: plugins/export.py:87 +#: plugins/export.py:95 plugins/export.py:132 msgid "Sheet" msgstr "" -#: plugins/filters.py:125 +#: plugins/filters.py:132 plugins/quickfilter.py:140 #, python-format msgid "Filtering error: %s" msgstr "" @@ -400,7 +400,7 @@ msgstr "" msgid "Forgotten your password or username?" msgstr "" -#: plugins/quickform.py:77 +#: plugins/quickform.py:79 #, python-format msgid "Create New %s" msgstr "" @@ -409,11 +409,16 @@ msgstr "" msgid "Related Objects" msgstr "" -#: plugins/relfield.py:29 plugins/topnav.py:35 +#: plugins/relfield.py:29 plugins/topnav.py:38 #, python-format msgid "Search %s" msgstr "" +#: plugins/relfield.py:67 +#, python-format +msgid "Select %s" +msgstr "" + #: plugins/themes.py:47 msgid "Default" msgstr "" @@ -430,8 +435,8 @@ msgstr "" msgid "Bootstrap 2.x theme" msgstr "" -#: plugins/topnav.py:58 views/dashboard.py:455 views/edit.py:361 -#: views/edit.py:370 +#: plugins/topnav.py:63 views/dashboard.py:462 views/edit.py:371 +#: views/edit.py:380 #, python-format msgid "Add %s" msgstr "" @@ -519,9 +524,10 @@ msgstr "" msgid "We're sorry, but the requested page could not be found." msgstr "" -#: templates/xadmin/500.html:7 templates/xadmin/base_site.html:53 +#: templates/xadmin/500.html:7 #: templates/xadmin/auth/user/change_password.html:10 #: templates/xadmin/auth/user/change_password.html:15 +#: templates/xadmin/base_site.html:56 #: templates/xadmin/includes/sitemenu_default.html:7 #: templates/xadmin/views/app_index.html:9 #: templates/xadmin/views/batch_change_form.html:9 @@ -532,7 +538,7 @@ msgstr "" #: templates/xadmin/views/recover_form.html:8 #: templates/xadmin/views/recover_list.html:8 #: templates/xadmin/views/revision_diff.html:8 -#: templates/xadmin/views/revision_form.html:8 views/base.py:448 +#: templates/xadmin/views/revision_form.html:8 views/base.py:463 msgid "Home" msgstr "" @@ -552,18 +558,6 @@ msgstr "" msgid "There's been an error. It's been reported to the site administrators via e-mail and should be fixed shortly. Thanks for your patience." msgstr "" -#: templates/xadmin/base_site.html:19 -msgid "Welcome," -msgstr "" - -#: templates/xadmin/base_site.html:25 -msgid "Log out" -msgstr "" - -#: templates/xadmin/base_site.html:37 -msgid "You don't have permission to edit anything." -msgstr "" - #: templates/xadmin/auth/password_reset/complete.html:11 #: templates/xadmin/auth/password_reset/done.html:11 msgid "Password reset successful" @@ -666,11 +660,24 @@ msgstr "" msgid "Enter a new password for the user %(username)s." msgstr "" +#: templates/xadmin/base_site.html:21 +msgid "Welcome," +msgstr "" + +#: templates/xadmin/base_site.html:27 +msgid "Log out" +msgstr "" + +#: templates/xadmin/base_site.html:39 +msgid "You don't have permission to edit anything." +msgstr "" + #: templates/xadmin/blocks/comm.top.theme.html:4 msgid "Themes" msgstr "" #: templates/xadmin/blocks/comm.top.topnav.html:8 +#: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 #: templates/xadmin/filters/fk_search.html:14 @@ -696,7 +703,7 @@ msgstr "" #: templates/xadmin/blocks/model_form.submit_line.wizard.html:31 #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Save" msgstr "" @@ -756,26 +763,27 @@ msgstr "" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:4 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:8 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:19 -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:44 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:47 msgid "Export" msgstr "" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:26 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:29 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:32 msgid "Export with table header." msgstr "" -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:32 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:35 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:38 msgid "Export with format." msgstr "" -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:39 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:42 msgid "Export all data." msgstr "" -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:43 -#: templates/xadmin/widgets/base.html:40 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:46 +#: templates/xadmin/widgets/base.html:41 msgid "Close" msgstr "" @@ -885,7 +893,7 @@ msgid "Choose" msgstr "" #: templates/xadmin/forms/transfer.html:19 -#: templates/xadmin/widgets/base.html:39 +#: templates/xadmin/widgets/base.html:40 msgid "Remove" msgstr "" @@ -907,7 +915,7 @@ msgstr "" #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Saving.." msgstr "" @@ -1147,18 +1155,22 @@ msgstr "" msgid "Quick Add" msgstr "" -#: templates/xadmin/widgets/base.html:30 +#: templates/xadmin/widgets/base.html:31 msgid "Widget Options" msgstr "" -#: templates/xadmin/widgets/base.html:41 +#: templates/xadmin/widgets/base.html:42 msgid "Save changes" msgstr "" -#: views/base.py:430 +#: views/base.py:444 msgid "Django Xadmin" msgstr "" +#: views/base.py:445 +msgid "my-company.inc" +msgstr "" + #: views/dashboard.py:185 msgid "Widget ID" msgstr "" @@ -1167,39 +1179,39 @@ msgstr "" msgid "Widget Title" msgstr "" -#: views/dashboard.py:248 +#: views/dashboard.py:249 msgid "Html Content Widget, can write any html content in widget." msgstr "" -#: views/dashboard.py:251 +#: views/dashboard.py:252 msgid "Html Content" msgstr "" -#: views/dashboard.py:314 +#: views/dashboard.py:315 msgid "Target Model" msgstr "" -#: views/dashboard.py:365 +#: views/dashboard.py:366 msgid "Quick button Widget, quickly open any page." msgstr "" -#: views/dashboard.py:367 +#: views/dashboard.py:368 msgid "Quick Buttons" msgstr "" -#: views/dashboard.py:408 +#: views/dashboard.py:413 msgid "Any Objects list Widget." msgstr "" -#: views/dashboard.py:447 +#: views/dashboard.py:453 msgid "Add any model object Widget." msgstr "" -#: views/dashboard.py:481 +#: views/dashboard.py:488 msgid "Dashboard" msgstr "" -#: views/dashboard.py:622 +#: views/dashboard.py:629 #, python-format msgid "%s Dashboard" msgstr "" @@ -1209,7 +1221,7 @@ msgstr "" msgid "The %(name)s \"%(obj)s\" was deleted successfully." msgstr "" -#: views/detail.py:172 views/edit.py:199 views/form.py:72 +#: views/detail.py:172 views/edit.py:209 views/form.py:72 msgid "Other Fields" msgstr "" @@ -1218,26 +1230,26 @@ msgstr "" msgid "%s Detail" msgstr "" -#: views/edit.py:394 +#: views/edit.py:404 #, python-format msgid "The %(name)s \"%(obj)s\" was added successfully." msgstr "" -#: views/edit.py:399 views/edit.py:494 +#: views/edit.py:409 views/edit.py:504 msgid "You may edit it again below." msgstr "" -#: views/edit.py:403 views/edit.py:497 +#: views/edit.py:413 views/edit.py:507 #, python-format msgid "You may add another %s below." msgstr "" -#: views/edit.py:445 +#: views/edit.py:455 #, python-format msgid "Change %s" msgstr "" -#: views/edit.py:490 +#: views/edit.py:500 #, python-format msgid "The %(name)s \"%(obj)s\" was changed successfully." msgstr "" @@ -1271,3 +1283,7 @@ msgstr "" #: views/website.py:16 msgid "Main Dashboard" msgstr "" + +#: widgets.py:48 +msgid "Now" +msgstr "" diff --git a/xadmin/locale/nl_NL/LC_MESSAGES/django.mo b/xadmin/locale/nl_NL/LC_MESSAGES/django.mo index 63ffa4ce8109410043910a039fd538c5addc97a9..e167642331a55828632780754d0521d93970da5b 100644 GIT binary patch delta 24 fcmaFD{DgTz8?TwJfsw9}xq_jgm8tQ@$$^XjU=#-j delta 24 fcmaFD{DgTz8?TA3fuXLUfr6odm9gQ*$$^XjUu_2W diff --git a/xadmin/locale/nl_NL/LC_MESSAGES/django.po b/xadmin/locale/nl_NL/LC_MESSAGES/django.po index fa4a3fbcf..e6474fa2c 100644 --- a/xadmin/locale/nl_NL/LC_MESSAGES/django.po +++ b/xadmin/locale/nl_NL/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: xadmin-core\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-10 10:31+0800\n" +"POT-Creation-Date: 2016-02-27 11:53+0800\n" "PO-Revision-Date: 2013-11-20 10:21+0000\n" "Last-Translator: sshwsfc \n" "Language-Team: Dutch (Netherlands) (http://www.transifex.com/projects/p/xadmin/language/nl_NL/)\n" @@ -17,47 +17,51 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: filters.py:157 filters.py:189 filters.py:401 filters.py:451 +#: apps.py:10 +msgid "Administration" +msgstr "" + +#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 msgid "All" msgstr "" -#: filters.py:158 plugins/export.py:117 +#: filters.py:159 plugins/export.py:162 msgid "Yes" msgstr "" -#: filters.py:159 plugins/export.py:117 +#: filters.py:160 plugins/export.py:162 msgid "No" msgstr "" -#: filters.py:173 +#: filters.py:174 msgid "Unknown" msgstr "" -#: filters.py:265 +#: filters.py:266 msgid "Any date" msgstr "" -#: filters.py:266 +#: filters.py:267 msgid "Has date" msgstr "" -#: filters.py:269 +#: filters.py:270 msgid "Has no date" msgstr "" -#: filters.py:272 widgets.py:30 +#: filters.py:273 widgets.py:30 msgid "Today" msgstr "" -#: filters.py:276 +#: filters.py:277 msgid "Past 7 days" msgstr "" -#: filters.py:280 +#: filters.py:281 msgid "This month" msgstr "" -#: filters.py:284 +#: filters.py:285 msgid "This year" msgstr "" @@ -94,7 +98,7 @@ msgstr "" msgid "Is Shared" msgstr "" -#: models.py:65 plugins/bookmark.py:49 plugins/bookmark.py:177 +#: models.py:65 plugins/bookmark.py:49 plugins/bookmark.py:178 msgid "Bookmark" msgstr "" @@ -138,42 +142,38 @@ msgstr "" msgid "User Widgets" msgstr "" -#: widgets.py:48 -msgid "Now" -msgstr "" - #: plugins/actions.py:54 #, python-format msgid "Delete selected %(verbose_name_plural)s" msgstr "" -#: plugins/actions.py:67 +#: plugins/actions.py:73 #, python-format msgid "Successfully deleted %(count)d %(items)s." msgstr "" -#: plugins/actions.py:99 views/delete.py:68 +#: plugins/actions.py:105 views/delete.py:68 #, python-format msgid "Cannot delete %(name)s" msgstr "" -#: plugins/actions.py:101 views/delete.py:71 +#: plugins/actions.py:107 views/delete.py:71 msgid "Are you sure?" msgstr "" -#: plugins/actions.py:147 +#: plugins/actions.py:153 #, python-format msgid "%(total_count)s selected" msgid_plural "All %(total_count)s selected" msgstr[0] "" msgstr[1] "" -#: plugins/actions.py:151 +#: plugins/actions.py:157 #, python-format msgid "0 of %(cnt)s selected" msgstr "" -#: plugins/actions.py:168 plugins/actions.py:178 +#: plugins/actions.py:174 plugins/actions.py:184 msgid "Items must be selected in order to perform actions on them. No items have been changed." msgstr "" @@ -242,20 +242,20 @@ msgstr "" msgid "Permission Name" msgstr "" -#: plugins/auth.py:159 +#: plugins/auth.py:167 msgid "Change Password" msgstr "" -#: plugins/auth.py:189 +#: plugins/auth.py:197 #, python-format msgid "Change password: %s" msgstr "" -#: plugins/auth.py:214 plugins/auth.py:246 +#: plugins/auth.py:222 plugins/auth.py:254 msgid "Password changed successfully." msgstr "" -#: plugins/auth.py:233 templates/xadmin/auth/user/change_password.html:11 +#: plugins/auth.py:241 templates/xadmin/auth/user/change_password.html:11 #: templates/xadmin/auth/user/change_password.html:22 #: templates/xadmin/auth/user/change_password.html:55 msgid "Change password" @@ -270,12 +270,12 @@ msgstr "" msgid "Batch Change selected %(verbose_name_plural)s" msgstr "" -#: plugins/batch.py:90 +#: plugins/batch.py:88 #, python-format msgid "Successfully change %(count)d %(items)s." msgstr "" -#: plugins/batch.py:138 +#: plugins/batch.py:136 #, python-format msgid "Batch change %s" msgstr "" @@ -284,7 +284,7 @@ msgstr "" msgid "bookmark" msgstr "" -#: plugins/bookmark.py:173 +#: plugins/bookmark.py:174 msgid "Bookmark Widget, can show user's bookmark list data in widget." msgstr "" @@ -292,7 +292,7 @@ msgstr "" msgid "Show models simple chart." msgstr "" -#: plugins/chart.py:49 +#: plugins/chart.py:50 #, python-format msgid "%s Charts" msgstr "" @@ -338,27 +338,27 @@ msgid_plural "%(count)s comments were successfully %(action)s." msgstr[0] "" msgstr[1] "" -#: plugins/details.py:52 views/list.py:576 +#: plugins/details.py:52 views/list.py:579 #, python-format msgid "Details of %s" msgstr "" -#: plugins/editable.py:47 +#: plugins/editable.py:46 #, python-format msgid "Enter %s" msgstr "" -#: plugins/editable.py:74 views/dashboard.py:638 views/delete.py:26 -#: views/detail.py:144 views/edit.py:428 +#: plugins/editable.py:73 views/dashboard.py:645 views/delete.py:26 +#: views/detail.py:144 views/edit.py:438 #, python-format msgid "%(name)s object with primary key %(key)r does not exist." msgstr "" -#: plugins/export.py:87 +#: plugins/export.py:95 plugins/export.py:132 msgid "Sheet" msgstr "" -#: plugins/filters.py:125 +#: plugins/filters.py:132 plugins/quickfilter.py:140 #, python-format msgid "Filtering error: %s" msgstr "" @@ -395,7 +395,7 @@ msgstr "" msgid "Forgotten your password or username?" msgstr "" -#: plugins/quickform.py:77 +#: plugins/quickform.py:79 #, python-format msgid "Create New %s" msgstr "" @@ -404,11 +404,16 @@ msgstr "" msgid "Related Objects" msgstr "" -#: plugins/relfield.py:29 plugins/topnav.py:35 +#: plugins/relfield.py:29 plugins/topnav.py:38 #, python-format msgid "Search %s" msgstr "" +#: plugins/relfield.py:67 +#, python-format +msgid "Select %s" +msgstr "" + #: plugins/themes.py:47 msgid "Default" msgstr "" @@ -425,8 +430,8 @@ msgstr "" msgid "Bootstrap 2.x theme" msgstr "" -#: plugins/topnav.py:58 views/dashboard.py:455 views/edit.py:361 -#: views/edit.py:370 +#: plugins/topnav.py:63 views/dashboard.py:462 views/edit.py:371 +#: views/edit.py:380 #, python-format msgid "Add %s" msgstr "" @@ -514,9 +519,10 @@ msgstr "" msgid "We're sorry, but the requested page could not be found." msgstr "" -#: templates/xadmin/500.html:7 templates/xadmin/base_site.html:53 +#: templates/xadmin/500.html:7 #: templates/xadmin/auth/user/change_password.html:10 #: templates/xadmin/auth/user/change_password.html:15 +#: templates/xadmin/base_site.html:56 #: templates/xadmin/includes/sitemenu_default.html:7 #: templates/xadmin/views/app_index.html:9 #: templates/xadmin/views/batch_change_form.html:9 @@ -527,7 +533,7 @@ msgstr "" #: templates/xadmin/views/recover_form.html:8 #: templates/xadmin/views/recover_list.html:8 #: templates/xadmin/views/revision_diff.html:8 -#: templates/xadmin/views/revision_form.html:8 views/base.py:448 +#: templates/xadmin/views/revision_form.html:8 views/base.py:463 msgid "Home" msgstr "" @@ -547,18 +553,6 @@ msgstr "" msgid "There's been an error. It's been reported to the site administrators via e-mail and should be fixed shortly. Thanks for your patience." msgstr "" -#: templates/xadmin/base_site.html:19 -msgid "Welcome," -msgstr "" - -#: templates/xadmin/base_site.html:25 -msgid "Log out" -msgstr "" - -#: templates/xadmin/base_site.html:37 -msgid "You don't have permission to edit anything." -msgstr "" - #: templates/xadmin/auth/password_reset/complete.html:11 #: templates/xadmin/auth/password_reset/done.html:11 msgid "Password reset successful" @@ -660,11 +654,24 @@ msgstr "" msgid "Enter a new password for the user %(username)s." msgstr "" +#: templates/xadmin/base_site.html:21 +msgid "Welcome," +msgstr "" + +#: templates/xadmin/base_site.html:27 +msgid "Log out" +msgstr "" + +#: templates/xadmin/base_site.html:39 +msgid "You don't have permission to edit anything." +msgstr "" + #: templates/xadmin/blocks/comm.top.theme.html:4 msgid "Themes" msgstr "" #: templates/xadmin/blocks/comm.top.topnav.html:8 +#: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 #: templates/xadmin/filters/fk_search.html:14 @@ -690,7 +697,7 @@ msgstr "" #: templates/xadmin/blocks/model_form.submit_line.wizard.html:31 #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Save" msgstr "" @@ -750,26 +757,27 @@ msgstr "" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:4 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:8 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:19 -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:44 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:47 msgid "Export" msgstr "" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:26 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:29 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:32 msgid "Export with table header." msgstr "" -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:32 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:35 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:38 msgid "Export with format." msgstr "" -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:39 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:42 msgid "Export all data." msgstr "" -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:43 -#: templates/xadmin/widgets/base.html:40 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:46 +#: templates/xadmin/widgets/base.html:41 msgid "Close" msgstr "" @@ -879,7 +887,7 @@ msgid "Choose" msgstr "" #: templates/xadmin/forms/transfer.html:19 -#: templates/xadmin/widgets/base.html:39 +#: templates/xadmin/widgets/base.html:40 msgid "Remove" msgstr "" @@ -901,7 +909,7 @@ msgstr "" #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Saving.." msgstr "" @@ -1140,18 +1148,22 @@ msgstr "" msgid "Quick Add" msgstr "" -#: templates/xadmin/widgets/base.html:30 +#: templates/xadmin/widgets/base.html:31 msgid "Widget Options" msgstr "" -#: templates/xadmin/widgets/base.html:41 +#: templates/xadmin/widgets/base.html:42 msgid "Save changes" msgstr "" -#: views/base.py:430 +#: views/base.py:444 msgid "Django Xadmin" msgstr "" +#: views/base.py:445 +msgid "my-company.inc" +msgstr "" + #: views/dashboard.py:185 msgid "Widget ID" msgstr "" @@ -1160,39 +1172,39 @@ msgstr "" msgid "Widget Title" msgstr "" -#: views/dashboard.py:248 +#: views/dashboard.py:249 msgid "Html Content Widget, can write any html content in widget." msgstr "" -#: views/dashboard.py:251 +#: views/dashboard.py:252 msgid "Html Content" msgstr "" -#: views/dashboard.py:314 +#: views/dashboard.py:315 msgid "Target Model" msgstr "" -#: views/dashboard.py:365 +#: views/dashboard.py:366 msgid "Quick button Widget, quickly open any page." msgstr "" -#: views/dashboard.py:367 +#: views/dashboard.py:368 msgid "Quick Buttons" msgstr "" -#: views/dashboard.py:408 +#: views/dashboard.py:413 msgid "Any Objects list Widget." msgstr "" -#: views/dashboard.py:447 +#: views/dashboard.py:453 msgid "Add any model object Widget." msgstr "" -#: views/dashboard.py:481 +#: views/dashboard.py:488 msgid "Dashboard" msgstr "" -#: views/dashboard.py:622 +#: views/dashboard.py:629 #, python-format msgid "%s Dashboard" msgstr "" @@ -1202,7 +1214,7 @@ msgstr "" msgid "The %(name)s \"%(obj)s\" was deleted successfully." msgstr "" -#: views/detail.py:172 views/edit.py:199 views/form.py:72 +#: views/detail.py:172 views/edit.py:209 views/form.py:72 msgid "Other Fields" msgstr "" @@ -1211,26 +1223,26 @@ msgstr "" msgid "%s Detail" msgstr "" -#: views/edit.py:394 +#: views/edit.py:404 #, python-format msgid "The %(name)s \"%(obj)s\" was added successfully." msgstr "" -#: views/edit.py:399 views/edit.py:494 +#: views/edit.py:409 views/edit.py:504 msgid "You may edit it again below." msgstr "" -#: views/edit.py:403 views/edit.py:497 +#: views/edit.py:413 views/edit.py:507 #, python-format msgid "You may add another %s below." msgstr "" -#: views/edit.py:445 +#: views/edit.py:455 #, python-format msgid "Change %s" msgstr "" -#: views/edit.py:490 +#: views/edit.py:500 #, python-format msgid "The %(name)s \"%(obj)s\" was changed successfully." msgstr "" @@ -1264,3 +1276,7 @@ msgstr "" #: views/website.py:16 msgid "Main Dashboard" msgstr "" + +#: widgets.py:48 +msgid "Now" +msgstr "" diff --git a/xadmin/locale/pl/LC_MESSAGES/django.mo b/xadmin/locale/pl/LC_MESSAGES/django.mo index 2d3013bf6d99736d6369489c25f7d3f43a048913..c108e84517246d80f21be3473908b609f160624c 100644 GIT binary patch delta 6093 zcmZA534Bdg0>|+ai9`}vB#0$=gh&yxSYua-rH0s-)>x{PT2g}w<&`3IEFl!N)!16p z5$S#wC4KWkz;ZgL*mslMA%Q*GY=ttd!IzI+` zVlymIsn2Gj#>n|{wdMMMO<9eV5G#K@iCfN4bs3~8L z>Ub?`K$~oRH+G<&i@K4(3e3L_EKNaESOL{R6za|rtu1YPCyb}PA94*dAER&!>il!4 zM|lY~kbLW1yZ-^|y3bGp^RLMK7okw9qBA9BFqnE3)Cl8kdlS?JQ&2P05jF6^wmt%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<7S7KO3O%1jvkhhnU?(D%iH#L{To2& BiPr!C diff --git a/xadmin/locale/pl/LC_MESSAGES/django.po b/xadmin/locale/pl/LC_MESSAGES/django.po index 56bc418d7..6ae7c890e 100644 --- a/xadmin/locale/pl/LC_MESSAGES/django.po +++ b/xadmin/locale/pl/LC_MESSAGES/django.po @@ -7,17 +7,20 @@ msgid "" msgstr "" "Project-Id-Version: django-xadmin\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-08-12 11:11+0200\n" +"POT-Creation-Date: 2016-02-27 11:53+0800\n" "PO-Revision-Date: 2014-08-12 21:08+0100\n" "Last-Translator: Michał Szpadzik \n" "Language-Team: Polish translators \n" +"Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " -"|| n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "X-Generator: Poedit 1.5.4\n" -"Language: pl\n" + +#: apps.py:10 +msgid "Administration" +msgstr "" #: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 msgid "All" @@ -64,12 +67,8 @@ msgid "This year" msgstr "Ten rok" #: forms.py:10 -msgid "" -"Please enter the correct username and password for a staff account. Note " -"that both fields are case-sensitive." -msgstr "" -"Proszę wpisz prawidłową nazwę użytkownika i hasło do konta. Pamiętaj, że oba " -"pola są wrażliwe na wielkość znaków." +msgid "Please enter the correct username and password for a staff account. Note that both fields are case-sensitive." +msgstr "Proszę wpisz prawidłową nazwę użytkownika i hasło do konta. Pamiętaj, że oba pola są wrażliwe na wielkość znaków." #: forms.py:21 msgid "Please log in again, because your session has expired." @@ -78,9 +77,7 @@ msgstr "Proszę, zaloguj się ponownie, ponieważ Twoja sesja wygasła." #: forms.py:41 #, python-format msgid "Your e-mail address is not your username. Try '%s' instead." -msgstr "" -"Twój adres e-mail nie jest Twoją nazwą użytkownika. Zamiast tego spróbuj " -"'%s'." +msgstr "Twój adres e-mail nie jest Twoją nazwą użytkownika. Zamiast tego spróbuj '%s'." #: models.py:47 msgid "Title" @@ -146,30 +143,26 @@ msgstr "Widget użytkownika" msgid "User Widgets" msgstr "Widgety użytkownika" -#: widgets.py:48 -msgid "Now" -msgstr "Teraz" - #: plugins/actions.py:54 #, python-format msgid "Delete selected %(verbose_name_plural)s" msgstr "Usuń zaznaczone %(verbose_name_plural)s" -#: plugins/actions.py:67 +#: plugins/actions.py:73 #, python-format msgid "Successfully deleted %(count)d %(items)s." msgstr "Z powodzieniem usunięto %(count)d %(items)s." -#: plugins/actions.py:99 views/delete.py:68 +#: plugins/actions.py:105 views/delete.py:68 #, python-format msgid "Cannot delete %(name)s" msgstr "Nie można usunąć %(name)s" -#: plugins/actions.py:101 views/delete.py:71 +#: plugins/actions.py:107 views/delete.py:71 msgid "Are you sure?" msgstr "Jesteś pewny ?" -#: plugins/actions.py:147 +#: plugins/actions.py:153 #, python-format msgid "%(total_count)s selected" msgid_plural "All %(total_count)s selected" @@ -177,18 +170,14 @@ msgstr[0] "%(total_count)s zaznaczony" msgstr[1] "%(total_count)s zaznaczone" msgstr[2] "%(total_count)s zaznaczonych" -#: plugins/actions.py:151 +#: plugins/actions.py:157 #, python-format msgid "0 of %(cnt)s selected" msgstr "0 z %(cnt)s zaznaczonych" -#: plugins/actions.py:168 plugins/actions.py:178 -msgid "" -"Items must be selected in order to perform actions on them. No items have " -"been changed." -msgstr "" -"Elementy muszą być zaznaczone, by wykonać akcję na nich. Żaden element nie " -"został zmienony." +#: plugins/actions.py:174 plugins/actions.py:184 +msgid "Items must be selected in order to perform actions on them. No items have been changed." +msgstr "Elementy muszą być zaznaczone, by wykonać akcję na nich. Żaden element nie został zmienony." #: plugins/aggregation.py:14 msgid "Min" @@ -255,20 +244,20 @@ msgstr "Status" msgid "Permission Name" msgstr "Nazwa uprawnienia" -#: plugins/auth.py:161 +#: plugins/auth.py:167 msgid "Change Password" msgstr "Zmień hasło" -#: plugins/auth.py:191 +#: plugins/auth.py:197 #, python-format msgid "Change password: %s" msgstr "Zmień hasło: %s" -#: plugins/auth.py:216 plugins/auth.py:248 +#: plugins/auth.py:222 plugins/auth.py:254 msgid "Password changed successfully." msgstr "Zmiana hasła zakończona powodzieniem" -#: plugins/auth.py:235 templates/xadmin/auth/user/change_password.html:11 +#: plugins/auth.py:241 templates/xadmin/auth/user/change_password.html:11 #: templates/xadmin/auth/user/change_password.html:22 #: templates/xadmin/auth/user/change_password.html:55 msgid "Change password" @@ -355,7 +344,7 @@ msgstr[0] "1 komentarz został z powodzeniem %(action)s." msgstr[1] "%(count)s komentarze zostało z powodzeniem %(action)s." msgstr[2] "%(count)s komentarzy zostało z powodzeniem %(action)s." -#: plugins/details.py:52 views/list.py:576 +#: plugins/details.py:52 views/list.py:579 #, python-format msgid "Details of %s" msgstr "Szczegóły %s" @@ -366,7 +355,7 @@ msgid "Enter %s" msgstr "Wejdz w %s" #: plugins/editable.py:73 views/dashboard.py:645 views/delete.py:26 -#: views/detail.py:144 views/edit.py:428 +#: views/detail.py:144 views/edit.py:438 #, python-format msgid "%(name)s object with primary key %(key)r does not exist." msgstr "Obiekt %(name)s z kluczem głównym %(key)r nie istnieje." @@ -412,7 +401,7 @@ msgstr "Miniaturki" msgid "Forgotten your password or username?" msgstr "Zapomniałeś swojego hasła lub loginu ?" -#: plugins/quickform.py:77 +#: plugins/quickform.py:79 #, python-format msgid "Create New %s" msgstr "Utwórz nowy %s" @@ -426,6 +415,12 @@ msgstr "Powiązane obiekty" msgid "Search %s" msgstr "Szukaj %s" +#: plugins/relfield.py:67 +#, fuzzy, python-format +#| msgid "Select Date" +msgid "Select %s" +msgstr "Wybierz datę" + #: plugins/themes.py:47 msgid "Default" msgstr "Domyślny" @@ -442,8 +437,8 @@ msgstr "Bootstrap2" msgid "Bootstrap 2.x theme" msgstr "Tematy Bootstrap 2.x" -#: plugins/topnav.py:63 views/dashboard.py:462 views/edit.py:361 -#: views/edit.py:370 +#: plugins/topnav.py:63 views/dashboard.py:462 views/edit.py:371 +#: views/edit.py:380 #, python-format msgid "Add %s" msgstr "Dodaj %s" @@ -510,12 +505,8 @@ msgstr "Przywróć %s" #: plugins/xversion.py:456 #, python-format -msgid "" -"The %(model)s \"%(name)s\" was reverted successfully. You may edit it again " -"below." -msgstr "" -"%(model)s \"%(name)s\" został przywrócony z powodzeniem. Możesz edytować go " -"ponownie poniżej." +msgid "The %(model)s \"%(name)s\" was reverted successfully. You may edit it again below." +msgstr "%(model)s \"%(name)s\" został przywrócony z powodzeniem. Możesz edytować go ponownie poniżej." #: plugins/xversion.py:477 #, python-format @@ -524,12 +515,8 @@ msgstr "Odzyskaj %s" #: plugins/xversion.py:493 #, python-format -msgid "" -"The %(model)s \"%(name)s\" was recovered successfully. You may edit it again " -"below." -msgstr "" -"%(model)s \"%(name)s\" został z powodzeniem odzyskany. Możesz edytować go " -"ponownie poniżej." +msgid "The %(model)s \"%(name)s\" was recovered successfully. You may edit it again below." +msgstr "%(model)s \"%(name)s\" został z powodzeniem odzyskany. Możesz edytować go ponownie poniżej." #: templates/xadmin/404.html:4 templates/xadmin/404.html.py:8 msgid "Page not found" @@ -539,9 +526,10 @@ msgstr "Strona nie została odnaleziona" msgid "We're sorry, but the requested page could not be found." msgstr "Przepraszamy, ale żądana strona nie została odnaleziona." -#: templates/xadmin/500.html:7 templates/xadmin/base_site.html:54 +#: templates/xadmin/500.html:7 #: templates/xadmin/auth/user/change_password.html:10 #: templates/xadmin/auth/user/change_password.html:15 +#: templates/xadmin/base_site.html:56 #: templates/xadmin/includes/sitemenu_default.html:7 #: templates/xadmin/views/app_index.html:9 #: templates/xadmin/views/batch_change_form.html:9 @@ -552,7 +540,7 @@ msgstr "Przepraszamy, ale żądana strona nie została odnaleziona." #: templates/xadmin/views/recover_form.html:8 #: templates/xadmin/views/recover_list.html:8 #: templates/xadmin/views/revision_diff.html:8 -#: templates/xadmin/views/revision_form.html:8 views/base.py:462 +#: templates/xadmin/views/revision_form.html:8 views/base.py:463 msgid "Home" msgstr "Home" @@ -569,25 +557,8 @@ msgid "Server Error (500)" msgstr "Błąd Serwera (500)" #: templates/xadmin/500.html:16 -msgid "" -"There's been an error. It's been reported to the site administrators via e-" -"mail and should be fixed shortly. Thanks for your patience." -msgstr "" -"Wystąpił błąd. Został zaraportowany do administratorów strony przez e-mail i " -"wkrótce powienien zostać naprawiony. Dziękujemy za wyrozumiałość i " -"cierpliwość." - -#: templates/xadmin/base_site.html:19 -msgid "Welcome," -msgstr "Witaj, " - -#: templates/xadmin/base_site.html:25 -msgid "Log out" -msgstr "Wyloguj" - -#: templates/xadmin/base_site.html:37 -msgid "You don't have permission to edit anything." -msgstr "Nie masz uprawnień by edytować cokolwiek." +msgid "There's been an error. It's been reported to the site administrators via e-mail and should be fixed shortly. Thanks for your patience." +msgstr "Wystąpił błąd. Został zaraportowany do administratorów strony przez e-mail i wkrótce powienien zostać naprawiony. Dziękujemy za wyrozumiałość i cierpliwość." #: templates/xadmin/auth/password_reset/complete.html:11 #: templates/xadmin/auth/password_reset/done.html:11 @@ -596,8 +567,7 @@ msgstr "Reset hasła zakończony powodzeniem" #: templates/xadmin/auth/password_reset/complete.html:14 msgid "Your password has been set. You may go ahead and log in now." -msgstr "" -"Twoje hasło zostało ustawione. Możesz teraz przejść dalej i zalogować się." +msgstr "Twoje hasło zostało ustawione. Możesz teraz przejść dalej i zalogować się." #: templates/xadmin/auth/password_reset/complete.html:15 msgid "Log in" @@ -608,12 +578,8 @@ msgid "Enter new password" msgstr "Wpisz nowe hasło" #: templates/xadmin/auth/password_reset/confirm.html:17 -msgid "" -"Please enter your new password twice so we can verify you typed it in " -"correctly." -msgstr "" -"Proszę wpisać Twoje nowe hasło dwukrotnie, aby zweryfikować, czy wpisałeś je " -"poprawnie." +msgid "Please enter your new password twice so we can verify you typed it in correctly." +msgstr "Proszę wpisać Twoje nowe hasło dwukrotnie, aby zweryfikować, czy wpisałeś je poprawnie." #: templates/xadmin/auth/password_reset/confirm.html:19 msgid "Change my password" @@ -624,29 +590,17 @@ msgid "Password reset unsuccessful" msgstr "Resetowanie hasło zakończone niepowodzeniem" #: templates/xadmin/auth/password_reset/confirm.html:27 -msgid "" -"The password reset link was invalid, possibly because it has already been " -"used. Please request a new password reset." -msgstr "" -"Twój link do resetowania hasła jest niepoprawny, prawdopodobnie został już " -"użyty. Proszę, zażądaj nowego linku (wykonaj raz jeszcze reset hasła)." +msgid "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." +msgstr "Twój link do resetowania hasła jest niepoprawny, prawdopodobnie został już użyty. Proszę, zażądaj nowego linku (wykonaj raz jeszcze reset hasła)." #: templates/xadmin/auth/password_reset/done.html:14 -msgid "" -"We've e-mailed you instructions for setting your password to the e-mail " -"address you submitted. You should be receiving it shortly." -msgstr "" -"Wysłaliśmy Ci e-mailem instrukcję ustawienia Twojego hasła na adres, który " -"podałeś. Powinieneś go wkrótce otrzymać." +msgid "We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly." +msgstr "Wysłaliśmy Ci e-mailem instrukcję ustawienia Twojego hasła na adres, który podałeś. Powinieneś go wkrótce otrzymać." #: templates/xadmin/auth/password_reset/email.html:2 #, python-format -msgid "" -"You're receiving this e-mail because you requested a password reset for your " -"user account at %(site_name)s." -msgstr "" -"Otrzymałeś tego e-maila, ponieważ zarządałeś zresetowania hasła do twojego " -"konta na maszynie %(site_name)s." +msgid "You're receiving this e-mail because you requested a password reset for your user account at %(site_name)s." +msgstr "Otrzymałeś tego e-maila, ponieważ zarządałeś zresetowania hasła do twojego konta na maszynie %(site_name)s." #: templates/xadmin/auth/password_reset/email.html:4 msgid "Please go to the following page and choose a new password:" @@ -670,12 +624,8 @@ msgid "Password reset" msgstr "Reset hasła" #: templates/xadmin/auth/password_reset/form.html:17 -msgid "" -"Forgotten your password? Enter your e-mail address below, and we'll e-mail " -"instructions for setting a new one." -msgstr "" -"Zapomiałeś swoje hasło ? Wpisz Twój adres e-mail poniżej, a my prześlemy Ci " -"maila z instrukcjami, jak ustawić nowe." +msgid "Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one." +msgstr "Zapomiałeś swoje hasło ? Wpisz Twój adres e-mail poniżej, a my prześlemy Ci maila z instrukcjami, jak ustawić nowe." #: templates/xadmin/auth/password_reset/form.html:25 msgid "E-mail address:" @@ -686,12 +636,8 @@ msgid "Reset my password" msgstr "Zresetuj moje hasło" #: templates/xadmin/auth/user/add_form.html:6 -msgid "" -"First, enter a username and password. Then, you'll be able to edit more user " -"options." -msgstr "" -"Po pierwsze, wpisz nazwę użytkownika i hasło. Potem bedziesz mógł edytować " -"pozostałe opcje użytkownika." +msgid "First, enter a username and password. Then, you'll be able to edit more user options." +msgstr "Po pierwsze, wpisz nazwę użytkownika i hasło. Potem bedziesz mógł edytować pozostałe opcje użytkownika." #: templates/xadmin/auth/user/add_form.html:8 msgid "Enter a username and password." @@ -716,11 +662,24 @@ msgstr "Wpisz Twoje nowe hasło." msgid "Enter a new password for the user %(username)s." msgstr "Wpisz nowe hasło dla użytkownika %(username)s." +#: templates/xadmin/base_site.html:21 +msgid "Welcome," +msgstr "Witaj, " + +#: templates/xadmin/base_site.html:27 +msgid "Log out" +msgstr "Wyloguj" + +#: templates/xadmin/base_site.html:39 +msgid "You don't have permission to edit anything." +msgstr "Nie masz uprawnień by edytować cokolwiek." + #: templates/xadmin/blocks/comm.top.theme.html:4 msgid "Themes" msgstr "Tematy" #: templates/xadmin/blocks/comm.top.topnav.html:8 +#: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 #: templates/xadmin/filters/fk_search.html:14 @@ -746,7 +705,7 @@ msgstr "Następny krok" #: templates/xadmin/blocks/model_form.submit_line.wizard.html:31 #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Save" msgstr "Zapisz" @@ -958,7 +917,7 @@ msgstr "Pokaż wszystkie" #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Saving.." msgstr "Zapisuję.." @@ -1007,14 +966,8 @@ msgid "Add Widget" msgstr "Dodaj widget" #: templates/xadmin/views/invalid_setup.html:13 -msgid "" -"Something's wrong with your database installation. Make sure the appropriate " -"database tables have been created, and make sure the database is readable by " -"the appropriate user." -msgstr "" -"Coś złego dzieje się z Twoją bazą danych. Upewnij się, że konieczne tabele w " -"Twojej bazie danych zostały skreowane i mogą być czytane przez właściwych " -"użytkowników." +msgid "Something's wrong with your database installation. Make sure the appropriate database tables have been created, and make sure the database is readable by the appropriate user." +msgstr "Coś złego dzieje się z Twoją bazą danych. Upewnij się, że konieczne tabele w Twojej bazie danych zostały skreowane i mogą być czytane przez właściwych użytkowników." #: templates/xadmin/views/logged_out.html:16 msgid "Logout Success" @@ -1055,32 +1008,18 @@ msgstr "Edytuj" #: templates/xadmin/views/model_delete_confirm.html:11 #, python-format -msgid "" -"Deleting the %(verbose_name)s '%(escaped_object)s' would result in deleting " -"related objects, but your account doesn't have permission to delete the " -"following types of objects:" -msgstr "" -"Usunięcie %(verbose_name)s '%(escaped_object)s' spowoduje usunięcie " -"powiązanych obiektów, ale Twoje konto nie ma uprawnień do usunięcia " -"następujących typów obiektów:" +msgid "Deleting the %(verbose_name)s '%(escaped_object)s' would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:" +msgstr "Usunięcie %(verbose_name)s '%(escaped_object)s' spowoduje usunięcie powiązanych obiektów, ale Twoje konto nie ma uprawnień do usunięcia następujących typów obiektów:" #: templates/xadmin/views/model_delete_confirm.html:19 #, python-format -msgid "" -"Deleting the %(verbose_name)s '%(escaped_object)s' would require deleting " -"the following protected related objects:" -msgstr "" -"Usunięcie %(verbose_name)s '%(escaped_object)s' będzie wymagać usunięcia " -"następujących, chronionych obiektów powiązanych:" +msgid "Deleting the %(verbose_name)s '%(escaped_object)s' would require deleting the following protected related objects:" +msgstr "Usunięcie %(verbose_name)s '%(escaped_object)s' będzie wymagać usunięcia następujących, chronionych obiektów powiązanych:" #: templates/xadmin/views/model_delete_confirm.html:27 #, python-format -msgid "" -"Are you sure you want to delete the %(verbose_name)s \"%(escaped_object)s\"? " -"All of the following related items will be deleted:" -msgstr "" -"Czy jesteś pewien, że chcesz usunąć %(verbose_name)s \"%(escaped_object)s" -"\" ? Wszystkie następujące powiązane obiekty zostaną usunięte:" +msgid "Are you sure you want to delete the %(verbose_name)s \"%(escaped_object)s\"? All of the following related items will be deleted:" +msgstr "Czy jesteś pewien, że chcesz usunąć %(verbose_name)s \"%(escaped_object)s\" ? Wszystkie następujące powiązane obiekty zostaną usunięte:" #: templates/xadmin/views/model_delete_confirm.html:34 #: templates/xadmin/views/model_delete_selected_confirm.html:49 @@ -1098,32 +1037,18 @@ msgstr "Usuń wiele obiektów" #: templates/xadmin/views/model_delete_selected_confirm.html:18 #, python-format -msgid "" -"Deleting the selected %(objects_name)s would result in deleting related " -"objects, but your account doesn't have permission to delete the following " -"types of objects:" -msgstr "" -"Usunięcie wybranego obiektów %(objects_name)s będzie skutkowało usunięciem " -"powiązanych obiektów, ale Twoje konto nie posiada uprawnień do usunięcia " -"następujących obiektów:" +msgid "Deleting the selected %(objects_name)s would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:" +msgstr "Usunięcie wybranego obiektów %(objects_name)s będzie skutkowało usunięciem powiązanych obiektów, ale Twoje konto nie posiada uprawnień do usunięcia następujących obiektów:" #: templates/xadmin/views/model_delete_selected_confirm.html:26 #, python-format -msgid "" -"Deleting the selected %(objects_name)s would require deleting the following " -"protected related objects:" -msgstr "" -"Usunięcie zaznaczonych obiektów %(objects_name)s będzie wymagało usunięcia " -"następujących zabezpieczonych powiązanych obiektów:" +msgid "Deleting the selected %(objects_name)s would require deleting the following protected related objects:" +msgstr "Usunięcie zaznaczonych obiektów %(objects_name)s będzie wymagało usunięcia następujących zabezpieczonych powiązanych obiektów:" #: templates/xadmin/views/model_delete_selected_confirm.html:34 #, python-format -msgid "" -"Are you sure you want to delete the selected %(objects_name)s? All of the " -"following objects and their related items will be deleted:" -msgstr "" -"Jesteś pewny, że chcesz usunąc zaznaczone obiekty %(objects_name)s ? " -"Wszystkie następujące obiekty i ich powiązania zostaną usunięte:" +msgid "Are you sure you want to delete the selected %(objects_name)s? All of the following objects and their related items will be deleted:" +msgstr "Jesteś pewny, że chcesz usunąc zaznaczone obiekty %(objects_name)s ? Wszystkie następujące obiekty i ich powiązania zostaną usunięte:" #: templates/xadmin/views/model_history.html:26 msgid "Diff" @@ -1147,12 +1072,8 @@ msgid "Diff Select Versions" msgstr "Róznica w wybranych wersjach" #: templates/xadmin/views/model_history.html:58 -msgid "" -"This object doesn't have a change history. It probably wasn't added via this " -"admin site." -msgstr "" -"Ten obiekt nie posiada historii zmian. Prawdopodobnie nie został on dodany " -"przez panel administratora." +msgid "This object doesn't have a change history. It probably wasn't added via this admin site." +msgstr "Ten obiekt nie posiada historii zmian. Prawdopodobnie nie został on dodany przez panel administratora." #: templates/xadmin/views/model_list.html:29 #, python-format @@ -1177,10 +1098,8 @@ msgid "Press the recover button below to recover this version of the object." msgstr "Naciśnij przycisk odzyskiwania poniżej, by odzyskać tę wersję obiektu." #: templates/xadmin/views/recover_list.html:19 -msgid "" -"Choose a date from the list below to recover a deleted version of an object." -msgstr "" -"Wybierz datę z poniższej listy aby odzyskać usuniętą wersję danego obiektu." +msgid "Choose a date from the list below to recover a deleted version of an object." +msgstr "Wybierz datę z poniższej listy aby odzyskać usuniętą wersję danego obiektu." #: templates/xadmin/views/recover_list.html:39 msgid "There are no deleted objects to recover." @@ -1220,8 +1139,7 @@ msgstr "Przywróć %(verbose_name)s" #: templates/xadmin/views/revision_form.html:21 msgid "Press the revert button below to revert to this version of the object." -msgstr "" -"Naciśnij przycisk przywracania poniżej, aby przywrócić obiekt do tej wersji." +msgstr "Naciśnij przycisk przywracania poniżej, aby przywrócić obiekt do tej wersji." #: templates/xadmin/views/revision_form.html:27 msgid "Revert this revision" @@ -1247,12 +1165,14 @@ msgstr "Opcje widgetów" msgid "Save changes" msgstr "Zapisz zmiany" -#: views/base.py:443 +#: views/base.py:444 msgid "Django Xadmin" msgstr "Django Xadmin" -#: views/base.py:444 -msgid "my-company.inc 2013" +#: views/base.py:445 +#, fuzzy +#| msgid "my-company.inc 2013" +msgid "my-company.inc" msgstr "moja-firma.inc 2013" #: views/dashboard.py:185 @@ -1305,7 +1225,7 @@ msgstr "%s Dashboard" msgid "The %(name)s \"%(obj)s\" was deleted successfully." msgstr "%(name)s \"%(obj)s\" został usunięty z powodzeniem." -#: views/detail.py:172 views/edit.py:199 views/form.py:72 +#: views/detail.py:172 views/edit.py:209 views/form.py:72 msgid "Other Fields" msgstr "Inne pola" @@ -1314,26 +1234,26 @@ msgstr "Inne pola" msgid "%s Detail" msgstr "Szczegóły %s" -#: views/edit.py:394 +#: views/edit.py:404 #, python-format msgid "The %(name)s \"%(obj)s\" was added successfully." msgstr "%(name)s \"%(obj)s\" został dodany z sukcesem." -#: views/edit.py:399 views/edit.py:494 +#: views/edit.py:409 views/edit.py:504 msgid "You may edit it again below." msgstr "Możesz edytować to powtórnie poniżej." -#: views/edit.py:403 views/edit.py:497 +#: views/edit.py:413 views/edit.py:507 #, python-format msgid "You may add another %s below." msgstr "Możesz dodać kolejny %s poniżej." -#: views/edit.py:445 +#: views/edit.py:455 #, python-format msgid "Change %s" msgstr "Zmień %s" -#: views/edit.py:490 +#: views/edit.py:500 #, python-format msgid "The %(name)s \"%(obj)s\" was changed successfully." msgstr "%(name)s \"%(obj)s\" został zmieniony z powodzeniem." @@ -1367,3 +1287,7 @@ msgstr "Anuluj sortowanie" #: views/website.py:16 msgid "Main Dashboard" msgstr "Główny Dashboard" + +#: widgets.py:48 +msgid "Now" +msgstr "Teraz" diff --git a/xadmin/locale/pt_BR/LC_MESSAGES/django.mo b/xadmin/locale/pt_BR/LC_MESSAGES/django.mo index d29992f30f4609d26a196f794f662257ee51de24..469dd28c58a6fecead9553f49f65c706bbd9c722 100644 GIT binary patch delta 28 kcmaF3fbro1#tkzKc+GSTjC7666$}lnOpP}$GuSN;0F@;PZ2$lO delta 28 kcmaF3fbro1#tkzKcujN-40R0+6buclj14z0GuSN;0F-VCT>t<8 diff --git a/xadmin/locale/pt_BR/LC_MESSAGES/django.po b/xadmin/locale/pt_BR/LC_MESSAGES/django.po index 6fca08fae..cd2edbf0a 100644 --- a/xadmin/locale/pt_BR/LC_MESSAGES/django.po +++ b/xadmin/locale/pt_BR/LC_MESSAGES/django.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: xadmin-core\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-10 10:31+0800\n" +"POT-Creation-Date: 2016-02-27 11:53+0800\n" "PO-Revision-Date: 2013-11-20 10:21+0000\n" "Last-Translator: gladson \n" "Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/xadmin/language/pt_BR/)\n" @@ -21,47 +21,51 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: filters.py:157 filters.py:189 filters.py:401 filters.py:451 +#: apps.py:10 +msgid "Administration" +msgstr "" + +#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 msgid "All" msgstr "Tudo" -#: filters.py:158 plugins/export.py:117 +#: filters.py:159 plugins/export.py:162 msgid "Yes" msgstr "Sim" -#: filters.py:159 plugins/export.py:117 +#: filters.py:160 plugins/export.py:162 msgid "No" msgstr "Não" -#: filters.py:173 +#: filters.py:174 msgid "Unknown" msgstr "Desconhecido" -#: filters.py:265 +#: filters.py:266 msgid "Any date" msgstr "Qualquer data" -#: filters.py:266 +#: filters.py:267 msgid "Has date" msgstr "Tem data" -#: filters.py:269 +#: filters.py:270 msgid "Has no date" msgstr "Não tem data" -#: filters.py:272 widgets.py:30 +#: filters.py:273 widgets.py:30 msgid "Today" msgstr "Hoje" -#: filters.py:276 +#: filters.py:277 msgid "Past 7 days" msgstr "Passados 7 dias" -#: filters.py:280 +#: filters.py:281 msgid "This month" msgstr "Este mês" -#: filters.py:284 +#: filters.py:285 msgid "This year" msgstr "Este ano" @@ -98,7 +102,7 @@ msgstr "String de Consulta" msgid "Is Shared" msgstr "É Compartilhada" -#: models.py:65 plugins/bookmark.py:49 plugins/bookmark.py:177 +#: models.py:65 plugins/bookmark.py:49 plugins/bookmark.py:178 msgid "Bookmark" msgstr "Favorito" @@ -142,42 +146,38 @@ msgstr "Widget do Usuário" msgid "User Widgets" msgstr "Widgets do Usuário" -#: widgets.py:48 -msgid "Now" -msgstr "Agora" - #: plugins/actions.py:54 #, python-format msgid "Delete selected %(verbose_name_plural)s" msgstr "Excluir selecionado %(verbose_name_plural)s" -#: plugins/actions.py:67 +#: plugins/actions.py:73 #, python-format msgid "Successfully deleted %(count)d %(items)s." msgstr "Excluído com sucesso %(count)d %(items)s." -#: plugins/actions.py:99 views/delete.py:68 +#: plugins/actions.py:105 views/delete.py:68 #, python-format msgid "Cannot delete %(name)s" msgstr "Não é possível excluir %(name)s" -#: plugins/actions.py:101 views/delete.py:71 +#: plugins/actions.py:107 views/delete.py:71 msgid "Are you sure?" msgstr "Você tem certeza?" -#: plugins/actions.py:147 +#: plugins/actions.py:153 #, python-format msgid "%(total_count)s selected" msgid_plural "All %(total_count)s selected" msgstr[0] "Todos %(total_count)s selecionados" msgstr[1] "Todos %(total_count)s selecionados" -#: plugins/actions.py:151 +#: plugins/actions.py:157 #, python-format msgid "0 of %(cnt)s selected" msgstr "0 de %(cnt)s selecionados" -#: plugins/actions.py:168 plugins/actions.py:178 +#: plugins/actions.py:174 plugins/actions.py:184 msgid "Items must be selected in order to perform actions on them. No items have been changed." msgstr "Os itens devem ser selecionados, a fim de executar ações sobre eles. Não há itens alterados." @@ -247,20 +247,20 @@ msgstr "Status" msgid "Permission Name" msgstr "Permissões" -#: plugins/auth.py:159 +#: plugins/auth.py:167 msgid "Change Password" msgstr "Alterar Senha" -#: plugins/auth.py:189 +#: plugins/auth.py:197 #, python-format msgid "Change password: %s" msgstr "Alterar senha: %s" -#: plugins/auth.py:214 plugins/auth.py:246 +#: plugins/auth.py:222 plugins/auth.py:254 msgid "Password changed successfully." msgstr "Senha alterada com sucesso." -#: plugins/auth.py:233 templates/xadmin/auth/user/change_password.html:11 +#: plugins/auth.py:241 templates/xadmin/auth/user/change_password.html:11 #: templates/xadmin/auth/user/change_password.html:22 #: templates/xadmin/auth/user/change_password.html:55 msgid "Change password" @@ -275,12 +275,12 @@ msgstr "Alterar este campo" msgid "Batch Change selected %(verbose_name_plural)s" msgstr "Alterar lote selecionado %(verbose_name_plural)s" -#: plugins/batch.py:90 +#: plugins/batch.py:88 #, python-format msgid "Successfully change %(count)d %(items)s." msgstr "Alterado com sucesso %(count)d %(items)s." -#: plugins/batch.py:138 +#: plugins/batch.py:136 #, python-format msgid "Batch change %s" msgstr "Lote alterado %s" @@ -289,7 +289,7 @@ msgstr "Lote alterado %s" msgid "bookmark" msgstr "Favorito" -#: plugins/bookmark.py:173 +#: plugins/bookmark.py:174 msgid "Bookmark Widget, can show user's bookmark list data in widget." msgstr "Widget de Marcador, pode mostrar a lista de marcadores do usuário no widget" @@ -297,7 +297,7 @@ msgstr "Widget de Marcador, pode mostrar a lista de marcadores do usuário no wi msgid "Show models simple chart." msgstr "Mostrar modelos gráfico simples." -#: plugins/chart.py:49 +#: plugins/chart.py:50 #, python-format msgid "%s Charts" msgstr "%s Gráficos" @@ -345,27 +345,27 @@ msgid_plural "%(count)s comments were successfully %(action)s." msgstr[0] "" msgstr[1] "" -#: plugins/details.py:52 views/list.py:576 +#: plugins/details.py:52 views/list.py:579 #, python-format msgid "Details of %s" msgstr "Detalhes de %s" -#: plugins/editable.py:47 +#: plugins/editable.py:46 #, python-format msgid "Enter %s" msgstr "Entrar %s" -#: plugins/editable.py:74 views/dashboard.py:638 views/delete.py:26 -#: views/detail.py:144 views/edit.py:428 +#: plugins/editable.py:73 views/dashboard.py:645 views/delete.py:26 +#: views/detail.py:144 views/edit.py:438 #, python-format msgid "%(name)s object with primary key %(key)r does not exist." msgstr "%(name)s objeto com chave primária %(key)r não existe." -#: plugins/export.py:87 +#: plugins/export.py:95 plugins/export.py:132 msgid "Sheet" msgstr "Planilha" -#: plugins/filters.py:125 +#: plugins/filters.py:132 plugins/quickfilter.py:140 #, python-format msgid "Filtering error: %s" msgstr "Filtrar erro: %s" @@ -402,7 +402,7 @@ msgstr "Miniaturas" msgid "Forgotten your password or username?" msgstr "Esqueceu seu nome de usuário ou senha?" -#: plugins/quickform.py:77 +#: plugins/quickform.py:79 #, python-format msgid "Create New %s" msgstr "Criar novo %s" @@ -411,11 +411,17 @@ msgstr "Criar novo %s" msgid "Related Objects" msgstr "Objetos Relacionados" -#: plugins/relfield.py:29 plugins/topnav.py:35 +#: plugins/relfield.py:29 plugins/topnav.py:38 #, python-format msgid "Search %s" msgstr "Pesquisar %s" +#: plugins/relfield.py:67 +#, fuzzy, python-format +#| msgid "Select Date" +msgid "Select %s" +msgstr "Selecionar Data" + #: plugins/themes.py:47 msgid "Default" msgstr "Padrão" @@ -432,8 +438,8 @@ msgstr "Bootstrap2" msgid "Bootstrap 2.x theme" msgstr "Tema Bootstrap 2.x" -#: plugins/topnav.py:58 views/dashboard.py:455 views/edit.py:361 -#: views/edit.py:370 +#: plugins/topnav.py:63 views/dashboard.py:462 views/edit.py:371 +#: views/edit.py:380 #, python-format msgid "Add %s" msgstr "Adicionar %s" @@ -521,9 +527,10 @@ msgstr "Página não encontrada" msgid "We're sorry, but the requested page could not be found." msgstr "Pedimos desculpas, mas a página solicitada não foi encontrada." -#: templates/xadmin/500.html:7 templates/xadmin/base_site.html:53 +#: templates/xadmin/500.html:7 #: templates/xadmin/auth/user/change_password.html:10 #: templates/xadmin/auth/user/change_password.html:15 +#: templates/xadmin/base_site.html:56 #: templates/xadmin/includes/sitemenu_default.html:7 #: templates/xadmin/views/app_index.html:9 #: templates/xadmin/views/batch_change_form.html:9 @@ -534,7 +541,7 @@ msgstr "Pedimos desculpas, mas a página solicitada não foi encontrada." #: templates/xadmin/views/recover_form.html:8 #: templates/xadmin/views/recover_list.html:8 #: templates/xadmin/views/revision_diff.html:8 -#: templates/xadmin/views/revision_form.html:8 views/base.py:448 +#: templates/xadmin/views/revision_form.html:8 views/base.py:463 msgid "Home" msgstr "Início" @@ -554,18 +561,6 @@ msgstr "Erro do Servidor (500)" msgid "There's been an error. It's been reported to the site administrators via e-mail and should be fixed shortly. Thanks for your patience." msgstr "Ocorreu um erro. E foi relatado aos administradores do site via e-mail e deve ser corrigido em breve. Obrigado por sua paciência." -#: templates/xadmin/base_site.html:19 -msgid "Welcome," -msgstr "Bem-Vindo," - -#: templates/xadmin/base_site.html:25 -msgid "Log out" -msgstr "Sair" - -#: templates/xadmin/base_site.html:37 -msgid "You don't have permission to edit anything." -msgstr "Você não tem permissão para editar nada." - #: templates/xadmin/auth/password_reset/complete.html:11 #: templates/xadmin/auth/password_reset/done.html:11 msgid "Password reset successful" @@ -667,11 +662,24 @@ msgstr "Digite sua nova senha." msgid "Enter a new password for the user %(username)s." msgstr "Digite uma nova senha para o usuário %(username)s." +#: templates/xadmin/base_site.html:21 +msgid "Welcome," +msgstr "Bem-Vindo," + +#: templates/xadmin/base_site.html:27 +msgid "Log out" +msgstr "Sair" + +#: templates/xadmin/base_site.html:39 +msgid "You don't have permission to edit anything." +msgstr "Você não tem permissão para editar nada." + #: templates/xadmin/blocks/comm.top.theme.html:4 msgid "Themes" msgstr "Temas" #: templates/xadmin/blocks/comm.top.topnav.html:8 +#: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 #: templates/xadmin/filters/fk_search.html:14 @@ -697,7 +705,7 @@ msgstr "Próximo passo" #: templates/xadmin/blocks/model_form.submit_line.wizard.html:31 #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Save" msgstr "Gravar" @@ -757,26 +765,27 @@ msgstr "Gráficos" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:4 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:8 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:19 -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:44 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:47 msgid "Export" msgstr "Exportar" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:26 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:29 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:32 msgid "Export with table header." msgstr "Exportar com cabeçalho da tabela" -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:32 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:35 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:38 msgid "Export with format." msgstr "Exportar com o formato." -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:39 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:42 msgid "Export all data." msgstr "Exportar todos os dados." -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:43 -#: templates/xadmin/widgets/base.html:40 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:46 +#: templates/xadmin/widgets/base.html:41 msgid "Close" msgstr "Fechar" @@ -886,7 +895,7 @@ msgid "Choose" msgstr "Escolher" #: templates/xadmin/forms/transfer.html:19 -#: templates/xadmin/widgets/base.html:39 +#: templates/xadmin/widgets/base.html:40 msgid "Remove" msgstr "Remover" @@ -908,7 +917,7 @@ msgstr "Mostrar Tudo" #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Saving.." msgstr "Salvando..." @@ -1148,18 +1157,22 @@ msgstr "Sucesso na adição, clique editar para editar." msgid "Quick Add" msgstr "Adição Rápida" -#: templates/xadmin/widgets/base.html:30 +#: templates/xadmin/widgets/base.html:31 msgid "Widget Options" msgstr "Opções do Widget" -#: templates/xadmin/widgets/base.html:41 +#: templates/xadmin/widgets/base.html:42 msgid "Save changes" msgstr "Gravar alterações" -#: views/base.py:430 +#: views/base.py:444 msgid "Django Xadmin" msgstr "Django Xadmin" +#: views/base.py:445 +msgid "my-company.inc" +msgstr "" + #: views/dashboard.py:185 msgid "Widget ID" msgstr "ID do Widget" @@ -1168,39 +1181,39 @@ msgstr "ID do Widget" msgid "Widget Title" msgstr "Título do Widget" -#: views/dashboard.py:248 +#: views/dashboard.py:249 msgid "Html Content Widget, can write any html content in widget." msgstr "Widget de Conteúdo HTML, pode-se escrever qualquer conteúdo html no widget." -#: views/dashboard.py:251 +#: views/dashboard.py:252 msgid "Html Content" msgstr "Conteúdo HTML" -#: views/dashboard.py:314 +#: views/dashboard.py:315 msgid "Target Model" msgstr "Modelo Alvo" -#: views/dashboard.py:365 +#: views/dashboard.py:366 msgid "Quick button Widget, quickly open any page." msgstr "Widget de Botão Rápido, abre rapidamente qualquer página." -#: views/dashboard.py:367 +#: views/dashboard.py:368 msgid "Quick Buttons" msgstr "Botões Rápidos" -#: views/dashboard.py:408 +#: views/dashboard.py:413 msgid "Any Objects list Widget." msgstr "Widget de listagem de Qualquer Objeto" -#: views/dashboard.py:447 +#: views/dashboard.py:453 msgid "Add any model object Widget." msgstr "Widget de adição de qualquer objeto." -#: views/dashboard.py:481 +#: views/dashboard.py:488 msgid "Dashboard" msgstr "Painel" -#: views/dashboard.py:622 +#: views/dashboard.py:629 #, python-format msgid "%s Dashboard" msgstr "%s Painel" @@ -1210,7 +1223,7 @@ msgstr "%s Painel" msgid "The %(name)s \"%(obj)s\" was deleted successfully." msgstr "%(name)s \"%(obj)s\" excluído(a) com sucesso." -#: views/detail.py:172 views/edit.py:199 views/form.py:72 +#: views/detail.py:172 views/edit.py:209 views/form.py:72 msgid "Other Fields" msgstr "Outros Campos" @@ -1219,26 +1232,26 @@ msgstr "Outros Campos" msgid "%s Detail" msgstr "%s Detalhes" -#: views/edit.py:394 +#: views/edit.py:404 #, python-format msgid "The %(name)s \"%(obj)s\" was added successfully." msgstr "%(name)s \"%(obj)s\" adicionado(a) com sucesso." -#: views/edit.py:399 views/edit.py:494 +#: views/edit.py:409 views/edit.py:504 msgid "You may edit it again below." msgstr "Você pode editar novamente abaixo." -#: views/edit.py:403 views/edit.py:497 +#: views/edit.py:413 views/edit.py:507 #, python-format msgid "You may add another %s below." msgstr "Você pode adicionar outro(a) %s abaixo." -#: views/edit.py:445 +#: views/edit.py:455 #, python-format msgid "Change %s" msgstr "Alterar %s" -#: views/edit.py:490 +#: views/edit.py:500 #, python-format msgid "The %(name)s \"%(obj)s\" was changed successfully." msgstr "%(name)s \"%(obj)s\" alterado(a) com sucesso." @@ -1272,3 +1285,7 @@ msgstr "Cancelar Classificação" #: views/website.py:16 msgid "Main Dashboard" msgstr "Painel Principal" + +#: widgets.py:48 +msgid "Now" +msgstr "Agora" diff --git a/xadmin/locale/ru_RU/LC_MESSAGES/django.mo b/xadmin/locale/ru_RU/LC_MESSAGES/django.mo index a7f41863bb02577bf59fbb640e8fad08e7878717..4b5b4c218adac6bc09675bfb5b6796e485ff45cd 100644 GIT binary patch delta 26 hcmca=a@AzRcWz!YT>~RsBXb2qLn~9`%`7~Dd;ogT2Xg=b delta 26 hcmca=a@AzRcWz!2T?0d1Ljwgv11n?0%`7~Dd;oeG2V(#L diff --git a/xadmin/locale/ru_RU/LC_MESSAGES/django.po b/xadmin/locale/ru_RU/LC_MESSAGES/django.po index dc2508b5e..0999f34b4 100644 --- a/xadmin/locale/ru_RU/LC_MESSAGES/django.po +++ b/xadmin/locale/ru_RU/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: xadmin-core\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-10 10:31+0800\n" +"POT-Creation-Date: 2016-02-27 11:53+0800\n" "PO-Revision-Date: 2013-12-28 19:36+0000\n" "Last-Translator: crazyzubr \n" "Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/xadmin/language/ru_RU/)\n" @@ -18,47 +18,51 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: filters.py:157 filters.py:189 filters.py:401 filters.py:451 +#: apps.py:10 +msgid "Administration" +msgstr "" + +#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 msgid "All" msgstr "Все" -#: filters.py:158 plugins/export.py:117 +#: filters.py:159 plugins/export.py:162 msgid "Yes" msgstr "Да" -#: filters.py:159 plugins/export.py:117 +#: filters.py:160 plugins/export.py:162 msgid "No" msgstr "Нет" -#: filters.py:173 +#: filters.py:174 msgid "Unknown" msgstr "Неизвестно" -#: filters.py:265 +#: filters.py:266 msgid "Any date" msgstr "Любая дата" -#: filters.py:266 +#: filters.py:267 msgid "Has date" msgstr "" -#: filters.py:269 +#: filters.py:270 msgid "Has no date" msgstr "" -#: filters.py:272 widgets.py:30 +#: filters.py:273 widgets.py:30 msgid "Today" msgstr "Сегодня" -#: filters.py:276 +#: filters.py:277 msgid "Past 7 days" msgstr "За последние 7 дней" -#: filters.py:280 +#: filters.py:281 msgid "This month" msgstr "В этом месяце" -#: filters.py:284 +#: filters.py:285 msgid "This year" msgstr "В этом году" @@ -95,7 +99,7 @@ msgstr "Строка запроса" msgid "Is Shared" msgstr "" -#: models.py:65 plugins/bookmark.py:49 plugins/bookmark.py:177 +#: models.py:65 plugins/bookmark.py:49 plugins/bookmark.py:178 msgid "Bookmark" msgstr "Закладка" @@ -139,30 +143,26 @@ msgstr "" msgid "User Widgets" msgstr "" -#: widgets.py:48 -msgid "Now" -msgstr "Сейчас" - #: plugins/actions.py:54 #, python-format msgid "Delete selected %(verbose_name_plural)s" msgstr "Удалить выбранные %(verbose_name_plural)s" -#: plugins/actions.py:67 +#: plugins/actions.py:73 #, python-format msgid "Successfully deleted %(count)d %(items)s." msgstr "Успешно удалены %(count)d %(items)s." -#: plugins/actions.py:99 views/delete.py:68 +#: plugins/actions.py:105 views/delete.py:68 #, python-format msgid "Cannot delete %(name)s" msgstr "Не удается удалить %(name)s" -#: plugins/actions.py:101 views/delete.py:71 +#: plugins/actions.py:107 views/delete.py:71 msgid "Are you sure?" msgstr "Вы уверены?" -#: plugins/actions.py:147 +#: plugins/actions.py:153 #, python-format msgid "%(total_count)s selected" msgid_plural "All %(total_count)s selected" @@ -170,12 +170,12 @@ msgstr[0] "Выбран %(total_count)s" msgstr[1] "Выбраны все %(total_count)s" msgstr[2] "Выбраны все %(total_count)s" -#: plugins/actions.py:151 +#: plugins/actions.py:157 #, python-format msgid "0 of %(cnt)s selected" msgstr "Выбрано 0 объектов из %(cnt)s " -#: plugins/actions.py:168 plugins/actions.py:178 +#: plugins/actions.py:174 plugins/actions.py:184 msgid "Items must be selected in order to perform actions on them. No items have been changed." msgstr "Чтобы произвести действия над объектами, необходимо их выбрать. Объекты не были изменены." @@ -245,20 +245,20 @@ msgstr "Статус" msgid "Permission Name" msgstr "Права" -#: plugins/auth.py:159 +#: plugins/auth.py:167 msgid "Change Password" msgstr "Изменить пароль" -#: plugins/auth.py:189 +#: plugins/auth.py:197 #, python-format msgid "Change password: %s" msgstr "Изменить пароль: %s" -#: plugins/auth.py:214 plugins/auth.py:246 +#: plugins/auth.py:222 plugins/auth.py:254 msgid "Password changed successfully." msgstr "Пароль успешно изменен" -#: plugins/auth.py:233 templates/xadmin/auth/user/change_password.html:11 +#: plugins/auth.py:241 templates/xadmin/auth/user/change_password.html:11 #: templates/xadmin/auth/user/change_password.html:22 #: templates/xadmin/auth/user/change_password.html:55 msgid "Change password" @@ -273,12 +273,12 @@ msgstr "" msgid "Batch Change selected %(verbose_name_plural)s" msgstr "" -#: plugins/batch.py:90 +#: plugins/batch.py:88 #, python-format msgid "Successfully change %(count)d %(items)s." msgstr "" -#: plugins/batch.py:138 +#: plugins/batch.py:136 #, python-format msgid "Batch change %s" msgstr "" @@ -287,7 +287,7 @@ msgstr "" msgid "bookmark" msgstr "" -#: plugins/bookmark.py:173 +#: plugins/bookmark.py:174 msgid "Bookmark Widget, can show user's bookmark list data in widget." msgstr "" @@ -295,7 +295,7 @@ msgstr "" msgid "Show models simple chart." msgstr "" -#: plugins/chart.py:49 +#: plugins/chart.py:50 #, python-format msgid "%s Charts" msgstr "" @@ -345,27 +345,27 @@ msgstr[0] "" msgstr[1] "" msgstr[2] "" -#: plugins/details.py:52 views/list.py:576 +#: plugins/details.py:52 views/list.py:579 #, python-format msgid "Details of %s" msgstr "Детали %s" -#: plugins/editable.py:47 +#: plugins/editable.py:46 #, python-format msgid "Enter %s" msgstr "" -#: plugins/editable.py:74 views/dashboard.py:638 views/delete.py:26 -#: views/detail.py:144 views/edit.py:428 +#: plugins/editable.py:73 views/dashboard.py:645 views/delete.py:26 +#: views/detail.py:144 views/edit.py:438 #, python-format msgid "%(name)s object with primary key %(key)r does not exist." msgstr "" -#: plugins/export.py:87 +#: plugins/export.py:95 plugins/export.py:132 msgid "Sheet" msgstr "Лист" -#: plugins/filters.py:125 +#: plugins/filters.py:132 plugins/quickfilter.py:140 #, python-format msgid "Filtering error: %s" msgstr "" @@ -402,7 +402,7 @@ msgstr "" msgid "Forgotten your password or username?" msgstr "" -#: plugins/quickform.py:77 +#: plugins/quickform.py:79 #, python-format msgid "Create New %s" msgstr "" @@ -411,11 +411,16 @@ msgstr "" msgid "Related Objects" msgstr "Связанные объекты" -#: plugins/relfield.py:29 plugins/topnav.py:35 +#: plugins/relfield.py:29 plugins/topnav.py:38 #, python-format msgid "Search %s" msgstr "Поиск %s" +#: plugins/relfield.py:67 +#, python-format +msgid "Select %s" +msgstr "" + #: plugins/themes.py:47 msgid "Default" msgstr "" @@ -432,8 +437,8 @@ msgstr "" msgid "Bootstrap 2.x theme" msgstr "" -#: plugins/topnav.py:58 views/dashboard.py:455 views/edit.py:361 -#: views/edit.py:370 +#: plugins/topnav.py:63 views/dashboard.py:462 views/edit.py:371 +#: views/edit.py:380 #, python-format msgid "Add %s" msgstr "Добавить %s" @@ -521,9 +526,10 @@ msgstr "Страница не найдена" msgid "We're sorry, but the requested page could not be found." msgstr "" -#: templates/xadmin/500.html:7 templates/xadmin/base_site.html:53 +#: templates/xadmin/500.html:7 #: templates/xadmin/auth/user/change_password.html:10 #: templates/xadmin/auth/user/change_password.html:15 +#: templates/xadmin/base_site.html:56 #: templates/xadmin/includes/sitemenu_default.html:7 #: templates/xadmin/views/app_index.html:9 #: templates/xadmin/views/batch_change_form.html:9 @@ -534,7 +540,7 @@ msgstr "" #: templates/xadmin/views/recover_form.html:8 #: templates/xadmin/views/recover_list.html:8 #: templates/xadmin/views/revision_diff.html:8 -#: templates/xadmin/views/revision_form.html:8 views/base.py:448 +#: templates/xadmin/views/revision_form.html:8 views/base.py:463 msgid "Home" msgstr "Главная" @@ -554,18 +560,6 @@ msgstr "" msgid "There's been an error. It's been reported to the site administrators via e-mail and should be fixed shortly. Thanks for your patience." msgstr "" -#: templates/xadmin/base_site.html:19 -msgid "Welcome," -msgstr "" - -#: templates/xadmin/base_site.html:25 -msgid "Log out" -msgstr "Выйти" - -#: templates/xadmin/base_site.html:37 -msgid "You don't have permission to edit anything." -msgstr "" - #: templates/xadmin/auth/password_reset/complete.html:11 #: templates/xadmin/auth/password_reset/done.html:11 msgid "Password reset successful" @@ -668,11 +662,24 @@ msgstr "" msgid "Enter a new password for the user %(username)s." msgstr "" +#: templates/xadmin/base_site.html:21 +msgid "Welcome," +msgstr "" + +#: templates/xadmin/base_site.html:27 +msgid "Log out" +msgstr "Выйти" + +#: templates/xadmin/base_site.html:39 +msgid "You don't have permission to edit anything." +msgstr "" + #: templates/xadmin/blocks/comm.top.theme.html:4 msgid "Themes" msgstr "" #: templates/xadmin/blocks/comm.top.topnav.html:8 +#: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 #: templates/xadmin/filters/fk_search.html:14 @@ -698,7 +705,7 @@ msgstr "" #: templates/xadmin/blocks/model_form.submit_line.wizard.html:31 #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Save" msgstr "" @@ -758,26 +765,27 @@ msgstr "" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:4 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:8 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:19 -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:44 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:47 msgid "Export" msgstr "" #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:26 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:29 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:32 msgid "Export with table header." msgstr "" -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:32 #: templates/xadmin/blocks/model_list.top_toolbar.exports.html:35 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:38 msgid "Export with format." msgstr "" -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:39 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:42 msgid "Export all data." msgstr "" -#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:43 -#: templates/xadmin/widgets/base.html:40 +#: templates/xadmin/blocks/model_list.top_toolbar.exports.html:46 +#: templates/xadmin/widgets/base.html:41 msgid "Close" msgstr "" @@ -887,7 +895,7 @@ msgid "Choose" msgstr "" #: templates/xadmin/forms/transfer.html:19 -#: templates/xadmin/widgets/base.html:39 +#: templates/xadmin/widgets/base.html:40 msgid "Remove" msgstr "" @@ -909,7 +917,7 @@ msgstr "" #: templates/xadmin/includes/submit_line.html:10 #: templates/xadmin/includes/submit_line.html:13 -#: templates/xadmin/views/form.html:30 +#: templates/xadmin/views/form.html:30 templates/xadmin/views/form.html:31 msgid "Saving.." msgstr "" @@ -1149,18 +1157,22 @@ msgstr "" msgid "Quick Add" msgstr "" -#: templates/xadmin/widgets/base.html:30 +#: templates/xadmin/widgets/base.html:31 msgid "Widget Options" msgstr "" -#: templates/xadmin/widgets/base.html:41 +#: templates/xadmin/widgets/base.html:42 msgid "Save changes" msgstr "" -#: views/base.py:430 +#: views/base.py:444 msgid "Django Xadmin" msgstr "" +#: views/base.py:445 +msgid "my-company.inc" +msgstr "" + #: views/dashboard.py:185 msgid "Widget ID" msgstr "" @@ -1169,39 +1181,39 @@ msgstr "" msgid "Widget Title" msgstr "" -#: views/dashboard.py:248 +#: views/dashboard.py:249 msgid "Html Content Widget, can write any html content in widget." msgstr "" -#: views/dashboard.py:251 +#: views/dashboard.py:252 msgid "Html Content" msgstr "" -#: views/dashboard.py:314 +#: views/dashboard.py:315 msgid "Target Model" msgstr "" -#: views/dashboard.py:365 +#: views/dashboard.py:366 msgid "Quick button Widget, quickly open any page." msgstr "" -#: views/dashboard.py:367 +#: views/dashboard.py:368 msgid "Quick Buttons" msgstr "" -#: views/dashboard.py:408 +#: views/dashboard.py:413 msgid "Any Objects list Widget." msgstr "" -#: views/dashboard.py:447 +#: views/dashboard.py:453 msgid "Add any model object Widget." msgstr "" -#: views/dashboard.py:481 +#: views/dashboard.py:488 msgid "Dashboard" msgstr "" -#: views/dashboard.py:622 +#: views/dashboard.py:629 #, python-format msgid "%s Dashboard" msgstr "" @@ -1211,7 +1223,7 @@ msgstr "" msgid "The %(name)s \"%(obj)s\" was deleted successfully." msgstr "" -#: views/detail.py:172 views/edit.py:199 views/form.py:72 +#: views/detail.py:172 views/edit.py:209 views/form.py:72 msgid "Other Fields" msgstr "" @@ -1220,26 +1232,26 @@ msgstr "" msgid "%s Detail" msgstr "" -#: views/edit.py:394 +#: views/edit.py:404 #, python-format msgid "The %(name)s \"%(obj)s\" was added successfully." msgstr "" -#: views/edit.py:399 views/edit.py:494 +#: views/edit.py:409 views/edit.py:504 msgid "You may edit it again below." msgstr "" -#: views/edit.py:403 views/edit.py:497 +#: views/edit.py:413 views/edit.py:507 #, python-format msgid "You may add another %s below." msgstr "" -#: views/edit.py:445 +#: views/edit.py:455 #, python-format msgid "Change %s" msgstr "Изменить %s" -#: views/edit.py:490 +#: views/edit.py:500 #, python-format msgid "The %(name)s \"%(obj)s\" was changed successfully." msgstr "" @@ -1273,3 +1285,7 @@ msgstr "" #: views/website.py:16 msgid "Main Dashboard" msgstr "" + +#: widgets.py:48 +msgid "Now" +msgstr "Сейчас" diff --git a/xadmin/locale/zh_CN/LC_MESSAGES/django.mo b/xadmin/locale/zh_CN/LC_MESSAGES/django.mo index bf053f42f1f17d206b8d7231021aa5181e19daa8..648e21f4d6def80b77d05310f05745a90d0403bd 100644 GIT binary patch delta 5232 zcmX}u3w)2)9mnzW4@vw*L~aBj644;E6(KIGgoM;(7AbQXUdCoNt`E&ZXk+TF#YGe=c6F&J{GE54$5>ZZLMjQP=^OVGs{s9Xx6AC5$G% zfx7-KHp03o&egzH$oV1HmP!;2U9dKGMa+KH`rO`Wz$iIL^e= zI2VUEbS@SvQ3+m0U0;oD@d3s$zsn{q4b&C8VG-(rIhcrxQHiZG|BM=Vi@675h!2}* zQ8#qe;+t5X_#tZC6?KP)Ek1== z#5a-0=^8b4?gh-n^|%_x;@~vr-oqWJL`FArt|m@y#`U2eKR?lY)IJPz5P?j_WtToR(9J6ePFaJ_ZxMBUL5 z)I`@%D{%`4;eE`+(hTP&;dE4jmrw~^MJ@F$)OC7Z>aT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&7q+oq7{BaAXhv{D#<^JRNmo#i;9lj+$p!h=vCKCFbA+)CC(*1MR^i z`~-Dg6{?^cSO@P~|9w;;u|56c={SeHBWl9U=5}+p8Tx>Rz7;++ui1f=UjBv6P!p%4 zo?SMoz;Vdtaxa+&uoZb^Z{POj0MrdkK`s4a9F1$RuHM0F8rnqKIcuRQa=`7xL0D;d z{l0#GirEac0_m2wH9KK6{rQ#`qHdtKIRv$`&(zBEpGqT|j`=KCZqLVUHZ*fdtPlE}4?h$$p*S!HrX>IhMQki6Z z2z^cw2WngXKcCe+>8(ua5^PvL5IIC57464; z#1SHjJf0|{T~2&UXg{VBcfGQdw7^xbG9_))VRG%qgTz_lr;pxp{(@ZlSMs{LTRta< zaBFv{?cx8Ha2PRz&~M$##C$@Z|CD!a*eX~)wp}1PJ};|tURF*{i|o8^dAa4&bK-*K JOM2Xh{2zo-KNbK0 diff --git a/xadmin/locale/zh_CN/LC_MESSAGES/django.po b/xadmin/locale/zh_CN/LC_MESSAGES/django.po index 22de0274e..b6a7a9c2e 100644 --- a/xadmin/locale/zh_CN/LC_MESSAGES/django.po +++ b/xadmin/locale/zh_CN/LC_MESSAGES/django.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: xadmin-core\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-05-22 15:54+0800\n" +"POT-Creation-Date: 2016-02-27 11:53+0800\n" "PO-Revision-Date: 2013-11-20 10:21+0000\n" "Last-Translator: sshwsfc \n" "Language-Team: Chinese (China) (http://www.transifex.com/projects/p/xadmin/language/zh_CN/)\n" @@ -335,7 +335,7 @@ msgid "1 comment was successfully %(action)s." msgid_plural "%(count)s comments were successfully %(action)s." msgstr[0] "" -#: plugins/details.py:52 views/list.py:576 +#: plugins/details.py:52 views/list.py:579 #, python-format msgid "Details of %s" msgstr "%s详情" @@ -406,6 +406,11 @@ msgstr "关联数据" msgid "Search %s" msgstr "搜索%s" +#: plugins/relfield.py:67 +#, python-format +msgid "Select %s" +msgstr "选择%s" + #: plugins/themes.py:47 msgid "Default" msgstr "默认" From 8a29ec0c3aaeed8422adced02bd0afee08f89af1 Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Sat, 27 Feb 2016 11:57:12 +0800 Subject: [PATCH 043/180] Now, use selectize.js for every select input, and 'fk-select' field style can preload data by Ajax. --- xadmin/plugins/relfield.py | 35 ++++++-- .../static/xadmin/js/xadmin.widget.select.js | 86 +++++++------------ 2 files changed, 56 insertions(+), 65 deletions(-) diff --git a/xadmin/plugins/relfield.py b/xadmin/plugins/relfield.py index 9a5f5e4fb..5a9225f3a 100644 --- a/xadmin/plugins/relfield.py +++ b/xadmin/plugins/relfield.py @@ -1,5 +1,7 @@ from django.db import models +from django.forms.utils import flatatt from django.utils.html import escape, format_html +from django.utils.safestring import mark_safe from django.utils.text import Truncator from django.utils.translation import ugettext as _ from django import forms @@ -8,7 +10,7 @@ from xadmin.util import vendor -class ForeignKeySearchWidget(forms.TextInput): +class ForeignKeySearchWidget(forms.Widget): def __init__(self, rel, admin_view, attrs=None, using=None): self.rel = rel @@ -16,10 +18,8 @@ def __init__(self, rel, admin_view, attrs=None, using=None): self.db = using super(ForeignKeySearchWidget, self).__init__(attrs) - def render(self, name, value, attrs=None): + def build_attrs(self, attrs={}, **kwargs): to_opts = self.rel.to._meta - if attrs is None: - attrs = {} if "class" not in attrs: attrs['class'] = 'select-search' else: @@ -32,10 +32,16 @@ def render(self, name, value, attrs=None): for i in list(self.rel.limit_choices_to): attrs['data-choices'] += "&_p_%s=%s" % (i, self.rel.limit_choices_to[i]) attrs['data-choices'] = format_html(attrs['data-choices']) - if value: - attrs['data-label'] = self.label_for_value(value) - return super(ForeignKeySearchWidget, self).render(name, value, attrs) + return super(ForeignKeySearchWidget, self).build_attrs(attrs, **kwargs) + + def render(self, name, value, attrs=None): + final_attrs = self.build_attrs(attrs, name=name) + output = [format_html('', flatatt(final_attrs))] + if value: + output.append(format_html('', value, self.label_for_value(value))) + output.append('') + return mark_safe('\n'.join(output)) def label_for_value(self, value): key = self.rel.get_related_field().name @@ -50,16 +56,27 @@ def label_for_value(self, value): def media(self): return vendor('select.js', 'select.css', 'xadmin.widget.select.js') +class ForeignKeySelectWidget(ForeignKeySearchWidget): + + def build_attrs(self, attrs={}, **kwargs): + attrs = super(ForeignKeySelectWidget, self).build_attrs(attrs, **kwargs) + if "class" not in attrs: + attrs['class'] = 'select-preload' + else: + attrs['class'] = attrs['class'] + ' select-preload' + attrs['data-placeholder'] = _('Select %s') % self.rel.to._meta.verbose_name + return attrs class RelateFieldPlugin(BaseAdminPlugin): def get_field_style(self, attrs, db_field, style, **kwargs): # search able fk field - if style == 'fk-ajax' and isinstance(db_field, models.ForeignKey): + if style in ('fk-ajax', 'fk-select') and isinstance(db_field, models.ForeignKey): if (db_field.rel.to in self.admin_view.admin_site._registry) and \ self.has_model_perm(db_field.rel.to, 'view'): db = kwargs.get('using') - return dict(attrs or {}, widget=ForeignKeySearchWidget(db_field.rel, self.admin_view, using=db)) + return dict(attrs or {}, \ + widget=(style == 'fk-ajax' and ForeignKeySearchWidget or ForeignKeySelectWidget)(db_field.rel, self.admin_view, using=db)) return attrs site.register_plugin(RelateFieldPlugin, ModelFormAdminView) diff --git a/xadmin/static/xadmin/js/xadmin.widget.select.js b/xadmin/static/xadmin/js/xadmin.widget.select.js index 669b33d91..1dd9a3830 100644 --- a/xadmin/static/xadmin/js/xadmin.widget.select.js +++ b/xadmin/static/xadmin/js/xadmin.widget.select.js @@ -1,64 +1,38 @@ ;(function($){ - // add select2 render - if(!window.__admin_ismobile__){ - $.fn.exform.renders.push(function(f){ - if($.fn.selectize){ - f.find('select:not(.select-search):not([multiple=multiple])').selectize(); - f.find('.select-search').each(function(){ - var $el = $(this); - $el.select2({ - minimumInputLength: 1, - initSelection: function(elem, callback){ - callback({id: elem.val(), '__str__': $el.data('label')}); - }, - ajax: { + // add select render + $.fn.exform.renders.push(function(f){ + if($.fn.selectize){ + f.find('select:not(.select-search):not([multiple=multiple])').selectize(); + f.find('.select-search').each(function(){ + var $el = $(this); + var preload = $el.hasClass('select-preload'); + $el.selectize({ + valueField: 'id', + labelField: '__str__', + searchField: '__str__', + create: false, + maxItems: 1, + preload: preload, + load: function(query, callback) { + if(!preload && !query.length) return callback(); + $.ajax({ url: $el.data('search-url')+$el.data('choices'), dataType: 'json', - data: function (term, page) { - return { - '_q_' : term, - '_cols': 'id.__str__', - 'p': page - 1 - }; + data: { + '_q_' : query, + '_cols': 'id.__str__' }, - results: function (data, page) { - return {results: data.objects, more: data.has_more}; - } - }, - formatResult: function(item){return item['__str__']}, - formatSelection: function(item){return item['__str__']} - }); - }) - }}); - } else { - $.fn.exform.renders.push(function(f){ - if($.fn.select2){ - f.find('.select-search').each(function(){ - var $el = $(this); - $el.select2({ - minimumInputLength: 1, - initSelection: function(elem, callback){ - callback({id: elem.val(), '__str__': $el.data('label')}); - }, - ajax: { - url: $el.data('search-url')+$el.data('choices'), - dataType: 'json', - data: function (term, page) { - return { - '_q_' : term, - '_cols': 'id.__str__', - 'p': page - 1 - }; + type: 'GET', + error: function() { + callback(); }, - results: function (data, page) { - return {results: data.objects, more: data.has_more}; + success: function(res) { + callback(res.objects); } - }, - formatResult: function(item){return item['__str__']}, - formatSelection: function(item){return item['__str__']} - }); - }) - }}); - } + }); + } + }); + }) + }}); })(jQuery) From e5e893a89696bf9e7a885bba2d163537132240ab Mon Sep 17 00:00:00 2001 From: sshwsfc Date: Thu, 3 Mar 2016 20:03:41 +0800 Subject: [PATCH 044/180] Update List filter for 'fk-select' . --- xadmin/filters.py | 6 +++++- xadmin/locale/de_DE/LC_MESSAGES/django.po | 16 +++++++++++----- xadmin/locale/en/LC_MESSAGES/django.po | 14 +++++++++----- xadmin/locale/es_MX/LC_MESSAGES/django.po | 16 +++++++++++----- xadmin/locale/eu/LC_MESSAGES/django.po | 16 +++++++++++----- xadmin/locale/id_ID/LC_MESSAGES/django.po | 14 +++++++++----- xadmin/locale/ja/LC_MESSAGES/django.po | 14 +++++++++----- xadmin/locale/lt/LC_MESSAGES/django.po | 14 +++++++++----- xadmin/locale/nl_NL/LC_MESSAGES/django.po | 14 +++++++++----- xadmin/locale/pl/LC_MESSAGES/django.po | 16 +++++++++++----- xadmin/locale/pt_BR/LC_MESSAGES/django.po | 16 +++++++++++----- xadmin/locale/ru_RU/LC_MESSAGES/django.po | 14 +++++++++----- xadmin/locale/zh_CN/LC_MESSAGES/django.mo | Bin 19576 -> 19606 bytes xadmin/locale/zh_CN/LC_MESSAGES/django.po | 14 +++++++++----- .../templates/xadmin/filters/fk_search.html | 14 +++++++++++--- 15 files changed, 134 insertions(+), 64 deletions(-) diff --git a/xadmin/filters.py b/xadmin/filters.py index 178ea6581..cb90a3a7f 100644 --- a/xadmin/filters.py +++ b/xadmin/filters.py @@ -314,7 +314,7 @@ def test(cls, field, request, params, model, admin_view, field_path): return False related_modeladmin = admin_view.admin_site._registry.get( get_model_from_relation(field)) - return related_modeladmin and getattr(related_modeladmin, 'relfield_style', None) == 'fk-ajax' + return related_modeladmin and getattr(related_modeladmin, 'relfield_style', None) in ('fk-ajax', 'fk-select') def __init__(self, field, request, params, model, model_admin, field_path): other_model = get_model_from_relation(field) @@ -327,6 +327,9 @@ def __init__(self, field, request, params, model, model_admin, field_path): super(RelatedFieldSearchFilter, self).__init__( field, request, params, model, model_admin, field_path) + related_modeladmin = self.admin_view.admin_site._registry.get(other_model) + self.relfield_style = related_modeladmin.relfield_style + if hasattr(field, 'verbose_name'): self.lookup_title = field.verbose_name else: @@ -353,6 +356,7 @@ def get_context(self): context['search_url'] = self.search_url context['label'] = self.label context['choices'] = self.choices + context['relfield_style'] = self.relfield_style return context diff --git a/xadmin/locale/de_DE/LC_MESSAGES/django.po b/xadmin/locale/de_DE/LC_MESSAGES/django.po index 2f004bac5..f6a1c74df 100644 --- a/xadmin/locale/de_DE/LC_MESSAGES/django.po +++ b/xadmin/locale/de_DE/LC_MESSAGES/django.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: xadmin-core\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-27 11:53+0800\n" +"POT-Creation-Date: 2016-03-03 19:50+0800\n" "PO-Revision-Date: 2013-12-19 11:06+0000\n" "Last-Translator: Sebastian Morkisch \n" "Language-Team: German (Germany) (http://www.transifex.com/projects/p/xadmin/language/de_DE/)\n" @@ -24,7 +24,7 @@ msgstr "" msgid "Administration" msgstr "" -#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 +#: filters.py:158 filters.py:190 filters.py:406 filters.py:492 filters.py:530 msgid "All" msgstr "Alle" @@ -681,7 +681,7 @@ msgstr "Themeneinstellungen" #: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 -#: templates/xadmin/filters/fk_search.html:14 +#: templates/xadmin/filters/fk_search.html:17 #: templates/xadmin/filters/number.html:7 msgid "Search" msgstr "Suchen" @@ -840,7 +840,7 @@ msgstr "Tag" #: templates/xadmin/filters/date.html:29 templates/xadmin/filters/date.html:46 #: templates/xadmin/filters/date.html:54 -#: templates/xadmin/filters/fk_search.html:16 +#: templates/xadmin/filters/fk_search.html:21 #: templates/xadmin/filters/number.html:37 msgid "Apply" msgstr "Anwenden" @@ -861,7 +861,13 @@ msgstr "Von" msgid "To" msgstr "Bis" -#: templates/xadmin/filters/fk_search.html:18 +#: templates/xadmin/filters/fk_search.html:15 +#, fuzzy +#| msgid "Select Date" +msgid "Select" +msgstr "Datum wählen" + +#: templates/xadmin/filters/fk_search.html:23 #: templates/xadmin/filters/number.html:39 msgid "Clean" msgstr "Entfernen" diff --git a/xadmin/locale/en/LC_MESSAGES/django.po b/xadmin/locale/en/LC_MESSAGES/django.po index 4fd99de82..1bfef79a8 100644 --- a/xadmin/locale/en/LC_MESSAGES/django.po +++ b/xadmin/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-27 11:53+0800\n" +"POT-Creation-Date: 2016-03-03 19:50+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -22,7 +22,7 @@ msgstr "" msgid "Administration" msgstr "" -#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 +#: filters.py:158 filters.py:190 filters.py:406 filters.py:492 filters.py:530 msgid "All" msgstr "" @@ -676,7 +676,7 @@ msgstr "" #: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 -#: templates/xadmin/filters/fk_search.html:14 +#: templates/xadmin/filters/fk_search.html:17 #: templates/xadmin/filters/number.html:7 msgid "Search" msgstr "" @@ -835,7 +835,7 @@ msgstr "" #: templates/xadmin/filters/date.html:29 templates/xadmin/filters/date.html:46 #: templates/xadmin/filters/date.html:54 -#: templates/xadmin/filters/fk_search.html:16 +#: templates/xadmin/filters/fk_search.html:21 #: templates/xadmin/filters/number.html:37 msgid "Apply" msgstr "" @@ -856,7 +856,11 @@ msgstr "" msgid "To" msgstr "" -#: templates/xadmin/filters/fk_search.html:18 +#: templates/xadmin/filters/fk_search.html:15 +msgid "Select" +msgstr "" + +#: templates/xadmin/filters/fk_search.html:23 #: templates/xadmin/filters/number.html:39 msgid "Clean" msgstr "" diff --git a/xadmin/locale/es_MX/LC_MESSAGES/django.po b/xadmin/locale/es_MX/LC_MESSAGES/django.po index e983f586d..102c735cd 100644 --- a/xadmin/locale/es_MX/LC_MESSAGES/django.po +++ b/xadmin/locale/es_MX/LC_MESSAGES/django.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: xadmin-core\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-27 11:53+0800\n" +"POT-Creation-Date: 2016-03-03 19:50+0800\n" "PO-Revision-Date: 2013-05-12 18:45+0000\n" "Last-Translator: sacrac \n" "Language-Team: Spanish (Mexico) (http://www.transifex.com/projects/p/xadmin/language/es_MX/)\n" @@ -28,7 +28,7 @@ msgstr "" msgid "Administration" msgstr "" -#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 +#: filters.py:158 filters.py:190 filters.py:406 filters.py:492 filters.py:530 msgid "All" msgstr "Todo" @@ -693,7 +693,7 @@ msgstr "Temas" #: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 -#: templates/xadmin/filters/fk_search.html:14 +#: templates/xadmin/filters/fk_search.html:17 #: templates/xadmin/filters/number.html:7 msgid "Search" msgstr "Buscar" @@ -852,7 +852,7 @@ msgstr "día" #: templates/xadmin/filters/date.html:29 templates/xadmin/filters/date.html:46 #: templates/xadmin/filters/date.html:54 -#: templates/xadmin/filters/fk_search.html:16 +#: templates/xadmin/filters/fk_search.html:21 #: templates/xadmin/filters/number.html:37 msgid "Apply" msgstr "Aplicar" @@ -873,7 +873,13 @@ msgstr "De" msgid "To" msgstr "Para" -#: templates/xadmin/filters/fk_search.html:18 +#: templates/xadmin/filters/fk_search.html:15 +#, fuzzy +#| msgid "Select Date" +msgid "Select" +msgstr "Seleccionar Fecha" + +#: templates/xadmin/filters/fk_search.html:23 #: templates/xadmin/filters/number.html:39 msgid "Clean" msgstr "Limpiar" diff --git a/xadmin/locale/eu/LC_MESSAGES/django.po b/xadmin/locale/eu/LC_MESSAGES/django.po index 7bfa3f193..1ff90f75a 100644 --- a/xadmin/locale/eu/LC_MESSAGES/django.po +++ b/xadmin/locale/eu/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: xadmin-core\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-27 11:53+0800\n" +"POT-Creation-Date: 2016-03-03 19:50+0800\n" "PO-Revision-Date: 2013-11-20 10:21+0000\n" "Last-Translator: sshwsfc \n" "Language-Team: Basque (http://www.transifex.com/projects/p/xadmin/language/eu/)\n" @@ -22,7 +22,7 @@ msgstr "" msgid "Administration" msgstr "" -#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 +#: filters.py:158 filters.py:190 filters.py:406 filters.py:492 filters.py:530 msgid "All" msgstr "Guztia" @@ -679,7 +679,7 @@ msgstr "Itsura-gaiak" #: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 -#: templates/xadmin/filters/fk_search.html:14 +#: templates/xadmin/filters/fk_search.html:17 #: templates/xadmin/filters/number.html:7 msgid "Search" msgstr "Bilatu" @@ -838,7 +838,7 @@ msgstr "eguna" #: templates/xadmin/filters/date.html:29 templates/xadmin/filters/date.html:46 #: templates/xadmin/filters/date.html:54 -#: templates/xadmin/filters/fk_search.html:16 +#: templates/xadmin/filters/fk_search.html:21 #: templates/xadmin/filters/number.html:37 msgid "Apply" msgstr "Aplikatu" @@ -859,7 +859,13 @@ msgstr "Nork" msgid "To" msgstr "Nori" -#: templates/xadmin/filters/fk_search.html:18 +#: templates/xadmin/filters/fk_search.html:15 +#, fuzzy +#| msgid "Select Date" +msgid "Select" +msgstr "Data Aukeratu" + +#: templates/xadmin/filters/fk_search.html:23 #: templates/xadmin/filters/number.html:39 msgid "Clean" msgstr "Garbitu" diff --git a/xadmin/locale/id_ID/LC_MESSAGES/django.po b/xadmin/locale/id_ID/LC_MESSAGES/django.po index 1550f73ba..ccd641d0f 100644 --- a/xadmin/locale/id_ID/LC_MESSAGES/django.po +++ b/xadmin/locale/id_ID/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: xadmin-core\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-27 11:53+0800\n" +"POT-Creation-Date: 2016-03-03 19:50+0800\n" "PO-Revision-Date: 2013-11-20 10:21+0000\n" "Last-Translator: sshwsfc \n" "Language-Team: Indonesian (Indonesia) (http://www.transifex.com/projects/p/xadmin/language/id_ID/)\n" @@ -21,7 +21,7 @@ msgstr "" msgid "Administration" msgstr "" -#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 +#: filters.py:158 filters.py:190 filters.py:406 filters.py:492 filters.py:530 msgid "All" msgstr "" @@ -668,7 +668,7 @@ msgstr "" #: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 -#: templates/xadmin/filters/fk_search.html:14 +#: templates/xadmin/filters/fk_search.html:17 #: templates/xadmin/filters/number.html:7 msgid "Search" msgstr "" @@ -827,7 +827,7 @@ msgstr "" #: templates/xadmin/filters/date.html:29 templates/xadmin/filters/date.html:46 #: templates/xadmin/filters/date.html:54 -#: templates/xadmin/filters/fk_search.html:16 +#: templates/xadmin/filters/fk_search.html:21 #: templates/xadmin/filters/number.html:37 msgid "Apply" msgstr "" @@ -848,7 +848,11 @@ msgstr "" msgid "To" msgstr "" -#: templates/xadmin/filters/fk_search.html:18 +#: templates/xadmin/filters/fk_search.html:15 +msgid "Select" +msgstr "" + +#: templates/xadmin/filters/fk_search.html:23 #: templates/xadmin/filters/number.html:39 msgid "Clean" msgstr "" diff --git a/xadmin/locale/ja/LC_MESSAGES/django.po b/xadmin/locale/ja/LC_MESSAGES/django.po index 60d664494..0f15144aa 100644 --- a/xadmin/locale/ja/LC_MESSAGES/django.po +++ b/xadmin/locale/ja/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: xadmin-core\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-27 11:53+0800\n" +"POT-Creation-Date: 2016-03-03 19:50+0800\n" "PO-Revision-Date: 2013-11-20 10:21+0000\n" "Last-Translator: sshwsfc \n" "Language-Team: Japanese (http://www.transifex.com/projects/p/xadmin/language/ja/)\n" @@ -21,7 +21,7 @@ msgstr "" msgid "Administration" msgstr "" -#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 +#: filters.py:158 filters.py:190 filters.py:406 filters.py:492 filters.py:530 msgid "All" msgstr "" @@ -668,7 +668,7 @@ msgstr "" #: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 -#: templates/xadmin/filters/fk_search.html:14 +#: templates/xadmin/filters/fk_search.html:17 #: templates/xadmin/filters/number.html:7 msgid "Search" msgstr "" @@ -827,7 +827,7 @@ msgstr "" #: templates/xadmin/filters/date.html:29 templates/xadmin/filters/date.html:46 #: templates/xadmin/filters/date.html:54 -#: templates/xadmin/filters/fk_search.html:16 +#: templates/xadmin/filters/fk_search.html:21 #: templates/xadmin/filters/number.html:37 msgid "Apply" msgstr "" @@ -848,7 +848,11 @@ msgstr "" msgid "To" msgstr "" -#: templates/xadmin/filters/fk_search.html:18 +#: templates/xadmin/filters/fk_search.html:15 +msgid "Select" +msgstr "" + +#: templates/xadmin/filters/fk_search.html:23 #: templates/xadmin/filters/number.html:39 msgid "Clean" msgstr "" diff --git a/xadmin/locale/lt/LC_MESSAGES/django.po b/xadmin/locale/lt/LC_MESSAGES/django.po index c2f89d55a..d60c7abac 100644 --- a/xadmin/locale/lt/LC_MESSAGES/django.po +++ b/xadmin/locale/lt/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: xadmin-core\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-27 11:53+0800\n" +"POT-Creation-Date: 2016-03-03 19:50+0800\n" "PO-Revision-Date: 2013-11-20 10:21+0000\n" "Last-Translator: sshwsfc \n" "Language-Team: Lithuanian (http://www.transifex.com/projects/p/xadmin/language/lt/)\n" @@ -21,7 +21,7 @@ msgstr "" msgid "Administration" msgstr "" -#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 +#: filters.py:158 filters.py:190 filters.py:406 filters.py:492 filters.py:530 msgid "All" msgstr "" @@ -680,7 +680,7 @@ msgstr "" #: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 -#: templates/xadmin/filters/fk_search.html:14 +#: templates/xadmin/filters/fk_search.html:17 #: templates/xadmin/filters/number.html:7 msgid "Search" msgstr "" @@ -839,7 +839,7 @@ msgstr "" #: templates/xadmin/filters/date.html:29 templates/xadmin/filters/date.html:46 #: templates/xadmin/filters/date.html:54 -#: templates/xadmin/filters/fk_search.html:16 +#: templates/xadmin/filters/fk_search.html:21 #: templates/xadmin/filters/number.html:37 msgid "Apply" msgstr "" @@ -860,7 +860,11 @@ msgstr "" msgid "To" msgstr "" -#: templates/xadmin/filters/fk_search.html:18 +#: templates/xadmin/filters/fk_search.html:15 +msgid "Select" +msgstr "" + +#: templates/xadmin/filters/fk_search.html:23 #: templates/xadmin/filters/number.html:39 msgid "Clean" msgstr "" diff --git a/xadmin/locale/nl_NL/LC_MESSAGES/django.po b/xadmin/locale/nl_NL/LC_MESSAGES/django.po index e6474fa2c..c2a9afeb1 100644 --- a/xadmin/locale/nl_NL/LC_MESSAGES/django.po +++ b/xadmin/locale/nl_NL/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: xadmin-core\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-27 11:53+0800\n" +"POT-Creation-Date: 2016-03-03 19:50+0800\n" "PO-Revision-Date: 2013-11-20 10:21+0000\n" "Last-Translator: sshwsfc \n" "Language-Team: Dutch (Netherlands) (http://www.transifex.com/projects/p/xadmin/language/nl_NL/)\n" @@ -21,7 +21,7 @@ msgstr "" msgid "Administration" msgstr "" -#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 +#: filters.py:158 filters.py:190 filters.py:406 filters.py:492 filters.py:530 msgid "All" msgstr "" @@ -674,7 +674,7 @@ msgstr "" #: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 -#: templates/xadmin/filters/fk_search.html:14 +#: templates/xadmin/filters/fk_search.html:17 #: templates/xadmin/filters/number.html:7 msgid "Search" msgstr "" @@ -833,7 +833,7 @@ msgstr "" #: templates/xadmin/filters/date.html:29 templates/xadmin/filters/date.html:46 #: templates/xadmin/filters/date.html:54 -#: templates/xadmin/filters/fk_search.html:16 +#: templates/xadmin/filters/fk_search.html:21 #: templates/xadmin/filters/number.html:37 msgid "Apply" msgstr "" @@ -854,7 +854,11 @@ msgstr "" msgid "To" msgstr "" -#: templates/xadmin/filters/fk_search.html:18 +#: templates/xadmin/filters/fk_search.html:15 +msgid "Select" +msgstr "" + +#: templates/xadmin/filters/fk_search.html:23 #: templates/xadmin/filters/number.html:39 msgid "Clean" msgstr "" diff --git a/xadmin/locale/pl/LC_MESSAGES/django.po b/xadmin/locale/pl/LC_MESSAGES/django.po index 6ae7c890e..95ea60d46 100644 --- a/xadmin/locale/pl/LC_MESSAGES/django.po +++ b/xadmin/locale/pl/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: django-xadmin\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-27 11:53+0800\n" +"POT-Creation-Date: 2016-03-03 19:50+0800\n" "PO-Revision-Date: 2014-08-12 21:08+0100\n" "Last-Translator: Michał Szpadzik \n" "Language-Team: Polish translators \n" @@ -22,7 +22,7 @@ msgstr "" msgid "Administration" msgstr "" -#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 +#: filters.py:158 filters.py:190 filters.py:406 filters.py:492 filters.py:530 msgid "All" msgstr "Wszystko" @@ -682,7 +682,7 @@ msgstr "Tematy" #: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 -#: templates/xadmin/filters/fk_search.html:14 +#: templates/xadmin/filters/fk_search.html:17 #: templates/xadmin/filters/number.html:7 msgid "Search" msgstr "Szukaj" @@ -841,7 +841,7 @@ msgstr "dzień" #: templates/xadmin/filters/date.html:29 templates/xadmin/filters/date.html:46 #: templates/xadmin/filters/date.html:54 -#: templates/xadmin/filters/fk_search.html:16 +#: templates/xadmin/filters/fk_search.html:21 #: templates/xadmin/filters/number.html:37 msgid "Apply" msgstr "Zatwierdź" @@ -862,7 +862,13 @@ msgstr "Od" msgid "To" msgstr "Do" -#: templates/xadmin/filters/fk_search.html:18 +#: templates/xadmin/filters/fk_search.html:15 +#, fuzzy +#| msgid "Select Date" +msgid "Select" +msgstr "Wybierz datę" + +#: templates/xadmin/filters/fk_search.html:23 #: templates/xadmin/filters/number.html:39 msgid "Clean" msgstr "Wyczyść" diff --git a/xadmin/locale/pt_BR/LC_MESSAGES/django.po b/xadmin/locale/pt_BR/LC_MESSAGES/django.po index cd2edbf0a..0e669c8e6 100644 --- a/xadmin/locale/pt_BR/LC_MESSAGES/django.po +++ b/xadmin/locale/pt_BR/LC_MESSAGES/django.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: xadmin-core\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-27 11:53+0800\n" +"POT-Creation-Date: 2016-03-03 19:50+0800\n" "PO-Revision-Date: 2013-11-20 10:21+0000\n" "Last-Translator: gladson \n" "Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/xadmin/language/pt_BR/)\n" @@ -25,7 +25,7 @@ msgstr "" msgid "Administration" msgstr "" -#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 +#: filters.py:158 filters.py:190 filters.py:406 filters.py:492 filters.py:530 msgid "All" msgstr "Tudo" @@ -682,7 +682,7 @@ msgstr "Temas" #: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 -#: templates/xadmin/filters/fk_search.html:14 +#: templates/xadmin/filters/fk_search.html:17 #: templates/xadmin/filters/number.html:7 msgid "Search" msgstr "Pesquisar" @@ -841,7 +841,7 @@ msgstr "dia" #: templates/xadmin/filters/date.html:29 templates/xadmin/filters/date.html:46 #: templates/xadmin/filters/date.html:54 -#: templates/xadmin/filters/fk_search.html:16 +#: templates/xadmin/filters/fk_search.html:21 #: templates/xadmin/filters/number.html:37 msgid "Apply" msgstr "Aplicar" @@ -862,7 +862,13 @@ msgstr "De" msgid "To" msgstr "Para" -#: templates/xadmin/filters/fk_search.html:18 +#: templates/xadmin/filters/fk_search.html:15 +#, fuzzy +#| msgid "Select Date" +msgid "Select" +msgstr "Selecionar Data" + +#: templates/xadmin/filters/fk_search.html:23 #: templates/xadmin/filters/number.html:39 msgid "Clean" msgstr "Limpar" diff --git a/xadmin/locale/ru_RU/LC_MESSAGES/django.po b/xadmin/locale/ru_RU/LC_MESSAGES/django.po index 0999f34b4..584abcad9 100644 --- a/xadmin/locale/ru_RU/LC_MESSAGES/django.po +++ b/xadmin/locale/ru_RU/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: xadmin-core\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-27 11:53+0800\n" +"POT-Creation-Date: 2016-03-03 19:50+0800\n" "PO-Revision-Date: 2013-12-28 19:36+0000\n" "Last-Translator: crazyzubr \n" "Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/xadmin/language/ru_RU/)\n" @@ -22,7 +22,7 @@ msgstr "" msgid "Administration" msgstr "" -#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 +#: filters.py:158 filters.py:190 filters.py:406 filters.py:492 filters.py:530 msgid "All" msgstr "Все" @@ -682,7 +682,7 @@ msgstr "" #: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 -#: templates/xadmin/filters/fk_search.html:14 +#: templates/xadmin/filters/fk_search.html:17 #: templates/xadmin/filters/number.html:7 msgid "Search" msgstr "" @@ -841,7 +841,7 @@ msgstr "" #: templates/xadmin/filters/date.html:29 templates/xadmin/filters/date.html:46 #: templates/xadmin/filters/date.html:54 -#: templates/xadmin/filters/fk_search.html:16 +#: templates/xadmin/filters/fk_search.html:21 #: templates/xadmin/filters/number.html:37 msgid "Apply" msgstr "" @@ -862,7 +862,11 @@ msgstr "" msgid "To" msgstr "" -#: templates/xadmin/filters/fk_search.html:18 +#: templates/xadmin/filters/fk_search.html:15 +msgid "Select" +msgstr "" + +#: templates/xadmin/filters/fk_search.html:23 #: templates/xadmin/filters/number.html:39 msgid "Clean" msgstr "" diff --git a/xadmin/locale/zh_CN/LC_MESSAGES/django.mo b/xadmin/locale/zh_CN/LC_MESSAGES/django.mo index 648e21f4d6def80b77d05310f05745a90d0403bd..d8978bc3b60c5a26e55bed8349e7bda6f0beff53 100644 GIT binary patch delta 5291 zcmXxo33L_J9mnzevXH#2WQB+!VP6sqt0bflB%u-(WnbDtSsKEs7D!oaeITo4DLN-2 zawr_&918^`#)@qL4;BPV*aXB%h*Xe81jLpAVxiw(-rqU=`P~1VnY+!MdFZ`2e6O$d z1!@w*${k0l&$-93D$=X=4nrSB_6@4)Z2cZV?3(Up27>DnmZrqRjaR>QJ1FFGryn-*`4P1oN z(wvLM+o%CPLf!9Y6zwn;g%9qscFtw@?#$ zV0lO*R+l^u)ou%n#~exju7E-!K8viH8*lkM>`lHBb;BvtfG(n*&Rwhbvs_y0G*rh; zPy=dhd1vfTo{yTyGOPD6prw10f;!lUn%ORMpVe1k2kNVlKQ1oaxn`J!y8l_!vmb^U z$ar&#ou7efcMfV`OE3gqOK1JHB;{1-8E-(1a3`w%uc!w9fm)d(s2N_g{A+AQ9@3cE zV_TeoMff)E#)(*(;oN3Ch8oC>Oy|OIekSX$-MyHKWL$@JD}dS)`%o)$2zA3*)Bvlo zZquQzyMbDPTI`9TP1xyJglcyJ>JiUD_NQBpdX!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gid "Administration" msgstr "管理" -#: filters.py:158 filters.py:190 filters.py:402 filters.py:488 filters.py:526 +#: filters.py:158 filters.py:190 filters.py:406 filters.py:492 filters.py:530 msgid "All" msgstr "全部" @@ -670,7 +670,7 @@ msgstr "主题" #: templates/xadmin/blocks/model_list.nav_form.search_form.html:8 #: templates/xadmin/filters/char.html:7 #: templates/xadmin/filters/fk_search.html:7 -#: templates/xadmin/filters/fk_search.html:14 +#: templates/xadmin/filters/fk_search.html:17 #: templates/xadmin/filters/number.html:7 msgid "Search" msgstr "搜索" @@ -829,7 +829,7 @@ msgstr "日" #: templates/xadmin/filters/date.html:29 templates/xadmin/filters/date.html:46 #: templates/xadmin/filters/date.html:54 -#: templates/xadmin/filters/fk_search.html:16 +#: templates/xadmin/filters/fk_search.html:21 #: templates/xadmin/filters/number.html:37 msgid "Apply" msgstr "应用" @@ -850,7 +850,11 @@ msgstr "从" msgid "To" msgstr "到" -#: templates/xadmin/filters/fk_search.html:18 +#: templates/xadmin/filters/fk_search.html:15 +msgid "Select" +msgstr "选择" + +#: templates/xadmin/filters/fk_search.html:23 #: templates/xadmin/filters/number.html:39 msgid "Clean" msgstr "清除" diff --git a/xadmin/templates/xadmin/filters/fk_search.html b/xadmin/templates/xadmin/filters/fk_search.html index 7876980bd..6255e9eb9 100644 --- a/xadmin/templates/xadmin/filters/fk_search.html +++ b/xadmin/templates/xadmin/filters/fk_search.html @@ -9,9 +9,17 @@

{{ form_params|safe }} - + {% if spec.used_params %} From 0321f348ef237b402915f31695c51cf57e7364af Mon Sep 17 00:00:00 2001 From: Alex Sandro Date: Tue, 15 Mar 2016 20:49:54 -0300 Subject: [PATCH 045/180] Removing 'create_time' field because it does not support editing. --- demo_app/app/adminx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo_app/app/adminx.py b/demo_app/app/adminx.py index 716188884..cbae486e9 100644 --- a/demo_app/app/adminx.py +++ b/demo_app/app/adminx.py @@ -56,7 +56,7 @@ class IDCAdmin(object): reversion_enable = True actions = [BatchChangeAction, ] - batch_fields = ('contact', 'create_time') + batch_fields = ('contact', ) class HostAdmin(object): From fe2b067f745722e1fe84c231e9e5c15ddb645a68 Mon Sep 17 00:00:00 2001 From: Alex Sandro Date: Tue, 15 Mar 2016 21:23:27 -0300 Subject: [PATCH 046/180] Batch editing with support ManyToManyField fields. --- xadmin/plugins/batch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xadmin/plugins/batch.py b/xadmin/plugins/batch.py index 24eadeeda..a81887ae2 100644 --- a/xadmin/plugins/batch.py +++ b/xadmin/plugins/batch.py @@ -74,7 +74,8 @@ def change_models(self, queryset, cleaned_data): n = queryset.count() data = {} - for f in self.opts.fields: + fields = self.opts.fields + self.opts.many_to_many + for f in fields: if not f.editable or isinstance(f, models.AutoField) \ or not f.name in cleaned_data: continue From d189735971203647828299270def740a6db76746 Mon Sep 17 00:00:00 2001 From: Alex Sandro Date: Tue, 15 Mar 2016 21:25:00 -0300 Subject: [PATCH 047/180] Testing batch with ManyToManyField --- demo_app/app/adminx.py | 2 +- demo_app/app/models.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/demo_app/app/adminx.py b/demo_app/app/adminx.py index cbae486e9..ca94e6da2 100644 --- a/demo_app/app/adminx.py +++ b/demo_app/app/adminx.py @@ -56,7 +56,7 @@ class IDCAdmin(object): reversion_enable = True actions = [BatchChangeAction, ] - batch_fields = ('contact', ) + batch_fields = ('contact', 'groups') class HostAdmin(object): diff --git a/demo_app/app/models.py b/demo_app/app/models.py index e0c740e7b..a35f992cd 100644 --- a/demo_app/app/models.py +++ b/demo_app/app/models.py @@ -1,4 +1,5 @@ from django.db import models +from django.contrib.auth.models import Group SERVER_STATUS = ( @@ -28,6 +29,7 @@ class IDC(models.Model): telphone = models.CharField(max_length=32) address = models.CharField(max_length=128) customer_id = models.CharField(max_length=128) + groups = models.ManyToManyField(Group) # many create_time = models.DateField(auto_now=True) From 0cfb8f4a854bce9195206aec7a966f9efd3d3e01 Mon Sep 17 00:00:00 2001 From: Alex Sandro Date: Tue, 15 Mar 2016 21:34:53 -0300 Subject: [PATCH 048/180] Fix "RemovedInDjango18Warning: `is_hidden` property is now read-only". --- xadmin/plugins/batch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xadmin/plugins/batch.py b/xadmin/plugins/batch.py index a81887ae2..79ecba9af 100644 --- a/xadmin/plugins/batch.py +++ b/xadmin/plugins/batch.py @@ -16,10 +16,10 @@ BATCH_CHECKBOX_NAME = '_batch_change_fields' + class ChangeFieldWidgetWrapper(forms.Widget): def __init__(self, widget): - self.is_hidden = widget.is_hidden self.needs_multipart_form = widget.needs_multipart_form self.attrs = widget.attrs self.widget = widget From 02d432505025433c43c952963a648eaba12b261f Mon Sep 17 00:00:00 2001 From: Alex Sandro Date: Tue, 15 Mar 2016 21:48:47 -0300 Subject: [PATCH 049/180] add dep required (httplib2). --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index d6c24a534..d9d574c49 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ django~=1.7.0 django-crispy-forms~=1.4.0 django-reversion~=1.8.0 +httplib2~=0.9.2 \ No newline at end of file From 3f128ca0328d9d91c12602d2a6e4e8ec27b8a51c Mon Sep 17 00:00:00 2001 From: gkiwi Date: Mon, 21 Mar 2016 02:50:02 +0800 Subject: [PATCH 050/180] finish base support for django1.9;demo_app can run successs;#TODO fix tests --- demo_app/app/adminx.py | 16 +-- demo_app/app/migrations/0001_initial.py | 112 ++++++++++++++++++ demo_app/app/migrations/__init__.py | 0 demo_app/app/models.py | 4 +- demo_app/demo/settings.py | 32 ++--- demo_app/demo/urls.py | 4 +- requirements.txt | 8 +- tests/runtests.py | 14 ++- tests/xtests/site/apps.py | 11 ++ tests/xtests/view_base/apps.py | 11 ++ xadmin/__init__.py | 7 +- xadmin/adminx.py | 3 +- xadmin/apps.py | 2 + xadmin/filters.py | 17 +-- xadmin/migrations/0001_initial.py | 63 ++++++++++ xadmin/migrations/__init__.py | 0 xadmin/models.py | 5 +- xadmin/plugins/__init__.py | 2 +- xadmin/plugins/actions.py | 10 +- xadmin/plugins/ajax.py | 10 +- xadmin/plugins/bookmark.py | 2 +- xadmin/plugins/chart.py | 2 +- xadmin/plugins/comments.py | 2 +- xadmin/plugins/export.py | 2 +- xadmin/plugins/filters.py | 10 +- xadmin/plugins/inline.py | 7 +- xadmin/plugins/layout.py | 2 +- xadmin/plugins/multiselect.py | 4 +- xadmin/plugins/quickfilter.py | 7 +- xadmin/plugins/refresh.py | 2 +- xadmin/plugins/relate.py | 11 +- xadmin/plugins/sortable.py | 2 +- xadmin/plugins/topnav.py | 3 +- xadmin/plugins/wizard.py | 10 +- xadmin/plugins/xversion.py | 15 +-- xadmin/sites.py | 33 +++--- xadmin/templates/xadmin/500.html | 2 +- .../xadmin/auth/password_reset/complete.html | 2 +- .../xadmin/auth/password_reset/confirm.html | 2 +- .../xadmin/auth/password_reset/done.html | 2 +- .../xadmin/auth/password_reset/email.html | 2 +- .../xadmin/auth/password_reset/form.html | 2 +- .../xadmin/auth/user/change_password.html | 2 +- xadmin/templates/xadmin/base.html | 2 +- xadmin/templates/xadmin/base_site.html | 3 - .../xadmin/blocks/comm.top.setlang.html | 2 +- .../xadmin/blocks/comm.top.topnav.html | 4 +- .../xadmin/includes/sitemenu_accordion.html | 2 +- .../xadmin/includes/sitemenu_default.html | 2 +- xadmin/templates/xadmin/views/app_index.html | 2 +- .../xadmin/views/batch_change_form.html | 2 +- xadmin/templates/xadmin/views/dashboard.html | 2 +- xadmin/templates/xadmin/views/form.html | 2 +- .../templates/xadmin/views/invalid_setup.html | 2 +- xadmin/templates/xadmin/views/logged_out.html | 2 +- xadmin/templates/xadmin/views/login.html | 2 +- .../xadmin/views/model_dashboard.html | 2 +- .../xadmin/views/model_delete_confirm.html | 2 +- .../views/model_delete_selected_confirm.html | 2 +- .../templates/xadmin/views/model_detail.html | 2 +- xadmin/templates/xadmin/views/model_form.html | 2 +- .../templates/xadmin/views/model_history.html | 2 +- xadmin/templates/xadmin/views/model_list.html | 2 +- .../templates/xadmin/views/recover_form.html | 2 +- .../templates/xadmin/views/recover_list.html | 2 +- .../templates/xadmin/views/revision_diff.html | 2 +- .../templates/xadmin/views/revision_form.html | 2 +- xadmin/templatetags/xadmin_tags.py | 6 +- xadmin/util.py | 34 +++--- xadmin/views/base.py | 21 ++-- xadmin/views/dashboard.py | 7 +- xadmin/views/edit.py | 20 ++-- xadmin/views/form.py | 4 +- xadmin/views/list.py | 12 +- 74 files changed, 414 insertions(+), 200 deletions(-) create mode 100644 demo_app/app/migrations/0001_initial.py create mode 100644 demo_app/app/migrations/__init__.py create mode 100644 tests/xtests/site/apps.py create mode 100644 tests/xtests/view_base/apps.py create mode 100644 xadmin/migrations/0001_initial.py create mode 100644 xadmin/migrations/__init__.py diff --git a/demo_app/app/adminx.py b/demo_app/app/adminx.py index 716188884..52cb03b04 100644 --- a/demo_app/app/adminx.py +++ b/demo_app/app/adminx.py @@ -18,13 +18,13 @@ class MainDashboard(object): {"type": "addform", "model": MaintainLog}, ] ] -xadmin.site.register(views.website.IndexView, MainDashboard) +xadmin.sites.site.register(views.website.IndexView, MainDashboard) class BaseSetting(object): enable_themes = True use_bootswatch = True -xadmin.site.register(views.BaseAdminView, BaseSetting) +xadmin.sites.site.register(views.BaseAdminView, BaseSetting) class GlobalSetting(object): @@ -33,7 +33,7 @@ class GlobalSetting(object): Host: 'fa fa-laptop', IDC: 'fa fa-cloud' } menu_style = 'default'#'accordion' -xadmin.site.register(views.CommAdminView, GlobalSetting) +xadmin.sites.site.register(views.CommAdminView, GlobalSetting) class MaintainInline(object): @@ -195,8 +195,8 @@ def _chart_month(self,obj): return obj.date.strftime("%B") -xadmin.site.register(Host, HostAdmin) -xadmin.site.register(HostGroup, HostGroupAdmin) -xadmin.site.register(MaintainLog, MaintainLogAdmin) -xadmin.site.register(IDC, IDCAdmin) -xadmin.site.register(AccessRecord, AccessRecordAdmin) +xadmin.sites.site.register(Host, HostAdmin) +xadmin.sites.site.register(HostGroup, HostGroupAdmin) +xadmin.sites.site.register(MaintainLog, MaintainLogAdmin) +xadmin.sites.site.register(IDC, IDCAdmin) +xadmin.sites.site.register(AccessRecord, AccessRecordAdmin) diff --git a/demo_app/app/migrations/0001_initial.py b/demo_app/app/migrations/0001_initial.py new file mode 100644 index 000000000..39154fd5b --- /dev/null +++ b/demo_app/app/migrations/0001_initial.py @@ -0,0 +1,112 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2016-03-20 15:50 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='AccessRecord', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('date', models.DateField()), + ('user_count', models.IntegerField()), + ('view_count', models.IntegerField()), + ], + options={ + 'verbose_name': 'Access Record', + 'verbose_name_plural': 'Access Record', + }, + ), + migrations.CreateModel( + name='Host', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=64)), + ('nagios_name', models.CharField(blank=True, max_length=64, null=True, verbose_name='Nagios Host ID')), + ('ip', models.GenericIPAddressField(blank=True, null=True)), + ('internal_ip', models.GenericIPAddressField(blank=True, null=True)), + ('user', models.CharField(max_length=64)), + ('password', models.CharField(max_length=128)), + ('ssh_port', models.IntegerField(blank=True, null=True)), + ('status', models.SmallIntegerField(choices=[(0, 'Normal'), (1, 'Down'), (2, 'No Connect'), (3, 'Error')])), + ('brand', models.CharField(choices=[('DELL', 'DELL'), ('HP', 'HP'), ('Other', 'Other')], max_length=64)), + ('model', models.CharField(max_length=64)), + ('cpu', models.CharField(max_length=64)), + ('core_num', models.SmallIntegerField(choices=[(2, b'2 Cores'), (4, b'4 Cores'), (6, b'6 Cores'), (8, b'8 Cores'), (10, b'10 Cores'), (12, b'12 Cores'), (14, b'14 Cores'), (16, b'16 Cores'), (18, b'18 Cores'), (20, b'20 Cores'), (22, b'22 Cores'), (24, b'24 Cores'), (26, b'26 Cores'), (28, b'28 Cores')])), + ('hard_disk', models.IntegerField()), + ('memory', models.IntegerField()), + ('system', models.CharField(choices=[('CentOS', 'CentOS'), ('FreeBSD', 'FreeBSD'), ('Ubuntu', 'Ubuntu')], max_length=32, verbose_name='System OS')), + ('system_version', models.CharField(max_length=32)), + ('system_arch', models.CharField(choices=[('x86_64', 'x86_64'), ('i386', 'i386')], max_length=32)), + ('create_time', models.DateField()), + ('guarantee_date', models.DateField()), + ('service_type', models.CharField(choices=[(b'moniter', 'Moniter'), (b'lvs', 'LVS'), (b'db', 'Database'), (b'analysis', 'Analysis'), (b'admin', 'Admin'), (b'storge', 'Storge'), (b'web', 'WEB'), (b'email', 'Email'), (b'mix', 'Mix')], max_length=32)), + ('description', models.TextField()), + ], + options={ + 'verbose_name': 'Host', + 'verbose_name_plural': 'Host', + }, + ), + migrations.CreateModel( + name='HostGroup', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=32)), + ('description', models.TextField()), + ('hosts', models.ManyToManyField(blank=True, related_name='groups', to='app.Host', verbose_name='Hosts')), + ], + options={ + 'verbose_name': 'Host Group', + 'verbose_name_plural': 'Host Group', + }, + ), + migrations.CreateModel( + name='IDC', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=64)), + ('description', models.TextField()), + ('contact', models.CharField(max_length=32)), + ('telphone', models.CharField(max_length=32)), + ('address', models.CharField(max_length=128)), + ('customer_id', models.CharField(max_length=128)), + ('create_time', models.DateField(auto_now=True)), + ], + options={ + 'verbose_name': 'IDC', + 'verbose_name_plural': 'IDC', + }, + ), + migrations.CreateModel( + name='MaintainLog', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('maintain_type', models.CharField(max_length=32)), + ('hard_type', models.CharField(max_length=16)), + ('time', models.DateTimeField()), + ('operator', models.CharField(max_length=16)), + ('note', models.TextField()), + ('host', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Host')), + ], + options={ + 'verbose_name': 'Maintain Log', + 'verbose_name_plural': 'Maintain Log', + }, + ), + migrations.AddField( + model_name='host', + name='idc', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.IDC'), + ), + ] diff --git a/demo_app/app/migrations/__init__.py b/demo_app/app/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/demo_app/app/models.py b/demo_app/app/models.py index e0c740e7b..e5f026ca9 100644 --- a/demo_app/app/models.py +++ b/demo_app/app/models.py @@ -43,8 +43,8 @@ class Host(models.Model): idc = models.ForeignKey(IDC) name = models.CharField(max_length=64) nagios_name = models.CharField(u"Nagios Host ID", max_length=64, blank=True, null=True) - ip = models.IPAddressField(blank=True, null=True) - internal_ip = models.IPAddressField(blank=True, null=True) + ip = models.GenericIPAddressField(blank=True, null=True) + internal_ip = models.GenericIPAddressField(blank=True, null=True) user = models.CharField(max_length=64) password = models.CharField(max_length=128) ssh_port = models.IntegerField(blank=True, null=True) diff --git a/demo_app/demo/settings.py b/demo_app/demo/settings.py index 431019ebc..8a8762beb 100644 --- a/demo_app/demo/settings.py +++ b/demo_app/demo/settings.py @@ -11,7 +11,6 @@ os.path.realpath(os.path.dirname(__file__)), os.pardir) DEBUG = True -TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), @@ -98,13 +97,6 @@ # Make this unique, and don't share it with anybody. SECRET_KEY = '5=!nss_+^nvyyc_j(tdcf!7(_una*3gtw+_8v5jaa=)j0g^d_2' -# List of callables that know how to import templates from various sources. -TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader', - # 'django.template.loaders.eggs.Loader', -) - MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', @@ -121,12 +113,24 @@ # Python dotted path to the WSGI application used by Django's runserver. WSGI_APPLICATION = 'demo.wsgi.application' -TEMPLATE_DIRS = ( - # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". - # Always use forward slashes, even on Windows. - # Don't forget to use absolute paths, not relative paths. - os.path.join(PROJECT_ROOT, "templates"), -) +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [ + os.path.join(PROJECT_ROOT,"templates"), + ], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + 'debug':DEBUG + }, + }, +] INSTALLED_APPS = ( 'django.contrib.auth', diff --git a/demo_app/demo/urls.py b/demo_app/demo/urls.py index 7c425d02c..7df140002 100644 --- a/demo_app/demo/urls.py +++ b/demo_app/demo/urls.py @@ -8,7 +8,7 @@ from django.contrib import admin -urlpatterns = patterns('', +urlpatterns = [ url(https://github.com/r'%5Eadmin/',%20include(admin.site.urls)), url(https://github.com/r'%5E',%20include(xadmin.site.urls)) -) +] diff --git a/requirements.txt b/requirements.txt index d6c24a534..933ee0907 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,5 @@ -django~=1.7.0 -django-crispy-forms~=1.4.0 -django-reversion~=1.8.0 +django>=1.9.0 +django-crispy-forms +django-reversion +django-formtools==1.0 +httplib2==0.9.2 diff --git a/tests/runtests.py b/tests/runtests.py index 0f7884b47..60ca063ab 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -5,6 +5,7 @@ import tempfile import django +from django.apps import AppConfig,apps TEST_ROOT = os.path.realpath(os.path.dirname(__file__)) @@ -77,8 +78,7 @@ def setup(verbosity, test_labels): # access settings because of the USE_I18N dependency.) django.setup() - from django.db.models.loading import get_apps, load_app - get_apps() + [a.models_module for a in apps.get_app_configs()] # Load all the test model apps. test_labels_set = set([label.split('.')[0] for label in test_labels]) @@ -92,7 +92,15 @@ def setup(verbosity, test_labels): if not test_labels or module_name in test_labels_set: if verbosity >= 2: print "Importing application %s" % module_name - mod = load_app(module_label) + #mod = load_app(module_label) + #TODO by gkiwi @2016-03-21 02:48:12 + + app_config = AppConfig.create(module_label) + app_config.import_models(apps.all_models[app_config.label]) + apps.app_configs[app_config.label] = app_config + apps.clear_cache() + mod = app_config.models_module + if mod: if module_label not in settings.INSTALLED_APPS: settings.INSTALLED_APPS.append(module_label) diff --git a/tests/xtests/site/apps.py b/tests/xtests/site/apps.py new file mode 100644 index 000000000..1ab4a5c31 --- /dev/null +++ b/tests/xtests/site/apps.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python +#coding:utf-8 +import sys +if sys.getdefaultencoding()=='ascii': + reload(sys) + sys.setdefaultencoding('utf-8') + +from django.apps import AppConfig + +class SiteApp(AppConfig): + name = "site" diff --git a/tests/xtests/view_base/apps.py b/tests/xtests/view_base/apps.py new file mode 100644 index 000000000..6398388ca --- /dev/null +++ b/tests/xtests/view_base/apps.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python +#coding:utf-8 +import sys +if sys.getdefaultencoding()=='ascii': + reload(sys) + sys.setdefaultencoding('utf-8') + +from django.apps import AppConfig + +class ViewBaseApp(AppConfig): + name = "view_base" diff --git a/xadmin/__init__.py b/xadmin/__init__.py index 7aa7c8e46..6a4f3b093 100644 --- a/xadmin/__init__.py +++ b/xadmin/__init__.py @@ -1,4 +1,3 @@ -from xadmin.sites import AdminSite, site VERSION = [0,5,0] @@ -14,10 +13,10 @@ def autodiscover(): may want. """ + from importlib import import_module from django.conf import settings - from django.utils.importlib import import_module from django.utils.module_loading import module_has_submodule - + from xadmin.sites import AdminSite, site setattr(settings, 'CRISPY_TEMPLATE_PACK', 'bootstrap3') setattr(settings, 'CRISPY_CLASS_CONVERTERS', { "textinput": "textinput textInput form-control", @@ -66,4 +65,4 @@ def autodiscover(): if module_has_submodule(mod, 'adminx'): raise -default_app_config = 'xadmin.apps.XAdminConfig' \ No newline at end of file +default_app_config = 'xadmin.apps.XAdminConfig' diff --git a/xadmin/adminx.py b/xadmin/adminx.py index 1fece0dcb..537d634d7 100644 --- a/xadmin/adminx.py +++ b/xadmin/adminx.py @@ -6,4 +6,5 @@ class UserSettingsAdmin(object): model_icon = 'fa fa-cog' hidden_menu = True -xadmin.site.register(UserSettings, UserSettingsAdmin) + +xadmin.sites.site.register(UserSettings, UserSettingsAdmin) diff --git a/xadmin/apps.py b/xadmin/apps.py index 252a6cbed..118dac7e4 100644 --- a/xadmin/apps.py +++ b/xadmin/apps.py @@ -1,6 +1,7 @@ from django.apps import AppConfig from django.core import checks from django.utils.translation import ugettext_lazy as _ +import xadmin class XAdminConfig(AppConfig): @@ -11,3 +12,4 @@ class XAdminConfig(AppConfig): def ready(self): self.module.autodiscover() + setattr(xadmin,'site',xadmin.sites.site) diff --git a/xadmin/filters.py b/xadmin/filters.py index cb90a3a7f..6f44bff63 100644 --- a/xadmin/filters.py +++ b/xadmin/filters.py @@ -8,9 +8,10 @@ from django.utils.safestring import mark_safe from django.utils.html import escape,format_html from django.utils.text import Truncator -from django.core.cache import cache, get_cache +from django.core.cache import cache, caches from xadmin.views.list import EMPTY_CHANGELIST_VALUE +from xadmin.util import is_related_field,is_related_field2 import datetime FILTER_PREFIX = '_p_' @@ -310,7 +311,7 @@ class RelatedFieldSearchFilter(FieldFilter): @classmethod def test(cls, field, request, params, model, admin_view, field_path): - if not (hasattr(field, 'rel') and bool(field.rel) or isinstance(field, models.related.RelatedObject)): + if not is_related_field2(field): return False related_modeladmin = admin_view.admin_site._registry.get( get_model_from_relation(field)) @@ -365,7 +366,7 @@ class RelatedFieldListFilter(ListFieldFilter): @classmethod def test(cls, field, request, params, model, admin_view, field_path): - return (hasattr(field, 'rel') and bool(field.rel) or isinstance(field, models.related.RelatedObject)) + return is_related_field2(field) def __init__(self, field, request, params, model, model_admin, field_path): other_model = get_model_from_relation(field) @@ -387,7 +388,7 @@ def __init__(self, field, request, params, model, model_admin, field_path): self.title = self.lookup_title def has_output(self): - if (isinstance(self.field, models.related.RelatedObject) + if (is_related_field(self.field) and self.field.field.null or hasattr(self.field, 'rel') and self.field.null): extra = 1 @@ -413,7 +414,7 @@ def choices(self): }, [self.lookup_isnull_name]), 'display': val, } - if (isinstance(self.field, models.related.RelatedObject) + if (is_related_field(self.field) and self.field.field.null or hasattr(self.field, 'rel') and self.field.null): yield { @@ -443,13 +444,13 @@ def test(cls, field, request, params, model, admin_view, field_path): def get_cached_choices(self): if not self.cache_config['enabled']: return None - c = get_cache(self.cache_config['cache']) + c = caches(self.cache_config['cache']) return c.get(self.cache_config['key']%self.field_path) def set_cached_choices(self,choices): if not self.cache_config['enabled']: return - c = get_cache(self.cache_config['cache']) + c = caches(self.cache_config['cache']) return c.set(self.cache_config['key']%self.field_path,choices) def __init__(self, field, request, params, model, model_admin, field_path,field_order_by=None,field_limit=None,sort_key=None,cache_config=None): @@ -547,4 +548,4 @@ def choices(self): 'query_string': self.query_string({self.lookup_isnull_name: 'True'}, [self.lookup_exact_name]), 'display': EMPTY_CHANGELIST_VALUE, - } \ No newline at end of file + } diff --git a/xadmin/migrations/0001_initial.py b/xadmin/migrations/0001_initial.py new file mode 100644 index 000000000..6d21b1571 --- /dev/null +++ b/xadmin/migrations/0001_initial.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.2 on 2016-03-20 13:46 +from __future__ import unicode_literals + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('contenttypes', '0002_remove_content_type_name'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Bookmark', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=128, verbose_name='Title')), + ('url_name', models.CharField(max_length=64, verbose_name='Url Name')), + ('query', models.CharField(blank=True, max_length=1000, verbose_name='Query String')), + ('is_share', models.BooleanField(default=False, verbose_name='Is Shared')), + ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')), + ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='user')), + ], + options={ + 'verbose_name': 'Bookmark', + 'verbose_name_plural': 'Bookmarks', + }, + ), + migrations.CreateModel( + name='UserSettings', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('key', models.CharField(max_length=256, verbose_name='Settings Key')), + ('value', models.TextField(verbose_name='Settings Content')), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='user')), + ], + options={ + 'verbose_name': 'User Setting', + 'verbose_name_plural': 'User Settings', + }, + ), + migrations.CreateModel( + name='UserWidget', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('page_id', models.CharField(max_length=256, verbose_name='Page')), + ('widget_type', models.CharField(max_length=50, verbose_name='Widget Type')), + ('value', models.TextField(verbose_name='Widget Params')), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='user')), + ], + options={ + 'verbose_name': 'User Widget', + 'verbose_name_plural': 'User Widgets', + }, + ), + ] diff --git a/xadmin/migrations/__init__.py b/xadmin/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/xadmin/models.py b/xadmin/models.py index 6f33a7606..32082e472 100644 --- a/xadmin/models.py +++ b/xadmin/models.py @@ -9,7 +9,7 @@ from django.db.models.base import ModelBase from django.utils.encoding import smart_unicode -from django.db.models.signals import post_syncdb +from django.db.models.signals import post_migrate from django.contrib.auth.models import Permission import datetime @@ -40,8 +40,7 @@ def add_view_permissions(sender, **kwargs): #print "Added view permission for %s" % content_type.name # check for all our view permissions after a syncdb -post_syncdb.connect(add_view_permissions) - +post_migrate.connect(add_view_permissions) class Bookmark(models.Model): title = models.CharField(_(u'Title'), max_length=128) diff --git a/xadmin/plugins/__init__.py b/xadmin/plugins/__init__.py index 395a0f4c2..7fbc5644f 100644 --- a/xadmin/plugins/__init__.py +++ b/xadmin/plugins/__init__.py @@ -6,7 +6,7 @@ def register_builtin_plugins(site): - from django.utils.importlib import import_module + from importlib import import_module from django.conf import settings exclude_plugins = getattr(settings, 'XADMIN_EXCLUDE_PLUGINS', []) diff --git a/xadmin/plugins/actions.py b/xadmin/plugins/actions.py index 894ea0641..ff08054d1 100644 --- a/xadmin/plugins/actions.py +++ b/xadmin/plugins/actions.py @@ -1,10 +1,10 @@ +from collections import OrderedDict from django import forms from django.core.exceptions import PermissionDenied from django.db import router from django.http import HttpResponse, HttpResponseRedirect from django.template import loader from django.template.response import TemplateResponse -from django.utils.datastructures import SortedDict from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _, ungettext @@ -209,7 +209,7 @@ def response_action(self, ac, queryset): def get_actions(self): if self.actions is None: - return SortedDict() + return OrderedDict() actions = [self.get_action(action) for action in self.global_actions] @@ -223,8 +223,8 @@ def get_actions(self): # get_action might have returned None, so filter any of those out. actions = filter(None, actions) - # Convert the actions into a SortedDict keyed by name. - actions = SortedDict([ + # Convert the actions into a OrderedDict keyed by name. + actions = OrderedDict([ (name, (ac, name, desc, icon)) for ac, name, desc, icon in actions ]) @@ -285,7 +285,7 @@ def get_media(self, media): # Block Views def block_results_bottom(self, context, nodes): if self.actions and self.admin_view.result_count: - nodes.append(loader.render_to_string('xadmin/blocks/model_list.results_bottom.actions.html', context_instance=context)) + nodes.append(loader.render_to_string('xadmin/blocks/model_list.results_bottom.actions.html', request=context.request)) site.register_plugin(ActionPlugin, ListAdminView) diff --git a/xadmin/plugins/ajax.py b/xadmin/plugins/ajax.py index aa5bb32eb..f6e21c3d6 100644 --- a/xadmin/plugins/ajax.py +++ b/xadmin/plugins/ajax.py @@ -1,5 +1,5 @@ -from django import forms -from django.utils.datastructures import SortedDict +from collections import OrderedDict +from django.forms.utils import ErrorDict from django.utils.html import escape from django.utils.encoding import force_unicode from xadmin.sites import site @@ -12,7 +12,7 @@ class BaseAjaxPlugin(BaseAdminPlugin): def init_request(self, *args, **kwargs): - return bool(self.request.is_ajax() or self.request.REQUEST.get('_ajax')) + return bool(self.request.is_ajax() or self.request.GET.get('_ajax')) class AjaxListPlugin(BaseAjaxPlugin): @@ -37,7 +37,7 @@ def get_result_list(self, response): return self.render_response({'headers': headers, 'objects': objects, 'total_count': av.result_count, 'has_more': av.has_more}) -class JsonErrorDict(forms.util.ErrorDict): +class JsonErrorDict(ErrorDict): def __init__(self, errors, form): super(JsonErrorDict, self).__init__(errors) @@ -92,7 +92,7 @@ def get_response(self, __): result = self.admin_view.get_field_result(f) results.append((result.label, result.val)) - return self.render_response(SortedDict(results)) + return self.render_response(OrderedDict(results)) site.register_plugin(AjaxListPlugin, ListAdminView) site.register_plugin(AjaxFormPlugin, ModelFormAdminView) diff --git a/xadmin/plugins/bookmark.py b/xadmin/plugins/bookmark.py index a30276b16..8b6f693e3 100644 --- a/xadmin/plugins/bookmark.py +++ b/xadmin/plugins/bookmark.py @@ -119,7 +119,7 @@ def get_media(self, media): # Block Views def block_nav_menu(self, context, nodes): if self.show_bookmarks: - nodes.insert(0, loader.render_to_string('xadmin/blocks/model_list.nav_menu.bookmarks.html', context_instance=context)) + nodes.insert(0, loader.render_to_string('xadmin/blocks/model_list.nav_menu.bookmarks.html', request=context.request)) class BookmarkView(ModelAdminView): diff --git a/xadmin/plugins/chart.py b/xadmin/plugins/chart.py index e83ab8ca9..c8f639e52 100644 --- a/xadmin/plugins/chart.py +++ b/xadmin/plugins/chart.py @@ -98,7 +98,7 @@ def block_results_top(self, context, nodes): context.update({ 'charts': [{"name": name, "title": v['title'], 'url': self.get_chart_url(https://github.com/name,%20v)} for name, v in self.data_charts.items()], }) - nodes.append(loader.render_to_string('xadmin/blocks/model_list.results_top.charts.html', context_instance=context)) + nodes.append(loader.render_to_string('xadmin/blocks/model_list.results_top.charts.html', request=context.request)) class ChartsView(ListAdminView): diff --git a/xadmin/plugins/comments.py b/xadmin/plugins/comments.py index 0e90462e1..279fe4d83 100644 --- a/xadmin/plugins/comments.py +++ b/xadmin/plugins/comments.py @@ -91,4 +91,4 @@ def _bulk_flag(self, queryset, action, done_message): # Only register the default admin if the model is the built-in comment model # (this won't be true if there's a custom comment app). if 'django.contrib.comments' in settings.INSTALLED_APPS and (get_model() is Comment): - xadmin.site.register(Comment, CommentsAdmin) + xadmin.sites.site.register(Comment, CommentsAdmin) diff --git a/xadmin/plugins/export.py b/xadmin/plugins/export.py index 895a30e32..fa9b7a70f 100644 --- a/xadmin/plugins/export.py +++ b/xadmin/plugins/export.py @@ -45,7 +45,7 @@ def block_top_toolbar(self, context, nodes): 'form_params': self.admin_view.get_form_params({'_do_': 'export'}, ('export_type',)), 'export_types': [{'type': et, 'name': self.export_names[et]} for et in self.list_export], }) - nodes.append(loader.render_to_string('xadmin/blocks/model_list.top_toolbar.exports.html', context_instance=context)) + nodes.append(loader.render_to_string('xadmin/blocks/model_list.top_toolbar.exports.html', request=context.request)) class ExportPlugin(BaseAdminPlugin): diff --git a/xadmin/plugins/filters.py b/xadmin/plugins/filters.py index c13dec0a1..8a128a2bc 100644 --- a/xadmin/plugins/filters.py +++ b/xadmin/plugins/filters.py @@ -5,7 +5,6 @@ from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured, ValidationError from django.db import models from django.db.models.fields import FieldDoesNotExist -from django.db.models.related import RelatedObject from django.db.models.sql.query import LOOKUP_SEP, QUERY_TERMS from django.template import loader from django.utils.encoding import smart_str @@ -14,6 +13,7 @@ from xadmin.filters import manager as filter_manager, FILTER_PREFIX, SEARCH_VAR, DateFieldListFilter, RelatedFieldSearchFilter from xadmin.sites import site from xadmin.views import BaseAdminPlugin, ListAdminView +from xadmin.util import is_related_field class IncorrectLookupParameters(Exception): @@ -49,7 +49,7 @@ def lookup_allowed(self, lookup, value): rel_name = None for part in parts[:-1]: try: - field, _, _, _ = model._meta.get_field_by_name(part) + field = model._meta.get_field(part) except FieldDoesNotExist: # Lookups on non-existants fields are ok, since they're ignored # later. @@ -57,7 +57,7 @@ def lookup_allowed(self, lookup, value): if hasattr(field, 'rel'): model = field.rel.to rel_name = field.rel.get_related_field().name - elif isinstance(field, RelatedObject): + elif is_related_field(field): model = field.model rel_name = model._meta.pk.name else: @@ -199,7 +199,7 @@ def get_media(self, media): # Block Views def block_nav_menu(self, context, nodes): if self.has_filters: - nodes.append(loader.render_to_string('xadmin/blocks/model_list.nav_menu.filters.html', context_instance=context)) + nodes.append(loader.render_to_string('xadmin/blocks/model_list.nav_menu.filters.html', request=context.request)) def block_nav_form(self, context, nodes): if self.search_fields: @@ -209,6 +209,6 @@ def block_nav_form(self, context, nodes): {'search_var': SEARCH_VAR, 'remove_search_url': self.admin_view.get_query_string(remove=[SEARCH_VAR]), 'search_form_params': self.admin_view.get_form_params(remove=[SEARCH_VAR])}, - context_instance=context)) + request=context.request)) site.register_plugin(FilterPlugin, ListAdminView) diff --git a/xadmin/plugins/inline.py b/xadmin/plugins/inline.py index ca8b61daf..6a098329a 100644 --- a/xadmin/plugins/inline.py +++ b/xadmin/plugins/inline.py @@ -3,7 +3,7 @@ from django import forms from django.forms.formsets import all_valid, DELETION_FIELD_NAME from django.forms.models import inlineformset_factory, BaseInlineFormSet, modelform_defines_fields -from django.contrib.contenttypes.generic import BaseGenericInlineFormSet, generic_inlineformset_factory +from django.contrib.contenttypes.forms import BaseGenericInlineFormSet, generic_inlineformset_factory from django.template import loader from django.template.loader import render_to_string from django.contrib.auth import get_permission_codename @@ -224,7 +224,7 @@ def instance_form(self, **kwargs): value = None label = None if readonly_field in inst._meta.get_all_field_names(): - label = inst._meta.get_field_by_name(readonly_field)[0].verbose_name + label = inst._meta.get_field(readonly_field).verbose_name value = unicode(getattr(inst, readonly_field)) elif inspect.ismethod(getattr(inst, readonly_field, None)): value = getattr(inst, readonly_field)() @@ -332,7 +332,7 @@ def __init__(self, formset, allow_blank=False, **kwargs): def render(self, form, form_style, context): return render_to_string( self.template, dict({'formset': self, 'prefix': self.formset.prefix, 'inline_style': self.inline_style}, **self.extra_attrs), - context_instance=context) + request=context.request) class Inline(Fieldset): @@ -340,6 +340,7 @@ class Inline(Fieldset): def __init__(self, rel_model): self.model = rel_model self.fields = [] + super(Inline,self).__init__(legend="") def render(self, form, form_style, context): return "" diff --git a/xadmin/plugins/layout.py b/xadmin/plugins/layout.py index 2e45d1ab3..acdec6931 100644 --- a/xadmin/plugins/layout.py +++ b/xadmin/plugins/layout.py @@ -73,7 +73,7 @@ def block_top_toolbar(self, context, nodes): 'layouts': self._active_layouts, 'current_icon': self._current_icon, }) - nodes.append(loader.render_to_string('xadmin/blocks/model_list.top_toolbar.layouts.html', context_instance=context)) + nodes.append(loader.render_to_string('xadmin/blocks/model_list.top_toolbar.layouts.html', request=context.request)) site.register_plugin(GridLayoutPlugin, ListAdminView) diff --git a/xadmin/plugins/multiselect.py b/xadmin/plugins/multiselect.py index 954f6b849..795d1c817 100644 --- a/xadmin/plugins/multiselect.py +++ b/xadmin/plugins/multiselect.py @@ -4,7 +4,7 @@ import xadmin from django import forms from django.db.models import ManyToManyField -from django.forms.util import flatatt +from django.forms.utils import flatatt from django.template import loader from django.utils.encoding import force_unicode from django.utils.html import escape, conditional_escape @@ -104,4 +104,4 @@ def get_field_style(self, attrs, db_field, style, **kwargs): return attrs -xadmin.site.register_plugin(M2MSelectPlugin, ModelFormAdminView) +xadmin.sites.site.register_plugin(M2MSelectPlugin, ModelFormAdminView) diff --git a/xadmin/plugins/quickfilter.py b/xadmin/plugins/quickfilter.py index 928d4ebf5..1b6a30a24 100644 --- a/xadmin/plugins/quickfilter.py +++ b/xadmin/plugins/quickfilter.py @@ -6,6 +6,7 @@ from django.utils.translation import ugettext_lazy as _ from xadmin.filters import manager,MultiSelectFieldListFilter from xadmin.plugins.filters import * +from xadmin.util import is_related_field @manager.register class QuickFilterMultiSelectFieldListFilter(MultiSelectFieldListFilter): @@ -56,7 +57,7 @@ def lookup_allowed(self, lookup, value): rel_name = None for part in parts[:-1]: try: - field, _, _, _ = model._meta.get_field_by_name(part) + field = model._meta.get_field(part) except FieldDoesNotExist: # Lookups on non-existants fields are ok, since they're ignored # later. @@ -64,7 +65,7 @@ def lookup_allowed(self, lookup, value): if hasattr(field, 'rel'): model = field.rel.to rel_name = field.rel.get_related_field().name - elif isinstance(field, RelatedObject): + elif is_related_field(field): model = field.model rel_name = model._meta.pk.name else: @@ -155,4 +156,4 @@ def get_list_queryset(self, queryset): def block_left_navbar(self, context, nodes): nodes.append(loader.render_to_string('xadmin/blocks/modal_list.left_navbar.quickfilter.html',context)) -site.register_plugin(QuickFilterPlugin, ListAdminView) \ No newline at end of file +site.register_plugin(QuickFilterPlugin, ListAdminView) diff --git a/xadmin/plugins/refresh.py b/xadmin/plugins/refresh.py index 8c1a0fa91..6ed4821ac 100644 --- a/xadmin/plugins/refresh.py +++ b/xadmin/plugins/refresh.py @@ -31,7 +31,7 @@ def block_top_toolbar(self, context, nodes): 'selected': str(r) == current_refresh, } for r in self.refresh_times], }) - nodes.append(loader.render_to_string('xadmin/blocks/model_list.top_toolbar.refresh.html', context_instance=context)) + nodes.append(loader.render_to_string('xadmin/blocks/model_list.top_toolbar.refresh.html', request=context.request)) site.register_plugin(RefreshPlugin, ListAdminView) diff --git a/xadmin/plugins/relate.py b/xadmin/plugins/relate.py index 9a8aab192..6dc4d5f3d 100644 --- a/xadmin/plugins/relate.py +++ b/xadmin/plugins/relate.py @@ -4,12 +4,13 @@ from django.utils.encoding import smart_str from django.utils.safestring import mark_safe from django.db.models.sql.query import LOOKUP_SEP -from django.db.models.related import RelatedObject from django.utils.translation import ugettext as _ from django.db import models + from xadmin.sites import site from xadmin.views import BaseAdminPlugin, ListAdminView, CreateAdminView, UpdateAdminView, DeleteAdminView +from xadmin.util import is_related_field2 RELATE_PREFIX = '_rel_' @@ -24,7 +25,7 @@ def get_related_list(self): return self._related_acts _related_acts = [] - for r in self.opts.get_all_related_objects() + self.opts.get_all_related_many_to_many_objects(): + for r in list(self.opts.get_fields()) + list(self.opts.get_fields()): if self.related_list and (r.get_accessor_name() not in self.related_list): continue if r.model not in self.admin_site._registry.keys(): @@ -93,9 +94,9 @@ def __init__(self, admin_view, lookup, value): self.value = value parts = lookup.split(LOOKUP_SEP) - field = self.opts.get_field_by_name(parts[0])[0] + field = self.opts.get_field(parts[0]) - if not hasattr(field, 'rel') and not isinstance(field, RelatedObject): + if not is_related_field2(field): raise Exception(u'Relate Lookup field must a related field') if hasattr(field, 'rel'): @@ -128,7 +129,7 @@ class BaseRelateDisplayPlugin(BaseAdminPlugin): def init_request(self, *args, **kwargs): self.relate_obj = None - for k, v in self.request.REQUEST.items(): + for k, v in self.request.GET.items(): if smart_str(k).startswith(RELATE_PREFIX): self.relate_obj = RelateObject( self.admin_view, smart_str(k)[len(RELATE_PREFIX):], v) diff --git a/xadmin/plugins/sortable.py b/xadmin/plugins/sortable.py index 8806eeaf8..adc97309b 100644 --- a/xadmin/plugins/sortable.py +++ b/xadmin/plugins/sortable.py @@ -30,7 +30,7 @@ def block_top_toolbar(self, context, nodes): # 'selected': str(r) == current_refresh, # } for r in self.refresh_times], # }) - # nodes.append(loader.render_to_string('xadmin/blocks/refresh.html', context_instance=context)) + # nodes.append(loader.render_to_string('xadmin/blocks/refresh.html', request=context.request)) site.register_plugin(SortablePlugin, ListAdminView) diff --git a/xadmin/plugins/topnav.py b/xadmin/plugins/topnav.py index daa58bd9b..c92fce549 100644 --- a/xadmin/plugins/topnav.py +++ b/xadmin/plugins/topnav.py @@ -41,8 +41,7 @@ def block_top_navbar(self, context, nodes): }) except NoReverseMatch: pass - - nodes.append(loader.render_to_string('xadmin/blocks/comm.top.topnav.html', {'search_models': search_models, 'search_name': SEARCH_VAR})) + return nodes.append(loader.render_to_string('xadmin/blocks/comm.top.topnav.html', {'search_models': search_models, 'search_name': SEARCH_VAR})) def block_top_navmenu(self, context, nodes): add_models = [] diff --git a/xadmin/plugins/wizard.py b/xadmin/plugins/wizard.py index d354f69cd..213801538 100644 --- a/xadmin/plugins/wizard.py +++ b/xadmin/plugins/wizard.py @@ -1,11 +1,11 @@ import re +from collections import OrderedDict from django import forms from django.db import models from django.template import loader -from django.contrib.formtools.wizard.storage import get_storage -from django.contrib.formtools.wizard.forms import ManagementForm -from django.contrib.formtools.wizard.views import StepsHelper -from django.utils.datastructures import SortedDict +from formtools.wizard.storage import get_storage +from formtools.wizard.forms import ManagementForm +from formtools.wizard.views import StepsHelper from django.forms import ValidationError from django.forms.models import modelform_factory from xadmin.sites import site @@ -36,7 +36,7 @@ def _get_form_prefix(self, step=None): def get_form_list(self): if not hasattr(self, '_form_list'): - init_form_list = SortedDict() + init_form_list = OrderedDict() assert len( self.wizard_form_list) > 0, 'at least one form is needed' diff --git a/xadmin/plugins/xversion.py b/xadmin/plugins/xversion.py index 680561cce..ef4e1508f 100644 --- a/xadmin/plugins/xversion.py +++ b/xadmin/plugins/xversion.py @@ -1,9 +1,8 @@ -from django.contrib.contenttypes.generic import GenericRelation +from django.contrib.contenttypes.fields import GenericRelation from django.contrib.contenttypes.models import ContentType from django.core.exceptions import PermissionDenied from django.db import models from django.db.models.query import QuerySet -from django.db.models.related import RelatedObject from django.forms.models import model_to_dict from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 @@ -17,7 +16,7 @@ from xadmin.plugins.actions import BaseActionView from xadmin.plugins.inline import InlineModelAdmin from xadmin.sites import site -from xadmin.util import unquote, quote, model_format_dict +from xadmin.util import unquote, quote, model_format_dict,is_related_field from xadmin.views import BaseAdminPlugin, ModelAdminView, CreateAdminView, UpdateAdminView, DetailAdminView, ModelFormAdminView, DeleteAdminView, ListAdminView from xadmin.views.base import csrf_protect_m, filter_hook from xadmin.views.detail import DetailAdminUtil @@ -53,7 +52,10 @@ def _register_model(admin, model): ct_field = getattr(inline, 'ct_field', 'content_type') ct_fk_field = getattr(inline, 'ct_fk_field', 'object_id') for field in model._meta.many_to_many: - if isinstance(field, GenericRelation) and field.rel.to == inline_model and field.object_id_field_name == ct_fk_field and field.content_type_field_name == ct_field: + if isinstance(field, GenericRelation) \ + and field.rel.to == inline_model \ + and field.object_id_field_name == ct_fk_field \ + and field.content_type_field_name == ct_field: inline_fields.append(field.name) _autoregister(admin, inline_model) else: @@ -64,8 +66,7 @@ def _register_model(admin, model): fk_name = field.name _autoregister(admin, inline_model, follow=[fk_name]) if not inline_model._meta.get_field(fk_name).rel.is_hidden(): - accessor = inline_model._meta.get_field( - fk_name).related.get_accessor_name() + accessor = inline_model._meta.get_field(fk_name).remote_field.get_accessor_name() inline_fields.append(accessor) _autoregister(admin, model, inline_fields) @@ -330,7 +331,7 @@ def post(self, request, object_id, *args, **kwargs): obj_b, detail_b = self.get_version_object(version_b) for f in (self.opts.fields + self.opts.many_to_many): - if isinstance(f, RelatedObject): + if is_related_field(f): label = f.opts.verbose_name else: label = f.verbose_name diff --git a/xadmin/sites.py b/xadmin/sites.py index 222dbaf6f..e48ab2a8b 100644 --- a/xadmin/sites.py +++ b/xadmin/sites.py @@ -181,12 +181,12 @@ def admin_view(self, view, cacheable=False): class MyAdminSite(AdminSite): def get_urls(self): - from django.conf.urls import patterns, url + from django.conf.urls import url urls = super(MyAdminSite, self).get_urls() - urls += patterns('', + urls += [ url(https://github.com/r'%5Emy_view/),%20self.admin_view(some_view)) - ) + ] return urls By default, admin_views are marked non-cacheable using the @@ -280,7 +280,7 @@ def create_model_admin_view(self, admin_view_class, model, option_class): return self.get_view_class(admin_view_class, option_class).as_view() def get_urls(self): - from django.conf.urls import patterns, url, include + from django.conf.urls import url, include from xadmin.views.base import BaseAdminView if settings.DEBUG: @@ -292,17 +292,15 @@ def wrapper(*args, **kwargs): return update_wrapper(wrapper, view) # Admin-site-wide views. - urlpatterns = patterns('', - url(r'^jsi18n/$', wrap(self.i18n_javascript, - cacheable=True), name='jsi18n') - ) + urlpatterns = [ + url(https://github.com/r'%5Ejsi18n/),%20wrap(self.i18n_javascript,%20cacheable=True), name='jsi18n') + ] # Registed admin views - urlpatterns += patterns('', - *[url( - path, wrap(self.create_admin_view(clz_or_func)) if type(clz_or_func) == type and issubclass(clz_or_func, BaseAdminView) else include(clz_or_func(self)), - name=name) for path, clz_or_func, name in self._registry_views] - ) + urlpatterns += [ + url(https://github.com/path,%20wrap(self.create_admin_view(clz_or_func)) if type(clz_or_func) == type and issubclass(clz_or_func, BaseAdminView) else include(clz_or_func(self)), + name=name) for path, clz_or_func, name in self._registry_views + ] # Add in each model's views. for model, admin_class in self._registry.iteritems(): @@ -311,12 +309,9 @@ def wrapper(*args, **kwargs): self.create_model_admin_view(clz, model, admin_class)), name=name % (model._meta.app_label, model._meta.model_name)) for path, clz, name in self._registry_modelviews] - urlpatterns += patterns('', - url( - r'^%s/%s/' % ( - model._meta.app_label, model._meta.model_name), - include(patterns('', *view_urls))) - ) + urlpatterns += [ + url(https://github.com/r'%5E%s/%s/'%20%%20(%20model._meta.app_label,%20model._meta.model_name), include(view_urls)) + ] return urlpatterns diff --git a/xadmin/templates/xadmin/500.html b/xadmin/templates/xadmin/500.html index b437c1aed..ee94582c2 100644 --- a/xadmin/templates/xadmin/500.html +++ b/xadmin/templates/xadmin/500.html @@ -1,6 +1,6 @@ {% extends base_template %} {% load i18n %} -{% load url from future %} + {% block breadcrumbs %}