Skip to content

Conversation

@polesye
Copy link
Contributor

@polesye polesye commented Dec 6, 2013

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.

@ghost ghost assigned Lyla-Fischer Dec 6, 2013
Copy link

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.

@jmclaus
Copy link

jmclaus commented Dec 10, 2013

@ Nice work. 👍

@auraz
Copy link
Contributor

auraz commented Dec 11, 2013

@polesye Found some strange behavior.
If I enter 80000 -> 00:00:20, but I should get 22:13:20.
If I enter -100 -> 00:00:40, but I should get ? maybe 00:01:40? or 00:00:00, same for -100:-10.
If I enter 99:99 -> 00:40:39, but I should get '1:40:39'
Please test more extensively :)

@polesye
Copy link
Contributor Author

polesye commented Dec 12, 2013

@auraz Thanks.
I have made fix.
All yours examples were added to the unit tests and now they are passed.

@auraz
Copy link
Contributor

auraz commented Dec 12, 2013

👍

@Lyla-Fischer
Copy link

👍

@polesye
Copy link
Contributor Author

polesye commented Dec 16, 2013

@jmclaus , @auraz I have made refactoring in ce02950. Please review it.

Copy link
Contributor

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@auraz
Copy link
Contributor

auraz commented Dec 17, 2013

👍

@jmclaus
Copy link

jmclaus commented Dec 18, 2013

@polesye 👍

polesye added a commit that referenced this pull request Dec 18, 2013
Video: Update behavior of start/end time fields.
@polesye polesye merged commit 7925ca1 into master Dec 18, 2013
@polesye polesye deleted the anton/transcripts-start-end-time branch December 18, 2013 10:09
jenkins-ks pushed a commit to nttks/edx-platform that referenced this pull request Jun 23, 2017
jenkins-ks pushed a commit to nttks/edx-platform that referenced this pull request Jun 23, 2017
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants