From 3268c2681874b53c1a9fbda5f7ab1388d62226b4 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 14 Feb 2013 11:24:34 +0100 Subject: [PATCH 1/1] images --- catalogue/publish.py | 38 ++++++- catalogue/static/catalogue/js/lesson.js | 9 ++ curriculum/static/curriculum/curriculum.js | 2 +- edumed/settings.d/50-static.py | 4 + edumed/static/jquery/colorbox/colorbox.css | 93 ++++++++++++++++++ .../static/jquery/colorbox/images/border.png | Bin 0 -> 112 bytes .../jquery/colorbox/images/controls.png | Bin 0 -> 2893 bytes .../images/ie6/borderBottomCenter.png | Bin 0 -> 111 bytes .../colorbox/images/ie6/borderBottomLeft.png | Bin 0 -> 215 bytes .../colorbox/images/ie6/borderBottomRight.png | Bin 0 -> 217 bytes .../colorbox/images/ie6/borderMiddleLeft.png | Bin 0 -> 108 bytes .../colorbox/images/ie6/borderMiddleRight.png | Bin 0 -> 108 bytes .../colorbox/images/ie6/borderTopCenter.png | Bin 0 -> 111 bytes .../colorbox/images/ie6/borderTopLeft.png | Bin 0 -> 216 bytes .../colorbox/images/ie6/borderTopRight.png | Bin 0 -> 214 bytes .../static/jquery/colorbox/images/loading.gif | Bin 0 -> 9427 bytes .../colorbox/images/loading_background.png | Bin 0 -> 157 bytes .../static/jquery/colorbox/images/overlay.png | Bin 0 -> 182 bytes .../jquery/colorbox/jquery.colorbox-min.js | 6 ++ .../jquery/colorbox/jquery.colorbox-pl.js | 16 +++ 20 files changed, 164 insertions(+), 4 deletions(-) create mode 100755 catalogue/static/catalogue/js/lesson.js create mode 100644 edumed/static/jquery/colorbox/colorbox.css create mode 100644 edumed/static/jquery/colorbox/images/border.png create mode 100644 edumed/static/jquery/colorbox/images/controls.png create mode 100644 edumed/static/jquery/colorbox/images/ie6/borderBottomCenter.png create mode 100644 edumed/static/jquery/colorbox/images/ie6/borderBottomLeft.png create mode 100644 edumed/static/jquery/colorbox/images/ie6/borderBottomRight.png create mode 100644 edumed/static/jquery/colorbox/images/ie6/borderMiddleLeft.png create mode 100644 edumed/static/jquery/colorbox/images/ie6/borderMiddleRight.png create mode 100644 edumed/static/jquery/colorbox/images/ie6/borderTopCenter.png create mode 100644 edumed/static/jquery/colorbox/images/ie6/borderTopLeft.png create mode 100644 edumed/static/jquery/colorbox/images/ie6/borderTopRight.png create mode 100644 edumed/static/jquery/colorbox/images/loading.gif create mode 100644 edumed/static/jquery/colorbox/images/loading_background.png create mode 100644 edumed/static/jquery/colorbox/images/overlay.png create mode 100644 edumed/static/jquery/colorbox/jquery.colorbox-min.js create mode 100644 edumed/static/jquery/colorbox/jquery.colorbox-pl.js diff --git a/catalogue/publish.py b/catalogue/publish.py index 87f4d90..f79a809 100755 --- a/catalogue/publish.py +++ b/catalogue/publish.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 +from django.core.files.base import ContentFile from django.core.files import File from librarian import DocProvider, IOFile from librarian.pyhtml import EduModuleFormat @@ -6,7 +7,7 @@ from .models import Lesson, Attachment class HtmlFormat(EduModuleFormat): - def url_for_material(self, slug, fmt): + def find_attachment(self, slug, fmt): lesson_slug = self.wldoc.book_info.url.slug try: # If already saved, use it. @@ -24,9 +25,40 @@ class HtmlFormat(EduModuleFormat): lesson = Lesson.objects.get(slug=lesson_slug) att = lesson.attachment_set.create(slug=slug, ext=fmt) att.file.save(att_name, File(att_file.get_file())) - return att.file.url + return att else: - return att.file.url + return att + + def url_for_material(self, slug, fmt): + return self.find_attachment(slug, fmt).file.url + + def url_for_image(self, slug, fmt, width=None): + if width is None: + return self.url_for_material(slug, fmt) + + lesson_slug = self.wldoc.book_info.url.slug + th_slug = "thumb/%s__th%d" % (slug, width) + try: + # If already saved, use it. + att = Attachment.objects.get(lesson__slug=lesson_slug, + slug=th_slug, ext=fmt) + except Attachment.DoesNotExist, e: + from PIL import Image + from StringIO import StringIO + # Find full image, create thumbnail, save. + src_att = self.find_attachment(slug, fmt) + simg = Image.open(src_att.file.path) + size = (width, simg.size[1]*width/simg.size[0]) + simg = simg.resize(size, Image.ANTIALIAS) + + tempfile = StringIO() + img_format = "JPEG" if fmt.upper() == "JPG" else fmt + simg.save(tempfile, format=img_format) + att_name = "%s.%s" % (th_slug, fmt) + lesson = Lesson.objects.get(slug=lesson_slug) + att = lesson.attachment_set.create(slug=th_slug, ext=fmt) + att.file.save(att_name, ContentFile(tempfile.getvalue())) + return att.file.url class OrmDocProvider(DocProvider): diff --git a/catalogue/static/catalogue/js/lesson.js b/catalogue/static/catalogue/js/lesson.js new file mode 100755 index 0000000..6b22a83 --- /dev/null +++ b/catalogue/static/catalogue/js/lesson.js @@ -0,0 +1,9 @@ +(function($){ +$(function() { + + +$('a.image').colorbox(); + + +}); +})($); diff --git a/curriculum/static/curriculum/curriculum.js b/curriculum/static/curriculum/curriculum.js index e30375a..0bdafc2 100755 --- a/curriculum/static/curriculum/curriculum.js +++ b/curriculum/static/curriculum/curriculum.js @@ -1,5 +1,5 @@ $(function() { - if (curriculum_hide_form) { + if (typeof(curriculum_hide_form) != "undefined") { $('.curriculum-form form').hide(); $('.curriculum-form h2 a span').show(); } diff --git a/edumed/settings.d/50-static.py b/edumed/settings.d/50-static.py index 750caf0..23de9b2 100644 --- a/edumed/settings.d/50-static.py +++ b/edumed/settings.d/50-static.py @@ -15,6 +15,7 @@ PIPELINE_JS_COMPRESSOR = None PIPELINE_CSS = { 'base': { 'source_filenames': ( + 'jquery/colorbox/colorbox.css', 'css/base.scss', 'css/main.scss', 'catalogue/css/carousel.scss', @@ -32,7 +33,10 @@ PIPELINE_JS = { 'source_filenames': ( 'catalogue/js/jquery-ui-1.10.0.custom.js', 'catalogue/js/jquery.cycle.all.js', + 'jquery/colorbox/jquery.colorbox-min.js', + 'jquery/colorbox/jquery.colorbox-pl.js', 'catalogue/js/edumed.js', + 'catalogue/js/lesson.js', 'catalogue/js/carousel.js', 'sponsors/js/sponsors.js', 'curriculum/curriculum.js', diff --git a/edumed/static/jquery/colorbox/colorbox.css b/edumed/static/jquery/colorbox/colorbox.css new file mode 100644 index 0000000..b75b0ce --- /dev/null +++ b/edumed/static/jquery/colorbox/colorbox.css @@ -0,0 +1,93 @@ +/* + ColorBox Core Style: + The following CSS is consistent between example themes and should not be altered. +*/ +#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;} +#cboxOverlay{position:fixed; width:100%; height:100%;} +#cboxMiddleLeft, #cboxBottomLeft{clear:left;} +#cboxContent{position:relative;} +#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;} +#cboxTitle{margin:0;} +#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;} +#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} +.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none;} +.cboxIframe{width:100%; height:100%; display:block; border:0;} +#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;} + +/* + User Style: + Change the following styles to modify the appearance of ColorBox. They are + ordered & tabbed in a way that represents the nesting of the generated HTML. +*/ +#cboxOverlay{background:url(images/overlay.png) repeat 0 0;} +#colorbox{outline:0;} + #cboxTopLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -101px 0;} + #cboxTopRight{width:21px; height:21px; background:url(images/controls.png) no-repeat -130px 0;} + #cboxBottomLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -101px -29px;} + #cboxBottomRight{width:21px; height:21px; background:url(images/controls.png) no-repeat -130px -29px;} + #cboxMiddleLeft{width:21px; background:url(images/controls.png) left top repeat-y;} + #cboxMiddleRight{width:21px; background:url(images/controls.png) right top repeat-y;} + #cboxTopCenter{height:21px; background:url(images/border.png) 0 0 repeat-x;} + #cboxBottomCenter{height:21px; background:url(images/border.png) 0 -29px repeat-x;} + #cboxContent{background:#fff; overflow:hidden;} + .cboxIframe{background:#fff;} + #cboxError{padding:50px; border:1px solid #ccc;} + #cboxLoadedContent{margin-bottom:28px;} + #cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;} + #cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;} + #cboxLoadingOverlay{background:url(images/loading_background.png) no-repeat center center;} + #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;} + + /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */ + #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; } + + /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */ + #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;} + + #cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;} + #cboxPrevious{position:absolute; bottom:0; left:0; background:url(images/controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;} + #cboxPrevious:hover{background-position:-75px -25px;} + #cboxNext{position:absolute; bottom:0; left:27px; background:url(images/controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;} + #cboxNext:hover{background-position:-50px -25px;} + #cboxClose{position:absolute; bottom:0; right:0; background:url(images/controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;} + #cboxClose:hover{background-position:-25px -25px;} + +/* + The following fixes a problem where IE7 and IE8 replace a PNG's alpha transparency with a black fill + when an alpha filter (opacity change) is set on the element or ancestor element. This style is not applied to or needed in IE9. + See: http://jacklmoore.com/notes/ie-transparency-problems/ +*/ +.cboxIE #cboxTopLeft, +.cboxIE #cboxTopCenter, +.cboxIE #cboxTopRight, +.cboxIE #cboxBottomLeft, +.cboxIE #cboxBottomCenter, +.cboxIE #cboxBottomRight, +.cboxIE #cboxMiddleLeft, +.cboxIE #cboxMiddleRight { + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF); +} + +/* + The following provides PNG transparency support for IE6 + Feel free to remove this and the /ie6/ directory if you have dropped IE6 support. +*/ +.cboxIE6 #cboxTopLeft{background:url(images/ie6/borderTopLeft.png);} +.cboxIE6 #cboxTopCenter{background:url(images/ie6/borderTopCenter.png);} +.cboxIE6 #cboxTopRight{background:url(images/ie6/borderTopRight.png);} +.cboxIE6 #cboxBottomLeft{background:url(images/ie6/borderBottomLeft.png);} +.cboxIE6 #cboxBottomCenter{background:url(images/ie6/borderBottomCenter.png);} +.cboxIE6 #cboxBottomRight{background:url(images/ie6/borderBottomRight.png);} +.cboxIE6 #cboxMiddleLeft{background:url(images/ie6/borderMiddleLeft.png);} +.cboxIE6 #cboxMiddleRight{background:url(images/ie6/borderMiddleRight.png);} + +.cboxIE6 #cboxTopLeft, +.cboxIE6 #cboxTopCenter, +.cboxIE6 #cboxTopRight, +.cboxIE6 #cboxBottomLeft, +.cboxIE6 #cboxBottomCenter, +.cboxIE6 #cboxBottomRight, +.cboxIE6 #cboxMiddleLeft, +.cboxIE6 #cboxMiddleRight { + _behavior: expression(this.src = this.src ? this.src : this.currentStyle.backgroundImage.split('"')[1], this.style.background = "none", this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + this.src + ", sizingMethod='scale')"); +} diff --git a/edumed/static/jquery/colorbox/images/border.png b/edumed/static/jquery/colorbox/images/border.png new file mode 100644 index 0000000000000000000000000000000000000000..f463a10d838aeba263ff44e5c3578dfe7ba07648 GIT binary patch literal 112 zcmeAS@N?(olHy`uVBq!ia0vp^j6iI}$P6Txn<}3KQfvV}A+A9B|Ns9>Z_d99WHFWm z`2{zujf-{zawI%m978JNrXFPE1@f8<7E8}%%lTu>&#KnM&G`7uteHSj22WQ%mvv4F FO#q`M9f1G< literal 0 HcmV?d00001 diff --git a/edumed/static/jquery/colorbox/images/controls.png b/edumed/static/jquery/colorbox/images/controls.png new file mode 100644 index 0000000000000000000000000000000000000000..dcfd6fb9f178454613123d018bf742c8cc905df7 GIT binary patch literal 2893 zcmV-T3$pZyP)_ZK9@9A5hhZ`zJ|^XJp&7A=Y=V7G`@Q^Xk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%x5c{NDg8M_bM_ zvA%QaGM)dphkfRoQ$X`eAH>+jL!YkjKU8{yDOY=WDww&5LW zeZN!p8uU1<0#8sRL&P|T_ehZfJgum5inXGAE^YY63Oau3BI~KwH=UwShCgH9%`JX} zzUyB-ty832@2lj%NPq}^} z+|#`2ol*MrtIc%c+<$5JPoFi+p=Jke60{%?DhF;5*wKAU>hukKN*!9pZB1{_VO!7rad%iH0g+loSbYbo}EwSWks~=@dZ?vpDTa2_AATi zwb~bAyuDctggHOo=BK3V@fH>-b`M4)f=plRGzkVQls9y%Y#XRBepKX#q>*)(oPyd6V zrg(`>)HsxwU06V`{A9DLcoXILj(;^B+4tiZFK?3L8o3{i*pQOMCN?DmiQxeBR(&BX z(V9U^R$>#}bXuLzIEhX07r(Dt)2t$VsEg_(vl5$N6;?75g5W$_Fp@k)OT0#trx>wA zOS}f{Xd(B)v1@mH6apSge6b+STVQA{0V;iPpifQ+qPL36iKHVA*byXmzNyI2JCt23 zU_hA=1VX{oubKc*;gLJT2_-ghB6*5Uc3>jHZ7(`>bn+ynubSoSX?f2c!orING0TOC z0*tjn82m9HD~rIzcowiD=}408@Lo0R76GdXKr7yK!^^(;YiG5f^Lkl50doZ_d99WHFWm z`2{zujf-{za>PAd978JNY7Z)cbT)5ruP-ra%e~G}wTijXxbw&apdf>%tDnm{r-UW| DknJ7# literal 0 HcmV?d00001 diff --git a/edumed/static/jquery/colorbox/images/ie6/borderBottomLeft.png b/edumed/static/jquery/colorbox/images/ie6/borderBottomLeft.png new file mode 100644 index 0000000000000000000000000000000000000000..2775eba899d10d3dc6f8c4044ad69cb89a5f8499 GIT binary patch literal 215 zcmeAS@N?(olHy`uVBq!ia0vp^q9Dw|3?!p1cPs@`>H$6>u0R?BQd3j6Z{H4KpFe*d zCJdtg|NlSbL?0`V#ZwaG7u>*5G5>gk!F7ua0ST$+oA`j@!JaOTAr*10r#A97C`hm- z3dKH%oOr{aLpj2LsW&>nlF|6W##ZJ(&Vq|N!)H`n4WCnOwE6XE$$JkZ%dBmlKK#!l q^N>YH$6>u0R?BQd3j6Z{H4KpFe*d zCJdtg|NlSbL?0`V#ZwaG7u>*5G5>gk!F7ua0ST$+oA`j@p`I>|Ar*0Rk8R{_P!M3f za60r>rSy%6n-)#V7EE~whgkX^aO5~8RysR6J&4z+ys8}98}g<84F4bXKSykNqt5CV sw|{E#ePx# literal 0 HcmV?d00001 diff --git a/edumed/static/jquery/colorbox/images/ie6/borderMiddleLeft.png b/edumed/static/jquery/colorbox/images/ie6/borderMiddleLeft.png new file mode 100644 index 0000000000000000000000000000000000000000..a2d63d156e008a01fde9d2d68c531c34926a924a GIT binary patch literal 108 zcmeAS@N?(olHy`uVBq!ia0vp^qCm{Z$P6U8=aokQDYgKg5LY1m|NsA`H|O64NtXoq z1vjjXi*^HYL_A#_Ln`7}8#ZzRc@9(l|2O5zVPsZ_d99WHFWm z`2{zujf-{za>PAd978JNY7Z)cbT)5ruP@Q*%6-Zwv5L7-WU|;#pdf>%tDnm{r-UW| Dg{~b` literal 0 HcmV?d00001 diff --git a/edumed/static/jquery/colorbox/images/ie6/borderTopLeft.png b/edumed/static/jquery/colorbox/images/ie6/borderTopLeft.png new file mode 100644 index 0000000000000000000000000000000000000000..f9d458b5bba4a8cb84b9ee39a3844e258c1dcc20 GIT binary patch literal 216 zcmeAS@N?(olHy`uVBq!ia0vp^q9Dw|3?!p1cPs@`>H$6>u0R?qNKH*WfByXT?c0H} z|NsBDZcF_MWbu>)`2{yHR2W1EWLV67bmi? zvo+on5)g6V?RfL6QIf literal 0 HcmV?d00001 diff --git a/edumed/static/jquery/colorbox/images/ie6/borderTopRight.png b/edumed/static/jquery/colorbox/images/ie6/borderTopRight.png new file mode 100644 index 0000000000000000000000000000000000000000..74b8583cfbb2e62a84ef04ba01064ecb4d70e72a GIT binary patch literal 214 zcmeAS@N?(olHy`uVBq!ia0vp^q9Dw|3?!p1cPs@`>H$6>u0R?Sq^70<1<#*9zkU05 zAmji4|I_}5*Z^5PB|(0{4Ga|#78wHb4Xz)Tc+|OiK2SW!)5S5QBChw?MqY;mf#VnJ z^}ggWcLpW1DoZ@PeSjlp!DT5|UGpg|kLp?vt)3@$_tm@JIJ0M=)Av-}@ro0Ud)StJ qkbTcp`HhbYABf8t?|bZq*G4@Nf;!!};89ZJ6T-G@yGywoYi%4?- literal 0 HcmV?d00001 diff --git a/edumed/static/jquery/colorbox/images/loading.gif b/edumed/static/jquery/colorbox/images/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..b4695d811d4f84ed693eff7b5e6b4d61a3e8c48d GIT binary patch literal 9427 zcmb{2c~}$o+BfjYkbx{fLNXyN2~I-9fRL~W0YSqMAPQmvXc3WJ1&c@(6VN-G66{!m#Dz&KKu^y_lMYNSx+iL6S@to6V&NF~*-@fnlUXMN3lYjN{kB{H` zJHPuk6Sp8%7M6_w2=Fri{G0eK0q}qQ6Mu9M|N1`u%P;s)H-1oqA2;E5d+=93<3CK` z#|(Jq2l(X{{QIx*J;k^=2|tA4&mQAH|A_D3iubhP14r@F5d6Jx{6jh3yas$&IP=`6My*}-(7^Ct;HXY;7`Z#qk24xg=aGHLJ^+fh;NYKA2s3Mj^Ptu z;6FaYZyd)j?8Ljal__{%2i~$Cx1{2A8TgJoyfz)LUW&gh#MdBr zz6W0HgFm=||Fs`)%Exb=#T!=P>wWQS2k|@?ygmzG&BNPD@b*pkCnxbDFZ^&h{=q!_ zWF?+%5B%{b_%}Tk z)ktHy2%RxlI5%?6ZY$l%)y35jfZdMF$LOJQuo`5!xq7<<0wEFe!~iNDmRQ*CZa)6) z0GWrehsCg!=jkR4(xXzbtX4ETpjXdtu+U&WRP|3YXlu_B)iZZ=0#*{4B6KTmiGmnj zsbV4N=yD-QamiN_E; zVH?&r%TH4=`CvaO@re)|&d6egk9{2n%lVPd7of}(SV4M46aL@?LE0h(9W?Jl_KBI@ z-F~7hZ1jBTPv3t2$>t>FO^_-WY)duQCv|z9ndY=~Svu6Hr3d(F`3bw!v{nFdSgB1Q6VHd-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7eWzHDL5jf`br;AwX6m1^07xhoe>zgU&cFFZ{=-Yrn@cChM8qp$m- zgaw(?S?V?*v8n&^_g9)k*u}nc0&SGm5vEdY6>76X-autGlc6T@PRe~jfx;k5Hl~Y8 zYm1n=)fT0!al?L{fHmSauT7=9RTe=dmkm*XxZ{?pkp`J&?79QsZ#R+FRnY4xv~xk; zp|)%rg#K0Nj3f(9z@&&Q%TI2l=2azCy>;QN9aWR6Egrt%taf&Ru#+oIE7X%FNyGe2XiOJ~^(EEihIMOWvOkrM&PH^?tlG>3DJ#_1HXGXkfHV969wl3h;rJ7JHeh-gNTvtor)e7uAp zvNv3so6GXzwJDWRF*Ys@{=+@J5eley06d`tAUA%3_qWgc#sst>54GW;?xsz&=w##8 zlJV$W-VXrH7zMa~Do(WYZrF>w^g)trpS`$U$iOT7D!w>xrT`cKdxqE`{ze+F!n`&Jt)3a9XdSEd0L4vg9{RkWc?l< zG5=(g#%*9S6MvXAqKK6u%6Y)1rLQbJY*?0v6!pqj5Ifv|HG!&uQ0sd{ESGC38K|uC|6Kk zGB-S~5wx57+M{%Cq*r5bx~sR(UU{crc4h8@qAkJEl10~!7q>s;6wwG+ x;Lym#%7w)E5SqaM?W?}pgPY2~zL+0j{rLCv$(}1!-+=Zpc)I$ztaD0e0s!7!I-dXl literal 0 HcmV?d00001 diff --git a/edumed/static/jquery/colorbox/images/overlay.png b/edumed/static/jquery/colorbox/images/overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..53ea98f7003cf014cda2f764a7d982e405bd1b5f GIT binary patch literal 182 zcmeAS@N?(olHy`uVBq!ia0vp^av;pY3?xs=ZJr3E3<7*YT>t<7&(6-y!NDOSA|fs> z4iv@@^0LaF09818x;TbZ%z1NeAuof1z|jlq0?ZV)A8h5lQLnD@Q>uGq<+3e(rH8NF wGFLG_IXT618W25kEc*C=-akH|?*IRp8MKNmPAJ`FsRUW)>FVdQ&MBb@0FX~HaR2}S literal 0 HcmV?d00001 diff --git a/edumed/static/jquery/colorbox/jquery.colorbox-min.js b/edumed/static/jquery/colorbox/jquery.colorbox-min.js new file mode 100644 index 0000000..45295d2 --- /dev/null +++ b/edumed/static/jquery/colorbox/jquery.colorbox-min.js @@ -0,0 +1,6 @@ +/*! + jQuery ColorBox v1.4.1 - 2013-02-14 + (c) 2013 Jack Moore - jacklmoore.com/colorbox + license: http://www.opensource.org/licenses/mit-license.php +*/ +(function(e,t,i){function o(i,o,n){var r=t.createElement(i);return o&&(r.id=Y+o),n&&(r.style.cssText=n),e(r)}function n(e){var t=T.length,i=(A+e)%t;return 0>i?t+i:i}function r(e,t){return Math.round((/%/.test(e)?("x"===t?k.width():k.height())/100:1)*parseInt(e,10))}function h(e){return K.photo||K.photoRegex.test(e)}function l(e){return K.retinaUrl&&i.devicePixelRatio>1?e.replace(K.photoRegex,K.retinaSuffix):e}function s(t){e.contains(w[0],t.target)||w[0]===t.target||(t.stopPropagation(),w.focus())}function a(){var t,i=e.data(N,V);null==i?(K=e.extend({},J),console&&console.log&&console.log("Error: cboxElement missing settings object")):K=e.extend({},i);for(t in K)e.isFunction(K[t])&&"on"!==t.slice(0,2)&&(K[t]=K[t].call(N));K.rel=K.rel||N.rel||e(N).data("rel")||"nofollow",K.href=K.href||e(N).attr("href"),K.title=K.title||N.title,"string"==typeof K.href&&(K.href=e.trim(K.href))}function d(i,o){e(t).trigger(i),at.trigger(i),e.isFunction(o)&&o.call(N)}function c(){var e,t,i,o,n,r=Y+"Slideshow_",h="click."+Y;K.slideshow&&T[1]?(t=function(){clearTimeout(e)},i=function(){(K.loop||T[A+1])&&(e=setTimeout(G.next,K.slideshowSpeed))},o=function(){M.html(K.slideshowStop).unbind(h).one(h,n),at.bind(it,i).bind(tt,t).bind(ot,n),w.removeClass(r+"off").addClass(r+"on")},n=function(){t(),at.unbind(it,i).unbind(tt,t).unbind(ot,n),M.html(K.slideshowStart).unbind(h).one(h,function(){G.next(),o()}),w.removeClass(r+"on").addClass(r+"off")},K.slideshowAuto?o():n()):w.removeClass(r+"off "+r+"on")}function u(i){U||(N=i,a(),T=e(N),A=0,"nofollow"!==K.rel&&(T=e("."+Z).filter(function(){var t,i=e.data(this,V);return i&&(t=e(this).data("rel")||i.rel||this.rel),t===K.rel}),A=T.index(N),-1===A&&(T=T.add(N),A=T.length-1)),m.css({opacity:parseFloat(K.opacity),cursor:K.overlayClose?"pointer":"auto",visibility:"visible"}).show(),j||(j=q=!0,w.css({visibility:"hidden",display:"block"}),E=o(dt,"LoadedContent","width:0; height:0; overflow:hidden").appendTo(v),_=x.height()+C.height()+v.outerHeight(!0)-v.height(),z=y.width()+b.width()+v.outerWidth(!0)-v.width(),D=E.outerHeight(!0),B=E.outerWidth(!0),K.w=r(K.initialWidth,"x"),K.h=r(K.initialHeight,"y"),G.position(),lt&&k.bind("resize."+st+" scroll."+st,function(){m.css({width:k.width(),height:k.height(),top:k.scrollTop(),left:k.scrollLeft()})}).trigger("resize."+st),c(),d(et,K.onOpen),P.add(W).hide(),R.html(K.close).show(),w.focus(),t.addEventListener&&(t.addEventListener("focus",s,!0),at.one(nt,function(){t.removeEventListener("focus",s,!0)})),K.returnFocus&&at.one(nt,function(){e(N).focus()})),G.load(!0))}function f(){!w&&t.body&&(X=!1,k=e(i),w=o(dt).attr({id:V,"class":ht?Y+(lt?"IE6":"IE"):"",role:"dialog",tabindex:"-1"}).hide(),m=o(dt,"Overlay",lt?"position:absolute":"").hide(),L=o(dt,"LoadingOverlay").add(o(dt,"LoadingGraphic")),g=o(dt,"Wrapper"),v=o(dt,"Content").append(W=o(dt,"Title"),H=o(dt,"Current"),F=o("button","Previous"),S=o("button","Next"),M=o("button","Slideshow"),L,R=o("button","Close")),g.append(o(dt).append(o(dt,"TopLeft"),x=o(dt,"TopCenter"),o(dt,"TopRight")),o(dt,!1,"clear:left").append(y=o(dt,"MiddleLeft"),v,b=o(dt,"MiddleRight")),o(dt,!1,"clear:left").append(o(dt,"BottomLeft"),C=o(dt,"BottomCenter"),o(dt,"BottomRight"))).find("div div").css({"float":"left"}),I=o(dt,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),P=S.add(F).add(H).add(M),e(t.body).append(m,w.append(g,I)))}function p(){function i(e){e.which>1||e.shiftKey||e.altKey||e.metaKey||(e.preventDefault(),u(this))}return w?(X||(X=!0,S.click(function(){G.next()}),F.click(function(){G.prev()}),R.click(function(){G.close()}),m.click(function(){K.overlayClose&&G.close()}),e(t).bind("keydown."+Y,function(e){var t=e.keyCode;j&&K.escKey&&27===t&&(e.preventDefault(),G.close()),j&&K.arrowKey&&T[1]&&!e.altKey&&(37===t?(e.preventDefault(),F.click()):39===t&&(e.preventDefault(),S.click()))}),e.isFunction(e.fn.on)?e(t).on("click."+Y,"."+Z,i):e("."+Z).live("click."+Y,i)),!0):!1}var m,w,g,v,x,y,b,C,T,k,E,I,L,W,H,M,S,F,R,P,K,_,z,D,B,N,A,O,j,q,U,$,G,Q,X,J={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,className:!1,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",open:!1,returnFocus:!0,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico)((#|\?).*)?$/i,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0},V="colorbox",Y="cbox",Z=Y+"Element",et=Y+"_open",tt=Y+"_load",it=Y+"_complete",ot=Y+"_cleanup",nt=Y+"_closed",rt=Y+"_purge",ht=!e.support.leadingWhitespace,lt=ht&&!i.XMLHttpRequest,st=Y+"_IE6",at=e({}),dt="div";e.colorbox||(e(f),G=e.fn[V]=e[V]=function(t,i){var o=this;if(t=t||{},f(),p()){if(e.isFunction(o))o=e(""),t.open=!0;else if(!o[0])return o;i&&(t.onComplete=i),o.each(function(){e.data(this,V,e.extend({},e.data(this,V)||J,t))}).addClass(Z),(e.isFunction(t.open)&&t.open.call(o)||t.open)&&u(o[0])}return o},G.position=function(e,t){function i(e){x[0].style.width=C[0].style.width=v[0].style.width=parseInt(e.style.width,10)-z+"px",v[0].style.height=y[0].style.height=b[0].style.height=parseInt(e.style.height,10)-_+"px"}var o,n,h,l=0,s=0,a=w.offset();k.unbind("resize."+Y),w.css({top:-9e4,left:-9e4}),n=k.scrollTop(),h=k.scrollLeft(),K.fixed&&!lt?(a.top-=n,a.left-=h,w.css({position:"fixed"})):(l=n,s=h,w.css({position:"absolute"})),s+=K.right!==!1?Math.max(k.width()-K.w-B-z-r(K.right,"x"),0):K.left!==!1?r(K.left,"x"):Math.round(Math.max(k.width()-K.w-B-z,0)/2),l+=K.bottom!==!1?Math.max(k.height()-K.h-D-_-r(K.bottom,"y"),0):K.top!==!1?r(K.top,"y"):Math.round(Math.max(k.height()-K.h-D-_,0)/2),w.css({top:a.top,left:a.left,visibility:"visible"}),e=w.width()===K.w+B&&w.height()===K.h+D?0:e||0,g[0].style.width=g[0].style.height="9999px",o={width:K.w+B+z,height:K.h+D+_,top:l,left:s},0===e&&w.css(o),w.dequeue().animate(o,{duration:e,complete:function(){i(this),q=!1,g[0].style.width=K.w+B+z+"px",g[0].style.height=K.h+D+_+"px",K.reposition&&setTimeout(function(){k.bind("resize."+Y,G.position)},1),t&&t()},step:function(){i(this)}})},G.resize=function(e){j&&(e=e||{},e.width&&(K.w=r(e.width,"x")-B-z),e.innerWidth&&(K.w=r(e.innerWidth,"x")),E.css({width:K.w}),e.height&&(K.h=r(e.height,"y")-D-_),e.innerHeight&&(K.h=r(e.innerHeight,"y")),e.innerHeight||e.height||(E.css({height:"auto"}),K.h=E.height()),E.css({height:K.h}),G.position("none"===K.transition?0:K.speed))},G.prep=function(t){function i(){return K.w=K.w||E.width(),K.w=K.mw&&K.mw1?("string"==typeof K.current&&H.html(K.current.replace("{current}",A+1).replace("{total}",l)).show(),S[K.loop||l-1>A?"show":"hide"]().html(K.next),F[K.loop||A?"show":"hide"]().html(K.previous),K.slideshow&&M.show(),K.preloading&&e.each([n(-1),n(1)],function(){var t,i,o=T[this],n=e.data(o,V);n&&n.href?(t=n.href,e.isFunction(t)&&(t=t.call(o))):t=e(o).attr("href"),t&&(h(t)||n.photo)&&(i=new Image,i.src=t)})):P.hide(),K.iframe?(i=o("iframe")[0],a in i&&(i[a]=0),c in i&&(i[c]="true"),K.scrolling||(i.scrolling="no"),e(i).attr({src:K.href,name:(new Date).getTime(),"class":Y+"Iframe",allowFullScreen:!0,webkitAllowFullScreen:!0,mozallowfullscreen:!0}).one("load",r).appendTo(E),at.one(rt,function(){i.src="//about:blank"}),K.fastIframe&&e(i).trigger("load")):r(),"fade"===K.transition?w.fadeTo(s,1,t):t())},"fade"===K.transition?w.fadeTo(s,0,function(){G.position(0,l)}):G.position(s,l)}},G.load=function(t){var n,s,c,u=G.prep;q=!0,O=!1,N=T[A],t||a(),Q&&w.add(m).removeClass(Q),K.className&&w.add(m).addClass(K.className),Q=K.className,d(rt),d(tt,K.onLoad),K.h=K.height?r(K.height,"y")-D-_:K.innerHeight&&r(K.innerHeight,"y"),K.w=K.width?r(K.width,"x")-B-z:K.innerWidth&&r(K.innerWidth,"x"),K.mw=K.w,K.mh=K.h,K.maxWidth&&(K.mw=r(K.maxWidth,"x")-B-z,K.mw=K.w&&K.w1&&(O.height=O.height/i.devicePixelRatio,O.width=O.width/i.devicePixelRatio),K.scalePhotos&&(s=function(){O.height-=O.height*e,O.width-=O.width*e},K.mw&&O.width>K.mw&&(e=(O.width-K.mw)/O.width,s()),K.mh&&O.height>K.mh&&(e=(O.height-K.mh)/O.height,s())),K.h&&(O.style.marginTop=Math.max(K.mh-O.height,0)/2+"px"),T[1]&&(K.loop||T[A+1])&&(O.style.cursor="pointer",O.onclick=function(){G.next()}),ht&&(O.style.msInterpolationMode="bicubic"),setTimeout(function(){u(O)},1)}),setTimeout(function(){O.src=n},1)):n&&I.load(n,K.data,function(t,i){u("error"===i?o(dt,"Error").html(K.xhrError):e(this).contents())})},G.next=function(){!q&&T[1]&&(K.loop||T[A+1])&&(A=n(1),G.load())},G.prev=function(){!q&&T[1]&&(K.loop||A)&&(A=n(-1),G.load())},G.close=function(){j&&!U&&(U=!0,j=!1,d(ot,K.onCleanup),k.unbind("."+Y+" ."+st),m.fadeTo(200,0),w.stop().fadeTo(300,0,function(){w.add(m).css({opacity:1,cursor:"auto"}).hide(),d(rt),E.empty().remove(),setTimeout(function(){U=!1,d(nt,K.onClosed)},1)}))},G.remove=function(){e([]).add(w).add(m).remove(),w=null,e("."+Z).removeData(V).removeClass(Z),e(t).unbind("click."+Y)},G.element=function(){return e(N)},G.settings=J)})(jQuery,document,window); \ No newline at end of file diff --git a/edumed/static/jquery/colorbox/jquery.colorbox-pl.js b/edumed/static/jquery/colorbox/jquery.colorbox-pl.js new file mode 100644 index 0000000..370cdca --- /dev/null +++ b/edumed/static/jquery/colorbox/jquery.colorbox-pl.js @@ -0,0 +1,16 @@ +/* + jQuery ColorBox language configuration + language: Polski (pl) + translated by: Tomasz Wasiński + site: 2bevisible.pl +*/ +jQuery.extend(jQuery.colorbox.settings, { + current: "{current}. obrazek z {total}", + previous: "Poprzedni", + next: "Następny", + close: "Zamknij", + xhrError: "Nie udało się załadować treści.", + imgError: "Nie udało się załadować obrazka.", + slideshowStart: "rozpocznij pokaz slajdów", + slideshowStop: "zatrzymaj pokaz slajdów" +}); \ No newline at end of file -- 2.20.1