branch develop updated (79d3dca7 -> 0367c95b)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git from 79d3dca7 Merge branch 'feature/180_Documentation_fonctionnelle' into 'develop' new 0367c95b correction de la getion des input de type date, time et datetime (ref #178) 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 0367c95b93b46d14f8a31d33258b3487c2d8f136 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Mon Jan 8 16:25:10 2018 +0100 correction de la getion des input de type date, time et datetime (ref #178) Summary of changes: pollen-ui-riot-js/package.json | 2 +- pollen-ui-riot-js/src/main/web/js/Session.js | 1 + .../src/main/web/tag/components/date-time-picker.tag.html | 10 +++++----- .../src/main/web/tag/components/time-picker.tag.html | 12 ++++++------ 4 files changed, 13 insertions(+), 12 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 develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 0367c95b93b46d14f8a31d33258b3487c2d8f136 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Mon Jan 8 16:25:10 2018 +0100 correction de la getion des input de type date, time et datetime (ref #178) --- pollen-ui-riot-js/package.json | 2 +- pollen-ui-riot-js/src/main/web/js/Session.js | 1 + .../src/main/web/tag/components/date-time-picker.tag.html | 10 +++++----- .../src/main/web/tag/components/time-picker.tag.html | 12 ++++++------ 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/pollen-ui-riot-js/package.json b/pollen-ui-riot-js/package.json index 797ba568..75579d07 100644 --- a/pollen-ui-riot-js/package.json +++ b/pollen-ui-riot-js/package.json @@ -53,6 +53,6 @@ "remarkable": "^1.7.1", "riot": "^3.6.1", "riot-route": "^3.1.2", - "tooltip.js":"^1.1.7" + "tooltip.js": "^1.1.7" } } diff --git a/pollen-ui-riot-js/src/main/web/js/Session.js b/pollen-ui-riot-js/src/main/web/js/Session.js index d4e54197..e4fe09e0 100644 --- a/pollen-ui-riot-js/src/main/web/js/Session.js +++ b/pollen-ui-riot-js/src/main/web/js/Session.js @@ -81,6 +81,7 @@ class Session { input.setAttribute("type", "datetime"); input.setAttribute("value", notADateValue); this.datetimeInputSupported = (input.value !== notADateValue); + logger.info("support input date : " + this.dateInputSupported + ", time : " + this.timeInputSupported + ", datetime : " + this.datetimeInputSupported); bus.on("unauthorize", () => { if (this.user !== null) { diff --git a/pollen-ui-riot-js/src/main/web/tag/components/date-time-picker.tag.html b/pollen-ui-riot-js/src/main/web/tag/components/date-time-picker.tag.html index e0bcc488..2fedb988 100644 --- a/pollen-ui-riot-js/src/main/web/tag/components/date-time-picker.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/components/date-time-picker.tag.html @@ -8,12 +8,12 @@ it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. #L% @@ -22,7 +22,7 @@ require("./date-picker.tag.html"); require("./time-picker.tag.html"); <date-time-picker> - <div if={!session.dateInputSupported} class="c-input-group date-time-field"> + <div if={!session.dateTimeInputSupported} class="c-input-group date-time-field"> <date-picker class="o-field o-field--icon-left" inputclass="c-field o-field--icon-left" iconleftclass="calendar" @@ -45,7 +45,7 @@ require("./time-picker.tag.html"); <i class="fa fa-fw fa-times"></i> </a> </div> - <input if={session.dateInputSupported} + <input if={session.dateTimeInputSupported} class="c-field date-time-field" ref="dateInputSupportedField" value="{formatDateTimeForInput(this.opts.datetime)}" @@ -65,7 +65,7 @@ require("./time-picker.tag.html"); this.time = {time: this.opts.datetime ? moment(this.opts.datetime) : undefined}; this.getValue = () => { - if (this.session.dateInputSupported) { + if (this.session.dateTimeInputSupported) { return moment(this.refs.dateInputSupportedField.value).valueOf(); } if (!this.date.date || !this.time.time) { diff --git a/pollen-ui-riot-js/src/main/web/tag/components/time-picker.tag.html b/pollen-ui-riot-js/src/main/web/tag/components/time-picker.tag.html index 5bf615a3..e683caa2 100644 --- a/pollen-ui-riot-js/src/main/web/tag/components/time-picker.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/components/time-picker.tag.html @@ -8,12 +8,12 @@ it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. #L% @@ -91,9 +91,9 @@ this.update(); }); - this.hourChanged = (e) => { + this.hourChanged = () => { this.initTime(); - let hour = parseInt(this.refs.hourInput.value); + let hour = parseInt(this.refs.hourInput.value, 10); if (!isNaN(hour)) { this.opts.time.time.hours(hour); if (this.opts.onchange) { @@ -102,9 +102,9 @@ } }; - this.minuteChanged = (e) => { + this.minuteChanged = () => { this.initTime(); - let minute = parseInt(this.refs.minuteInput.value); + let minute = parseInt(this.refs.minuteInput.value, 10); if (!isNaN(minute)) { this.opts.time.time.minutes(minute); if (this.opts.onchange) { -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm