[dev] [commit] r992 - in wwwbase: . admin img/colorbox img/lightbox js styles
automailer at dexonline.ro
automailer at dexonline.ro
Sat Sep 21 00:21:06 EEST 2013
Author: grigoroiualex
Date: Sat Sep 21 00:21:06 2013
New Revision: 992
Log:
First version of gallery. Currently supports only one image/lexeme
Added:
wwwbase/img/colorbox/
wwwbase/img/colorbox/controls.png (contents, props changed)
wwwbase/img/colorbox/loading.gif (contents, props changed)
wwwbase/js/dexGallery.js
wwwbase/js/jcanvas.min.js
wwwbase/js/jquery.colorbox-min.js
wwwbase/styles/colorbox.css
Deleted:
wwwbase/img/lightbox/
wwwbase/js/lightbox-2.6.min.js
wwwbase/styles/lightbox.css
Modified:
wwwbase/admin/visual.php
wwwbase/search.php
wwwbase/styles/flex.css
wwwbase/styles/zepu.css
Modified: wwwbase/admin/visual.php
==============================================================================
--- wwwbase/admin/visual.php Fri Sep 20 10:23:38 2013 (r991)
+++ wwwbase/admin/visual.php Sat Sep 21 00:21:06 2013 (r992)
@@ -2,7 +2,7 @@
require_once("../../phplib/util.php");
//util_assertModerator(PRIV_VISUAL);
util_assertNotMirror();
-RecentLink::createOrUpdate('Imagini Definiții');
+RecentLink::createOrUpdate('Adăugare imagini definiții');
SmartyWrap::assign('sectionTitle', 'Imagini pentru definiții');
SmartyWrap::addCss('elfinder', 'jqueryui');
Added: wwwbase/img/colorbox/controls.png
==============================================================================
Binary file. No diff available.
Added: wwwbase/img/colorbox/loading.gif
==============================================================================
Binary file. No diff available.
Added: wwwbase/js/dexGallery.js
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ wwwbase/js/dexGallery.js Sat Sep 21 00:21:06 2013 (r992)
@@ -0,0 +1,114 @@
+$(document).ready(function() {
+ $('.colorbox').colorbox({
+ maxWidth: '84%', maxHeight: '84%',
+ onComplete: function() {addCanvas(); drawOnCanvas();},
+ onCleanup: function() {removeCanvas();}
+ });
+});
+
+/* Adaugă elementul canvas odată ce s-a încărcat pluginul */
+function addCanvas() {
+ var img = $('.cboxPhoto');
+ var canvasElement = document.createElement('canvas');
+
+ document.getElementById('cboxLoadedContent').appendChild(canvasElement);
+
+ $('canvas').css('position', 'absolute').css('top', '5px').css('left', '5px')
+ .attr('width', img.css('width')).attr('height', img.css('height'));
+}
+
+/* Șterge conținutul desenat pe canvas și apoi șterge elementul */
+function removeCanvas() {
+ var canvasElement = document.getElementsByTagName('canvas')[0];
+
+ $(canvasElement).clearCanvas();
+ canvasElement.parentNode.removeChild(canvasElement);
+}
+
+function drawOnCanvas() {
+ var canvas = $('canvas');
+ var title = $('#cboxTitle').html();
+ var tags = $('#' + title).children();
+
+ if(tags.length){
+ var data = new Array();
+ var dim = JSON.parse('[' + tags[0].innerHTML + ']');
+ var widthScale = parseInt(canvas.attr('width')) / dim[0];
+ var heightScale = parseInt(canvas.attr('height')) / dim[1];
+
+ for(var i = 1; i < tags.length; i++){
+ var data = JSON.parse('[' + tags[i].innerHTML + ']');
+
+ data[0] *= widthScale; data[2] *= widthScale;
+ data[1] *= heightScale; data[3] *= heightScale;
+ drawTag(canvas, i, data);
+ }
+
+ /* Șterge primul text, care are doar caracter orientativ */
+ canvas.removeLayerGroup('Pre');
+ }
+}
+
+function drawTag(canvas, tagNo, tagData) {
+ var tagNamePadding = 10;
+ var tagNameMaxWidth = 100;
+
+ /* Scrie textul pentru a stabili dimensiunea lui */
+ canvas.drawText({
+ layer: true,
+ name: 'pre' + tagNo,
+ groups: ['Pre'],
+ fromCenter: true,
+ strokeStyle: '#fff',
+ strokeWidth: 2,
+ fontSize: 12,
+ fontFamily: 'Calibri',
+ text: tagData[4],
+ maxWidth: tagNameMaxWidth,
+ x: tagData[0], y: tagData[1],
+ })
+
+ /* Trage linia între cele două puncte */
+ .drawLine({
+ layer: true,
+ name: 'tag' + tagNo,
+ groups: ['Tags'],
+ strokeStyle: '#000',
+ strokeWidth: 1,
+ x1: tagData[0], y1: tagData[1],
+ x2: tagData[2], y2: tagData[3]
+ })
+
+ /* Desenează un dreptungi de dimensiunea textului + un delta */
+ .drawRect({
+ layer: true,
+ name: 'tagBackground' + tagNo,
+ groups: ['TagsBackground'],
+ fromCenter: true,
+ fillStyle: '#fff',
+ x: tagData[0], y: tagData[1],
+ width: canvas.measureText('pre' + tagNo).width + tagNamePadding,
+ height: canvas.measureText('pre' + tagNo).height + tagNamePadding
+ })
+
+ /* Rescrie textul în pătrat */
+ .drawText({
+ layer: true,
+ name: 'tagName' + tagNo,
+ groups: ['TagNames'],
+ fromCenter: true,
+ fillStyle: '#000',
+ strokeWidth: 2,
+ fontSize: 12,
+ fontFamily: 'Calibri',
+ text: tagData[4],
+ maxWidth: tagNameMaxWidth,
+ x: tagData[0], y: tagData[1],
+ cursors: {
+ mouseover: 'pointer'
+ },
+ click: function() {
+ window.open('http://www.dexonline.ro/definitie/' + tagData[4], '_self');
+ }
+ });
+}
\ No newline at end of file
Added: wwwbase/js/jcanvas.min.js
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ wwwbase/js/jcanvas.min.js Sat Sep 21 00:21:06 2013 (r992)
@@ -0,0 +1,5 @@
+/**
+ * jCanvas v13.08.26
+ * Copyright 2013 Caleb Evans
+ * Released under the MIT license
+ */(function(e,t,n,r,i,s,o,u,a){function An(e){var t=this;cn(t,e);return t}function On(e){e?cn(An.prototype,e):On.prefs=An.prototype=cn({},ln);return this}function Mn(e){return pn(e)==="string"}function _n(e){return e&&e[A]?e[A]("2d"):u}function Dn(e){e=cn({},e);e.masks=e.masks[Y](0);return e}function Pn(e,t){var n;e.save();n=Dn(t[p]);t[O].push(n)}function Hn(e,t){if(t[O][f]===0)t[p]=Dn(Cn);else{e[ht]();t[p]=t[O].pop()}}function Bn(e,t,n){dn(n[b])?t[b]=n[b][L](e,n):t[b]=n[b];dn(n[T])?t[T]=n[T][L](e,n):t[T]=n[T];t.lineWidth=n[yt];if(n.rounded)t.lineCap=t.lineJoin="round";else{t.lineCap=n.strokeCap;t.lineJoin=n.strokeJoin;t.miterLimit=n.miterLimit}t.shadowOffsetX=n.shadowX;t.shadowOffsetY=n.shadowY;t[xt]=n[xt];t[v]=n[v];t.globalAlpha=n.opacity;t.globalCompositeOperation=n.compositing;n[jt]&&(t.webkitImageSmoothingEnabled=t.mozImageSmoothingEnabled=n[jt])}function jn(e,t,n){if(n.mask){n[wt]&&Pn(e,t);e.clip();t[p].masks.push(n._args)}}function Fn(e,t){t._transformed&&e[ht]()}function In
(e,t,n){var r;n[ct]&&t[z]();if(n.shadowStroke&&n[yt]!==0){t.stroke();t.fill();t[v]=h;t[xt]=0;t.stroke()}else{t.fill();n[b]!==h&&(t[v]=h);n[yt]!==0&&t.stroke()}n[ct]||t[z]();Fn(t,n);if(n.mask){r=Wn(e);jn(t,r,n)}}function qn(e,t,n){t[B]=t[At]?mn/180:1;e[S](t.x,t.y);e[lt](t[lt]*t[B]);e[S](-t.x,-t.y);n[lt]+=t[lt]*t[B]}function Rn(e,t,n){t.scale!==1&&(t[ft]=t[pt]=t.scale);e[S](t.x,t.y);e.scale(t[ft],t[pt]);e[S](-t.x,-t.y);n[ft]*=t[ft];n[pt]*=t[pt]}function Un(e,t,n){t[S]&&(t[j]=t[H]=t[S]);e[S](t[j],t[H]);n[j]+=t[j];n[H]+=t[H]}function zn(e,t,n,r,i){n[B]=n[At]?mn/180:1;n._transformed=s;t.save();i===a&&(i=r);if(!n.fromCenter&&!n._centered){n.x+=r/2;n.y+=i/2;n._centered=s}n[lt]&&qn(t,n,{});(n.scale!==1||n[ft]!==1||n[pt]!==1)&&Rn(t,n,{});(n[S]||n[j]||n[H])&&Un(t,n,{})}function Wn(t){var n;if(xn._canvas===t&&xn._data)n=xn._data;else{n=e.data(t,ut);if(!n){n={canvas:t,layers:[],layer:{names:{},groups:{}},intersecting:[],lastIntersected:u,cursor:e(t).css(mt),drag:{},event:{type:u,x:u,y:u},events
:{},transforms:Dn(Cn),savedTransforms:[],animating:o,animated:u,pos:0,pixelRatio:1,scaled:!1};e.data(t,ut,n)}xn._canvas=t;xn._data=n}return n}function Xn(e,t,n){var r;for(r in On[F])On[F][tn](r)&&(n[r]||n[Et]&&n[Et][r])&&Vn(e,t,n,r)}function Vn(e,t,n,r){r=ur(r);On[F][r](e,t);n[E]=s}function $n(e,t,n){var r,i,o;if(n[Ct]||n[mt]||n[Et]){r=[U,D,ot];for(o=0;o<r[f];o+=1){i=r[o];Vn(e,t,n,i)}if(!t[F].mouseoutdrag){e.bind("mouseout.jCanvas",function(){var n=t[sn][k];if(n){t[sn]={};n.dragcancel&&n.dragcancel[L](e[0],n);e[P]()}});t[F].mouseoutdrag=s}n[E]=s}}function Jn(e,t,n,r){var i=t[k].names;r?r[W]!==a&&Mn(n[W])&&n[W]!==r[W]&&delete i[n[W]]:r=n;Mn(r[W])&&(i[r[W]]=n)}function Kn(e,t,n,r){var i=t[k][d],s,o,l,c,h;if(n[Kt]!==u){n[d]=[n[Kt]];n[Ot]&&(n[dt]=[n[Kt]])}if(r&&r[Kt]!==a)if(r[Kt]===u)r[d]=u;else{r[d]=[r[Kt]];r[Ot]&&(r[dt]=[r[Kt]])}if(!r)r=n;else if(r[d]!==a&&n[d]!==u)for(l=0;l<n[d][f];l+=1){o=n[d][l];s=i[o];if(s){for(h=0;h<s[f];h+=1)if(s[h]===n){c=h;s[m](h,1);break}s[f]===0&&delete i[o]
}}if(r[d]!==a&&r[d]!==u)for(l=0;l<r[d][f];l+=1){o=r[d][l];s=i[o];if(!s){s=i[o]=[];s[W]=o}c===a&&(c=s[f]);s[m](c,0,n)}}function Qn(e){var t,n,r;t={};for(n=e[$][f]-1;n>=0;n-=1){t=e[$][n];if(t[Xt]){for(r=t[Xt][f]-1;r>=0;r-=1)if(!t[Xt][r][X]){t[X]=o;break}if(t[X])break}}return t}function Gn(e,t,n,r){if(n&&n[w]&&n[V]){r?n._next=r:n._next=u;n[V][L](e,n)}}function Yn(e,t,n){var r,i,u,a,l,c,h,p;a=t[sn];i=a[k];l=i[dt]||[];r=t[Vt];if(n===D||n===vt){if(!a[_t]){a[_t]=s;if(i.bringToFront){r[m](i[_],1);i[_]=r.push(i)}for(p=0;p<l[f];p+=1){h=l[p];c=t[k][d][h];if(i[d]&&c)for(u=0;u<c[f];u+=1)if(c[u]!==i){c[u][Lt]=c[u].x;c[u][kt]=c[u].y;c[u]._endX=i[st];c[u]._endY=i[it];if(c[u].bringToFront){c[u][_]=hn(c[u],r);r[m](c[u][_],1);r[m](-1,0,c[u]);c[u][_]=r[f]-2}c[u][Mt]&&c[u][Mt][L](e[0],c[u])}}a[Lt]=i[Lt]=i.x;a[kt]=i[kt]=i.y;a._endX=i._endX=i[st];a._endY=i._endY=i[it];Zn(e,i,Mt)}i.x=i[st]-(a._endX-a[Lt]);i.y=i[it]-(a._endY-a[kt]);for(p=0;p<l[f];p+=1){h=l[p];c=t[k][d][h];if(i[d]&&c)for(u=0;u<c[f];u+=1)if(c
[u]!==i){c[u].x=i[st]-(c[u]._endX-c[u][Lt]);c[u].y=i[it]-(c[u]._endY-c[u][kt]);c[u][sn]&&c[u][sn][L](e[0],c[u])}}Zn(e,i,sn)}else if(n===ot||n===St){if(a[_t]){Zn(e,i,Rt);a[_t]=o}for(p=0;p<l[f];p+=1){h=l[p];c=t[k][d][h];if(i[d]&&c)for(u=0;u<c[f];u+=1)c[u]!==i&&c[u][Rt]&&c[u][Rt][L](e[0],c[u])}t[sn]={}}}function Zn(e,t,n,r){r||(t[Et]?r=t[Et][n]:r=t[mt]);r&&e.css({cursor:r});t[n]&&t[n][L](e[0],t)}function er(t,n,r,i){var o,a,l=n,c;n._args=r;n.canvas=t;if(n[Ct]||n[dt]){n[k]=s;n[Ct]=s}i?n[V]=i:n.method?n[V]=e.fn[n.method]:n.type?n[V]=e.fn[Sn[n.type]]:n[V]=function(){};if(n[k]&&!n._layer){o=e(t);a=o[C]();c=Wn(t);l=new An(n);l[k]=s;l._layer=s;Jn(o,c,l);Kn(o,c,l);Xn(o,c,l);$n(o,c,l);n[E]=l[E];l[_]===u&&(l[_]=a[f]);a[m](l[_],0,l)}return l}function tr(e){var t,n;for(n=0;n<kn[f];n+=1){t=kn[n];e[t]=e["_"+t]}}function nr(e,t){var n,r;for(r=0;r<kn[f];r+=1){n=kn[r];e["_"+n]=e[n];Ln[n]=s;t&&delete e[n]}}function rr(e,t,n){var r;for(r in n)n[tn](r)&&dn(n[r])&&(n[r]=n[r][L](e,t,r));return n}function i
r(n){var r,s,o=[],u=1;if(n[nn](/^#?\w+$/gi)){n===h&&(n="rgba(0,0,0,0)");s=t.head;r=s[Tt][qt];s[Tt][qt]=n;n=e.css(s,qt);s[Tt][qt]=r}if(n[nn](/^rgb/gi)){o=n[nn](/\d+/gi);n[nn](/%/gi)&&(u=2.55);o[0]*=u;o[1]*=u;o[2]*=u;o[3]!==a?o[3]=i(o[3]):o[3]=1}return o}function sr(e){var t=3,n;if(pn(e[q])!=="array"){e[q]=ir(e[q]);e.end=ir(e.end)}e.now=[];if(e[q][3]!==1||e.end[3]!==1)t=4;for(n=0;n<t;n+=1){e.now[n]=e[q][n]+(e.end[n]-e[q][n])*e.pos;n<3&&(e.now[n]=vn(e.now[n]))}if(e[q][3]!==1||e.end[3]!==1)e.now="rgba("+e.now.join(",")+")";else{e.now[Y](0,3);e.now="rgb("+e.now.join(",")+")"}e.elem.nodeName?e.elem[Tt][e.prop]=e.now:e.elem[e.prop]=e.now}function or(t){var n;for(n=0;n<t[f];n+=1)e.fx.step[t[n]]=sr}function ur(e){window.ontouchstart!==undefined&&wn[e]&&(e=wn[e]);return e}function ar(e){En[e]&&(e=En[e]);return e}function fr(e){On[F][e]=function(t,n){var r,i;i=n[G];r=e===K||e===nt?D:e;if(!n[F][r]){t.bind(r+".jCanvas",function(e){i.x=e[Jt];i.y=e.offsetY;i.type=r;i[G]=e;t[P]({resetFire:s});e.pre
ventDefault()});n[F][r]=s}}}function lr(e){var t;for(t=0;t<e[f];t+=1)fr(e[t])}function cr(e,t,n){var r,i,s,o,a,f,l,c;r=n._args;if(r[E]){i=Wn(e);s=i[G];if(s.x!==u&&s.y!==u){f=s.x*i[It];l=s.y*i[It];o=t.isPointInPath(f,l)||t[Qt]&&t[Qt](f,l)}a=i[p];r.eventX=r.mouseX=s.x;r.eventY=r.mouseY=s.y;r[G]=s[G];c=i[p][lt];f=r.eventX;l=r.eventY;if(c!==0){r[st]=f*yn(-c)-l*gn(-c);r[it]=l*yn(-c)+f*gn(-c)}else{r[st]=f;r[it]=l}r[st]/=a[ft];r[it]/=a[pt];o&&i[$].push(r);r[X]=o}}function hr(e,t){isNaN(Number(t[N]))||(t[N]+="px");e.font=t[Wt]+" "+t[N]+" "+t[Bt]}function pr(t,n,r,s){var o,u,a;if(Tn.text===r.text&&Tn[Wt]===r[Wt]&&Tn[N]===r[N]&&Tn[Bt]===r[Bt]&&Tn[Ht]===r[Ht]&&Tn[rt]===r[rt]){r[c]=Tn[c];r[l]=Tn[l]}else{r[c]=n[I](s[0])[c];for(a=1;a<s[f];a+=1){u=n[I](s[a])[c];u>r[c]&&(r[c]=u)}o=t[Tt][N];t[Tt][N]=r[N];r[l]=i(e.css(t,N))*s[f]*r[rt];t[Tt][N]=o}}function dr(e,t){var n=t.text,r=t[Ht],i=n.split(" "),s,o=[],u="";if(i[f]===1||e[I](n)[c]<r)o=[n];else{for(s=0;s<i[f];s+=1){if(e[I](u+i[s])[c]>r){u!==""&&o.p
ush(u);u=""}u+=i[s];s!==i[f]-1&&(u+=" ")}o.push(u)}o=o.join("\n").replace(/( (\n))|( $)/gi,"$2").split("\n");return o}var f="length",l="height",c="width",h="transparent",p="transforms",d="groups",v="shadowColor",m="splice",g="beginPath",y="getLayer",b="fillStyle",w="visible",E="_event",S="translate",x="getLayerGroup",T="strokeStyle",N="fontSize",C="getLayers",k="layer",L="call",A="getContext",O="savedTransforms",M="sHeight",_="index",D="mousemove",P="drawLayers",H="translateY",B="_toRad",j="translateX",F="events",I="measureText",q="start",R="sWidth",U="mousedown",z="closePath",W="name",X="intersects",V="_method",$="intersecting",J="drawImage",K="mouseover",Q="radius",G="event",Y="slice",Z="lineTo",et="lastIntersected",tt="animating",nt="mouseout",rt="lineHeight",it="_eventY",st="_eventX",ot="mouseup",ut="jCanvas",at="touchstart",ft="scaleX",lt="rotate",ct="closed",ht="restore",pt="scaleY",dt="dragGroups",vt="touchmove",mt="cursor",gt="setLayer",yt="strokeWidth",bt="bezierCurveTo",wt
="autosave",Et="cursors",St="touchend",xt="shadowBlur",Tt="style",Nt="_fired",Ct="draggable",kt="_startY",Lt="_startX",At="inDegrees",Ot="dragGroupWithLayer",Mt="dragstart",_t="dragging",Dt="animated",Pt="_hovered",Ht="maxWidth",Bt="fontFamily",jt="imageSmoothing",Ft="_animating",It="pixelRatio",qt="color",Rt="dragstop",Ut="<canvas />",zt="drawQuadratic",Wt="fontStyle",Xt="_masks",Vt="layers",$t="concavity",Jt="offsetX",Kt="group",Qt="isPointInStroke",Gt="moveTo",Yt="drawPolygon",Zt="drawEllipse",en="load",tn="hasOwnProperty",nn="match",rn="drawVector",sn="drag",on="complete",un="drawBezier",an="restoreCanvas",fn="createPattern",ln,cn=e.extend,hn=e.inArray,pn=e.type,dn=e.isFunction,vn=r.round,mn=r.PI,gn=r.sin,yn=r.cos,bn=e[G].fix,wn,En,Sn,xn={},Tn={},Nn={},Cn={rotate:0,scaleX:1,scaleY:1,translateX:0,translateY:0,masks:[]},kn,Ln;e.fn[ut]=On;On[F]={};ln={align:"center",autosave:s,baseline:"middle",bringToFront:o,ccw:o,closed:o,compositing:"source-over",concavity:0,cornerRadius:0,count
:1,cropFromCenter:s,cursor:u,cursors:u,disableEvents:o,draggable:o,dragGroups:u,group:u,groups:u,data:{},each:u,end:360,fillStyle:h,fontStyle:"normal",fontSize:"12pt",fontFamily:"sans-serif",fromCenter:s,fn:u,height:u,imageSmoothing:s,inDegrees:s,index:u,lineHeight:1,layer:o,load:u,mask:o,maxWidth:u,miterLimit:10,name:u,opacity:1,r1:u,r2:u,radius:0,repeat:"repeat",respectAlign:o,rotate:0,rounded:o,scale:1,scaleX:1,scaleY:1,shadowBlur:0,shadowColor:h,shadowStroke:!1,shadowX:0,shadowY:0,sHeight:u,sides:0,source:"",spread:0,start:0,strokeCap:"butt",strokeJoin:"miter",strokeStyle:h,strokeWidth:1,sWidth:u,sx:u,sy:u,text:"",translate:0,translateX:0,translateY:0,type:u,visible:s,width:u,x:0,y:0};On();On.extend=function(n){On.defaults=cn(ln,n.props);On();n[W]&&(e.fn[n[W]]=function r(e){var t=this,i,s,o,u,a;for(s=0;s<t[f];s+=1){i=t[s];o=_n(i);if(o){u=new An(e);a=er(i,u,e,r);Bn(i,o,u);n.fn[L](i,o,u)}}return t});return e.fn[n[W]]};e.fn[C]=function(t){var n=this[0],r,i,s,o=[];if(n&&n[A]){r=Wn(n
);i=r[Vt];if(dn(t))for(s=0;s<i[f];s+=1)t[L](n,i[s])&&o.push(i[s]);else o=i}return o};e.fn[y]=function(t){var n=this[0],r=Wn(n),i=r[Vt],s=pn(t),o,u;if(t&&t[k])o=t;else if(s==="number"){t<0&&(t=i[f]+t);o=i[t]}else if(s==="regexp"){for(u=0;u<i[f];u+=1)if(Mn(i[u][W])&&i[u][W][nn](t)){o=i[u];break}}else o=r[k].names[t];return o};e.fn[x]=function(t){var n=pn(t),r,i,s,o;if(n==="array")return t;if(n==="regexp"){o=Wn(this[0]);r=o[d];for(i in r)if(i[nn](t)){s=r[i];break}}else{o=Wn(this[0]);s=o[k][d][t]}return s};e.fn.getLayerIndex=function(t){var n=this,r=n[C](),i=n[y](t);return hn(i,r)};e.fn[gt]=function(n,r){var i=this,s,o,u,l;for(o=0;o<i[f];o+=1){s=e(i[o]);u=Wn(i[o]);l=e(i[o])[y](n);if(l){Jn(s,u,l,r);Kn(s,u,l,r);r[_]!==a&&s.moveLayer(l,r[_]);cn(l,r);Xn(s,u,l);$n(s,u,l)}}return i};e.fn.setLayerGroup=function(n,r){var i=this,s,o,u,a;for(o=0;o<i[f];o+=1){s=e(i[o]);u=s[x](n);if(u)for(a=0;a<u[f];a+=1)s[gt](u[a],r)}return i};e.fn.setLayers=function(n){var r=this,i,s,o,u;for(s=0;s<r[f];s+=1){i=e(
r[s]);o=i[C]();for(u=0;u<o[f];u+=1)i[gt](o[u],n)}return r};e.fn.moveLayer=function(n,r){var i=this,s,o,u,a;for(o=0;o<i[f];o+=1){s=e(i[o]);u=s[C]();a=s[y](n);if(a){a[_]=hn(a,u);u[m](a[_],1);u[m](r,0,a);r<0&&(r=u[f]+r);a[_]=r}}return i};e.fn.removeLayer=function(n){var r=this,i,s,o,a,l;for(s=0;s<r[f];s+=1){i=e(r[s]);o=Wn(r[s]);a=i[C]();l=i[y](n);if(l){l[_]=hn(l,a);a[m](l[_],1);Jn(i,o,l,{name:u});Kn(i,o,l,{groups:u})}}return r};e.fn.removeLayerGroup=function(n){var r=this,i,s,o,l,c,h,p;if(n!==a)for(s=0;s<r[f];s+=1){i=e(r[s]);o=Wn(r[s]);l=i[C]();c=i[x](n);if(c){for(p=0;p<c[f];p+=1){h=c[p];h[_]=hn(h,l);l[m](h[_],1);Jn(i,o,h,{name:u})}delete o[k][d][c[W]]}}return r};e.fn.removeLayers=function(){var n=this,r,i,s;for(i=0;i<n[f];i+=1){r=e(n[i]);s=Wn(n[i]);s[Vt][f]=0;s[k].names={};s[k][d]={}}return n};e.fn.addLayerToGroup=function(n,r){var i=this,s,o,u,a=[];for(o=0;o<i[f];o+=1){s=e(i[o]);u=s[y](n);if(u[d]&&hn(r,u[d])===-1){a=u[d][Y](0);a.push(r);s[gt](u,{groups:a})}}return i};e.fn.removeLayer
FromGroup=function(n,r){var i=this,s,o,u,a=[],l;for(o=0;o<i[f];o+=1){s=e(i[o]);u=s[y](n);l=hn(r,u[d]);if(l!==-1){a=u[d][Y](0);a[m](l,1);s[gt](u,{groups:a})}}return i};e.fn.drawLayer=function(n){var r=this,i,s,o,u;for(i=0;i<r[f];i+=1){o=e(r[i]);s=_n(r[i]);u=o[y](n);Gn(o,s,u)}return r};e.fn[P]=function(n){var r=this,i,a,l,c=cn({},n),h,d,v,m,g,y,b,S,x;c[_]||(c[_]=0);for(a=0;a<r[f];a+=1){i=e(r[a]);l=_n(r[a]);if(l){y=Wn(r[a]);c.clear!==o&&i.clearCanvas();h=y[Vt];for(m=c[_];m<h[f];m+=1){d=h[m];d[_]=m;c.resetFire&&(d[Nt]=o);d[E]=!d.disableEvents;Gn(i,l,d,m+1);d[Xt]=y[p].masks[Y](0);if(d[V]===e.fn[J]&&d[w])break}g=m;d=Qn(y);b=y[G];S=b.type;d[S]||(S=ar(S));x=y[sn];v=y[et];if(v!==u&&d!==v&&v[Pt]&&!v[Nt]){y[et]=u;v[Nt]=s;v[Pt]=o;Zn(i,v,nt,y[mt])}if(d[E]&&d[X]){y[et]=d;if(d[K]||d[nt]||d[mt]||d[Et])if(!d[Pt]&&!d[Nt]){d[Nt]=s;d[Pt]=s;Zn(i,d,K)}if(!d[Nt]){d[Nt]=s;b.type=u;Zn(i,d,S)}d[Ct]&&(S===U||S===at)&&(x[k]=d)}x[k]&&Yn(i,y,S);if(g===h[f]){y[$][f]=0;y[p]=Dn(Cn);y[O][f]=0}}}return r};e.fn.addLay
er=function(t){var n=this,r,i,o;for(r=0;r<n[f];r+=1){i=_n(n[r]);if(i){o=new An(t);o[k]=s;er(n[r],o,t)}}return n};kn=[c,l,"opacity",rt];Ln={};e.fn.animateLayer=function(){function v(e,t,n){return function(){tr(n);(!t[tt]||t[Dt]===n)&&e[P]();c[4]&&c[4][L](e[0],n);n[Ft]=o;t[tt]=o;t[Dt]=u}}function g(e,t,n){return function(r,i){if(t.pos!==i.pos){t.pos=i.pos;tr(n);if(!n[Ft]&&!t[tt]){n[Ft]=s;t[tt]=s;t[Dt]=n}(!t[tt]||t[Dt]===n)&&e[P]();c[5]&&c[5][L](e[0],r,i,n)}}}var n=this,r,i,l,c=[][Y][L](arguments,0),h,p,d;if(pn(c[2])==="object"){c[m](2,0,c[2].duration||u);c[m](3,0,c[3].easing||u);c[m](4,0,c[4].done||c[4][on]||u);c[m](5,0,c[5].step||u)}else{if(c[2]===a){c[m](2,0,u);c[m](3,0,u);c[m](4,0,u)}else if(dn(c[2])){c[m](2,0,u);c[m](3,0,u)}if(c[3]===a){c[3]=u;c[m](4,0,u)}else dn(c[3])&&c[m](3,0,u)}for(i=0;i<n[f];i+=1){r=e(n[i]);l=_n(n[i]);if(l){h=Wn(n[i]);p=r[y](c[0]);if(p&&p[V]!==e.fn.draw){d=cn({},c[1]);d=rr(n[i],p,d);nr(d,s);nr(p);p[Tt]=Ln;e(p).animate(d,{duration:c[2],easing:e.easing[c[3]]?c[
3]:u,complete:v(r,h,p),step:g(r,h,p)})}}}return n};e.fn.animateLayerGroup=function(n){var r=this,i,s,o=[][Y][L](arguments,0),u,a;for(s=0;s<r[f];s+=1){i=e(r[s]);u=i[x](n);if(u)for(a=0;a<u[f];a+=1)i.animateLayer.apply(i,[u[a]].concat(o[Y](1)))}return r};e.fn.delayLayer=function(n,r){var i=this,s,o;r=r||0;for(s=0;s<i[f];s+=1){o=e(i[s])[y](n);e(o).delay(r)}return i};e.fn.delayLayerGroup=function(n,r){var i=this,s,o,u,a,l;r=r||0;for(o=0;o<i[f];o+=1){s=e(i[o]);u=s[x](n);if(u)for(l=0;l<u[f];l+=1){a=u[l];a&&e(a).delay(r)}}return i};e.fn.stopLayer=function(n,r){var i=this,s,o,u;for(o=0;o<i[f];o+=1){s=e(i[o]);u=s[y](n);u&&e(u).stop(r)}return i};e.fn.stopLayerGroup=function(n,r){var i=this,s,o,u,a,l;for(o=0;o<i[f];o+=1){s=e(i[o]);u=s[x](n);if(u)for(l=0;l<u[f];l+=1){a=u[l];a&&e(a).stop(r)}}return i};or([qt,"backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor",b,"outlineColor",T,v]);wn={mousedown:at,mouseup:St,mousemove:vt};En={touchstart:U,tou
chend:ot,touchmove:D};lr(["click","dblclick",U,ot,D,K,nt,at,vt,St]);e[G].fix=function(t){var n,r,i;t=bn[L](e[G],t);r=t.originalEvent;if(r){i=r.changedTouches;if(t.pageX!==a&&t[Jt]===a){n=e(t.target).offset();if(n){t[Jt]=t.pageX-n.left;t.offsetY=t.pageY-n.top}}else if(i){n=e(r.target).offset();if(n){t[Jt]=i[0].pageX-n.left;t.offsetY=i[0].pageY-n.top}}}return t};Sn={arc:"drawArc",bezier:un,ellipse:Zt,"function":"draw",image:J,line:"drawLine",polygon:Yt,slice:"drawSlice",quadratic:zt,rectangle:"drawRect",text:"drawText",vector:rn};e.fn.draw=function vr(t){var n=this,r,i,s,o,u;if(Sn[o.type])n[Sn[o.type]](o);else for(i=0;i<n[f];i+=1){r=e(n[i]);s=_n(n[i]);if(s){o=new An(t);u=er(n[i],o,t,vr);o[w]&&o.fn&&o.fn[L](n[i],s,o)}}return n};e.fn.clearCanvas=function(t){var n=this,r,i,s=new An(t);for(r=0;r<n[f];r+=1){i=_n(n[r]);if(i)if(s[c]===u||s[l]===u){i.save();i.setTransform(1,0,0,1,0,0);i.clearRect(0,0,n[r][c],n[r][l]);i[ht]()}else{zn(n[r],i,s,s[c],s[l]);i.clearRect(s.x-s[c]/2,s.y-s[l]/2,s[c],s
[l]);i[ht]()}}return n};e.fn.saveCanvas=function mr(e){var t=this,n,r,i,s,o,u;for(n=0;n<t[f];n+=1){r=_n(t[n]);if(r){o=Wn(t[n]);i=new An(e);s=er(t[n],i,e,mr);for(u=0;u<i.count;u+=1)Pn(r,o)}}return t};e.fn[an]=function gr(e){var t=this,n,r,i,s,o,u;for(n=0;n<t[f];n+=1){r=_n(t[n]);if(r){o=Wn(t[n]);i=new An(e);s=er(t[n],i,e,gr);for(u=0;u<i.count;u+=1)Hn(r,o)}}return t};e.fn.restoreCanvasOnRedraw=function(t){var n=this,r=cn({},t);r[k]=s;n[an](r);return n};e.fn.rotateCanvas=function yr(e){var t=this,n,r,i,s,o;for(n=0;n<t[f];n+=1){r=_n(t[n]);if(r){o=Wn(t[n]);i=new An(e);s=er(t[n],i,e,yr);i[wt]&&Pn(r,o);qn(r,i,o[p])}}return t};e.fn.scaleCanvas=function br(e){var t=this,n,r,i,s,o;for(n=0;n<t[f];n+=1){r=_n(t[n]);if(r){o=Wn(t[n]);i=new An(e);s=er(t[n],i,e,br);i[wt]&&Pn(r,o);Rn(r,i,o[p])}}return t};e.fn.translateCanvas=function wr(e){var t=this,n,r,i,s,o;for(n=0;n<t[f];n+=1){r=_n(t[n]);if(r){o=Wn(t[n]);i=new An(e);s=er(t[n],i,e,wr);i[wt]&&Pn(r,o);Un(r,i,o[p])}}return t};e.fn.drawRect=function Er
(e){var t=this,n,r,i,u,a,h,p,d,v;for(n=0;n<t[f];n+=1){r=_n(t[n]);if(r){i=new An(e);u=er(t[n],i,e,Er);if(i[w]){Bn(t[n],r,i);zn(t[n],r,i,i[c],i[l]);r[g]();a=i.x-i[c]/2;h=i.y-i[l]/2;v=i.cornerRadius;if(v){i[ct]=s;p=i.x+i[c]/2;d=i.y+i[l]/2;p-a-2*v<0&&(v=(p-a)/2);d-h-2*v<0&&(v=(d-h)/2);r[Gt](a+v,h);r[Z](p-v,h);r.arc(p-v,h+v,v,3*mn/2,mn*2,o);r[Z](p,d-v);r.arc(p-v,d-v,v,0,mn/2,o);r[Z](a+v,d);r.arc(a+v,d-v,v,mn/2,mn,o);r[Z](a,h+v);r.arc(a+v,h+v,v,mn,3*mn/2,o)}else r.rect(a,h,i[c],i[l]);i[E]&&cr(t[n],r,i);In(t[n],r,i)}}}return t};e.fn.drawArc=function Sr(e){var t=this,n,r,i,s;for(n=0;n<t[f];n+=1){r=_n(t[n]);if(r){i=new An(e);s=er(t[n],i,e,Sr);if(i[w]){Bn(t[n],r,i);zn(t[n],r,i,i[Q]*2);!i[At]&&i.end===360&&(i.end=mn*2);i[q]*=i[B];i.end*=i[B];i[q]-=mn/2;i.end-=mn/2;r[g]();r.arc(i.x,i.y,i[Q],i[q],i.end,i.ccw);i[E]&&cr(t[n],r,i);In(t[n],r,i)}}}return t};e.fn[Zt]=function xr(e){var t=this,n,r,i,o,u,a;for(n=0;n<t[f];n+=1){r=_n(t[n]);if(r){i=new An(e);o=er(t[n],i,e,xr);if(i[w]){Bn(t[n],r,i);zn(t[n],
r,i,i[c],i[l]);u=i[c]*(4/3);a=i[l];r[g]();r[Gt](i.x,i.y-a/2);r[bt](i.x-u/2,i.y-a/2,i.x-u/2,i.y+a/2,i.x,i.y+a/2);r[bt](i.x+u/2,i.y+a/2,i.x+u/2,i.y-a/2,i.x,i.y-a/2);i[E]&&cr(t[n],r,i);i[ct]=s;In(t[n],r,i)}}}return t};e.fn[Yt]=function Tr(e){var t=this,n,r,i,o,u,a,l,c,h,p,d;for(n=0;n<t[f];n+=1){r=_n(t[n]);if(r){i=new An(e);o=er(t[n],i,e,Tr);if(i[w]){Bn(t[n],r,i);zn(t[n],r,i,i[Q]*2);a=2*mn/i.sides;l=a/2;u=l+mn/2;c=i[Q]*yn(l);r[g]();for(d=0;d<i.sides;d+=1){h=i.x+i[Q]*yn(u);p=i.y+i[Q]*gn(u);r[Z](h,p);if(i[$t]){h=i.x+(c+ -c*i[$t])*yn(u+l);p=i.y+(c+ -c*i[$t])*gn(u+l);r[Z](h,p)}u+=a}i[E]&&cr(t[n],r,i);i[ct]=s;In(t[n],r,i)}}}return t};e.fn.drawSlice=function Nr(t){var n=this,r,i,o,u,a,l,c,h;for(i=0;i<n[f];i+=1){r=e(n[i]);o=_n(n[i]);if(o){u=new An(t);a=er(n[i],u,t,Nr);if(u[w]){Bn(n[i],o,u);zn(n[i],o,u,u[Q]*2);u[q]*=u[B];u.end*=u[B];u[q]-=mn/2;u.end-=mn/2;while(u[q]<0)u[q]+=2*mn;while(u.end<0)u.end+=2*mn;u.end<u[q]&&(u.end+=2*mn);l=(u[q]+u.end)/2;c=u[Q]*u.spread*yn(l);h=u[Q]*u.spread*gn(l);u.x+
=c;u.y+=h;o[g]();o.arc(u.x,u.y,u[Q],u[q],u.end,u.ccw);o[Z](u.x,u.y);u[E]&&cr(n[i],o,u);u[ct]=s;In(n[i],o,u)}}}return n};e.fn.drawLine=function Cr(e){var t=this,n,r,i,o,u,l,c;for(n=0;n<t[f];n+=1){r=_n(t[n]);if(r){i=new An(e);o=er(t[n],i,e,Cr);if(i[w]){Bn(t[n],r,i);zn(t[n],r,i,0);u=1;r[g]();while(s){l=i["x"+u];c=i["y"+u];if(l===a||c===a)break;r[Z](l+i.x,c+i.y);u+=1}i[E]&&cr(t[n],r,i);In(t[n],r,i)}}}return t};e.fn[zt]=function kr(e){var t=this,n,r,i,o,u,l,c,h,p;for(n=0;n<t[f];n+=1){r=_n(t[n]);if(r){i=new An(e);o=er(t[n],i,e,kr);if(i[w]){Bn(t[n],r,i);zn(t[n],r,i,0);u=2;r[g]();r[Gt](i.x1+i.x,i.y1+i.y);while(s){l=i["x"+u];c=i["y"+u];h=i["cx"+(u-1)];p=i["cy"+(u-1)];if(l===a||c===a||h===a||p===a)break;r.quadraticCurveTo(h+i.x,p+i.y,l+i.x,c+i.y);u+=1}i[E]&&cr(t[n],r,i);In(t[n],r,i)}}}return t};e.fn[un]=function Lr(e){var t=this,n,r,i,o,u,l,c,h,p,d,v,m;for(n=0;n<t[f];n+=1){r=_n(t[n]);if(r){i=new An(e);o=er(t[n],i,e,Lr);if(i[w]){Bn(t[n],r,i);zn(t[n],r,i,0);u=2;l=1;r[g]();r[Gt](i.x1+i.x,i.y1+i.
y);while(s){c=i["x"+u];h=i["y"+u];p=i["cx"+l];d=i["cy"+l];v=i["cx"+(l+1)];m=i["cy"+(l+1)];if(c===a||h===a||p===a||d===a||v===a||m===a)break;r[bt](p+i.x,d+i.y,v+i.x,m+i.y,c+i.x,h+i.y);u+=1;l+=2}i[E]&&cr(t[n],r,i);In(t[n],r,i)}}}return t};e.fn[rn]=function Ar(e){var t=this,n,r,i,o,u,l,c,h,p;for(n=0;n<t[f];n+=1){r=_n(t[n]);if(r){i=new An(e);o=er(t[n],i,e,Ar);if(i[w]){Bn(t[n],r,i);zn(t[n],r,i,0);u=1;r[g]();h=i.x;p=i.y;r[Gt](i.x,i.y);while(s){l=i["a"+u];c=i["l"+u];if(l===a||c===a)break;l*=i[B];l-=mn/2;h+=c*yn(l);p+=c*gn(l);r[Z](h,p);u+=1}i[E]&&cr(t[n],r,i);In(t[n],r,i)}}}return t};e.fn.drawText=function Or(t){var n=this,r,i,s,o,a,p,d,m,y;for(i=0;i<n[f];i+=1){r=e(n[i]);s=_n(n[i]);if(s){o=new An(t);a=er(n[i],o,t,Or);if(o[w]){Bn(n[i],s,o);s.textBaseline=o.baseline;s.textAlign=o.align;hr(s,o);o[Ht]!==u?p=dr(s,o):p=o.text.toString().split("\n");pr(n[i],s,o,p);if(t&&o[k]){t[c]=o[c];t[l]=o[l]}m=o.x;o.align==="left"?o.respectAlign?o.x+=o[c]/2:m-=o[c]/2:o.align==="right"&&(o.respectAlign?o.x-=o[c
]/2:m+=o[c]/2);zn(n[i],s,o,o[c],o[l]);for(d=0;d<p[f];d+=1){s[v]=o[v];y=o.y+d*o[l]/p[f]-(p[f]-1)*o[l]/p[f]/2;s.fillText(p[d],m,y);o[b]!==h&&(s[v]=h);s.strokeText(p[d],m,y)}if(o[E]){s[g]();s.rect(o.x-o[c]/2,o.y-o[l]/2,o[c],o[l]);cr(n[i],s,o);s[z]()}Fn(s,o)}}}Tn=o;return n};e.fn[I]=function(t){var n=this,r,i,s;t&&t[k]||pn(t)==="string"?i=n[y](t):i=new An(t);if(!i)i={};else{r=_n(n[0]);if(r){hr(r,i);s=dr(r,i);pr(n[0],r,i,s)}}return i};e.fn[J]=function Mr(t){function T(e,t,n,i,s){i[c]===u&&i[R]===u&&(i[c]=i[R]=b[c]);i[l]===u&&i[M]===u&&(i[l]=i[M]=b[l]);if(s){s[c]=i[c];s[l]=i[l]}if(i[R]!==u&&i[M]!==u&&i.sx!==u&&i.sy!==u){i[c]===u&&(i[c]=i[R]);i[l]===u&&(i[l]=i[M]);if(!i.cropFromCenter){i.sx+=i[R]/2;i.sy+=i[M]/2}i.sy-i[M]/2<0&&(i.sy=i[M]/2);i.sy+i[M]/2>b[l]&&(i.sy=b[l]-i[M]/2);i.sx-i[R]/2<0&&(i.sx=i[R]/2);i.sx+i[R]/2>b[c]&&(i.sx=b[c]-i[R]/2);zn(r[e],t,i,i[c],i[l]);t[J](b,i.sx-i[R]/2,i.sy-i[M]/2,i[R],i[M],i.x-i[c]/2,i.y-i[l]/2,i[c],i[l])}else{zn(r[e],t,i,i[c],i[l]);t[J](b,i.x-i[c]/2,i.y-i[l]
/2,i[c],i[l])}Bn(r[e],t,i);t[g]();t.rect(i.x-i[c]/2,i.y-i[l]/2,i[c],i[l]);i[E]&&cr(r[e],t,i);t[z]();t.stroke();Fn(t,i);jn(t,n,i)}function N(t,n,r,i,u,a){return function(){T(n,r,i,u,a);u[en]&&u[en][L](t,a);if(u[k]){u._args[Xt]=i[p].masks[Y](0);u._next&&e(t)[P]({clear:o,resetFire:s,index:u._next})}}}var r=this,i,h,d,v,m,y,b,S,x;for(h=0;h<r[f];h+=1){i=r[h];d=_n(r[h]);if(d){v=Wn(r[h]);m=new An(t);y=er(r[h],m,t,Mr);if(m[w]){x=m.source;S=x[A];if(x.src||S)b=x;else if(x)if(Nn[x]!==a)b=Nn[x];else{b=new n;b.src=x;Nn[x]=b}if(b)if(b[on]||S)N(i,h,d,v,m,y)();else{e(b).bind(en,N(i,h,d,v,m,y));b.src=b.src}}}}return r};e.fn[fn]=function(r){function d(){h=s[fn](a,o.repeat);o[en]&&o[en][L](i[0],h)}var i=this,s,o,a,f,h,p;s=_n(i[0]);if(s){o=new An(r);p=o.source;if(dn(p)){a=e(Ut)[0];a[c]=o[c];a[l]=o[l];f=_n(a);p[L](a,f);d()}else{f=p[A];if(p.src||f)a=p;else{a=new n;a.src=p}if(a[on]||f)d();else{e(a).bind(en,d);a.src=a.src}}}else h=u;return h};e.fn.createGradient=function(t){var n=this,r,i,s,o=[],l,c,h,p,d,
v,m;i=new An(t);r=_n(n[0]);if(r){i.x1=i.x1||0;i.y1=i.y1||0;i.x2=i.x2||0;i.y2=i.y2||0;i.r1!==u||i.r2!==u?s=r.createRadialGradient(i.x1,i.y1,i.r1,i.x2,i.y2,i.r2):s=r.createLinearGradient(i.x1,i.y1,i.x2,i.y2);for(p=1;i["c"+p]!==a;p+=1)i["s"+p]!==a?o.push(i["s"+p]):o.push(u);l=o[f];o[0]===u&&(o[0]=0);o[l-1]===u&&(o[l-1]=1);for(p=0;p<l;p+=1){if(o[p]!==u){v=1;m=0;c=o[p];for(d=p+1;d<l;d+=1){if(o[d]!==u){h=o[d];break}v+=1}c>h&&(o[d]=o[p])}else if(o[p]===u){m+=1;o[p]=c+m*((h-c)/v)}s.addColorStop(o[p],i["c"+(p+1)])}}else s=u;return s};e.fn.setPixels=function _r(e){var t=this,n,r,i,s,o,a={},h,p,d,v;for(r=0;r<t[f];r+=1){n=t[r];i=_n(n);if(i){s=new An(e);o=er(n,s,e,_r);zn(t[r],i,s,s[c],s[l]);if(s[c]===u||s[l]===u){s[c]=n[c];s[l]=n[l];s.x=s[c]/2;s.y=s[l]/2}if(s[c]!==0&&s[l]!==0){h=i.getImageData(s.x-s[c]/2,s.y-s[l]/2,s[c],s[l]);p=h.data;v=p[f];a=[];if(s.each)for(d=0;d<v;d+=4){a.r=p[d];a.g=p[d+1];a.b=p[d+2];a.a=p[d+3];s.each[L](n,a);p[d]=a.r;p[d+1]=a.g;p[d+2]=a.b;p[d+3]=a.a}i.putImageData(h,s.x-s[c
]/2,s.y-s[l]/2);i[ht]()}}}return t};e.fn.getCanvasImage=function(t,n){var r=this[0];n===a&&(n=1);return r&&r.toDataURL?r.toDataURL("image/"+t,n):u};e.fn.detectPixelRatio=function(n){var r=this,i,o,u,a,h,p,d,v,m,g;for(u=0;u<r[f];u+=1){o=r[u];i=e(r[u]);a=_n(o);g=Wn(r[u]);if(!g.scaled){h=window.devicePixelRatio||1;p=a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||a.backingStorePixelRatio||1;d=h/p;if(d!==1){v=o[c];m=o[l];o[c]=v*d;o[l]=m*d;o[Tt][c]=v+"px";o[Tt][l]=m+"px";a.scale(d,d)}g[It]=d;g.scaled=s;n&&n[L](o,d)}}return r};e.support.canvas=e(Ut)[0][A];On.defaults=ln;On.detectEvents=cr;On[z]=In;On.getTouchEventName=ur;e[ut]=On})(jQuery,document,Image,Math,parseFloat,!0,!1,null);
\ No newline at end of file
Added: wwwbase/js/jquery.colorbox-min.js
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ wwwbase/js/jquery.colorbox-min.js Sat Sep 21 00:21:06 2013 (r992)
@@ -0,0 +1,7 @@
+/*!
+ Colorbox v1.4.29 - 2013-09-10
+ jQuery lightbox and modal window plugin
+ (c) 2013 Jack Moore - http://www.jacklmoore.com/colorbox
+ license: http://www.opensource.org/licenses/mit-license.php
+*/
+(function(t,e,i){function o(i,o,n){var r=e.createElement(i);return o&&(r.id=Z+o),n&&(r.style.cssText=n),t(r)}function n(){return i.innerHeight?i.innerHeight:t(i).height()}function r(t){var e=k.length,i=(A+t)%e;return 0>i?e+i:i}function h(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():n())/100:1)*parseInt(t,10))}function l(t,e){return t.photo||t.photoRegex.test(e)}function s(t,e){return t.retinaUrl&&i.devicePixelRatio>1?e.replace(t.photoRegex,t.retinaSuffix):e}function a(t){"contains"in g[0]&&!g[0].contains(t.target)&&(t.stopPropagation(),g.focus())}function d(){var e,i=t.data(z,Y);null==i?(B=t.extend({},X),console&&console.log&&console.log("Error: cboxElement missing settings object")):B=t.extend({},i);for(e in B)t.isFunction(B[e])&&"on"!==e.slice(0,2)&&(B[e]=B[e].call(z));B.rel=B.rel||z.rel||t(z).data("rel")||"nofollow",B.href=B.href||t(z).attr("href"),B.title=B.title||z.title,"string"==typeof B.href&&(B.href=t.trim(B.href))}function c(i,o){t(e).trigger(i),le.trigger(i),t.i
sFunction(o)&&o.call(z)}function u(i){q||(z=i,d(),k=t(z),A=0,"nofollow"!==B.rel&&(k=t("."+te).filter(function(){var e,i=t.data(this,Y);return i&&(e=t(this).data("rel")||i.rel||this.rel),e===B.rel}),A=k.index(z),-1===A&&(k=k.add(z),A=k.length-1)),w.css({opacity:parseFloat(B.opacity),cursor:B.overlayClose?"pointer":"auto",visibility:"visible"}).show(),J&&g.add(w).removeClass(J),B.className&&g.add(w).addClass(B.className),J=B.className,B.closeButton?K.html(B.close).appendTo(y):K.appendTo("<div/>"),U||(U=$=!0,g.css({visibility:"hidden",display:"block"}),H=o(se,"LoadedContent","width:0; height:0; overflow:hidden"),y.css({width:"",height:""}).append(H),O=x.height()+C.height()+y.outerHeight(!0)-y.height(),_=b.width()+T.width()+y.outerWidth(!0)-y.width(),D=H.outerHeight(!0),N=H.outerWidth(!0),B.w=h(B.initialWidth,"x"),B.h=h(B.initialHeight,"y"),H.css({width:"",height:B.h}),Q.position(),c(ee,B.onOpen),P.add(L).hide(),g.focus(),B.trapFocus&&e.addEventListener&&(e.addEventListener("focus",a,!0
),le.one(re,function(){e.removeEventListener("focus",a,!0)})),B.returnFocus&&le.one(re,function(){t(z).focus()})),m())}function f(){!g&&e.body&&(V=!1,E=t(i),g=o(se).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),w=o(se,"Overlay").hide(),F=t([o(se,"LoadingOverlay")[0],o(se,"LoadingGraphic")[0]]),v=o(se,"Wrapper"),y=o(se,"Content").append(L=o(se,"Title"),S=o(se,"Current"),I=t('<button type="button"/>').attr({id:Z+"Previous"}),R=t('<button type="button"/>').attr({id:Z+"Next"}),M=o("button","Slideshow"),F),K=t('<button type="button"/>').attr({id:Z+"Close"}),v.append(o(se).append(o(se,"TopLeft"),x=o(se,"TopCenter"),o(se,"TopRight")),o(se,!1,"clear:left").append(b=o(se,"MiddleLeft"),y,T=o(se,"MiddleRight")),o(se,!1,"clear:left").append(o(se,"BottomLeft"),C=o(se,"BottomCenter"),o(se,"BottomRight"))).find("div div").css({"float":"left"}),W=o(se,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),P=R.add(I).add(S).add(M),t(e.body).
append(w,g.append(v,W)))}function p(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),u(this))}return g?(V||(V=!0,R.click(function(){Q.next()}),I.click(function(){Q.prev()}),K.click(function(){Q.close()}),w.click(function(){B.overlayClose&&Q.close()}),t(e).bind("keydown."+Z,function(t){var e=t.keyCode;U&&B.escKey&&27===e&&(t.preventDefault(),Q.close()),U&&B.arrowKey&&k[1]&&!t.altKey&&(37===e?(t.preventDefault(),I.click()):39===e&&(t.preventDefault(),R.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+Z,"."+te,i):t("."+te).live("click."+Z,i)),!0):!1}function m(){var n,r,a,u=Q.prep,f=++ae;$=!0,j=!1,z=k[A],d(),c(he),c(ie,B.onLoad),B.h=B.height?h(B.height,"y")-D-O:B.innerHeight&&h(B.innerHeight,"y"),B.w=B.width?h(B.width,"x")-N-_:B.innerWidth&&h(B.innerWidth,"x"),B.mw=B.w,B.mh=B.h,B.maxWidth&&(B.mw=h(B.maxWidth,"x")-N-_,B.mw=B.w&&B.w<B.mw?B.w:B.mw),B.maxHeight&&(B.mh=h(B.maxHeight,"y")-D-O,B.mh=B.h&&B.h<B.mh?B.h:B.mh),n=B.href,G=setTimeout(funct
ion(){F.show()},100),B.inline?(a=o(se).hide().insertBefore(t(n)[0]),le.one(he,function(){a.replaceWith(H.children())}),u(t(n))):B.iframe?u(" "):B.html?u(B.html):l(B,n)?(n=s(B,n),j=e.createElement("img"),t(j).addClass(Z+"Photo").bind("error",function(){B.title=!1,u(o(se,"Error").html(B.imgError))}).one("load",function(){var e;f===ae&&(j.alt=t(z).attr("alt")||t(z).attr("data-alt")||"",B.retinaImage&&i.devicePixelRatio>1&&(j.height=j.height/i.devicePixelRatio,j.width=j.width/i.devicePixelRatio),B.scalePhotos&&(r=function(){j.height-=j.height*e,j.width-=j.width*e},B.mw&&j.width>B.mw&&(e=(j.width-B.mw)/j.width,r()),B.mh&&j.height>B.mh&&(e=(j.height-B.mh)/j.height,r())),B.h&&(j.style.marginTop=Math.max(B.mh-j.height,0)/2+"px"),k[1]&&(B.loop||k[A+1])&&(j.style.cursor="pointer",j.onclick=function(){Q.next()}),j.style.width=j.width+"px",j.style.height=j.height+"px",setTimeout(function(){u(j)},1))}),setTimeout(function(){j.src=n},1)):n&&W.load(n,B.data,function(e,i){f===ae&&u("error"===i?o(se
,"Error").html(B.xhrError):t(this).contents())})}var w,g,v,y,x,b,T,C,k,E,H,W,F,L,S,M,R,I,K,P,B,O,_,D,N,z,A,j,U,$,q,G,Q,J,V,X={transition:"elastic",speed:300,fadeOut: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,trapFocus:!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|webp)((#|\?).*)?$/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,closeButton:!0},Y="colorbox",Z="cbox",te=Z+"Element",ee=Z+"_open",ie=Z+"_load",oe=Z+"_complete",ne=Z+"_cleanup",re=Z+"_closed",he=Z+"_purge",le=t("<a/>"),se="div",ae=0,de={},ce=function(){function t(){clearTimeout(h)}function e(){(B.loop||k[A+1])&&(t(),h=setTimeout(Q.next,B.slideshowSpeed))}function i(){M.html(B.slideshowStop).unbind(s).one(s,o),le.bind(oe,e).bind(ie,t),g.removeClass(l+"off").addClass(l+"on")}function o(){t(),le.unbind(oe,e).unbind(ie,t),M.html(B.slideshowStart).unbind(s).one(s,function(){Q.next(),i()}),g.removeClass(l+"on").addClass(l+"off")}function n(){r=!1,M.hide(),t(),le.unbind(oe,e).unbind(ie,t),g.removeClass(l+"off "+l+"on")}var r,h,l=Z+"Slideshow_",s="click."+Z;return function(){r?B.slideshow||(le.unbind(ne,n),n()):B.slideshow&&k[1]&&(r=!0,le.one(ne,n),B.slideshowAuto?i():o(),M.show())}}();t.colorbox||(t(f),Q=t.fn[Y]=t[Y]=function(e,i){var o=this;if(e=e||{},f(),p()){if(t.isFunction(o))o=t("<a/>"),e.open=!0;else if(!o[0])return o;i&&(e.o
nComplete=i),o.each(function(){t.data(this,Y,t.extend({},t.data(this,Y)||X,e))}).addClass(te),(t.isFunction(e.open)&&e.open.call(o)||e.open)&&u(o[0])}return o},Q.position=function(e,i){function o(){x[0].style.width=C[0].style.width=y[0].style.width=parseInt(g[0].style.width,10)-_+"px",y[0].style.height=b[0].style.height=T[0].style.height=parseInt(g[0].style.height,10)-O+"px"}var r,l,s,a=0,d=0,c=g.offset();if(E.unbind("resize."+Z),g.css({top:-9e4,left:-9e4}),l=E.scrollTop(),s=E.scrollLeft(),B.fixed?(c.top-=l,c.left-=s,g.css({position:"fixed"})):(a=l,d=s,g.css({position:"absolute"})),d+=B.right!==!1?Math.max(E.width()-B.w-N-_-h(B.right,"x"),0):B.left!==!1?h(B.left,"x"):Math.round(Math.max(E.width()-B.w-N-_,0)/2),a+=B.bottom!==!1?Math.max(n()-B.h-D-O-h(B.bottom,"y"),0):B.top!==!1?h(B.top,"y"):Math.round(Math.max(n()-B.h-D-O,0)/2),g.css({top:c.top,left:c.left,visibility:"visible"}),v[0].style.width=v[0].style.height="9999px",r={width:B.w+N+_,height:B.h+D+O,top:a,left:d},e){var u=0;t.eac
h(r,function(t){return r[t]!==de[t]?(u=e,void 0):void 0}),e=u}de=r,e||g.css(r),g.dequeue().animate(r,{duration:e||0,complete:function(){o(),$=!1,v[0].style.width=B.w+N+_+"px",v[0].style.height=B.h+D+O+"px",B.reposition&&setTimeout(function(){E.bind("resize."+Z,Q.position)},1),i&&i()},step:o})},Q.resize=function(t){var e;U&&(t=t||{},t.width&&(B.w=h(t.width,"x")-N-_),t.innerWidth&&(B.w=h(t.innerWidth,"x")),H.css({width:B.w}),t.height&&(B.h=h(t.height,"y")-D-O),t.innerHeight&&(B.h=h(t.innerHeight,"y")),t.innerHeight||t.height||(e=H.scrollTop(),H.css({height:"auto"}),B.h=H.height()),H.css({height:B.h}),e&&H.scrollTop(e),Q.position("none"===B.transition?0:B.speed))},Q.prep=function(i){function n(){return B.w=B.w||H.width(),B.w=B.mw&&B.mw<B.w?B.mw:B.w,B.w}function h(){return B.h=B.h||H.height(),B.h=B.mh&&B.mh<B.h?B.mh:B.h,B.h}if(U){var a,d="none"===B.transition?0:B.speed;H.empty().remove(),H=o(se,"LoadedContent").append(i),H.hide().appendTo(W.show()).css({width:n(),overflow:B.scrolling?"a
uto":"hidden"}).css({height:h()}).prependTo(y),W.hide(),t(j).css({"float":"none"}),a=function(){function i(){t.support.opacity===!1&&g[0].style.removeAttribute("filter")}var n,h,a=k.length,u="frameBorder",f="allowTransparency";U&&(h=function(){clearTimeout(G),F.hide(),c(oe,B.onComplete)},L.html(B.title).add(H).show(),a>1?("string"==typeof B.current&&S.html(B.current.replace("{current}",A+1).replace("{total}",a)).show(),R[B.loop||a-1>A?"show":"hide"]().html(B.next),I[B.loop||A?"show":"hide"]().html(B.previous),ce(),B.preloading&&t.each([r(-1),r(1)],function(){var i,o,n=k[this],r=t.data(n,Y);r&&r.href?(i=r.href,t.isFunction(i)&&(i=i.call(n))):i=t(n).attr("href"),i&&l(r,i)&&(i=s(r,i),o=e.createElement("img"),o.src=i)})):P.hide(),B.iframe?(n=o("iframe")[0],u in n&&(n[u]=0),f in n&&(n[f]="true"),B.scrolling||(n.scrolling="no"),t(n).attr({src:B.href,name:(new Date).getTime(),"class":Z+"Iframe",allowFullScreen:!0,webkitAllowFullScreen:!0,mozallowfullscreen:!0}).one("load",h).appendTo(H),le
.one(he,function(){n.src="//about:blank"}),B.fastIframe&&t(n).trigger("load")):h(),"fade"===B.transition?g.fadeTo(d,1,i):i())},"fade"===B.transition?g.fadeTo(d,0,function(){Q.position(0,a)}):Q.position(d,a)}},Q.next=function(){!$&&k[1]&&(B.loop||k[A+1])&&(A=r(1),u(k[A]))},Q.prev=function(){!$&&k[1]&&(B.loop||A)&&(A=r(-1),u(k[A]))},Q.close=function(){U&&!q&&(q=!0,U=!1,c(ne,B.onCleanup),E.unbind("."+Z),w.fadeTo(B.fadeOut||0,0),g.stop().fadeTo(B.fadeOut||0,0,function(){g.add(w).css({opacity:1,cursor:"auto"}).hide(),c(he),H.empty().remove(),setTimeout(function(){q=!1,c(re,B.onClosed)},1)}))},Q.remove=function(){g&&(g.stop(),t.colorbox.close(),g.stop().remove(),w.remove(),q=!1,g=null,t("."+te).removeData(Y).removeClass(te),t(e).unbind("click."+Z))},Q.element=function(){return t(z)},Q.settings=X)})(jQuery,document,window);
\ No newline at end of file
Deleted: wwwbase/js/lightbox-2.6.min.js
==============================================================================
--- wwwbase/js/lightbox-2.6.min.js Sat Sep 21 00:21:06 2013 (r991)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1 +0,0 @@
-(function(){var b,d,c;b=jQuery;c=(function(){function b(){this.fadeDuration=500;this.fitImagesInViewport=true;this.resizeDuration=700;this.showImageNumberLabel=true;this.wrapAround=false}b.prototype.albumLabel=function(b,c){return"Imaginea "+b+" din "+c};return b})();d=(function(){function c(b){this.options=b;this.album=[];this.currentImageIndex=void 0;this.init()}c.prototype.init=function(){this.enable();return this.build()};c.prototype.enable=function(){var c=this;return b('body').on('click','a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]',function(d){c.start(b(d.currentTarget));return false})};c.prototype.build=function(){var c=this;b("<div id='lightboxOverlay' class='lightboxOverlay'></div><div id='lightbox' class='lightbox'><div class='lb-outerContainer'><div class='lb-container'><img class='lb-image' src='' /><div class='lb-nav'><a class='lb-prev' href='' ></a><a class='lb-next' href='' ></a></div><div class='lb-loader'><a class='lb-cancel'></a></
div></div></div><div class='lb-dataContainer'><div class='lb-data'><div class='lb-details'><span class='lb-caption'></span><span class='lb-number'></span></div><div class='lb-closeContainer'><a class='lb-close'></a></div></div></div></div>").appendTo(b('body'));this.$lightbox=b('#lightbox');this.$overlay=b('#lightboxOverlay');this.$outerContainer=this.$lightbox.find('.lb-outerContainer');this.$container=this.$lightbox.find('.lb-container');this.containerTopPadding=parseInt(this.$container.css('padding-top'),10);this.containerRightPadding=parseInt(this.$container.css('padding-right'),10);this.containerBottomPadding=parseInt(this.$container.css('padding-bottom'),10);this.containerLeftPadding=parseInt(this.$container.css('padding-left'),10);this.$overlay.hide().on('click',function(){c.end();return false});this.$lightbox.hide().on('click',function(d){if(b(d.target).attr('id')==='lightbox'){c.end()}return false});this.$outerContainer.on('click',function(d){if(b(d.target).attr('id')==='li
ghtbox'){c.end()}return false});this.$lightbox.find('.lb-prev').on('click',function(){if(c.currentImageIndex===0){c.changeImage(c.album.length-1)}else{c.changeImage(c.currentImageIndex-1)}return false});this.$lightbox.find('.lb-next').on('click',function(){if(c.currentImageIndex===c.album.length-1){c.changeImage(0)}else{c.changeImage(c.currentImageIndex+1)}return false});return this.$lightbox.find('.lb-loader, .lb-close').on('click',function(){c.end();return false})};c.prototype.start=function(c){var f,e,j,d,g,n,o,k,l,m,p,h,i;b(window).on("resize",this.sizeOverlay);b('select, object, embed').css({visibility:"hidden"});this.$overlay.width(b(document).width()).height(b(document).height()).fadeIn(this.options.fadeDuration);this.album=[];g=0;j=c.attr('data-lightbox');if(j){h=b(c.prop("tagName")+'[data-lightbox="'+j+'"]');for(d=k=0,m=h.length;k<m;d=++k){e=h[d];this.album.push({link:b(e).attr('href'),title:b(e).attr('title')});if(b(e).attr('href')===c.attr('href')){g=d}}}else{if(c.attr('r
el')==='lightbox'){this.album.push({link:c.attr('href'),title:c.attr('title')})}else{i=b(c.prop("tagName")+'[rel="'+c.attr('rel')+'"]');for(d=l=0,p=i.length;l<p;d=++l){e=i[d];this.album.push({link:b(e).attr('href'),title:b(e).attr('title')});if(b(e).attr('href')===c.attr('href')){g=d}}}}f=b(window);o=f.scrollTop()+f.height()/10;n=f.scrollLeft();this.$lightbox.css({top:o+'px',left:n+'px'}).fadeIn(this.options.fadeDuration);this.changeImage(g)};c.prototype.changeImage=function(f){var d,c,e=this;this.disableKeyboardNav();d=this.$lightbox.find('.lb-image');this.sizeOverlay();this.$overlay.fadeIn(this.options.fadeDuration);b('.lb-loader').fadeIn('slow');this.$lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption').hide();this.$outerContainer.addClass('animating');c=new Image();c.onload=function(){var m,g,h,i,j,k,l;d.attr('src',e.album[f].link);m=b(c);d.width(c.width);d.height(c.height);if(e.options.fitImagesInViewport){l=b(window).width();k=b(
window).height();j=l-e.containerLeftPadding-e.containerRightPadding-20;i=k-e.containerTopPadding-e.containerBottomPadding-110;if((c.width>j)||(c.height>i)){if((c.width/j)>(c.height/i)){h=j;g=parseInt(c.height/(c.width/h),10);d.width(h);d.height(g)}else{g=i;h=parseInt(c.width/(c.height/g),10);d.width(h);d.height(g)}}}return e.sizeContainer(d.width(),d.height())};c.src=this.album[f].link;this.currentImageIndex=f};c.prototype.sizeOverlay=function(){return b('#lightboxOverlay').width(b(document).width()).height(b(document).height())};c.prototype.sizeContainer=function(f,g){var b,d,e,h,c=this;h=this.$outerContainer.outerWidth();e=this.$outerContainer.outerHeight();d=f+this.containerLeftPadding+this.containerRightPadding;b=g+this.containerTopPadding+this.containerBottomPadding;this.$outerContainer.animate({width:d,height:b},this.options.resizeDuration,'swing');setTimeout(function(){c.$lightbox.find('.lb-dataContainer').width(d);c.$lightbox.find('.lb-prevLink').height(b);c.$lightbox.find('
.lb-nextLink').height(b);c.showImage()},this.options.resizeDuration)};c.prototype.showImage=function(){this.$lightbox.find('.lb-loader').hide();this.$lightbox.find('.lb-image').fadeIn('slow');this.updateNav();this.updateDetails();this.preloadNeighboringImages();this.enableKeyboardNav()};c.prototype.updateNav=function(){this.$lightbox.find('.lb-nav').show();if(this.album.length>1){if(this.options.wrapAround){this.$lightbox.find('.lb-prev, .lb-next').show()}else{if(this.currentImageIndex>0){this.$lightbox.find('.lb-prev').show()}if(this.currentImageIndex<this.album.length-1){this.$lightbox.find('.lb-next').show()}}}};c.prototype.updateDetails=function(){var b=this;if(typeof this.album[this.currentImageIndex].title!=='undefined'&&this.album[this.currentImageIndex].title!==""){this.$lightbox.find('.lb-caption').html(this.album[this.currentImageIndex].title).fadeIn('fast')}if(this.album.length>1&&this.options.showImageNumberLabel){this.$lightbox.find('.lb-number').text(this.options.album
Label(this.currentImageIndex+1,this.album.length)).fadeIn('fast')}else{this.$lightbox.find('.lb-number').hide()}this.$outerContainer.removeClass('animating');this.$lightbox.find('.lb-dataContainer').fadeIn(this.resizeDuration,function(){return b.sizeOverlay()})};c.prototype.preloadNeighboringImages=function(){var c,b;if(this.album.length>this.currentImageIndex+1){c=new Image();c.src=this.album[this.currentImageIndex+1].link}if(this.currentImageIndex>0){b=new Image();b.src=this.album[this.currentImageIndex-1].link}};c.prototype.enableKeyboardNav=function(){b(document).on('keyup.keyboard',b.proxy(this.keyboardAction,this))};c.prototype.disableKeyboardNav=function(){b(document).off('.keyboard')};c.prototype.keyboardAction=function(g){var d,e,f,c,b;d=27;e=37;f=39;b=g.keyCode;c=String.fromCharCode(b).toLowerCase();if(b===d||c.match(/x|o|c/)){this.end()}else if(c==='p'||b===e){if(this.currentImageIndex!==0){this.changeImage(this.currentImageIndex-1)}}else if(c==='n'||b===f){if(this.curren
tImageIndex!==this.album.length-1){this.changeImage(this.currentImageIndex+1)}}};c.prototype.end=function(){this.disableKeyboardNav();b(window).off("resize",this.sizeOverlay);this.$lightbox.fadeOut(this.options.fadeDuration);this.$overlay.fadeOut(this.options.fadeDuration);return b('select, object, embed').css({visibility:"visible"})};return c})();b(function(){var e,b;b=new c();return e=new d(b)})}).call(this);
Modified: wwwbase/search.php
==============================================================================
--- wwwbase/search.php Fri Sep 20 10:23:38 2013 (r991)
+++ wwwbase/search.php Sat Sep 21 00:21:06 2013 (r992)
@@ -302,21 +302,51 @@
/* Test */
if(!empty($lexems)){
- $images = array();
- foreach($lexems as $lexem) {
- $lines = Visual::get_all_by_lexemeId($lexem->id);
- foreach($lines as $line) {
- if(!empty($line)) {
- $image = Visual::getImageWww($line->path);
- $thumb = Visual::getThumbWww($line->path);
+ $images = array(); $allTags = array(); $size = array();
- $images[] = array('img' => $image, 'tmb' => $thumb, 'name' => $lexem->formUtf8General);
+ foreach($lexems as $lexeme) {
+ $line = Visual::get_by_lexemeId($lexeme->id);
+
+ if(!empty($line)) {
+ $imgTags = array();
+
+ // For every lexeme, it fetches the image and thumb paths from the database
+ $image = Visual::getImageWww($line->path);
+ $thumb = Visual::getThumbWww($line->path);
+
+ // and stores them in the $images array.
+ $images[] = array('img' => $image, 'tmb' => $thumb, 'name' => $lexeme->formUtf8General);
+
+ if($line->revised) {
+ // Also stores the size for every image, useful for scaling.
+ $size[] = array('width' => $line->width, 'height' => $line->height);
+
+ // Checks if each image, respectively, has tags.
+ $rows = VisualTag::get_all_by_imageId($line->id);
+
+ if(!empty($rows)) {
+ foreach($rows as $row) {
+ // If so, each tag information is stored as an entry in the $tagInfo array
+ $tagInfo = array('label' => $row->label, 'textX' => $row->textXCoord,
+ 'textY' => $row->textYCoord, 'imgX' => $row->imgXCoord,
+ 'imgY' => $row->imgYCoord);
+ // and every tag represents an entry in the $imgTags array.
+ $imgTags[] = $tagInfo;
+ }
+ }
+
+ // Finally, all the tags for one image are stored as an entry in the $allTags array
+ $allTags[] = array('tags' => $imgTags, 'width' => $line->width, 'height' => $line->height,
+ 'lexeme' => $lexeme->formUtf8General);
}
}
}
-SmartyWrap::assign('images', $images);
-SmartyWrap::addCss('gallery');
-SmartyWrap::addJs('gallery');
+
+ SmartyWrap::assign('images', $images);
+ SmartyWrap::assign('tags', $allTags);
+ SmartyWrap::assign('size', $size);
+ SmartyWrap::addCss('gallery');
+ SmartyWrap::addJs('gallery');
}
/* Test */
Added: wwwbase/styles/colorbox.css
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ wwwbase/styles/colorbox.css Sat Sep 21 00:21:06 2013 (r992)
@@ -0,0 +1,44 @@
+/*
+ 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; -ms-interpolation-mode:bicubic;}
+.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:#000;}
+#colorbox{outline:0;}
+ #cboxContent{margin-top:20px;background:#000;}
+ .cboxIframe{background:#fff;}
+ #cboxError{padding:50px; border:1px solid #ccc;}
+ #cboxLoadedContent{border:5px solid #000; background:#fff;}
+ #cboxTitle{position:absolute; top:-20px; left:0; color:#ccc;}
+ #cboxCurrent{position:absolute; top:-20px; right:0px; color:#ccc;}
+ #cboxLoadingGraphic{background:url(../img/colorbox/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; top:-20px; right:90px; color:#fff;}
+ #cboxPrevious{position:absolute; top:50%; left:5px; margin-top:-32px; background:url(../img/colorbox/controls.png) no-repeat top left; width:28px; height:65px; text-indent:-9999px;}
+ #cboxPrevious:hover{background-position:bottom left;}
+ #cboxNext{position:absolute; top:50%; right:5px; margin-top:-32px; background:url(../img/colorbox/controls.png) no-repeat top right; width:28px; height:65px; text-indent:-9999px;}
+ #cboxNext:hover{background-position:bottom right;}
+ #cboxClose{position:absolute; top:5px; right:5px; display:block; background:url(../img/colorbox/controls.png) no-repeat top center; width:38px; height:19px; text-indent:-9999px;}
+ #cboxClose:hover{background-position:bottom center;}
Modified: wwwbase/styles/flex.css
==============================================================================
--- wwwbase/styles/flex.css Fri Sep 20 10:23:38 2013 (r991)
+++ wwwbase/styles/flex.css Sat Sep 21 00:21:06 2013 (r992)
@@ -383,7 +383,7 @@
height: 500px;
}
-.visualTagCanvas img {
+.visualTagImg {
max-width: 500px;
max-height: 500px;
}
Deleted: wwwbase/styles/lightbox.css
==============================================================================
--- wwwbase/styles/lightbox.css Sat Sep 21 00:21:06 2013 (r991)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,202 +0,0 @@
-/* line 7, ../sass/lightbox.sass */
-body:after {
- content: url(../img/lightbox/close.png) url(../img/lightbox/loading.gif) url(../img/lightbox/prev.png) url(../img/lightbox/next.png);
- display: none;
-}
-
-/* line 11, ../sass/lightbox.sass */
-.lightboxOverlay {
- position: absolute;
- top: 0;
- left: 0;
- z-index: 9999;
- background-color: black;
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
- opacity: 0.8;
- display: none;
-}
-
-/* line 20, ../sass/lightbox.sass */
-.lightbox {
- position: absolute;
- left: 0;
- width: 100%;
- z-index: 10000;
- text-align: center;
- line-height: 0;
- font-weight: normal;
-}
-/* line 28, ../sass/lightbox.sass */
-.lightbox .lb-image {
- display: block;
- height: auto;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- -ms-border-radius: 3px;
- -o-border-radius: 3px;
- border-radius: 3px;
-}
-/* line 32, ../sass/lightbox.sass */
-.lightbox a img {
- border: none;
-}
-
-/* line 35, ../sass/lightbox.sass */
-.lb-outerContainer {
- position: relative;
- background-color: white;
- *zoom: 1;
- width: 250px;
- height: 250px;
- margin: 0 auto;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- -ms-border-radius: 4px;
- -o-border-radius: 4px;
- border-radius: 4px;
-}
-/* line 38, ../../../../.rvm/gems/ruby-1.9.3-p392/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */
-.lb-outerContainer:after {
- content: "";
- display: table;
- clear: both;
-}
-
-/* line 44, ../sass/lightbox.sass */
-.lb-container {
- padding: 4px;
-}
-
-/* line 47, ../sass/lightbox.sass */
-.lb-loader {
- position: absolute;
- top: 43%;
- left: 0%;
- height: 25%;
- width: 100%;
- text-align: center;
- line-height: 0;
-}
-
-/* line 56, ../sass/lightbox.sass */
-.lb-cancel {
- display: block;
- width: 32px;
- height: 32px;
- margin: 0 auto;
- background: url(../img/lightbox/loading.gif) no-repeat;
-}
-
-/* line 63, ../sass/lightbox.sass */
-.lb-nav {
- position: absolute;
- top: 0;
- left: 0;
- height: 100%;
- width: 100%;
- z-index: 10;
-}
-
-/* line 71, ../sass/lightbox.sass */
-.lb-container > .nav {
- left: 0;
-}
-
-/* line 74, ../sass/lightbox.sass */
-.lb-nav a {
- outline: none;
-}
-
-/* line 77, ../sass/lightbox.sass */
-.lb-prev, .lb-next {
- width: 49%;
- height: 100%;
- cursor: pointer;
- /* Trick IE into showing hover */
- display: block;
-}
-
-/* line 84, ../sass/lightbox.sass */
-.lb-prev {
- left: 0;
- float: left;
-}
-/* line 87, ../sass/lightbox.sass */
-.lb-prev:hover {
- background: url(../img/lightbox/prev.png) left 48% no-repeat;
-}
-
-/* line 90, ../sass/lightbox.sass */
-.lb-next {
- right: 0;
- float: right;
-}
-/* line 93, ../sass/lightbox.sass */
-.lb-next:hover {
- background: url(../img/lightbox/next.png) right 48% no-repeat;
-}
-
-/* line 96, ../sass/lightbox.sass */
-.lb-dataContainer {
- margin: 0 auto;
- padding-top: 5px;
- *zoom: 1;
- width: 100%;
- -moz-border-radius-bottomleft: 4px;
- -webkit-border-bottom-left-radius: 4px;
- border-bottom-left-radius: 4px;
- -moz-border-radius-bottomright: 4px;
- -webkit-border-bottom-right-radius: 4px;
- border-bottom-right-radius: 4px;
-}
-/* line 38, ../../../../.rvm/gems/ruby-1.9.3-p392/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */
-.lb-dataContainer:after {
- content: "";
- display: table;
- clear: both;
-}
-
-/* line 103, ../sass/lightbox.sass */
-.lb-data {
- padding: 0 4px;
- color: #bbbbbb;
-}
-/* line 106, ../sass/lightbox.sass */
-.lb-data .lb-details {
- width: 85%;
- float: left;
- text-align: left;
- line-height: 1.1em;
-}
-/* line 111, ../sass/lightbox.sass */
-.lb-data .lb-caption {
- font-size: 13px;
- font-weight: bold;
- line-height: 1em;
-}
-/* line 115, ../sass/lightbox.sass */
-.lb-data .lb-number {
- display: block;
- clear: left;
- padding-bottom: 1em;
- font-size: 12px;
- color: #999999;
-}
-/* line 121, ../sass/lightbox.sass */
-.lb-data .lb-close {
- display: block;
- float: right;
- width: 30px;
- height: 30px;
- background: url(../img/lightbox/close.png) top right no-repeat;
- text-align: right;
- outline: none;
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);
- opacity: 0.7;
-}
-/* line 130, ../sass/lightbox.sass */
-.lb-data .lb-close:hover {
- cursor: pointer;
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
- opacity: 1;
-}
Modified: wwwbase/styles/zepu.css
==============================================================================
--- wwwbase/styles/zepu.css Fri Sep 20 10:23:38 2013 (r991)
+++ wwwbase/styles/zepu.css Sat Sep 21 00:21:06 2013 (r992)
@@ -1412,3 +1412,15 @@
border-radius: 4px;
-moz-border-radius: 4px;
}
+
+#tagsInfo {
+ display: none;
+}
+
+#gallery {
+ float: right;
+}
+
+#gallery img{
+ display: block;
+}
More information about the Dev
mailing list