Added a javascript confirmation popup for delete icon

This commit is contained in:
Len Kranendonk 2004-11-08 16:32:23 +00:00
parent ed735cf9d1
commit c23b54f672
3 changed files with 5 additions and 20 deletions

View file

@ -70,21 +70,6 @@ sub www_copyNavigation {
return www_listNavigation();
}
#-------------------------------------------------------------------
sub www_deleteNavigation {
return WebGUI::Privilege::insufficient() unless (WebGUI::Grouping::isInGroup(3));
if ($session{form}{navigationId} < 1000 && $session{form}{navigationId} > 0) {
return WebGUI::Privilege::vitalComponent();
}
my $output = WebGUI::International::get(502).'<p>';
$output .= '<div align="center"><a href="'.
WebGUI::URL::page('op=deleteNavigationConfirm&navigationId='.$session{form}{navigationId})
.'">'.WebGUI::International::get(44).'</a>';
$output .= '&nbsp;&nbsp;&nbsp;&nbsp;<a href="'.WebGUI::URL::page('op=listNavigation').'">'.
WebGUI::International::get(45).'</a></div>';
return _submenu($output,"42");
}
#-------------------------------------------------------------------
sub www_deleteNavigationConfirm {
return WebGUI::Privilege::insufficient() unless (WebGUI::Grouping::isInGroup(3));
@ -288,7 +273,7 @@ sub www_listNavigation {
my @row = ();
while (my %data = $sth->hash) {
$row[$i].= '<tr><td valign="top" class="tableData">'
.deleteIcon('op=deleteNavigation&identifier='.$data{identifier}.'&navigationId='.$data{navigationId})
.deleteIcon('op=deleteNavigationConfirm&identifier='.$data{identifier}.'&navigationId='.$data{navigationId},'',WebGUI::International::get(502))
.editIcon('op=editNavigation&identifier='.$data{identifier}.'&navigationId='.$data{navigationId}."&afterEdit=".WebGUI::URL::escape("op=listNavigation"))
.copyIcon('op=copyNavigation&identifier='.$data{identifier}.'&navigationId='.$data{navigationId})
.'</td>';

View file

@ -193,7 +193,7 @@ sub _traversePageTree {
unless ($isSystem) {
$output .= $spacer x $initialDepth
.pageIcon()
.deleteIcon('op=deletePage',$url)
.deleteIcon('op=deletePageConfirm',$url,WebGUI::International::get(101))
.moveLeftIcon(sprintf('op=moveTreePageLeft&pageId=%s',$pageId), $url)
.moveUpIcon(sprintf('op=moveTreePageUp&pageId=%s',$pageId), $url)
.moveDownIcon(sprintf('op=moveTreePageDown&pageId=%s',$pageId), $url)
@ -204,7 +204,7 @@ sub _traversePageTree {
while (%wobject = $wobjects->hash) {
$output .= $spacer x $initialDepth. $spacer
.wobjectIcon()
.deleteIcon('func=delete&wid='.$wobject{wobjectId},$url)
.deleteIcon('func=deleteConfirm&wid='.$wobject{wobjectId},$url,WebGUI::International::get(43))
.editIcon('func=edit&wid='.$wobject{wobjectId},$url)
.' '. $wobject{title}.'<br>';
}

View file

@ -267,7 +267,7 @@ sub www_editProfileSettings {
tie %field, 'Tie::CPHash';
$a = WebGUI::SQL->read("select * from userProfileCategory order by sequenceNumber");
while (%category = $a->hash) {
$output .= deleteIcon('op=deleteProfileCategory&cid='.$category{profileCategoryId});
$output .= deleteIcon('op=deleteProfileCategoryConfirm&cid='.$category{profileCategoryId},'',WebGUI::International::get(466,"WebGUIProfile"));
$output .= editIcon('op=editProfileCategory&cid='.$category{profileCategoryId});
$output .= moveUpIcon('op=moveProfileCategoryUp&cid='.$category{profileCategoryId});
$output .= moveDownIcon('op=moveProfileCategoryDown&cid='.$category{profileCategoryId});
@ -278,7 +278,7 @@ sub www_editProfileSettings {
profileCategoryId=".quote($category{profileCategoryId})." order by sequenceNumber");
while (%field = $b->hash) {
$output .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
$output .= deleteIcon('op=deleteProfileField&fid='.$field{fieldName});
$output .= deleteIcon('op=deleteProfileFieldConfirm&fid='.$field{fieldName},'',WebGUI::International::get(467,"WebGUIProfile"));
$output .= editIcon('op=editProfileField&fid='.$field{fieldName});
$output .= moveUpIcon('op=moveProfileFieldUp&fid='.$field{fieldName});
$output .= moveDownIcon('op=moveProfileFieldDown&fid='.$field{fieldName});