summaryrefslogtreecommitdiff
path: root/js/form
diff options
context:
space:
mode:
Diffstat (limited to 'js/form')
-rwxr-xr-xjs/form/ComboButton.js3
-rwxr-xr-xjs/form/DropDownButton.js3
-rwxr-xr-xjs/form/Select.js7
-rw-r--r--js/form/ValidationMultiSelect.js6
-rw-r--r--js/form/ValidationTextArea.js6
5 files changed, 10 insertions, 15 deletions
diff --git a/js/form/ComboButton.js b/js/form/ComboButton.js
index 2ad4bf123..98386eead 100755
--- a/js/form/ComboButton.js
+++ b/js/form/ComboButton.js
@@ -1,5 +1,4 @@
-/* eslint-disable prefer-rest-params */
-/* global dijit, define */
+/* global define */
define(["dojo/_base/declare", "dijit/form/ComboButton"], function (declare) {
return declare("fox.form.ComboButton", dijit.form.ComboButton, {
startup: function() {
diff --git a/js/form/DropDownButton.js b/js/form/DropDownButton.js
index d5ea39726..60d8e86ef 100755
--- a/js/form/DropDownButton.js
+++ b/js/form/DropDownButton.js
@@ -1,5 +1,4 @@
-/* eslint-disable prefer-rest-params */
-/* global dijit, define */
+/* global define */
define(["dojo/_base/declare", "dijit/form/DropDownButton"], function (declare) {
return declare("fox.form.DropDownButton", dijit.form.DropDownButton, {
startup: function() {
diff --git a/js/form/Select.js b/js/form/Select.js
index 0c73cd52c..c44674e2a 100755
--- a/js/form/Select.js
+++ b/js/form/Select.js
@@ -1,4 +1,3 @@
-/* eslint-disable prefer-rest-params */
/* global define */
// FIXME: there probably is a better, more dojo-like notation for custom data- properties
define(["dojo/_base/declare",
@@ -15,7 +14,7 @@ define(["dojo/_base/declare",
startup: function() {
this.inherited(arguments);
- if (this.attr('data-dropdown-skip-first') == 'true') {
+ if (this.attr('data-dropdown-skip-first') === 'true') {
aspect.before(this, "_loadChildren", () => {
this.options = this.options.splice(1);
});
@@ -25,8 +24,8 @@ define(["dojo/_base/declare",
onItemClick: function(/*item, menu*/) {
//
},
- _setValueAttr: function(/*anything*/ newValue, /*Boolean?*/ priorityChange){
- if (this.attr('data-prevent-value-change') == 'true' && newValue != '')
+ _setValueAttr: function(/*anything*/ newValue, /*Boolean? priorityChange */){
+ if (this.attr('data-prevent-value-change') === 'true' && newValue !== '')
return;
this.inherited(arguments);
diff --git a/js/form/ValidationMultiSelect.js b/js/form/ValidationMultiSelect.js
index 4e7263c61..5a7918271 100644
--- a/js/form/ValidationMultiSelect.js
+++ b/js/form/ValidationMultiSelect.js
@@ -6,12 +6,12 @@ define(["dojo/_base/declare", "dojo/_base/lang", "dijit/form/MultiSelect", ],
function(declare, lang, MultiSelect) {
return declare('fox.form.ValidationMultiSelect', [MultiSelect], {
- constructor: function(params){
+ constructor: function(/* params */) {
this.constraints = {};
this.baseClass += ' dijitValidationMultiSelect';
},
- validate: function(/*Boolean*/ isFocused){
- if (this.required && this.attr('value').length == 0)
+ validate: function(/*Boolean isFocused */) {
+ if (this.required && this.attr('value').length === 0)
return false;
return true;
diff --git a/js/form/ValidationTextArea.js b/js/form/ValidationTextArea.js
index c53260f40..a71a490c1 100644
--- a/js/form/ValidationTextArea.js
+++ b/js/form/ValidationTextArea.js
@@ -1,16 +1,14 @@
// https://stackoverflow.com/questions/19317258/how-to-use-dijit-textarea-validation-dojo-1-9
-/* eslint-disable no-new */
/* global define */
define(["dojo/_base/declare", "dojo/_base/lang", "dijit/form/SimpleTextarea", "dijit/form/ValidationTextBox"],
function(declare, lang, SimpleTextarea, ValidationTextBox) {
return declare('fox.form.ValidationTextArea', [SimpleTextarea, ValidationTextBox], {
- constructor: function(params){
+ constructor: function(/* params */) {
this.constraints = {};
this.baseClass += ' dijitValidationTextArea';
},
- // eslint-disable-next-line no-template-curly-in-string
templateString: "<textarea ${!nameAttrSetting} data-dojo-attach-point='focusNode,containerNode,textbox' autocomplete='off'></textarea>",
validator: function(value, constraints) {
//console.log(this, value, constraints);
@@ -21,7 +19,7 @@ define(["dojo/_base/declare", "dojo/_base/lang", "dijit/form/SimpleTextarea", "d
if (this.validregexp) {
try {
new RegExp("/" + value + "/");
- } catch (e) {
+ } catch {
return false;
}
}