summaryrefslogtreecommitdiffstats
path: root/apps/files_external/js
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@owncloud.com>2015-09-16 16:58:26 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-23 15:25:07 +0200
commit9a4d37f626dca4663ea7d25f78f7c1f174306ab5 (patch)
tree2e8a4dee7c55253946adffe53adb0c58723c4e00 /apps/files_external/js
parent4ac33ab26bc75cde5277f59b3a0f0b3713c05dab (diff)
downloadnextcloud-server-9a4d37f626dca4663ea7d25f78f7c1f174306ab5.tar.gz
nextcloud-server-9a4d37f626dca4663ea7d25f78f7c1f174306ab5.zip
Display storage status as tooltip
Diffstat (limited to 'apps/files_external/js')
-rw-r--r--apps/files_external/js/settings.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js
index c4646d429f8..a839f396b9b 100644
--- a/apps/files_external/js/settings.js
+++ b/apps/files_external/js/settings.js
@@ -643,6 +643,10 @@ MountConfigListView.prototype = _.extend({
});
addSelect2(this.$el.find('tr:not(#addMountPoint) .applicableUsers'), this._userListLimit);
+ this.$el.tooltip({
+ selector: '.status span',
+ container: 'body'
+ });
this._initEvents();
@@ -947,7 +951,7 @@ MountConfigListView.prototype = _.extend({
if (concurrentTimer === undefined
|| $tr.data('save-timer') === concurrentTimer
) {
- self.updateStatus($tr, result.status);
+ self.updateStatus($tr, result.status, result.statusMessage);
$tr.attr('data-id', result.id);
if (_.isFunction(callback)) {
@@ -981,7 +985,7 @@ MountConfigListView.prototype = _.extend({
this.updateStatus($tr, StorageConfig.Status.IN_PROGRESS);
storage.recheck({
success: function(result) {
- self.updateStatus($tr, result.status);
+ self.updateStatus($tr, result.status, result.statusMessage);
},
error: function() {
self.updateStatus($tr, StorageConfig.Status.ERROR);
@@ -994,8 +998,9 @@ MountConfigListView.prototype = _.extend({
*
* @param {jQuery} $tr
* @param {int} status
+ * @param {string} message
*/
- updateStatus: function($tr, status) {
+ updateStatus: function($tr, status, message) {
var $statusSpan = $tr.find('.status span');
$statusSpan.removeClass('loading-small success indeterminate error');
switch (status) {
@@ -1014,6 +1019,7 @@ MountConfigListView.prototype = _.extend({
default:
$statusSpan.addClass('error');
}
+ $statusSpan.attr('data-original-title', (typeof message === 'string') ? message : '');
},
/**