sebfz1 / wicket-jquery-ui

jQuery UI & Kendo UI integration in Wicket
http://www.7thweb.net/wicket-jquery-ui/
Other
93 stars 58 forks source link

Scheduler#onNavigate() / is SchedulerViewType the new or previous view? #233

Closed Patrick1701 closed 8 years ago

Patrick1701 commented 8 years ago

Hi Sebastien, what is the meaning of SchedulerViewType on onNavigate(..., SchedulerViewType view).

The new view or the previous view?

Currently it seems it is the previous view.

kind regards Patrick

sebfz1 commented 8 years ago

Hi Patrick, it actually looks like a question! :)

sebfz1 commented 8 years ago

http://docs.telerik.com/kendo-ui/api/javascript/ui/scheduler#events-navigate

e.view String
Name of the view

Well... Not sure it answers your question :/ But my assumption was it's the name of the view we are switching on...

sebfz1 commented 8 years ago

Seems that I did not use that property, but the sender's one. I don't know/remember if there was a reason to this...

CallbackParameter.resolved("view", "e.sender.view().name") };

I will probably correct by updating properties with #getOldView and #getNewView or equivalent...

Patrick1701 commented 8 years ago

Ok, just a short info why I'm interested in the view.

When replacing the Scheduler via target.add(scheduler); to force a rebuild of the grid, I loose the information of the current view and the current date-interval.

So, I try to extend my Scheduler subclass to keep its states, and I will add methods like changeView(...) and changeDate(...) server-side to be able to set the states back. (later I would like to contribute to you, when the methods are finally working)

best regards Patrick

sebfz1 commented 8 years ago

Isn't #refresh enough?

Patrick1701 commented 8 years ago

No, because of the necessary grid rebuild. If you can feature both (keeping the state and rebuilding the grid, when resource selections changed) then I also would prefer refresh(), but currently its not working.

Patrick1701 commented 8 years ago

Good Morning, my last answer wasn't precise enough...

refresh() already rebuilds the grid, when changing a resource (turn on or off for the view) of the current resource list.

But when changing the entire resource list, the rebuild does not work. e.g. when changing from employee resources to room resources.

To achieve this, I need to replace the scheduler. An of call refresh() does not work yet.

Patrick

Patrick1701 commented 8 years ago

Hi Sebastien,

I will probably correct by updating properties with #getOldView and #getNewView or equivalent...

FYI... I'm working on that... need it next. I will do a push request when ready for reviewing...

best regards Patrick

Patrick1701 commented 8 years ago

This issue can be closed, right?

sebfz1 commented 8 years ago

Right, thanks!