google-code-export / gwt-cal

Automatically exported from code.google.com/p/gwt-cal
1 stars 0 forks source link

Month View can't seem to disable drag-n-drop. #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
    Calendar myCal = new Calendar() ;
    myCal.setView(CalendarViews.MONTH) ;
    myCal.setHeight("400px") ;
    myCal.setWidth("500px") ;
    CalendarSettings settings = new CalendarSettings();
    settings.setEnableDragDrop(false) ;
    myCal.setSettings(settings);
    myCal.addOpenHandler(this);
    Appointment appt = createAppointment() ;
    myCal.addAppointment(appt) ;
    mainPanel.add(myCal);

What is the expected output? What do you see instead?
Drag-n-Drop is still enabled.  Expected it not to allow moving of the 
appointments.

What version of the product are you using? On what operating system?
gwt-cal-0.9.0-beta1.jar, Firefox Mac OS-X

Original issue reported on code.google.com by jstap...@gmail.com on 14 Feb 2010 at 4:57

GoogleCodeExporter commented 9 years ago

Original comment by carlos.m...@gmail.com on 14 Feb 2010 at 6:51

GoogleCodeExporter commented 9 years ago
I just started looking into this issue. I hope I can provide some sort of 
solution
before EOD.
Thanks,

Carlos

Original comment by carlos.m...@gmail.com on 14 Feb 2010 at 10:02

GoogleCodeExporter commented 9 years ago
Hey Carlos, check out issues 21, I think it was fixed in revision 228

http://code.google.com/p/gwt-cal/source/diff?
spec=svn228&r=228&format=side&path=/branches/version-0.9/gwt-
cal/src/main/java/com/bradrydzewski/gwt/calendar/client/monthview/MonthView.java

Original comment by Brad.Ryd...@gmail.com on 15 Feb 2010 at 2:25

GoogleCodeExporter commented 9 years ago
I think you are missing the following code:
calendar.setSettings(settings);

The CalendarSettings need to be provided to the Calendar, which I don't see in 
the 
code snippet you provided. I tested locally just to be sure, and drag/drop is 
disabled expected.

One important note - if you change any CalendarSettings *after* appointments 
have 
already been rendered, you will need to refresh the calendar for the settings 
to take 
effect.

Original comment by Brad.Ryd...@gmail.com on 15 Feb 2010 at 5:03

GoogleCodeExporter commented 9 years ago
Its in the snibbit i provided. Rev 228 was timestamped after the released 
gwt-cal-0.9.0-beta1.jar

Original comment by jstap...@gmail.com on 15 Feb 2010 at 5:43

GoogleCodeExporter commented 9 years ago
good catch - we will have beta2 download available some time in the next week.

Original comment by Brad.Ryd...@gmail.com on 15 Feb 2010 at 5:56