Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: apply better code styling to few core files #749

Merged
merged 2 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 4 additions & 15 deletions slick.compositeeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@

options = Slick.Utils.extend({}, defaultOptions, options);


function getContainerBox(i) {
var c = containers[i];
var offset = Slick.Utils.offset(c);
Expand All @@ -64,7 +63,6 @@
};
}


function editor(args) {
var editors = [];

Expand Down Expand Up @@ -99,7 +97,6 @@
}, 0);
}


this.destroy = function () {
var idx = 0;
while (idx < editors.length) {
Expand All @@ -108,7 +105,7 @@
}

options.destroy && options.destroy();
editors = [];
editors = [];
};


Expand All @@ -117,7 +114,6 @@
(firstInvalidEditor || editors[0]).focus();
};


this.isValueChanged = function () {
var idx = 0;
while (idx < editors.length) {
Expand All @@ -129,7 +125,6 @@
return false;
};


this.serializeValue = function () {
var serializedValue = [];
var idx = 0;
Expand All @@ -140,7 +135,6 @@
return serializedValue;
};


this.applyValue = function (item, state) {
var idx = 0;
while (idx < editors.length) {
Expand All @@ -158,11 +152,10 @@
}
};


this.validate = function (targetElm) {
this.validate = function (target) {
var validationResults;
var errors = [];
var targetElm = targetElm ? targetElm : null;
var targetElm = target ? target : null;

firstInvalidEditor = null;

Expand Down Expand Up @@ -204,7 +197,7 @@
}
idx++;
}
targetElm = null;
targetElm = null;

if (errors.length) {
return {
Expand All @@ -220,7 +213,6 @@
}
};


this.hide = function () {
var idx = 0;
while (idx < editors.length) {
Expand All @@ -230,7 +222,6 @@
options.hide && options.hide();
};


this.show = function () {
var idx = 0;
while (idx < editors.length) {
Expand All @@ -240,12 +231,10 @@
options.show && options.show();
};


this.position = function (box) {
options.position && options.position(box);
};


init();
}

Expand Down
Loading