Compare commits
7 Commits
Author | SHA1 | Date |
---|---|---|
Bram de Leeuw | 9a8cc3792e | |
Guy Sartorelli | 741a20272a | |
Guy Sartorelli | dd0f49adc1 | |
Steve Boyd | 0add9ff375 | |
James Cocker | 3006076c82 | |
Sabina Talipova | 7c6c209a17 | |
Guy Sartorelli | f7f15e9903 |
|
@ -0,0 +1,17 @@
|
|||
name: Keepalive
|
||||
|
||||
on:
|
||||
# At 11:55 PM UTC, on day 20 of the month
|
||||
schedule:
|
||||
- cron: '55 23 20 * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
keepalive:
|
||||
name: Keepalive
|
||||
# Only run cron on the colymba account
|
||||
if: (github.event_name == 'schedule' && github.repository_owner == 'colymba') || (github.event_name != 'schedule')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Keepalive
|
||||
uses: silverstripe/gha-keepalive@v1
|
|
@ -0,0 +1,17 @@
|
|||
name: Merge-up
|
||||
|
||||
on:
|
||||
# At 11:55 PM UTC, only on Friday
|
||||
schedule:
|
||||
- cron: '55 23 * * 5'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
merge-up:
|
||||
name: Merge-up
|
||||
# Only run cron on the colymba account
|
||||
if: (github.event_name == 'schedule' && github.repository_owner == 'colymba') || (github.event_name != 'schedule')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Merge-up
|
||||
uses: silverstripe/gha-merge-up@v1
|
|
@ -0,0 +1,17 @@
|
|||
name: Update JS
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
# Run on a schedule of once per quarter
|
||||
schedule:
|
||||
- cron: '55 23 1 */3 *'
|
||||
|
||||
jobs:
|
||||
update-js:
|
||||
name: Update JS
|
||||
# Only run cron on the colymba account
|
||||
if: (github.event_name == 'schedule' && github.repository_owner == 'colymba') || (github.event_name != 'schedule')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Update JS
|
||||
uses: silverstripe/gha-update-js@v1
|
|
@ -1,69 +0,0 @@
|
|||
inherit: true
|
||||
|
||||
checks:
|
||||
php:
|
||||
verify_property_names: true
|
||||
verify_argument_usable_as_reference: true
|
||||
verify_access_scope_valid: true
|
||||
useless_calls: true
|
||||
use_statement_alias_conflict: true
|
||||
variable_existence: true
|
||||
unused_variables: true
|
||||
unused_properties: true
|
||||
unused_parameters: true
|
||||
unused_methods: true
|
||||
unreachable_code: true
|
||||
too_many_arguments: true
|
||||
sql_injection_vulnerabilities: true
|
||||
simplify_boolean_return: true
|
||||
side_effects_or_types: true
|
||||
security_vulnerabilities: true
|
||||
return_doc_comments: true
|
||||
return_doc_comment_if_not_inferrable: true
|
||||
require_scope_for_properties: true
|
||||
require_scope_for_methods: true
|
||||
require_php_tag_first: true
|
||||
psr2_switch_declaration: true
|
||||
psr2_class_declaration: true
|
||||
property_assignments: true
|
||||
prefer_while_loop_over_for_loop: true
|
||||
precedence_mistakes: true
|
||||
precedence_in_conditions: true
|
||||
phpunit_assertions: true
|
||||
php5_style_constructor: true
|
||||
parse_doc_comments: true
|
||||
parameter_non_unique: true
|
||||
parameter_doc_comments: true
|
||||
param_doc_comment_if_not_inferrable: true
|
||||
optional_parameters_at_the_end: true
|
||||
one_class_per_file: true
|
||||
no_unnecessary_if: true
|
||||
no_trailing_whitespace: true
|
||||
no_property_on_interface: true
|
||||
no_non_implemented_abstract_methods: true
|
||||
no_error_suppression: true
|
||||
no_duplicate_arguments: true
|
||||
no_commented_out_code: true
|
||||
newline_at_end_of_file: true
|
||||
missing_arguments: true
|
||||
method_calls_on_non_object: true
|
||||
instanceof_class_exists: true
|
||||
foreach_traversable: true
|
||||
fix_line_ending: true
|
||||
fix_doc_comments: true
|
||||
duplication: true
|
||||
deprecated_code_usage: true
|
||||
deadlock_detection_in_loops: true
|
||||
code_rating: true
|
||||
closure_use_not_conflicting: true
|
||||
catch_class_exists: true
|
||||
blank_line_after_namespace_declaration: false
|
||||
avoid_multiple_statements_on_same_line: true
|
||||
avoid_duplicate_types: true
|
||||
avoid_conflicting_incrementers: true
|
||||
avoid_closing_tag: true
|
||||
assignment_of_null_return: true
|
||||
argument_type_checks: true
|
||||
|
||||
filter:
|
||||
paths: [code/*, tests/*]
|
26
README.md
26
README.md
|
@ -1,36 +1,22 @@
|
|||
:warning: I haven't been able to give as much love as I would like to these repos as they deserve. If you have time and are interested to help maintain them, give me a shout. :rotating_light:
|
||||
# GridField Bulk Editing Tools
|
||||
|
||||
GridField Bulk Editing Tools
|
||||
============================
|
||||
:warning: I haven't been able to give as much love as I would like to these repos as they deserve. If you have time and are interested to help maintain them, give me a shout. :rotating_light:
|
||||
|
||||
[![Latest Stable Version](https://poser.pugx.org/colymba/gridfield-bulk-editing-tools/v/stable.svg)](https://github.com/colymba/GridFieldBulkEditingTools/releases)
|
||||
[![Latest Unstable Version](https://poser.pugx.org/colymba/gridfield-bulk-editing-tools/v/unstable.svg)](https://github.com/colymba/GridFieldBulkEditingTools/tree/master)
|
||||
[![License](https://poser.pugx.org/colymba/gridfield-bulk-editing-tools/license.svg)](#license-and-copyright)
|
||||
|
||||
Set of SilverStripe 4 GridField components to facilitate bulk file upload & record editing.
|
||||
|
||||
Set of SilverStripe CMS GridField components to facilitate bulk file upload & record editing.
|
||||
|
||||
## Components:
|
||||
* [Bulk Upload](#bulk-upload): Upload multiple images or files at once into DataObjects
|
||||
* [Bulk Manager](#bulk-manager): Delete, Unlink, Edit (and more) multiple records at once
|
||||
|
||||
## Requirements
|
||||
* SilverStripe 4.0 (master / 3.+)
|
||||
* SilverStripe 3.1 (version 2.+ / 1.+)
|
||||
* Silverstripe 3.0 (version 0.5)
|
||||
|
||||
## Installation
|
||||
`composer require colymba/gridfield-bulk-editing-tools`
|
||||
|
||||
## 3.0.0 deprecations
|
||||
The 3.x versions of this module require SilverStripe 4.x+, and PHP 5.5 or above:
|
||||
|
||||
* Namespaces are implemented, and some class names have changed (see `.upgrade.yml` for mapping)
|
||||
|
||||
## 2.0.0 deprecations
|
||||
Major deprections in latest 2.0.0 release:
|
||||
* The `GridFieldBulkImageUpload` has been renamed to `GridFieldBulkUpload`.
|
||||
* `onBulkImageUpload` callback has been renamed to `onBulkUpload`
|
||||
```sh
|
||||
composer require colymba/gridfield-bulk-editing-tools
|
||||
```
|
||||
|
||||
## Bulk Upload
|
||||
Upload multiple images or files at once into DataObjects. Perfect for galleries and the like.
|
||||
|
|
|
@ -4,7 +4,6 @@ namespace Colymba\BulkManager\BulkAction;
|
|||
|
||||
use Colymba\BulkManager\BulkAction\Handler;
|
||||
use SilverStripe\Control\Controller;
|
||||
use SilverStripe\Core\Convert;
|
||||
use SilverStripe\Control\HTTPResponse;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\Form;
|
||||
|
@ -373,9 +372,9 @@ class EditHandler extends Handler
|
|||
Requirements::add_i18n_javascript('colymba/gridfield-bulk-editing-tools:lang');
|
||||
|
||||
if ($this->request->isAjax()) {
|
||||
$response = new HTTPResponse(
|
||||
Convert::raw2json(array('Content' => $form->forAjaxTemplate()->getValue()))
|
||||
);
|
||||
$response = new HTTPResponse(json_encode([
|
||||
'Content' => $form->forAjaxTemplate()->getValue()
|
||||
]));
|
||||
$response->addHeader('X-Pjax', 'Content');
|
||||
$response->addHeader('Content-Type', 'text/json');
|
||||
$response->addHeader('X-Title', 'SilverStripe - Bulk ' . $this->gridField->list->dataClass . ' Editing');
|
||||
|
|
|
@ -7,7 +7,6 @@ use SilverStripe\Control\Controller;
|
|||
use SilverStripe\Control\RequestHandler;
|
||||
use SilverStripe\Control\HTTPRequest;
|
||||
use SilverStripe\Control\HTTPResponse;
|
||||
use SilverStripe\Core\Convert;
|
||||
use SilverStripe\Versioned\RecursivePublishable;
|
||||
|
||||
use SilverStripe\AssetAdmin\Controller\AssetAdmin;
|
||||
|
@ -114,7 +113,7 @@ class BulkUploadHandler extends RequestHandler
|
|||
|
||||
if ($uploadResponse->getStatusCode() == 200)
|
||||
{
|
||||
$responseData = Convert::json2array($uploadResponse->getBody());
|
||||
$responseData = json_decode($uploadResponse->getBody(), true);
|
||||
$responseData = array_shift($responseData);
|
||||
|
||||
$record = $this->createDataObject($responseData['id']);
|
||||
|
|
Loading…
Reference in New Issue