| Index: appengine/sheriff_o_matic/ui/ct-banner.html
|
| diff --git a/appengine/sheriff_o_matic/ui/ct-banner.html b/appengine/sheriff_o_matic/ui/ct-banner.html
|
| index 32a4ec2dfb230313377b62fc6918f276ecf81f47..0accb05003f8aeeef6d825df949209c1cdac9e60 100644
|
| --- a/appengine/sheriff_o_matic/ui/ct-banner.html
|
| +++ b/appengine/sheriff_o_matic/ui/ct-banner.html
|
| @@ -2,11 +2,8 @@
|
| Copyright 2015 The Chromium Authors. All rights reserved.
|
| Use of this source code is governed by a BSD-style license that can be
|
| found in the LICENSE file.
|
| --->
|
| -
|
| -<link rel="import" href="../appengine_module/components/net.html">
|
| -<polymer-element name="ct-banner" attributes = "message">
|
| - <template>
|
| +--><html><head><link rel="import" href="../appengine_module/components/net.html">
|
| +<dom-module id="ct-banner">
|
| <style>
|
| .message {
|
| text-align: center;
|
| @@ -16,20 +13,23 @@ found in the LICENSE file.
|
| border-radius: 4px;
|
| }
|
| </style>
|
| - <template if="{{ message }}">
|
| + <template>
|
| + <template is="dom-if" if="{{ message }}">
|
| <div class="message">{{ message }}</div>
|
| </template>
|
| </template>
|
| <script>
|
| - Polymer({
|
| - update: function() {
|
| - return net.json('/banner-msg').then(function(data) {
|
| - this.message = data.message;
|
| - }.bind(this), function(err) {
|
| - window.console.log("Banner message error: " + err);
|
| - });
|
| - }
|
| - });
|
| + Polymer({
|
| + is: 'ct-banner',
|
| + properties: { message: { notify: true } },
|
| + update: function () {
|
| + return net.json('/banner-msg').then(function (data) {
|
| + this.message = data.message;
|
| + }.bind(this), function (err) {
|
| + window.console.log('Banner message error: ' + err);
|
| + });
|
| + }
|
| + });
|
| </script>
|
| -</polymer-element>
|
| +</dom-module>
|
|
|
|
|