Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
af973cf1
Commit
af973cf1
authored
Oct 30, 2016
by
季圣华
Browse files
No commit message
No commit message
parent
7c513f3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
WebRoot/js/common/common.js
0 → 100644
View file @
af973cf1
$
(
function
()
{
domresize
();
});
//========================页面高度自动调节================================
var
heightInfo
;
var
widthInfo
;
var
initPageSize
;
var
initPageNum
;
var
webH
;
var
webW
;
//改变表格宽高
function
domresize
()
{
webH
=
document
.
documentElement
.
clientHeight
;
webW
=
document
.
documentElement
.
offsetWidth
;
widthInfo
=
$
(
"
body
"
).
outerWidth
()
-
27
;
var
mtopH
=
$
(
"
#searchTable
"
).
outerHeight
();
var
positionH
=
$
(
"
#position
"
).
outerHeight
();
heightInfo
=
webH
-
mtopH
-
86
;
//分页信息修改成 15条
if
(
heightInfo
>
450
)
{
initPageSize
=
15
;
initPageNum
=
[
15
,
30
,
50
];
}
else
{
initPageSize
=
10
;
initPageNum
=
[
10
,
20
,
30
,
50
];
}
}
//========================页面高度自动调节================================
//判断浏览器的类型
function
getOs
()
{
if
(
navigator
.
userAgent
.
indexOf
(
"
MSIE
"
)
>
0
)
{
return
"
MSIE
"
;
}
else
if
(
isFirefox
=
navigator
.
userAgent
.
indexOf
(
"
Firefox
"
)
>
0
)
{
return
"
Firefox
"
;
}
else
if
(
isSafari
=
navigator
.
userAgent
.
indexOf
(
"
Safari
"
)
>
0
)
{
return
"
Safari
"
;
}
else
if
(
isCamino
=
navigator
.
userAgent
.
indexOf
(
"
Camino
"
)
>
0
)
{
return
"
Camino
"
;
}
else
if
(
isMozilla
=
navigator
.
userAgent
.
indexOf
(
"
Gecko/
"
)
>
0
)
{
return
"
Gecko
"
;
}
}
/**
* js生成唯一ID值 32位值随机值
* @returns 生成的字符串
*/
function
uuid
()
{
var
s
=
[];
var
hexDigits
=
"
0123456789abcdef
"
;
for
(
var
i
=
0
;
i
<
36
;
i
++
)
s
[
i
]
=
hexDigits
.
substr
(
Math
.
floor
(
Math
.
random
()
*
0x10
),
1
);
s
[
14
]
=
"
4
"
;
// bits 12-15 of the time_hi_and_version field to 0010
s
[
19
]
=
hexDigits
.
substr
((
s
[
19
]
&
0x3
)
|
0x8
,
1
);
// bits 6-7 of the clock_seq_hi_and_reserved to 01
s
[
8
]
=
s
[
13
]
=
s
[
18
]
=
s
[
23
]
=
""
;
return
s
.
join
(
""
);
}
/**
* js获取浏览器的地址参数
* @param name 地址参数
* @return
*/
function
getUrlParam
(
name
)
{
var
reg
=
new
RegExp
(
"
(^|&)
"
+
name
+
"
=([^&]*)(&|$)
"
);
//构造一个含有目标参数的正则表达式对象
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
//匹配目标参数
if
(
r
!=
null
)
return
unescape
(
r
[
2
]);
return
null
;
//返回参数值
}
WebRoot/js/common/cs.js
0 → 100644
View file @
af973cf1
[{
"
id
"
:
1
,
"
text
"
:
"
Folder1
"
,
"
children
"
:[{
"
id
"
:
11
,
"
text
"
:
"
File1
"
,
"
checked
"
:
true
},{
"
text
"
:
"
Books
"
,
"
state
"
:
"
open
"
,
"
children
"
:[{
"
id
"
:
111
,
"
text
"
:
"
<a onclick=
\"
NewTab('功能管理','../manage/functions.jsp')
\"
>功能管理</a>
"
},{
"
id
"
:
8
,
"
text
"
:
"
Sub Bookds
"
,
"
state
"
:
"
closed
"
}]
}]
},{
"
text
"
:
"
Languages
"
,
"
state
"
:
"
closed
"
,
"
children
"
:[{
"
text
"
:
"
Java
"
},{
"
text
"
:
"
C#
"
}]
}]
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment