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

Use ko for progress background color #150

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Use ko for progress background color #150

wants to merge 3 commits into from

Conversation

mtutynina
Copy link
Contributor

resolve #139

Copy link
Contributor

@kant2002 kant2002 left a comment

Choose a reason for hiding this comment

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

Incorrectly understood requirement


constructor(private commandExecutor: ICommandExecutor) {
super();
const self = this;
this.slideWidth = ko.observable(0);
this.isConnectionSlow = ko.observable(false);
this.calculateLandscapeWidth();
this.progressBackgroundColor = ko.observable($(".progress-background").css("background-color"));
Copy link
Contributor

Choose a reason for hiding this comment

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

This value should be taken from configuration. No need to use jQuery.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From what configuration? Do you mean that i should store variable rgba(0,0,0,.75) in appConfig ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, something like that

$(".progress-background").css("background-color", "black");
timeService.setTimeout(() => {
app.processing(false);
$(".progress-background").css("background-color", oldColor);
$(".progress-background").css("background-color", this.progressBackgroundColor());
Copy link
Contributor

Choose a reason for hiding this comment

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

Here should be just updating progressBackgroundColor. No jQuery, Knockout should take care of updates

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So i should change main project then and add style binding for all .progress-background ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes

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.

Use KO variable to control progress background
2 participants