[Issue #268] Implemented popup dialogs

This commit is contained in:
Mavis Ou 2013-07-29 15:05:33 -07:00
Родитель eebf34967a
Коммит ec8eb41828
1 изменённых файлов: 1 добавлений и 0 удалений

1
data/picoModal-1.0.0.min.js поставляемый Normal file
Просмотреть файл

@ -0,0 +1 @@
window.picoModal=function(a,b){"use strict";var c=function(){var b=[];return{w:function(a){b.push(a)},t:function(){for(var c=0;c<b.length;c++)a.setTimeout(b[c],1)}}},d=function(a){var c=b.createElement("div");(a||b.body).appendChild(c);var e={e:c,c:function(){return d(c)},s:function(a){a=a||{},"undefined"!=typeof a.opacity&&(a.filter="alpha(opacity="+100*a.opacity+")");for(var b in a)a.hasOwnProperty(b)&&(c.style[b]=a[b]);return e},z:function(a){return c.className+=a,e},h:function(a){return c.innerHTML=a,e},d:function(){return c.clientWidth},o:function(a){return c.attachEvent?c.attachEvent("onclick",a):c.addEventListener("click",a),e},x:function(){return b.body.removeChild(c),e}};return e},e=function(a){var b=c(),e=d().z("pico-overlay").s({display:"block",position:"fixed",top:"0px",left:"0px",height:"100%",width:"100%",zIndex:1e4}).s(a("overlayStyles",{opacity:.5,background:"#000"})).o(b.t);return{e:e.e,x:e.x,o:b.w}};return function(a){function b(b,c){return void 0===a[b]?c:a[b]}"string"==typeof a&&(a={content:a});var f=e(b),g=c(),h=d().z("pico-content").s({display:"block",position:"fixed",zIndex:10001,left:"50%",top:"50px"}).h(a.content),i=b("width",h.d());h.s({width:i+"px",margin:"0 0 0 "+(-(i/2)+"px")}).s(b("modalStyles",{backgroundColor:"white",padding:"20px",borderRadius:"5px"}));var j=function(){g.t(),f.x(),h.x()};b("overlayClose",!0)&&f.o(j);var k;return b("closeButton",!0)&&(k=h.c().h(b("closeHtml","&#xD7;")).z("pico-close").s(b("closeStyles",{borderRadius:"2px",cursor:"pointer",height:"15px",width:"15px",position:"absolute",top:"5px",right:"5px",fontSize:"16px",textAlign:"center",lineHeight:"15px",background:"#CCC"})).o(j)),{modalElem:h.e,closeElem:k?k.e:null,overlayElem:f.e,close:j,onClose:g.w}}}(window,document);