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

[3.x] Add visible character count info and limit #187

Merged
merged 4 commits into from
Jul 16, 2020

Conversation

Erikmitk
Copy link
Member

I added a bit of HTML/CSS/JS to visualize a character counter on textareas when a fixed character limit is set.

CleanShot 2020-07-15 at 14 49 44

This PR closes #186.

@Erikmitk Erikmitk changed the title Add visible character count info and limit [3.x] Add visible character count info and limit Jul 15, 2020
@Erikmitk Erikmitk requested a review from claussni July 15, 2020 13:53
@claussni claussni self-assigned this Jul 16, 2020
Copy link
Member

@claussni claussni left a comment

Choose a reason for hiding this comment

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

Nicely done. I can even understand this without knowing JS/CSS to the detail. There is another Javascript file for the Backend (QucosaBE.js). I think the limit function needs to be added there too. Otherwise the counter will not work in the backoffice.

Slight tweak in the JS to set the character count initially.

The backend already has text in the fields so the count should be set earlier. I changed this for the frontend as well to keep it consistent.
@Erikmitk
Copy link
Member Author

I think the limit function needs to be added there too. Otherwise the counter will not work in the backoffice.

Absolutely right. I added it to the backend JS as well. I slightly tweaked the JS code for that to set the character count earlier. The backend already has (possible) content in the fields so the value has to be set before entering additional input.

(I adjusted the frontend JS for consistency.)

@claussni claussni merged commit 29fb987 into kitodo:3.x Jul 16, 2020
@Erikmitk Erikmitk deleted the feature/character_limit branch November 2, 2021 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants