[mapguide-internals] Release Readiness doc?

Martin Morrison martin.morrison at edsi.com
Mon May 9 10:30:44 EDT 2011


This is definitely a bug that needs resolved and a correct fix posted.  (is anybody else having trouble logging into Internals?)

I have managed to get the links working, however now it does not comply with standard html practices.  The half hack was to add the following line to propertyctrl.templ.

*******************LINE TO ADD****************************
  code = code.replace(/&lt;/gi,'<').replace(/&gt;/gi,'>');
**********************************************************

The function to add it to is: SetProperties()  It goes just before the line "  SetContent(code);".  This is a hack.  It is NOT a correct fix.  It should be passed correctly from the server.  This does cause other issues.  E.g. this does not decode quotes, spaces etc from URL's.  In order for this to work I had to remove from my data quotes from the URL.

Old -> <a href="/propcards/036680.pdf" target="_blank">Click Here(PDF)</a>

New -> <a href=/propcards/036680.pdf target="_blank">Click Here(PDF)</a>

Both are valid HTML.  MapGuide should be able to handle the quotes in the href= statement.  We should not be doing a javascript hack and changing data to get this to work correctly.  As soon as I get logged in to Internals I will log it.


Martin Morrison
Application Engineer
Engineering Design Systems, Inc.
3780 Peters Creek Rd Ext SW
Roanoke, VA  24018
540.345.1410
gis.edsi.com


-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org [mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Zac Spitzer
Sent: Thursday, May 05, 2011 10:46 AM
To: MapGuide Internals Mail List
Subject: RE: [mapguide-internals] Release Readiness doc?

If you have identified a problem, then as a experienced mapguide user, you
should definitely file a bug.

I harp on for new users to post on the mailing list first to encourage
people to research first.

My last email's, last paragraph was intended to start with "Even if" sorry
On May 5, 2011 10:01 PM, "Martin Morrison" <martin.morrison at edsi.com> wrote:
> Zac,
>
> Do you really want me to start a ticket when I haven't researched it and
asked the list? At the time I didn't have the extra time to mess with
anything other than getting a quick fix. I do now.
>
> If I get a decent fix, I will submit it. I did not consider the last one
decent.
>
> Martin Morrison
> Application Engineer
> Engineering Design Systems, Inc.
> 3780 Peters Creek Rd Ext SW
> Roanoke, VA 24018
> 540.345.1410
> gis.edsi.com
>
>
> -----Original Message-----
> From: mapguide-internals-bounces at lists.osgeo.org [mailto:
mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Zac Spitzer
> Sent: Wednesday, May 04, 2011 10:25 PM
> To: MapGuide Internals Mail List
> Subject: Re: [mapguide-internals] Release Readiness doc?
>
> How come I can't find a bug in trac about this, if the problem dates
> back to 2.1?
>
> Of course we want to fix regressions, but if people don't bother to
> report bugs in trac, things get missed
>
> If you have a messy hack which fixed it, it should of been attached to
> a ticket as a diff and a review requested
>
> On Thu, May 5, 2011 at 2:47 AM, Martin Morrison
> <martin.morrison at edsi.com> wrote:
>> I understand the moving browser...that is the biggest reason for us to
push to get the new version out the door. This fails across all
browsers...multiple version too.
>>
>> A little history.  In 2.02 hyperlinks worked.  You could place html
anchor tags in the data and they displayed as hyperlinks in the properties
window.  In 2.1 this was broken.  However we figured out a messy hack (see
below) that would re-enable them.  This hack worked in 2.2 RC2.
>>
>> Fast forward to 2.2 release.  The 2.1 hack does not work.  I see the
anchor tags in the properties window, not the links.  There was a reference
to this issue in this thread...
http://osgeo-org.1803224.n2.nabble.com/Hyperlinks-in-Properties-pane-of-Ajax-viewer-td5480165.html
When I look at what is coming to the browser in Firebug I see escaped
data,
e.g. &lt rather than <.
>>
>> I looked through the changes at this link:
>>
>>
http://trac.osgeo.org/mapguide/changeset?old_path=%2Fbranches%2F2.2%2FMgDev&old=5354&new_path=%2Fbranches%2F2.2%2FMgDev&new=5739
>>
>> I'm not a skilled C(whatever) programmer, but I don't see anything that
would have broken this.  So the question is:  What has changed that broke
this?  How do we fix it?  It is NOT an option to lose this functionality.
>>
>> *********************************hack*******************************
>> In \viewerfiles\propertyctrl.templ
>>
>> Add this function under
>> // private functions -----------------------------------------------
>> function htmlDecode(input) {
>>  var e = document.createElement('div');
>>  e.innerHTML = input;
>>  return e.childNodes[0].nodeValue;
>> }
>>
>>
>> In function SetProperties – change the lines highlighted below as
follows:
>>
>> SetProperties(count, properties)
>>    {
>> //        code = '<table id="Grid" cellspacing=0 cellpadding=0
border=0><tr class="Header"><td id="Name" class="Name" width=65><span
style="font-family: __#@font#__; font-size:
__#@fontsize#__;">&nbsp;__#PROPERTIESNAME#__</span></td><td
class="CellSplitter" width=1 onmousedown="StartResizing()"></td><td
class="Value"><span style="font-family: __#@font#__; font-size:
__#@fontsize#__;">&nbsp;__#PROPERTIESVALUE#__</span></td></tr>';
>> //        for(var i=0; i < properties.length; i++)
>> //            code += '<tr class="GridCell"><td><span style="font-family:
__#@font#__; font-size: __#@fontsize#__;">&nbsp;' + properties[i].name +
'</span></td><td></td><td><span style="font-family: __#@font#__; font-size:
__#@fontsize#__;">' + properties[i].value + '</span></td></tr>';
>> //        code += '</table>';
>> //        GetMapFrame().SetPropertyPaneToolbarVisibility(true);
>>
>>        // EDSI CHANGE START
>>        code = '<table id="Grid" cellspacing=0 cellpadding=0 border=0><tr
class="Header"><td id="Name" class="Name" width=65><span style="font-family:
__#@font#__; font-size:
__#@fontsize#__;">&nbsp;__#PROPERTIESNAME#__</span></td><td
class="CellSplitter" width=1 onmousedown="StartResizing()"></td><td
class="Value"><span style="font-family: __#@font#__; font-size:
__#@fontsize#__;">&nbsp;__#PROPERTIESVALUE#__</span></td></tr>';
>>        for(var i=0; i < properties.length; i++) {
>>            var EDSIText;
>>            var EDSIpattern = /^\&lt/;
>>            if (EDSIpattern.test(properties[i].value)) {
>>                   EDSIText = htmlDecode(properties[i].value);
>>                } else {
>>                   EDSIText = properties[i].value;
>>                }
>>            code += '<tr class="GridCell"><td><span style="font-family:
__#@font#__; font-size: __#@fontsize#__;">&nbsp;' + properties[i].name +
'</span></td><td></td><td><span style="font-family: __#@font#__; font-size:
__#@fontsize#__;">' + EDSIText + '</span></td></tr>';
>>        }
>>        code += '</table>';
>>        GetMapFrame().SetPropertyPaneToolbarVisibility(true);
>>        // EDSI CHANGE END
>>
>>    }
>> *********************************end********************************
>>
>>
>> Martin Morrison
>> Application Engineer
>> Engineering Design Systems, Inc.
>> 3780 Peters Creek Rd Ext SW
>> Roanoke, VA  24018
>> 540.345.1410
>> gis.edsi.com
>>
>>
>> -----Original Message-----
>> From: mapguide-internals-bounces at lists.osgeo.org [mailto:
mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Zac Spitzer
>> Sent: Wednesday, May 04, 2011 10:44 AM
>> To: MapGuide Internals Mail List
>> Subject: Re: [mapguide-internals] Release Readiness doc?
>>
>> exact records: http://trac.osgeo.org/mapguide/browser/branches/2.2/MgDev
>>
>> nothing has changed in the ajax viewer in 6 months, but browsers are a
>> moving target
>>
>> On Thu, May 5, 2011 at 12:12 AM, Martin Morrison
>> <martin.morrison at edsi.com> wrote:
>>> Where is a document for the official release of 2.2 similar to this?
>>>
>>> http://trac.osgeo.org/mapguide/wiki/ReleaseReadiness22RC2
>>>
>>> I'm trying to fix an issue that appeared between 2.2 RC2 and the 2.2
release with HTML links in the data.  (AJAX viewer, windows server)  It
would be helpful to know exactly what was supposed to have changed.
>>>
>>> Martin Morrison
>>> Application Engineer
>>> Engineering Design Systems, Inc.
>>> 3780 Peters Creek Rd Ext SW
>>> Roanoke, VA  24018
>>> 540.345.1410
>>> gis.edsi.com
>>>
>>> _______________________________________________
>>> mapguide-internals mailing list
>>> mapguide-internals at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>>>
>>
>>
>>
>> --
>> Zac Spitzer
>> Solution Architect / Director
>> Ennoble Consultancy Australia
>> http://www.ennoble.com.au
>> http://zacster.blogspot.com
>> +61 405 847 168
>> _______________________________________________
>> mapguide-internals mailing list
>> mapguide-internals at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>>
>>
>> _______________________________________________
>> mapguide-internals mailing list
>> mapguide-internals at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>>
>>
>
>
>
> --
> Zac Spitzer
> Solution Architect / Director
> Ennoble Consultancy Australia
> http://www.ennoble.com.au
> http://zacster.blogspot.com
> +61 405 847 168
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>
_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals



More information about the mapguide-internals mailing list