Merge branch 'develop' of https://github.com/getgrav/grav-plugin-admin into develop

This commit is contained in:
Andy Miller
2015-09-02 15:31:21 -06:00
7 changed files with 26 additions and 10 deletions

View File

@@ -345,7 +345,9 @@ class Admin
public function gpm() public function gpm()
{ {
if (!$this->gpm) { if (!$this->gpm) {
try {
$this->gpm = new GPM(); $this->gpm = new GPM();
} catch (\Exception $e) {}
} }
return $this->gpm; return $this->gpm;

View File

@@ -517,7 +517,7 @@ class AdminController
$grav_limit = $config->get('system.media.upload_limit', 0); $grav_limit = $config->get('system.media.upload_limit', 0);
// You should also check filesize here. // You should also check filesize here.
if ($grav_limit > 0 && $_FILES['file']['size'] > grav_limit) { if ($grav_limit > 0 && $_FILES['file']['size'] > $grav_limit) {
$this->admin->json_response = ['status' => 'error', 'message' => $this->admin->translate('PLUGIN_ADMIN.EXCEEDED_GRAV_FILESIZE_LIMIT')]; $this->admin->json_response = ['status' => 'error', 'message' => $this->admin->translate('PLUGIN_ADMIN.EXCEEDED_GRAV_FILESIZE_LIMIT')];
return; return;
} }

View File

@@ -1360,6 +1360,11 @@ tr {
#popularity .ct-chart .ct-chart-bar { #popularity .ct-chart .ct-chart-bar {
padding: 10px; } padding: 10px; }
#latest .page-title, #latest .page-route {
overflow: scroll; }
#latest .last-modified {
padding-left: 10px; }
.pages-list { .pages-list {
list-style: none; list-style: none;
margin: 0; margin: 0;

File diff suppressed because one or more lines are too long

View File

@@ -519,8 +519,6 @@ $update-height: 3rem;
stroke: rgba($white, 0.2) !important; stroke: rgba($white, 0.2) !important;
} }
} }
} }
} }
@@ -531,8 +529,14 @@ $update-height: 3rem;
} }
} }
// Remodal Styling #latest {
.page-title, .page-route {
overflow: scroll;
}
.last-modified {
padding-left: 10px;
}
}

View File

@@ -134,7 +134,7 @@
<h1>{{ "PLUGIN_ADMIN.LATEST_PAGE_UPDATES"|tu }}</h1> <h1>{{ "PLUGIN_ADMIN.LATEST_PAGE_UPDATES"|tu }}</h1>
<table> <table>
{% for latest in admin.latestPages %} {% for latest in admin.latestPages %}
<tr><td class="double"><a href="{{ base_url }}/pages/{{ latest.route|trim('/') }}"><i class="fa fa-fw fa-file-o"></i> {{ latest.title }}</a></td><td class="double">{{ latest.route }}</td><td><b>{{ latest.modified|nicetime }}</b></td></tr> <tr><td class="double page-title"><a href="{{ base_url }}/pages/{{ latest.route|trim('/') }}"><i class="fa fa-fw fa-file-o"></i> {{ latest.title }}</a></td><td class="double page-route">{{ latest.route }}</td><td><b class="last-modified">{{ latest.modified|nicetime }}</b></td></tr>
{% endfor %} {% endfor %}
</table> </table>
</div> </div>

View File

@@ -124,7 +124,12 @@
var dropzone = new Dropzone("#gravDropzone", { url: URI + '/task{{ config.system.param_sep }}addmedia', createImageThumbnails: { thumbnailWidth: 150} }); var dropzone = new Dropzone("#gravDropzone", { url: URI + '/task{{ config.system.param_sep }}addmedia', createImageThumbnails: { thumbnailWidth: 150} });
$("#gravDropzone").delegate('.dz-preview', 'dragstart', function(e){ $("#gravDropzone").delegate('.dz-preview', 'dragstart', function(e){
var uri = $(this).find('.dz-filename').text(), shortcode = '![](' + encodeURI(uri) + ')'; var uri = $(this).find('.dz-filename').text();
var shortcode = '![](' + encodeURI(uri) + ')';
if (!uri.match(/\.(jpg|jpeg|png|gif)$/)) {
shortcode = '[' + uri + '](' + encodeURI(uri) + ')';
}
dropzone.disable(); dropzone.disable();
$(this).addClass('hide-backface'); $(this).addClass('hide-backface');
e.originalEvent.dataTransfer.effectAllowed = 'copy'; e.originalEvent.dataTransfer.effectAllowed = 'copy';