Changeset 7725

Show
Ignore:
Timestamp:
06/08/09 09:52:11 (14 months ago)
Author:
dragisak
Message:

Add author name for delete confirmation popup. Addresses #1316

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • head/ambra/webapp/src/main/webapp/admin/manageAnnotation.ftl

    r7724 r7725  
    2323 
    2424    <script type="text/javascript"> 
    25       function confirmToDeleteAuthor(authorIndex) { 
    26         if (confirm('Are you sure you want to delete this author?')) { 
     25      function confirmToDeleteAuthor(authorIndex, name) { 
     26        if (confirm('Are you sure you want to delete author ' + name + ' ?')) { 
    2727          document.manageAnnotationSave.citationAuthorDeleteIndex.value = authorIndex; 
    2828          document.manageAnnotationSave.submit(); 
    2929        } 
    3030      } 
    31       function confirmToDeleteCollaborativeAuthor(authorIndex) { 
    32         if (confirm('Are you sure you want to delete this collaborative author?')) { 
     31      function confirmToDeleteCollaborativeAuthor(authorIndex, name ) { 
     32        if (confirm('Are you sure you want to delete this collaborative author ' + name +' ?')) { 
    3333          document.manageAnnotationSave.citationCollaborativeAuthorDeleteIndex.value = authorIndex; 
    3434          document.manageAnnotationSave.submit(); 
     
    128128                          <td><@s.textfield name="citationAuthorSurnames" value="${citationAuthorSurnames[authorId_index]!}" size="20"/></td> 
    129129                          <td><@s.textfield name="citationAuthorSuffixes" value="${citationAuthorSuffixes[authorId_index]!}" size="20"/></td> 
    130                           <td><a href="#" onClick="confirmToDeleteAuthor(${authorId_index});return false;">Delete Author</a></td></tr> 
     130                          <td><a href="#" onClick="confirmToDeleteAuthor(${authorId_index}, '${citationAuthorGivenNames[authorId_index]!} ${citationAuthorSurnames[authorId_index]!}');return false;">Delete Author</a></td></tr> 
    131131                      </#list> 
    132132                        <tr><td><@s.textfield name="citationAuthorGivenNames" value="" size="20"/></td> 
     
    154154                      <#list citationCollaborativeAuthorNames as authorName> 
    155155                        <tr><td><@s.textfield name="citationCollaborativeAuthorNames" value="${authorName!}" size="20"/></td> 
    156                           <td><a href="#" onClick="confirmToDeleteCollaborativeAuthor(${authorName_index});return false;">Delete Collaborative Author</a></td></tr> 
     156                          <td><a href="#" onClick="confirmToDeleteCollaborativeAuthor(${authorName_index}, '${authorName}');return false;">Delete Collaborative Author</a></td></tr> 
    157157                      </#list> 
    158158                        <tr><td><@s.textfield name="citationCollaborativeAuthorNames" value="" size="20"/></td>