Jonas Kress (WMDE) has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/366897 )
Change subject: Minify design of updater status
......................................................................
Minify design of updater status
Replace text from updater status with icon and move text into the
popover.
Change-Id: I9fd9a760a872469465bf148066784c9a2d959211
---
M index.html
M wikibase/queryService/ui/App.js
2 files changed, 8 insertions(+), 10 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui
refs/changes/97/366897/1
diff --git a/index.html b/index.html
index 6a4c958..937db99 100644
--- a/index.html
+++ b/index.html
@@ -165,7 +165,7 @@
</div>
</div>
</div>
- <div class="status navbar
navbar-default">
+ <div class="status navbar
navbar-default toolbar">
<div class="navbar-right">
<span
class="dataUpdated"> </span>
</div>
diff --git a/wikibase/queryService/ui/App.js b/wikibase/queryService/ui/App.js
index 596ca2d..a2dcd14 100644
--- a/wikibase/queryService/ui/App.js
+++ b/wikibase/queryService/ui/App.js
@@ -336,19 +336,14 @@
var updateDataStatus = function() {
self._sparqlApi.queryDataUpdatedTime().done( function(
time, difference ) {
- var updatestatustext = moment.duration(
difference, 'seconds' ).humanize(),
- labelClass,
- badge;
-
+ var labelClass = 'list-group-item-danger';
if ( difference <= 60 * 2 ) {
labelClass = 'list-group-item-success';
} else if ( difference <= 60 * 15 ) {
labelClass = 'list-group-item-warning';
- } else {
- labelClass = 'list-group-item-danger';
}
- badge = '<span class="badge ' + labelClass +
'">' + updatestatustext + '</span>';
- $label.html( $.i18n( 'wdqs-app-footer-updated',
badge ) );
+
+ $label.html( $( '<span>' ).addClass( 'fa
fa-refresh badge ' + labelClass ).html( ' ' ) );
} );
};
@@ -361,10 +356,13 @@
var e = $( this );
self._sparqlApi.queryDataUpdatedTime().done( function(
time, difference ) {
+ var text = moment.duration( difference,
'seconds' ).humanize(),
+ badge = '<span class="badge ' + '">' +
text + '</span>';
+
e.popover( {
html: true,
placement: 'top',
- content: $.i18n(
'wdqs-app-footer-updated-seconds', difference ) + '.</br>' + time
+ content: $.i18n(
'wdqs-app-footer-updated', badge )
} ).popover( 'show' );
} ).fail( function() {
e.popover( {
--
To view, visit https://gerrit.wikimedia.org/r/366897
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9fd9a760a872469465bf148066784c9a2d959211
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits