Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ISPConfig 3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Helmo
ISPConfig 3
Commits
36393c2b
Commit
36393c2b
authored
4 years ago
by
Thom
Browse files
Options
Downloads
Patches
Plain Diff
Don't load dashboard on login page (#5564)
parent
2cc49dfd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
interface/web/themes/default/assets/javascripts/ispconfig.js
+42
-45
42 additions, 45 deletions
interface/web/themes/default/assets/javascripts/ispconfig.js
interface/web/themes/default/templates/main.tpl.htm
+2
-0
2 additions, 0 deletions
interface/web/themes/default/templates/main.tpl.htm
with
44 additions
and
45 deletions
interface/web/themes/default/assets/javascripts/ispconfig.js
+
42
−
45
View file @
36393c2b
...
@@ -9,30 +9,30 @@ var ISPConfig = {
...
@@ -9,30 +9,30 @@ var ISPConfig = {
registeredHooks
:
new
Array
(),
registeredHooks
:
new
Array
(),
new_tpl_add_id
:
0
,
new_tpl_add_id
:
0
,
dataLogTimer
:
0
,
dataLogTimer
:
0
,
options
:
{
options
:
{
useLoadIndicator
:
false
,
useLoadIndicator
:
false
,
useComboBox
:
false
useComboBox
:
false
},
},
setOption
:
function
(
key
,
value
)
{
setOption
:
function
(
key
,
value
)
{
ISPConfig
.
options
[
key
]
=
value
;
ISPConfig
.
options
[
key
]
=
value
;
},
},
setOptions
:
function
(
opts
)
{
setOptions
:
function
(
opts
)
{
$
.
extend
(
ISPConfig
.
options
,
opts
);
$
.
extend
(
ISPConfig
.
options
,
opts
);
},
},
reportError
:
function
(
request
)
{
reportError
:
function
(
request
)
{
},
},
registerHook
:
function
(
name
,
callback
)
{
registerHook
:
function
(
name
,
callback
)
{
if
(
!
ISPConfig
.
registeredHooks
[
name
])
ISPConfig
.
registeredHooks
[
name
]
=
new
Array
();
if
(
!
ISPConfig
.
registeredHooks
[
name
])
ISPConfig
.
registeredHooks
[
name
]
=
new
Array
();
var
newindex
=
ISPConfig
.
registeredHooks
[
name
].
length
;
var
newindex
=
ISPConfig
.
registeredHooks
[
name
].
length
;
ISPConfig
.
registeredHooks
[
name
][
newindex
]
=
callback
;
ISPConfig
.
registeredHooks
[
name
][
newindex
]
=
callback
;
},
},
callHook
:
function
(
name
,
params
)
{
callHook
:
function
(
name
,
params
)
{
if
(
!
ISPConfig
.
registeredHooks
[
name
])
return
;
if
(
!
ISPConfig
.
registeredHooks
[
name
])
return
;
for
(
var
i
=
0
;
i
<
ISPConfig
.
registeredHooks
[
name
].
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
ISPConfig
.
registeredHooks
[
name
].
length
;
i
++
)
{
...
@@ -40,14 +40,14 @@ var ISPConfig = {
...
@@ -40,14 +40,14 @@ var ISPConfig = {
callback
(
name
,
params
);
callback
(
name
,
params
);
}
}
},
},
resetFormChanged
:
function
()
{
resetFormChanged
:
function
()
{
ISPConfig
.
pageFormChanged
=
false
;
ISPConfig
.
pageFormChanged
=
false
;
},
},
showLoadIndicator
:
function
()
{
showLoadIndicator
:
function
()
{
document
.
body
.
style
.
cursor
=
'
wait
'
;
document
.
body
.
style
.
cursor
=
'
wait
'
;
if
(
ISPConfig
.
options
.
useLoadIndicator
==
true
)
{
if
(
ISPConfig
.
options
.
useLoadIndicator
==
true
)
{
ISPConfig
.
requestsRunning
+=
1
;
ISPConfig
.
requestsRunning
+=
1
;
...
@@ -96,7 +96,7 @@ var ISPConfig = {
...
@@ -96,7 +96,7 @@ var ISPConfig = {
onAfterContentLoad
:
function
(
url
,
data
)
{
onAfterContentLoad
:
function
(
url
,
data
)
{
if
(
!
data
)
data
=
''
;
if
(
!
data
)
data
=
''
;
else
data
=
'
&
'
+
data
;
else
data
=
'
&
'
+
data
;
if
(
ISPConfig
.
options
.
useComboBox
==
true
)
{
if
(
ISPConfig
.
options
.
useComboBox
==
true
)
{
$
(
'
#pageContent
'
).
find
(
"
select:not(.chosen-select)
"
).
select2
({
$
(
'
#pageContent
'
).
find
(
"
select:not(.chosen-select)
"
).
select2
({
placeholder
:
''
,
placeholder
:
''
,
...
@@ -119,7 +119,7 @@ var ISPConfig = {
...
@@ -119,7 +119,7 @@ var ISPConfig = {
}
}
});
});
}
}
$
(
'
input[data-input-element="date"]
'
).
datetimepicker
({
$
(
'
input[data-input-element="date"]
'
).
datetimepicker
({
'
language
'
:
'
en
'
,
// TODO
'
language
'
:
'
en
'
,
// TODO
'
todayHighlight
'
:
true
,
'
todayHighlight
'
:
true
,
...
@@ -144,18 +144,18 @@ var ISPConfig = {
...
@@ -144,18 +144,18 @@ var ISPConfig = {
$
(
this
).
prop
(
'
readonly
'
,
true
)
$
(
this
).
prop
(
'
readonly
'
,
true
)
.
tooltip
({
title
:
"
Click to set
"
,
placement
:
"
left
"
});
.
tooltip
({
title
:
"
Click to set
"
,
placement
:
"
left
"
});
});
});
$
(
'
input[type="password"]
'
).
on
(
'
click focus
'
,
function
()
{
$
(
'
input[type="password"]
'
).
on
(
'
click focus
'
,
function
()
{
$
(
this
).
prop
(
'
readonly
'
,
false
);
$
(
this
).
prop
(
'
readonly
'
,
false
);
$
(
this
).
tooltip
(
'
destroy
'
);
$
(
this
).
tooltip
(
'
destroy
'
);
});
});
ISPConfig
.
callHook
(
'
onAfterContentLoad
'
,
{
'
url
'
:
url
,
'
data
'
:
data
});
ISPConfig
.
callHook
(
'
onAfterContentLoad
'
,
{
'
url
'
:
url
,
'
data
'
:
data
});
},
},
submitForm
:
function
(
formname
,
target
,
confirmation
)
{
submitForm
:
function
(
formname
,
target
,
confirmation
)
{
var
successMessage
=
arguments
[
3
];
var
successMessage
=
arguments
[
3
];
if
(
!
confirmation
)
confirmation
=
false
;
if
(
!
confirmation
)
confirmation
=
false
;
if
(
!
confirmation
||
window
.
confirm
(
confirmation
))
{
if
(
!
confirmation
||
window
.
confirm
(
confirmation
))
{
var
submitFormObj
=
$
.
ajax
({
var
submitFormObj
=
$
.
ajax
({
type
:
"
POST
"
,
type
:
"
POST
"
,
...
@@ -210,12 +210,12 @@ var ISPConfig = {
...
@@ -210,12 +210,12 @@ var ISPConfig = {
if
(
errormsg
){
if
(
errormsg
){
msg
=
msg
+
'
<div id="errorMsg">
'
+
errormsg
+
'
</div>
'
;
msg
=
msg
+
'
<div id="errorMsg">
'
+
errormsg
+
'
</div>
'
;
}
}
var
csrf_key
=
$response
.
find
(
'
input[name="_csrf_key"]
'
).
val
();
var
csrf_key
=
$response
.
find
(
'
input[name="_csrf_key"]
'
).
val
();
var
csrf_id
=
$response
.
find
(
'
input[name="_csrf_id"]
'
).
val
();
var
csrf_id
=
$response
.
find
(
'
input[name="_csrf_id"]
'
).
val
();
msg
=
msg
+
'
<input type="hidden" name="_csrf_id" value="
'
+
csrf_id
+
'
" /><input type="hidden" name="_csrf_key" value="
'
+
csrf_key
+
'
" />
'
;
msg
=
msg
+
'
<input type="hidden" name="_csrf_id" value="
'
+
csrf_id
+
'
" /><input type="hidden" name="_csrf_key" value="
'
+
csrf_key
+
'
" />
'
;
return
msg
;
return
msg
;
};
};
...
@@ -264,7 +264,7 @@ var ISPConfig = {
...
@@ -264,7 +264,7 @@ var ISPConfig = {
}
}
});
});
},
},
loadContent
:
function
(
pagename
)
{
loadContent
:
function
(
pagename
)
{
var
params
=
arguments
[
1
];
var
params
=
arguments
[
1
];
var
pageContentObject2
=
$
.
ajax
({
var
pageContentObject2
=
$
.
ajax
({
...
@@ -350,7 +350,7 @@ var ISPConfig = {
...
@@ -350,7 +350,7 @@ var ISPConfig = {
ISPConfig
.
reportError
(
'
Ajax Request was not successful. 114
'
);
ISPConfig
.
reportError
(
'
Ajax Request was not successful. 114
'
);
}
}
});
});
ISPConfig
.
loadMenus
();
ISPConfig
.
loadMenus
();
ISPConfig
.
keepalive
();
ISPConfig
.
keepalive
();
ISPConfig
.
dataLogNotification
();
ISPConfig
.
dataLogNotification
();
...
@@ -358,11 +358,11 @@ var ISPConfig = {
...
@@ -358,11 +358,11 @@ var ISPConfig = {
try
{
try
{
$
(
'
form#pageForm
'
).
find
(
'
input[name="username"]
'
).
focus
();
$
(
'
form#pageForm
'
).
find
(
'
input[name="username"]
'
).
focus
();
}
catch
(
e
)
{
}
catch
(
e
)
{
}
}
},
1000
);
},
1000
);
},
},
loadMenus
:
function
()
{
loadMenus
:
function
()
{
var
sideNavObject
=
$
.
ajax
({
var
sideNavObject
=
$
.
ajax
({
type
:
"
GET
"
,
type
:
"
GET
"
,
...
@@ -409,7 +409,7 @@ var ISPConfig = {
...
@@ -409,7 +409,7 @@ var ISPConfig = {
console
.
log
(
'
tab change interrupted, request still running.
'
);
console
.
log
(
'
tab change interrupted, request still running.
'
);
return
false
;
return
false
;
}
}
document
.
pageForm
.
next_tab
.
value
=
tab
;
document
.
pageForm
.
next_tab
.
value
=
tab
;
var
idel
=
$
(
'
form#pageForm
'
).
find
(
'
[name="id"]
'
);
var
idel
=
$
(
'
form#pageForm
'
).
find
(
'
[name="id"]
'
);
...
@@ -487,7 +487,7 @@ var ISPConfig = {
...
@@ -487,7 +487,7 @@ var ISPConfig = {
}
}
});
});
},
},
keepalive
:
function
()
{
keepalive
:
function
()
{
var
pageContentObject3
=
$
.
ajax
({
var
pageContentObject3
=
$
.
ajax
({
type
:
"
GET
"
,
type
:
"
GET
"
,
...
@@ -618,13 +618,13 @@ $(document).on('click', 'a[data-load-content],button[data-load-content]', functi
...
@@ -618,13 +618,13 @@ $(document).on('click', 'a[data-load-content],button[data-load-content]', functi
console
.
log
(
'
preventing click because there is still a request running.
'
);
console
.
log
(
'
preventing click because there is still a request running.
'
);
return
;
return
;
}
}
$page
.
on
(
'
scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove
'
,
function
()
{
$page
.
stop
();
});
$page
.
on
(
'
scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove
'
,
function
()
{
$page
.
stop
();
});
$page
.
animate
({
scrollTop
:
0
},
1000
,
function
()
{
$page
.
off
(
'
scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove
'
,
function
()
{
$page
.
stop
();
});
});
$page
.
animate
({
scrollTop
:
0
},
1000
,
function
()
{
$page
.
off
(
'
scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove
'
,
function
()
{
$page
.
stop
();
});
});
var
content_to_load
=
$
(
this
).
attr
(
'
data-load-content
'
);
var
content_to_load
=
$
(
this
).
attr
(
'
data-load-content
'
);
if
(
!
content_to_load
)
return
this
;
if
(
!
content_to_load
)
return
this
;
ISPConfig
.
loadContent
(
content_to_load
);
ISPConfig
.
loadContent
(
content_to_load
);
});
});
...
@@ -634,13 +634,13 @@ $(document).on('click', 'a[data-capp],button[data-capp]', function(e) {
...
@@ -634,13 +634,13 @@ $(document).on('click', 'a[data-capp],button[data-capp]', function(e) {
console
.
log
(
'
preventing click because there is still a request running.
'
);
console
.
log
(
'
preventing click because there is still a request running.
'
);
return
;
return
;
}
}
$page
.
on
(
'
scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove
'
,
function
()
{
$page
.
stop
();
});
$page
.
on
(
'
scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove
'
,
function
()
{
$page
.
stop
();
});
$page
.
animate
({
scrollTop
:
0
},
1000
,
function
()
{
$page
.
off
(
'
scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove
'
,
function
()
{
$page
.
stop
();
});
});
$page
.
animate
({
scrollTop
:
0
},
1000
,
function
()
{
$page
.
off
(
'
scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove
'
,
function
()
{
$page
.
stop
();
});
});
var
content_to_load
=
$
(
this
).
attr
(
'
data-capp
'
);
var
content_to_load
=
$
(
this
).
attr
(
'
data-capp
'
);
if
(
!
content_to_load
)
return
this
;
if
(
!
content_to_load
)
return
this
;
ISPConfig
.
capp
(
content_to_load
);
ISPConfig
.
capp
(
content_to_load
);
});
});
...
@@ -650,14 +650,14 @@ $(document).on('click', 'a[data-submit-form],button[data-submit-form]', function
...
@@ -650,14 +650,14 @@ $(document).on('click', 'a[data-submit-form],button[data-submit-form]', function
console
.
log
(
'
preventing click because there is still a request running.
'
);
console
.
log
(
'
preventing click because there is still a request running.
'
);
return
;
return
;
}
}
$page
.
on
(
'
scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove
'
,
function
()
{
$page
.
stop
();
});
$page
.
on
(
'
scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove
'
,
function
()
{
$page
.
stop
();
});
$page
.
animate
({
scrollTop
:
0
},
1000
,
function
()
{
$page
.
off
(
'
scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove
'
,
function
()
{
$page
.
stop
();
});
});
$page
.
animate
({
scrollTop
:
0
},
1000
,
function
()
{
$page
.
off
(
'
scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove
'
,
function
()
{
$page
.
stop
();
});
});
var
$el
=
$
(
this
);
var
$el
=
$
(
this
);
var
act
=
$el
.
attr
(
'
data-form-action
'
);
var
act
=
$el
.
attr
(
'
data-form-action
'
);
var
form
=
$el
.
attr
(
'
data-submit-form
'
);
var
form
=
$el
.
attr
(
'
data-submit-form
'
);
if
(
$el
.
attr
(
'
data-form-upload
'
)
==
'
true
'
)
ISPConfig
.
submitUploadForm
(
form
,
act
);
if
(
$el
.
attr
(
'
data-form-upload
'
)
==
'
true
'
)
ISPConfig
.
submitUploadForm
(
form
,
act
);
else
ISPConfig
.
submitForm
(
form
,
act
);
else
ISPConfig
.
submitForm
(
form
,
act
);
});
});
...
@@ -679,28 +679,28 @@ $(document).on('click', 'th[data-column]', function(e) {
...
@@ -679,28 +679,28 @@ $(document).on('click', 'th[data-column]', function(e) {
var
$self
=
$
(
this
);
var
$self
=
$
(
this
);
var
column
=
$self
.
attr
(
'
data-column
'
);
var
column
=
$self
.
attr
(
'
data-column
'
);
if
(
!
column
)
return
this
;
if
(
!
column
)
return
this
;
if
(
$
(
"
#pageForm .table #Filter
"
).
length
>
0
&&
$self
.
attr
(
'
data-sortable
'
)
!=
'
false
'
)
{
if
(
$
(
"
#pageForm .table #Filter
"
).
length
>
0
&&
$self
.
attr
(
'
data-sortable
'
)
!=
'
false
'
)
{
var
$el
=
$
(
'
#Filter
'
);
var
$el
=
$
(
'
#Filter
'
);
var
act
=
$el
.
attr
(
'
data-form-action
'
);
var
act
=
$el
.
attr
(
'
data-form-action
'
);
var
form
=
$el
.
attr
(
'
data-submit-form
'
);
var
form
=
$el
.
attr
(
'
data-submit-form
'
);
var
dir
=
$self
.
attr
(
'
data-ordered
'
);
var
dir
=
$self
.
attr
(
'
data-ordered
'
);
var
separator
=
'
?
'
;
var
separator
=
'
?
'
;
if
(
act
.
indexOf
(
"
?
"
)
>=
0
){
if
(
act
.
indexOf
(
"
?
"
)
>=
0
){
separator
=
'
&
'
;
separator
=
'
&
'
;
}
}
act
=
act
+
separator
+
'
orderby=
'
+
column
;
act
=
act
+
separator
+
'
orderby=
'
+
column
;
ISPConfig
.
submitForm
(
form
,
act
);
ISPConfig
.
submitForm
(
form
,
act
);
$
(
document
).
ajaxComplete
(
function
()
{
$
(
document
).
ajaxComplete
(
function
()
{
var
$self
=
$
(
'
#pageForm .table th[data-column="
'
+
column
+
'
"]
'
);
var
$self
=
$
(
'
#pageForm .table th[data-column="
'
+
column
+
'
"]
'
);
$self
.
parent
().
children
(
'
th[data-column]
'
).
removeAttr
(
'
data-ordered
'
);
$self
.
parent
().
children
(
'
th[data-column]
'
).
removeAttr
(
'
data-ordered
'
);
if
(
dir
&&
dir
==
'
asc
'
)
$self
.
attr
(
'
data-ordered
'
,
'
desc
'
);
if
(
dir
&&
dir
==
'
asc
'
)
$self
.
attr
(
'
data-ordered
'
,
'
desc
'
);
else
$self
.
attr
(
'
data-ordered
'
,
'
asc
'
);
else
$self
.
attr
(
'
data-ordered
'
,
'
asc
'
);
});
});
}
}
});
});
...
@@ -765,25 +765,23 @@ $(document).on('ready', function () {
...
@@ -765,25 +765,23 @@ $(document).on('ready', function () {
})
})
}
}
});
});
// Animierter Ladefortschritt
// Animierter Ladefortschritt
$
(
'
.progress .progress-bar
'
).
css
(
'
width
'
,
function
()
{
$
(
'
.progress .progress-bar
'
).
css
(
'
width
'
,
function
()
{
return
$
(
this
).
attr
(
'
aria-valuenow
'
)
+
'
%
'
;
return
$
(
this
).
attr
(
'
aria-valuenow
'
)
+
'
%
'
;
});
});
ISPConfig
.
loadInitContent
();
$
(
'
#searchform
'
).
submit
(
function
(
e
)
{
$
(
'
#searchform
'
).
submit
(
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
});
});
$
(
"
#pageForm
"
).
submit
(
function
(
e
){
$
(
"
#pageForm
"
).
submit
(
function
(
e
){
//Prevent form submit: e.preventDefault() in lists
//Prevent form submit: e.preventDefault() in lists
if
(
$
(
"
#pageForm .table #Filter
"
).
length
>
0
)
{
if
(
$
(
"
#pageForm .table #Filter
"
).
length
>
0
)
{
e
.
preventDefault
();
e
.
preventDefault
();
}
}
});
});
$
.
fn
.
setCursorPosition
=
function
(
pos
)
{
$
.
fn
.
setCursorPosition
=
function
(
pos
)
{
var
self
=
$
(
this
).
get
(
0
);
var
self
=
$
(
this
).
get
(
0
);
if
(
self
.
setSelectionRange
)
{
if
(
self
.
setSelectionRange
)
{
...
@@ -799,11 +797,11 @@ $(document).on('ready', function () {
...
@@ -799,11 +797,11 @@ $(document).on('ready', function () {
range
.
select
();
range
.
select
();
}
}
};
};
$
.
fn
.
getCursorPosition
=
function
()
{
$
.
fn
.
getCursorPosition
=
function
()
{
var
iCaretPos
=
0
;
var
iCaretPos
=
0
;
var
self
=
$
(
this
).
get
(
0
);
var
self
=
$
(
this
).
get
(
0
);
if
(
typeof
self
.
selectionStart
===
'
number
'
)
{
if
(
typeof
self
.
selectionStart
===
'
number
'
)
{
iCaretPos
=
self
.
selectionDirection
==
'
backward
'
?
self
.
selectionStart
:
self
.
selectionEnd
;
iCaretPos
=
self
.
selectionDirection
==
'
backward
'
?
self
.
selectionStart
:
self
.
selectionEnd
;
}
else
if
(
document
.
selection
)
{
}
else
if
(
document
.
selection
)
{
...
@@ -815,4 +813,3 @@ $(document).on('ready', function () {
...
@@ -815,4 +813,3 @@ $(document).on('ready', function () {
return
iCaretPos
;
return
iCaretPos
;
};
};
});
});
This diff is collapsed.
Click to expand it.
interface/web/themes/default/templates/main.tpl.htm
+
2
−
0
View file @
36393c2b
...
@@ -153,6 +153,8 @@
...
@@ -153,6 +153,8 @@
resultBoxPosition
:
''
resultBoxPosition
:
''
});
});
ISPConfig
.
loadInitContent
();
});
});
//-->
//-->
</script>
</script>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment