Improve (AJAX) deletion of StockArticles

This commit is contained in:
Julius 2013-02-25 11:12:28 +01:00
parent 5dc3fc30ad
commit 0e1bd5c75e
4 changed files with 21 additions and 10 deletions

View file

@ -1,7 +1,5 @@
-# please polish the following line if you know how
var errorDiv = $('<div class="alert fade in alert-error"><a class="close" data-dismiss="alert" href="#">×</a></div>');
-# next line, createTextNode called by .text(textString) helps escaping for html, but what about ' signs?
errorDiv.text('#{fail_msg}');
-# please polish the following line if you know how, same in view destroy
var errorDiv = $('<div class="alert fade in alert-error"><a class="close" data-dismiss="alert" href="#">x</a></div>');
errorDiv.append(document.createTextNode('#{j(fail_msg)}'));
$('div.container-fluid').prepend(errorDiv);