| Index: appengine/sheriff_o_matic/ui/ct-builder.html
|
| diff --git a/appengine/sheriff_o_matic/ui/ct-builder.html b/appengine/sheriff_o_matic/ui/ct-builder.html
|
| index 893c344e4a3644b97020d1e1ba5844b58c1fb657..dadf0dc153acfebd4ee43301f905213845590db3 100644
|
| --- a/appengine/sheriff_o_matic/ui/ct-builder.html
|
| +++ b/appengine/sheriff_o_matic/ui/ct-builder.html
|
| @@ -2,23 +2,29 @@
|
| Copyright 2014 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.
|
| --->
|
| +--><html><head><link rel="import" href="ct-user-prefs.html">
|
|
|
| -<link rel="import" href="ct-user-prefs.html">
|
| -
|
| -<polymer-element name="ct-builder" attributes="builder">
|
| +<dom-module id="ct-builder">
|
| <template>
|
| <ct-user-prefs id="userPrefs"></ct-user-prefs>
|
| - <a target="{{ $.userPrefs.values.linkTarget }}" href="{{ {url: builder.buildUrl, useUber: $.userPrefs.values.useUberchromegw} | rewriteUrl }}" style="white-space: nowrap">{{ builder.builder }}</a>
|
| + <a target="{{ $.userPrefs.values.linkTarget }}" style="white-space: nowrap" href$="{{computeHref($, builder)}}">{{ builder.builder }}</a>
|
| </template>
|
| <script>
|
| - Polymer({
|
| - rewriteUrl: function(props) {
|
| - if (this.$ && this.$.userPrefs) {
|
| - return this.$.userPrefs.rewriteUrl(props.url);
|
| + Polymer({
|
| + is: 'ct-builder',
|
| + properties: { builder: { notify: true } },
|
| + rewriteUrl: function (props) {
|
| + if (this.$ && this.$.userPrefs) {
|
| + return this.$.userPrefs.rewriteUrl(props.url);
|
| + }
|
| + return props.url;
|
| + },
|
| + computeHref: function ($, builder) {
|
| + return this.rewriteUrl({
|
| + url: builder.buildUrl,
|
| + useUber: $.userPrefs.values.useUberchromegw
|
| + });
|
| }
|
| - return props.url;
|
| - },
|
| - });
|
| + });
|
| </script>
|
| -</polymer-element>
|
| +</dom-module>
|
|
|