Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    #16
    1) This was another IE-specific issue and has been addressed for builds dated February 27

    2) We don't see this - but the fix for 1) above involved a fix to getDateFromPoint() with no parameters - so please retest this with tomorrow's build

    3) This descriptions is a bit confused, but it sounds like you have an eventClick() override which is, in some cases, not returning a value.

    The code as-is requires eventClick() to return true if you want the default behavior (in this case, showing the event dialog).

    We've altered this for tomorrow's build, so that only a specific return value of false will now cancel the default behavior

    We don't understand what you mean about z-ordering - we have never supported selection of event windows, or automatically bringing them to the front on click - but you can do it yourself, if you like, by calling bringToFront() on the event when it gets clicked on
    Last edited by Isomorphic; 26 Feb 2014, 03:28.

    Comment


      #17
      I would have tried, but still can't see 4.1d build for Feb 27.

      Comment


        #18
        v9.1p_2014-02-28/PowerEdition Deployment (built 2014-02-28)

        1) vertical position is ok, but now the left is aligned to the first time column.

        2) calendar.getDateFromPoint() returns with the value:
        Thu Jan 01 01:00:00 CET 1970

        3) ok, will provide simple code for demonstration later

        Thanks.

        Comment


          #19
          We'll await the code, which will hopefully also demonstrate which actual calendar view you're having trouble with in the first two points.

          Comment


            #20
            SmartGWT: v9.1p_2014-04-22/PowerEdition Deployment (built 2014-04-22)
            Browser: IE 11.0.9600.17041 Update Versions: 11.0.7

            Please see the attached screen shot.

            Problems:

            i) Event #3 covers the other two events
            With SmartGWT 4.0 the green events were in the front
            ii) Events cannot be selected with clicks
            iii) Mouse hover generates error (it will be shown once, but never again)
            Uncaught JavaScript exception [Invalid argument.] in http://127.0.0.1:8888/test/sc/modules/ISC_Core.js, line 281
            Code:
            	private static Date today = new Date();   
            	private static int year = today.getYear();   
            	private static int month = today.getMonth();   
            	private static int day = today.getDate() - today.getDay() +2;
            	
            	private Calendar calendar;
            
            	@Override
            	public void onModuleLoad() {
            		DateUtil.setWeekendDays(new Integer[]{0});
            		
            		VLayout vl = new VLayout();
            				
            		calendar = new Calendar();
            		
            		calendar.setRowHeight(40);
                	calendar.setTimeFormatter(TimeDisplayFormat.TOSHORTTIME);
            		
            		calendar.setWorkdayStart("6:00am");
            		calendar.setWorkdayEnd("8:00pm");
            
            		calendar.setShowWeekends(false);
            		calendar.setWorkdays(new int[]{1,2,3,4,5,6});
            		calendar.setFirstDayOfWeek(1); // Monday
            	    
                    calendar.setShowWorkday(true);  
                    calendar.setScrollToWorkday(true);
            		calendar.setCanEditEvents(false);
                    
            		calendar.setCanCreateEvents(true);
            		calendar.setCanRemoveEvents(false);
            		
            		calendar.setCanDragEvents(false);
            		calendar.setCanDrop(false);
            		calendar.setSaveButtonTitle("Start Request");
            		calendar.setEventOverlap(true);
            		calendar.setEventOverlapPercent(80);
            		calendar.setEventOverlapIdenticalStartTimes(true);
                	calendar.setEventSnapGap(15);
                	
            		calendar.setEventNameFieldTitle("Request Comment");
            		//calendar.setShowDayLanes(true);
            		
                    TextItem tiName = new TextItem();   
                    tiName.setType("text");   
                    tiName.setName("name");
                    tiName.setTitle("Name title");
            
            		calendar.addEventClickHandler(new EventClickHandler() {
            			
            			@Override
            			public void onEventClick(CalendarEventClick event) {
            				System.out.println("clicked on event: " + event.getEvent().getEventId());
            				CalendarEvent newEvent = new CalendarEvent();
            				newEvent.setLane(event.getEvent().getLane());
            				
            				//newEvent.setStartDate(calendar.getDateFromPoint());
            				
            				newEvent.setStartDate(
            					    calendar.getDateFromPoint(
            					        calendar.getWeekView().getOffsetX(),
            					        calendar.getWeekView().getOffsetY()
            					    )
            					);
            				
            				if (newEvent.getEndDate() == null) {
            					long time = newEvent.getStartDate().getTime() + (1000 * 60 * 60); // end time for 1 hour length
            					newEvent.setEndDate(new Date(time));
            				}
            				newEvent = new CalendarEvent();
            				calendar.showNewEventDialog(newEvent);
            			}
            		});
            		
            		calendar.setChosenDate(new Date(114, 3, 15, 7, 30, 0));
                    reloadEvents();
            		
            		vl.setMembers(calendar);
            		vl.setWidth100();
            		vl.setHeight100();
            		vl.draw();
            	}
            	
            	public void reloadEvents() {
            		long t = System.currentTimeMillis();
            		CalendarEvent[] events = getEvents();
            		for(CalendarEvent e : events) {
            			e.setName(e.getName() + " " + e.getEventWindowStyle());
            		}
            		
            		calendar.setData(events);
            		System.out.println("set events: " + (System.currentTimeMillis() - t) + " ms,   count: " + events.length);
            	}
            	
            	public static CalendarEvent[] getEvents() {
            		List<CalendarEvent> eventList = new ArrayList<CalendarEvent>();
            		CalendarEvent event;
            		
            		event = new CalendarEvent(1, "#1", "desc 1", new Date(114, 3, 15, 7, 30, 0), new Date(114, 3, 15, 8, 45, 0), false, "appointmentStyle");
            		event.setLane("OR");
            		eventList.add(event);
            
            		event = new CalendarEvent(2, "#2", "desc 2", new Date(114, 3, 15, 9, 0, 0), new Date(114, 3, 15, 9, 45, 0), false, "appointmentStyle");
            		event.setLane("OR");
            		eventList.add(event);
            
            		event = new CalendarEvent(3, "#3", "desc 3", new Date(114, 3, 15, 7, 30, 0), new Date(114, 3, 15, 16, 30, 0), false, "blockStyle");
            		event.setLane("BLOCK");
            		eventList.add(event);
            
            		CalendarEvent[] events = new CalendarEvent[eventList.size()];
            		eventList.toArray(events);		
            		return events;
            	}
            Attached Files

            Comment


              #21
              Your code doesn't include the styles, but aside from that, we see #1 and that will be fixed in the coming days.

              We don't see either of the issues you describe in #2 and #3.

              For #3, hovering seems to work fine for us.

              For #2, it's not clear what you expect your code to do - what it will *actually* do, it seems, is intercept any click on any event and show the newEventDialog for a *new* event. So, we would expect that you can't edit your events with that code.

              Further, at the end of your click handler, you then overwrite the event you've just set up with a new, empty event (with no startDate) and pass *that* to showNewEventDialog().

              Once you've fixed that, let us know if you still see those latter two issues.

              Comment


                #22
                Browser: IE 11.0.9600.17041 Update Versions: 11.0.7

                I have simpified the code, and removed all the extra statements (no click handler, etc.), and went back to use just the Enterprise default skin.

                Code:
                <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
                
                <html>
                  <head>
                    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
                    
                    <title>SmartGWT Test</title>
                    
                  </head>
                
                <body>
                	
                	<script> 
                		var isomorphicDir = "test/sc/";
                		
                		var currentSkin = "Enterprise";
                	</script>
                	
                    <script type="text/javascript" language="javascript" 
                	    		src="amkailinktest/amkailinktest.nocache.js"></script>
                
                	<script>
                		document.write("<"+"script src=test/sc/skins/" + currentSkin + "/load_skin.js><"+"/script>");
                	</script>	    		
                	
                	<!-- history support -->
                	<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1'
                	        style="position:absolute;width:0;height:0;border:0"></iframe>
                	        
                </body></html>
                Code:
                	@Override
                	public void onModuleLoad() {
                		VLayout vl = new VLayout();
                				
                		Calendar calendar = new Calendar();
                		
                		calendar.setEventOverlap(true);
                		calendar.setEventOverlapPercent(80);
                		calendar.setEventOverlapIdenticalStartTimes(true);
                		
                		calendar.setChosenDate(new Date(114, 3, 15, 7, 30, 0));
                		calendar.setData(getEvents());
                		
                		vl.setMembers(calendar);
                		vl.setWidth100();
                		vl.setHeight100();
                		vl.draw();
                	}
                	
                	public static CalendarEvent[] getEvents() {
                		List<CalendarEvent> eventList = new ArrayList<CalendarEvent>();
                		CalendarEvent event;
                		
                		event = new CalendarEvent(1, "#1", "desc 1", new Date(114, 3, 15, 7, 30, 0), new Date(114, 3, 15, 8, 45, 0), false /*, "appointmentStyle"*/ );
                		event.setLane("OR");
                		eventList.add(event);
                
                		event = new CalendarEvent(2, "#2", "desc 2", new Date(114, 3, 15, 9, 0, 0), new Date(114, 3, 15, 9, 45, 0), false /*, "appointmentStyle" */);
                		event.setLane("OR");
                		eventList.add(event);
                
                		event = new CalendarEvent(3, "#3", "desc 3", new Date(114, 3, 15, 7, 30, 0), new Date(114, 3, 15, 16, 30, 0), false /*, "blockStyle" */);
                		event.setLane("BLOCK");
                		eventList.add(event);
                
                		CalendarEvent[] events = new CalendarEvent[eventList.size()];
                		eventList.toArray(events);		
                		return events;
                	}
                Using 4.0p the rendering is OK, clicking on events they will be selected and bring to front, also there is no problem with hovering - it works for all the three events are on the grid. You can see it on the 4.0 screen shot.

                But with 4.1p the rendering is wrong (you already confirmed). Also I cannot select any of the events clicking on them. Also, the hover throws the exception below. 4.1 screen shot attached as well.

                Note: The hovering problem is IE specific.

                Code:
                Uncaught JavaScript exception [Invalid argument.] in http://127.0.0.1:8888/test/sc/modules/ISC_Core.js, line 281
                
                
                11:49:23.255 [ERROR] [test] 11:49:23.252:TMR2:WARN:Log:Error: Invalid argument.
                Stack from error.stack:
                    Canvas._assignSize () @ test/sc/modules/ISC_Core.js:2341:483
                    Button._assignRectToHandle () @ test/sc/modules/ISC_Foundation.js:430:89
                    Canvas._setHandleRect () @ test/sc/modules/ISC_Core.js:2341:1
                    Canvas._updateHTML () @ test/sc/modules/ISC_Core.js:1802:1
                    Canvas.redraw () @ test/sc/modules/ISC_Core.js:1799:702
                    Canvas.setVisibility () @ test/sc/modules/ISC_Core.js:2347:138
                    Canvas.show () @ test/sc/modules/ISC_Core.js:2354:1
                    Hover.show () @ test/sc/modules/ISC_Core.js:3054:397
                    Canvas.handleHover () @ test/sc/modules/ISC_Core.js:2428:874
                    Canvas._handleHover () @ test/sc/modules/ISC_Core.js:2428:335
                
                
                com.smartgwt.client.core.JsObject$SGWT_WARN: 11:49:23.252:TMR2:WARN:Log:Error: Invalid argument.
                Stack from error.stack:
                    Canvas._assignSize () @ test/sc/modules/ISC_Core.js:2341:483
                    Button._assignRectToHandle () @ test/sc/modules/ISC_Foundation.js:430:89
                    Canvas._setHandleRect () @ test/sc/modules/ISC_Core.js:2341:1
                    Canvas._updateHTML () @ test/sc/modules/ISC_Core.js:1802:1
                    Canvas.redraw () @ test/sc/modules/ISC_Core.js:1799:702
                    Canvas.setVisibility () @ test/sc/modules/ISC_Core.js:2347:138
                    Canvas.show () @ test/sc/modules/ISC_Core.js:2354:1
                    Hover.show () @ test/sc/modules/ISC_Core.js:3054:397
                    Canvas.handleHover () @ test/sc/modules/ISC_Core.js:2428:874
                    Canvas._handleHover () @ test/sc/modules/ISC_Core.js:2428:335
                
                    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
                    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
                    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
                    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
                    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
                    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
                    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
                    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
                    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
                    at java.lang.Thread.run(Thread.java:724)
                Attached Files

                Comment


                  #23
                  Can you repeat the problem with the previous sample code on IE 11? Do you need anything else? Thanks.

                  Comment


                    #24
                    Yes - the hover issue is fixed and we do see the other issue with the click. This latter, and the left-to-right zordering of overlapped events, should be fixed today - we'll update here when we know what build has the fixes.

                    Comment


                      #25
                      A quick update here - you can't edit your events because you are creating them all with canEdit: false (the 6th param to the constructor you're using).

                      The other issues are fixed for tomorrow's build.

                      Comment


                        #26
                        Just for clarity - you've mentioned, we think, several times that clicking an event doesn't "select" it...

                        That has never been an intentional builtin behavior - we don't have selected styles for events, so they will never be "selected" - however, if you want to bring a canvas to the front when you click on it, you can so by adding a click handler and calling bringToFront(). But note that builtin logic to re-apply z-orders according to render-position may well interfere with this.

                        Comment


                          #27
                          SmartGWT 4.1p 2014-04-28

                          The hovering problem has been fixed, it does work. Thank you.

                          We don't allow to edit events on the grid (in production), but in our the latest sample it is not disabled.

                          You are correct about the "selection". When we click an event in 4.0 it is just will be brought to front. So, with 4.0 (even the canEdit is set to false) clicking on it, we can bring it to the front. Please let me know if it will be available again.

                          Comment


                            #28
                            Broken OverlapSortSpecifiers in 4.1

                            Unfortunately noticed a new problem: OverlapSortSpecifiers is broken.

                            With 4.0 in the next sample #1 and #2 are in the front while the longer one #3 is in the background.

                            But using 4.1 #3 goes into the front. I believe this is a bug. Please confirm and let me know if a fix is available. Thanks again.

                            Code:
                            	@Override
                            	public void onModuleLoad() {
                            		VLayout vl = new VLayout();
                            				
                            		final Calendar calendar = new Calendar();
                            		
                            		calendar.setEventOverlap(true);
                            		calendar.setEventOverlapPercent(80);
                            		calendar.setEventOverlapIdenticalStartTimes(true);
                            		
                                	SortSpecifier[] overlapSortSpecifiers = { 
                                			new SortSpecifier("ordinal", SortDirection.DESCENDING), 
                                			new SortSpecifier("startDate", SortDirection.ASCENDING)};
                                	
                                	calendar.setOverlapSortSpecifiers(overlapSortSpecifiers);
                            		
                            		
                            		calendar.setChosenDate(new Date(114, 3, 15, 7, 30, 0));
                            		calendar.setData(getEvents());
                            		
                            		vl.setMembers(calendar);
                            		vl.setWidth100();
                            		vl.setHeight100();
                            		vl.draw();
                            	}
                            	
                            	public static CalendarEvent[] getEvents() {
                            		List<CalendarEvent> eventList = new ArrayList<CalendarEvent>();
                            		CalendarEvent event;
                            		
                            		event = new CalendarEvent(1, "#1", "desc 1", new Date(114, 3, 15, 7, 30, 0), new Date(114, 3, 15, 8, 45, 0), false /*, "appointmentStyle"*/ );
                            		event.setLane("OR");
                            		event.setAttribute("ordinal", 1);
                            		eventList.add(event);
                            
                            		event = new CalendarEvent(2, "#2", "desc 2", new Date(114, 3, 15, 9, 0, 0), new Date(114, 3, 15, 9, 45, 0), false /*, "appointmentStyle" */);
                            		event.setLane("OR");
                            		event.setAttribute("ordinal", 1);
                            		eventList.add(event);
                            
                            		event = new CalendarEvent(3, "#3", "desc 3", new Date(114, 3, 15, 7, 30, 0), new Date(114, 3, 15, 16, 30, 0), false /*, "blockStyle" */);
                            		event.setLane("BLOCK");
                            		event.setAttribute("ordinal", 2);
                            		eventList.add(event);
                            
                            		CalendarEvent[] events = new CalendarEvent[eventList.size()];
                            		eventList.toArray(events);		
                            		return events;
                            	}

                            Comment


                              #29
                              When you believe you've found new issues, please post them in new threads - this one is becoming difficult to keep on top of.

                              Your penultimate post has us a little confused.

                              >>
                              We don't allow to edit events on the grid (in production), but in our the latest sample it is not disabled.
                              <<

                              We don't know what this means - all of the samples you've posted, including your latest one, disallow editing for all of your events.

                              >>
                              You are correct about the "selection". When we click an event in 4.0 it is just will be brought to front. So, with 4.0 (even the canEdit is set to false) clicking on it, we can bring it to the front. Please let me know if it will be available again.
                              <<

                              As we already said, that was never an intentional behavior - and nor is it a desirable one (with eventAutoArrange:false, you could easily end up losing smaller events behind larger ones). But if you want to do it yourself, you can do so by calling bringToFront().

                              Finally, on your most recent post - OverlapSortSpecifiers is a Timeline feature. It has no effect on other Calendar views. See the doc for that attribute.

                              Comment


                                #30
                                If you don't follow the samples, and later you refer to an earlier example that might confuse you. I am sorry about, but it is not easy to deal an API upgrade if some things/behavior change.

                                Our problem is 4.1 doesn't behave as usual it did in 4.0. If we had a detailed list of changes explains it may help.

                                Anyway I will start another threads for all the different problems we still have with 4.1

                                Comment

                                Working...
                                X