Hi, 1) In your map.phtml replace $('#uiLayoutNorth').pmToolLinks(PM.linksDefault); // Tool links with pmToolMenu(PM.linksDefault, 'toolLinkMenu', 'Tools', '#uiLayoutNorth', 16, 16);
2) Add the folowing javascript code in config/common/menu.js for instance: function pmToolMenu(tl, menuid, title, container, width, height) { // menu: var jqMenu = $('<div />').id(menuid + '-Container'); // menu title: var jqMenuTitle = $('<a />').id(menuid + '-title') .addClass('pm-menu-button') .attr('href', 'javascript:PM.Init.menu_toggle(\'' + menuid + '\')') .html(title + '<img src="images/menudown.gif" alt="" />') .appendTo(jqMenu); // menu elements: var ul = $('<ul/>').id(menuid).addClass('pm-menu'); var size = ''; if (typeof(width) != 'undefined') size += ';width:'+width+'px'; if (typeof(height) != 'undefined') size += ';height:'+height+'px'; $.each(tl.links, function() { var linkName = _p(this.name); //; var a = '<a href="' + (this.run.substr(0,4) == 'http' ? this.run : 'javascript:' + this.run + '();PM.Init.menu_toggle(\'pm-' + menuid + '\');') + '">'; a += '<img style="background:transparent url(images/menus/' + this.imgsrc + ')' + ' no-repeat' + size + '" src="images/transparent.png" alt="' + linkName +'" />'; a += '<span>' + linkName + '</span></a>'; $('<li/>').html(a).appendTo(ul); }); ul.appendTo(jqMenu).height('auto'); // menu element effect: ul.children('li').each(function() { $(this).hover( function() { $(this).addClass('pm-menu_hover'); }, function() { $(this).removeClass('pm-menu-hover'); } ); }); // add menu to container $("<div />").id(tl.containerid).append(jqMenu).appendTo(container); } 3) Then modify the css (for instance if you insert the menu in "uiLayoutNorth", you will need to put uiLayoutNorth's "z-index" above 2, maybe align right or left, ...) Andreas P. a écrit : > Hello Armin, > Hello All, > > I am using pmapper 4 and I would like to have the tool links in an array > object. I don't want to have a list with the links. I would like to have a > button and when I press it, the 4 tool lins will appear as a menu. > > > I suppose that I have to change the following code from js_config.php: > > PM.linksDefault = { > containerid:'toolLinkContainer', > links: [ > {linkid:'link', name:'Link', run:'PM.UI.showMapLink', > imgsrc:'link-w.png'}, > {linkid:'print', name:'Print', run:'PM.Dlg.openPrint', > imgsrc:'print-w.png'}, > {linkid:'download', name:'Download', run:'PM.Dlg.openDownload', > imgsrc:'download-w.png'}, > {linkid:'help', name:'Help', run:'PM.Dlg.openHelp', > imgsrc:'help-w.png'} > //{linkid:'layers', name:'Layers', > run:'PM.Plugin.Layerselect.openDlg', imgsrc:'layers-bw.png'} > > ] > }; > > How should I change it?? > > Thank you in advance! > > Regards, > > p. > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users