[Cartoweb-users] multiple Delete Button editplugin

Oliver Christen oliver.christen at camptocamp.com
Thu Nov 15 02:35:00 EST 2007


the map_xxxx is the id of the dhtml feature in javascript: dShape.id
see dhtmlAPI.js, line 1348 or so, thats where the confirm message is generated.
to get the layer, I suppose you can do something like xGetElementById('edit_layer').value (though it seems you have to add an id="edit_layer" in the template, there is only a name= tag at the moment.)
and as for the id, if you only want the numeric part, simply use the javascript substr

regards
Oliver
  ----- Original Message ----- 
  From: Broun Uganda 
  To: Oliver Christen ; cartoweb-users at lists.maptools.org 
  Sent: Wednesday, November 14, 2007 3:29 PM
  Subject: RE: [Cartoweb-users] multiple Delete Button editplugin


  Hey
  When you attempt to delete, you get a popup window 'Are you sure? map_xxxx', where xxx is the id of the feature to be deleted. I want to change this message so it is more meaningful to my users. I want something like ' Are you sure you want to delete 'layername_featurename ?' I have changed the first part but i cant find where to change map_xxxx from!
  Thank you for your help.

  Broun Uganda





----------------------------------------------------------------------------
    From: oliver.christen at camptocamp.com
    To: tekuganda at hotmail.com; cartoweb-users at lists.maptools.org
    Subject: Re: [Cartoweb-users] multiple Delete Button editplugin
    Date: Wed, 14 Nov 2007 14:56:40 +0100


    Hi

    deleting a feature is a complex action and emulating it would be fairly complex, even I wouldnt want to touch that.

    if you really really want to do it, the functions called on delete is DeleteFeatureTool.prototype.onMouseDown in dhtmlAPI.js
    but I have no idea what you need to copy or modify so you can call it with a clic on a button instead of a clic on the map, sorry.

    regards
    Oliver

      ----- Original Message ----- 
      From: Broun Uganda 
      To: cartoweb-users at lists.maptools.org 
      Sent: Wednesday, November 14, 2007 1:20 PM
      Subject: [Cartoweb-users] multiple Delete Button editplugin



      In my edit plugin i want to include a tickboxes (similar to radio buttons). The purpose of these tick boxes is that i should do multiple selection of features and then delete them all at once. What part of code do i need to change so that by clicking on these tick boxes the edit rows are crossed out and then i have a button (delete_all).
      Thank you
      Broun Uganda




--------------------------------------------------------------------------
      Discover the new Windows Vista Learn more! 
--------------------------------------------------------------------------


      _______________________________________________
      Cartoweb-users mailing list
      Cartoweb-users at lists.maptools.org
      http://lists.maptools.org/mailman/listinfo/cartoweb-users




------------------------------------------------------------------------------
  Connect to the next generation of MSN Messenger  Get it now! 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20071115/c84f9dce/attachment-0001.html


More information about the Cartoweb-users mailing list