修改访问不了静态页面问题
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
body{width: 100%;height: 100%;margin: 0;padding: 0;}
|
||||
a:focus{outline:none;}
|
||||
ul{list-style: none;list-style-type: none;}
|
||||
.tree li a{white-space: nowrap;}
|
||||
.tree-menu li > ul{background-color: #353953;}
|
||||
.tree-menu li li li li a{padding-left: 68px;}
|
||||
.tree-menu li li li li li a{padding-left: 88px;}
|
||||
.tree-menu li li li li li li a{padding-left: 108px;}
|
||||
.tree-menu li li li li li li li a{padding-left: 128px;}
|
||||
.tree-menu li li li li li li li li a{padding-left: 148px;}
|
||||
.tree-menu li li li li li li li li li a{padding-left: 168px;}
|
||||
.tree-menu li li li li li li li li li li a{padding-left: 188px;}
|
||||
.table td, .table th {vertical-align: middle;}
|
||||
.tree-menu li > a:active, .tree-menu li > a:focus, .tree-menu li > a:hover{color: #fff;}
|
||||
.tree-menu li > a{color: #fff;}
|
||||
.tree-menu > li > a{border-bottom-color: #555980;}
|
||||
.tree-menu > li.open + li > a{border-bottom-color: #555980;border-top-color: #555980;}
|
||||
.tree-lines ul > li::after{border-top:0;}
|
||||
|
||||
/**lable的覆盖样式*/
|
||||
.label{font-size: 100%;}
|
||||
.label-warning {background-color: #f9f5ee; color: #f1a325;}
|
||||
label{font-weight: normal;}
|
||||
|
||||
.nav.gray{background-color: #f1f1f1;margin-bottom: 10px;}
|
||||
|
||||
.doc-table tr .info{text-align: right; width: 100px;}
|
||||
.setting-table tr .info{text-align: right; max-width: 150px;}
|
||||
.show-doc span{color: #aaa;}
|
||||
|
||||
.mgresizableW{z-index: 90;height: 100%; width: 10px; cursor: e-resize;}
|
||||
.ui-resizable-handle {display: block;font-size: 0.1px;position: absolute;}
|
||||
#resizableLeftRight{left: 360px;}
|
||||
.unselect{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
||||
|
||||
.left-body{
|
||||
width: 360px; height:100%; position: fixed; top: 0; bottom: 0; left: 0;
|
||||
}
|
||||
.left-header{
|
||||
background: #464a6e;width: 100%; height:60px;line-height:60px;
|
||||
position: absolute; top: 0; bottom: 0; left: 0;text-align: center;
|
||||
}
|
||||
.left-header .logo{
|
||||
font-size: 30px;color: #fff;
|
||||
}
|
||||
.left-header .icon-bars{
|
||||
font-size: 24px;float: right;margin: 18px 18px 0 0;color: #fff;cursor: pointer;
|
||||
}
|
||||
.left-container{
|
||||
width: 100%;position: absolute;background: #353953;color: #fff;
|
||||
top: 60px; bottom: 0; left: 0; overflow-y: auto; padding: 10px;
|
||||
}
|
||||
.left-container .projects{border: 0px; border-radius: 0px;}
|
||||
|
||||
.right-container{
|
||||
position: fixed;top: 0px; bottom: 0; left: 360px; right: 0;padding: 0px;
|
||||
}
|
||||
|
||||
.modal-table-box{margin-top: 10px; max-height: 500px;overflow-y: auto;}
|
||||
.modal-table-box{list-style: none;}
|
||||
.modal-table-box ul{padding-left: 10px;}
|
||||
.modal-table-box li{padding: 10px 15px; margin: 0 10px 10px 0; background-color: #f1f1f1;cursor: pointer;}
|
||||
.modal-table-box li.checked{background-color: #8666b8;color:#fff;}
|
||||
|
||||
#rightContentMask{background-color: rgba(0, 0, 0, 0);padding: 0;z-index:9999; height: 100%;display: none;position: absolute;top: 0;bottom: 0;left:0;right: 0;}
|
||||
#rightZpages{height: 100%;position: relative;top: 0;bottom: 0;left:0;right: 0;}
|
||||
/*#rightZpages .tabs-container .tab-pane{padding: 10px;}*/
|
||||
|
||||
#showLeftContent{
|
||||
position: fixed;top: 250px; left: 0px;padding-top: 10px;
|
||||
width: 15px;height: 35px;z-index: 9999;cursor: pointer;
|
||||
background-color: #ccc;border-radius: 0 5px 5px 0;display: none;
|
||||
}
|
||||
#showLeftContent:hover{color: #fff;}
|
||||
|
||||
/* S-JSON展示的样式 */
|
||||
pre.json{margin-top:0px;margin-bottom:0px;}
|
||||
pre.json .canvas{font:10pt georgia;background-color:#ececec;color:#000000;border:1px solid #cecece;}
|
||||
pre.json .object-brace{color:#00aa00;font-weight:bold;}
|
||||
pre.json .array-brace{color:#0033ff;font-weight:bold;}
|
||||
pre.json .property-name{color:#cc0000;font-weight:bold;}
|
||||
pre.json .string{color:#007777;}
|
||||
pre.json .number{color:#aa00aa;}
|
||||
pre.json .boolean{color:#0000ff;}
|
||||
pre.json .function{color:#aa6633;text-decoration:italic;}
|
||||
pre.json .null{color:#0000ff;}
|
||||
pre.json .comma{color:#000000;font-weight:bold;}
|
||||
pre.json .annotation{color:#aaa;}
|
||||
pre img{cursor: pointer;}
|
||||
/* E-JSON展示的样式 */
|
||||
|
||||
348
zyplayer-doc-manage/src/main/webapp/static/lib/mg/js/common.js
Normal file
348
zyplayer-doc-manage/src/main/webapp/static/lib/mg/js/common.js
Normal file
@@ -0,0 +1,348 @@
|
||||
/**
|
||||
* 一些公用方法
|
||||
* @author 暮光:城中城
|
||||
* @since 2017年5月7日
|
||||
*/
|
||||
|
||||
var ctx = "/";
|
||||
var statics = "/statics/";
|
||||
init();
|
||||
function init() {
|
||||
ctx = getCookie("ctx");
|
||||
statics = ctx + "statics/";
|
||||
}
|
||||
|
||||
function serialize(value) {
|
||||
if (typeof value === 'string') {
|
||||
return value;
|
||||
}
|
||||
return JSON.stringify(value);
|
||||
}
|
||||
|
||||
function deserialize(value) {
|
||||
if (typeof value !== 'string' || isEmpty(value)) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
return JSON.parse(value);
|
||||
} catch (e) {
|
||||
try {
|
||||
return eval('(' + value + ')');// 处理变态的单双引号共存字符串
|
||||
} catch (e) {
|
||||
return value || undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function validateResult(result) {
|
||||
if(result.errCode == 200) {
|
||||
return true;
|
||||
} else {
|
||||
alert(result.errMsg);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getNowDate() {
|
||||
var date = new Date();
|
||||
var month = date.getMonth() + 1;
|
||||
var strDate = date.getDate();
|
||||
if (month >= 1 && month <= 9) {
|
||||
month = "0" + month;
|
||||
}
|
||||
if (strDate >= 0 && strDate <= 9) {
|
||||
strDate = "0" + strDate;
|
||||
}
|
||||
var currentdate = date.getFullYear() + "-" + month + "-" + strDate;
|
||||
return currentdate;
|
||||
}
|
||||
|
||||
function getNowTime() {
|
||||
var date = new Date();
|
||||
var hours = date.getHours();
|
||||
var minutes = date.getMinutes();
|
||||
var seconds = date.getSeconds();
|
||||
if (hours >= 1 && hours <= 9) {
|
||||
hours = "0" + hours;
|
||||
}
|
||||
if (minutes >= 0 && minutes <= 9) {
|
||||
minutes = "0" + minutes;
|
||||
}
|
||||
if (seconds >= 0 && seconds <= 9) {
|
||||
seconds = "0" + seconds;
|
||||
}
|
||||
var currentdate = hours + ":" + minutes + ":" + seconds;
|
||||
return currentdate;
|
||||
}
|
||||
|
||||
function getNowDateTime() {
|
||||
var currentdate = getNowDate() + " " + getNowTime();
|
||||
return currentdate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回不为空的字符串,为空返回def
|
||||
*/
|
||||
function getNotEmptyStr(str, def) {
|
||||
if (isEmpty(str)) {
|
||||
return isEmpty(def) ? "" : def;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否是空对象
|
||||
* @param obj
|
||||
* @returns
|
||||
*/
|
||||
function isEmptyObject(obj){
|
||||
return $.isEmptyObject(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否是空字符串
|
||||
* @param str
|
||||
* @returns
|
||||
*/
|
||||
function isNull(str){
|
||||
return (str == null || str == undefined);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否不是空字符串
|
||||
* @param str
|
||||
* @returns
|
||||
*/
|
||||
function isNotNull(str){
|
||||
return !isNull(str);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否是空字符串
|
||||
* @param str
|
||||
* @returns
|
||||
*/
|
||||
function isEmpty(str){
|
||||
return (str == "" || str == null || str == undefined);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否不是空字符串
|
||||
* @param str
|
||||
* @returns
|
||||
*/
|
||||
function isNotEmpty(str){
|
||||
return !isEmpty(str);
|
||||
}
|
||||
|
||||
/**
|
||||
* 数组转字符串,使用空格分隔
|
||||
* @param array
|
||||
* @returns
|
||||
*/
|
||||
function arrToString(array){
|
||||
var temStr = "";
|
||||
if(isEmpty(array)){
|
||||
return temStr;
|
||||
}
|
||||
array.forEach(function(e){
|
||||
if(isNotEmpty(temStr)) {
|
||||
temStr += " ";
|
||||
}
|
||||
temStr += e;
|
||||
});
|
||||
return temStr;
|
||||
}
|
||||
|
||||
/**
|
||||
* 数组array中是否包含str字符串
|
||||
* @param array
|
||||
* @param str
|
||||
* @returns
|
||||
*/
|
||||
function haveString(array, str){
|
||||
if(isEmpty(array)) {
|
||||
return false;
|
||||
}
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
if(array[i] == str) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 直接返回对象的第一个属性
|
||||
* @param data
|
||||
* @returns
|
||||
*/
|
||||
function getObjectFirstAttribute(data) {
|
||||
for ( var key in data) {
|
||||
return data[key];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 如果对象只有一个属性则返回第一个属性,否则返回null
|
||||
* @param data
|
||||
* @returns
|
||||
*/
|
||||
function getObjectFirstAttributeIfOnly(data) {
|
||||
var len = 0, value = "";
|
||||
for ( var key in data) {
|
||||
if (++len > 1) {
|
||||
return null;
|
||||
}
|
||||
value = data[key];
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function post(url, param, success, fail, complete) {
|
||||
ajaxTemp(url, "POST", "JSON", param, success, fail, complete);
|
||||
}
|
||||
|
||||
/**
|
||||
* ajax处理事件模板
|
||||
*
|
||||
* @url 后台处理的url,即action
|
||||
* @dataSentType 数据发送的方式,有post,get方式
|
||||
* @dataReceiveType 数据接收格式,有html json text等
|
||||
* @paramsStr 传入后台的参数
|
||||
* @successFunction ajax成功后执行的函数名 ajaxTemp("", "GET", "html", {}, function(){},
|
||||
* function(){}, "");
|
||||
*/
|
||||
function ajaxTemp(url, dataSentType, dataReceiveType, paramsStr, successFunction, errorFunction, completeFunction, id) {
|
||||
$.ajax({
|
||||
url : url, // 后台处理程序
|
||||
sync : false,
|
||||
type : dataSentType, // 数据发送方式
|
||||
dataType : dataReceiveType, // 接受数据格式
|
||||
data : eval(paramsStr),
|
||||
contentType : "application/x-www-form-urlencoded; charset=UTF-8",
|
||||
success : function(msg) {
|
||||
if(typeof successFunction == "function") {
|
||||
successFunction(msg,id);
|
||||
}
|
||||
},
|
||||
beforeSend : function() {
|
||||
|
||||
},
|
||||
complete : function(msg) {
|
||||
if(typeof completeFunction == "function") {
|
||||
completeFunction(msg,id);
|
||||
}
|
||||
},
|
||||
error : function(msg) {
|
||||
if(typeof errorFunction == "function") {
|
||||
errorFunction(msg,id);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取cookie
|
||||
* @param name
|
||||
* @returns
|
||||
*/
|
||||
function getCookie(name) {
|
||||
var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
|
||||
if(arr=document.cookie.match(reg)){
|
||||
return unescape(arr[2]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 字符串格式化
|
||||
*/
|
||||
String.prototype.format = function(args) {
|
||||
if (arguments.length > 0) {
|
||||
var result = this;
|
||||
if (arguments.length == 1 && typeof (args) == "object") {
|
||||
for ( var key in args) {
|
||||
var reg = new RegExp("({" + key + "})", "g");
|
||||
result = result.replace(reg, args[key]);
|
||||
}
|
||||
} else {
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
if (arguments[i] == undefined) {
|
||||
return "";
|
||||
} else {
|
||||
var reg = new RegExp("({[" + i + "]})", "g");
|
||||
result = result.replace(reg, arguments[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
} else {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
String.prototype.endWith = function(str) {
|
||||
if (str == null || str == "" || this.length == 0 || str.length > this.length) {
|
||||
return false;
|
||||
}
|
||||
return (this.substring(this.length - str.length) == str);
|
||||
};
|
||||
|
||||
String.prototype.startWith = function(str) {
|
||||
if (str == null || str == "" || this.length == 0 || str.length > this.length) {
|
||||
return false;
|
||||
}
|
||||
return (this.substr(0, str.length) == str);
|
||||
};
|
||||
|
||||
var common = {
|
||||
//获取页面顶部被卷起来的高度函数
|
||||
scrollTop : function(){
|
||||
return Math.max(
|
||||
//chrome
|
||||
document.body.scrollTop,
|
||||
//firefox/IE
|
||||
document.documentElement.scrollTop);
|
||||
},
|
||||
//获取页面文档的总高度
|
||||
documentHeight : function(){
|
||||
//现代浏览器(IE9+和其他浏览器)和IE8的document.body.scrollHeight和document.documentElement.scrollHeight都可以
|
||||
return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight);
|
||||
},
|
||||
//获取页面浏览器视口的高度
|
||||
windowHeight : function(){
|
||||
return (document.compatMode == "CSS1Compat")?
|
||||
document.documentElement.clientHeight:
|
||||
document.body.clientHeight;
|
||||
},
|
||||
//提取地址栏信息
|
||||
getRequest: function () {
|
||||
var url = location.search;// 获取url中"?"符后的字串
|
||||
url = decodeURIComponent(url);
|
||||
var theRequest = {};
|
||||
if (url.indexOf("?") != -1) {
|
||||
var str = url.substr(1);
|
||||
strs = str.split("&");
|
||||
for (var i = 0; i < strs.length; i++) {
|
||||
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
|
||||
}
|
||||
}
|
||||
return theRequest;
|
||||
},
|
||||
getParam: function(name){
|
||||
var url = location.search;// 获取url中"?"符后的字串
|
||||
url = decodeURIComponent(url);
|
||||
if (url.indexOf("?") != -1) {
|
||||
var str = url.substr(1);
|
||||
strs = str.split("&");
|
||||
for (var i = 0; i < strs.length; i++) {
|
||||
var nameTemp = strs[i].split("=")[0];
|
||||
if(name == nameTemp) {
|
||||
return unescape(strs[i].split("=")[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,106 @@
|
||||
|
||||
/**
|
||||
* 两个元素上下、左右拖动动态改变大小
|
||||
* @author 暮光:城中城
|
||||
* @since 2017年5月7日
|
||||
*/
|
||||
(function($){
|
||||
$.fn.mgResizableHeight = function(options) {
|
||||
var defaults = {prev:this,next:this, prevHtMin:0, prevHtMax:999, nextHtMin:0, nextHtMax:999};
|
||||
var opts = $.extend(defaults, options);
|
||||
var disY = 0, prevH = 0, nextH = 0, isStart = false;
|
||||
var prev, next, thisObj = this;
|
||||
$(document).mousemove(function(ev){
|
||||
if(!isStart){return;}
|
||||
var ev = ev || window.event;
|
||||
var H = ev.clientY - disY;
|
||||
var prevHNow = prevH+H, nextHNow = nextH-H;
|
||||
if(opts.prevHtMin >= prevHNow) {
|
||||
prevHNow = opts.prevHtMin;
|
||||
nextHNow = next.outerHeight();
|
||||
}
|
||||
if(opts.nextHtMin >= nextHNow) {
|
||||
nextHNow = opts.nextHtMin;
|
||||
prevHNow = prev.outerHeight();
|
||||
}
|
||||
if(opts.prevHtMax <= prevHNow) {
|
||||
prevHNow = opts.prevHtMax;
|
||||
nextHNow = next.outerHeight();
|
||||
}
|
||||
if(opts.nextHtMax <= nextHNow) {
|
||||
nextHNow = opts.nextHtMax;
|
||||
prevHNow = prev.outerHeight();
|
||||
}
|
||||
//prev.css("height", prevHNow + 'px');
|
||||
//next.css("height", nextHNow + 'px');
|
||||
if(typeof opts.onresize == 'function') {
|
||||
opts.onresize(prevHNow, nextHNow);
|
||||
}
|
||||
}).mouseup(function(ev){
|
||||
isStart = false;
|
||||
});
|
||||
$(this).mousedown(function(ev){
|
||||
var ev = ev || window.event;
|
||||
disY = ev.clientY;
|
||||
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
||||
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
||||
prevH = prev.outerHeight();
|
||||
nextH = next.outerHeight();
|
||||
isStart = true;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 改变宽度的功能,只是实现各种消息的通知,实际改变大小需要在回调里面自己操作
|
||||
*/
|
||||
$.fn.mgResizableWidth = function(options) {
|
||||
var defaults = {prev:this,next:this, prevWtMin:0, prevWtMax:999, nextWtMin:0, nextWtMax:999};
|
||||
var opts = $.extend(defaults, options);
|
||||
var disX = 0, prevW = 0, nextW = 0, isStart = false;
|
||||
var prev, next, thisObj = this;
|
||||
$(document).mousemove(function(ev){
|
||||
if(!isStart){return;}
|
||||
var ev = ev || window.event;
|
||||
var W = ev.clientX - disX;
|
||||
var prevWNow = prevW+W, nextWNow = nextW-W;
|
||||
if(opts.prevWtMin >= prevWNow) {
|
||||
prevWNow = opts.prevWtMin;
|
||||
nextWNow = next.outerWidth();
|
||||
}
|
||||
if(opts.nextWtMin >= nextWNow) {
|
||||
nextWNow = opts.nextWtMin;
|
||||
prevWNow = prev.outerWidth();
|
||||
}
|
||||
if(opts.prevWtMax <= prevWNow) {
|
||||
prevWNow = opts.prevWtMax;
|
||||
nextWNow = next.outerWidth();
|
||||
}
|
||||
if(opts.nextWtMax <= nextWNow) {
|
||||
nextWNow = opts.nextWtMax;
|
||||
prevWNow = prev.outerWidth();
|
||||
}
|
||||
//prev.css("width", prevWNow + 'px');
|
||||
//next.css("width", nextWNow + 'px');
|
||||
if(typeof opts.onresize == 'function') {
|
||||
opts.onresize(prevWNow, nextWNow);
|
||||
}
|
||||
}).mouseup(function(ev){
|
||||
if(!isStart){return;}
|
||||
isStart = false;
|
||||
if(typeof opts.onfinish == 'function') {
|
||||
opts.onfinish();
|
||||
}
|
||||
});
|
||||
$(this).mousedown(function(ev){
|
||||
var ev = ev || window.event;
|
||||
disX = ev.clientX;
|
||||
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
||||
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
||||
prevW = prev.outerWidth();
|
||||
nextW = next.outerWidth();
|
||||
isStart = true;
|
||||
if(typeof opts.onstart == 'function') {
|
||||
opts.onstart();
|
||||
}
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
||||
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* 提示工具类
|
||||
* @author 暮光:城中城
|
||||
* @since 2017年5月7日
|
||||
*/
|
||||
var Toast = {
|
||||
notOpen: function () {
|
||||
var data = {
|
||||
message: "该功能暂未开放,敬请期待!",
|
||||
icon: 'exclamation-sign', type: "warning",
|
||||
};
|
||||
this.show(data);
|
||||
},
|
||||
success: function (msg, time) {
|
||||
var data = {
|
||||
message: msg, time: time,
|
||||
icon: 'check-circle-o', type: 'success',
|
||||
};
|
||||
this.show(data);
|
||||
},
|
||||
warn: function (msg, time) {
|
||||
var data = {
|
||||
message: msg, time: time,
|
||||
icon: 'exclamation-sign', type: 'warning',
|
||||
};
|
||||
this.show(data);
|
||||
},
|
||||
error: function (msg, time) {
|
||||
var data = {
|
||||
message: msg, time: time,
|
||||
icon: 'exclamation-sign', type: 'danger',
|
||||
};
|
||||
this.show(data);
|
||||
},
|
||||
show: function (data) {
|
||||
data.time = isEmpty(data.time) ? 2000 : data.time;
|
||||
data.placement = isEmpty(data.placement) ? 'top' : data.placement;
|
||||
new $.zui.Messager(data.message, data).show();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user