Skip to content

Instantly share code, notes, and snippets.

@godmar
Created November 12, 2015 17:56
Show Gist options
  • Save godmar/e5c2eeeb3e38693f6497 to your computer and use it in GitHub Desktop.
Save godmar/e5c2eeeb3e38693f6497 to your computer and use it in GitHub Desktop.
// fix for https://gist.github.com/mreidsma/69a42480f157647cd710#file-summonalerts-js-L4
// Set the text of the alert
var message = 'The Database of Broken Dreams is currently unavailable.';
// Turn the alert on or off (true = on, false = off)
var showAlert = false;
angular.module('summonApp.directives').directive("resultsFeed",
function() {
return {
link: function (scope, iElement) {
if (showAlert)
iElement
.find('ul.list-unstyled')
.prepend('<div style="color: #a94442;background-color: #f2dede;border-color: #ebccd1;padding: 15px;margin-bottom: 20px;border: 1px solid transparent;border-radius: 4px;">' + message + '</div>');
}
}
});
@shukinn
Copy link

shukinn commented Mar 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment