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

Have MonthView's + n more label have an event fired with clicked #22

Closed
GoogleCodeExporter opened this issue Sep 9, 2015 · 8 comments
Closed

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create a calendar // view = new Calendar(); ..
2. Set month view // view(CalendarViews.MONTH);
3. Add more than one appoints on a given day

What is the expected output? What do you see instead?

The "+ n more" label is a clickable link with a callback I can implement some 
behavior with

What version of the product are you using? On what operating system?

gwt-cal-0.9.0-beta1.jar on osx

Please provide any additional information below.

snippet from MonthView.java

if (exceedMaxAppointmentsPerCell(maxMultiDay, i)) {

// either make this a link or add a click listener with a callback that the 
client can handle
                        Label more = new 
Label(MESSAGES.monthView_MoreAppointmentsInDay(count - i));
                        more.setStyleName(MORE_LABEL_STYLE);
                        placeItemInGrid(more, dayOfWeek, dayOfWeek,
                                weekOfMonth, calculatedCellAppointments);
                        appointmentCanvas.add(more);
                        break;
                    }


Original issue reported on code.google.com by d.tang...@gmail.com on 21 Jan 2010 at 6:09

@GoogleCodeExporter
Copy link
Author

We'll add in an event handler... i'm thinking something like this:

calendar.addDateRequestHandler(new DateRequestHandler<Date>(){
  @Override
  public void onSelection(DateRequestEvent<Date> event) {
    ...
  }
});

The event would get fired when a user "requests" to change the date (hence the 
DateRequestEvent name). In the case of the monthView the user would request to 
change 
the date by clicking the "+ n more" label.

This could also work for an AgendaView. The AgendaView "groups" appointments by 
date. 
So if a user clicks that date, the event could be fired, and the developer 
could 
choose to switch to the DayView for that date (that is how google calendar 
works).

Make sense? Is that what you were thinking?

What about you Carlos?

Original comment by Brad.Ryd...@gmail.com on 21 Jan 2010 at 7:55

  • Changed state: Accepted
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

sounds great

Original comment by d.tang...@gmail.com on 25 Jan 2010 at 1:41

@GoogleCodeExporter
Copy link
Author

Has anyone had a chance to look at this yet?

Original comment by d.tang...@gmail.com on 29 Jan 2010 at 6:01

@GoogleCodeExporter
Copy link
Author

Original comment by Brad.Ryd...@gmail.com on 4 Feb 2010 at 6:33

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

This feature was added in svn. You may want to try it out. See the "Date 
Request Event" 
details in the WIKI
http://code.google.com/p/gwt-cal/wiki/HandlingEvents

Original comment by Brad.Ryd...@gmail.com on 18 Feb 2010 at 10:40

  • Changed state: PendingReview

@GoogleCodeExporter
Copy link
Author

works great! thanks brad.

fyi the  wiki says public void onSelection(DateRequestEvent<Date> event) when 
the signature is actually public 
void onDateRequested(DateRequestEvent<Date> event) 

Original comment by d.tang...@gmail.com on 18 Feb 2010 at 11:42

@GoogleCodeExporter
Copy link
Author

Original comment by Brad.Ryd...@gmail.com on 27 Mar 2010 at 10:46

  • Added labels: Release0.9

@GoogleCodeExporter
Copy link
Author

Original comment by Brad.Ryd...@gmail.com on 12 May 2010 at 7:12

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant