Added "loading..." string to gr-change-list-view.html

Change-Id: I07a12a10a21716d4d9b7bedcaaa8bf9be7ad6c47
This commit is contained in:
Tom 2016-01-04 16:37:38 -05:00
parent fbb95cb6d2
commit 41a7308273

View File

@ -26,6 +26,11 @@ limitations under the License.
display: block;
margin: 0 1.25rem;
}
.loading {
margin-top: 1em;
color: #666;
background-color: #f1f2f3;
}
gr-change-list {
margin-top: 1em;
width: 100%;
@ -49,7 +54,10 @@ limitations under the License.
auto
url="/changes/"
params="[[_computeQueryParams(query, offset)]]"
last-response="{{_changes}}"></gr-ajax>
last-response="{{_changes}}"
loading="{{_loading}}"></gr-ajax>
<div class="loading" hidden$="{{!_loading}}">Loading...</div>
<div hidden$="{{_loading}}">
<gr-change-list changes="{{_changes}}"></gr-change-list>
<nav>
<a href$="[[_computeNavLink(query, offset, -1)]]"
@ -57,6 +65,7 @@ limitations under the License.
<a href$="[[_computeNavLink(query, offset, 1)]]"
hidden$="[[_hideNextArrow(_changes.length)]]">Next &rarr;</a>
</nav>
</div>
</template>
<script>
(function() {
@ -80,6 +89,14 @@ limitations under the License.
* Change objects loaded from the server.
*/
_changes: Array,
/**
* For showing a "loading..." string during ajax requests.
*/
_loading: {
type: Boolean,
value: true,
},
},
_paramsChanged: function(value) {