Merge branch 'develop-0.9' into adminAccess

This commit is contained in:
dartcafe 2018-11-02 15:03:47 +01:00
Родитель 641fc46c51 12ab21afcf
Коммит 5513e9d23a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: CCE73CEF3035D3C8
2 изменённых файлов: 41 добавлений и 41 удалений

Просмотреть файл

@ -23,24 +23,24 @@
<template>
<div>
<h2> {{ t('polls', 'Share with') }}</h2>
<multiselect
v-model="shares"
:options="users"
<multiselect
v-model="shares"
:options="users"
:option-height=32
:multiple="true"
:close-on-select="false"
:clear-on-select="false"
:preserve-search="true"
label="displayName"
track-by="id"
:options-limit="20"
id="ajax"
:multiple="true"
:close-on-select="false"
:clear-on-select="false"
:preserve-search="true"
label="displayName"
track-by="id"
:options-limit="20"
id="ajax"
@search-change="loadUsersAsync"
@close="updateShares"
:loading="isLoading"
:internal-search="false"
:hide-selected="true"
:searchable="true"
:hide-selected="true"
:searchable="true"
:preselect-first="true"
:placeholder="placeholder">
<template slot="selection" slot-scope="{ values, search, isOpen }">
@ -54,12 +54,12 @@
</div>
</template>
</multiselect>
<transition-group tag="ul" v-bind:css="false" class="shared-list">
<li v-for="(item, index) in sortedShares"
v-bind:key="item.displayName"
<li v-for="(item, index) in sortedShares"
v-bind:key="item.displayName"
v-bind:data-index="index">
<user-div :user-id="item.id" :type="item.type" :hide-names="hideNames"></user-div>
<user-div :user-id="item.id" :display-name="item.displayName" :type="item.type" :hide-names="hideNames"></user-div>
<div class="options">
<a @click="removeShare(index, item)" class="icon icon-delete svg delete-poll"></a>
</div>
@ -76,9 +76,9 @@
components: {
Multiselect
},
props: ['placeholder', 'activeShares','hideNames'],
data: function () {
return {
shares: [],
@ -91,22 +91,22 @@
}
}
},
computed: {
sortedShares: function() {
return this.shares.sort(this.sortByDisplayname)
}
},
methods: {
removeShare: function (index, item){
this.$emit('remove-share', item)
},
updateShares: function (){
this.$emit('update-shares', this.shares)
},
loadUsersAsync: function (query) {
this.isLoading = false
this.siteUsersListOptions.query = query
@ -118,13 +118,13 @@
console.log(error.response)
})
},
sortByDisplayname: function (a, b) {
if (a.displayName.toLowerCase() < b.displayName.toLowerCase()) return -1
if (a.displayName.toLowerCase() > b.displayName.toLowerCase()) return 1
return 0
}
},
watch: {
activeShares(value) {
@ -141,19 +141,19 @@
flex-wrap: wrap;
justify-content: flex-start;
padding-top: 8px;
> li {
display: flex;
}
}
.options {
display: flex;
position: relative;
top: -12px;
left: -13px;
}
div, select {
&.multiselect:not(.multiselect-vue), &.multiselect:not(.multiselect-vue) {
max-width: unset;
@ -168,7 +168,7 @@
.option__desc {
flex-grow: 1;
}
.multiselect__option--highlight {
background: #41b883;

Просмотреть файл

@ -32,7 +32,7 @@
if (!User::isLoggedIn()) {
Util::addStyle('polls', 'public');
}
Util::addScript('polls', 'app');
Util::addScript('polls', 'vote');
@ -111,7 +111,7 @@
<div id="app-content" class="<?php p($statusClass . ' ' . $pollTypeClass . ' ' . $maybe); ?>">
<div id="controls" class="controls">
<div id="breadcrump" class="breadcrump">
<?php if (User::isLoggedIn()) : ?>
@ -146,7 +146,7 @@
</span>
<?php if ($expired) { print_unescaped('<span class="' . $statusClass . '">' . $l->t('The poll expired on %s. Voting is disabled, but you can still comment.', array(date('d.m.Y H:i', strtotime($poll->getExpire())))) . '</span>'); }?>
</div>
<div class="table">
<ul class="flex-row header" >
<?php
@ -178,7 +178,7 @@
?>
</li>
</ul>
<ul class="flex-column table-body">
<?php
if ($votes !== null) {
@ -289,12 +289,12 @@
}
}
}
if ($class === 'unvoted') {
$dataUnvoted = $l->t('New');
$updatedPoll = true;
}
print_unescaped('<li id="voteid_' . $optionElement->getId() . '" class="flex-column active poll-cell ' . $class . '" data-value="' . $optionElement->getPollOptionText() . '" data-unvoted="' . $dataUnvoted . '"></li>');
$i_tot++;
@ -311,7 +311,7 @@
<p> <?php p($l->t('This poll was updated since your last visit. Please check your votes.')); ?></p>
</div>
<?php endif; ?>
<div class="submitPoll flex-row">
<div>
<form class="finish_vote" name="finish_vote" action="<?php p($urlGenerator->linkToRoute('polls.page.insert_vote')); ?>" method="POST">
@ -336,7 +336,7 @@
</div>
</div>
<div id="app-sidebar" class="detailsView scroll-container disappear">
<div class="close flex-row">
<a id="closeDetails" class="close icon-close has-tooltip-bottom" title="<?php p($l->t('Close details')); ?>" href="#" alt="<?php $l->t('Close'); ?>"></a>
@ -411,17 +411,17 @@
</p>
</div>
<?php endif; ?>
<ul class="tabHeaders">
<li class="tabHeader selected" data-tabid="commentsTabView" data-tabindex="0">
<a href="#"><?php p($l->t('Comments')); ?></a>
</li>
</ul>
<div class="tabsContainer">
<div id="commentsTabView" class="tab commentsTabView">
<div class="newCommentRow comment new-comment">
<?php if (User::isLoggedIn()) : ?>
<div class="authorRow user-cell flex-row">
<div class="avatar has-tooltip" title="<?php p($userId)?>"></div>
@ -497,5 +497,5 @@
</div>
</div>
</div>
<form id="form_delete_poll" name="form_delete_poll" action="<?php p($urlGenerator->linkToRoute('polls.page.delete_poll')); ?>" method="POST"></form>