From db781fab15984a86c2144f12c6506f9b3af3943f Mon Sep 17 00:00:00 2001 From: Anton Shevchuk Date: Wed, 8 Nov 2017 15:30:38 +0200 Subject: [PATCH 1/5] Updated codestyle --- public/js/bluz.media.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/js/bluz.media.js b/public/js/bluz.media.js index 273a4aa..27bbe54 100644 --- a/public/js/bluz.media.js +++ b/public/js/bluz.media.js @@ -8,7 +8,7 @@ * - push.data.bluz */ /* global define,require*/ -define(['jquery', 'bluz', 'bluz.notify', 'dropzone'], function ($, bluz, notify, Dropzone) { +define(['jquery', 'bluz', 'bluz.ajax', 'bluz.notify', 'dropzone'], function ($, bluz, ajax, notify, Dropzone) { 'use strict'; // Media object @@ -36,7 +36,7 @@ define(['jquery', 'bluz', 'bluz.notify', 'dropzone'], function ($, bluz, notify, // hookup for delete click media.$previews.on('success.bluz.ajax', 'a[data-ajax-method=delete]', function () { - $(this).parents('div.image-preview').remove(); + $(this).parents('div.card').remove(); }); }; @@ -59,11 +59,11 @@ define(['jquery', 'bluz', 'bluz.notify', 'dropzone'], function ($, bluz, notify, }) .on('processing', () => { // use element similar to bluz.ajax - bluz.showLoading(); + ajax.showLoading(); media.$progress.removeAttr('hidden'); }) .on('complete', () => { - bluz.hideLoading(); + ajax.hideLoading(); media.$progress.attr('hidden', '1'); media.$upload.stop(true, true); }) From 099889b0269b8a709effa81d97f2e514adf0b7dc Mon Sep 17 00:00:00 2001 From: Anton Shevchuk Date: Mon, 13 Nov 2017 10:07:33 +0200 Subject: [PATCH 2/5] Migrate to PHP 7.1 --- .travis.yml | 1 - .../modules/media/controllers/crud.php | 2 +- application/modules/media/views/crud.phtml | 4 +++- .../modules/media/controllers/CrudTest.php | 22 ++++++++++++------- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index b2748c1..580ed9d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: php php: - - 7.0 - 7.1 - 7.2 - master diff --git a/application/modules/media/controllers/crud.php b/application/modules/media/controllers/crud.php index da45044..da415ed 100644 --- a/application/modules/media/controllers/crud.php +++ b/application/modules/media/controllers/crud.php @@ -57,7 +57,7 @@ $result = $crudController->run(); // back to grid after create or update media file - if (Request::isPost() || Request::isPut()) { + if ((Request::isPost() || Request::isPut()) && !Request::isXmlHttpRequest()) { Response::reload(); } diff --git a/application/modules/media/views/crud.phtml b/application/modules/media/views/crud.phtml index 90e7fef..6cb9268 100644 --- a/application/modules/media/views/crud.phtml +++ b/application/modules/media/views/crud.phtml @@ -4,7 +4,9 @@ */ ?> -
+>