Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#322 closed defect (fixed)

Query: Behavior of Clear and Checkbox for Spatial Filter is not consistent

Reported by: jennyhe Owned by: madair
Priority: P2 Milestone: Future
Component: Widgets Version: 1.1.1
Severity: Major Keywords:
Cc: christine.bao@… Browser: All
External ID: 1276830 Operating System: All
state: New

Description

Report from Autodesk QA

Steps:

  1. Open one flexible web layout by IE.
  2. Query
  3. Check Spatial Filter -> Draw Rectangle -> Clear
  4. Check Spatial Filter -> Draw Rectangle -> Uncheck Spatial Filter

Results: After Step3, the check box of Spatial Filter is unchecked, the rectangle is cleared. After Step4, the check box of Spatial Filter is unchecked, but the rectangle is still be there.

Expected results: Once Uncheck Spatial Filter, the rectangle should be cleared also.

Attachments (2)

Fix322.patch (479 bytes ) - added by christinebao 15 years ago.
IEFix.patch (619 bytes ) - added by christinebao 15 years ago.

Download all attachments as: .zip

Change History (10)

by christinebao, 15 years ago

Attachment: Fix322.patch added

comment:1 by christinebao, 15 years ago

Attach patch http://trac.osgeo.org/fusion/attachment/ticket/322/Fix322.patch for fixing this defect.
Please review.

comment:2 by chrisclaydon, 15 years ago

The patch looks fine Christine. It looks like the querymain.php file could use some cleanup at some point since some of the methods (e.g. ToggleSpatialFilter) no longer seem to do anything. But that is not required for this fix.

comment:3 by christinebao, 15 years ago

Thanks Chris for reviewing.
The patch is submitted to fix this defect.

Chris is right about the method ToggleSpatialFilter(bool). It's empty method indeed. However I'm not sure whether it's needed in the future, so I don't remove this method and the related function in query.php. Would someone know more about it cleanup the code or write some comments about why it's commented temporarily? Thanks.

comment:4 by christinebao, 15 years ago

Resolution: fixed
Status: newclosed

comment:5 by christinebao, 15 years ago

QA found the patch http://trac.osgeo.org/fusion/attachment/ticket/322/Fix322.patch fixed Firefox, Chrome and Safari, but IE still have this problem. After user uncheck "Spatial Filter" checkbox, the digitization is not cleared.

This is because the function OnToggleSpatialFilter() is not triggered after user uncheck the checkbox. OnChange() event is used to register OnToggleSpatialFilter():

<tr><td class="SubTitle"><input class="Ctrl" type="checkbox" onChange="OnToggleSpatialFilter()" id="spatialFilter">&nbsp;Spatial Filter</td></tr>


However IE only fires the onchange event when the checkbox loses the focus, so it's not triggered immediately. To behave expectedly in IE, OnClick() should be used.

A good website to check these differences: http://krijnhoetmer.nl/stuff/javascript/checkbox-onchange/

by christinebao, 15 years ago

Attachment: IEFix.patch added

comment:7 by liuar, 15 years ago

Reviewed, please submit the code.

comment:8 by christinebao, 15 years ago

Commit the patch to fix this defect in IE.

Note: See TracTickets for help on using tickets.