-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: Week.options.hourStart, Week.options.hourEnd (resolves: #175) #189
Conversation
examples/js/default.js
Outdated
@@ -42,7 +42,9 @@ | |||
}], | |||
week: { | |||
showTimezoneCollapseButton: true, | |||
timezonesCollapsed: false | |||
timezonesCollapsed: false, | |||
hourStart: 8, |
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.
Remove using this options in example code.
src/js/controller/viewMixin/week.js
Outdated
* @returns {object} view model for time part. | ||
*/ | ||
getViewModelForTimeView: function(start, end, time) { | ||
getViewModelForTimeView: function(start, end, time, options) { |
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.
Make weekly options object separate with this module. This function doesn't need to know all options of weekly, just only to know hourStart, hourEnd.
src/js/view/template/week/time.hbs
Outdated
{{#if model.isFocused}} | ||
color: #ffffff; background-color:{{model.color}}; border-color:{{model.color}}; | ||
{{else}} | ||
color:{{model.color}}; background-color:{{model.bgColor}}; border-color:{{model.borderColor}}; | ||
{{/if}} | ||
{{model.customStyle}}" | ||
>{{{time-tmpl model}}}</div> | ||
{{#unless cropped}}<div class="{{CSS_PREFIX}}time-resize-handle handle-x" style="margin-left: {{@root.styles.paddingLeft}};"> </div>{{/unless}} | ||
{{#unless isReadOnly}}<div class="{{CSS_PREFIX}}time-resize-handle handle-x" style="margin-left: {{@root.styles.paddingLeft}};"> </div>{{/unless}} |
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.
If the end time is over 24:00, the resize handle
should be hidden.
src/js/view/week/time.js
Outdated
* @returns {object} bound object for supplied view model. | ||
*/ | ||
Time.prototype.getScheduleViewBound = function(viewModel, options) { | ||
var X = this._getScheduleViewBoundX(viewModel, options); |
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 variable name should be lower case. Our eslint rule must be needed update.
src/js/view/week/time.js
Outdated
Time.prototype.getScheduleViewBound = function(viewModel, options) { | ||
var X = this._getScheduleViewBoundX(viewModel, options); | ||
var Y = this._getScheduleViewBoundY(viewModel, options); | ||
var isReadOnly = util.pick(viewModel, 'model', 'isReadOnly') || options.isReadOnly || false; |
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.
Is it necessary to check whether options.isReadOnly
is undefined?
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.
I leave some comments.
All schedules should be shown in weekly if |
232d7f6
to
59d3126
Compare
59d3126
to
a98b35d
Compare
Please check if the PR fulfills these requirements
fix #xxx[,#xxx]
, where "xxx" is the issue number)Description
fixes: #175
Thank you for your contribution to TOAST UI product. 🎉 😘 ✨