Elgg  Version 3.0
Functions
admin_notices.js File Reference

Go to the source code of this file.

Functions

 define (function(require){var $=require('jquery');var Ajax=require('elgg/Ajax');var ajax=new Ajax();$(document).on('click', '.elgg-admin-notice-dismiss', function(e){e.preventDefault();var $li=$(this).closest('.elgg-item-object-admin_notice');$li.slideUp(100);function restore(){$li.show();}ajax.action(this.href).done(function(output, statusText, jqXHR){if(jqXHR.AjaxData.status==-1){restore();return;}if(!$('.elgg-item-object-admin_notice:visible').length){$('.elgg-admin-notices').remove();}}).fail(restore);});})
 Handle deleting admin notices. More...
 

Function Documentation

define ( function(require){var $=require('jquery');var Ajax=require('elgg/Ajax');var ajax=new Ajax();$(document).on('click', '.elgg-admin-notice-dismiss', function(e){e.preventDefault();var $li=$(this).closest('.elgg-item-object-admin_notice');$li.slideUp(100);function restore(){$li.show();}ajax.action(this.href).done(function(output, statusText, jqXHR){if(jqXHR.AjaxData.status==-1){restore();return;}if(!$('.elgg-item-object-admin_notice:visible').length){$('.elgg-admin-notices').remove();}}).fail(restore);});}  )

Handle deleting admin notices.