[Pkg-owncloud-commits] [owncloud] 21/73: backport 1bccc80996e270f928c207cdd3090f4284abaea5
David Prévot
taffit at alioth.debian.org
Fri Nov 8 23:09:01 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v4.0.10
in repository owncloud.
commit f53dd22cd908e6a60c3ffe9eb89745028496a8b4
Author: Georg Ehrke <dev at georgswebsite.de>
Date: Sat Aug 4 17:38:31 2012 +0200
backport 1bccc80996e270f928c207cdd3090f4284abaea5
---
settings/admin.php | 3 +++
settings/ajax/getlog.php | 2 +-
settings/js/log.js | 3 +++
settings/templates/admin.php | 3 +++
4 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/settings/admin.php b/settings/admin.php
index a6928bf..5ef9dae 100644
--- a/settings/admin.php
+++ b/settings/admin.php
@@ -18,6 +18,8 @@ $forms=OC_App::getForms('admin');
$htaccessworking=OC_Util::ishtaccessworking();
$entries=OC_Log_Owncloud::getEntries(3);
+$entriesremain=(count(OC_Log_Owncloud::getEntries(4)) > 3)?true:false;
+
function compareEntries($a,$b){
return $b->time - $a->time;
}
@@ -25,6 +27,7 @@ usort($entries, 'compareEntries');
$tmpl->assign('loglevel',OC_Config::getValue( "loglevel", 2 ));
$tmpl->assign('entries',OC_Util::sanitizeHTML($entries));
+$tmpl->assign('entriesremain', $entriesremain);
$tmpl->assign('htaccessworking',$htaccessworking);
$tmpl->assign('forms',array());
foreach($forms as $form){
diff --git a/settings/ajax/getlog.php b/settings/ajax/getlog.php
index d9e80de..d5af22a 100644
--- a/settings/ajax/getlog.php
+++ b/settings/ajax/getlog.php
@@ -14,4 +14,4 @@ $count=(isset($_GET['count']))?$_GET['count']:50;
$offset=(isset($_GET['offset']))?$_GET['offset']:0;
$entries=OC_Log_Owncloud::getEntries($count,$offset);
-OC_JSON::success(array("data" => OC_Util::sanitizeHTML($entries)));
+OC_JSON::success(array("data" => OC_Util::sanitizeHTML($entries), "remain"=>(count(OC_Log_Owncloud::getEntries(1,$offset + $offset)) != 0)?true:false));
diff --git a/settings/js/log.js b/settings/js/log.js
index fe2e92f..04a7bf8 100644
--- a/settings/js/log.js
+++ b/settings/js/log.js
@@ -23,6 +23,9 @@ OC.Log={
if(result.status=='success'){
OC.Log.addEntries(result.data);
$('html, body').animate({scrollTop: $(document).height()}, 800);
+ if(!result.remain){
+ $('#moreLog').css('display', 'none');
+ }
}
});
},
diff --git a/settings/templates/admin.php b/settings/templates/admin.php
index f8c5153..82ee7e8 100644
--- a/settings/templates/admin.php
+++ b/settings/templates/admin.php
@@ -50,5 +50,8 @@ if(!$_['htaccessworking']) {
</tr>
<?php endforeach;?>
</table>
+<?php if($_['entriesremain']): ?>
<input id='moreLog' type='button' value='<?php echo $l->t('More');?>...'></input>
+<?php endif; ?>
+
</fieldset>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list