diff options
author | Jimmy Huynh <jimmy.huynh@etu.unistra.fr> | 2021-02-19 15:15:59 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-04-08 23:17:31 +0200 |
commit | 63dddc342e33b8e92ffc95df3768ff6d505a47b7 (patch) | |
tree | b2e67fd9389da70983889556041f1cc4a2d4fcad | |
parent | c35bdeba2069b975ffba283e7b3e93a7651e27bc (diff) |
(+) checkmark on sent users
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
-rw-r--r-- | css/navigation.css | 4 | ||||
-rw-r--r-- | img/checkmark.svg | 1 | ||||
-rw-r--r-- | js/controller/ShareController.js | 2 | ||||
-rw-r--r-- | templates/part.content.php | 5 |
4 files changed, 8 insertions, 4 deletions
diff --git a/css/navigation.css b/css/navigation.css index 5366a9155..2509beecf 100644 --- a/css/navigation.css +++ b/css/navigation.css @@ -109,6 +109,10 @@ background-image: url('../img/twitter.svg') !important; } +.icon-checkmark { + background-image: url('../img/checkmark.svg') !important; +} + .col-4 { -ms-flex: 0 0 33.333333%; flex: 0 0 33.333333%; diff --git a/img/checkmark.svg b/img/checkmark.svg new file mode 100644 index 000000000..3501b5a42 --- /dev/null +++ b/img/checkmark.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" viewBox="0 0 16 16"><path d="m2.35 7.3 4 4l7.3-7.3" stroke="#000" stroke-width="2" fill="none"/></svg> diff --git a/js/controller/ShareController.js b/js/controller/ShareController.js index 29a33141a..b0b199ef9 100644 --- a/js/controller/ShareController.js +++ b/js/controller/ShareController.js @@ -38,7 +38,7 @@ app.controller('ShareController', function (ShareResource, Loading) { if (this.usersSharedArticles[itemId] && this.usersSharedArticles[itemId].includes(userId)) { Loading.setLoading(userId, false); return; - } + } // quick initialization (instead of if (...) : []) this.usersSharedArticles[itemId] = this.usersSharedArticles[itemId] ? this.usersSharedArticles[itemId] : []; diff --git a/templates/part.content.php b/templates/part.content.php index 1e70a80b9..170bc77ad 100644 --- a/templates/part.content.php +++ b/templates/part.content.php @@ -130,12 +130,11 @@ <a class="icon-category-installed pr-3" ng-repeat="user in Share.userList" - ng-click="Share.shareItem(item.id, user.value.shareWith)"> + ng-click="Share.shareItem(item.id, user.value.shareWith)"> {{ user.value.shareWith }} <span class="right" style="margin-top: 1.4em; margin-right: 1em" - ng-class="{'icon-loading-small': App.loading.isLoading(user.value.shareWith)}"> + ng-class="{'icon-loading-small': App.loading.isLoading(user.value.shareWith), 'icon-checkmark': !App.loading.isLoading(user.value.shareWith) && Share.usersSharedArticles[item.id].includes(user.value.shareWith)}"> </span> - <span ng-if="!App.loading.isLoading(user.value.shareWith)">Envoyé.</span> </a> <p class="label-group"> <?php p($l->t('Share on social media')) ?> </p> <div class="row"> |