Ignore:
Timestamp:
22/12/08 12:18:38 (11 years ago)
Author:
cbyrom
Message:

Add delete function to atom editor to delete granule atoms - together
with warning messages beforehand and result pop up messages afterwards.
Adjust granulite to expose the delete functions publicly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MILK/trunk/milk_server/milk_server/templates/atom_editor/atom_editor.html

    r4604 r4697  
    1414                        </script> 
    1515                </span> 
     16        <script py:if="c.atom.isGranule()" type="text/javascript"> 
     17function confirmGranuleDelete()  
     18{ 
     19        var r=confirm('Do you really want to delete this granule - and all references to it in data entities?'); 
     20        if (r==true) 
     21        { 
     22                Div_show("loading"); 
     23                return true;   
     24        } 
     25        return false; 
     26} 
     27                </script> 
    1628        <span py:if="c.atom.isDeployable() or c.atom.isGranule()"  py:strip=""> 
    1729                <script type="text/javascript"> 
     
    4355                                ${Markup(h.form(h.url_for(controller='atom_editor/editatom', action='edit', uri=c.atom.ndgURI)))} 
    4456                                        <input py:if="not c.saveLink" name="Edit" type="submit" value="Edit" /> 
     57                                ${Markup(h.end_form())} 
     58                                ${Markup(h.form(h.url_for(controller='atom_editor/editatom', action='delete', uri=c.atom.ndgURI)))} 
     59                                        <input py:if="c.atom.isGranule()" name="Delete" type="submit" value="Delete" onclick="return confirmGranuleDelete()" /> 
    4560                                ${Markup(h.end_form())} 
    4661                        <div py:replace="displayErrors()"/> 
Note: See TracChangeset for help on using the changeset viewer.