Re: [pmapper-users] PM.Custom.open Hyperlink is not a function
Brought to you by:
arminburger
From: Siki Z. <si...@ag...> - 2014-07-10 13:10:02
|
Dear Fernando, there is an extra space $. extend(.... in custom.js = change to $.extend(... Best regards, Zoltan On Thu, 10 Jul 2014, Fernando wrote: > Hello, I have installed mapserver 5.6, pmapper 4.3.2 and use alternative template "plainlayout3", I'm not using the default template. I have in the attribute table of a shp file a column called "pdf_files", in which I keep the name of the pdf file. > > In the map file I have placed the following: > > ... > METADATA > "RESULT_FIELDS" "id, pdf_files" > "RESULT_HEADERS" "ID, PDF FILES" > "RESULT_HYPERLINK" "pdf_files | | Link to pdf detail" > ... > > And finally I have to modify the file custom.js. In the folder "pmapper-4.3.2\config\plainlayout3" this file does not exist, but if in "pmapper-4.3.2\config\default" yes. I have copied it to the folder plainlayout3 and changed as follows: > > $. extend (PM.Custom, > { > / / Sample Hyperlink function for result window > openHyperlink: function (layer, fldName, fldValue) { > switch (layer) { > case 'shp_data': > / / if (fldName == 'CITY_NAME') { > linkUrl var = 'http:/' + '/ localhost / sitejob / files /' + fldValue; > window.open (linkUrl, 'wikiquery'); > / / this.openHyperlinkDialog (linkUrl); > / /} > break; > > default: > alert ('See function in Custom.js openHyperlink:' + layer + '-' + fldName + '-' + fldValue); > } > }, > > When I use the Identify function, the result table is opened and pdf_files column show the "Link to pdf detail" text appears with the code "javascript: PM.Custom.openHyperlink ('shp_data', 'pdf_files',' data1.pdf ')" but when I click on it Mozilla Firefox console displays the following error: > > TypeError: PM.Custom.openHyperlink is not a function > > Please, how I can fix it? Thanks a lot. > > > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > pmapper-users mailing list > pma...@li... > https://lists.sourceforge.net/lists/listinfo/pmapper-users > |