-
Notifications
You must be signed in to change notification settings - Fork 2
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
base: master
Are you sure you want to change the base?
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.
Incorrectly understood requirement
js/pages/tablespage.ts
Outdated
|
||
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")); |
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.
This value should be taken from configuration. No need to use jQuery.
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.
From what configuration? Do you mean that i should store variable rgba(0,0,0,.75)
in appConfig ?
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.
Yes, something like that
js/pages/tablespage.ts
Outdated
$(".progress-background").css("background-color", "black"); | ||
timeService.setTimeout(() => { | ||
app.processing(false); | ||
$(".progress-background").css("background-color", oldColor); | ||
$(".progress-background").css("background-color", this.progressBackgroundColor()); |
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.
Here should be just updating progressBackgroundColor. No jQuery, Knockout should take care of updates
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.
So i should change main project then and add style binding for all .progress-background ?
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.
Yes
resolve #139