|
|
|
@ -1310,10 +1310,19 @@ let recipeManager = (function() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function apply(ev) {
|
|
|
|
function apply(ev) {
|
|
|
|
if ( ev.target.classList.contains('expander') ) {
|
|
|
|
if (
|
|
|
|
|
|
|
|
ev.target.classList.contains('expander') ||
|
|
|
|
|
|
|
|
ev.target.classList.contains('name')
|
|
|
|
|
|
|
|
) {
|
|
|
|
ev.currentTarget.classList.toggle('expanded');
|
|
|
|
ev.currentTarget.classList.toggle('expanded');
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
|
|
|
ev.target.classList.contains('importer') === false &&
|
|
|
|
|
|
|
|
ev.target.classList.contains('committer') === false
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
let root = ev.currentTarget;
|
|
|
|
let root = ev.currentTarget;
|
|
|
|
let ruleset = root.querySelector('.ruleset');
|
|
|
|
let ruleset = root.querySelector('.ruleset');
|
|
|
|
let commit = ev.target.classList.contains('committer');
|
|
|
|
let commit = ev.target.classList.contains('committer');
|
|
|
|
@ -1326,6 +1335,7 @@ let recipeManager = (function() {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
updateMatrixSnapshot
|
|
|
|
updateMatrixSnapshot
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
root.classList.remove('mustImport');
|
|
|
|
if ( commit ) {
|
|
|
|
if ( commit ) {
|
|
|
|
root.classList.remove('mustCommit');
|
|
|
|
root.classList.remove('mustCommit');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -1341,6 +1351,7 @@ let recipeManager = (function() {
|
|
|
|
recipe.ruleset.replace(reScopeAlias, '$1' + details.scope + '$2'),
|
|
|
|
recipe.ruleset.replace(reScopeAlias, '$1' + details.scope + '$2'),
|
|
|
|
ul
|
|
|
|
ul
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
li.classList.toggle('mustImport', recipe.mustImport === true);
|
|
|
|
li.classList.toggle('mustCommit', recipe.mustCommit === true);
|
|
|
|
li.classList.toggle('mustCommit', recipe.mustCommit === true);
|
|
|
|
li.addEventListener('click', apply);
|
|
|
|
li.addEventListener('click', apply);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -1448,8 +1459,10 @@ function dropDownMenuShow(button) {
|
|
|
|
var menu = menuOverlay.querySelector('.dropdown-menu');
|
|
|
|
var menu = menuOverlay.querySelector('.dropdown-menu');
|
|
|
|
var menuRect = menu.getBoundingClientRect();
|
|
|
|
var menuRect = menu.getBoundingClientRect();
|
|
|
|
var menuLeft = butnNormalLeft * (viewRect.width - menuRect.width);
|
|
|
|
var menuLeft = butnNormalLeft * (viewRect.width - menuRect.width);
|
|
|
|
menu.style.left = menuLeft.toFixed(0) + 'px';
|
|
|
|
|
|
|
|
menu.style.top = butnRect.bottom + 'px';
|
|
|
|
menu.style.top = butnRect.bottom + 'px';
|
|
|
|
|
|
|
|
if ( menuOverlay.classList.contains('dropdown-menu-centered') === false ) {
|
|
|
|
|
|
|
|
menu.style.left = menuLeft.toFixed(0) + 'px';
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function dropDownMenuHide() {
|
|
|
|
function dropDownMenuHide() {
|
|
|
|
|