Merge branch 'new_announcement_dev' of https://github.com/Rulingcom/orbit into new_announcement_dev
This commit is contained in:
commit
e0409c2c8e
5
Gemfile
5
Gemfile
|
@ -3,14 +3,15 @@ gem 'rails','>=3.1.0'
|
|||
gem 'yajl-ruby', :require => 'yajl'
|
||||
|
||||
gem 'bson_ext'
|
||||
gem 'carrierwave', '0.5.4'
|
||||
gem 'carrierwave'
|
||||
gem 'carrierwave-mongoid', :require => 'carrierwave/mongoid'
|
||||
gem 'ckeditor'
|
||||
gem 'devise'
|
||||
gem 'mini_magick'
|
||||
gem 'rubyzip'
|
||||
gem 'sinatra'
|
||||
gem 'execjs'
|
||||
gem 'mongoid', :git => 'git://github.com/mongoid/mongoid.git', :ref => '7a915395db50e2bc6071a503a11530e644879e49'
|
||||
gem 'mongoid'
|
||||
|
||||
gem 'rake','0.8.7'
|
||||
gem 'jquery-rails'
|
||||
|
|
24
Gemfile.lock
24
Gemfile.lock
|
@ -1,13 +1,3 @@
|
|||
GIT
|
||||
remote: git://github.com/mongoid/mongoid.git
|
||||
revision: 7a915395db50e2bc6071a503a11530e644879e49
|
||||
ref: 7a915395db50e2bc6071a503a11530e644879e49
|
||||
specs:
|
||||
mongoid (2.4.0)
|
||||
activemodel (~> 3.1)
|
||||
mongo (~> 1.3)
|
||||
tzinfo (~> 0.3.22)
|
||||
|
||||
GEM
|
||||
remote: http://rubygems.org/
|
||||
specs:
|
||||
|
@ -47,8 +37,11 @@ GEM
|
|||
bson_ext (1.5.2)
|
||||
bson (= 1.5.2)
|
||||
builder (3.0.0)
|
||||
carrierwave (0.5.4)
|
||||
carrierwave (0.5.8)
|
||||
activesupport (~> 3.0)
|
||||
carrierwave-mongoid (0.1.3)
|
||||
carrierwave (>= 0.5.6)
|
||||
mongoid (~> 2.1)
|
||||
chronic (0.6.6)
|
||||
ckeditor (3.6.3)
|
||||
mime-types (~> 1.16)
|
||||
|
@ -96,6 +89,10 @@ GEM
|
|||
subexec (~> 0.1.0)
|
||||
mongo (1.5.2)
|
||||
bson (= 1.5.2)
|
||||
mongoid (2.4.0)
|
||||
activemodel (~> 3.1)
|
||||
mongo (~> 1.3)
|
||||
tzinfo (~> 0.3.22)
|
||||
multi_json (1.0.4)
|
||||
orm_adapter (0.0.5)
|
||||
polyglot (0.3.3)
|
||||
|
@ -192,7 +189,8 @@ PLATFORMS
|
|||
|
||||
DEPENDENCIES
|
||||
bson_ext
|
||||
carrierwave (= 0.5.4)
|
||||
carrierwave
|
||||
carrierwave-mongoid
|
||||
ckeditor
|
||||
coffee-rails
|
||||
database_cleaner
|
||||
|
@ -203,7 +201,7 @@ DEPENDENCIES
|
|||
factory_girl_rails
|
||||
jquery-rails
|
||||
mini_magick
|
||||
mongoid!
|
||||
mongoid
|
||||
radius
|
||||
rails (>= 3.1.0)
|
||||
rake (= 0.8.7)
|
||||
|
|
|
@ -0,0 +1,96 @@
|
|||
<!--
|
||||
PIE: CSS3 rendering for IE
|
||||
Version 1.0beta5
|
||||
http://css3pie.com
|
||||
Dual-licensed for use under the Apache License Version 2.0 or the General Public License (GPL) Version 2.
|
||||
-->
|
||||
<PUBLIC:COMPONENT lightWeight="true">
|
||||
<!-- saved from url=(0014)about:internet -->
|
||||
<PUBLIC:ATTACH EVENT="oncontentready" FOR="element" ONEVENT="init()" />
|
||||
<PUBLIC:ATTACH EVENT="ondocumentready" FOR="element" ONEVENT="init()" />
|
||||
<PUBLIC:ATTACH EVENT="ondetach" FOR="element" ONEVENT="cleanup()" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var doc = element.document;var f=window.PIE;
|
||||
if(!f){f=window.PIE={Q:"-pie-",nb:"Pie",La:"pie_",Ac:{TD:1,TH:1},cc:{TABLE:1,THEAD:1,TBODY:1,TFOOT:1,TR:1,INPUT:1,TEXTAREA:1,SELECT:1,OPTION:1,IMG:1,HR:1},fc:{A:1,INPUT:1,TEXTAREA:1,SELECT:1,BUTTON:1},Gd:{submit:1,button:1,reset:1},aa:function(){}};try{doc.execCommand("BackgroundImageCache",false,true)}catch(aa){}for(var X=4,Y=doc.createElement("div"),ca=Y.getElementsByTagName("i"),Z;Y.innerHTML="<!--[if gt IE "+ ++X+"]><i></i><![endif]--\>",ca[0];);f.V=X;if(X===6)f.Q=f.Q.replace(/^-/,"");f.Ba=doc.documentMode||
|
||||
f.V;Y.innerHTML='<v:shape adj="1"/>';Z=Y.firstChild;Z.style.behavior="url(#default#VML)";f.zc=typeof Z.adj==="object";(function(){var a,b=0,c={};f.p={Za:function(d){if(!a){a=doc.createDocumentFragment();a.namespaces.add("css3vml","urn:schemas-microsoft-com:vml")}return a.createElement("css3vml:"+d)},Aa:function(d){return d&&d._pieId||(d._pieId="_"+ ++b)},Eb:function(d){var e,g,i,j,h=arguments;e=1;for(g=h.length;e<g;e++){j=h[e];for(i in j)if(j.hasOwnProperty(i))d[i]=j[i]}return d},Rb:function(d,e,
|
||||
g){var i=c[d],j,h;if(i)Object.prototype.toString.call(i)==="[object Array]"?i.push([e,g]):e.call(g,i);else{h=c[d]=[[e,g]];j=new Image;j.onload=function(){i=c[d]={i:j.width,f:j.height};for(var k=0,n=h.length;k<n;k++)h[k][0].call(h[k][1],i);j.onload=null};j.src=d}}}})();f.Na={gc:function(a,b,c,d){function e(){k=i>=90&&i<270?b:0;n=i<180?c:0;l=b-k;q=c-n}function g(){for(;i<0;)i+=360;i%=360}var i=d.ra;d=d.zb;var j,h,k,n,l,q,s,m;if(d){d=d.coords(a,b,c);j=d.x;h=d.y}if(i){i=i.jd();g();e();if(!d){j=k;h=n}d=
|
||||
f.Na.tc(j,h,i,l,q);a=d[0];d=d[1]}else if(d){a=b-j;d=c-h}else{j=h=a=0;d=c}s=a-j;m=d-h;if(i===void 0){i=!s?m<0?90:270:!m?s<0?180:0:-Math.atan2(m,s)/Math.PI*180;g();e()}return{ra:i,xc:j,yc:h,td:a,ud:d,Vd:k,Wd:n,rd:l,sd:q,kd:s,ld:m,rc:f.Na.dc(j,h,a,d)}},tc:function(a,b,c,d,e){if(c===0||c===180)return[d,b];else if(c===90||c===270)return[a,e];else{c=Math.tan(-c*Math.PI/180);a=c*a-b;b=-1/c;d=b*d-e;e=b-c;return[(d-a)/e,(c*d-b*a)/e]}},dc:function(a,b,c,d){a=c-a;b=d-b;return Math.abs(a===0?b:b===0?a:Math.sqrt(a*
|
||||
a+b*b))}};f.ea=function(){this.Gb=[];this.oc={}};f.ea.prototype={ba:function(a){var b=f.p.Aa(a),c=this.oc,d=this.Gb;if(!(b in c)){c[b]=d.length;d.push(a)}},Ha:function(a){a=f.p.Aa(a);var b=this.oc;if(a&&a in b){delete this.Gb[b[a]];delete b[a]}},wa:function(){for(var a=this.Gb,b=a.length;b--;)a[b]&&a[b]()}};f.Oa=new f.ea;f.Oa.Qd=function(){var a=this;if(!a.Rd){setInterval(function(){a.wa()},250);a.Rd=1}};(function(){function a(){f.K.wa();window.detachEvent("onunload",a);window.PIE=null}f.K=new f.ea;
|
||||
window.attachEvent("onunload",a);f.K.sa=function(b,c,d){b.attachEvent(c,d);this.ba(function(){b.detachEvent(c,d)})}})();f.Qa=new f.ea;f.K.sa(window,"onresize",function(){f.Qa.wa()});(function(){function a(){f.mb.wa()}f.mb=new f.ea;f.K.sa(window,"onscroll",a);f.Qa.ba(a)})();(function(){function a(){c=f.kb.md()}function b(){if(c){for(var d=0,e=c.length;d<e;d++)f.attach(c[d]);c=0}}var c;f.K.sa(window,"onbeforeprint",a);f.K.sa(window,"onafterprint",b)})();f.lb=new f.ea;f.K.sa(doc,"onmouseup",function(){f.lb.wa()});
|
||||
f.ge=function(){function a(h){this.Y=h}var b=doc.createElement("length-calc"),c=doc.documentElement,d=b.style,e={},g=["mm","cm","in","pt","pc"],i=g.length,j={};d.position="absolute";d.top=d.left="-9999px";for(c.appendChild(b);i--;){b.style.width="100"+g[i];e[g[i]]=b.offsetWidth/100}c.removeChild(b);b.style.width="1em";a.prototype={Kb:/(px|em|ex|mm|cm|in|pt|pc|%)$/,ic:function(){var h=this.Id;if(h===void 0)h=this.Id=parseFloat(this.Y);return h},yb:function(){var h=this.$d;if(!h)h=this.$d=(h=this.Y.match(this.Kb))&&
|
||||
h[0]||"px";return h},a:function(h,k){var n=this.ic(),l=this.yb();switch(l){case "px":return n;case "%":return n*(typeof k==="function"?k():k)/100;case "em":return n*this.xb(h);case "ex":return n*this.xb(h)/2;default:return n*e[l]}},xb:function(h){var k=h.currentStyle.fontSize,n,l;if(k.indexOf("px")>0)return parseFloat(k);else if(h.tagName in f.cc){l=this;n=h.parentNode;return f.n(k).a(n,function(){return l.xb(n)})}else{h.appendChild(b);k=b.offsetWidth;b.parentNode===h&&h.removeChild(b);return k}}};
|
||||
f.n=function(h){return j[h]||(j[h]=new a(h))};return a}();f.Ja=function(){function a(e){this.X=e}var b=f.n("50%"),c={top:1,center:1,bottom:1},d={left:1,center:1,right:1};a.prototype={zd:function(){if(!this.ac){var e=this.X,g=e.length,i=f.v,j=i.pa,h=f.n("0");j=j.ma;h=["left",h,"top",h];if(g===1){e.push(new i.ob(j,"center"));g++}if(g===2){j&(e[0].k|e[1].k)&&e[0].d in c&&e[1].d in d&&e.push(e.shift());if(e[0].k&j)if(e[0].d==="center")h[1]=b;else h[0]=e[0].d;else if(e[0].W())h[1]=f.n(e[0].d);if(e[1].k&
|
||||
j)if(e[1].d==="center")h[3]=b;else h[2]=e[1].d;else if(e[1].W())h[3]=f.n(e[1].d)}this.ac=h}return this.ac},coords:function(e,g,i){var j=this.zd(),h=j[1].a(e,g);e=j[3].a(e,i);return{x:j[0]==="right"?g-h:h,y:j[2]==="bottom"?i-e:e}}};return a}();f.Ka=function(){function a(b,c){this.i=b;this.f=c}a.prototype={a:function(b,c,d,e,g){var i=this.i,j=this.f,h=c/d;e=e/g;if(i==="contain"){i=e>h?c:d*e;j=e>h?c/e:d}else if(i==="cover"){i=e<h?c:d*e;j=e<h?c/e:d}else if(i==="auto"){j=j==="auto"?g:j.a(b,d);i=j*e}else{i=
|
||||
i.a(b,c);j=j==="auto"?i/e:j.a(b,d)}return{i:i,f:j}}};a.Kc=new a("auto","auto");return a}();f.Ec=function(){function a(b){this.Y=b}a.prototype={Kb:/[a-z]+$/i,yb:function(){return this.ad||(this.ad=this.Y.match(this.Kb)[0].toLowerCase())},jd:function(){var b=this.Vc,c;if(b===undefined){b=this.yb();c=parseFloat(this.Y,10);b=this.Vc=b==="deg"?c:b==="rad"?c/Math.PI*180:b==="grad"?c/400*360:b==="turn"?c*360:0}return b}};return a}();f.Jc=function(){function a(c){this.Y=c}var b={};a.Pd=/\s*rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d+|\d*\.\d+)\s*\)\s*/;
|
||||
a.Fb={aliceblue:"F0F8FF",antiquewhite:"FAEBD7",aqua:"0FF",aquamarine:"7FFFD4",azure:"F0FFFF",beige:"F5F5DC",bisque:"FFE4C4",black:"000",blanchedalmond:"FFEBCD",blue:"00F",blueviolet:"8A2BE2",brown:"A52A2A",burlywood:"DEB887",cadetblue:"5F9EA0",chartreuse:"7FFF00",chocolate:"D2691E",coral:"FF7F50",cornflowerblue:"6495ED",cornsilk:"FFF8DC",crimson:"DC143C",cyan:"0FF",darkblue:"00008B",darkcyan:"008B8B",darkgoldenrod:"B8860B",darkgray:"A9A9A9",darkgreen:"006400",darkkhaki:"BDB76B",darkmagenta:"8B008B",
|
||||
darkolivegreen:"556B2F",darkorange:"FF8C00",darkorchid:"9932CC",darkred:"8B0000",darksalmon:"E9967A",darkseagreen:"8FBC8F",darkslateblue:"483D8B",darkslategray:"2F4F4F",darkturquoise:"00CED1",darkviolet:"9400D3",deeppink:"FF1493",deepskyblue:"00BFFF",dimgray:"696969",dodgerblue:"1E90FF",firebrick:"B22222",floralwhite:"FFFAF0",forestgreen:"228B22",fuchsia:"F0F",gainsboro:"DCDCDC",ghostwhite:"F8F8FF",gold:"FFD700",goldenrod:"DAA520",gray:"808080",green:"008000",greenyellow:"ADFF2F",honeydew:"F0FFF0",
|
||||
hotpink:"FF69B4",indianred:"CD5C5C",indigo:"4B0082",ivory:"FFFFF0",khaki:"F0E68C",lavender:"E6E6FA",lavenderblush:"FFF0F5",lawngreen:"7CFC00",lemonchiffon:"FFFACD",lightblue:"ADD8E6",lightcoral:"F08080",lightcyan:"E0FFFF",lightgoldenrodyellow:"FAFAD2",lightgreen:"90EE90",lightgrey:"D3D3D3",lightpink:"FFB6C1",lightsalmon:"FFA07A",lightseagreen:"20B2AA",lightskyblue:"87CEFA",lightslategray:"789",lightsteelblue:"B0C4DE",lightyellow:"FFFFE0",lime:"0F0",limegreen:"32CD32",linen:"FAF0E6",magenta:"F0F",
|
||||
maroon:"800000",mediumauqamarine:"66CDAA",mediumblue:"0000CD",mediumorchid:"BA55D3",mediumpurple:"9370D8",mediumseagreen:"3CB371",mediumslateblue:"7B68EE",mediumspringgreen:"00FA9A",mediumturquoise:"48D1CC",mediumvioletred:"C71585",midnightblue:"191970",mintcream:"F5FFFA",mistyrose:"FFE4E1",moccasin:"FFE4B5",navajowhite:"FFDEAD",navy:"000080",oldlace:"FDF5E6",olive:"808000",olivedrab:"688E23",orange:"FFA500",orangered:"FF4500",orchid:"DA70D6",palegoldenrod:"EEE8AA",palegreen:"98FB98",paleturquoise:"AFEEEE",
|
||||
palevioletred:"D87093",papayawhip:"FFEFD5",peachpuff:"FFDAB9",peru:"CD853F",pink:"FFC0CB",plum:"DDA0DD",powderblue:"B0E0E6",purple:"800080",red:"F00",rosybrown:"BC8F8F",royalblue:"4169E1",saddlebrown:"8B4513",salmon:"FA8072",sandybrown:"F4A460",seagreen:"2E8B57",seashell:"FFF5EE",sienna:"A0522D",silver:"C0C0C0",skyblue:"87CEEB",slateblue:"6A5ACD",slategray:"708090",snow:"FFFAFA",springgreen:"00FF7F",steelblue:"4682B4",tan:"D2B48C",teal:"008080",thistle:"D8BFD8",tomato:"FF6347",turquoise:"40E0D0",
|
||||
violet:"EE82EE",wheat:"F5DEB3",white:"FFF",whitesmoke:"F5F5F5",yellow:"FF0",yellowgreen:"9ACD32"};a.prototype={parse:function(){if(!this.Ua){var c=this.Y,d;if(d=c.match(a.Pd)){this.Ua="rgb("+d[1]+","+d[2]+","+d[3]+")";this.Yb=parseFloat(d[4])}else{if((d=c.toLowerCase())in a.Fb)c="#"+a.Fb[d];this.Ua=c;this.Yb=c==="transparent"?0:1}}},T:function(c){this.parse();return this.Ua==="currentColor"?c.currentStyle.color:this.Ua},fa:function(){this.parse();return this.Yb}};f.ha=function(c){return b[c]||(b[c]=
|
||||
new a(c))};return a}();f.v=function(){function a(c){this.$a=c;this.ch=0;this.X=[];this.Ga=0}var b=a.pa={Ia:1,Wb:2,B:4,Lc:8,Xb:16,ma:32,J:64,na:128,oa:256,Ra:512,Tc:1024,URL:2048};a.ob=function(c,d){this.k=c;this.d=d};a.ob.prototype={Ca:function(){return this.k&b.J||this.k&b.na&&this.d==="0"},W:function(){return this.Ca()||this.k&b.Ra}};a.prototype={ce:/\s/,Jd:/^[\+\-]?(\d*\.)?\d+/,url:/^url\(\s*("([^"]*)"|'([^']*)'|([!#$%&*-~]*))\s*\)/i,nc:/^\-?[_a-z][\w-]*/i,Xd:/^("([^"]*)"|'([^']*)')/,Bd:/^#([\da-f]{6}|[\da-f]{3})/i,
|
||||
ae:{px:b.J,em:b.J,ex:b.J,mm:b.J,cm:b.J,"in":b.J,pt:b.J,pc:b.J,deg:b.Ia,rad:b.Ia,grad:b.Ia},fd:{rgb:1,rgba:1,hsl:1,hsla:1},next:function(c){function d(q,s){q=new a.ob(q,s);if(!c){k.X.push(q);k.Ga++}return q}function e(){k.Ga++;return null}var g,i,j,h,k=this;if(this.Ga<this.X.length)return this.X[this.Ga++];for(;this.ce.test(this.$a.charAt(this.ch));)this.ch++;if(this.ch>=this.$a.length)return e();i=this.ch;g=this.$a.substring(this.ch);j=g.charAt(0);switch(j){case "#":if(h=g.match(this.Bd)){this.ch+=
|
||||
h[0].length;return d(b.B,h[0])}break;case '"':case "'":if(h=g.match(this.Xd)){this.ch+=h[0].length;return d(b.Tc,h[2]||h[3]||"")}break;case "/":case ",":this.ch++;return d(b.oa,j);case "u":if(h=g.match(this.url)){this.ch+=h[0].length;return d(b.URL,h[2]||h[3]||h[4]||"")}}if(h=g.match(this.Jd)){j=h[0];this.ch+=j.length;if(g.charAt(j.length)==="%"){this.ch++;return d(b.Ra,j+"%")}if(h=g.substring(j.length).match(this.nc)){j+=h[0];this.ch+=h[0].length;return d(this.ae[h[0].toLowerCase()]||b.Lc,j)}return d(b.na,
|
||||
j)}if(h=g.match(this.nc)){j=h[0];this.ch+=j.length;if(j.toLowerCase()in f.Jc.Fb||j==="currentColor"||j==="transparent")return d(b.B,j);if(g.charAt(j.length)==="("){this.ch++;if(j.toLowerCase()in this.fd){g=function(q){return q&&q.k&b.na};h=function(q){return q&&q.k&(b.na|b.Ra)};var n=function(q,s){return q&&q.d===s},l=function(){return k.next(1)};if((j.charAt(0)==="r"?h(l()):g(l()))&&n(l(),",")&&h(l())&&n(l(),",")&&h(l())&&(j==="rgb"||j==="hsa"||n(l(),",")&&g(l()))&&n(l(),")"))return d(b.B,this.$a.substring(i,
|
||||
this.ch));return e()}return d(b.Xb,j)}return d(b.ma,j)}this.ch++;return d(b.Wb,j)},D:function(){return this.X[this.Ga-- -2]},all:function(){for(;this.next(););return this.X},la:function(c,d){for(var e=[],g,i;g=this.next();){if(c(g)){i=true;this.D();break}e.push(g)}return d&&!i?null:e}};return a}();var da=function(a){this.e=a};da.prototype={Z:0,Nd:function(){var a=this.qb,b;return!a||(b=this.o())&&(a.x!==b.x||a.y!==b.y)},Sd:function(){var a=this.qb,b;return!a||(b=this.o())&&(a.i!==b.i||a.f!==b.f)},
|
||||
hc:function(){var a=this.e,b=a.getBoundingClientRect(),c=f.Ba===9;return{x:b.left,y:b.top,i:c?a.offsetWidth:b.right-b.left,f:c?a.offsetHeight:b.bottom-b.top}},o:function(){return this.Z?this.Va||(this.Va=this.hc()):this.hc()},Ad:function(){return!!this.qb},cb:function(){++this.Z},hb:function(){if(!--this.Z){if(this.Va)this.qb=this.Va;this.Va=null}}};(function(){function a(b){var c=f.p.Aa(b);return function(){if(this.Z){var d=this.$b||(this.$b={});return c in d?d[c]:(d[c]=b.call(this))}else return b.call(this)}}
|
||||
f.C={Z:0,ja:function(b){function c(d){this.e=d;this.Zb=this.ia()}f.p.Eb(c.prototype,f.C,b);c.$c={};return c},j:function(){var b=this.ia(),c=this.constructor.$c;return b?b in c?c[b]:(c[b]=this.ka(b)):null},ia:a(function(){var b=this.e,c=this.constructor,d=b.style;b=b.currentStyle;var e=this.va,g=this.Fa,i=c.Yc||(c.Yc=f.Q+e);c=c.Zc||(c.Zc=f.nb+g.charAt(0).toUpperCase()+g.substring(1));return d[c]||b.getAttribute(i)||d[g]||b.getAttribute(e)}),h:a(function(){return!!this.j()}),G:a(function(){var b=this.ia(),
|
||||
c=b!==this.Zb;this.Zb=b;return c}),ua:a,cb:function(){++this.Z},hb:function(){--this.Z||delete this.$b}}})();f.Sb=f.C.ja({va:f.Q+"background",Fa:f.nb+"Background",cd:{scroll:1,fixed:1,local:1},fb:{"repeat-x":1,"repeat-y":1,repeat:1,"no-repeat":1},sc:{"padding-box":1,"border-box":1,"content-box":1},Od:{top:1,right:1,bottom:1,left:1,center:1},Td:{contain:1,cover:1},eb:{Ma:"backgroundClip",B:"backgroundColor",da:"backgroundImage",Pa:"backgroundOrigin",R:"backgroundPosition",S:"backgroundRepeat",Sa:"backgroundSize"},
|
||||
ka:function(a){function b(v){return v&&v.W()||v.k&k&&v.d in m}function c(v){return v&&(v.W()&&f.n(v.d)||v.d==="auto"&&"auto")}var d=this.e.currentStyle,e,g,i,j=f.v.pa,h=j.oa,k=j.ma,n=j.B,l,q,s=0,m=this.Od,r,p,t={L:[]};if(this.wb()){e=new f.v(a);for(i={};g=e.next();){l=g.k;q=g.d;if(!i.N&&l&j.Xb&&q==="linear-gradient"){r={ca:[],N:q};for(p={};g=e.next();){l=g.k;q=g.d;if(l&j.Wb&&q===")"){p.color&&r.ca.push(p);r.ca.length>1&&f.p.Eb(i,r);break}if(l&n){if(r.ra||r.zb){g=e.D();if(g.k!==h)break;e.next()}p=
|
||||
{color:f.ha(q)};g=e.next();if(g.W())p.db=f.n(g.d);else e.D()}else if(l&j.Ia&&!r.ra&&!p.color&&!r.ca.length)r.ra=new f.Ec(g.d);else if(b(g)&&!r.zb&&!p.color&&!r.ca.length){e.D();r.zb=new f.Ja(e.la(function(v){return!b(v)},false))}else if(l&h&&q===","){if(p.color){r.ca.push(p);p={}}}else break}}else if(!i.N&&l&j.URL){i.Ab=q;i.N="image"}else if(b(g)&&!i.$){e.D();i.$=new f.Ja(e.la(function(v){return!b(v)},false))}else if(l&k)if(q in this.fb&&!i.bb)i.bb=q;else if(q in this.sc&&!i.Wa){i.Wa=q;if((g=e.next())&&
|
||||
g.k&k&&g.d in this.sc)i.ub=g.d;else{i.ub=q;e.D()}}else if(q in this.cd&&!i.bc)i.bc=q;else return null;else if(l&n&&!t.color)t.color=f.ha(q);else if(l&h&&q==="/"&&!i.Xa&&i.$){g=e.next();if(g.k&k&&g.d in this.Td)i.Xa=new f.Ka(g.d);else if(g=c(g)){l=c(e.next());if(!l){l=g;e.D()}i.Xa=new f.Ka(g,l)}else return null}else if(l&h&&q===","&&i.N){i.Hb=a.substring(s,e.ch-1);s=e.ch;t.L.push(i);i={}}else return null}if(i.N){i.Hb=a.substring(s);t.L.push(i)}}else this.Bc(f.Ba<9?function(){var v=this.eb,o=d[v.R+
|
||||
"X"],u=d[v.R+"Y"],x=d[v.da],y=d[v.B];if(y!=="transparent")t.color=f.ha(y);if(x!=="none")t.L=[{N:"image",Ab:(new f.v(x)).next().d,bb:d[v.S],$:new f.Ja((new f.v(o+" "+u)).all())}]}:function(){var v=this.eb,o=/\s*,\s*/,u=d[v.da].split(o),x=d[v.B],y,z,D,G,E,B;if(x!=="transparent")t.color=f.ha(x);if((G=u.length)&&u[0]!=="none"){x=d[v.S].split(o);y=d[v.R].split(o);z=d[v.Pa].split(o);D=d[v.Ma].split(o);v=d[v.Sa].split(o);t.L=[];for(o=0;o<G;o++)if((E=u[o])&&E!=="none"){B=v[o].split(" ");t.L.push({Hb:E+" "+
|
||||
x[o]+" "+y[o]+" / "+v[o]+" "+z[o]+" "+D[o],N:"image",Ab:(new f.v(E)).next().d,bb:x[o],$:new f.Ja((new f.v(y[o])).all()),Wa:z[o],ub:D[o],Xa:new f.Ka(B[0],B[1])})}}});return t.color||t.L[0]?t:null},Bc:function(a){var b=f.Ba>8,c=this.eb,d=this.e.runtimeStyle,e=d[c.da],g=d[c.B],i=d[c.S],j,h,k,n;if(e)d[c.da]="";if(g)d[c.B]="";if(i)d[c.S]="";if(b){j=d[c.Ma];h=d[c.Pa];n=d[c.R];k=d[c.Sa];if(j)d[c.Ma]="";if(h)d[c.Pa]="";if(n)d[c.R]="";if(k)d[c.Sa]=""}a=a.call(this);if(e)d[c.da]=e;if(g)d[c.B]=g;if(i)d[c.S]=
|
||||
i;if(b){if(j)d[c.Ma]=j;if(h)d[c.Pa]=h;if(n)d[c.R]=n;if(k)d[c.Sa]=k}return a},ia:f.C.ua(function(){return this.wb()||this.Bc(function(){var a=this.e.currentStyle,b=this.eb;return a[b.B]+" "+a[b.da]+" "+a[b.S]+" "+a[b.R+"X"]+" "+a[b.R+"Y"]})}),wb:f.C.ua(function(){var a=this.e;return a.style[this.Fa]||a.currentStyle.getAttribute(this.va)}),qc:function(){var a=0;if(f.V<7){a=this.e;a=""+(a.style[f.nb+"PngFix"]||a.currentStyle.getAttribute(f.Q+"png-fix"))==="true"}return a},h:f.C.ua(function(){return(this.wb()||
|
||||
this.qc())&&!!this.j()})});f.Vb=f.C.ja({wc:["Top","Right","Bottom","Left"],Hd:{thin:"1px",medium:"3px",thick:"5px"},ka:function(){var a={},b={},c={},d=false,e=true,g=true,i=true;this.Cc(function(){for(var j=this.e.currentStyle,h=0,k,n,l,q,s,m,r;h<4;h++){l=this.wc[h];r=l.charAt(0).toLowerCase();k=b[r]=j["border"+l+"Style"];n=j["border"+l+"Color"];l=j["border"+l+"Width"];if(h>0){if(k!==q)g=false;if(n!==s)e=false;if(l!==m)i=false}q=k;s=n;m=l;c[r]=f.ha(n);l=a[r]=f.n(b[r]==="none"?"0":this.Hd[l]||l);if(l.a(this.e)>
|
||||
0)d=true}});return d?{I:a,Yd:b,gd:c,de:i,hd:e,Zd:g}:null},ia:f.C.ua(function(){var a=this.e,b=a.currentStyle,c;a.tagName in f.Ac&&a.offsetParent.currentStyle.borderCollapse==="collapse"||this.Cc(function(){c=b.borderWidth+"|"+b.borderStyle+"|"+b.borderColor});return c}),Cc:function(a){var b=this.e.runtimeStyle,c=b.borderWidth,d=b.borderColor;if(c)b.borderWidth="";if(d)b.borderColor="";a=a.call(this);if(c)b.borderWidth=c;if(d)b.borderColor=d;return a}});(function(){f.jb=f.C.ja({va:"border-radius",
|
||||
Fa:"borderRadius",ka:function(b){var c=null,d,e,g,i,j=false;if(b){e=new f.v(b);var h=function(){for(var k=[],n;(g=e.next())&&g.W();){i=f.n(g.d);n=i.ic();if(n<0)return null;if(n>0)j=true;k.push(i)}return k.length>0&&k.length<5?{tl:k[0],tr:k[1]||k[0],br:k[2]||k[0],bl:k[3]||k[1]||k[0]}:null};if(b=h()){if(g){if(g.k&f.v.pa.oa&&g.d==="/")d=h()}else d=b;if(j&&b&&d)c={x:b,y:d}}}return c}});var a=f.n("0");a={tl:a,tr:a,br:a,bl:a};f.jb.Dc={x:a,y:a}})();f.Ub=f.C.ja({va:"border-image",Fa:"borderImage",fb:{stretch:1,
|
||||
round:1,repeat:1,space:1},ka:function(a){var b=null,c,d,e,g,i,j,h=0,k=f.v.pa,n=k.ma,l=k.na,q=k.Ra;if(a){c=new f.v(a);b={};for(var s=function(p){return p&&p.k&k.oa&&p.d==="/"},m=function(p){return p&&p.k&n&&p.d==="fill"},r=function(){g=c.la(function(p){return!(p.k&(l|q))});if(m(c.next())&&!b.fill)b.fill=true;else c.D();if(s(c.next())){h++;i=c.la(function(p){return!p.W()&&!(p.k&n&&p.d==="auto")});if(s(c.next())){h++;j=c.la(function(p){return!p.Ca()})}}else c.D()};a=c.next();){d=a.k;e=a.d;if(d&(l|q)&&
|
||||
!g){c.D();r()}else if(m(a)&&!b.fill){b.fill=true;r()}else if(d&n&&this.fb[e]&&!b.repeat){b.repeat={f:e};if(a=c.next())if(a.k&n&&this.fb[a.d])b.repeat.Ob=a.d;else c.D()}else if(d&k.URL&&!b.src)b.src=e;else return null}if(!b.src||!g||g.length<1||g.length>4||i&&i.length>4||h===1&&i.length<1||j&&j.length>4||h===2&&j.length<1)return null;if(!b.repeat)b.repeat={f:"stretch"};if(!b.repeat.Ob)b.repeat.Ob=b.repeat.f;a=function(p,t){return{t:t(p[0]),r:t(p[1]||p[0]),b:t(p[2]||p[0]),l:t(p[3]||p[1]||p[0])}};b.slice=
|
||||
a(g,function(p){return f.n(p.k&l?p.d+"px":p.d)});if(i&&i[0])b.I=a(i,function(p){return p.W()?f.n(p.d):p.d});if(j&&j[0])b.Da=a(j,function(p){return p.Ca()?f.n(p.d):p.d})}return b}});f.Ic=f.C.ja({va:"box-shadow",Fa:"boxShadow",ka:function(a){var b,c=f.n,d=f.v.pa,e;if(a){e=new f.v(a);b={Da:[],Bb:[]};for(a=function(){for(var g,i,j,h,k,n;g=e.next();){j=g.d;i=g.k;if(i&d.oa&&j===",")break;else if(g.Ca()&&!k){e.D();k=e.la(function(l){return!l.Ca()})}else if(i&d.B&&!h)h=j;else if(i&d.ma&&j==="inset"&&!n)n=
|
||||
true;else return false}g=k&&k.length;if(g>1&&g<5){(n?b.Bb:b.Da).push({ee:c(k[0].d),fe:c(k[1].d),blur:c(k[2]?k[2].d:"0"),Ud:c(k[3]?k[3].d:"0"),color:f.ha(h||"currentColor")});return true}return false};a(););}return b&&(b.Bb.length||b.Da.length)?b:null}});f.Uc=f.C.ja({ia:f.C.ua(function(){var a=this.e.currentStyle;return a.visibility+"|"+a.display}),ka:function(){var a=this.e,b=a.runtimeStyle;a=a.currentStyle;var c=b.visibility,d;b.visibility="";d=a.visibility;b.visibility=c;return{be:d!=="hidden",
|
||||
nd:a.display!=="none"}},h:function(){return false}});f.u={P:function(a){function b(c,d,e,g){this.e=c;this.s=d;this.g=e;this.parent=g}f.p.Eb(b.prototype,f.u,a);return b},Cb:false,O:function(){return false},Ea:f.aa,Lb:function(){this.m();this.h()&&this.U()},ib:function(){this.Cb=true},Mb:function(){this.h()?this.U():this.m()},sb:function(a,b){this.vc(a);for(var c=this.qa||(this.qa=[]),d=a+1,e=c.length,g;d<e;d++)if(g=c[d])break;c[a]=b;this.H().insertBefore(b,g||null)},ya:function(a){var b=this.qa;return b&&
|
||||
b[a]||null},vc:function(a){var b=this.ya(a),c=this.Ta;if(b&&c){c.removeChild(b);this.qa[a]=null}},za:function(a,b,c,d){var e=this.rb||(this.rb={}),g=e[a];if(!g){g=e[a]=f.p.Za("shape");if(b)g.appendChild(g[b]=f.p.Za(b));if(d){c=this.ya(d);if(!c){this.sb(d,doc.createElement("group"+d));c=this.ya(d)}}c.appendChild(g);a=g.style;a.position="absolute";a.left=a.top=0;a.behavior="url(#default#VML)"}return g},vb:function(a){var b=this.rb,c=b&&b[a];if(c){c.parentNode.removeChild(c);delete b[a]}return!!c},kc:function(a){var b=
|
||||
this.e,c=this.s.o(),d=c.i,e=c.f,g,i,j,h,k,n;c=a.x.tl.a(b,d);g=a.y.tl.a(b,e);i=a.x.tr.a(b,d);j=a.y.tr.a(b,e);h=a.x.br.a(b,d);k=a.y.br.a(b,e);n=a.x.bl.a(b,d);a=a.y.bl.a(b,e);d=Math.min(d/(c+i),e/(j+k),d/(n+h),e/(g+a));if(d<1){c*=d;g*=d;i*=d;j*=d;h*=d;k*=d;n*=d;a*=d}return{x:{tl:c,tr:i,br:h,bl:n},y:{tl:g,tr:j,br:k,bl:a}}},xa:function(a,b,c){b=b||1;var d,e,g=this.s.o();e=g.i*b;g=g.f*b;var i=this.g.F,j=Math.floor,h=Math.ceil,k=a?a.Jb*b:0,n=a?a.Ib*b:0,l=a?a.tb*b:0;a=a?a.Db*b:0;var q,s,m,r,p;if(c||i.h()){d=
|
||||
this.kc(c||i.j());c=d.x.tl*b;i=d.y.tl*b;q=d.x.tr*b;s=d.y.tr*b;m=d.x.br*b;r=d.y.br*b;p=d.x.bl*b;b=d.y.bl*b;e="m"+j(a)+","+j(i)+"qy"+j(c)+","+j(k)+"l"+h(e-q)+","+j(k)+"qx"+h(e-n)+","+j(s)+"l"+h(e-n)+","+h(g-r)+"qy"+h(e-m)+","+h(g-l)+"l"+j(p)+","+h(g-l)+"qx"+j(a)+","+h(g-b)+" x e"}else e="m"+j(a)+","+j(k)+"l"+h(e-n)+","+j(k)+"l"+h(e-n)+","+h(g-l)+"l"+j(a)+","+h(g-l)+"xe";return e},H:function(){var a=this.parent.ya(this.M),b;if(!a){a=doc.createElement(this.Ya);b=a.style;b.position="absolute";b.top=b.left=
|
||||
0;this.parent.sb(this.M,a)}return a},mc:function(){var a=this.e,b=a.currentStyle,c=a.runtimeStyle,d=a.tagName,e=f.V===6,g;if(e&&(d in f.cc||d==="FIELDSET")||d==="BUTTON"||d==="INPUT"&&a.type in f.Gd){c.borderWidth="";d=this.g.z.wc;for(g=d.length;g--;){e=d[g];c["padding"+e]="";c["padding"+e]=f.n(b["padding"+e]).a(a)+f.n(b["border"+e+"Width"]).a(a)+(f.V!==8&&g%2?1:0)}c.borderWidth=0}else if(e){if(a.childNodes.length!==1||a.firstChild.tagName!=="ie6-mask"){b=doc.createElement("ie6-mask");d=b.style;d.visibility=
|
||||
"visible";for(d.zoom=1;d=a.firstChild;)b.appendChild(d);a.appendChild(b);c.visibility="hidden"}}else c.borderColor="transparent"},he:function(){},m:function(){this.parent.vc(this.M);delete this.rb;delete this.qa}};f.Rc=f.u.P({h:function(){var a=this.ed;for(var b in a)if(a.hasOwnProperty(b)&&a[b].h())return true;return false},O:function(){return this.g.Pb.G()},ib:function(){if(this.h()){var a=this.jc(),b=a,c;a=a.currentStyle;var d=a.position,e=this.H().style,g=0,i=0;i=this.s.o();if(d==="fixed"&&f.V>
|
||||
6){g=i.x;i=i.y;b=d}else{do b=b.offsetParent;while(b&&b.currentStyle.position==="static");if(b){c=b.getBoundingClientRect();b=b.currentStyle;g=i.x-c.left-(parseFloat(b.borderLeftWidth)||0);i=i.y-c.top-(parseFloat(b.borderTopWidth)||0)}else{b=doc.documentElement;g=i.x+b.scrollLeft-b.clientLeft;i=i.y+b.scrollTop-b.clientTop}b="absolute"}e.position=b;e.left=g;e.top=i;e.zIndex=d==="static"?-1:a.zIndex;this.Cb=true}},Mb:f.aa,Nb:function(){var a=this.g.Pb.j();this.H().style.display=a.be&&a.nd?"":"none"},
|
||||
Lb:function(){this.h()?this.Nb():this.m()},jc:function(){var a=this.e;return a.tagName in f.Ac?a.offsetParent:a},H:function(){var a=this.Ta,b;if(!a){b=this.jc();a=this.Ta=doc.createElement("css3-container");a.style.direction="ltr";this.Nb();b.parentNode.insertBefore(a,b)}return a},ab:f.aa,m:function(){var a=this.Ta,b;if(a&&(b=a.parentNode))b.removeChild(a);delete this.Ta;delete this.qa}});f.Fc=f.u.P({M:2,Ya:"background",O:function(){var a=this.g;return a.w.G()||a.F.G()},h:function(){var a=this.g;
|
||||
return a.q.h()||a.F.h()||a.w.h()||a.ga.h()&&a.ga.j().Bb},U:function(){var a=this.s.o();if(a.i&&a.f){this.od();this.pd()}},od:function(){var a=this.g.w.j(),b=this.s.o(),c=this.e,d=a&&a.color,e,g;if(d&&d.fa()>0){this.lc();a=this.za("bgColor","fill",this.H(),1);e=b.i;b=b.f;a.stroked=false;a.coordsize=e*2+","+b*2;a.coordorigin="1,1";a.path=this.xa(null,2);g=a.style;g.width=e;g.height=b;a.fill.color=d.T(c);c=d.fa();if(c<1)a.fill.opacity=c}else this.vb("bgColor")},pd:function(){var a=this.g.w.j(),b=this.s.o();
|
||||
a=a&&a.L;var c,d,e,g,i;if(a){this.lc();d=b.i;e=b.f;for(i=a.length;i--;){b=a[i];c=this.za("bgImage"+i,"fill",this.H(),2);c.stroked=false;c.fill.type="tile";c.fillcolor="none";c.coordsize=d*2+","+e*2;c.coordorigin="1,1";c.path=this.xa(0,2);g=c.style;g.width=d;g.height=e;if(b.N==="linear-gradient")this.bd(c,b);else{c.fill.src=b.Ab;this.Md(c,i)}}}for(i=a?a.length:0;this.vb("bgImage"+i++););},Md:function(a,b){var c=this;f.p.Rb(a.fill.src,function(d){var e=c.e,g=c.s.o(),i=g.i;g=g.f;if(i&&g){var j=a.fill,
|
||||
h=c.g,k=h.z.j(),n=k&&k.I;k=n?n.t.a(e):0;var l=n?n.r.a(e):0,q=n?n.b.a(e):0;n=n?n.l.a(e):0;h=h.w.j().L[b];e=h.$?h.$.coords(e,i-d.i-n-l,g-d.f-k-q):{x:0,y:0};h=h.bb;q=l=0;var s=i+1,m=g+1,r=f.V===8?0:1;n=Math.round(e.x)+n+0.5;k=Math.round(e.y)+k+0.5;j.position=n/i+","+k/g;if(h&&h!=="repeat"){if(h==="repeat-x"||h==="no-repeat"){l=k+1;m=k+d.f+r}if(h==="repeat-y"||h==="no-repeat"){q=n+1;s=n+d.i+r}a.style.clip="rect("+l+"px,"+s+"px,"+m+"px,"+q+"px)"}}})},bd:function(a,b){var c=this.e,d=this.s.o(),e=d.i,g=
|
||||
d.f;a=a.fill;d=b.ca;var i=d.length,j=Math.PI,h=f.Na,k=h.tc,n=h.dc;b=h.gc(c,e,g,b);h=b.ra;var l=b.xc,q=b.yc,s=b.Vd,m=b.Wd,r=b.rd,p=b.sd,t=b.kd,v=b.ld;b=b.rc;e=h%90?Math.atan2(t*e/g,v)/j*180:h+90;e+=180;e%=360;r=k(s,m,h,r,p);g=n(s,m,r[0],r[1]);j=[];r=k(l,q,h,s,m);n=n(l,q,r[0],r[1])/g*100;k=[];for(h=0;h<i;h++)k.push(d[h].db?d[h].db.a(c,b):h===0?0:h===i-1?b:null);for(h=1;h<i;h++){if(k[h]===null){l=k[h-1];b=h;do q=k[++b];while(q===null);k[h]=l+(q-l)/(b-h+1)}k[h]=Math.max(k[h],k[h-1])}for(h=0;h<i;h++)j.push(n+
|
||||
k[h]/g*100+"% "+d[h].color.T(c));a.angle=e;a.type="gradient";a.method="sigma";a.color=d[0].color.T(c);a.color2=d[i-1].color.T(c);if(a.colors)a.colors.value=j.join(",");else a.colors=j.join(",")},lc:function(){var a=this.e.runtimeStyle;a.backgroundImage="url(about:blank)";a.backgroundColor="transparent"},m:function(){f.u.m.call(this);var a=this.e.runtimeStyle;a.backgroundImage=a.backgroundColor=""}});f.Gc=f.u.P({M:4,Ya:"border",O:function(){var a=this.g;return a.z.G()||a.F.G()},h:function(){var a=
|
||||
this.g;return(a.F.h()||a.w.h())&&!a.q.h()&&a.z.h()},U:function(){var a=this.e,b=this.g.z.j(),c=this.s.o(),d=c.i;c=c.f;var e,g,i,j,h;if(b){this.mc();b=this.wd(2);j=0;for(h=b.length;j<h;j++){i=b[j];e=this.za("borderPiece"+j,i.stroke?"stroke":"fill",this.H());e.coordsize=d*2+","+c*2;e.coordorigin="1,1";e.path=i.path;g=e.style;g.width=d;g.height=c;e.filled=!!i.fill;e.stroked=!!i.stroke;if(i.stroke){e=e.stroke;e.weight=i.Qb+"px";e.color=i.color.T(a);e.dashstyle=i.stroke==="dashed"?"2 2":i.stroke==="dotted"?
|
||||
"1 1":"solid";e.linestyle=i.stroke==="double"&&i.Qb>2?"ThinThin":"Single"}else e.fill.color=i.fill.T(a)}for(;this.vb("borderPiece"+j++););}},wd:function(a){var b=this.e,c,d,e,g=this.g.z,i=[],j,h,k,n,l=Math.round,q,s,m;if(g.h()){c=g.j();g=c.I;s=c.Yd;m=c.gd;if(c.de&&c.Zd&&c.hd){if(m.t.fa()>0){c=g.t.a(b);k=c/2;i.push({path:this.xa({Jb:k,Ib:k,tb:k,Db:k},a),stroke:s.t,color:m.t,Qb:c})}}else{a=a||1;c=this.s.o();d=c.i;e=c.f;c=l(g.t.a(b));k=l(g.r.a(b));n=l(g.b.a(b));b=l(g.l.a(b));var r={t:c,r:k,b:n,l:b};
|
||||
b=this.g.F;if(b.h())q=this.kc(b.j());j=Math.floor;h=Math.ceil;var p=function(o,u){return q?q[o][u]:0},t=function(o,u,x,y,z,D){var G=p("x",o),E=p("y",o),B=o.charAt(1)==="r";o=o.charAt(0)==="b";return G>0&&E>0?(D?"al":"ae")+(B?h(d-G):j(G))*a+","+(o?h(e-E):j(E))*a+","+(j(G)-u)*a+","+(j(E)-x)*a+","+y*65535+","+2949075*(z?1:-1):(D?"m":"l")+(B?d-u:u)*a+","+(o?e-x:x)*a},v=function(o,u,x,y){var z=o==="t"?j(p("x","tl"))*a+","+h(u)*a:o==="r"?h(d-u)*a+","+j(p("y","tr"))*a:o==="b"?h(d-p("x","br"))*a+","+j(e-
|
||||
u)*a:j(u)*a+","+h(e-p("y","bl"))*a;o=o==="t"?h(d-p("x","tr"))*a+","+h(u)*a:o==="r"?h(d-u)*a+","+h(e-p("y","br"))*a:o==="b"?j(p("x","bl"))*a+","+j(e-u)*a:j(u)*a+","+j(p("y","tl"))*a;return x?(y?"m"+o:"")+"l"+z:(y?"m"+z:"")+"l"+o};b=function(o,u,x,y,z,D){var G=o==="l"||o==="r",E=r[o],B,A;if(E>0&&s[o]!=="none"&&m[o].fa()>0){B=r[G?o:u];u=r[G?u:o];A=r[G?o:x];x=r[G?x:o];if(s[o]==="dashed"||s[o]==="dotted"){i.push({path:t(y,B,u,D+45,0,1)+t(y,0,0,D,1,0),fill:m[o]});i.push({path:v(o,E/2,0,1),stroke:s[o],Qb:E,
|
||||
color:m[o]});i.push({path:t(z,A,x,D,0,1)+t(z,0,0,D-45,1,0),fill:m[o]})}else i.push({path:t(y,B,u,D+45,0,1)+v(o,E,0,0)+t(z,A,x,D,0,0)+(s[o]==="double"&&E>2?t(z,A-j(A/3),x-j(x/3),D-45,1,0)+v(o,h(E/3*2),1,0)+t(y,B-j(B/3),u-j(u/3),D,1,0)+"x "+t(y,j(B/3),j(u/3),D+45,0,1)+v(o,j(E/3),1,0)+t(z,j(A/3),j(x/3),D,0,0):"")+t(z,0,0,D-45,1,0)+v(o,0,1,0)+t(y,0,0,D,1,0),fill:m[o]})}};b("t","l","r","tl","tr",90);b("r","t","b","tr","br",0);b("b","r","l","br","bl",-90);b("l","b","t","bl","tl",-180)}}return i},m:function(){if(this.ec||
|
||||
!this.g.q.h())this.e.runtimeStyle.borderColor="";f.u.m.call(this)}});f.Tb=f.u.P({M:5,Ld:["t","tr","r","br","b","bl","l","tl","c"],O:function(){return this.g.q.G()},h:function(){return this.g.q.h()},U:function(){this.H();var a=this.g.q.j(),b=this.g.z.j(),c=this.s.o(),d=this.e,e=this.uc;f.p.Rb(a.src,function(g){function i(v,o,u,x,y){v=e[v].style;var z=Math.max;v.width=z(o,0);v.height=z(u,0);v.left=x;v.top=y}function j(v,o,u){for(var x=0,y=v.length;x<y;x++)e[v[x]].imagedata[o]=u}var h=c.i,k=c.f,n=f.n("0"),
|
||||
l=a.I||(b?b.I:{t:n,r:n,b:n,l:n});n=l.t.a(d);var q=l.r.a(d),s=l.b.a(d);l=l.l.a(d);var m=a.slice,r=m.t.a(d),p=m.r.a(d),t=m.b.a(d);m=m.l.a(d);i("tl",l,n,0,0);i("t",h-l-q,n,l,0);i("tr",q,n,h-q,0);i("r",q,k-n-s,h-q,n);i("br",q,s,h-q,k-s);i("b",h-l-q,s,l,k-s);i("bl",l,s,0,k-s);i("l",l,k-n-s,0,n);i("c",h-l-q,k-n-s,l,n);j(["tl","t","tr"],"cropBottom",(g.f-r)/g.f);j(["tl","l","bl"],"cropRight",(g.i-m)/g.i);j(["bl","b","br"],"cropTop",(g.f-t)/g.f);j(["tr","r","br"],"cropLeft",(g.i-p)/g.i);j(["l","r","c"],"cropTop",
|
||||
r/g.f);j(["l","r","c"],"cropBottom",t/g.f);j(["t","b","c"],"cropLeft",m/g.i);j(["t","b","c"],"cropRight",p/g.i);e.c.style.display=a.fill?"":"none"},this)},H:function(){var a=this.parent.ya(this.M),b,c,d,e=this.Ld,g=e.length;if(!a){a=doc.createElement("border-image");b=a.style;b.position="absolute";this.uc={};for(d=0;d<g;d++){c=this.uc[e[d]]=f.p.Za("rect");c.appendChild(f.p.Za("imagedata"));b=c.style;b.behavior="url(#default#VML)";b.position="absolute";b.top=b.left=0;c.imagedata.src=this.g.q.j().src;
|
||||
c.stroked=false;c.filled=false;a.appendChild(c)}this.parent.sb(this.M,a)}return a},Ea:function(){if(this.h()){var a=this.e,b=a.runtimeStyle,c=this.g.q.j().I;b.borderStyle="solid";if(c){b.borderTopWidth=c.t.a(a)+"px";b.borderRightWidth=c.r.a(a)+"px";b.borderBottomWidth=c.b.a(a)+"px";b.borderLeftWidth=c.l.a(a)+"px"}this.mc()}},m:function(){var a=this.e.runtimeStyle;a.borderStyle="";if(this.ec||!this.g.z.h())a.borderColor=a.borderWidth="";f.u.m.call(this)}});f.Hc=f.u.P({M:1,Ya:"outset-box-shadow",O:function(){var a=
|
||||
this.g;return a.ga.G()||a.F.G()},h:function(){var a=this.g.ga;return a.h()&&a.j().Da[0]},U:function(){function a(B,A,L,N,H,I,F){B=b.za("shadow"+B+A,"fill",d,i-B);A=B.fill;B.coordsize=n*2+","+l*2;B.coordorigin="1,1";B.stroked=false;B.filled=true;A.color=H.T(c);if(I){A.type="gradienttitle";A.color2=A.color;A.opacity=0}B.path=F;p=B.style;p.left=L;p.top=N;p.width=n;p.height=l;return B}var b=this,c=this.e,d=this.H(),e=this.g,g=e.ga.j().Da;e=e.F.j();var i=g.length,j=i,h,k=this.s.o(),n=k.i,l=k.f;k=f.V===
|
||||
8?1:0;for(var q=["tl","tr","br","bl"],s,m,r,p,t,v,o,u,x,y,z,D,G,E;j--;){m=g[j];t=m.ee.a(c);v=m.fe.a(c);h=m.Ud.a(c);o=m.blur.a(c);m=m.color;u=-h-o;if(!e&&o)e=f.jb.Dc;u=this.xa({Jb:u,Ib:u,tb:u,Db:u},2,e);if(o){x=(h+o)*2+n;y=(h+o)*2+l;z=o*2/x;D=o*2/y;if(o-h>n/2||o-h>l/2)for(h=4;h--;){s=q[h];G=s.charAt(0)==="b";E=s.charAt(1)==="r";s=a(j,s,t,v,m,o,u);r=s.fill;r.focusposition=(E?1-z:z)+","+(G?1-D:D);r.focussize="0,0";s.style.clip="rect("+((G?y/2:0)+k)+"px,"+(E?x:x/2)+"px,"+(G?y:y/2)+"px,"+((E?x/2:0)+k)+
|
||||
"px)"}else{s=a(j,"",t,v,m,o,u);r=s.fill;r.focusposition=z+","+D;r.focussize=1-z*2+","+(1-D*2)}}else{s=a(j,"",t,v,m,o,u);t=m.fa();if(t<1)s.fill.opacity=t}}}});f.Pc=f.u.P({M:6,Ya:"imgEl",O:function(){var a=this.g;return this.e.src!==this.Xc||a.F.G()},h:function(){var a=this.g;return a.F.h()||a.w.qc()},U:function(){this.Xc=i;this.Cd();var a=this.za("img","fill",this.H()),b=a.fill,c=this.s.o(),d=c.i;c=c.f;var e=this.g.z.j(),g=e&&e.I;e=this.e;var i=e.src,j=Math.round,h=e.currentStyle,k=f.n;if(!g||f.V<
|
||||
7){g=f.n("0");g={t:g,r:g,b:g,l:g}}a.stroked=false;b.type="frame";b.src=i;b.position=(d?0.5/d:0)+","+(c?0.5/c:0);a.coordsize=d*2+","+c*2;a.coordorigin="1,1";a.path=this.xa({Jb:j(g.t.a(e)+k(h.paddingTop).a(e)),Ib:j(g.r.a(e)+k(h.paddingRight).a(e)),tb:j(g.b.a(e)+k(h.paddingBottom).a(e)),Db:j(g.l.a(e)+k(h.paddingLeft).a(e))},2);a=a.style;a.width=d;a.height=c},Cd:function(){this.e.runtimeStyle.filter="alpha(opacity=0)"},m:function(){f.u.m.call(this);this.e.runtimeStyle.filter=""}});f.Oc=f.u.P({ib:f.aa,
|
||||
Mb:f.aa,Nb:f.aa,Lb:f.aa,Kd:/^,+|,+$/g,Fd:/,+/g,gb:function(a,b){(this.pb||(this.pb=[]))[a]=b||void 0},ab:function(){var a=this.pb,b;if(a&&(b=a.join(",").replace(this.Kd,"").replace(this.Fd,","))!==this.Wc)this.Wc=this.e.runtimeStyle.background=b},m:function(){this.e.runtimeStyle.background="";delete this.pb}});f.Mc=f.u.P({ta:1,O:function(){return this.g.w.G()},h:function(){var a=this.g;return a.w.h()||a.q.h()},U:function(){var a=this.g.w.j(),b,c,d=0,e,g;if(a){b=[];if(c=a.L)for(;e=c[d++];)if(e.N===
|
||||
"linear-gradient"){g=this.vd(e.Wa);g=(e.Xa||f.Ka.Kc).a(this.e,g.i,g.f,g.i,g.f);b.push("url(data:image/svg+xml,"+escape(this.xd(e,g.i,g.f))+") "+this.dd(e.$)+" / "+g.i+"px "+g.f+"px "+(e.bc||"")+" "+(e.Wa||"")+" "+(e.ub||""))}else b.push(e.Hb);a.color&&b.push(a.color.Y);this.parent.gb(this.ta,b.join(","))}},dd:function(a){return a?a.X.map(function(b){return b.d}).join(" "):"0 0"},vd:function(a){var b=this.e,c=this.s.o(),d=c.i;c=c.f;var e;if(a!=="border-box")if((e=this.g.z.j())&&(e=e.I)){d-=e.l.a(b)+
|
||||
e.l.a(b);c-=e.t.a(b)+e.b.a(b)}if(a==="content-box"){a=f.n;e=b.currentStyle;d-=a(e.paddingLeft).a(b)+a(e.paddingRight).a(b);c-=a(e.paddingTop).a(b)+a(e.paddingBottom).a(b)}return{i:d,f:c}},xd:function(a,b,c){var d=this.e,e=a.ca,g=e.length,i=f.Na.gc(d,b,c,a);a=i.xc;var j=i.yc,h=i.td,k=i.ud;i=i.rc;var n,l,q,s,m;n=[];for(l=0;l<g;l++)n.push(e[l].db?e[l].db.a(d,i):l===0?0:l===g-1?i:null);for(l=1;l<g;l++)if(n[l]===null){s=n[l-1];q=l;do m=n[++q];while(m===null);n[l]=s+(m-s)/(q-l+1)}b=['<svg width="'+b+'" height="'+
|
||||
c+'" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="g" gradientUnits="userSpaceOnUse" x1="'+a/b*100+'%" y1="'+j/c*100+'%" x2="'+h/b*100+'%" y2="'+k/c*100+'%">'];for(l=0;l<g;l++)b.push('<stop offset="'+n[l]/i+'" stop-color="'+e[l].color.T(d)+'" stop-opacity="'+e[l].color.fa()+'"/>');b.push('</linearGradient></defs><rect width="100%" height="100%" fill="url(#g)"/></svg>');return b.join("")},m:function(){this.parent.gb(this.ta)}});f.Nc=f.u.P({S:"repeat",Sc:"stretch",Qc:"round",ta:0,O:function(){return this.g.q.G()},
|
||||
h:function(){return this.g.q.h()},U:function(){var a=this,b=a.g.q.j(),c=a.g.z.j(),d=a.s.o(),e=b.repeat,g=e.f,i=e.Ob,j=a.e,h=0;f.p.Rb(b.src,function(k){function n(R,S,U,V,W,T,w,C,K,O){J.push('<pattern patternUnits="userSpaceOnUse" id="pattern'+Q+'" x="'+(g===p?R+U/2-K/2:R)+'" y="'+(i===p?S+V/2-O/2:S)+'" width="'+K+'" height="'+O+'"><svg width="'+K+'" height="'+O+'" viewBox="'+W+" "+T+" "+w+" "+C+'" preserveAspectRatio="none"><image xlink:href="'+r+'" x="0" y="0" width="'+s+'" height="'+m+'" /></svg></pattern>');
|
||||
P.push('<rect x="'+R+'" y="'+S+'" width="'+U+'" height="'+V+'" fill="url(#pattern'+Q+')" />');Q++}var l=d.i,q=d.f,s=k.i,m=k.f,r=a.Dd(b.src,s,m),p=a.S,t=a.Sc;k=a.Qc;var v=Math.ceil,o=f.n("0"),u=b.I||(c?c.I:{t:o,r:o,b:o,l:o});o=u.t.a(j);var x=u.r.a(j),y=u.b.a(j);u=u.l.a(j);var z=b.slice,D=z.t.a(j),G=z.r.a(j),E=z.b.a(j);z=z.l.a(j);var B=l-u-x,A=q-o-y,L=s-z-G,N=m-D-E,H=g===t?B:L*o/D,I=i===t?A:N*x/G,F=g===t?B:L*y/E;t=i===t?A:N*u/z;var J=[],P=[],Q=0;if(g===k){H-=(H-(B%H||H))/v(B/H);F-=(F-(B%F||F))/v(B/
|
||||
F)}if(i===k){I-=(I-(A%I||I))/v(A/I);t-=(t-(A%t||t))/v(A/t)}k=['<svg width="'+l+'" height="'+q+'" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'];n(0,0,u,o,0,0,z,D,u,o);n(u,0,B,o,z,0,L,D,H,o);n(l-x,0,x,o,s-G,0,G,D,x,o);n(0,o,u,A,0,D,z,N,u,t);if(b.fill)n(u,o,B,A,z,D,L,N,H||F||L,t||I||N);n(l-x,o,x,A,s-G,D,G,N,x,I);n(0,q-y,u,y,0,m-E,z,E,u,y);n(u,q-y,B,y,z,m-E,L,E,F,y);n(l-x,q-y,x,y,s-G,m-E,G,E,x,y);k.push("<defs>"+J.join("\n")+"</defs>"+P.join("\n")+"</svg>");a.parent.gb(a.ta,
|
||||
"url(data:image/svg+xml,"+escape(k.join(""))+") no-repeat border-box border-box");h&&a.parent.ab()},a);h=1},Dd:function(){var a={};return function(b,c,d){var e=a[b],g;if(!e){e=new Image;g=doc.createElement("canvas");e.src=b;g.width=c;g.height=d;g.getContext("2d").drawImage(e,0,0);e=a[b]=g.toDataURL()}return e}}(),Ea:f.Tb.prototype.Ea,m:function(){var a=this.e.runtimeStyle;this.parent.gb(this.ta);a.borderColor=a.borderStyle=a.borderWidth=""}});f.kb=function(){function a(m,r){m.className+=" "+r}function b(m){var r=
|
||||
s.slice.call(arguments,1),p=r.length;setTimeout(function(){for(;p--;)a(m,r[p])},0)}function c(m){var r=s.slice.call(arguments,1),p=r.length;setTimeout(function(){for(;p--;){var t=r[p];t=q[t]||(q[t]=new RegExp("\\b"+t+"\\b","g"));m.className=m.className.replace(t,"")}},0)}function d(m){function r(){if(!R){var w,C,K=f.Ba,O=m.currentStyle,M=O.getAttribute(g)==="true";T=O.getAttribute(i);T=K>7?T!=="false":T==="true";if(!Q){Q=1;m.runtimeStyle.zoom=1;O=m;for(var ba=1;O=O.previousSibling;)if(O.nodeType===
|
||||
1){ba=0;break}ba&&a(m,n)}F.cb();if(M&&(C=F.o())&&(w=doc.documentElement||doc.body)&&(C.y>w.clientHeight||C.x>w.clientWidth||C.y+C.f<0||C.x+C.i<0)){if(!V){V=1;f.mb.ba(r)}}else{R=1;V=Q=0;f.mb.Ha(r);if(K===9){J={w:new f.Sb(m),q:new f.Ub(m),z:new f.Vb(m)};P=[J.w,J.q];I=new f.Oc(m,F,J);w=[new f.Mc(m,F,J,I),new f.Nc(m,F,J,I)]}else{J={w:new f.Sb(m),z:new f.Vb(m),q:new f.Ub(m),F:new f.jb(m),ga:new f.Ic(m),Pb:new f.Uc(m)};P=[J.w,J.z,J.q,J.F,J.ga,J.Pb];I=new f.Rc(m,F,J);w=[new f.Hc(m,F,J,I),new f.Fc(m,F,J,
|
||||
I),new f.Gc(m,F,J,I),new f.Tb(m,F,J,I)];m.tagName==="IMG"&&w.push(new f.Pc(m,F,J,I));I.ed=w}H=[I].concat(w);if(w=m.currentStyle.getAttribute(f.Q+"watch-ancestors")){w=parseInt(w,10);C=0;for(M=m.parentNode;M&&(w==="NaN"||C++<w);){A(M,"onpropertychange",G);A(M,"onmouseenter",o);A(M,"onmouseleave",u);A(M,"onmousedown",x);if(M.tagName in f.fc){A(M,"onfocus",z);A(M,"onblur",D)}M=M.parentNode}}if(T){f.Oa.ba(t);f.Oa.Qd()}t(1)}if(!S){S=1;K<9&&A(m,"onmove",p);A(m,"onresize",p);A(m,"onpropertychange",v);A(m,
|
||||
"onmouseenter",o);A(m,"onmouseleave",u);A(m,"onmousedown",x);if(m.tagName in f.fc){A(m,"onfocus",z);A(m,"onblur",D)}f.Qa.ba(p);f.K.ba(L)}F.hb()}}function p(){F&&F.Ad()&&t()}function t(w){if(!W)if(R){var C,K=H.length;E();for(C=0;C<K;C++)H[C].Ea();if(w||F.Nd())for(C=0;C<K;C++)H[C].ib();if(w||F.Sd())for(C=0;C<K;C++)H[C].Mb();I.ab();B()}else Q||r()}function v(){var w,C=H.length,K;w=event;if(!W&&!(w&&w.propertyName in l))if(R){E();for(w=0;w<C;w++)H[w].Ea();for(w=0;w<C;w++){K=H[w];K.Cb||K.ib();K.O()&&K.Lb()}I.ab();
|
||||
B()}else Q||r()}function o(){b(m,j)}function u(){c(m,j,h)}function x(){b(m,h);f.lb.ba(y)}function y(){c(m,h);f.lb.Ha(y)}function z(){b(m,k)}function D(){c(m,k)}function G(){var w=event.propertyName;if(w==="className"||w==="id")v()}function E(){F.cb();for(var w=P.length;w--;)P[w].cb()}function B(){for(var w=P.length;w--;)P[w].hb();F.hb()}function A(w,C,K){w.attachEvent(C,K);U.push([w,C,K])}function L(){if(S){for(var w=U.length,C;w--;){C=U[w];C[0].detachEvent(C[1],C[2])}f.K.Ha(L);S=0;U=[]}}function N(){if(!W){var w,
|
||||
C;L();W=1;if(H){w=0;for(C=H.length;w<C;w++){H[w].ec=1;H[w].m()}}T&&f.Oa.Ha(t);f.Qa.Ha(t);H=F=J=P=m=null}}var H,I,F=new da(m),J,P,Q,R,S,U=[],V,W,T;this.Ed=r;this.update=t;this.m=N;this.qd=m}var e={},g=f.Q+"lazy-init",i=f.Q+"poll",j=f.La+"hover",h=f.La+"active",k=f.La+"focus",n=f.La+"first-child",l={background:1,bgColor:1,display:1},q={},s=[];d.yd=function(m){var r=f.p.Aa(m);return e[r]||(e[r]=new d(m))};d.m=function(m){m=f.p.Aa(m);var r=e[m];if(r){r.m();delete e[m]}};d.md=function(){var m=[],r;if(e){for(var p in e)if(e.hasOwnProperty(p)){r=
|
||||
e[p];m.push(r.qd);r.m()}e={}}return m};return d}();f.supportsVML=f.zc;f.attach=function(a){f.Ba<10&&f.zc&&f.kb.yd(a).Ed()};f.detach=function(a){f.kb.m(a)}};
|
||||
var $=element;function init(){var a=window.PIE;a&&doc.media!=="print"&&a.attach($)}function cleanup(){var a=window.PIE;if(a){a.detach($);$=0}}$.readyState==="complete"&&init();
|
||||
</script>
|
||||
</PUBLIC:COMPONENT>
|
Binary file not shown.
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 6.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 3.2 KiB |
|
@ -0,0 +1,120 @@
|
|||
$(document).ready(function(){
|
||||
dropmenu();
|
||||
tab();
|
||||
tooltip();
|
||||
accordion();
|
||||
});
|
||||
|
||||
function dropmenu(){
|
||||
if( !$('.rc_dm').length ){
|
||||
return;
|
||||
}
|
||||
$('.rc_dm').each(function(){
|
||||
$(this)
|
||||
.find('.dm_ctrl')
|
||||
.click(function(){
|
||||
var target = $(this).attr('rel');
|
||||
var w = $(this).outerWidth();
|
||||
var h = $(this).outerHeight();
|
||||
var p = $(this).position();
|
||||
|
||||
$('.dm_list').not('#'+target).hide();
|
||||
$('#'+target)
|
||||
.css({
|
||||
width: w,
|
||||
zIndex: 999,
|
||||
left: p.left,
|
||||
top: p.top + h
|
||||
})
|
||||
.toggle();
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
$(document).click(function(){
|
||||
$('.dm_list').hide();
|
||||
});
|
||||
}
|
||||
|
||||
function tab(){
|
||||
if( !$('.rc_tab').length ){
|
||||
return;
|
||||
}
|
||||
$('.rc_tab').each(function(){
|
||||
$(this).find('.tab_ctrl:first').addClass('recent');
|
||||
$(this).find('.tab_content:not(:first)').hide();
|
||||
$(this).find('.tab_ctrl').click(function(){
|
||||
var target = $(this).attr('href');
|
||||
$(this)
|
||||
.parents('.rc_tab')
|
||||
.find('.tab_content').hide()
|
||||
.end()
|
||||
.find('.tab_ctrl').removeClass('recent');
|
||||
$(this).addClass('recent');
|
||||
$(target).show();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function tooltip(){
|
||||
if( !$('.rc_tip').length ){
|
||||
return;
|
||||
}
|
||||
$('.rc_tip').each(function(){
|
||||
$(this).css({position: 'relative'});
|
||||
var t = $(this).data('tip');
|
||||
|
||||
$(this)
|
||||
.mouseover(function(){
|
||||
var th = $(this).find('.td').outerHeight();
|
||||
var p = $(this).offset();
|
||||
|
||||
$(this).append('<span class="td">'+t+'</span>');
|
||||
$(this).find('.td').show().css('display','inline-block');
|
||||
$(document).mousemove(function(e){
|
||||
$(this).find('.td').css({
|
||||
left: e.pageX - p.left + 16,
|
||||
top: e.pageY - p.top - th - 20
|
||||
});
|
||||
});
|
||||
})
|
||||
.mouseout(function(){
|
||||
$(this).find('.td').hide().detach();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function accordion(){
|
||||
if( !$('.rc_accor').length ){
|
||||
return;
|
||||
}
|
||||
$('.rc_accor').each(function(){
|
||||
$(this).find('.ac_ctrl:first').addClass('recent');
|
||||
$(this).find('.ac_content:not(:first)').hide();
|
||||
if($(this).hasClass('av')){
|
||||
$(this).find('.ac_ctrl').click(function(){
|
||||
var index = $(this).parents('.av').find('.ac_ctrl').index(this);
|
||||
$(this).siblings('.ac_ctrl').removeClass('recent');
|
||||
$(this).addClass('recent');
|
||||
$(this).parents('.rc_accor').find('.ac_content:not(:eq('+index+'))').stop().slideUp();
|
||||
$(this).parents('.rc_accor').find('.ac_content:eq('+index+')').stop().slideToggle();
|
||||
return false;
|
||||
});
|
||||
} else if($(this).hasClass('ah')){
|
||||
var w = $(this).find('.ac_content').css('width');
|
||||
$(this).find('.ac_content:not(:eq(0))').css({width:0});
|
||||
$(this).find('.ac_ctrl').click(function(){
|
||||
var index = $(this).parents('.ah').find('.ac_ctrl').index(this);
|
||||
$(this).siblings('.ac_ctrl').removeClass('recent');
|
||||
$(this).addClass('recent');
|
||||
$(this).parents('.rc_accor').find('.ac_content:not(:eq('+index+'))').stop().animate({width:0});
|
||||
$(this).parents('.rc_accor').find('.ac_content:eq('+index+')').stop().show().animate({width:w});
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
}
|
|
@ -393,9 +393,9 @@ modalWindow : function(settings,callbackFn){
|
|||
}else{tempwidth="auto";}
|
||||
|
||||
$rss("body").append('<div class="rgmask" id="rgsheath" style="height:'+rgmaskHeight+'px"></div>');
|
||||
$rss("#rgsheath").css({background: "#000", width: "100%", position: "fixed", top: 0, left: 0,opacity:0.9,'z-index':199});
|
||||
$rss("#rgsheath").css({background: "#000", width: "100%", position: "fixed", top: 0, left: 0,opacity:0.5,'z-index':199});
|
||||
$rss("body").append('<div id="rgWindow"></div>');
|
||||
$rss("#rgWindow").css({"position": "fixed", "z-index": "999", "background": "#fff", "border": "solid 3px #ccc", "padding": "20px", "overflow": "hidden", "border-radius": "12px", "-webkit-border-radius": "12px", "-moz-border-radius": "12px", "-ms-border-radius": "12px", "box-shadow": "0 0 20px rgba(0,0,0,0.9)","-webkit-box-shadow": "0 0 20px rgba(0,0,0,0.9)","-moz-box-shadow": "0 0 20px rgba(0,0,0,0.9)","-ms-box-shadow": "0 0 20px rgba(0,0,0,0.9)"});
|
||||
$rss("#rgWindow").css({"position": "fixed", "z-index": "999", "background": "#fff", "border": "solid 1px #ccc", "padding": "10px", "border-radius": "5px", "-webkit-border-radius": "5px", "-moz-border-radius": "5px", "-ms-border-radius": "5px", "box-shadow": "0 0 20px rgba(0,0,0,0.7)","-webkit-box-shadow": "0 0 20px rgba(0,0,0,0.7)","-moz-box-shadow": "0 0 20px rgba(0,0,0,0.7)","-ms-box-shadow": "0 0 20px rgba(0,0,0,0.7)"});
|
||||
var rgWTop = (rgmaskHeight-20)/2;
|
||||
var rgWLeft = (rgmaskWidth-20)/2;
|
||||
$rss("#rgWindow").css({top:rgWTop+"px", left:rgWLeft+"px"});
|
||||
|
@ -429,12 +429,12 @@ modalWindow : function(settings,callbackFn){
|
|||
tempwidth=maxwidth;
|
||||
rgWLeft=(rgmaskWidth-tempwidth)/2;
|
||||
}
|
||||
tempwidth+=25;
|
||||
tempwidth=parseInt(tempwidth)+25;
|
||||
$rss("#rgWindow").empty().show();
|
||||
var closebtn = "";
|
||||
if(closeBtn)
|
||||
closebtn='<a href="" style="display:block; width:28px; height:28px; line-height:28px; text-align:center; position:absolute; right:6px; top: 6px; font-family:Tahoma; font-weight:bold; border:solid 1px #ccc; border-radius: 15px;text-shadow:1px 1px 0 #fff; background:#f6f6f6; font-size:14px; text-decoration:none; color:#666" id="close_modal">X</a>';
|
||||
$rss("#rgWindow").animate({"width":tempwidth+"px","height":tempheight+"px",top:rgWTop+"px", left:rgWLeft+"px"},500,function(){$rss("#rgWindow").html(closebtn+"<div id='rgContent' style='overflow:auto; overflow-x:none; height:"+tempheight+"px;'>"+dhtml+"</div>");
|
||||
closebtn='<a href="" style="display:block; width:20px; height:20px; line-height:19px; text-align:center; position:absolute; right:-10px; top: -10px; font-family:Tahoma; font-weight:bold; border:solid 1px #000; border-radius: 10px;text-shadow:0px 1px 0 #DDD; background-color:#CCC; font-size:10px; text-decoration:none; color:#666; padding-left:1px; box-shadow: 0 0 5px #000000;" id="close_modal">X</a>';
|
||||
$rss("#rgWindow").animate({"width":tempwidth+"px","height":tempheight+"px",top:rgWTop+"px", left:rgWLeft+"px"},500,function(){$rss("#rgWindow").html(closebtn+"<div id='rgContent' style='padding:5px; overflow:auto; overflow-x:none; height:"+tempheight+"px;'>"+dhtml+"</div>");
|
||||
$rss("#close_modal").mouseover(function(){$rss(this).css("color","#999");}).mouseout(function(){$rss(this).css("color","#666");})
|
||||
$rss("#close_modal").click(function(){
|
||||
$rss("#rgWindow").empty();
|
||||
|
@ -508,7 +508,7 @@ modalWindowUpdate : function(settings,callbackFn){
|
|||
tempwidth=maxwidth;
|
||||
rgWLeft=(rgmaskWidth-tempwidth)/2;
|
||||
}
|
||||
tempwidth+=25;
|
||||
tempwidth=parseInt(tempwidth)+25;
|
||||
$rss("#rgContent").empty();
|
||||
$rss("#rgWindow").animate({"width":tempwidth+"px","height":tempheight+"px",top:rgWTop+"px", left:rgWLeft+"px"},500,function(){$rss("#rgContent").css("height",tempheight+"px").html(dhtml)});
|
||||
$rss("#rgwindow_temp_div").remove();
|
||||
|
|
|
@ -8,3 +8,4 @@
|
|||
//= require jquery_ujs
|
||||
//= require page_edit
|
||||
//= require side_bar_history
|
||||
//= require rc
|
|
@ -14,39 +14,69 @@ body{
|
|||
}
|
||||
|
||||
#back_banner_link{
|
||||
background: url(<%= asset_path "orbitbar1.png" %>) repeat-x scroll 0 0;
|
||||
height: 50px;
|
||||
left: 0;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
background:-webkit-gradient( linear, left top, left bottom, color-stop(0, #787e82), color-stop(0.05, #61676c), color-stop(1, #292c2d) );
|
||||
background:-moz-linear-gradient( center top -90deg, #787e82 0%, #61676c 5%, #292c2d 100% );
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#61676c', endColorstr='#292c2d');
|
||||
-moz-box-shadow: 0px 1px 5px 0px rgba(0,0,0,.7);
|
||||
-webkit-box-shadow: 0px 1px 5px 0px rgba(0,0,0,.7);
|
||||
box-shadow: 0px 1px 5px 0px rgba(0,0,0,.7);
|
||||
border-top: 1px solid #474a4c;
|
||||
border-bottom: 1px solid #1d2020;
|
||||
height: 41px;
|
||||
width: 100%;
|
||||
z-index: 5;
|
||||
behavior: url(<%= asset_path "PIE.htc" %>);
|
||||
}
|
||||
.hmenu{
|
||||
height: 40px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 1px;
|
||||
width: 250px;
|
||||
float: right;
|
||||
height: 41px;
|
||||
}
|
||||
#back_orbit{
|
||||
background: url(<%= asset_path "bar_orbit.png" %>) no-repeat scroll 0 0 transparent;
|
||||
cursor:pointer;
|
||||
background:-webkit-gradient( linear, left top, left bottom, color-stop(0, #70787d), color-stop(1, #3b4043) );
|
||||
background:-moz-linear-gradient( center top -90deg, #70787d 0%, #3b4043 100% );
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#70787d', endColorstr='#3b4043');
|
||||
-webkit-border-radius: 0px 0px 5px 5px;
|
||||
-moz-border-radius: 0px 0px 5px 5px;
|
||||
border-radius: 0px 0px 5px 5px;
|
||||
-moz-box-shadow: 0px 1px 1px 0px rgba(0,0,0,.7);
|
||||
-webkit-box-shadow: 0px 1px 1px 0px rgba(0,0,0,.7);
|
||||
box-shadow: 0px 1px 1px 0px rgba(0,0,0,.7);
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
height: 43px;
|
||||
left: 10px;
|
||||
position: relative;
|
||||
margin-left: 10px;
|
||||
width: 41px;
|
||||
behavior: url(<%= asset_path "PIE.htc" %>);
|
||||
}
|
||||
#back_orbit span{
|
||||
text-indent: -9999px;
|
||||
background: url(<%= asset_path "bar_orbit.png" %>) no-repeat scroll 0 0 transparent;
|
||||
display: block;
|
||||
height: 43px;
|
||||
width: 100%;
|
||||
}
|
||||
#back_orbit:hover{
|
||||
background-position:0 -43px;
|
||||
box-shadow: 0 3px 3px #000000;
|
||||
background:-webkit-gradient( linear, left top, left bottom, color-stop(0, #fefefe), color-stop(1, #e4e4e4) );
|
||||
background:-moz-linear-gradient( center top -90deg, #fefefe 0%, #e4e4e4 100% );
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fefefe', endColorstr='#e4e4e4');
|
||||
-webkit-border-radius: 0px;
|
||||
-moz-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
#back_orbit:hover span{
|
||||
background-position: 0 -44px;
|
||||
}
|
||||
#back_orbit:hover #orblist{
|
||||
display:block;
|
||||
}
|
||||
#orblist{
|
||||
background: none repeat scroll 0 0 #FFFFFF;
|
||||
border-radius: 0 3px 3px 3px;
|
||||
background:-webkit-gradient( linear, left top, left bottom, color-stop(0, #e4e4e4), color-stop(1, #FFFFFF) );
|
||||
background:-moz-linear-gradient( center top -90deg, #e4e4e4 0%, #FFFFFF 100% );
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e4e4e4', endColorstr='#FFFFFF');
|
||||
-webkit-border-radius: 0px 3px 3px 3px;
|
||||
-moz-border-radius: 0px 3px 3px 3px;
|
||||
border-radius: 0px 3px 3px 3px;
|
||||
-webkit-box-shadow: 0 3px 3px #000000;
|
||||
-moz-box-shadow: 0 3px 3px #000000;
|
||||
box-shadow: 0 3px 3px #000000;
|
||||
display: none;
|
||||
margin: 0;
|
||||
|
@ -70,30 +100,37 @@ body{
|
|||
background:#eee;
|
||||
color:#333;
|
||||
}
|
||||
|
||||
#log_out{
|
||||
-moz-box-shadow:inset 1px 0px 0px 0px #73777b;
|
||||
-webkit-box-shadow:inset 1px 0px 0px 0px #73777b;
|
||||
box-shadow:inset 1px 0px 0px 0px #73777b;
|
||||
border-right:1px solid #41474c;
|
||||
border-left:1px solid #41474c;
|
||||
float:right;
|
||||
width:41px;
|
||||
height:41px;
|
||||
}
|
||||
#log_out:hover{
|
||||
background:-webkit-gradient( linear, left top, left bottom, color-stop(0, #01afde), color-stop(1, #007ec6) );
|
||||
background:-moz-linear-gradient( center top -90deg, #01afde 0%, #007ec6 100% );
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#01afde', endColorstr='#007ec6');
|
||||
}
|
||||
#log_out a{
|
||||
background: url(<%= asset_path "service_btn.png" %>) no-repeat scroll right 0 transparent;
|
||||
border: medium none !important;
|
||||
display: block !important;
|
||||
height: 40px !important;
|
||||
line-height: normal !important;
|
||||
padding: 0 !important;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
text-indent: -10000px;
|
||||
top: 0px;
|
||||
width: 43px !important;
|
||||
display: block;
|
||||
height: 41px;
|
||||
text-indent: -9999px;
|
||||
width: 41px;
|
||||
}
|
||||
#log_out a:hover{
|
||||
background: url(<%= asset_path "service_btn.png" %>) no-repeat scroll right bottom transparent !important;
|
||||
}
|
||||
.lang{
|
||||
color: #FFFFFF;
|
||||
font-size: 15px;
|
||||
line-height: 40px;
|
||||
position: absolute;
|
||||
right: 55px;
|
||||
top: 0;
|
||||
color: #FFFFFF;
|
||||
float: right;
|
||||
font-size: 15px;
|
||||
line-height: 40px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.lang a{
|
||||
color:#fff;
|
||||
|
@ -590,3 +627,39 @@ hr.student_block {
|
|||
top: -15%;
|
||||
width: 130%;
|
||||
}
|
||||
#rgContent .main2{
|
||||
padding:0;
|
||||
}
|
||||
#rgContent h1{
|
||||
border-bottom: 1px dashed #CCCCCC;
|
||||
color: #333333;
|
||||
font-size: 19px;
|
||||
font-weight: bold;
|
||||
margin: 0 0 20px;
|
||||
padding: 0 0 10px;
|
||||
text-align: center;
|
||||
}
|
||||
#rgContent label {
|
||||
color: #888888;
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
margin: 25px 0 5px;
|
||||
width: 100%;
|
||||
}
|
||||
#rgContent input {
|
||||
color: #888888;
|
||||
width: 98%;
|
||||
}
|
||||
#rgContent .button_bar {
|
||||
float: none;
|
||||
text-align: center;
|
||||
width:100%;
|
||||
margin:30px 0 0;
|
||||
}
|
||||
#rgContent .button_bar a {
|
||||
float: none;
|
||||
display:block;
|
||||
}
|
||||
#close_modal{
|
||||
display:none !important;
|
||||
}
|
|
@ -42,3 +42,7 @@ input:focus, select:focus, textarea:focus {
|
|||
height:0;
|
||||
visibility:hidden;
|
||||
}
|
||||
.fixed {
|
||||
position: fixed;
|
||||
z-index: 100;
|
||||
}
|
|
@ -13,39 +13,69 @@ body{
|
|||
font-family: Helvetica, '微軟正黑體';
|
||||
}
|
||||
#back_banner_link{
|
||||
background: url(<%= asset_path "orbitbar1.png" %>) repeat-x scroll 0 0;
|
||||
height: 50px;
|
||||
left: 0;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
background:-webkit-gradient( linear, left top, left bottom, color-stop(0, #787e82), color-stop(0.05, #61676c), color-stop(1, #292c2d) );
|
||||
background:-moz-linear-gradient( center top -90deg, #787e82 0%, #61676c 5%, #292c2d 100% );
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#61676c', endColorstr='#292c2d');
|
||||
-moz-box-shadow: 0px 1px 5px 0px rgba(0,0,0,.7);
|
||||
-webkit-box-shadow: 0px 1px 5px 0px rgba(0,0,0,.7);
|
||||
box-shadow: 0px 1px 5px 0px rgba(0,0,0,.7);
|
||||
border-top: 1px solid #474a4c;
|
||||
border-bottom: 1px solid #1d2020;
|
||||
height: 41px;
|
||||
width: 100%;
|
||||
z-index: 5;
|
||||
behavior: url(<%= asset_path "PIE.htc" %>);
|
||||
}
|
||||
.hmenu{
|
||||
height: 40px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 1px;
|
||||
width: 250px;
|
||||
float: right;
|
||||
height: 41px;
|
||||
}
|
||||
#back_orbit{
|
||||
background: url(<%= asset_path "bar_orbit.png" %>) no-repeat scroll 0 0 transparent;
|
||||
cursor:pointer;
|
||||
background:-webkit-gradient( linear, left top, left bottom, color-stop(0, #70787d), color-stop(1, #3b4043) );
|
||||
background:-moz-linear-gradient( center top -90deg, #70787d 0%, #3b4043 100% );
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#70787d', endColorstr='#3b4043');
|
||||
-webkit-border-radius: 0px 0px 5px 5px;
|
||||
-moz-border-radius: 0px 0px 5px 5px;
|
||||
border-radius: 0px 0px 5px 5px;
|
||||
-moz-box-shadow: 0px 1px 1px 0px rgba(0,0,0,.7);
|
||||
-webkit-box-shadow: 0px 1px 1px 0px rgba(0,0,0,.7);
|
||||
box-shadow: 0px 1px 1px 0px rgba(0,0,0,.7);
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
height: 43px;
|
||||
left: 10px;
|
||||
position: relative;
|
||||
margin-left: 10px;
|
||||
width: 41px;
|
||||
behavior: url(<%= asset_path "PIE.htc" %>);
|
||||
}
|
||||
#back_orbit span{
|
||||
text-indent: -9999px;
|
||||
background: url(<%= asset_path "bar_orbit.png" %>) no-repeat scroll 0 0 transparent;
|
||||
display: block;
|
||||
height: 43px;
|
||||
width: 100%;
|
||||
}
|
||||
#back_orbit:hover{
|
||||
background-position:0 -43px;
|
||||
box-shadow: 0 3px 3px #000000;
|
||||
background:-webkit-gradient( linear, left top, left bottom, color-stop(0, #fefefe), color-stop(1, #e4e4e4) );
|
||||
background:-moz-linear-gradient( center top -90deg, #fefefe 0%, #e4e4e4 100% );
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fefefe', endColorstr='#e4e4e4');
|
||||
-webkit-border-radius: 0px;
|
||||
-moz-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
#back_orbit:hover span{
|
||||
background-position: 0 -44px;
|
||||
}
|
||||
#back_orbit:hover #orblist{
|
||||
display:block;
|
||||
}
|
||||
#orblist{
|
||||
background: none repeat scroll 0 0 #FFFFFF;
|
||||
border-radius: 0 3px 3px 3px;
|
||||
background:-webkit-gradient( linear, left top, left bottom, color-stop(0, #e4e4e4), color-stop(1, #FFFFFF) );
|
||||
background:-moz-linear-gradient( center top -90deg, #e4e4e4 0%, #FFFFFF 100% );
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e4e4e4', endColorstr='#FFFFFF');
|
||||
-webkit-border-radius: 0px 3px 3px 3px;
|
||||
-moz-border-radius: 0px 3px 3px 3px;
|
||||
border-radius: 0px 3px 3px 3px;
|
||||
-webkit-box-shadow: 0 3px 3px #000000;
|
||||
-moz-box-shadow: 0 3px 3px #000000;
|
||||
box-shadow: 0 3px 3px #000000;
|
||||
display: none;
|
||||
margin: 0;
|
||||
|
@ -69,30 +99,37 @@ body{
|
|||
background:#eee;
|
||||
color:#333;
|
||||
}
|
||||
|
||||
#log_out{
|
||||
-moz-box-shadow:inset 1px 0px 0px 0px #73777b;
|
||||
-webkit-box-shadow:inset 1px 0px 0px 0px #73777b;
|
||||
box-shadow:inset 1px 0px 0px 0px #73777b;
|
||||
border-right:1px solid #41474c;
|
||||
border-left:1px solid #41474c;
|
||||
float:right;
|
||||
width:41px;
|
||||
height:41px;
|
||||
}
|
||||
#log_out:hover{
|
||||
background:-webkit-gradient( linear, left top, left bottom, color-stop(0, #01afde), color-stop(1, #007ec6) );
|
||||
background:-moz-linear-gradient( center top -90deg, #01afde 0%, #007ec6 100% );
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#01afde', endColorstr='#007ec6');
|
||||
}
|
||||
#log_out a{
|
||||
background: url(<%= asset_path "service_btn.png" %>) no-repeat scroll right 0 transparent;
|
||||
border: medium none !important;
|
||||
display: block !important;
|
||||
height: 40px !important;
|
||||
line-height: normal !important;
|
||||
padding: 0 !important;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
text-indent: -10000px;
|
||||
top: 0px;
|
||||
width: 43px !important;
|
||||
display: block;
|
||||
height: 41px;
|
||||
text-indent: -9999px;
|
||||
width: 41px;
|
||||
}
|
||||
#log_out a:hover{
|
||||
background: url(<%= asset_path "service_btn.png" %>) no-repeat scroll right bottom transparent !important;
|
||||
}
|
||||
.lang{
|
||||
color: #FFFFFF;
|
||||
font-size: 15px;
|
||||
line-height: 40px;
|
||||
position: absolute;
|
||||
right: 55px;
|
||||
top: 0;
|
||||
color: #FFFFFF;
|
||||
float: right;
|
||||
font-size: 15px;
|
||||
line-height: 40px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.lang a{
|
||||
color:#fff;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
class Admin::AppAuthsController < ApplicationController
|
||||
layout "admin"
|
||||
before_filter :authenticate_user!
|
||||
before_filter :is_admin?
|
||||
# before_filter :is_admin? ,:only => :index
|
||||
|
||||
def index
|
||||
# @roles = Role.all.entries
|
||||
|
@ -12,7 +12,60 @@ class Admin::AppAuthsController < ApplicationController
|
|||
# obj_auth = obj.send "auth"
|
||||
# [:app_obj => app,:auth_field => obj_auth]
|
||||
# end
|
||||
@module_apps = ModuleApp.all
|
||||
if current_user.admin?
|
||||
@module_apps = ModuleApp.all
|
||||
else
|
||||
@module_apps = current_user.managing_apps.collect{|t| t.managing_app}
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
app_auth = AppAuth.find_or_create_by(module_app_id: params[:module_app_id])
|
||||
params[:new].each do |item|
|
||||
field = item[0]
|
||||
field_value = item[1]
|
||||
if field_value!=''
|
||||
case field
|
||||
when 'role'
|
||||
app_auth.send("add_#{field}",(Role.find field_value)) rescue nil
|
||||
when 'sub_role'
|
||||
app_auth.send("add_#{field}",(SubRole.find field_value)) rescue nil
|
||||
when 'privilege_user'
|
||||
app_auth.add_user_to_privilege_list (User.find field_value) rescue nil
|
||||
when 'blocked_user'
|
||||
app_auth.add_user_to_black_list (User.find field_value) rescue nil
|
||||
end
|
||||
end
|
||||
end
|
||||
app = ModuleApp.find params[:module_app_id] rescue nil
|
||||
redirect_to edit_admin_module_app_path(app)
|
||||
end
|
||||
|
||||
def remove
|
||||
app_auth = AppAuth.find( params[:id] )
|
||||
type = params[:type]
|
||||
field_value = params[:target_id]
|
||||
if field_value!=''
|
||||
case type
|
||||
when 'role'
|
||||
app_auth.remove_role(Role.find field_value) rescue nil
|
||||
when 'sub_role'
|
||||
app_auth.remove_sub_role(SubRole.find field_value) rescue nil
|
||||
when 'privilege_user'
|
||||
app_auth.remove_user_from_privilege_list (User.find field_value) rescue nil
|
||||
when 'blocked_user'
|
||||
app_auth.remove_user_from_black_list (User.find field_value) rescue nil
|
||||
end
|
||||
end
|
||||
|
||||
app = ModuleApp.find params[:module_app_id] rescue nil
|
||||
redirect_to edit_admin_module_app_path(app)
|
||||
end
|
||||
|
||||
def edit
|
||||
@module_app = ModuleApp.find(params[:id])
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
|
@ -46,7 +46,7 @@ class Admin::DesignsController < ApplicationController
|
|||
filename = params[:filename]
|
||||
files = @design.themes + @design.javascripts + @design.images
|
||||
file_to_removed = files.find{ |obj|
|
||||
obj.file_filename == filename
|
||||
obj.file_identifier == filename
|
||||
}
|
||||
type = file_to_removed._type
|
||||
new_file = ""
|
||||
|
@ -103,7 +103,7 @@ class Admin::DesignsController < ApplicationController
|
|||
temp_file.write (zip_file.read entry ).force_encoding('UTF-8')
|
||||
default_css = design.build_default_css
|
||||
default_css.file = temp_file
|
||||
default_css.file_filename = filename
|
||||
default_css.file_identifier = filename
|
||||
default_css.to_save = true
|
||||
when /\A(#{zip_name})\/(reset\.css)\z/ #for reset css
|
||||
filename = File.basename(entry.to_s)
|
||||
|
@ -111,7 +111,7 @@ class Admin::DesignsController < ApplicationController
|
|||
temp_file.write (zip_file.read entry ).force_encoding('UTF-8')
|
||||
reset_css = design.build_reset_css
|
||||
reset_css.file = temp_file
|
||||
reset_css.file_filename = filename
|
||||
reset_css.file_identifier = filename
|
||||
reset_css.to_save = true
|
||||
when /\A(#{zip_name})\/(layout\.html)\z/ #for layout html
|
||||
filename = File.basename(entry.to_s)
|
||||
|
@ -135,7 +135,7 @@ class Admin::DesignsController < ApplicationController
|
|||
temp_file.write (zip_file.read entry).force_encoding('UTF-8')
|
||||
build_and_store = eval("design.#{type}").build
|
||||
build_and_store.file = temp_file
|
||||
build_and_store.file_filename = filename
|
||||
build_and_store.file_identifier = filename
|
||||
build_and_store.to_save = true
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
class Admin::ModuleAppsController < ApplicationController
|
||||
before_filter :user_has_manager_privilege?, :only => [ :assign_manager, :remove_manager ]
|
||||
before_filter :user_has_sub_manager_privilege?, :only => [ :assign_sub_manager, :remove_sub_manager ]
|
||||
|
||||
layout "admin"
|
||||
|
||||
def index
|
||||
|
@ -15,9 +18,9 @@ class Admin::ModuleAppsController < ApplicationController
|
|||
|
||||
def edit
|
||||
@module_app = ModuleApp.find(params[:id])
|
||||
|
||||
end
|
||||
|
||||
|
||||
def update
|
||||
@module_app = ModuleApp.find(params[:id])
|
||||
unless params['module_app']['enable_frontend'].nil?
|
||||
|
@ -30,4 +33,82 @@ class Admin::ModuleAppsController < ApplicationController
|
|||
format.js { render 'admin/attributes/toggle_enable' }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def assign_sub_manager
|
||||
unless @assign_to_user.nil? || @assign_to_user.admin?
|
||||
if @module_app.assign_sub_manager(@assign_to_user,current_user)
|
||||
flash[:notice] = t('admin.app_auth.assigning_manager.add_sub_manager_ok')
|
||||
else
|
||||
flash[:notice] = t('admin.app_auth.assigning_manager.add_sub_manager_fail')
|
||||
end
|
||||
else
|
||||
flash[:notice] = t('admin.app_auth.assigning_manager.failed_no_user')
|
||||
end
|
||||
flash[:notice] = t('admin.app_auth.can_not_add_this_user')
|
||||
redirect_to :action => "edit"
|
||||
end
|
||||
|
||||
|
||||
def assign_manager
|
||||
unless @assign_to_user.nil? || @assign_to_user.admin?
|
||||
if @module_app.assign_manager(@assign_to_user,current_user)
|
||||
flash[:notice] = t('admin.app_auth.assigning_sub_manager.add_manager_ok')
|
||||
else
|
||||
flash[:notice] = t('admin.app_auth.assigning_sub_manager.add_manager_fail')
|
||||
end
|
||||
else
|
||||
flash[:notice] = t('admin.app_auth.assigning_sub_manager.failed_no_user')
|
||||
end
|
||||
flash[:notice] = t('admin.app_auth.can_not_add_this_user')
|
||||
redirect_to :action => "edit"
|
||||
end
|
||||
|
||||
|
||||
def remove_manager
|
||||
@app_manager = AppManager.find(params[:app_manager_id])
|
||||
if @module_app.remove_manager(@app_manager.user)
|
||||
flash[:notice] = t('admin.app_auth.delete_manager.success')
|
||||
else
|
||||
flash[:notice] = t('admin.app_auth.delete_manager.fail')
|
||||
end
|
||||
redirect_to :action => "edit"
|
||||
end
|
||||
|
||||
|
||||
def remove_sub_manager
|
||||
@app_sub_manager = AppManager.find(params[:app_sub_manager_id])
|
||||
if @module_app.remove_sub_manager(@app_sub_manager.user)
|
||||
flash[:notice] = t('admin.app_auth.delete_sub_manager.success')
|
||||
else
|
||||
flash[:notice] = t('admin.app_auth.delete_sub_manager.fail')
|
||||
end
|
||||
redirect_to :action => "edit"
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
def user_has_manager_privilege?
|
||||
@module_app = ModuleApp.find(params[:id])
|
||||
@assign_to_user = User.find params[:manager][:id] rescue nil
|
||||
if current_user.admin? #only admin can assign app's manager
|
||||
return
|
||||
end
|
||||
#user is not permited to do that
|
||||
flash[:notice] = t('admin.app_auth.operation_not_permitted')
|
||||
redirect_to :action => "edit" # [TODO] maybe need to redirect to some other page
|
||||
end
|
||||
|
||||
|
||||
def user_has_sub_manager_privilege?
|
||||
@module_app = ModuleApp.find(params[:id])
|
||||
@assign_to_user = User.find params[:sub_manager][:id] rescue nil
|
||||
if current_user.admin? || @module_app.managing_users.include?(current_user) #admin or app's manager can assign app's subanager
|
||||
return
|
||||
end
|
||||
#user is not permited to do that
|
||||
flash[:notice] = t('admin.app_auth.operation_not_permitted')
|
||||
redirect_to :action => "edit" # [TODO] maybe need to redirect to some other page
|
||||
end
|
||||
|
||||
end
|
|
@ -172,7 +172,7 @@ class Admin::PurchasesController < ApplicationController
|
|||
|
||||
|
||||
def build_file(orig_zip, zip_name, dir, object, type = nil)
|
||||
title = object.file_filename
|
||||
title = object.file_identifier
|
||||
temp = File.new(dir + '/' + title, 'w+')
|
||||
temp.write orig_zip.read(zip_name + '/' + (type ? (type + '/') : '') + title)
|
||||
object.file = temp
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
class ObitFrontendComponentController< ApplicationController
|
||||
before_filter :setup_vars
|
||||
before_filter {|c| c.front_end_available(@app_title)}
|
||||
layout 'production'
|
||||
|
||||
def setup_vars
|
||||
@app_title = request.fullpath.split('/')[2]
|
||||
end
|
||||
|
||||
end
|
|
@ -19,7 +19,7 @@ class PagesController < ApplicationController
|
|||
end
|
||||
|
||||
def show
|
||||
begin
|
||||
#begin
|
||||
item = Item.first(:conditions => {:full_name => params[:page_name]})
|
||||
case item._type
|
||||
when 'Page'
|
||||
|
@ -28,9 +28,9 @@ class PagesController < ApplicationController
|
|||
when 'Link'
|
||||
redirect_to "http://#{item[:url]}"
|
||||
end
|
||||
rescue
|
||||
render :file => "#{Rails.root}/public/404.html", :status => :not_found
|
||||
end
|
||||
#rescue
|
||||
# render :file => "#{Rails.root}/public/404.html", :status => :not_found
|
||||
#end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
module Admin::ModuleAppHelper
|
||||
|
||||
def if_permit_to_delete(item)
|
||||
case item.downcase
|
||||
when :manager
|
||||
current_user.admin?
|
||||
when :sub_manager
|
||||
@module_app.managing_users.include?(current_user) || current_user.admin?
|
||||
end
|
||||
end
|
||||
|
||||
def if_permit_to_assign(item)
|
||||
if_permit_to_delete(item)
|
||||
end
|
||||
|
||||
def get_auth_by(manager_obj)
|
||||
"-AuthBy: " +( manager_obj.rule_creator==current_user ? t('me') : manager_obj.rule_creator.name)
|
||||
end
|
||||
end
|
|
@ -0,0 +1,12 @@
|
|||
class AppManager
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
|
||||
belongs_to :user
|
||||
|
||||
belongs_to :managing_app, :polymorphic => true #,:class_name => 'ModuleApp',:inverse_of => :managers,:foreign_key => "user_id"
|
||||
belongs_to :sub_managing_app, :polymorphic => true #,:class_name => 'ModuleApp',:inverse_of => :sub_manager,:foreign_key => "sub_user_id"
|
||||
|
||||
belongs_to :rule_creator,:class_name => 'User'
|
||||
|
||||
end
|
|
@ -31,7 +31,7 @@ class Design
|
|||
|
||||
def files_with_duplicate?
|
||||
[self.javascripts, self.images,self.themes].each do |objects_hash|
|
||||
ary = objects_hash.collect{ |k| k.file_filename}
|
||||
ary = objects_hash.collect{ |k| k.file_identifier}
|
||||
ary.compact!
|
||||
# debugger
|
||||
return true if(ary.count!=ary.uniq.count)
|
||||
|
@ -42,7 +42,7 @@ class Design
|
|||
def files_with_noname?
|
||||
[self.javascripts, self.images,self.themes].each do |objects_hash|
|
||||
objects_hash.each{ |k|
|
||||
return true if(k.file_filename.nil? && !k.to_save?)
|
||||
return true if(k.file_identifier.nil? && !k.to_save?)
|
||||
}
|
||||
end
|
||||
false
|
||||
|
@ -121,7 +121,7 @@ class Design
|
|||
|
||||
def process_object(object)
|
||||
if object.to_save
|
||||
if object.file_filename.nil?
|
||||
if object.file_identifier.nil?
|
||||
new_object = self.send(object._type.downcase.pluralize).build(object.attributes)
|
||||
new_object.file = object.file
|
||||
object.destroy
|
||||
|
|
|
@ -11,14 +11,14 @@ class Stylesheet < DesignFile
|
|||
content.scan(/(?<=url)(.*?)(?=\))/){
|
||||
css_name = $1.gsub(' ','').gsub('(','')
|
||||
name = File.basename(css_name).gsub(/[\\\"]/, '')
|
||||
file_name = images.detect{ |i| i.file_filename.eql?(name) }.file_url rescue nil
|
||||
file_name = images.detect{ |i| i.file_identifier.eql?(name) }.file_url rescue nil
|
||||
names << [css_name, file_name]
|
||||
}
|
||||
names.each do |name|
|
||||
content.gsub!(name[0], name[1]) if name[1]
|
||||
end
|
||||
Dir.mktmpdir('f_path') { |dir|
|
||||
orig_file_name = self.file_filename
|
||||
orig_file_name = self.file_identifier
|
||||
|
||||
temp_file = File.new(dir + '/' + orig_file_name, 'w+')
|
||||
temp_file.write orig_content.force_encoding("UTF-8")
|
||||
|
|
|
@ -7,7 +7,7 @@ class Theme < Stylesheet
|
|||
protected
|
||||
|
||||
def set_name
|
||||
self.name = File.basename(self.file_filename,".css")
|
||||
self.name = File.basename(self.file_identifier,".css")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -14,9 +14,52 @@ class ModuleApp
|
|||
field :app_pages ,type: Array
|
||||
field :widgets ,type: Array
|
||||
|
||||
has_many :managers,as: :managing_app ,:class_name => "AppManager" #,:dependent => :destroy,:foreign_key => "managing_app_id",:inverse_of => :managing_app
|
||||
has_many :sub_managers,as: :sub_managing_app ,:class_name => "AppManager"#, :dependent => :destroy,:foreign_key => "sub_managing_app_id",:inverse_of => :sub_managing_app
|
||||
|
||||
has_one :app_auth,dependent: :delete
|
||||
|
||||
def managing_users
|
||||
self.managers.collect{ |t| t.user }
|
||||
end
|
||||
|
||||
def sub_managing_users
|
||||
self.sub_managers.collect{ |t| t.user }
|
||||
end
|
||||
|
||||
def assign_manager(user,assigner)
|
||||
manager = AppManager.first(conditions: {managing_app_id: self.id,user_id: user.id}) rescue nil
|
||||
if manager.nil?
|
||||
manager = self.managers.create(:user => user,:rule_creator => assigner)
|
||||
end
|
||||
manager
|
||||
end
|
||||
|
||||
def assign_sub_manager(user,assigner)
|
||||
submanager = AppManager.first(conditions: {sub_managing_app_id: self.id,user_id: user.id}) rescue nil
|
||||
if submanager.nil? && !self.managing_users.include?(user)
|
||||
submanager = self.sub_managers.create(:user => user,:rule_creator => assigner)
|
||||
end
|
||||
submanager
|
||||
end
|
||||
|
||||
def remove_manager(user)
|
||||
manager = AppManager.first(conditions: {managing_app_id: self.id,user_id: user.id}) rescue nil
|
||||
if manager
|
||||
manager.destroy
|
||||
else
|
||||
false
|
||||
end
|
||||
end
|
||||
|
||||
def remove_sub_manager(user)
|
||||
submanager = AppManager.first(conditions: {sub_managing_app_id: self.id,user_id: user.id}) rescue nil
|
||||
if submanager
|
||||
submanager.destroy
|
||||
else
|
||||
false
|
||||
end
|
||||
end
|
||||
|
||||
field :app_pages ,type: Array
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ class Attribute
|
|||
field :built_in, :type => Boolean, :default => false
|
||||
field :disabled, :type => Boolean, :default => false
|
||||
|
||||
has_many :attribute_fields, :autosave => true, :dependent => :destroy
|
||||
embeds_many :attribute_fields, :cascade_callbacks => true
|
||||
has_one :i18n_variable, :as => :language_value, :autosave => true, :dependent => :destroy
|
||||
accepts_nested_attributes_for :attribute_fields, :allow_destroy => true
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ class AttributeField
|
|||
field :built_in, :type => Boolean, :default => false
|
||||
field :disabled, :type => Boolean, :default => false
|
||||
|
||||
belongs_to :attribute
|
||||
embedded_in :attribute
|
||||
has_one :i18n_variable, :as => :language_value, :autosave => true, :dependent => :destroy
|
||||
has_many :attribute_values
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ class Role
|
|||
field :built_in, :type => Boolean, :default => false
|
||||
field :disabled, :type => Boolean, :default => false
|
||||
|
||||
has_many :sub_roles, :autosave => true, :dependent => :destroy
|
||||
embeds_many :sub_roles, :cascade_callbacks => true
|
||||
has_one :i18n_variable, :as => :language_value, :autosave => true, :dependent => :destroy
|
||||
has_many :users
|
||||
accepts_nested_attributes_for :i18n_variable, :allow_destroy => true
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class SubRole < Attribute
|
||||
|
||||
belongs_to :role
|
||||
embedded_in :role
|
||||
has_and_belongs_to_many :users
|
||||
|
||||
# Get an sub_role from key
|
||||
|
|
|
@ -14,6 +14,9 @@ class User
|
|||
has_many :app_auths,as: :privilege_apps,:inverse_of => :privilege_lists
|
||||
has_many :blocked_apps, :inverse_of => :blocked_users, :class_name => "AppAuth"
|
||||
has_many :privilege_apps, :inverse_of => :privilege_users, :class_name => "AppAuth"
|
||||
|
||||
has_many :managing_apps,:class_name => "AppManager"
|
||||
|
||||
belongs_to :role
|
||||
has_and_belongs_to_many :sub_roles
|
||||
accepts_nested_attributes_for :attribute_values, :allow_destroy => true
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</td>
|
||||
<td><%= asset.description %></td>
|
||||
<td><%= asset.data.file.content_type %></td>
|
||||
<td><%= asset.data_filename %></td>
|
||||
<td><%= asset.data_identifier %></td>
|
||||
<td><%= number_to_human_size(asset.data.file.file_length) %></td>
|
||||
<td class="action">
|
||||
<%= link_to t(:edit), edit_admin_asset_path(asset), :remote => true, :class => 'edit' %>
|
||||
|
@ -13,5 +13,5 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"></td>
|
||||
<td colspan="6"></td>
|
||||
</tr>
|
|
@ -1,12 +1,16 @@
|
|||
<div id='pop_up_content' class="main2">
|
||||
<h1><%= t('editing_asset') %></h1>
|
||||
|
||||
<%= form_for @asset, :url => admin_asset_path(@asset), :html => {:id => 'ajaxForm', :multipart => true } do |f| %>
|
||||
<%= form_for @asset, :url => admin_asset_path(@asset), :html => {:id => (is_html ? nil : 'ajaxForm'), :multipart => true } do |f| %>
|
||||
<%= f.error_messages %>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<div class="button_bar">
|
||||
<%= link_back if is_html %>
|
||||
<a id='submit_button'><%= t(:update) %></a>
|
||||
<% if is_html %>
|
||||
<%= link_back %>
|
||||
<%= f.submit t(:edit) %>
|
||||
<% else %>
|
||||
<a id='submit_button'><%= t(:edit) %></a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
|
@ -9,6 +9,6 @@
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<%= f.label :data, t('admin.data') %>
|
||||
<%= f.label :data, t('admin.data'), :class => 'file' %>
|
||||
<%= f.file_field :data %>
|
||||
</p>
|
|
@ -1,12 +1,16 @@
|
|||
<div id='pop_up_content' class="main2">
|
||||
<h1><%= t('admin.new_asset') %></h1>
|
||||
|
||||
<%= form_for :asset, :url => admin_assets_path, :html => {:id => 'ajaxForm', :multipart => true }, :remote => true do |f| %>
|
||||
<%= form_for :asset, :url => admin_assets_path, :html => {:id => (is_html ? nil : 'ajaxForm'), :multipart => true } do |f| %>
|
||||
<%= f.error_messages %>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<div class="button_bar">
|
||||
<%= link_back if is_html %>
|
||||
<a id='submit_button'><%= t(:create) %></a>
|
||||
<% if is_html %>
|
||||
<%= link_back %>
|
||||
<%= f.submit t(:create) %>
|
||||
<% else %>
|
||||
<a id='submit_button' class="new"><%= t(:create) %></a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<%= f.label "field_name", t('admin.' + field_name) %>
|
||||
<ul>
|
||||
<% object.send(field_name).each do |t| %>
|
||||
<li class="<%= classes %>" <%="path='#{t.file.url}' filename='#{t.file_filename}'" %> >
|
||||
<%= t.file_filename %>
|
||||
<li class="<%= classes %>" <%="path='#{t.file.url}' filename='#{t.file_identifier}'" %> >
|
||||
<%= t.file_identifier %>
|
||||
<% if classes.include?('r_destroy') %>
|
||||
<%= fields_for "design[" + field_name + "][]", t, :index => nil do |f| %>
|
||||
<%= f.hidden_field :id %>
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
<% content_for :secondary do %>
|
||||
<% end %>
|
||||
|
||||
<!-- Remove if CSS done-->
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<!-- Remove if CSS done-->
|
||||
<h3><%= @module_app.title %></h3>
|
||||
|
||||
<div id="manager_management">
|
||||
<h1>Manager</h1>
|
||||
|
||||
<dl id="manager">
|
||||
<dt>Manager</ht>
|
||||
<% @module_app.managers.each do |manager| %>
|
||||
<dd><%= manager.user.name %> <%= get_auth_by(manager) %> <%= link_to '[X]',remove_manager_admin_module_app_path(@module_app,manager),:method => :delete if if_permit_to_delete(:manager) && manager.user != current_user %> </dd>
|
||||
<% end %>
|
||||
<dd>Add:
|
||||
<%= form_tag(assign_manager_admin_module_app_path) do %>
|
||||
<%= collection_select(:manager,:id, User.all, :id, :name, :prompt => true,:disabled => !if_permit_to_assign(:manager))%>
|
||||
<%= submit_tag 'Add Manager' %>
|
||||
<% end %>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl id="sub_manager">
|
||||
<dt>Sub Manager</ht>
|
||||
<% @module_app.sub_managers.each do |manager| %>
|
||||
<dd><%= manager.user.name %> -AuthBy:<%= manager.rule_creator.name %> <%= link_to '[X]',remove_sub_manager_admin_module_app_path(@module_app,manager),:method => :delete if if_permit_to_delete(:sub_manager) && manager.user != current_user %> </dd>
|
||||
<% end %>
|
||||
<dd>Add:
|
||||
<%= form_tag(assign_sub_manager_admin_module_app_path) do %>
|
||||
<%= collection_select(:sub_manager,:id, User.all, :id, :name, :prompt => true,:disabled => !if_permit_to_assign(:sub_manager))%>
|
||||
<%= submit_tag 'Add Sub Manager' %>
|
||||
<% end %>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div id="user_role_management">
|
||||
<h1>User Role</h1>
|
||||
<%= form_tag(admin_module_app_app_auths_path(@module_app),:method => :post) do %>
|
||||
<%= collection_select(:new,:role, Role.all, :id, :key, :prompt => true) %>
|
||||
<%= submit_tag 'Add Role' %><br/>
|
||||
<%= collection_select(:new,:sub_role, SubRole.all, :id, :key, :prompt => true) %>
|
||||
<%= submit_tag 'Add SubRole' %><br/>
|
||||
<%= collection_select(:new,:privilege_user, User.all, :id, :name, :prompt => true) %>
|
||||
<%= submit_tag 'Add PrivilegeList' %><br/>
|
||||
<%= collection_select(:new,:blocked_user, User.all, :id, :name, :prompt => true) %>
|
||||
<%= submit_tag 'Add BlockedList' %><br/>
|
||||
<% end %>
|
||||
<ul>Roles </ul>
|
||||
<% unless @module_app.app_auth.nil? %>
|
||||
<% @module_app.app_auth.roles.each do |role| %>
|
||||
<li> <%= role.key %> Build in:<%= role.built_in ? 'Yes' : 'No' %> <%= link_to '[X]',remove_admin_module_app_app_auth_path(@module_app,@module_app.app_auth,'role',role),:method => :delete %></li>
|
||||
<% end %>
|
||||
<ul>Sub Roles </ul>
|
||||
<% @module_app.app_auth.sub_roles.each do |role| %>
|
||||
<li> <%= role.key %> Build in:<%= role.built_in ? 'Yes' : 'No' %> </li><%= link_to '[X]',remove_admin_module_app_app_auth_path(@module_app,@module_app.app_auth,'sub_role',role),:method => :delete %>
|
||||
<% end %>
|
||||
<ul>PrivilegeList </ul>
|
||||
<% @module_app.app_auth.privilege_users.each do |user| %>
|
||||
<li> <%= user.name %> <%= link_to '[X]',remove_admin_module_app_app_auth_path(@module_app,@module_app.app_auth,'privilege_user',user),:method => :delete %> </li>
|
||||
<% end %>
|
||||
<ul>BlockedList </ul>
|
||||
<% @module_app.app_auth.blocked_users.each do |user| %>
|
||||
<li> <%= user.name %><%= link_to '[X]',remove_admin_module_app_app_auth_path(@module_app,@module_app.app_auth,'blocked_user',user),:method => :delete %> </li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
|
@ -1,4 +1,4 @@
|
|||
<% role.sub_roles.each do |sub_role| %>
|
||||
<%= sub_role.i18n_variable[I18n.locale] %>
|
||||
<%= check_box_tag "user[sub_role_ids][]", sub_role.id, @user.sub_role_ids.include?(sub_role.id), :class => 'sub_role_select' %>
|
||||
<%= f.label sub_role.i18n_variable[I18n.locale], :for => "check_sub_role_#{sub_role.id}", :class => 'sub_role_select' %>
|
||||
<%= check_box_tag "user[sub_role_ids][]", sub_role.id, @user.sub_role_ids.include?(sub_role.id), :id => "check_sub_role_#{sub_role.id}", :class => 'sub_role_select' %>
|
||||
<% end %>
|
|
@ -4,6 +4,9 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title><%= @title || APP_CONFIG['orbit'] %></title>
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<%= stylesheet_link_tag "admin" %>
|
||||
<%= javascript_include_tag "admin" %>
|
||||
<%= yield :page_specific_css %>
|
||||
|
@ -11,13 +14,16 @@
|
|||
<%= csrf_meta_tag %>
|
||||
</head>
|
||||
<body>
|
||||
<div id="back_banner_link" >
|
||||
<div id="back_orbit"><%= render 'layouts/drop_down_menu' %></div>
|
||||
<header id="back_banner_link" class="fixed clear" >
|
||||
<nav id="back_orbit">
|
||||
<span>Orbit Icon</span>
|
||||
<%= render 'layouts/drop_down_menu' %>
|
||||
</nav>
|
||||
<div class="hmenu">
|
||||
<div class="lang"><%= render 'layouts/lang_menu' %></div>
|
||||
<%= render 'devise/menu/login_items' %>
|
||||
<div class="lang"><%= render 'layouts/lang_menu' %></div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div id="back_content">
|
||||
<div id="back_sidebar"><%= yield :secondary %></div>
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title><%= @title || APP_CONFIG['orbit'] %></title>
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<%= stylesheet_link_tag "site_editor" %>
|
||||
<%= javascript_include_tag "site_editor" %>
|
||||
<%= yield :page_specific_css %>
|
||||
|
@ -12,13 +15,16 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<div id="back_banner_link" >
|
||||
<div id="back_orbit"><%= render 'layouts/drop_down_menu' %></div>
|
||||
<header id="back_banner_link" class="fixed clear" >
|
||||
<nav id="back_orbit">
|
||||
<span>Orbit Icon</span>
|
||||
<%= render 'layouts/drop_down_menu' %>
|
||||
</nav>
|
||||
<div class="hmenu">
|
||||
<div class="lang"><%= render 'layouts/lang_menu' %></div>
|
||||
<%= render 'devise/menu/login_items' %>
|
||||
<div class="lang"><%= render 'layouts/lang_menu' %></div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div id="back_content">
|
||||
<div id="back_sidebar"><%= yield :sidebar %></div>
|
||||
<div class="main"><div id='back_main' class="main2">
|
||||
|
|
|
@ -10,7 +10,7 @@ PrototypeR4::Application.configure do
|
|||
config.whiny_nils = true
|
||||
|
||||
# Show full error reports and disable caching
|
||||
config.consider_all_requests_local = true
|
||||
config.consider_all_requests_local = false
|
||||
#config.action_view.debug_rjs = true
|
||||
config.action_controller.perform_caching = false
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#require 'carrierwave/orm/mongoid'
|
||||
|
||||
begin
|
||||
db_config = YAML::load(File.read(File.join(Rails.root, "/config/mongoid.yml")))
|
||||
rescue
|
||||
|
@ -13,3 +11,5 @@ CarrierWave.configure do |config|
|
|||
config.storage = :grid_fs
|
||||
config.grid_fs_access_url = "/gridfs"
|
||||
end
|
||||
|
||||
CarrierWave::SanitizedFile.sanitize_regexp = /[^[:word:]\.\-\+]/
|
||||
|
|
|
@ -5,6 +5,8 @@ en:
|
|||
|
||||
_locale: English
|
||||
|
||||
me: Me
|
||||
|
||||
add: Add
|
||||
back: Back
|
||||
create: Create
|
||||
|
|
|
@ -2,6 +2,8 @@ zh_tw:
|
|||
|
||||
_locale: 中文
|
||||
|
||||
me: 我
|
||||
|
||||
add: 新增
|
||||
back: 回去
|
||||
create: 創造
|
||||
|
|
|
@ -38,7 +38,18 @@ PrototypeR4::Application.routes.draw do
|
|||
end
|
||||
end
|
||||
resources :module_apps do
|
||||
resources :app_auths do
|
||||
member do
|
||||
match 'remove/:type/:target_id' ,:action=> 'remove',:via => "delete",:as =>:remove
|
||||
end
|
||||
end
|
||||
|
||||
member do
|
||||
match 'assign_manager' ,:action=> 'assign_manager',:via => "post",:as =>:assign_manager
|
||||
match 'assign_sub_manager' ,:action=> 'assign_sub_manager',:via => "post",:as =>:assign_sub_manager
|
||||
|
||||
match 'remove_manager/:app_manager_id' ,:action=> 'remove_manager',:via => "delete",:as =>:remove_manager
|
||||
match 'remove_sub_manager/:app_sub_manager_id' ,:action=> 'remove_sub_manager',:via => "delete",:as =>:remove_sub_manager
|
||||
get 'reload_frontend_pages'
|
||||
end
|
||||
end
|
||||
|
|
BIN
lib/NewBlog.zip
BIN
lib/NewBlog.zip
Binary file not shown.
|
@ -107,7 +107,7 @@ module ParserBackEnd
|
|||
c.define_tag 'menu' do |tag|
|
||||
home = get_homepage
|
||||
menu = page.design.layout.menu
|
||||
menu_level(home, 1, menu, true)
|
||||
menu_level(home, 0, menu, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,23 +1,33 @@
|
|||
module ParserCommon
|
||||
|
||||
def menu_level(page, current, menu, edit = false)
|
||||
res = ''
|
||||
if current <= menu.levels
|
||||
res = "<ul id="
|
||||
res << menu.values["id_#{current}"]
|
||||
res << " class="
|
||||
res << menu.values["class_#{current}"]
|
||||
res << ">"
|
||||
i = nil
|
||||
i = 1 if menu.values["li_incremental_#{current}"]
|
||||
if current == 1 && menu.values['home'].eql?('true')
|
||||
res << menu_li(page, current, menu, i, edit)
|
||||
i += 1 if i
|
||||
if current != 0
|
||||
res << "<div class='rc_dm'>"
|
||||
item = rand(100000)
|
||||
res << "<a href='#{edit ? admin_page_path(page.id) : page.full_name}' class='dm_ctrl' rel='#{item}'>#{page.name}<span class='down'></span></a>"
|
||||
if page.children.size > 0
|
||||
res << "<div id='#{item}' class='dm_list #{menu.values['class_#{current}']}'>"
|
||||
res << "<ul class='ini_list'>"
|
||||
i = nil
|
||||
i = 1 if menu.values["li_incremental_#{current}"]
|
||||
page.children.each do |child|
|
||||
res << menu_li(child, current, menu, i, edit)
|
||||
i += 1 if i
|
||||
end
|
||||
res << "</ul>"
|
||||
res << "</div>"
|
||||
end
|
||||
res << "</div>"
|
||||
else
|
||||
res << '<ul>'
|
||||
res << "<li>" + "<a href='#{edit ? admin_page_path(page.id) : page.full_name}' class='dm_ctrl'>#{page.name}</a>" + "</li>"
|
||||
page.children.each do |child|
|
||||
res << "<li>" + menu_level(child, current + 1, menu, edit) + "</li>"
|
||||
end
|
||||
res << '</ul>'
|
||||
end
|
||||
page.children.each do |child|
|
||||
res << menu_li(child, current, menu, i, edit)
|
||||
i += 1 if i
|
||||
end
|
||||
res << "</ul>"
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -26,8 +36,11 @@ module ParserCommon
|
|||
res << menu.values["li_class_#{current}"]
|
||||
res << "_#{i}" if i
|
||||
res << ">"
|
||||
res << "<a href='#{edit ? admin_page_path(page.id) : page.full_name}'>#{page.name}</a>"
|
||||
res << menu_level(page, current + 1, menu, edit) if page.children.size > 0 && !page.is_home?
|
||||
if page.children.size > 0
|
||||
res << menu_level(page, current + 1, menu, edit)
|
||||
else
|
||||
res << "<a href='#{edit ? admin_page_path(page.id) : page.full_name}' class='nav dm_ctrl'>#{page.name}</a>"
|
||||
end
|
||||
res << "</li>"
|
||||
end
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ module ParserFrontEnd
|
|||
ret << "<div id='appfrontend' class='dymanic_load' path='#{appfront_url.nil?? page.app_frontend_url : appfront_url}'></div>"
|
||||
else
|
||||
part = page.page_parts.detect{ |p| p.name.to_s == tag.attr['name'].to_s } rescue nil
|
||||
ret << part.content
|
||||
ret << part.content rescue nil
|
||||
end
|
||||
ret
|
||||
end
|
||||
|
@ -118,7 +118,7 @@ module ParserFrontEnd
|
|||
c.define_tag 'menu' do |tag|
|
||||
home = get_homepage
|
||||
menu = page.design.layout.menu
|
||||
menu_level(home, 1, menu)
|
||||
menu_level(home, 0, menu)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -27,7 +27,7 @@ module ParserLayout
|
|||
layout.layout_parts.create(:name => tag.attr['name'], :editable => true)
|
||||
end
|
||||
c.define_tag 'image' do |tag|
|
||||
image = layout.design.images.detect{ |i| i.file_filename.eql?(parse_html_image(tag.expand)) }
|
||||
image = layout.design.images.detect{ |i| i.file_identifier.eql?(parse_html_image(tag.expand)) }
|
||||
image.update_attributes(:name => tag.attr['name'], :html_id => tag.attr['id'], :html_class => tag.attr['class'])
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
# encoding: utf-8
|
||||
|
||||
namespace :pages do
|
||||
|
||||
task :build => :environment do
|
||||
|
||||
Item.delete_all
|
||||
|
||||
|
||||
var_10 = I18nVariable.create!( :document_class => 'Home', :key => 'home', :en => 'Homepage', :zh_tw => '首頁')
|
||||
var_13 = I18nVariable.create!( :document_class => 'PagePart', :key => 'main_content', :en => 'This is the homepage', :zh_tw => '這是首頁', :parent_id => var_10.id )
|
||||
|
||||
|
||||
design = Design.new(:title => "Fraisier", :author => "Paul", :intro => "Strawberry cake")
|
||||
|
||||
design.build_default_css(:file => File.open("#{Rails.root}/lib/fraisier/default.css"))
|
||||
|
||||
# image = design.images.build(:file => File.open("#{Rails.root}/lib/fraisier/img/buttons.gif"))
|
||||
#
|
||||
# js = design.javascripts.build(:file => File.open("#{Rails.root}/lib/fraisier/inettuts.js"))
|
||||
#
|
||||
theme = design.themes.build(:file => File.open("#{Rails.root}/lib/fraisier/themes/default.css"))
|
||||
theme_1 = design.themes.build(:file => File.open("#{Rails.root}/lib/fraisier/themes/red.css"))
|
||||
|
||||
design.build_layout
|
||||
design.layout.file = File.open("#{Rails.root}/lib/fraisier/layout.html")
|
||||
|
||||
design.layout.save
|
||||
theme.save
|
||||
theme_1.save
|
||||
# image.save
|
||||
# js.save
|
||||
|
||||
design.save
|
||||
|
||||
|
||||
|
||||
design_1 = Design.new(:title => "Bob", :author => "Me", :intro => "Moran")
|
||||
|
||||
design_1.build_default_css(:file => File.open("#{Rails.root}/lib/fraisier/default.css"))
|
||||
|
||||
# image = design.images.build(:file => File.open("#{Rails.root}/lib/fraisier/img/buttons.gif"))
|
||||
#
|
||||
# js = design.javascripts.build(:file => File.open("#{Rails.root}/lib/fraisier/inettuts.js"))
|
||||
#
|
||||
theme = design_1.themes.build(:file => File.open("#{Rails.root}/lib/fraisier/themes/default.css"))
|
||||
theme_1 = design_1.themes.build(:file => File.open("#{Rails.root}/lib/fraisier/themes/red.css"))
|
||||
|
||||
design_1.build_layout
|
||||
design_1.layout.file = File.open("#{Rails.root}/lib/fraisier/layout.html")
|
||||
|
||||
design_1.layout.save
|
||||
theme.save
|
||||
theme_1.save
|
||||
# image.save
|
||||
# js.save
|
||||
|
||||
design_1.save
|
||||
|
||||
|
||||
home = Page.create!( :i18n_variable_id => var_10.id, :design_id => design_1.id, :name => 'home', :is_published => true, :theme_id => theme.id )
|
||||
home.page_parts.create!( :name => 'content_1', :content => File.open("#{Rails.root}/lib/template/home.page").read, :kind => 'text', :i18n_variable_id => var_13.id )
|
||||
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,29 @@
|
|||
# encoding: utf-8
|
||||
namespace :user do
|
||||
|
||||
task :build => :environment do
|
||||
User.all(conditions: {email: /nor/}).destroy_all
|
||||
|
||||
username_list = %w{nor1 nor2 nor3 nor4 nor5 nor6 nor7}
|
||||
userfirstname_list_en = %w{ One Two Thre For Fiv Six Sen }
|
||||
userlastname_list_en = %w{ Aa Bb Cc Dd Ee Ff Gg }
|
||||
|
||||
userfirstname_list_ct = %w{ 一一 二二 三三 四四 五五 六六 七七 }
|
||||
userlastname_list_ct = %w{ 陳 林 吳 李 鄭 方 王 }
|
||||
|
||||
first_name_field = AttributeField.first(conditions: {key: "first_name"})
|
||||
last_name_field = AttributeField.first(conditions: {key: "last_name"})
|
||||
major_field = AttributeField.first(conditions: {key: "major"})
|
||||
department_field = AttributeField.first(conditions: {key: "department"})
|
||||
|
||||
stud_role = Role.first(conditions: {key: 'student'})
|
||||
|
||||
username_list.each_with_index do |username,index|
|
||||
user = User.create( :email => "#{username}@rulingcom.com", :password => 'password', :password_confirmation => 'password', :admin => false ,:role_id => stud_role.id,:sub_role_ids => [stud_role.sub_roles[Random.rand(stud_role.sub_roles.count-1)].id])
|
||||
AttributeValue.create( :user_id => user.id, :attribute_field_id => first_name_field.id, :key => 'first_name', :en => userfirstname_list_en[index], :zh_tw => userfirstname_list_ct[index] )
|
||||
AttributeValue.create( :user_id => user.id, :attribute_field_id => last_name_field.id, :key => 'last_name', :en => userlastname_list_en[index], :zh_tw => userlastname_list_ct[index] )
|
||||
AttributeValue.create( :user_id => user.id, :attribute_field_id => major_field.id, :key => 'major', :en => 'Information management', :zh_tw => '信息化管理' )
|
||||
AttributeValue.create( :user_id => user.id, :attribute_field_id => department_field.id, :key => 'department', :en => 'Computer Science', :zh_tw => '計算機科學' )
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,14 +1,6 @@
|
|||
class Panel::NewBlog::FrontEnd::PostsController < ObitFrontendController
|
||||
|
||||
|
||||
def initialize
|
||||
super
|
||||
@app_title = NewBlog::MOUDLEAPP_TITLE
|
||||
end
|
||||
|
||||
# GET /posts
|
||||
# GET /posts.xml
|
||||
|
||||
def index
|
||||
@posts = Post.all
|
||||
end
|
||||
|
|
|
@ -1,12 +1,4 @@
|
|||
class Panel::NewBlog::Widget::PostsController < ObitWidgetController
|
||||
|
||||
layout 'production'
|
||||
|
||||
def initialize
|
||||
super
|
||||
@app_title = NewBlog::MOUDLEAPP_TITLE
|
||||
end
|
||||
|
||||
# GET /posts
|
||||
# GET /posts.xml
|
||||
def index
|
||||
|
|
Loading…
Reference in New Issue