Skip to content

Video: Update behavior of start/end time fields. - #1873

Merged
polesye merged 1 commit into
masterfrom
anton/transcripts-start-end-time
Dec 18, 2013
Merged

Video: Update behavior of start/end time fields.#1873
polesye merged 1 commit into
masterfrom
anton/transcripts-start-end-time

Conversation

@polesye

@polesye polesye commented Dec 6, 2013

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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

jmclaus commented Dec 10, 2013

Copy link
Copy Markdown

@ Nice work. 👍

@auraz

auraz commented Dec 11, 2013

Copy link
Copy Markdown
Contributor

@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

polesye commented Dec 12, 2013

Copy link
Copy Markdown
Contributor Author

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

@auraz

auraz commented Dec 12, 2013

Copy link
Copy Markdown
Contributor

👍

@Lyla-Fischer

Copy link
Copy Markdown

👍

@polesye

polesye commented Dec 16, 2013

Copy link
Copy Markdown
Contributor Author

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

Comment thread cms/static/js/views/metadata.js Outdated

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

@auraz

auraz commented Dec 17, 2013

Copy link
Copy Markdown
Contributor

👍

@jmclaus

jmclaus commented Dec 18, 2013

Copy link
Copy Markdown

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

4 participants