solucionado bug en js y elimine el ultimo hr

This commit is contained in:
Daniel Cortés
2019-10-15 18:42:54 -03:00
parent f869c4686a
commit 1d30b29af3
3 changed files with 22 additions and 16 deletions

11
public/js/admin.js vendored
View File

@@ -97,7 +97,16 @@ posts_edit_regexp = new RegExp("/admin/posts/\\d+/edit");
now_edit_regexp = new RegExp("/admin/now/\\d+/edit"); now_edit_regexp = new RegExp("/admin/now/\\d+/edit");
projects_edit_regexp = new RegExp("/admin/projects/\\d+/edit"); projects_edit_regexp = new RegExp("/admin/projects/\\d+/edit");
setups_edit_regexp = new RegExp("/admin/setups/\\d+/edit"); setups_edit_regexp = new RegExp("/admin/setups/\\d+/edit");
if (window.location.pathname === "/admin/posts" || window.location.pathname === "/admin/posts/create" || window.location.pathname.match(posts_edit_regexp)) document.getElementById("posts-link").classList.add("pure-menu-highlight");else if (window.location.pathname === "/admin/now" || window.location.pathname === "/admin/now/create" || window.location.pathname.match(now_edit_regexp)) document.getElementById("now-link").classList.add("pure-menu-highlight");else if (window.location.pathname === "/admin/projects" || window.location.pathname === "/admin/projects/create" || window.location.pathname.match(projects_edit_regexp)) document.getElementById("projects-link").classList.add("pure-menu-highlight");else if (window.location.pathname === "/admin/setups" || window.location.pathname === "/admin/setups/create" || window.location.pathname.match(setups_edit_regexp)) document.getElementById("setup-link").classList.add("pure-menu-highlight");
if (window.location.pathname === "/admin/posts" || window.location.pathname === "/admin/posts/create" || window.location.pathname.match(posts_edit_regexp)) {
document.getElementById("posts-link").classList.add("menu-highlight");
} else if (window.location.pathname === "/admin/now" || window.location.pathname === "/admin/now/create" || window.location.pathname.match(now_edit_regexp)) {
document.getElementById("now-link").classList.add("menu-highlight");
} else if (window.location.pathname === "/admin/projects" || window.location.pathname === "/admin/projects/create" || window.location.pathname.match(projects_edit_regexp)) {
document.getElementById("projects-link").classList.add("menu-highlight");
} else if (window.location.pathname === "/admin/setups" || window.location.pathname === "/admin/setups/create" || window.location.pathname.match(setups_edit_regexp)) {
document.getElementById("setup-link").classList.add("menu-highlight");
}
/***/ }), /***/ }),

26
resources/js/admin.js vendored
View File

@@ -7,26 +7,24 @@ if(
window.location.pathname === "/admin/posts" || window.location.pathname === "/admin/posts" ||
window.location.pathname === "/admin/posts/create" || window.location.pathname === "/admin/posts/create" ||
window.location.pathname.match(posts_edit_regexp) window.location.pathname.match(posts_edit_regexp)
) ){
document.getElementById("posts-link").classList.add("pure-menu-highlight"); document.getElementById("posts-link").classList.add("menu-highlight");
} else if(
else if(
window.location.pathname === "/admin/now" || window.location.pathname === "/admin/now" ||
window.location.pathname === "/admin/now/create" || window.location.pathname === "/admin/now/create" ||
window.location.pathname.match(now_edit_regexp) window.location.pathname.match(now_edit_regexp)
) ){
document.getElementById("now-link").classList.add("pure-menu-highlight"); document.getElementById("now-link").classList.add("menu-highlight");
} else if(
else if(
window.location.pathname === "/admin/projects" || window.location.pathname === "/admin/projects" ||
window.location.pathname === "/admin/projects/create" || window.location.pathname === "/admin/projects/create" ||
window.location.pathname.match(projects_edit_regexp) window.location.pathname.match(projects_edit_regexp)
) ){
document.getElementById("projects-link").classList.add("pure-menu-highlight"); document.getElementById("projects-link").classList.add("menu-highlight");
} else if(
else if(
window.location.pathname === "/admin/setups" || window.location.pathname === "/admin/setups" ||
window.location.pathname === "/admin/setups/create" || window.location.pathname === "/admin/setups/create" ||
window.location.pathname.match(setups_edit_regexp) window.location.pathname.match(setups_edit_regexp)
) ){
document.getElementById("setup-link").classList.add("pure-menu-highlight"); document.getElementById("setup-link").classList.add("menu-highlight");
}

View File

@@ -12,5 +12,4 @@
</header> </header>
{!! $parse->text($now->md) !!} {!! $parse->text($now->md) !!}
</article> </article>
<hr/>
@endsection @endsection