diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-01-26 04:15:40 -0800 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-01-26 04:15:40 -0800 |
commit | 276d98b9ddd18c216956b2c9916583e8098186d0 (patch) | |
tree | eafc40da091c41e8e40d5ce9948c85b0dbe976dc /settings | |
parent | 3b547895ec0c8b076bf31abdb53079ba8fa983db (diff) | |
parent | 5d6c1d52bdb5aa3addc26d1e105749a8eda35301 (diff) | |
download | nextcloud-server-276d98b9ddd18c216956b2c9916583e8098186d0.tar.gz nextcloud-server-276d98b9ddd18c216956b2c9916583e8098186d0.zip |
Merge pull request #1059 from owncloud/fixing-998-master
Fixing 998 master
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/users.js | 15 | ||||
-rw-r--r-- | settings/personal.php | 16 | ||||
-rw-r--r-- | settings/templates/users.php | 2 |
3 files changed, 11 insertions, 22 deletions
diff --git a/settings/js/users.js b/settings/js/users.js index fa6f058d923..9f0c1ffd111 100644 --- a/settings/js/users.js +++ b/settings/js/users.js @@ -26,9 +26,8 @@ var UserList = { UserList.deleteCanceled = false; // Provide user with option to undo - $('#notification').html(t('users', 'deleted') + ' ' + uid + '<span class="undo">' + t('users', 'undo') + '</span>'); $('#notification').data('deleteuser', true); - $('#notification').fadeIn(); + OC.Notification.showHtml(t('users', 'deleted') + ' ' + uid + '<span class="undo">' + t('users', 'undo') + '</span>'); }, /** @@ -53,7 +52,7 @@ var UserList = { success:function (result) { if (result.status == 'success') { // Remove undo option, & remove user from table - $('#notification').fadeOut(); + OC.Notification.hide(); $('tr').filterAttr('data-uid', UserList.deleteUid).remove(); UserList.deleteCanceled = true; if (ready) { @@ -197,7 +196,7 @@ var UserList = { checked:checked, oncheck:checkHandeler, onuncheck:checkHandeler, - minWidth:100, + minWidth:100 }); } if ($(element).attr('class') == 'subadminsselect') { @@ -232,7 +231,7 @@ var UserList = { checked:checked, oncheck:checkHandeler, onuncheck:checkHandeler, - minWidth:100, + minWidth:100 }); } } @@ -389,7 +388,7 @@ $(document).ready(function () { { username:username, password:password, - groups:groups, + groups:groups }, function (result) { if (result.status != 'success') { @@ -402,13 +401,13 @@ $(document).ready(function () { ); }); // Handle undo notifications - $('#notification').hide(); + OC.Notification.hide(); $('#notification .undo').live('click', function () { if ($('#notification').data('deleteuser')) { $('tbody tr').filterAttr('data-uid', UserList.deleteUid).show(); UserList.deleteCanceled = true; } - $('#notification').fadeOut(); + OC.Notification.hide(); }); UserList.useUndo = ('onbeforeunload' in window) $(window).bind('beforeunload', function () { diff --git a/settings/personal.php b/settings/personal.php index 47dbcc53ebc..4624bda8397 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -15,15 +15,7 @@ OC_Util::addScript( '3rdparty', 'chosen/chosen.jquery.min' ); OC_Util::addStyle( '3rdparty', 'chosen' ); OC_App::setActiveNavigationEntry( 'personal' ); -// calculate the disc space -$rootInfo=OC_FileCache::get(''); -$sharedInfo=OC_FileCache::get('/Shared'); -$used=$rootInfo['size']; -if($used<0) $used=0; -$free=OC_Filesystem::free_space(); -$total=$free+$used; -if($total==0) $total=1; // prevent division by zero -$relative=round(($used/$total)*10000)/100; +$storageInfo=OC_Helper::getStorageInfo(); $email=OC_Preferences::getValue(OC_User::getUser(), 'settings', 'email', ''); @@ -50,9 +42,9 @@ foreach($languageCodes as $lang) { // Return template $tmpl = new OC_Template( 'settings', 'personal', 'user'); -$tmpl->assign('usage', OC_Helper::humanFileSize($used)); -$tmpl->assign('total_space', OC_Helper::humanFileSize($total)); -$tmpl->assign('usage_relative', $relative); +$tmpl->assign('usage', OC_Helper::humanFileSize($storageInfo['used'])); +$tmpl->assign('total_space', OC_Helper::humanFileSize($storageInfo['total'])); +$tmpl->assign('usage_relative', $storageInfo['relative']); $tmpl->assign('email', $email); $tmpl->assign('languages', $languages); diff --git a/settings/templates/users.php b/settings/templates/users.php index 5e588f9ead7..c88966f7137 100644 --- a/settings/templates/users.php +++ b/settings/templates/users.php @@ -73,8 +73,6 @@ $_['subadmingroups'] = array_flip($items); </div> </div> -<div id='notification'></div> - <table data-groups="<?php echo implode(', ', $allGroups);?>"> <thead> <tr> |