diff options
| author | Nick Palmer <nick@sluggardy.net> | 2010-12-07 21:58:42 -0500 |
|---|---|---|
| committer | Nick Palmer <nick@sluggardy.net> | 2010-12-07 21:58:42 -0500 |
| commit | e48c810be8e280dc3fc443a2c37a9bd13e39f7f4 (patch) | |
| tree | 5b8fd1ca1873bbe0d716eb5f89a136137e53b49e | |
| parent | 0271a5f58a9b44225e9e8208fc1b657cbeb9548f (diff) | |
| download | util-e48c810be8e280dc3fc443a2c37a9bd13e39f7f4.tar.gz util-e48c810be8e280dc3fc443a2c37a9bd13e39f7f4.tar.bz2 util-e48c810be8e280dc3fc443a2c37a9bd13e39f7f4.zip | |
Add delete functionality.
| -rw-r--r-- | javascript/JQuery.BitMultiForm.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/javascript/JQuery.BitMultiForm.js b/javascript/JQuery.BitMultiForm.js index d4e8b80..616900f 100644 --- a/javascript/JQuery.BitMultiForm.js +++ b/javascript/JQuery.BitMultiForm.js @@ -1,5 +1,25 @@ var $jq = jQuery.noConflict();
BitMultiForm = {
+ 'deleteContent':function(content_id, message, id) {
+ var answer = confirm(message);
+ if (answer){
+ BitBase.showSpinner();
+ jQuery.ajax({
+ url:BitSystem.urls.liberty + 'ajax_delete.php',
+ type:'POST',
+ context:document.body,
+ data: {content_id: content_id},
+ success:function(dom){
+ BitBase.hideSpinner();
+ var result = jQuery.parseJSON(dom);
+ alert(result.message);
+ if (result.status == 1) {
+ jQuery( '#'+id ).css('display', 'none');
+ }
+ }
+ });
+ }
+ },
'addList':function (template,value,title,target,max) {
// Hide the option div
$jq( '#'+template.replace("temp", value) ).css('display','none');
|
