Changed when revisions are saved and update changelog input

Revisions are now saved when te page content is originally saved whereas before they were saved on the next update to the page.
This commit is contained in:
Dan Brown
2016-07-10 12:12:52 +01:00
parent 8a9a8dfae5
commit 7215392784
8 changed files with 73 additions and 31 deletions

View File

@ -157,9 +157,22 @@ module.exports = function (ngApp, events) {
return {
restrict: 'A',
link: function (scope, element, attrs) {
var menu = element.find('ul');
const menu = element.find('ul');
element.find('[dropdown-toggle]').on('click', function () {
menu.show().addClass('anim menuIn');
let inputs = menu.find('input');
let hasInput = inputs.length > 0;
if (hasInput) {
inputs.first().focus();
element.on('keypress', 'input', event => {
if (event.keyCode === 13) {
event.preventDefault();
menu.hide();
menu.removeClass('anim menuIn');
return false;
}
});
}
element.mouseleave(function () {
menu.hide();
menu.removeClass('anim menuIn');