Switched disallow maybe to allow.

This commit is contained in:
dartcafe 2018-12-01 12:02:58 +01:00
Родитель 94af7c7fed
Коммит a88e316d67
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: CCE73CEF3035D3C8
8 изменённых файлов: 41 добавлений и 37 удалений

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

@ -32,7 +32,11 @@
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
inkscape:current-layer="svg4">
<inkscape:grid
type="xygrid"
id="grid836" />
</sodipodi:namedview>
<metadata
id="metadata10">
<rdf:RDF>
@ -49,31 +53,31 @@
id="defs8" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:14.98380184px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffc107;fill-opacity:1;stroke:none;stroke-width:1.02162278;"
x="0.77818924"
y="12.577933"
style="font-style:normal;font-weight:normal;font-size:15.00649071px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffc107;fill-opacity:1;stroke:none;stroke-width:1.02316976"
x="-0.80368948"
y="12.559312"
id="text818"
transform="scale(1.0918594,0.91586886)"><tspan
transform="scale(1.09019,0.9172713)"><tspan
sodipodi:role="line"
id="tspan816"
x="0.77818924"
y="12.577933"
style="font-size:12.25947285px;stroke-width:1.02162278;fill:#ffc107;fill-opacity:1;">(</tspan></text>
<path
inkscape:connector-curvature="0"
d="M 10.763664,5.3910095 7.1556639,8.8052614 5.0868428,6.86113 4.0524322,7.8311347 7.1556639,10.745958 11.811974,6.3733798 10.763664,5.3896356 Z"
id="path2-4"
style="fill:#ffc107;fill-opacity:1;stroke-width:0.70891041" />
x="-0.80368948"
y="12.559312"
style="font-size:14.66666698px;fill:#ffc107;fill-opacity:1;stroke-width:1.02316976">(</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:40.86491394px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffc107;fill-opacity:1;stroke:none;stroke-width:1.02162278;"
x="9.0928421"
y="12.577932"
style="font-style:normal;font-weight:normal;font-size:40.9271431px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffc107;fill-opacity:1;stroke:none;stroke-width:1.02317846"
x="9.9630442"
y="12.478945"
id="text828"
transform="scale(1.0918594,0.91586885)"><tspan
transform="scale(1.0901993,0.91726348)"><tspan
sodipodi:role="line"
id="tspan826"
x="9.0928421"
y="12.577932"
style="font-size:12.2594738px;stroke-width:1.02162278;fill:#ffc107;fill-opacity:1;">)</tspan></text>
x="9.9630442"
y="12.478945"
style="font-size:14.66666698px;fill:#ffc107;fill-opacity:1;stroke-width:1.02317846">)</tspan></text>
<path
inkscape:connector-curvature="0"
d="m 11.924,4.0659992 -4.9320001,4.97 -2.828,-2.83 L 2.75,7.6179992 6.9919999,11.861 13.357,5.4959992 l -1.433,-1.432 z"
id="path816"
style="fill:#ffc107;fill-opacity:1" />
</svg>

До

Ширина:  |  Высота:  |  Размер: 2.8 KiB

После

Ширина:  |  Высота:  |  Размер: 2.8 KiB

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

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

@ -5,7 +5,7 @@ var newUserAnswers = [];
var maxVotes = 0;
var valuesChanged = false;
var maybeAllowed = true;
var maybeAllowed = false;
var tzOffset = new Date().getTimezoneOffset();
// HTML template for new comment (handlebars.js)
@ -125,8 +125,8 @@ $(document).ready(function () {
// count how many times in each date
updateBest();
if ($('#app-content').hasClass('maybedisallowed')) {
maybeAllowed = false;
if ($('#app-content').hasClass('maybeallowed')) {
maybeAllowed = true;
}
if (window.innerWidth > 1024) {

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

@ -290,7 +290,7 @@ class ApiController extends Controller {
'expirationDate' => $poll->getExpire(),
'isAnonymous' => $poll->getIsAnonymous(),
'fullAnonymous' => $poll->getFullAnonymous(),
'disallowMaybe' => $poll->getDisallowMaybe()
'allowMaybe' => $poll->getAllowMaybe()
],
'options' => [
'pollDates' => [],
@ -324,7 +324,7 @@ class ApiController extends Controller {
$newEvent->setType($event['type']);
$newEvent->setIsAnonymous($event['isAnonymous']);
$newEvent->setFullAnonymous($event['fullAnonymous']);
$newEvent->setDisallowMaybe($event['disallowMaybe']);
$newEvent->setAllowMaybe($event['allowMaybe']);
if ($event['access'] === 'select') {
$shareAccess = '';

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

@ -47,8 +47,8 @@ use OCP\AppFramework\Db\Entity;
* @method void setIsAnonymous(integer $value)
* @method integer getFullAnonymous()
* @method void setFullAnonymous(integer $value)
* @method integer getDisallowMaybe()
* @method void setDisallowMaybe(integer $value)
* @method integer getAllowMaybe()
* @method void setAllowMaybe(integer $value)
*/
class Event extends Model {
protected $type;
@ -61,7 +61,7 @@ class Event extends Model {
protected $hash;
protected $isAnonymous;
protected $fullAnonymous;
protected $disallowMaybe;
protected $allowMaybe;
/**
* Event constructor.
@ -70,6 +70,6 @@ class Event extends Model {
$this->addType('type', 'integer');
$this->addType('isAnonymous', 'integer');
$this->addType('fullAnonymous', 'integer');
$this->addType('disallowMaybe', 'integer');
$this->addType('allowMaybe', 'integer');
}
}

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

@ -109,7 +109,7 @@ class Version0009Date20181125061900 extends SimpleMigrationStep {
'notnull' => false,
'default' => 0,
]);
$table->addColumn('disallow_maybe', Type::INTEGER, [
$table->addColumn('allow_maybe', Type::INTEGER, [
'notnull' => false,
'default' => 0
]);

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

@ -127,8 +127,8 @@
<div class="configBox ">
<label class="title icon-settings">{{ t('polls', 'Poll configurations') }}</label>
<input :disabled="protect" id="disallowMaybe" v-model="poll.event.disallowMaybe"type="checkbox" class="checkbox" />
<label for="disallowMaybe">{{ t('polls', 'Disallow maybe vote') }}</label>
<input :disabled="protect" id="allowMaybe" v-model="poll.event.allowMaybe"type="checkbox" class="checkbox" />
<label for="allowMaybe">{{ t('polls', 'Allow "maybe" vote') }}</label>
<input :disabled="protect" id="anonymous" v-model="poll.event.isAnonymous"type="checkbox" class="checkbox" />
<label for="anonymous">{{ t('polls', 'Anonymous poll') }}</label>
@ -211,7 +211,7 @@ export default {
expired: false,
isAnonymous: false,
fullAnonymous: false,
disallowMaybe: false,
allowMaybe: false,
owner: undefined
},
options: {

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

@ -56,10 +56,10 @@
$isAnonymous = $poll->getIsAnonymous() && $userId !== $poll->getOwner();
$hideNames = $poll->getIsAnonymous() && $poll->getFullAnonymous();
if ($poll->getDisallowMaybe()) {
$maybe = 'maybedisallowed';
} else {
if ($poll->getAllowMaybe()) {
$maybe = 'maybeallowed';
} else {
$maybe = 'maybedisallowed';
}
$access = $poll->getAccess();
$updatedPoll = false;