PolyGerrit: Avatars did not make use of gerrit baseurl

Avatars did not work correctly on non-root "/" deployments.

Change-Id: I1272625c52b10e007685215fd664df0a7db17559
This commit is contained in:
Gustaf Lundh
2017-10-09 15:40:42 +02:00
parent 289adc47e7
commit 4ff7bd67e5
2 changed files with 7 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<link rel="import" href="../../../behaviors/base-url-behavior/base-url-behavior.html">
<link rel="import" href="../../../bower_components/polymer/polymer.html">
<link rel="import" href="../gr-rest-api-interface/gr-rest-api-interface.html">

View File

@@ -28,6 +28,10 @@
},
},
behaviors: [
Gerrit.BaseUrlBehavior,
],
created: function() {
this.hidden = true;
},
@@ -64,7 +68,8 @@
return avatars[i].url;
}
}
return '/accounts/' + account._account_id + '/avatar?s=' + this.imageSize;
return this.getBaseUrl() + '/accounts/' + account._account_id +
'/avatar?s=' + this.imageSize;
},
});
})();