Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
df74c0e4
Commit
df74c0e4
authored
12 years ago
by
Morris Jobke
Browse files
Options
Downloads
Patches
Plain Diff
apply code review hints
parent
7c8a0a48
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
settings/js/log.js
+10
-12
10 additions, 12 deletions
settings/js/log.js
settings/templates/admin.php
+3
-3
3 additions, 3 deletions
settings/templates/admin.php
with
13 additions
and
15 deletions
settings/js/log.js
+
10
−
12
View file @
df74c0e4
...
...
@@ -17,30 +17,27 @@ OC.Log={
levels
:[
'
Debug
'
,
'
Info
'
,
'
Warning
'
,
'
Error
'
,
'
Fatal
'
],
loaded
:
3
,
//are initially loaded
getMore
:
function
(
count
){
if
(
!
count
){
count
=
10
;
}
count
=
count
||
10
;
$
.
get
(
OC
.
filePath
(
'
settings
'
,
'
ajax
'
,
'
getlog.php
'
),{
offset
:
OC
.
Log
.
loaded
,
count
:
count
},
function
(
result
){
if
(
result
.
status
==
'
success
'
){
OC
.
Log
.
addEntries
(
result
.
data
);
$
(
'
html, body
'
).
animate
({
scrollTop
:
$
(
document
).
height
()},
800
);
if
(
!
result
.
remain
){
$
(
'
#moreLog
'
).
css
(
'
display
'
,
'
none
'
);
$
(
'
#moreLog
'
).
hide
(
);
}
$
(
'
#lessLog
'
).
css
(
'
display
'
,
''
);
$
(
'
#lessLog
'
).
show
(
);
}
});
},
showLess
:
function
(
count
){
count
=
count
||
10
;
$
(
'
#moreLog
'
).
css
(
'
display
'
,
''
);
while
(
OC
.
Log
.
loaded
>
3
&&
count
){
$
(
'
#log tr
'
).
last
().
remove
();
OC
.
Log
.
loaded
-=
1
;
count
--
;
}
//calculate remaining items - at least 3
OC
.
Log
.
loaded
=
Math
.
max
(
3
,
OC
.
Log
.
loaded
-
count
);
$
(
'
#moreLog
'
).
hide
();
// remove all non-remaining items
$
(
'
#log tr
'
).
slice
(
OC
.
Log
.
loaded
).
remove
();
if
(
OC
.
Log
.
loaded
<=
3
)
$
(
'
#lessLog
'
).
css
(
'
display
'
,
'
none
'
);
$
(
'
#lessLog
'
).
hide
(
);
},
addEntries
:
function
(
entries
){
for
(
var
i
=
0
;
i
<
entries
.
length
;
i
++
){
...
...
@@ -68,6 +65,7 @@ OC.Log={
}
$
(
document
).
ready
(
function
(){
$
(
'
#lessLog
'
).
hide
();
// initially hide the less button
$
(
'
#moreLog
'
).
click
(
function
(){
OC
.
Log
.
getMore
();
})
...
...
This diff is collapsed.
Click to expand it.
settings/templates/admin.php
+
3
−
3
View file @
df74c0e4
...
...
@@ -201,7 +201,7 @@ if (!$_['internetconnectionworking']) {
<?php
endif
;
endfor
;
?>
</select>
<table
id=
'
log
'
>
<table
id=
"
log
"
>
<?php
foreach
(
$_
[
'entries'
]
as
$entry
)
:
?>
<tr>
<td>
...
...
@@ -220,8 +220,8 @@ endfor;?>
<?php
endforeach
;
?>
</table>
<?php
if
(
$_
[
'entriesremain'
])
:
?>
<input
id=
'
moreLog
'
type=
'
button
'
value=
'
<?php
p
(
$l
->
t
(
'More'
));
?>
...
'
>
<input
id=
'
lessLog
'
type=
'
button
'
style=
'display:none'
value=
'
<?php
p
(
$l
->
t
(
'Less'
));
?>
...
'
>
<input
id=
"
moreLog
"
type=
"
button
"
value=
"
<?php
p
(
$l
->
t
(
'More'
));
?>
...
"
>
<input
id=
"
lessLog
"
type=
"
button
"
value=
"
<?php
p
(
$l
->
t
(
'Less'
));
?>
...
"
>
<?php
endif
;
?>
</fieldset>
...
...
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