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

Resolve classification validation bug #274

Merged
merged 1 commit into from Aug 6, 2018

Conversation

@sandipbhuyan
Copy link
Collaborator

commented Aug 6, 2018

Resolves #263

for (var i = 0; i < classificationDetails.length; i++) {
if (classificationDetails[i]['parentId'] === id) {
if (increase === false) {
var category = $('#category-' + count).clone().appendTo('.classification-system');
count++;
category.attr('id', 'category-' + count).empty().append('<option value="NULL">select a category</option>');
$('#category-' + count).append($('<option>').val(classificationDetails[i]['name']).html(classificationDetails[i]['name']));
$('#category-' + count).append($('<option>').val(classificationDetails[i]['name']).html(classificationDetails[i]['name'])
.attr('data-id',classificationDetails[i]['id']));

This comment has been minimized.

Copy link
@imphil

imphil Aug 6, 2018

Contributor

Please reduce the length of these lines to a sane ~ 80-100 characters, it's not even fitting the GitHub diff view, which makes review annoying.
And add a space after the ",", e.g. .attr('data-id', classificationDetails[i]['id'])

(This also applies to other places in this file, please fix accordingly.)

@imphil

This comment has been minimized.

Copy link
Contributor

commented Aug 6, 2018

Thanks. Please combine the two commits and give a suitable commit message which includes the solved bug number, what the problem was, and how you solved it. You can force-push to the branch in this PR to update it.

Improve javascript for displaying correct classification hierarchy
Modified the javascript for displaying correct child categories while specifying them for a project for the prevention of invalid classification validation messages.

@sandipbhuyan sandipbhuyan force-pushed the sandipbhuyan:classification-validation branch from 48f3830 to b1ac632 Aug 6, 2018

@imphil imphil merged commit 35ae81c into librecores:master Aug 6, 2018

Improve the LibreCores.org in terms of discoverability automation moved this from Review to Done Aug 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
2 participants
You can’t perform that action at this time.