Implement modal without bootstrap.js and jQuery

This commit is contained in:
Lorenz Hübschle-Schneider 2014-07-05 14:36:58 +01:00
commit 23fb4da05a
3 changed files with 43 additions and 7 deletions

View file

@ -1080,6 +1080,15 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
}
};
// Modal toggles
$scope.toggleModal = function(elementId) {
var element = document.getElementById(elementId);
element.setAttribute('data-state', element.getAttribute('data-state') === "hidden" ? "visible" : "hidden");
};
$scope.preventModalToggle = function(elementId, event) {
event.stopPropagation();
};
/* Function gets called from bufferLineAdded code if user should be notified */
$rootScope.createHighlight = function(buffer, message) {