Skip to content

Commit

Permalink
OK-326 Clean up UI
Browse files Browse the repository at this point in the history
  • Loading branch information
msiukola committed Nov 17, 2023
1 parent 52c573d commit bed645c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
8 changes: 1 addition & 7 deletions src/main/js/directives/migri.html
Expand Up @@ -3,13 +3,7 @@
<strong>{{ localization('migri.otsikko') }}</strong>
</header>
<div ng-bind-html="localization('migri.ohje-teksti')"></div>
<div class="linkki">
<div>
<a class="linkki" href="{{parsedUrl}}" target="_blank">{{localization('migri.linkki-teksti')}}</a>
<p ng-click="constructUrl()">
{{justSomeToken}} {{migriToken}}
</p>
<p ng-click="constructUrl()">
{{parsedUrl}}
</p>
</div>
</div>
13 changes: 2 additions & 11 deletions src/main/js/directives/migri.js
Expand Up @@ -9,18 +9,9 @@ export default function () {
},
template: require('./migri.html'),
link: function (scope, element, attrs) {
console.log('linking', scope);
scope.localization = localize;
scope.justSomeToken = 'c d e f g'
scope.migriTokenParsed = scope.token || 'no token found';
scope.constructUrl = function() {
const base = "https://opintopolkumigri.fi?token=";
const localized = scope.localization('migri.linkki-pohja');
console.log("Getting migri url for base " + (localized || base) + ". Token: " + scope.migriTokenParsed);
scope.parsedUrl = (localized || base) + scope.migriTokenParsed;
return (localized || base) + scope.migriTokenParsed;
}
scope.constructUrl();
scope.tokenParam = scope.token ? "?token=" + scope.token : ""
scope.parsedUrl = scope.localization('migri.linkki-pohja') + scope.tokenParam;
}
}
}

0 comments on commit bed645c

Please sign in to comment.