Remove url-encoding-behavior and move methods to url-util
Change-Id: Iee27d48c1ce25bde3b8a1a9130b2fd1f617648b7
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access.js b/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access.js
index 8308504..0fec690 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access.js
+++ b/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access.js
@@ -25,9 +25,12 @@
import {LegacyElementMixin} from '@polymer/polymer/lib/legacy/legacy-element-mixin.js';
import {PolymerElement} from '@polymer/polymer/polymer-element.js';
import {htmlTemplate} from './gr-repo-access_html.js';
-import {getBaseUrl} from '../../../utils/url-util.js';
+import {
+ encodeURL,
+ getBaseUrl,
+ singleDecodeURL,
+} from '../../../utils/url-util.js';
import {AccessBehavior} from '../../../behaviors/gr-access-behavior/gr-access-behavior.js';
-import {URLEncodingBehavior} from '../../../behaviors/gr-url-encoding-behavior/gr-url-encoding-behavior.js';
import {GerritNav} from '../../core/gr-navigation/gr-navigation.js';
const Defs = {};
@@ -85,7 +88,6 @@
*/
class GrRepoAccess extends mixinBehaviors( [
AccessBehavior,
- URLEncodingBehavior,
], GestureEventListeners(
LegacyElementMixin(
PolymerElement))) {
@@ -395,11 +397,9 @@
};
const originalInheritsFromId = this._originalInheritsFrom ?
- this.singleDecodeURL(this._originalInheritsFrom.id) :
- null;
+ singleDecodeURL(this._originalInheritsFrom.id) : null;
const inheritsFromId = this._inheritsFrom ?
- this.singleDecodeURL(this._inheritsFrom.id) :
- null;
+ singleDecodeURL(this._inheritsFrom.id) : null;
const inheritFromChanged =
// Inherit from changed
@@ -514,7 +514,7 @@
_computeParentHref(repoName) {
return getBaseUrl() +
- `/admin/repos/${this.encodeURL(repoName, true)},access`;
+ `/admin/repos/${encodeURL(repoName, true)},access`;
}
}