branch feature/pollen-riot-js updated (ef56fe0 -> 3962250)
This is an automated email from the git hooks/post-receive script. New change to branch feature/pollen-riot-js in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git from ef56fe0 ajout menu de création de sondage + amélioration rendu des choix dans les résultats new 3962250 gestion i18n des checkbox :) The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 39622501ffff5e4dcb39d538007ee566b0baaaa0 Author: Tony CHEMIT <dev@tchemit.fr> Date: Wed Feb 1 17:45:21 2017 +0100 gestion i18n des checkbox :) Summary of changes: .../src/main/web/tag/poll/PollChoiceDate.tag | 5 ++-- .../src/main/web/tag/poll/PollChoiceText.tag | 22 ++++++++-------- .../src/main/web/tag/poll/PollSettings.tag | 30 +++++++++++++++++----- 3 files changed, 36 insertions(+), 21 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/pollen-riot-js in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 39622501ffff5e4dcb39d538007ee566b0baaaa0 Author: Tony CHEMIT <dev@tchemit.fr> Date: Wed Feb 1 17:45:21 2017 +0100 gestion i18n des checkbox :) --- .../src/main/web/tag/poll/PollChoiceDate.tag | 5 ++-- .../src/main/web/tag/poll/PollChoiceText.tag | 22 ++++++++-------- .../src/main/web/tag/poll/PollSettings.tag | 30 +++++++++++++++++----- 3 files changed, 36 insertions(+), 21 deletions(-) diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/PollChoiceDate.tag b/pollen-ui-riot-js/src/main/web/tag/poll/PollChoiceDate.tag index 73136a7..9faa89e 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/PollChoiceDate.tag +++ b/pollen-ui-riot-js/src/main/web/tag/poll/PollChoiceDate.tag @@ -70,7 +70,6 @@ this.installBundle(opts.session, "poll_choices"); this.number = parseInt(opts.number); this.mode = opts.mode; - console.info('modeeeeee: ' + this.mode) this.edit = opts.mode == 'create' || opts.mode == 'edit'; this.choice = opts.choice; @@ -98,10 +97,10 @@ } this.on('mount', () => { - if (this.number == 0 || this.edit) { + if (this.number == 0 || this.mode === 'edit') { this.refs.choice.required = "required"; } - if (this.edit) { + if (this.mode === 'edit') { this.refs.edit_choice.classList.add('choice-view'); } }); diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/PollChoiceText.tag b/pollen-ui-riot-js/src/main/web/tag/poll/PollChoiceText.tag index 9b0bc4d..695faad 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/PollChoiceText.tag +++ b/pollen-ui-riot-js/src/main/web/tag/poll/PollChoiceText.tag @@ -46,11 +46,11 @@ <input type="hidden" name="id{number}" value="{choice.id}"> <div class="choice-inputs"> <input type="text" ref="choice" name="choice{number}" value="{choice.choiceValue}" - disabled="{edit && !editing && choice.choiceValue?'disabled':''}" - class="choice-wide {edit && !editing && choice.choiceValue?'choice-disabled':''}"> + disabled="{!edit || (mode==='edit' && !editing && choice.choiceValue)?'disabled':''}" + class="choice-wide" id="choice{number}"> <input type="text" ref="description" name="description{number}" value="{choice.description}" - disabled="{edit && !editing && choice.choiceValue?'disabled':''}" - class="choice-wider {edit && !editing && choice.choiceValue?'choice-disabled':''}"> + disabled="{!edit || (mode==='edit' && !editing && choice.choiceValue)?'disabled':''}" + class="choice-wider"> </div> </div> </div> @@ -60,13 +60,13 @@ this.installBundle(opts.session, "poll_choices"); this.number = parseInt(opts.number); this.mode = opts.mode; - this.edit = opts.mode == 'add' || opts.mode == 'edit'; + this.edit = opts.mode === 'create' || opts.mode === 'edit'; this.choice = opts.choice; this.on('mount', () => { - if (this.number == 0 || this.edit) { + if (this.number == 0 || this.mode==='edit') { this.refs.choice.required = "required"; } - if (this.edit) { + if (this.mode==='edit') { this.refs.edit_choice.classList.add('choice-view'); } }); @@ -160,10 +160,6 @@ align-items: center; } - .choice-disabled { - cursor: not-allowed; - } - .choice-edit { border: 2px solid #13a2ff; } @@ -172,5 +168,9 @@ border: 2px solid white; } + input[disabled=disabled] { + cursor: not-allowed; + } + </style> </PollChoiceText> diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/PollSettings.tag b/pollen-ui-riot-js/src/main/web/tag/poll/PollSettings.tag index b1a50d3..ba7af5a 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/PollSettings.tag +++ b/pollen-ui-riot-js/src/main/web/tag/poll/PollSettings.tag @@ -131,7 +131,7 @@ onclick="{help}"></i></div> <div class="config-description">{__.addChoices}</div> <div class="config-form"> - <div class="checkbox"> + <div class="checkbox {session.locale}"> <input type="checkbox" name="choiceAddAllowed" id="choiceAddAllowed" ref="addChoices" onclick="{toggleChoiceAddAllowed}"> @@ -156,7 +156,7 @@ onclick="{help}"></i></div> <div class="config-description">{__.limitChoices}</div> <div class="config-form"> - <div class="checkbox"> + <div class="checkbox {session.locale}"> <input type="checkbox" name="limitChoices" id="limitChoices" ref="limitChoices" onclick="{toggleLimitChoices}"> <label for="limitChoices"/> @@ -228,7 +228,7 @@ <div class="config-subheader">{__.nav_anonymousVote}<i class="fa fa-info-circle" onclick="{help}"></i></div> <div class="config-description">{__.anonoymousVote}</div> - <div class="config-form checkbox"> + <div class="config-form checkbox {session.locale}"> <input type="checkbox" name="anonymousVoteAllowed" id="anonymousVoteAllowed" ref="anonymousVote"> <label for="anonymousVoteAllowed"/> @@ -261,7 +261,7 @@ <div class="config-subheader">{__.nav_continuousResult}<i class="fa fa-info-circle" onclick="{help}"></i></div> <div class="config-description"> {__.continuousResult}</div> - <div class="config-form checkbox"> + <div class="config-form checkbox {session.locale}"> <input type="checkbox" name="continuousResults" id="continuousResults"> <label for="continuousResults"></label> @@ -314,6 +314,7 @@ </form> <script> + this.session = opts.session; if (opts.form) { this.mode = 'create'; this.form = opts.form; @@ -454,8 +455,16 @@ position: relative; } - .checkbox:before { + .en:before { content: 'Yes'; + } + + .fr:before { + content: 'Oui'; + } + + .checkbox:before { + /*content: 'Yes';*/ position: absolute; top: 12px; left: 13px; @@ -464,8 +473,15 @@ font-size: 16px; } - .checkbox:after { + .en:after { content: 'No'; + } + + .fr:after { + content: 'Non'; + } + + .checkbox:after { position: absolute; top: 12px; left: 64px; @@ -476,7 +492,7 @@ .checkbox label { display: block; - width: 42px; + width: 46px; height: 22px; border-radius: 40px; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm