Styled Nav Editor
Created new CSS styles for dash nav editor and updated the appropriate controller scripts. Also updated the icons for the main nav.toggle-buttons-#109
parent
1b89d1d072
commit
78bfe4596b
@ -0,0 +1,34 @@
|
||||
article[role="navigation"] {
|
||||
width: 100%;
|
||||
max-width: 900px;
|
||||
margin: 100px auto;
|
||||
}
|
||||
|
||||
article[role="navigation"] > section > div.nav-item {
|
||||
display: block;
|
||||
width: 98%;
|
||||
background: var(--white);
|
||||
border-radius: 3px;
|
||||
color: var(--highlight);
|
||||
margin: 0 0 10px;
|
||||
font-size: 1.5em;
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
article[role="navigation"] > section > div.nav-item > label {
|
||||
display: inline-block;
|
||||
padding: 5px;
|
||||
margin: 12px 0 0 10px;
|
||||
vertical-align: top;
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
article[role="navigation"] > section > div.nav-item > div#nav-btns {
|
||||
float: right;
|
||||
padding: 5px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
article[role="navigation"] > section > div.nav-item > div#nav-btns button {
|
||||
margin-left: 5px;
|
||||
}
|
@ -1,37 +1,35 @@
|
||||
export default class NavActions {
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
constructor() {}
|
||||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
syncMenu() {
|
||||
let navData = [];
|
||||
let items = document.getElementById("nav-pages").children;
|
||||
for (let index = 0; index < items.length; index++) {
|
||||
navData.push({
|
||||
title: items[index].getElementsByTagName("label")[0].innerHTML,
|
||||
id: items[index].id,
|
||||
slug: items[index].getAttribute("data-slug"),
|
||||
uuid: items[index].getAttribute("data-uuid"),
|
||||
path: items[index].getAttribute("data-path")
|
||||
});
|
||||
}
|
||||
//--------------------------
|
||||
// constructor
|
||||
//--------------------------
|
||||
constructor() {}
|
||||
//--------------------------
|
||||
// methods
|
||||
//--------------------------
|
||||
syncMenu() {
|
||||
let navData = [];
|
||||
let items = document.getElementById('nav-items').children;
|
||||
for (let index = 0; index < items.length; index++) {
|
||||
navData.push({
|
||||
title: items[index].getElementsByTagName('label')[0].innerHTML,
|
||||
id: items[index].id,
|
||||
slug: items[index].getAttribute('data-slug'),
|
||||
uuid: items[index].getAttribute('data-uuid'),
|
||||
path: items[index].getAttribute('data-path')
|
||||
});
|
||||
}
|
||||
|
||||
let data = { menu: navData, remove: null };
|
||||
return new Promise(function (resolve) {
|
||||
resolve(data);
|
||||
});
|
||||
}
|
||||
let data = { menu: navData, remove: null };
|
||||
return new Promise(function (resolve) {
|
||||
resolve(data);
|
||||
});
|
||||
}
|
||||
|
||||
removeItem(id) {
|
||||
document
|
||||
.getElementById("nav-pages")
|
||||
.removeChild(document.getElementById(id));
|
||||
}
|
||||
removeItem(id) {
|
||||
document.getElementById('nav-items').removeChild(document.getElementById(id));
|
||||
}
|
||||
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
//--------------------------
|
||||
// event handlers
|
||||
//--------------------------
|
||||
}
|
||||
|
Loading…
Reference in New Issue