mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
Retrive accidentally removed delete and undelete nm_popup templates from calendar listview temp by commit 45376. Additionally, fix error calling cal_delete for deleting recurrent events from listview
This commit is contained in:
parent
d948e10598
commit
7f5af09f87
@ -925,46 +925,16 @@ app.classes.calendar = AppJS.extend(
|
||||
}
|
||||
if (matches)
|
||||
{
|
||||
var id = matches[1];
|
||||
var date = matches[2];
|
||||
var popup = jQuery(document.getElementById(_action.getManager().etemplate_var_prefix + '[' + _action.id + '_popup]'));
|
||||
var row = null;
|
||||
|
||||
// Cancel normal confirm
|
||||
delete _action.data.confirm;
|
||||
delete _action.data.confirm_multiple;
|
||||
|
||||
// nm action - show popup
|
||||
nm_open_popup(_action,_senders);
|
||||
|
||||
if(!popup)
|
||||
var popup = jQuery('#calendar-list_delete_popup').get(0);
|
||||
if (typeof popup != 'undefined')
|
||||
{
|
||||
return;
|
||||
}
|
||||
row = jQuery("#"+id+"\\:"+date);
|
||||
if (row)
|
||||
{
|
||||
// Open at row
|
||||
popup.css({
|
||||
position: "absolute",
|
||||
top: row.position().top + row.height() -popup.height()/2,
|
||||
left: $j(window).width()/2-popup.width()/2
|
||||
});
|
||||
} else {
|
||||
// Open popup in the middle
|
||||
popup.css({
|
||||
position: "absolute",
|
||||
top: $j(window).height()/2-popup.height()/2,
|
||||
left: $j(window).width()/2-popup.width()/2
|
||||
});
|
||||
}
|
||||
// nm action - show popup
|
||||
nm_open_popup(_action,_senders);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(_action);
|
||||
nm_action(_action, _senders);
|
||||
|
||||
_action.data = backup; // restore url, width, height, nm_action
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -118,6 +118,33 @@
|
||||
<row>
|
||||
<nextmatch id="nm" template="calendar.list.rows" span="all"/>
|
||||
</row>
|
||||
<row>
|
||||
<hbox>
|
||||
<box class="action_popup prompt" id="delete_popup">
|
||||
<vbox>
|
||||
<description value="Delete" class="promptheader"/>
|
||||
<description value="Do you want to delete this event as an exception, or delete the whole series?"/>
|
||||
<hbox>
|
||||
<button label="Delete exception" id="delete" onclick="nm_submit_popup(this); return false;"/>
|
||||
<button label="Delete series" id="delete_series" onclick="nm_popup_action.id = 'delete_series'; nm_submit_popup(this); return false;"/>
|
||||
<buttononly label="Cancel" onclick="nm_hide_popup(this,'delete_popup');"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</box>
|
||||
<box class="action_popup prompt" id="undelete_popup">
|
||||
<vbox>
|
||||
<description value="Un-delete" class="promptheader"/>
|
||||
<description value="Do you want to Un-delete this event as an exception, or un-delete the whole series?"/>
|
||||
<hbox>
|
||||
<button label="Un-delete exception" id="undelete" onclick="nm_submit_popup(this); return false;"/>
|
||||
<button label="Un-delete series" id="undelete_series" onclick="nm_popup_action.id = 'undelete_series'; nm_submit_popup(this); return false;"/>
|
||||
<buttononly label="Cancel" onclick="nm_hide_popup(this,'undelete_popup');"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</box>
|
||||
</hbox>
|
||||
<description/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<styles>
|
||||
|
Loading…
Reference in New Issue
Block a user