Mercurial > kallithea
diff rhodecode/public/js/rhodecode.js @ 1717:7ff304d3028f beta
Notification fixes
- email prefix added to .ini files
- html templates emails
- rewrote email system to use some parts from pyramid_mailer
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 25 Nov 2011 17:41:42 +0200 |
parents | cac5109ac3b6 |
children | d6c6ea17b100 |
line wrap: on
line diff
--- a/rhodecode/public/js/rhodecode.js Wed Nov 23 22:46:14 2011 +0200 +++ b/rhodecode/public/js/rhodecode.js Fri Nov 25 17:41:42 2011 +0200 @@ -131,6 +131,20 @@ ) ); +var _run_callbacks = function(callbacks){ + if (callbacks !== undefined){ + var _l = callbacks.length; + for (var i=0;i<_l;i++){ + var func = callbacks[i]; + if(typeof(func)=='function'){ + try{ + func(); + }catch (err){}; + } + } + } +} + /** * Partial Ajax Implementation * @@ -564,11 +578,14 @@ } }; -var deleteNotification = function(url, notification_id){ +var deleteNotification = function(url, notification_id,callbacks){ var callback = { success:function(o){ var obj = YUD.get(String("notification_"+notification_id)); - obj.parentNode.removeChild(obj); + if(obj.parentNode !== undefined){ + obj.parentNode.removeChild(obj); + } + _run_callbacks(callbacks); }, failure:function(o){ alert("error");