You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
298 KiB
15 lines
298 KiB
4 years ago
|
// ==ClosureCompiler==
|
||
|
// @compilation_level SIMPLE_OPTIMIZATIONS
|
||
|
|
||
|
/**
|
||
|
* @license jqGrid 4.6.0 - jQuery Grid
|
||
|
* Copyright (c) 2008, Tony Tomov, tony@trirand.com
|
||
|
* Dual licensed under the MIT and GPL licenses
|
||
|
* http://www.opensource.org/licenses/mit-license.php
|
||
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
||
|
* Date: 2014-02-20
|
||
|
*/
|
||
|
//jsHint options
|
||
|
/*jshint evil:true, eqeqeq:false, eqnull:true, devel:true */
|
||
|
/*global jQuery */
|
||
|
(function($){$.jgrid=$.jgrid||{};$.extend($.jgrid,{version:"4.6.0",htmlDecode:function(value){if(value&&(value===" "||value===" "||(value.length===1&&value.charCodeAt(0)===160))){return""}return !value?value:String(value).replace(/>/g,">").replace(/</g,"<").replace(/"/g,'"').replace(/&/g,"&")},htmlEncode:function(value){return !value?value:String(value).replace(/&/g,"&").replace(/\"/g,""").replace(/</g,"<").replace(/>/g,">")},format:function(format){var args=$.makeArray(arguments).slice(1);if(format==null){format=""}return format.replace(/\{(\d+)\}/g,function(m,i){return args[i]})},msie:navigator.appName==="Microsoft Internet Explorer",msiever:function(){var rv=-1;var ua=navigator.userAgent;var re=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(re.exec(ua)!=null){rv=parseFloat(RegExp.$1)}return rv},getCellIndex:function(cell){var c=$(cell);if(c.is("tr")){return -1}c=(!c.is("td")&&!c.is("th")?c.closest("td,th"):c)[0];if($.jgrid.msie){return $.inArray(c,c.parentNode.cells)}return c.cellIndex},stripHtml:function(v){v=String(v);var regexp=/<("[^"]*"|'[^']*'|[^'">])*>/gi;if(v){v=v.replace(regexp,"");return(v&&v!==" "&&v!==" ")?v.replace(/\"/g,"'"):""}return v},stripPref:function(pref,id){var obj=$.type(pref);if(obj==="string"||obj==="number"){pref=String(pref);id=pref!==""?String(id).replace(String(pref),""):id}return id},parse:function(jsonString){var js=jsonString;if(js.substr(0,9)==="while(1);"){js=js.substr(9)}if(js.substr(0,2)==="/*"){js=js.substr(2,js.length-4)}if(!js){js="{}"}return($.jgrid.useJSON===true&&typeof JSON==="object"&&typeof JSON.parse==="function")?JSON.parse(js):eval("("+js+")")},parseDate:function(format,date,newformat,opts){var token=/\\.|[dDjlNSwzWFmMntLoYyaABgGhHisueIOPTZcrU]/g,timezone=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,timezoneClip=/[^-+\dA-Z]/g,msDateRegExp=new RegExp("^/Date\\((([-+])?[0-9]+)(([-+])([0-9]{2})([0-9]{2}))?\\)/$"),msMatch=((typeof date==="string")?date.match(msDateRegExp):null),pad=function(value,length){value=String(value);length=parseInt(length,10)||2;while(value.length<length){value="0"+value}return value},ts={m:1,d:1,y:1970,h:0,i:0,s:0,u:0},timestamp=0,dM,k,hl,h12to24=function(ampm,h){if(ampm===0){if(h===12){h=0}}else{if(h!==12){h+=12}}return h};if(opts===undefined){opts=$.jgrid.formatter.date}if(opts.parseRe===undefined){opts.parseRe=/[#%\\\/:_;.,\t\s-]/}if(opts.masks.hasOwnProperty(format)){format=opts.masks[format]}if(date&&date!=null){if(!isNaN(date-0)&&String(format).toLowerCase()==="u"){timestamp=new Date(parseFloat(date)*1000)}else{if(date.constructor===Date){timestamp=date}else{if(msMatch!==null){timestamp=new Date(parseInt(msMatch[1],10));if(msMatch[3]){var offset=Number(msMatch[5])*60+Number(msMatch[6]);offset*=((msMatch[4]==="-")?1:-1);offset-=timestamp.getTimezoneOffset();timestamp.setTime(Number(Number(timestamp)+(offset*60*1000)))}}else{var offset=0;if(opts.srcformat==="ISO8601Long"&&date.charAt(date.length-1)==="Z"){offset-=(new Date()).getTimezoneOffset()}date=String(date).replace(/\T/g,"#").replace(/\t/,"%").split(opts.parseRe);format=format.replace(/\T/g,"#").replace(/\t/,"%").split(opts.parseRe);for(k=0,hl=format.length;k<hl;k++){if(format[k]==="M"){dM=$.inArray(date[k],opts.monthNames);if(dM!==-1&&dM<12){date[k]=dM+1;ts.m=date[k]}}if(format[k]==="F"){dM=$.inArray(date[k],opts.monthNames,12);if(dM!==-1&&dM>11){date[k]=dM+1-12;ts.m=date[k]}}if(format[k]==="a"){dM=$.inArray(date[k],opts.AmPm);if(dM!==-1&&dM<2&&date[k]===opts.AmPm[dM]){date[k]=dM;ts.h=h12to24(date[k],ts.h)}}if(format[k]==="A"){dM=$.inArray(date[k],opts.AmPm);if(dM!==-1&&dM>1&&date[k]===opts.AmPm[dM]){date[k]=dM-2;ts.h=h12to24(date[k],ts.h)}}if(format[k]==="g"){ts.h=parseInt(date[k],10)}if(date[k]!==undefined){ts[format[k].toLowerCase()]=parseInt(date[k],10)}}if(ts.f){ts.m=ts.f}if(ts.m===0&&ts.y===0&&ts.d===0){return" "}ts.m=parseInt(ts.m,10)-1;var ty=ts.y;if(ty>=70&&ty<=99){ts.y=1900+ts.y}else{if(ty>=0&&ty<=69){ts.y=2000+ts.y}}timestamp=new Date(ts
|