Compare commits

..

No commits in common. "6b2126e5a0787c7703120b0595419b46fb2e2857" and "031aca199c729a6bd9e0c46c76f1c589a659e84b" have entirely different histories.

7 changed files with 12 additions and 62 deletions

View file

@ -44,6 +44,8 @@ class Meta extends DashboardModel
'description' => 'The requested page cannot be found', 'description' => 'The requested page cannot be found',
'keywords' => '' 'keywords' => ''
]; ];
} else {
$page['title'] = $page['title'] . ' | ' . env('APP_NAME');
} }
} }

View file

@ -195,10 +195,7 @@ Create a model that extends the `DashboardModel` class and override variables th
#### DashboardModel variables #### DashboardModel variables
* `$dashboard_type`: The dashboard type: * `$dashboard_type`: The dashboard type (this can be `view` for a viewable table or `edit` for an editable list)
* `view`: Display a viewable table showing the data
* `edit`: Provides a list of rows and the option to edit their contents
* `list`: Allows another model to use this one to create an editable list of one or more items
* `$dashboard_heading`: This sets the heading that appears on the dashboard page; not setting this will use the model name * `$dashboard_heading`: This sets the heading that appears on the dashboard page; not setting this will use the model name
* `$export`: This enables a button that allows the table to be exported as a spreadsheet * `$export`: This enables a button that allows the table to be exported as a spreadsheet

View file

@ -324,7 +324,6 @@ function editItemInit() {
$datePickers = $(".date-picker"), $datePickers = $(".date-picker"),
$mkdEditors = $(".mkd-editor"), $mkdEditors = $(".mkd-editor"),
$lists = $(".list"), $lists = $(".list"),
$clearUploadButtons = $(".clear-upload"),
$token = $("#token"), $token = $("#token"),
model = $editItem.data("model"), model = $editItem.data("model"),
operation = $editItem.data("id") === "new" ? "create" : "update"; operation = $editItem.data("id") === "new" ? "create" : "update";
@ -525,14 +524,6 @@ function editItemInit() {
$submit.removeClass("no-input"); $submit.removeClass("no-input");
}; };
// initialize upload clearing buttons
$clearUploadButtons.on("click", function(e) {
const $this = $(this),
$upload = $this.parent().find("input").first();
$upload.val("");
});
// initialize image deletion // initialize image deletion
$(".edit-button.delete.image").on("click", function(e) { $(".edit-button.delete.image").on("click", function(e) {
const $this = $(this), const $this = $(this),

View file

@ -29,7 +29,7 @@ $enable-smooth-scroll: false;
[data-whatinput="initial"], [data-whatinput="keyboard"] { [data-whatinput="initial"], [data-whatinput="keyboard"] {
:focus { :focus {
outline: 1px dotted $c-accent; outline: 1px dotted $c-base;
} }
} }

View file

@ -1141,7 +1141,7 @@ form {
} }
} }
.text-display, .mkd-editor-container, input:not([type="file"]), textarea, select, .upload-wrapper { .text-display, .mkd-editor-container, input, textarea, select {
margin-bottom: pxrem(15); margin-bottom: pxrem(15);
} }
@ -1160,49 +1160,15 @@ form {
} }
} }
&.date-picker { &[type="file"] {
cursor: pointer;
}
}
.upload-wrapper {
display: flex;
height: $label-height;
align-items: center;
input {
overflow: hidden; overflow: hidden;
max-width: 100%; max-width: 100%;
height: $label-height;
font-size: pxrem(14); font-size: pxrem(14);
} }
.clear-upload { &.date-picker {
position: relative; cursor: pointer;
transform: rotate(45deg);
width: pxrem(20);
height: pxrem(20);
padding: 0px;
border: 0;
background-color: transparent;
&:before, &:after {
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
background-color: $c-dashboard-error;
}
&:before {
width: 2px;
height: 50%;
}
&:after {
width: 50%;
height: 2px;
}
} }
} }

View file

@ -162,9 +162,7 @@
$current_image = "/uploads/$model/img/$id-" . $column['name'] . '.' . $ext; $current_image = "/uploads/$model/img/$id-" . $column['name'] . '.' . $ext;
@endphp @endphp
<div class="upload-wrapper"> <input class="image-upload" type="file" data-column="{{ $column['name'] }}" data-model="{{ $model }}" data-id="{{ $id }}" />
<input class="image-upload" type="file" data-column="{{ $column['name'] }}" data-model="{{ $model }}" data-id="{{ $id }}" /> <button type="button" class="clear-upload" title="Clear Upload"></button>
</div>
@if(file_exists(base_path() . '/public' . $current_image)) @if(file_exists(base_path() . '/public' . $current_image))
<div id="current-image-{{ $column['name'] }}"> <div id="current-image-{{ $column['name'] }}">
@ -182,9 +180,7 @@
$current_file = "/uploads/$model/files/$id-" . $column['name'] . '.' . $column['ext']; $current_file = "/uploads/$model/files/$id-" . $column['name'] . '.' . $column['ext'];
@endphp @endphp
<div class="upload-wrapper"> <input class="file-upload" type="file" data-column="{{ $column['name'] }}" data-model="{{ $model }}" data-id="{{ $id }}" />
<input class="file-upload" type="file" data-column="{{ $column['name'] }}" data-model="{{ $model }}" data-id="{{ $id }}" /> <button type="button" class="clear-upload" title="Clear Upload"></button>
</div>
@if(file_exists(base_path() . '/public' . $current_file)) @if(file_exists(base_path() . '/public' . $current_file))
<div id="current-file-{{ $column['name'] }}"> <div id="current-file-{{ $column['name'] }}">

View file

@ -1,3 +1 @@
@extends('templates.error', [ @extends('templates.error')
'title' => 'Page Not Found'
])