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

@sandipbhuyan sandipbhuyan 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']));
Copy link
Contributor

@imphil imphil Aug 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.)

Loading

@imphil
Copy link
Contributor

@imphil imphil 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.

Loading

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 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
Labels
Projects
No open projects
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants