),LOG_TABLE:new Array(256)},h=0;8>h;h++)g.EXP_TABLE[h]=1<<h;for(var h=8;256>h;h++)g.EXP_TABLE[h]=g.EXP_TABLE[h-4]^g.EXP_TABLE[h-5]^g.EXP_TABLE[h-6]^g.EXP_TABLE[h-8];for(var h=0;255>h;h++)g.LOG_TABLE[g.EXP_TABLE[h]]=h;i.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var b=new Array(this.getLength()+a.getLength()-1),c=0;c<this.getLength();c++)for(var d=0;d<a.getLength();d++)b[c+d]^=g.gexp(g.glog(this.get(c))+g.glog(a.get(d)));return new i(b,0)},mod:function(a){if(this.getLength()-a.getLength()<0)return this;for(var b=g.glog(this.get(0))-g.glog(a.get(0)),c=new Array(this.getLength()),d=0;d<this.getLength();d++)c[d]=this.get(d);for(var d=0;d<a.getLength();d++)c[d]^=g.gexp(g.glog(a.get(d))+b);return new i(c,0).mod(a)}},j.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],j.getRSBlocks=function(a,b){var c=j.getRsBlockTable(a,b);if(void 0==c)throw new Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+b);for(var d=c.length/3,e=[],f=0;d>f;f++)for(var g=c[3*f+0],h=c[3*f+1],i=c[3*f+2],k=0;g>k;k++)e.push(new j(h,i));return e},j.getRsBlockTable=function(a,b){switch(b){case d.L:return j.RS_BLOCK_TABLE[4*(a-1)+0];case d.M:return j.RS_BLOCK_TABLE[4*(a-1)+1];case d.Q:return j.RS_BLOCK_TABLE[4*(a-1)+2];case d.H:return j.RS_BLOCK_TABLE[4*(a-1)+3];default:return void 0}},k.prototype={get:function(a){var b=Math.floor(a/8);return 1==(1&this.buffer[b]>>>7-a%8)},put:function(a,b){for(var c=0;b>c;c++)this.putBit(1==(1&a>>>b-c-1))},getLengthInBits:function(){return this.length},putBit:function(a){var b=Math.floor(this.length/8);this.buffer.length<=b&&this.buffer.push(0),a&&(this.buffer[b]|=128>>>this.length%8),this.length++}};var l=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],o=function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.draw=function(a){function g(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);for(var d in b)b.hasOwnProperty(d)&&c.setAttribute(d,b[d]);return c}var b=this._htOption,c=this._el,d=a.getModuleCount();Math.floor(b.width/d),Math.floor(b.height/d),this.clear();var h=g("svg",{viewBox:"0 0 "+String(d)+" "+String(d),width:"100%",height:"100%",fill:b.colorLight});h.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),c.appendChild(h),h.appendChild(g("rect",{fill:b.colorDark,width:"1",height:"1",id:"template"}));for(var i=0;d>i;i++)for(var j=0;d>j;j++)if(a.isDark(i,j)){var k=g("use",{x:String(i),y:String(j)});k.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),h.appendChild(k)}},a.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},a}(),p="svg"===document.documentElement.tagName.toLowerCase(),q=p?o:m()?function(){function a(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}function d(a,b){var c=this;if(c._fFail=b,c._fSuccess=a,null===c._bSupportDataURI){var d=document.createElement("img"),e=function(){c._bSupportDataURI=!1,c._fFail&&_fFail.call(c)},f=function(){c._bSupportDataURI=!0,c._fSuccess&&c._fSuccess.call(c)};return d.onabort=e,d.onerror=e,d.onload=f,d.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",void 0}c._bSupportDataURI===!0&&c._fSuccess?c._fSuccess.call(c):c._bSupportDataURI===!1&&c._fFail&&c._fFail.call(c)}if(this._android&&this._android<=2.1){var b=1/window.devicePixelRatio,c=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(a,d,e,f,g,h,i,j){if("nodeName"in a&&/img/i.test(a.nodeName))for(var l=arguments.length-1;l>=1;l--)arguments[l]=arguments[l]*b;else"undefined"==typeof j&&(arguments[1]*=b,arguments[2]*=b,arguments[3]*=b,arguments[4]*=b);c.apply(this,arguments)}}var e=function(a,b){this._bIsPainted=!1,this._android=n(),this._htOption=b,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=b.width,this._elCanvas.height=b.height,a.appendChild(this._elCanvas),this._el=a,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return e.prototype.draw=function(a){var b=this._elImage,c=this._oContext,d=this._htOption,e=a.getModuleCount(),f=d.width/e,g=d.height/e,h=Math.round(f),i=Math.round(g);b.style.display="none",this.clear();for(var j=0;e>j;j++)for(var k=0;e>k;k++){var l=a.isDark(j,k),m=k*f,n=j*g;c.strokeStyle=l?d.colorDark:d.colorLight,c.lineWidth=1,c.fillStyle=l?d.colorDark:d.colorLight,c.fillRect(m,n,f,g),c.strokeRect(Math.floor(m)+.5,Math.floor(n)+.5,h,i),c.strokeRect(Math.ceil(m)-.5,Math.ceil(n)-.5,h,i)}this._bIsPainted=!0},e.prototype.makeImage=function(){this._bIsPainted&&d.call(this,a)},e.prototype.isPainted=function(){return this._bIsPainted},e.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},e.prototype.round=function(a){return a?Math.floor(1e3*a)/1e3:a},e}():function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.draw=function(a){for(var b=this._htOption,c=this._el,d=a.getModuleCount(),e=Math.floor(b.width/d),f=Math.floor(b.height/d),g=['<table style="border:0;border-collapse:collapse;">'],h=0;d>h;h++){g.push("<tr>");for(var i=0;d>i;i++)g.push('<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:'+e+"px;height:"+f+"px;background-color:"+(a.isDark(h,i)?b.colorDark:b.colorLight)+';"></td>');g.push("</tr>")}g.push("</table>"),c.innerHTML=g.join("");var j=c.childNodes[0],k=(b.width-j.offsetWidth)/2,l=(b.height-j.offsetHeight)/2;k>0&&l>0&&(j.style.margin=l+"px "+k+"px")},a.prototype.clear=function(){this._el.innerHTML=""},a}();QRCode=function(a,b){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:d.H},"string"==typeof b&&(b={text:b}),b)for(var c in b)this._htOption[c]=b[c];"string"==typeof a&&(a=document.getElementById(a)),this._android=n(),this._el=a,this._oQRCode=null,this._oDrawing=new q(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)},QRCode.prototype.makeCode=function(a){this._oQRCode=new b(r(a,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(a),this._oQRCode.make(),this._el.title=a,this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCode.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCode.prototype.clear=function(){this._oDrawing.clear()},QRCode.CorrectLevel=d}(); portal-front - Gogs: Go Git Service

portal html css js resource

xuchunyang 476bfccec0 编辑器修改 7 年之前
..
default bdf84638b6 编辑器组件 7 年之前
iframe.css 476bfccec0 编辑器修改 7 年之前
jiapeng/portal-front - Gogs: Go Git Service

13 Commits (5ecd86aa6b0ad650b8a3bdff13171c4b0ca8e2da)

Auteur SHA1 Message Date
  xuchunyang 3a4a6235a5 修改资源链接 7 ans auparavant
  luyanan 1d30586931 去掉资源文章企业信息的公司成立时间 7 ans auparavant
  xuchunyang 1a0599dd45 添加登录判断方法 7 ans auparavant
  luyanan 0526b16ffe 修改不同身份需求跳转页面bug 7 ans auparavant
  xuchunyang bd84a6b678 用户实名验证后图标显示 7 ans auparavant
  xuchunyang ef20984195 判断了下,自己不能关注自己的问题 7 ans auparavant
  xuchunyang 94e4524003 修改咨询未登录判断问题 7 ans auparavant
  jack e5a09d9c66 资源及专家登录 7 ans auparavant
  jack f407cb5c7b 资源详情页面及分享资源页面 7 ans auparavant
  jack 2031d35fa3 资源 7 ans auparavant
  jack 9a794c129d 资源详情及专家浏览页标志样式 7 ans auparavant
  jack d8dfa839bb 资源详情页面 7 ans auparavant
  jack 11085676b8 资源详情页面 7 ans auparavant
jiapeng/portal-front - Gogs: Go Git Service

1 Commity (cc029bad2696b1d02039e21bc79f837abcb7f8c9)

Autor SHA1 Wiadomość Data
  jiapeng c5d9752792 --init 8 lat temu
portal-front - Gogs: Go Git Service

portal html css js resource

ueditor.parse.js 36KB

    /*! * UEditor * version: ueditor * build: Wed Aug 10 2016 11:06:16 GMT+0800 (CST) */ (function(){ (function(){ UE = window.UE || {}; var isIE = !!window.ActiveXObject; //定义utils工具 var utils = { removeLastbs : function(url){ return url.replace(/\/$/,'') }, extend : function(t,s){ var a = arguments, notCover = this.isBoolean(a[a.length - 1]) ? a[a.length - 1] : false, len = this.isBoolean(a[a.length - 1]) ? a.length - 1 : a.length; for (var i = 1; i < len; i++) { var x = a[i]; for (var k in x) { if (!notCover || !t.hasOwnProperty(k)) { t[k] = x[k]; } } } return t; }, isIE : isIE, cssRule : isIE ? function(key,style,doc){ var indexList,index; doc = doc || document; if(doc.indexList){ indexList = doc.indexList; }else{ indexList = doc.indexList = {}; } var sheetStyle; if(!indexList[key]){ if(style === undefined){ return '' } sheetStyle = doc.createStyleSheet('',index = doc.styleSheets.length); indexList[key] = index; }else{ sheetStyle = doc.styleSheets[indexList[key]]; } if(style === undefined){ return sheetStyle.cssText } sheetStyle.cssText = sheetStyle.cssText + '\n' + (style || '') } : function(key,style,doc){ doc = doc || document; var head = doc.getElementsByTagName('head')[0],node; if(!(node = doc.getElementById(key))){ if(style === undefined){ return '' } node = doc.createElement('style'); node.id = key; head.appendChild(node) } if(style === undefined){ return node.innerHTML } if(style !== ''){ node.innerHTML = node.innerHTML + '\n' + style; }else{ head.removeChild(node) } }, domReady : function (onready) { var doc = window.document; if (doc.readyState === "complete") { onready(); }else{ if (isIE) { (function () { if (doc.isReady) return; try { doc.documentElement.doScroll("left"); } catch (error) { setTimeout(arguments.callee, 0); return; } onready(); })(); window.attachEvent('onload', function(){ onready() }); } else { doc.addEventListener("DOMContentLoaded", function () { doc.removeEventListener("DOMContentLoaded", arguments.callee, false); onready(); }, false); window.addEventListener('load', function(){onready()}, false); } } }, each : function(obj, iterator, context) { if (obj == null) return; if (obj.length === +obj.length) { for (var i = 0, l = obj.length; i < l; i++) { if(iterator.call(context, obj[i], i, obj) === false) return false; } } else { for (var key in obj) { if (obj.hasOwnProperty(key)) { if(iterator.call(context, obj[key], key, obj) === false) return false; } } } }, inArray : function(arr,item){ var index = -1; this.each(arr,function(v,i){ if(v === item){ index = i; return false; } }); return index; }, pushItem : function(arr,item){ if(this.inArray(arr,item)==-1){ arr.push(item) } }, trim: function (str) { return str.replace(/(^[ \t\n\r]+)|([ \t\n\r]+$)/g, ''); }, indexOf: function (array, item, start) { var index = -1; start = this.isNumber(start) ? start : 0; this.each(array, function (v, i) { if (i >= start && v === item) { index = i; return false; } }); return index; }, hasClass: function (element, className) { className = className.replace(/(^[ ]+)|([ ]+$)/g, '').replace(/[ ]{2,}/g, ' ').split(' '); for (var i = 0, ci, cls = element.className; ci = className[i++];) { if (!new RegExp('\\b' + ci + '\\b', 'i').test(cls)) { return false; } } return i - 1 == className.length; }, addClass:function (elm, classNames) { if(!elm)return; classNames = this.trim(classNames).replace(/[ ]{2,}/g,' ').split(' '); for(var i = 0,ci,cls = elm.className;ci=classNames[i++];){ if(!new RegExp('\\b' + ci + '\\b').test(cls)){ cls += ' ' + ci; } } elm.className = utils.trim(cls); }, removeClass:function (elm, classNames) { classNames = this.isArray(classNames) ? classNames : this.trim(classNames).replace(/[ ]{2,}/g,' ').split(' '); for(var i = 0,ci,cls = elm.className;ci=classNames[i++];){ cls = cls.replace(new RegExp('\\b' + ci + '\\b'),'') } cls = this.trim(cls).replace(/[ ]{2,}/g,' '); elm.className = cls; !cls && elm.removeAttribute('className'); }, on: function (element, type, handler) { var types = this.isArray(type) ? type : type.split(/\s+/), k = types.length; if (k) while (k--) { type = types[k]; if (element.addEventListener) { element.addEventListener(type, handler, false); } else { if (!handler._d) { handler._d = { els : [] }; } var key = type + handler.toString(),index = utils.indexOf(handler._d.els,element); if (!handler._d[key] || index == -1) { if(index == -1){ handler._d.els.push(element); } if(!handler._d[key]){ handler._d[key] = function (evt) { return handler.call(evt.srcElement, evt || window.event); }; } element.attachEvent('on' + type, handler._d[key]); } } } element = null; }, off: function (element, type, handler) { var types = this.isArray(type) ? type : type.split(/\s+/), k = types.length; if (k) while (k--) { type = types[k]; if (element.removeEventListener) { element.removeEventListener(type, handler, false); } else { var key = type + handler.toString(); try{ element.detachEvent('on' + type, handler._d ? handler._d[key] : handler); }catch(e){} if (handler._d && handler._d[key]) { var index = utils.indexOf(handler._d.els,element); if(index!=-1){ handler._d.els.splice(index,1); } handler._d.els.length == 0 && delete handler._d[key]; } } } }, loadFile : function () { var tmpList = []; function getItem(doc,obj){ try{ for(var i= 0,ci;ci=tmpList[i++];){ if(ci.doc === doc && ci.url == (obj.src || obj.href)){ return ci; } } }catch(e){ return null; } } return function (doc, obj, fn) { var item = getItem(doc,obj); if (item) { if(item.ready){ fn && fn(); }else{ item.funs.push(fn) } return; } tmpList.push({ doc:doc, url:obj.src||obj.href, funs:[fn] }); if (!doc.body) { var html = []; for(var p in obj){ if(p == 'tag')continue; html.push(p + '="' + obj[p] + '"') } doc.write('<' + obj.tag + ' ' + html.join(' ') + ' ></'+obj.tag+'>'); return; } if (obj.id && doc.getElementById(obj.id)) { return; } var element = doc.createElement(obj.tag); delete obj.tag; for (var p in obj) { element.setAttribute(p, obj[p]); } element.onload = element.onreadystatechange = function () { if (!this.readyState || /loaded|complete/.test(this.readyState)) { item = getItem(doc,obj); if (item.funs.length > 0) { item.ready = 1; for (var fi; fi = item.funs.pop();) { fi(); } } element.onload = element.onreadystatechange = null; } }; element.onerror = function(){ throw Error('The load '+(obj.href||obj.src)+' fails,check the url') }; doc.getElementsByTagName("head")[0].appendChild(element); } }() }; utils.each(['String', 'Function', 'Array', 'Number', 'RegExp', 'Object','Boolean'], function (v) { utils['is' + v] = function (obj) { return Object.prototype.toString.apply(obj) == '[object ' + v + ']'; } }); var parselist = {}; UE.parse = { register : function(parseName,fn){ parselist[parseName] = fn; }, load : function(opt){ utils.each(parselist,function(v){ v.call(opt,utils); }) } }; uParse = function(selector,opt){ utils.domReady(function(){ var contents; if(document.querySelectorAll){ contents = document.querySelectorAll(selector) }else{ if(/^#/.test(selector)){ contents = [document.getElementById(selector.replace(/^#/,''))] }else if(/^\./.test(selector)){ var contents = []; utils.each(document.getElementsByTagName('*'),function(node){ if(node.className && new RegExp('\\b' + selector.replace(/^\./,'') + '\\b','i').test(node.className)){ contents.push(node) } }) }else{ contents = document.getElementsByTagName(selector) } } utils.each(contents,function(v){ UE.parse.load(utils.extend({root:v,selector:selector},opt)) }) }) } })(); UE.parse.register('insertcode',function(utils){ var pres = this.root.getElementsByTagName('pre'); if(pres.length){ if(typeof XRegExp == "undefined"){ var jsurl,cssurl; if(this.rootPath !== undefined){ jsurl = utils.removeLastbs(this.rootPath) + '/third-party/SyntaxHighlighter/shCore.js'; cssurl = utils.removeLastbs(this.rootPath) + '/third-party/SyntaxHighlighter/shCoreDefault.css'; }else{ jsurl = this.highlightJsUrl; cssurl = this.highlightCssUrl; } utils.loadFile(document,{ id : "syntaxhighlighter_css", tag : "link", rel : "stylesheet", type : "text/css", href : cssurl }); utils.loadFile(document,{ id : "syntaxhighlighter_js", src : jsurl, tag : "script", type : "text/javascript", defer : "defer" },function(){ utils.each(pres,function(pi){ if(pi && /brush/i.test(pi.className)){ SyntaxHighlighter.highlight(pi); } }); }); }else{ utils.each(pres,function(pi){ if(pi && /brush/i.test(pi.className)){ SyntaxHighlighter.highlight(pi); } }); } } }); UE.parse.register('table', function (utils) { var me = this, root = this.root, tables = root.getElementsByTagName('table'); if (tables.length) { var selector = this.selector; //追加默认的表格样式 utils.cssRule('table', selector + ' table.noBorderTable td,' + selector + ' table.noBorderTable th,' + selector + ' table.noBorderTable caption{border:1px dashed #ddd !important}' + selector + ' table.sortEnabled tr.firstRow th,' + selector + ' table.sortEnabled tr.firstRow td{padding-right:20px; background-repeat: no-repeat;' + 'background-position: center right; background-image:url(' + this.rootPath + 'themes/default/images/sortable.png);}' + selector + ' table.sortEnabled tr.firstRow th:hover,' + selector + ' table.sortEnabled tr.firstRow td:hover{background-color: #EEE;}' + selector + ' table{margin-bottom:10px;border-collapse:collapse;display:table;}' + selector + ' td,' + selector + ' th{ background:white; padding: 5px 10px;border: 1px solid #DDD;}' + selector + ' caption{border:1px dashed #DDD;border-bottom:0;padding:3px;text-align:center;}' + selector + ' th{border-top:1px solid #BBB;background:#F7F7F7;}' + selector + ' table tr.firstRow th{border-top:2px solid #BBB;background:#F7F7F7;}' + selector + ' tr.ue-table-interlace-color-single td{ background: #fcfcfc; }' + selector + ' tr.ue-table-interlace-color-double td{ background: #f7faff; }' + selector + ' td p{margin:0;padding:0;}', document); //填充空的单元格 utils.each('td th caption'.split(' '), function (tag) { var cells = root.getElementsByTagName(tag); cells.length && utils.each(cells, function (node) { if (!node.firstChild) { node.innerHTML = '&nbsp;'; } }) }); //表格可排序 var tables = root.getElementsByTagName('table'); utils.each(tables, function (table) { if (/\bsortEnabled\b/.test(table.className)) { utils.on(table, 'click', function(e){ var target = e.target || e.srcElement, cell = findParentByTagName(target, ['td', 'th']); var table = findParentByTagName(target, 'table'), colIndex = utils.indexOf(table.rows[0].cells, cell), sortType = table.getAttribute('data-sort-type'); if(colIndex != -1) { sortTable(table, colIndex, me.tableSortCompareFn || sortType); updateTable(table); } }); } }); //按照标签名查找父节点 function findParentByTagName(target, tagNames) { var i, current = target; tagNames = utils.isArray(tagNames) ? tagNames:[tagNames]; while(current){ for(i = 0;i < tagNames.length; i++) { if(current.tagName == tagNames[i].toUpperCase()) return current; } current = current.parentNode; } return null; } //表格排序 function sortTable(table, sortByCellIndex, compareFn) { var rows = table.rows, trArray = [], flag = rows[0].cells[0].tagName === "TH", lastRowIndex = 0; for (var i = 0,len = rows.length; i < len; i++) { trArray[i] = rows[i]; } var Fn = { 'reversecurrent': function(td1,td2){ return 1; }, 'orderbyasc': function(td1,td2){ var value1 = td1.innerText||td1.textContent, value2 = td2.innerText||td2.textContent; return value1.localeCompare(value2); }, 'reversebyasc': function(td1,td2){ var value1 = td1.innerHTML, value2 = td2.innerHTML; return value2.localeCompare(value1); }, 'orderbynum': function(td1,td2){ var value1 = td1[utils.isIE ? 'innerText':'textContent'].match(/\d+/), value2 = td2[utils.isIE ? 'innerText':'textContent'].match(/\d+/); if(value1) value1 = +value1[0]; if(value2) value2 = +value2[0]; return (value1||0) - (value2||0); }, 'reversebynum': function(td1,td2){ var value1 = td1[utils.isIE ? 'innerText':'textContent'].match(/\d+/), value2 = td2[utils.isIE ? 'innerText':'textContent'].match(/\d+/); if(value1) value1 = +value1[0]; if(value2) value2 = +value2[0]; return (value2||0) - (value1||0); } }; //对表格设置排序的标记data-sort-type table.setAttribute('data-sort-type', compareFn && typeof compareFn === "string" && Fn[compareFn] ? compareFn:''); //th不参与排序 flag && trArray.splice(0, 1); trArray = sort(trArray,function (tr1, tr2) { var result; if (compareFn && typeof compareFn === "function") { result = compareFn.call(this, tr1.cells[sortByCellIndex], tr2.cells[sortByCellIndex]); } else if (compareFn && typeof compareFn === "number") { result = 1; } else if (compareFn && typeof compareFn === "string" && Fn[compareFn]) { result = Fn[compareFn].call(this, tr1.cells[sortByCellIndex], tr2.cells[sortByCellIndex]); } else { result = Fn['orderbyasc'].call(this, tr1.cells[sortByCellIndex], tr2.cells[sortByCellIndex]); } return result; }); var fragment = table.ownerDocument.createDocumentFragment(); for (var j = 0, len = trArray.length; j < len; j++) { fragment.appendChild(trArray[j]); } var tbody = table.getElementsByTagName("tbody")[0]; if(!lastRowIndex){ tbody.appendChild(fragment); }else{ tbody.insertBefore(fragment,rows[lastRowIndex- range.endRowIndex + range.beginRowIndex - 1]) } } //冒泡排序 function sort(array, compareFn){ compareFn = compareFn || function(item1, item2){ return item1.localeCompare(item2);}; for(var i= 0,len = array.length; i<len; i++){ for(var j = i,length = array.length; j<length; j++){ if(compareFn(array[i], array[j]) > 0){ var t = array[i]; array[i] = array[j]; array[j] = t; } } } return array; } //更新表格 function updateTable(table) { //给第一行设置firstRow的样式名称,在排序图标的样式上使用到 if(!utils.hasClass(table.rows[0], "firstRow")) { for(var i = 1; i< table.rows.length; i++) { utils.removeClass(table.rows[i], "firstRow"); } utils.addClass(table.rows[0], "firstRow"); } } } }); UE.parse.register('charts',function( utils ){ utils.cssRule('chartsContainerHeight','.edui-chart-container { height:'+(this.chartContainerHeight||300)+'px}'); var resourceRoot = this.rootPath, containers = this.root, sources = null; //不存在指定的根路径, 则直接退出 if ( !resourceRoot ) { return; } if ( sources = parseSources() ) { loadResources(); } function parseSources () { if ( !containers ) { return null; } return extractChartData( containers ); } /** * 提取数据 */ function extractChartData ( rootNode ) { var data = [], tables = rootNode.getElementsByTagName( "table" ); for ( var i = 0, tableNode; tableNode = tables[ i ]; i++ ) { if ( tableNode.getAttribute( "data-chart" ) !== null ) { data.push( formatData( tableNode ) ); } } return data.length ? data : null; } function formatData ( tableNode ) { var meta = tableNode.getAttribute( "data-chart" ), metaConfig = {}, data = []; //提取table数据 for ( var i = 0, row; row = tableNode.rows[ i ]; i++ ) { var rowData = []; for ( var j = 0, cell; cell = row.cells[ j ]; j++ ) { var value = ( cell.innerText || cell.textContent || '' ); rowData.push( cell.tagName == 'TH' ? value:(value | 0) ); } data.push( rowData ); } //解析元信息 meta = meta.split( ";" ); for ( var i = 0, metaData; metaData = meta[ i ]; i++ ) { metaData = metaData.split( ":" ); metaConfig[ metaData[ 0 ] ] = metaData[ 1 ]; } return { table: tableNode, meta: metaConfig, data: data }; } //加载资源 function loadResources () { loadJQuery(); } function loadJQuery () { //不存在jquery, 则加载jquery if ( !window.jQuery ) { utils.loadFile(document,{ src : resourceRoot + "/third-party/jquery-1.10.2.min.js", tag : "script", type : "text/javascript", defer : "defer" },function(){ loadHighcharts(); }); } else { loadHighcharts(); } } function loadHighcharts () { //不存在Highcharts, 则加载Highcharts if ( !window.Highcharts ) { utils.loadFile(document,{ src : resourceRoot + "/third-party/highcharts/highcharts.js", tag : "script", type : "text/javascript", defer : "defer" },function(){ loadTypeConfig(); }); } else { loadTypeConfig(); } } //加载图表差异化配置文件 function loadTypeConfig () { utils.loadFile(document,{ src : resourceRoot + "/dialogs/charts/chart.config.js", tag : "script", type : "text/javascript", defer : "defer" },function(){ render(); }); } //渲染图表 function render () { var config = null, chartConfig = null, container = null; for ( var i = 0, len = sources.length; i < len; i++ ) { config = sources[ i ]; chartConfig = analysisConfig( config ); container = createContainer( config.table ); renderChart( container, typeConfig[ config.meta.chartType ], chartConfig ); } } /** * 渲染图表 * @param container 图表容器节点对象 * @param typeConfig 图表类型配置 * @param config 图表通用配置 * */ function renderChart ( container, typeConfig, config ) { $( container ).highcharts( $.extend( {}, typeConfig, { credits: { enabled: false }, exporting: { enabled: false }, title: { text: config.title, x: -20 //center }, subtitle: { text: config.subTitle, x: -20 }, xAxis: { title: { text: config.xTitle }, categories: config.categories }, yAxis: { title: { text: config.yTitle }, plotLines: [{ value: 0, width: 1, color: '#808080' }] }, tooltip: { enabled: true, valueSuffix: config.suffix }, legend: { layout: 'vertical', align: 'right', verticalAlign: 'middle', borderWidth: 1 }, series: config.series } )); } /** * 创建图表的容器 * 新创建的容器会替换掉对应的table对象 * */ function createContainer ( tableNode ) { var container = document.createElement( "div" ); container.className = "edui-chart-container"; tableNode.parentNode.replaceChild( container, tableNode ); return container; } //根据config解析出正确的类别和图表数据信息 function analysisConfig ( config ) { var series = [], //数据类别 categories = [], result = [], data = config.data, meta = config.meta; //数据对齐方式为相反的方式, 需要反转数据 if ( meta.dataFormat != "1" ) { for ( var i = 0, len = data.length; i < len ; i++ ) { for ( var j = 0, jlen = data[ i ].length; j < jlen; j++ ) { if ( !result[ j ] ) { result[ j ] = []; } result[ j ][ i ] = data[ i ][ j ]; } } data = result; } result = {}; //普通图表 if ( meta.chartType != typeConfig.length - 1 ) { categories = data[ 0 ].slice( 1 ); for ( var i = 1, curData; curData = data[ i ]; i++ ) { series.push( { name: curData[ 0 ], data: curData.slice( 1 ) } ); } result.series = series; result.categories = categories; result.title = meta.title; result.subTitle = meta.subTitle; result.xTitle = meta.xTitle; result.yTitle = meta.yTitle; result.suffix = meta.suffix; } else { var curData = []; for ( var i = 1, len = data[ 0 ].length; i < len; i++ ) { curData.push( [ data[ 0 ][ i ], data[ 1 ][ i ] | 0 ] ); } //饼图 series[ 0 ] = { type: 'pie', name: meta.tip, data: curData }; result.series = series; result.title = meta.title; result.suffix = meta.suffix; } return result; } }); UE.parse.register('background', function (utils) { var me = this, root = me.root, p = root.getElementsByTagName('p'), styles; for (var i = 0,ci; ci = p[i++];) { styles = ci.getAttribute('data-background'); if (styles){ ci.parentNode.removeChild(ci); } } //追加默认的表格样式 styles && utils.cssRule('ueditor_background', me.selector + '{' + styles + '}', document); }); UE.parse.register('list',function(utils){ var customCss = [], customStyle = { 'cn' : 'cn-1-', 'cn1' : 'cn-2-', 'cn2' : 'cn-3-', 'num' : 'num-1-', 'num1' : 'num-2-', 'num2' : 'num-3-', 'dash' : 'dash', 'dot' : 'dot' }; utils.extend(this,{ liiconpath : 'http://bs.baidu.com/listicon/', listDefaultPaddingLeft : '20' }); var root = this.root, ols = root.getElementsByTagName('ol'), uls = root.getElementsByTagName('ul'), selector = this.selector; if(ols.length){ applyStyle.call(this,ols); } if(uls.length){ applyStyle.call(this,uls); } if(ols.length || uls.length){ customCss.push(selector +' .list-paddingleft-1{padding-left:0}'); customCss.push(selector +' .list-paddingleft-2{padding-left:'+ this.listDefaultPaddingLeft+'px}'); customCss.push(selector +' .list-paddingleft-3{padding-left:'+ this.listDefaultPaddingLeft*2+'px}'); utils.cssRule('list', selector +' ol,'+selector +' ul{margin:0;padding:0;}li{clear:both;}'+customCss.join('\n'), document); } function applyStyle(nodes){ var T = this; utils.each(nodes,function(list){ if(list.className && /custom_/i.test(list.className)){ var listStyle = list.className.match(/custom_(\w+)/)[1]; if(listStyle == 'dash' || listStyle == 'dot'){ utils.pushItem(customCss,selector +' li.list-' + customStyle[listStyle] + '{background-image:url(' + T.liiconpath +customStyle[listStyle]+'.gif)}'); utils.pushItem(customCss,selector +' ul.custom_'+listStyle+'{list-style:none;} '+ selector +' ul.custom_'+listStyle+' li{background-position:0 3px;background-repeat:no-repeat}'); }else{ var index = 1; utils.each(list.childNodes,function(li){ if(li.tagName == 'LI'){ utils.pushItem(customCss,selector + ' li.list-' + customStyle[listStyle] + index + '{background-image:url(' + T.liiconpath + 'list-'+customStyle[listStyle] +index + '.gif)}'); index++; } }); utils.pushItem(customCss,selector + ' ol.custom_'+listStyle+'{list-style:none;}'+selector+' ol.custom_'+listStyle+' li{background-position:0 3px;background-repeat:no-repeat}'); } switch(listStyle){ case 'cn': utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-1{padding-left:25px}'); utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-2{padding-left:40px}'); utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-3{padding-left:55px}'); break; case 'cn1': utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-1{padding-left:30px}'); utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-2{padding-left:40px}'); utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-3{padding-left:55px}'); break; case 'cn2': utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-1{padding-left:40px}'); utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-2{padding-left:55px}'); utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-3{padding-left:68px}'); break; case 'num': case 'num1': utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-1{padding-left:25px}'); break; case 'num2': utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-1{padding-left:35px}'); utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-2{padding-left:40px}'); break; case 'dash': utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft{padding-left:35px}'); break; case 'dot': utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft{padding-left:20px}'); } } }); } }); UE.parse.register('vedio',function(utils){ var video = this.root.getElementsByTagName('video'), audio = this.root.getElementsByTagName('audio'); document.createElement('video');document.createElement('audio'); if(video.length || audio.length){ var sourcePath = utils.removeLastbs(this.rootPath), jsurl = sourcePath + '/third-party/video-js/video.js', cssurl = sourcePath + '/third-party/video-js/video-js.min.css', swfUrl = sourcePath + '/third-party/video-js/video-js.swf'; if(window.videojs) { videojs.autoSetup(); } else { utils.loadFile(document,{ id : "video_css", tag : "link", rel : "stylesheet", type : "text/css", href : cssurl }); utils.loadFile(document,{ id : "video_js", src : jsurl, tag : "script", type : "text/javascript" },function(){ videojs.options.flash.swf = swfUrl; videojs.autoSetup(); }); } } }); })();
portal-front - Gogs: Go Git Service

portal html css js resource

platform.js 4.7KB

    $(document).ready(function() { $(".onlogin .headnavbtn li.mywork").addClass("navcurrent"); $(".workmenu>ul>li:contains('需求')").addClass("nowLi"); loginStatus();//判断个人是否登录 valUser(); function getYYYYMMDD() { var time = new Date(); var year = time.getFullYear(); var month = time.getMonth() + 1; if (month < 10) { month = '0' + month; } var day = time.getDate(); if(day < 10) { day = '0' + day; } return year + '' + month +'' + day; } var plat = { info: {}, catch: {}, request: function(id,$this) { const funArray = this.catch.id; var that = this; $.ajax({ url: "/ajax/platform/info", type: "GET", timeout: 10000, dataType: "json", traditional:true, data:{ id: id }, success: function(data) { delete that.catch.id; if(data.success) { var $data = data.data; that.info.id = $data; for(var i = 0; i < funArray.length; i++ ) { funArray[i]($data); } } }, error: function() { $.MsgBox.Alert('提示', '链接服务器超时') } }) }, judge: function(id, callback) { if(this.info.id) { callback(this.info.id) } else { if(this.catch.id) { this.catch.id.push(callback) } else { this.catch.id = [callback] this.request(id) } } } } demandList(true,10, 1); /*点击搜索*/ $(".searchSpan").click(function(){ $(".tcdPageCode").remove(); $(".aboutRes").append('<div class="tcdPageCode"></div>'); demandList(true,10,1); }) /*需求列表*/ function demandList(isbind, pageSize, pageNo) { $.ajax({ url: "/ajax/platform/demand/pq", type: "GET", timeout: 10000, dataType: "json", traditional:true, data: { 'invalidDay': getYYYYMMDD(), "key":$("#needKey").val(), "pageNo": pageNo, "pageSize":pageSize }, beforeSend: function() { $("#demandList").append('<img src="../images/loading.gif" class="loading" />'); }, success: function(data) { if(data.success) { $("#demandList").html(" "); var $info = data.data.data; if($info.length > 0){ for(var i = 0; i < $info.length; i++) { var liStr=$("<li></li>").appendTo("#demandList"); demandHtml($info[i],liStr); } if(isbind == true) { $(".tcdPageCode").createPage({ pageCount: Math.ceil(data.data.total / pageSize), current: data.data.data.pageNo, backFn: function(p) { demandList(false,5, p); } }); } }else{ $("#demandList").parent().find(".nodatabox").removeClass("displayNone") } } $(".loading").remove(); }, error: function() { $.MsgBox.Alert('提示', '链接服务器超时') } }) } function demandHtml($data,liStr) { var strCon=''; strCon+='<a class="" target="_blank" href="platDemond.html?demandId='+$data.id+'&pid='+ $data.pid +'" class="madiaInfo">' strCon+='<p class="h1Font ellipsisSty">'+ $data.title +'</p>' strCon+='<ul class="showliTop h3Font clearfix">' strCon+='<li><span class="cmpName">'+ $data.linkOrg +'</span></li><li><span>发布于 '+TimeTr($data.publishTime)+'</span></li>' strCon+= '<li>来自<span class="platName">123</span></li>' strCon+='</ul>' strCon+='<p class="h2Font ellipsisSty-2">'+$data.descp+'</p>' strCon+='<ul class="showli clearfix h3Font">' if($data.city){ strCon+='<li>所在城市:'+$data.city+'</li>' } if($data.duration){ strCon+='<li>预计周期:'+$data.duration+'</li>' } if($data.cost){ strCon+='<li>费用预算:'+$data.cost+'</li>' } if($data.invalidDay){ strCon+='<li class="invaliTime">有效期至:'+TimeTr($data.invalidDay)+'</li>' } strCon+='</ul>' strCon+='</a>' var $strCon = $(strCon); $strCon.appendTo(liStr); var localTime = Number( getYYYYMMDD()); var invaTime = Number($data.invalidDay); if(invaTime - localTime <= 7) { $strCon.find('.invaliTime').addClass('colorRed'); } plat.judge($data.pid,function(data) { $strCon.find('.platName').text(data.name) }) } });
jiapeng/portal-front - Gogs: Go Git Service

1 Коммиты (8bfe150fa1a9412d50673b7a1e2edfdd39d953c7)

Автор SHA1 Сообщение Дата
  luyanan 63d1a07dec 企业邀请员工注册科袖 лет назад: 7
jiapeng/portal-front - Gogs: Go Git Service

1 Commits (683324d6eec9cd6bc9d00f5819831c8c1b8159f3)

Autor SHA1 Mensagem Data
  luyanan b07e10b33d 添加身份标识 7 anos atrás
jiapeng/portal-front - Gogs: Go Git Service

1 Коммиты (b57cfd65f934e8794ca9d8f071421ed7c97ac866)

Автор SHA1 Сообщение Дата
  jiapeng c5d9752792 --init лет назад: 8