Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
5f9d585e
Commit
5f9d585e
authored
Nov 23, 2018
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整自定义js
parent
e98b9345
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
21 deletions
+23
-21
src/main/webapp/assets/common/static/js/custom.js
+23
-21
No files found.
src/main/webapp/assets/common/static/js/custom.js
View file @
5f9d585e
...
@@ -6,9 +6,9 @@ $(function () {
...
@@ -6,9 +6,9 @@ $(function () {
jQuery
(
document
).
on
(
'click'
,
'.mega-dropdown'
,
function
(
e
)
{
jQuery
(
document
).
on
(
'click'
,
'.mega-dropdown'
,
function
(
e
)
{
e
.
stopPropagation
()
e
.
stopPropagation
()
});
});
// ==============================================================
// ==============================================================
// This is for the top header part and sidebar part
// This is for the top header part and sidebar part
// ==============================================================
// ==============================================================
var
set
=
function
()
{
var
set
=
function
()
{
var
width
=
(
window
.
innerWidth
>
0
)
?
window
.
innerWidth
:
this
.
screen
.
width
;
var
width
=
(
window
.
innerWidth
>
0
)
?
window
.
innerWidth
:
this
.
screen
.
width
;
var
topOffset
=
70
;
var
topOffset
=
70
;
...
@@ -34,9 +34,9 @@ $(function () {
...
@@ -34,9 +34,9 @@ $(function () {
};
};
$
(
window
).
ready
(
set
);
$
(
window
).
ready
(
set
);
$
(
window
).
on
(
"resize"
,
set
);
$
(
window
).
on
(
"resize"
,
set
);
// ==============================================================
// ==============================================================
// Theme options
// Theme options
// ==============================================================
// ==============================================================
$
(
".sidebartoggler"
).
on
(
'click'
,
function
()
{
$
(
".sidebartoggler"
).
on
(
'click'
,
function
()
{
if
(
$
(
"body"
).
hasClass
(
"mini-sidebar"
))
{
if
(
$
(
"body"
).
hasClass
(
"mini-sidebar"
))
{
$
(
"body"
).
trigger
(
"resize"
);
$
(
"body"
).
trigger
(
"resize"
);
...
@@ -55,7 +55,9 @@ $(function () {
...
@@ -55,7 +55,9 @@ $(function () {
});
});
// topbar stickey on scroll
// topbar stickey on scroll
$
(
".fix-header .topbar"
).
stick_in_parent
({});
$
(
".fix-header .topbar"
).
stick_in_parent
({
});
// this is for close icon when navigation open in mobile view
// this is for close icon when navigation open in mobile view
...
@@ -67,18 +69,18 @@ $(function () {
...
@@ -67,18 +69,18 @@ $(function () {
$
(
".sidebartoggler"
).
on
(
'click'
,
function
()
{
$
(
".sidebartoggler"
).
on
(
'click'
,
function
()
{
$
(
".sidebartoggler i"
).
toggleClass
(
"ti-menu"
);
$
(
".sidebartoggler i"
).
toggleClass
(
"ti-menu"
);
});
});
// ==============================================================
// ==============================================================
// Right sidebar options
// Right sidebar options
// ==============================================================
// ==============================================================
$
(
".right-side-toggle"
).
click
(
function
()
{
$
(
".right-side-toggle"
).
click
(
function
()
{
$
(
".right-sidebar"
).
slideDown
(
50
);
$
(
".right-sidebar"
).
slideDown
(
50
);
$
(
".right-sidebar"
).
toggleClass
(
"shw-rside"
);
$
(
".right-sidebar"
).
toggleClass
(
"shw-rside"
);
});
});
// ==============================================================
// ==============================================================
// Auto select left navbar
// Auto select left navbar
// ==============================================================
// ==============================================================
$
(
function
()
{
$
(
function
()
{
var
url
=
window
.
location
;
var
url
=
window
.
location
;
var
element
=
$
(
'ul#sidebarnav a'
).
filter
(
function
()
{
var
element
=
$
(
'ul#sidebarnav a'
).
filter
(
function
()
{
...
@@ -94,9 +96,9 @@ $(function () {
...
@@ -94,9 +96,9 @@ $(function () {
}
}
});
});
// ==============================================================
// ==============================================================
//tooltip
//tooltip
// ==============================================================
// ==============================================================
$
(
function
()
{
$
(
function
()
{
$
(
'[data-toggle="tooltip"]'
).
tooltip
()
$
(
'[data-toggle="tooltip"]'
).
tooltip
()
})
})
...
@@ -112,9 +114,9 @@ $(function () {
...
@@ -112,9 +114,9 @@ $(function () {
$
(
function
()
{
$
(
function
()
{
$
(
'#sidebarnav'
).
metisMenu
();
$
(
'#sidebarnav'
).
metisMenu
();
});
});
// ==============================================================
// ==============================================================
// Slimscrollbars
// Slimscrollbars
// ==============================================================
// ==============================================================
$
(
'.scroll-sidebar'
).
slimScroll
({
$
(
'.scroll-sidebar'
).
slimScroll
({
position
:
'left'
position
:
'left'
,
size
:
"5px"
,
size
:
"5px"
...
@@ -155,20 +157,20 @@ $(function () {
...
@@ -155,20 +157,20 @@ $(function () {
,
color
:
'#dcdcdc'
,
color
:
'#dcdcdc'
});
});
// ==============================================================
// ==============================================================
// Resize all elements
// Resize all elements
// ==============================================================
// ==============================================================
$
(
"body"
).
trigger
(
"resize"
);
$
(
"body"
).
trigger
(
"resize"
);
// ==============================================================
// ==============================================================
// To do list
// To do list
// ==============================================================
// ==============================================================
$
(
".list-task li label"
).
click
(
function
()
{
$
(
".list-task li label"
).
click
(
function
()
{
$
(
this
).
toggleClass
(
"task-done"
);
$
(
this
).
toggleClass
(
"task-done"
);
});
});
// ==============================================================
// ==============================================================
// Login and Recover Password
// Login and Recover Password
// ==============================================================
// ==============================================================
$
(
'#to-recover'
).
on
(
"click"
,
function
()
{
$
(
'#to-recover'
).
on
(
"click"
,
function
()
{
$
(
"#loginform"
).
slideUp
();
$
(
"#loginform"
).
slideUp
();
$
(
"#recoverform"
).
fadeIn
();
$
(
"#recoverform"
).
fadeIn
();
...
@@ -177,7 +179,7 @@ $(function () {
...
@@ -177,7 +179,7 @@ $(function () {
// ==============================================================
// ==============================================================
// Collapsable cards
// Collapsable cards
// ==============================================================
// ==============================================================
$
(
document
).
on
(
"click"
,
".card-actions a"
,
function
(
e
)
{
$
(
document
).
on
(
"click"
,
".card-actions a"
,
function
(
e
)
{
if
(
e
.
preventDefault
(),
$
(
this
).
hasClass
(
"btn-close"
))
$
(
this
).
parent
().
parent
().
parent
().
fadeOut
();
if
(
e
.
preventDefault
(),
$
(
this
).
hasClass
(
"btn-close"
))
$
(
this
).
parent
().
parent
().
parent
().
fadeOut
();
});
});
...
...
Write
Preview
Markdown
is supported
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