-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Video: Update behavior of start/end time fields. #1873
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@polesye Please use 4 spaces indentation throughout the file.
|
@ Nice work. 👍 |
|
@polesye Found some strange behavior. |
|
@auraz Thanks. |
|
👍 |
|
👍 |
cms/static/js/views/metadata.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not it actually look prettier?
var list = value.replace(/\s+/g, '').split(':');
list = _.map(list, function(num) { return Math.max(0, parseInt(num) || 0) } );
seconds = list.pop() + _.reduce(list, function(memo, num) {return memo + num * 60;}, 0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
👍 |
|
@polesye 👍 |
Video: Update behavior of start/end time fields.
…openedx#1974) * Fix review. add custom logo settings openedx#1873 * Fix bugs. add custom logo settings openedx#1972 * Fix bugs. add custom logo settings openedx#1971
BLD-506.
It should be possible to enter the start/end time as a string HH:MM:SS, and only have the field adjust after the user clicks away. If the user enters something like "1:35", we would interpret that as "00:01:35" after the user clicks away. However, while the user is entering text into the field, it should show the keys that the user was pressing. If the user enters something completely invalid, reset to 00:00:00.
@jmclaus, @auraz please review.