parent
72a95d9088
commit
4bae9b77e4
@ -0,0 +1,10 @@ |
||||
<component name="InspectionProjectProfileManager"> |
||||
<profile version="1.0"> |
||||
<option name="myName" value="Project Default" /> |
||||
<inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true"> |
||||
<Languages> |
||||
<language minSize="70" name="JavaScript" /> |
||||
</Languages> |
||||
</inspection_tool> |
||||
</profile> |
||||
</component> |
@ -1,7 +1,7 @@ |
||||
module.exports = (e, target, window) => { |
||||
window.kade.context = true; |
||||
let ctx = document.getElementById('ctx'); |
||||
ctx.style.left = `${e.pageX}px`; |
||||
ctx.style.top = `${e.pageY}px`; |
||||
ctx.style.display = 'block'; |
||||
ctx.style.left = `${Math.min(e.pageX, (window.innerWidth - (ctx.clientWidth + 2)))}px`; |
||||
ctx.style.top = `${Math.min(e.pageY, (window.innerHeight - (ctx.clientHeight + 2)))}px`; |
||||
}; |
@ -0,0 +1,11 @@ |
||||
const transit = require("./transit"); |
||||
|
||||
module.exports = (...modals) => { |
||||
let tc = modals.length ? modals : window.kade.modals; |
||||
tc.forEach(modal => { |
||||
if (window.kade.modals.includes(modal)) { |
||||
transit(modal, false); |
||||
document.getElementById(modal).remove(); |
||||
} |
||||
}); |
||||
}; |
@ -0,0 +1,7 @@ |
||||
const transit = require("./transit"); |
||||
|
||||
module.exports = (id) => { |
||||
document.getElementById('modal-block').remove(); |
||||
window.kade.modal = false; |
||||
transit(id, false); |
||||
}; |
@ -0,0 +1,9 @@ |
||||
const transit = require('./transit'); |
||||
|
||||
module.exports = (id) => { |
||||
let bl = document.createElement('div'); |
||||
bl.id = 'modal-block'; |
||||
document.body.appendChild(bl); |
||||
window.kade.modal = true; |
||||
transit(id, true); |
||||
}; |
@ -0,0 +1,4 @@ |
||||
module.exports = (id, open=false) => { |
||||
if (open && !window.kade.modals.includes(id)) {window.kade.modals.push(id);} |
||||
else if (window.kade.modals.includes(id)) {window.kade.modals.splice(window.kade.modals.indexOf(id), 1);} |
||||
}; |
Loading…
Reference in new issue