uni los archivos de resources para menos transferencias

This commit is contained in:
Daniel Cortés
2019-10-16 18:37:55 -03:00
parent ec298fba05
commit 75d3a1f5ed
13 changed files with 3100 additions and 46 deletions

13
resources/js/admin.js vendored
View File

@@ -1,3 +1,5 @@
require("./app.js")
function is_admin_post_route() {
const posts_edit_regexp = new RegExp("/admin/posts/\\d+/edit");
return (
@@ -34,7 +36,7 @@ function is_admin_setups_route() {
);
}
function admin_highlight() {
function admin_highlight_route() {
if(is_admin_post_route()){
document.getElementById("posts-link").classList.add("menu-highlight");
}
@@ -49,7 +51,7 @@ function admin_highlight() {
}
}
function preview() {
function preview_md() {
const previewButton = document.getElementById("preview");
const mainButton = document.getElementById("main");
@@ -68,9 +70,6 @@ function preview() {
});
}
function main() {
admin_highlight();
preview();
}
window.onload = main;
admin_highlight_route();
preview_md();