Compare commits

...

37 Commits

Author SHA1 Message Date
dependabot[bot] 88a08f5387
Merge pull request #257 from colymba/dependabot/npm_and_yarn/babel/traverse-7.23.2 2024-01-08 22:53:56 +00:00
Guy Sartorelli b9c04c7356
MNT Run module-standardiser (#262) 2023-12-21 16:10:45 +13:00
dependabot[bot] f2e46f3a06
Merge pull request #255 from colymba/dependabot/npm_and_yarn/postcss-8.4.31 2023-11-21 21:17:09 +00:00
dependabot[bot] dbde364f0d
Bump @babel/traverse from 7.20.12 to 7.23.2
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.20.12 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-18 17:32:28 +00:00
dependabot[bot] 01aac4b2db
Bump postcss from 8.4.21 to 8.4.31
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.21 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.21...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-07 17:15:08 +00:00
dependabot[bot] 4680186ecc
Merge pull request #253 from colymba/dependabot/npm_and_yarn/webpack-5.76.0 2023-09-29 01:15:19 +00:00
dependabot[bot] cf1e88af7b
Merge pull request #252 from colymba/dependabot/npm_and_yarn/http-cache-semantics-4.1.1 2023-09-29 01:15:15 +00:00
dependabot[bot] 38b6862f2d
Merge pull request #251 from colymba/dependabot/npm_and_yarn/word-wrap-1.2.5 2023-09-29 01:15:11 +00:00
dependabot[bot] b519c53412
Merge pull request #249 from colymba/dependabot/npm_and_yarn/js-yaml-3.14.1 2023-09-29 01:09:02 +00:00
dependabot[bot] 2c6411605f
Merge pull request #250 from colymba/dependabot/npm_and_yarn/kind-of-6.0.3 2023-09-29 01:08:49 +00:00
dependabot[bot] b0ef21dfcc
Merge pull request #248 from colymba/dependabot/npm_and_yarn/semver-6.3.1 2023-09-29 01:08:10 +00:00
dependabot[bot] e7f7253ced
Bump webpack from 5.75.0 to 5.76.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.75.0 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.75.0...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-29 01:03:49 +00:00
dependabot[bot] 8374146d8c
Bump http-cache-semantics from 4.1.0 to 4.1.1
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-29 01:03:32 +00:00
dependabot[bot] 6601755b88
Bump word-wrap from 1.2.3 to 1.2.5
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.5.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.5)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-29 01:02:52 +00:00
dependabot[bot] 4dc6296962
Bump kind-of from 6.0.2 to 6.0.3
Bumps [kind-of](https://github.com/jonschlinkert/kind-of) from 6.0.2 to 6.0.3.
- [Changelog](https://github.com/jonschlinkert/kind-of/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jonschlinkert/kind-of/compare/6.0.2...6.0.3)

---
updated-dependencies:
- dependency-name: kind-of
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-29 01:02:25 +00:00
dependabot[bot] 172ed0f6d8
Merge pull request #247 from colymba/dependabot/npm_and_yarn/minimatch-3.0.8 2023-09-29 01:02:23 +00:00
dependabot[bot] 968feb9385
Bump js-yaml from 3.12.0 to 3.14.1
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.12.0 to 3.14.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.12.0...3.14.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-29 01:01:58 +00:00
dependabot[bot] d68e4e496e
Bump semver from 6.3.0 to 6.3.1
Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-29 01:01:54 +00:00
dependabot[bot] 13d5ce8f49
Bump minimatch from 3.0.4 to 3.0.8
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.0.8.
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.0.8)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-29 00:56:12 +00:00
Guy Sartorelli 58f3dee7af
Merge branch '4' 2023-08-15 12:12:39 +12:00
Guy Sartorelli 6a47857687
Merge pull request #244 from creative-commoners/pulls/4/module-standardiser-1691547983
MNT Run module-standardiser
2023-08-15 12:07:13 +12:00
Steve Boyd 92ec942161 MNT Run module-standardiser 2023-08-14 15:42:13 +12:00
Guy Sartorelli 92ce27762a
Merge pull request #242 from colymba/pulls/4/dispatch
MNT Add dispatch-ci
2023-07-05 17:01:33 +12:00
Steve Boyd 143c61fef9 MNT Add dispatch-ci 2023-07-05 12:35:50 +12:00
Guy Sartorelli 4401d768f5
Merge pull request #239 from creative-commoners/pulls/4/tx-1686703134
ENH Update translations
2023-06-14 15:17:27 +12:00
Steve Boyd e038dc3a6d ENH Update translations 2023-06-14 12:38:54 +12:00
Steve Boyd 793a5476ec
Merge pull request #232 from creative-commoners/pulls/3/translatable
ENH Update translations
2023-03-09 14:54:50 +13:00
Guy Sartorelli c62be20b57
MNT Add github actions 2023-03-08 16:43:20 +13:00
Guy Sartorelli afc42e0495
ENH Update translations
Also add to transifex
2023-03-08 16:38:10 +13:00
Steve Boyd ebd634d994
Merge pull request #231 from creative-commoners/pulls/4/frontend-build-stack
DEP Upgrade frontend build stack
2023-02-02 10:04:52 +13:00
Guy Sartorelli 563f253f36
FIX Don't use removed method. 2023-02-01 15:29:49 +13:00
Guy Sartorelli dfcc4ce482
DEP Upgrade frontend build stack 2023-02-01 15:28:37 +13:00
Sabina Talipova 2f7109ac52
API Remove deprecated code (#230) 2023-01-25 13:47:52 +13:00
Sabina Talipova 1ec807ccbe
DEP PHP Support in CMS5 (#228) 2022-12-19 11:21:07 +13:00
Guy Sartorelli 1c5ae8a047
Merge pull request #200 from kinglozzer/patch-1
FIX: publishRecursive() is part of RecursivePublishable, not Versioned
2022-06-28 14:51:29 +12:00
Niklas Forsdahl d420a29e9f
FIX Row updating broken in SilverStripe 4 (#197)
Row updating is broken in SilverStripe 4 when for example using the PublishHandler or UnPublishHandler actions. This is due to unescaped backslashes in the fully qualified class name in json data, which when parsed in javascript treats the backslash as an escape character.
This can be fixed by escaping the backslash character in HTTPBulkToolsResponse.
2022-06-28 14:51:05 +12:00
Loz Calver 7652fee82f
FIX: publishRecursive() is part of RecursivePublishable, not Versioned 2020-05-15 15:56:58 +01:00
57 changed files with 5218 additions and 4307 deletions

1
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1 @@
<!-- Blank templates are for use by maintainers only! If you aren't a maintainer, please go back and pick one of the issue templates. -->

72
.github/ISSUE_TEMPLATE/1_bug_report.yml vendored Normal file
View File

@ -0,0 +1,72 @@
name: 🪳 Bug Report
description: Tell us if something isn't working the way it's supposed to
body:
- type: markdown
attributes:
value: |
We strongly encourage you to [submit a pull request](https://docs.silverstripe.org/en/contributing/code/) which fixes the issue.
Bug reports which are accompanied with a pull request are a lot more likely to be resolved quickly.
- type: input
id: affected-versions
attributes:
label: Module version(s) affected
description: |
What version of _this module_ have you reproduced this bug on?
Run `composer info` to see the specific version of each module installed in your project.
If you don't have access to that, check inside the help menu in the bottom left of the CMS.
placeholder: x.y.z
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
description: A clear and concise description of the problem
validations:
required: true
- type: textarea
id: how-to-reproduce
attributes:
label: How to reproduce
description: |
⚠️ This is the most important part of the report ⚠️
Without a way to easily reproduce your issue, there is little chance we will be able to help you and work on a fix.
- Please, take the time to show us some code and/or configuration that is needed for others to reproduce the problem easily.
- If the bug is too complex to reproduce with some short code samples, please reproduce it in a public repository and provide a link to the repository along with steps for setting up and reproducing the bug using that repository.
- If part of the bug includes an error or exception, please provide a full stack trace.
- If any user interaction is required to reproduce the bug, please add an ordered list of steps that are required to reproduce it.
- Be as clear as you can, but don't miss any steps out. Simply saying "create a page" is less useful than guiding us through the steps you're taking to create a page, for example.
placeholder: |
#### Code sample
```php
```
#### Reproduction steps
1.
validations:
required: true
- type: textarea
id: possible-solution
attributes:
label: Possible Solution
description: |
*Optional: only if you have suggestions on a fix/reason for the bug*
Please consider [submitting a pull request](https://docs.silverstripe.org/en/contributing/code/) with your solution! It helps get faster feedback and greatly increases the chance of the bug being fixed.
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: "*Optional: any other context about the problem: log messages, screenshots, etc.*"
- type: checkboxes
id: validations
attributes:
label: Validations
description: "Before submitting the issue, please make sure you do the following:"
options:
- label: Check that there isn't already an issue that reports the same bug
required: true
- label: Double check that your reproduction steps work in a fresh installation of [`silverstripe/installer`](https://github.com/silverstripe/silverstripe-installer) (with any code examples you've provided)
required: true

View File

@ -0,0 +1,35 @@
name: 🚀 Feature Request
description: Submit a feature request (but only if you're planning on implementing it)
body:
- type: markdown
attributes:
value: |
Please only submit feature requests if you plan on implementing the feature yourself.
See the [contributing code documentation](https://docs.silverstripe.org/en/contributing/code/#make-or-find-a-github-issue) for more guidelines about submitting feature requests.
- type: textarea
id: description
attributes:
label: Description
description: A clear and concise description of the new feature, and why it belongs in core
validations:
required: true
- type: textarea
id: more-info
attributes:
label: Additional context or points of discussion
description: |
*Optional: Any additional context, points of discussion, etc that might help validate and refine your idea*
- type: checkboxes
id: validations
attributes:
label: Validations
description: "Before submitting the issue, please confirm the following:"
options:
- label: You intend to implement the feature yourself
required: true
- label: You have read the [contributing guide](https://docs.silverstripe.org/en/contributing/code/)
required: true
- label: You strongly believe this feature should be in core, rather than being its own community module
required: true
- label: You have checked for existing issues or pull requests related to this feature (and didn't find any)
required: true

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Security Vulnerability
url: https://docs.silverstripe.org/en/contributing/issues_and_bugs/#reporting-security-issues
about: ⚠️ We do not use GitHub issues to track security vulnerability reports. Click "open" on the right to see how to report security vulnerabilities.
- name: Support Question
url: https://www.silverstripe.org/community/
about: We use GitHub issues only to discuss bugs and new features. For support questions, please use one of the support options available in our community channels.

39
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,39 @@
<!--
Thanks for contributing, you're awesome! ⭐
Please read https://docs.silverstripe.org/en/contributing/code/ if you haven't contributed to this project recently.
-->
## Description
<!--
Please describe expected and observed behaviour, and what you're fixing.
For visual fixes, please include tested browsers and screenshots.
-->
## Manual testing steps
<!--
Include any manual testing steps here which a reviewer can perform to validate your pull request works correctly.
Note that this DOES NOT replace unit or end-to-end tests.
-->
## Issues
<!--
List all issues here that this pull request fixes/resolves.
If there is no issue already, create a new one! You must link your pull request to at least one issue.
-->
- #
## Pull request checklist
<!--
PLEASE check each of these to ensure you have done everything you need to do!
If there's something in this list you need help with, please ask so that we can assist you.
-->
- [ ] The target branch is correct
- See [picking the right version](https://docs.silverstripe.org/en/contributing/code/#picking-the-right-version)
- [ ] All commits are relevant to the purpose of the PR (e.g. no debug statements, unrelated refactoring, or arbitrary linting)
- Small amounts of additional linting are usually okay, but if it makes it hard to concentrate on the relevant changes, ask for the unrelated changes to be reverted, and submitted as a separate PR.
- [ ] The commit messages follow our [commit message guidelines](https://docs.silverstripe.org/en/contributing/code/#commit-messages)
- [ ] The PR follows our [contribution guidelines](https://docs.silverstripe.org/en/contributing/code/)
- [ ] Code changes follow our [coding conventions](https://docs.silverstripe.org/en/contributing/coding_conventions/)
- [ ] This change is covered with tests (or tests aren't necessary for this change)
- [ ] Any relevant User Help/Developer documentation is updated; for impactful changes, information is added to the changelog for the intended release
- [ ] CI is green

11
.github/ci.yml vendored Normal file
View File

@ -0,0 +1,11 @@
name: CI
on:
push:
pull_request:
workflow_dispatch:
jobs:
ci:
name: CI
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1

16
.github/dispatch-ci.yml vendored Normal file
View File

@ -0,0 +1,16 @@
name: Dispatch CI
on:
# At 4:10 PM UTC, only on Sunday and Monday
schedule:
- cron: '10 16 * * 0,1'
jobs:
dispatch-ci:
name: Dispatch CI
# 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: Dispatch CI
uses: silverstripe/gha-dispatch-ci@v1

17
.github/keepalive.yml vendored Normal file
View File

@ -0,0 +1,17 @@
name: Keepalive
on:
workflow_dispatch:
# The 4th of every month at 10:50am UTC
schedule:
- cron: '50 10 4 * *'
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

17
.github/update-js.yml vendored Normal file
View File

@ -0,0 +1,17 @@
name: Update JS
on:
workflow_dispatch:
# Run on a schedule of once per quarter
schedule:
- cron: '0 0 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

16
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,16 @@
name: CI
on:
push:
pull_request:
workflow_dispatch:
# Every Monday at 12:20pm UTC
schedule:
- cron: '20 12 * * 1'
jobs:
ci:
name: CI
# Only run cron on the colymba account
if: (github.event_name == 'schedule' && github.repository_owner == 'colymba') || (github.event_name != 'schedule')
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1

17
.github/workflows/keepalive.yml vendored Normal file
View File

@ -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

17
.github/workflows/merge-up.yml vendored Normal file
View File

@ -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

1
.nvmrc Normal file
View File

@ -0,0 +1 @@
18

View File

@ -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/*]

View File

@ -1,17 +1,14 @@
[main]
host = https://www.transifex.com
[gridfieldbulkeditingtools.yml]
[o:silverstripe:p:silverstripe-gridfield-bulk-editing-tools:r:master]
file_filter = lang/<lang>.yml
minimum_perc = 0
source_file = lang/en.yml
source_lang = en
type = YML
type = YML
[gridfieldbulkeditingtools.js]
[o:silverstripe:p:silverstripe-gridfield-bulk-editing-tools:r:master-js]
file_filter = client/src/lang/<lang>.json
minimum_perc = 0
source_file = client/src/lang/en.json
source_lang = en
type = JSON
type = KEYVALUEJSON

View File

@ -70,7 +70,7 @@ See [BULK_MANAGER.md](docs/en//BULK_MANAGER.md) for detailed configuration.
Translations of the natural language strings are managed through a third party translation interface, transifex.com.
Please use [https://www.transifex.com/projects/p/gridfieldbulkeditingtools/](https://www.transifex.com/projects/p/gridfieldbulkeditingtools/) to contribute translations, rather than sending pull requests with YAML/JS files.
Please use https://www.transifex.com/silverstripe/silverstripe-gridfield-bulk-editing-tools to contribute translations, rather than sending pull requests with YAML/JS files.
## License and Copyright

6
babel.config.json Normal file
View File

@ -0,0 +1,6 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
]
}

View File

@ -1 +1 @@
!function(e){function t(i){if(n[i])return n[i].exports;var s=n[i]={i:i,l:!1,exports:{}};return e[i].call(s.exports,s,s.exports,t),s.l=!0,s.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="./client/src/bundles/bundle.js")}({"./client/src/bundles/bundle.js":function(e,t,n){n("./client/src/js/bulkTools.js"),n("./client/src/js/manager.js"),n("./client/src/js/managerBulkEditingForm.js"),n("./client/src/js/uploader.js")},"./client/src/js/bulkTools.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0);n.n(i).a.entwine("ss",function(e){window.bulkTools={gridfieldRefresh:function(e,t){t.isError||(t.isDestructive?this.removeGridFieldRows(e,t.records.success):this.updateGridFieldRows(e,t.records.success),this.failedGridFieldRows(e,t.records.failed))},getGridFieldRow:function(e,t){return e.find('.ss-gridfield-item[data-id="'+t.id+'"][data-class="'+t.class+'"]')},cleanGridFieldRow:function(e){return e.removeClass("bt-deleted bt-failed bt-updated").removeAttr("bt-error")},removeGridFieldRows:function(e,t){t.forEach(function(t){this.getGridFieldRow(e,t).addClass("bt-deleted").fadeOut(2e3)},this),e.entwine(".").entwine("ss").delay(2e3).reload()},failedGridFieldRows:function(e,t){t.forEach(function(t){this.getGridFieldRow(e,t).addClass("bt-failed").attr("bt-error",t.message)},this)},updateGridFieldRows:function(t,n){t.find(".ss-gridfield-item.ss-gridfield-no-items").remove(),n.forEach(function(n){var i=this.getGridFieldRow(t,n),s=e(n.row).addClass("bt-updated");1===i.length?i.replaceWith(s):t.find(".ss-gridfield-items").prepend(s)},this)}}})},"./client/src/js/manager.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),s=n.n(i),r=n(2),a=n.n(r);s.a.entwine("colymba",function(e){e(".bulkManagerOptions").entwine({onmatch:function(){var t=this.parents("thead"),n=t.find("tr"),i=[".filter-header",".sortable-header"],s=t.find(i.join(",")),r=n.index(this),a=n.length-1;s.each(function(e,t){var i=n.index(t);i<a&&(a=i)}),r>a&&n.eq(a).insertAfter(e(this))}}),e("td.col-bulkSelect").entwine({onmouseover:function(){e(this).parents(".ss-gridfield-item").find(".edit-link").removeClass("edit-link").addClass("tempDisabledEditLink")},onmouseout:function(){e(this).parents(".ss-gridfield-item").find(".tempDisabledEditLink").addClass("edit-link").removeClass("tempDisabledEditLink")},onclick:function(t){var n=e(t.target).find("input");e(n).prop("checked")?e(n).prop("checked",!1):e(n).prop("checked",!0)}}),e("td.col-bulkSelect input").entwine({onmatch:function(){},onunmatch:function(){},onclick:function(){e(this).parents(".grid-field__table").find("input.bulkSelectAll").prop("checked","")}}),e("input.bulkSelectAll").entwine({onclick:function(){var t=e(this).prop("checked");e(this).parents(".grid-field__table").find("td.col-bulkSelect input").prop("checked",t).trigger("change")},getSelectRecordsID:function(){return e(this).parents(".grid-field__table").find("td.col-bulkSelect input:checked").map(function(){return parseInt(e(this).data("record"),10)}).get()}}),e("select.bulkActionName").entwine({onchange:function(){var t=e(this).val(),n=e(this).parents(".bulkManagerOptions"),i=n.find(".doBulkActionButton"),s=i.data("config");if(e.each(s,function(e,n){e!==t&&i.removeClass(n.buttonClasses)}),!t)return void i.addClass("disabled");if(i.removeClass("disabled"),i.addClass(s[t].buttonClasses).addClass("btn-outline-secondary"),s[t].icon){var r=i.find("img");r.length?r.attr("src",s[t].icon):i.prepend('<img src="'+s[t].icon+'" alt="" />')}else i.find("img").remove();s[t].destructive?i.addClass("btn-outline-danger"):i.removeClass("btn-outline-danger")}}),e(".doBulkActionButton").entwine({getActionURL:function(e,t){var n=(new Date).getTime(),i=t.split("?"),s="";return e&&(s="/"+e),i=i[1]?i[0]+s+"?"+i[1]+"&cacheBuster="+n:i[0]+s+"?cacheBuster="+n},onclick:function(){var t=e(this).parents(".bulkManagerOptions"),n=t.find("select.bulkActionName").val(),i=e(this).parents(".bulkManagerOptions").find("input.bulkSelectAll:first").getSelectRecordsID();this.doBulkAction(n,i)},doBulkAction:function(t,n){var i=window,s=i.bulkTools,r=e(this).parents(".bulkManagerOptions"),d=r.find("a.doBulkActionButton"),o=r.find(".message"),l=d.data("config"),c=this.getActionURL(t,e(this).data("url")),u={records:n};return n.length<=0?(alert(a.a._t("GRIDFIELD_BULK_MANAGER.BULKACTION_EMPTY_SELECT")),!1):!(l[t].destructive&&!confirm(a.a._t("GRIDFIELD_BULK_MANAGER.CONFIRM_DESTRUCTIVE_ACTION")))&&(d.addClass("loading"),o.removeClass("static show error warning"),l[t].xhr?e.ajax({url:c,data:u,type:"POST",context:e(this)}).always(function(t){var n=t;d.removeClass("loading"),t.responseText&&(n=JSON.parse(t.responseText)),o.html(n.message),n.isError?o.addClass("static error"):n.isWarning?o.addClass("show warning"):o.addClass("show"),s.gridfieldRefresh(e(this).parents(".ss-gridfield"),n)}):(c=c+"&records[]="+n.join("&records[]="),window.location.href=c),!0)}})})},"./client/src/js/managerBulkEditingForm.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0);n.n(i).a.entwine("colymba",function(e){e("#bulkEditToggle").entwine({onclick:function(){var t=this.parents("form").find(".ss-toggle .ui-accordion-header"),n=this.data("state");n=n&&"close"!==n?"close":"open",t.each(function(){var t=e(this);"open"!==n||t.hasClass("ui-state-active")||t.click(),"close"===n&&t.hasClass("ui-state-active")&&t.click()}),this.data("state",n)}}),e(".bulkEditingFieldHolder").entwine({onchange:function(){this.removeClass("updated"),this.hasClass("hasUpdate")||this.addClass("hasUpdate")}})})},"./client/src/js/uploader.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),s=n.n(i),r=n(1),a=n.n(r),d=window,o=d.bulkTools,l=function(e){var t=s()("#"+e.fieldId),n=t.parents(".ss-gridfield"),i=t.data("schema");s.a.ajax(i.data.attachFileEndpoint.url,{method:i.data.attachFileEndpoint.method,data:{fileID:e.file.id}}).done(function(e){o.gridfieldRefresh(n,e)})},c=function(e){var t=s()("#"+e.fieldId).parents(".ss-gridfield");o.gridfieldRefresh(t,e.json.bulkTools)},u=function(e){return function(){return function(t,n){var i=n.type,s=n.payload;switch(i){case"UPLOADFIELD_ADD_FILE":return-1!==s.fieldId.indexOf("_BU")&&s.file.id&&l(s),e(t,{type:i,payload:s});case"UPLOADFIELD_UPLOAD_SUCCESS":return-1!==s.fieldId.indexOf("_BU")&&c(s),e(t,{type:i,payload:s});default:return e(t,{type:i,payload:s})}}}};document.addEventListener("DOMContentLoaded",function(){a.a.transform("bulkUploaderTransformation",function(e){e.reducer("assetAdmin",u)})})},0:function(e,t){e.exports=jQuery},1:function(e,t){e.exports=Injector},2:function(e,t){e.exports=i18n}});
!function(){"use strict";var e={157:function(e,t,i){var s;((s=i(311))&&s.__esModule?s:{default:s}).default.entwine("ss",(e=>{window.bulkTools={gridfieldRefresh(e,t){t.isError||(t.isDestructive?this.removeGridFieldRows(e,t.records.success):this.updateGridFieldRows(e,t.records.success),this.failedGridFieldRows(e,t.records.failed))},getGridFieldRow(e,t){return e.find(`.ss-gridfield-item[data-id="${t.id}"][data-class="${t.class}"]`)},cleanGridFieldRow(e){return e.removeClass("bt-deleted bt-failed bt-updated").removeAttr("bt-error")},removeGridFieldRows(e,t){t.forEach((function(t){this.getGridFieldRow(e,t).addClass("bt-deleted").fadeOut(2e3)}),this),e.entwine(".").entwine("ss").delay(2e3).reload()},failedGridFieldRows(e,t){t.forEach((function(t){this.getGridFieldRow(e,t).addClass("bt-failed").attr("bt-error",t.message)}),this)},updateGridFieldRows(t,i){t.find(".ss-gridfield-item.ss-gridfield-no-items").remove(),i.forEach((function(i){const s=this.getGridFieldRow(t,i),d=e(i.row).addClass("bt-updated");1===s.length?s.replaceWith(d):t.find(".ss-gridfield-items").prepend(d)}),this)}}}))},572:function(e,t,i){var s=n(i(311)),d=n(i(754));function n(e){return e&&e.__esModule?e:{default:e}}s.default.entwine("colymba",(e=>{e(".bulkManagerOptions").entwine({onmatch(){const t=this.parents("thead"),i=t.find("tr"),s=t.find([".filter-header",".sortable-header"].join(",")),d=i.index(this);let n=i.length-1;s.each(((e,t)=>{const s=i.index(t);s<n&&(n=s)})),d>n&&i.eq(n).insertAfter(e(this))}}),e("td.col-bulkSelect").entwine({onmouseover(){e(this).parents(".ss-gridfield-item").find(".edit-link").removeClass("edit-link").addClass("tempDisabledEditLink")},onmouseout(){e(this).parents(".ss-gridfield-item").find(".tempDisabledEditLink").addClass("edit-link").removeClass("tempDisabledEditLink")},onclick(t){const i=e(t.target).find("input");e(i).prop("checked")?e(i).prop("checked",!1):e(i).prop("checked",!0)}}),e("td.col-bulkSelect input").entwine({onmatch(){},onunmatch(){},onclick(){e(this).parents(".grid-field__table").find("input.bulkSelectAll").prop("checked","")}}),e("input.bulkSelectAll").entwine({onclick(){const t=e(this).prop("checked");e(this).parents(".grid-field__table").find("td.col-bulkSelect input").prop("checked",t).trigger("change")},getSelectRecordsID(){return e(this).parents(".grid-field__table").find("td.col-bulkSelect input:checked").map((function(){return parseInt(e(this).data("record"),10)})).get()}}),e("select.bulkActionName").entwine({onchange(){const t=e(this).val(),i=e(this).parents(".bulkManagerOptions").find(".doBulkActionButton"),s=i.data("config");if(e.each(s,((e,s)=>{e!==t&&i.removeClass(s.buttonClasses)})),t){if(i.removeClass("disabled"),i.addClass(s[t].buttonClasses).addClass("btn-outline-secondary"),s[t].icon){const e=i.find("img");e.length?e.attr("src",s[t].icon):i.prepend(`<img src="${s[t].icon}" alt="" />`)}else i.find("img").remove();s[t].destructive?i.addClass("btn-outline-danger"):i.removeClass("btn-outline-danger")}else i.addClass("disabled")}}),e(".doBulkActionButton").entwine({getActionURL(e,t){const i=(new Date).getTime();let s=t.split("?"),d="";return e&&(d=`/${e}`),s=s[1]?`${s[0]+d}?${s[1]}&cacheBuster=${i}`:`${s[0]+d}?cacheBuster=${i}`,s},onclick(){const t=e(this).parents(".bulkManagerOptions").find("select.bulkActionName").val(),i=e(this).parents(".bulkManagerOptions").find("input.bulkSelectAll:first").getSelectRecordsID();this.doBulkAction(t,i)},doBulkAction(t,i){const{bulkTools:s}=window,n=e(this).parents(".bulkManagerOptions"),a=n.find("a.doBulkActionButton"),r=n.find(".message"),l=a.data("config");let o=this.getActionURL(t,e(this).data("url"));const c={records:i};if(i.length<=0)return alert(d.default._t("GRIDFIELD_BULK_MANAGER.BULKACTION_EMPTY_SELECT")),!1;if(l[t].destructive&&!confirm(d.default._t("GRIDFIELD_BULK_MANAGER.CONFIRM_DESTRUCTIVE_ACTION")))return!1;if(a.addClass("loading"),r.removeClass("static show error warning"),l[t].xhr)e.ajax({url:o,data:c,type:"POST",context:e(this)}).always((function(t){let i=t;a.removeClass("loading"),t.responseText&&(i=JSON.parse(t.responseText)),r.html(i.message),i.isError?r.addClass("static error"):i.isWarning?r.addClass("show warning"):r.addClass("show"),s.gridfieldRefresh(e(this).parents(".ss-gridfield"),i)}));else{o=`${o}&${`records[]=${i.join("&records[]=")}`}`,window.location.href=o}return!0}})}))},453:function(e,t,i){var s;((s=i(311))&&s.__esModule?s:{default:s}).default.entwine("colymba",(e=>{e("#bulkEditToggle").entwine({onclick(){const t=this.parents("form").find(".ss-toggle .ui-accordion-header");let i=this.data("state");i=i&&"close"!==i?"close":"open",t.each((function(){const t=e(this);"open"!==i||t.hasClass("ui-state-active")||t.click(),"close"===i&&t.hasClass("ui-state-active")&&t.click()})),this.data("state",i)}}),e(".bulkEditingFieldHolder").entwine({onchange(){this.removeClass("updated"),this.hasClass("hasUpdate")||this.addClass("hasUpdate")}})}))},545:function(e,t,i){var s=n(i(311)),d=n(i(648));function n(e){return e&&e.__esModule?e:{default:e}}const{bulkTools:a}=window,r=e=>()=>(t,i)=>{let{type:d,payload:n}=i;switch(d){case"UPLOADFIELD_ADD_FILE":return-1!==n.fieldId.indexOf("_BU")&&n.file.id&&(e=>{const t=(0,s.default)(`#${e.fieldId}`),i=t.parents(".ss-gridfield"),d=t.data("schema");s.default.ajax(d.data.attachFileEndpoint.url,{method:d.data.attachFileEndpoint.method,data:{fileID:e.file.id}}).done((e=>{a.gridfieldRefresh(i,e)}))})(n),e(t,{type:d,payload:n});case"UPLOADFIELD_UPLOAD_SUCCESS":return-1!==n.fieldId.indexOf("_BU")&&(e=>{const t=(0,s.default)(`#${e.fieldId}`).parents(".ss-gridfield");a.gridfieldRefresh(t,e.json.bulkTools)})(n),e(t,{type:d,payload:n});default:return e(t,{type:d,payload:n})}};document.addEventListener("DOMContentLoaded",(()=>{d.default.transform("bulkUploaderTransformation",(e=>{e.reducer("assetAdmin",r)}))}))},648:function(e){e.exports=Injector},754:function(e){e.exports=i18n},311:function(e){e.exports=jQuery}},t={};function i(s){var d=t[s];if(void 0!==d)return d.exports;var n=t[s]={exports:{}};return e[s](n,n.exports,i),n.exports}i(157),i(572),i(453),i(545)}();

View File

@ -1 +1 @@
@-webkit-keyframes bt_fade_out{0%{opacity:1}to{opacity:0}}@-o-keyframes bt_fade_out{0%{opacity:1}to{opacity:0}}@keyframes bt_fade_out{0%{opacity:1}to{opacity:0}}@-webkit-keyframes bt_loading{0%{opacity:1}to{opacity:.25}}@-o-keyframes bt_loading{0%{opacity:1}to{opacity:.25}}@keyframes bt_loading{0%{opacity:1}to{opacity:.25}}@-webkit-keyframes bt_fade_border{0%{border-left-width:6px}to{border-left-width:0}}@-o-keyframes bt_fade_border{0%{border-left-width:6px}to{border-left-width:0}}@keyframes bt_fade_border{0%{border-left-width:6px}to{border-left-width:0}}.cms table.grid-field__table tr.bulkManagerOptions th{text-transform:none}.cms table.grid-field__table tr.bulkManagerOptions th .bulkActionName{float:left}.cms table.grid-field__table tr.bulkManagerOptions th .bulkActionName .form__field-holder{min-width:200px;margin-left:0}.cms table.grid-field__table tr.bulkManagerOptions th .bulkActionName .chosen-container{min-width:120px}.cms table.grid-field__table tr.bulkManagerOptions th .bulkActionName .chosen-container-single .chosen-single{border-top-right-radius:0;border-bottom-right-radius:0}.cms table.grid-field__table tr.bulkManagerOptions th .doBulkActionButton{float:left;border-top-left-radius:0;border-bottom-left-radius:0;height:36px;line-height:26px;margin-left:-1px;margin-right:20px}.cms table.grid-field__table tr.bulkManagerOptions th .doBulkActionButton img{height:20px}.cms table.grid-field__table tr.bulkManagerOptions th .doBulkActionButton.loading{-webkit-animation:.5s bt_loading infinite alternate;-o-animation:.5s bt_loading infinite alternate;animation:.5s bt_loading infinite alternate;cursor:wait;pointer-events:none}.cms table.grid-field__table tr.bulkManagerOptions th .message{float:left;clear:none;max-width:100%;margin:0;padding:0 1.25rem;height:36px;line-height:34px;opacity:0;overflow:auto}.cms table.grid-field__table tr.bulkManagerOptions th .message.show{-webkit-animation:10s bt_fade_out;-o-animation:10s bt_fade_out;animation:10s bt_fade_out}.cms table.grid-field__table tr.bulkManagerOptions th .message.static{opacity:1}.cms table.grid-field__table tbody .col-bulkSelect{width:25px;text-align:center}.cms table.grid-field__table tbody .ss-gridfield-item.bt-deleted{opacity:.5}.cms table.grid-field__table tbody .ss-gridfield-item.bt-failed{border-left:0 solid #e68288;-webkit-animation:10s bt_fade_border;-o-animation:10s bt_fade_border;animation:10s bt_fade_border}.cms table.grid-field__table tbody .ss-gridfield-item.bt-updated{border-left:0 solid #56bd59;-webkit-animation:10s bt_fade_border;-o-animation:10s bt_fade_border;animation:10s bt_fade_border}#bulkEditHeader{float:left;width:70%;margin:40px 0 20px;font-size:30px;font-weight:700}#bulkEditToggle{float:right;clear:right;width:25%;margin:40px 0 20px;text-decoration:underline;text-align:right;cursor:pointer}.bulkEditingFieldHolder{position:relative;float:left;width:100%}.bulkEditingFieldHolder.hasUpdate .ui-accordion-header{background-color:#f2ba11;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,#f2ba11),color-stop(100%,#df6e00));background-image:-webkit-linear-gradient(top,#f2ba11,#df6e00);background-image:-o-linear-gradient(top,#f2ba11 0,#df6e00 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2ba11),to(#df6e00));background-image:linear-gradient(top,#f2ba11,#df6e00)}.bulkEditingFieldHolder.hasUpdate .ui-accordion-header a{color:#fff;text-shadow:none}.bulkEditingFieldHolder.updated .ui-accordion-header{background-color:#a4ca3a;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,#a4ca3a),color-stop(100%,#59781d));background-image:-webkit-linear-gradient(top,#a4ca3a,#59781d);background-image:-o-linear-gradient(top,#a4ca3a 0,#59781d 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(top),color-stop(0,#a4ca3a),to(#59781d));background-image:linear-gradient(top,#a4ca3a,#59781d)}.bulkEditingFieldHolder.updated .ui-accordion-header a{color:#fff;text-shadow:none}.bulkUploader .uploadfield__droptext:before{text-transform:none;content:"b"}
@keyframes bt_fade_out{from{opacity:1}to{opacity:0}}@keyframes bt_loading{from{opacity:1}to{opacity:.25}}@keyframes bt_fade_border{from{border-left-width:6px}to{border-left-width:0}}.cms table.grid-field__table tr.bulkManagerOptions th{text-transform:none}.cms table.grid-field__table tr.bulkManagerOptions th .bulkActionName{float:left}.cms table.grid-field__table tr.bulkManagerOptions th .bulkActionName .form__field-holder{min-width:200px;margin-left:0}.cms table.grid-field__table tr.bulkManagerOptions th .bulkActionName .chosen-container{min-width:120px}.cms table.grid-field__table tr.bulkManagerOptions th .bulkActionName .chosen-container-single .chosen-single{border-top-right-radius:0;border-bottom-right-radius:0}.cms table.grid-field__table tr.bulkManagerOptions th .doBulkActionButton{float:left;border-top-left-radius:0;border-bottom-left-radius:0;height:36px;line-height:26px;margin-left:-1px;margin-right:20px}.cms table.grid-field__table tr.bulkManagerOptions th .doBulkActionButton img{height:20px}.cms table.grid-field__table tr.bulkManagerOptions th .doBulkActionButton.loading{animation:.5s bt_loading infinite alternate;cursor:wait;pointer-events:none}.cms table.grid-field__table tr.bulkManagerOptions th .message{float:left;clear:none;max-width:100%;margin:0;padding:0 1.25rem;height:36px;line-height:34px;opacity:0;overflow:auto}.cms table.grid-field__table tr.bulkManagerOptions th .message.show{animation:10s bt_fade_out}.cms table.grid-field__table tr.bulkManagerOptions th .message.static{opacity:1}.cms table.grid-field__table tbody .col-bulkSelect{width:25px;text-align:center}.cms table.grid-field__table tbody .ss-gridfield-item.bt-deleted{opacity:.5}.cms table.grid-field__table tbody .ss-gridfield-item.bt-failed{border-left:0 solid #e68288;animation:10s bt_fade_border}.cms table.grid-field__table tbody .ss-gridfield-item.bt-updated{border-left:0 solid #56bd59;animation:10s bt_fade_border}#bulkEditHeader{float:left;width:70%;margin:40px 0 20px 0;font-size:30px;font-weight:bold}#bulkEditToggle{float:right;clear:right;width:25%;margin:40px 0 20px 0;text-decoration:underline;text-align:right;cursor:pointer}.bulkEditingFieldHolder{position:relative;float:left;width:100%}.bulkEditingFieldHolder.hasUpdate .ui-accordion-header{background-color:#f2ba11;background-image:linear-gradient(top, #f2ba11 0%, #df6e00 100%)}.bulkEditingFieldHolder.hasUpdate .ui-accordion-header a{color:#fff;text-shadow:none}.bulkEditingFieldHolder.updated .ui-accordion-header{background-color:#a4ca3a;background-image:linear-gradient(top, #a4ca3a 0%, #59781D 100%)}.bulkEditingFieldHolder.updated .ui-accordion-header a{color:#fff;text-shadow:none}.bulkUploader .uploadfield__droptext::before{text-transform:none;content:"b"}

View File

@ -1,5 +1,9 @@
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined');
// This file was generated by silverstripe/tx-translator from client/lang/src/cs.json.
// See https://github.com/silverstripe/silverstripe-tx-translator for details
if (typeof(ss) === 'undefined' || typeof(ss.i18n) === 'undefined') {
if (typeof(console) !== 'undefined') { // eslint-disable-line no-console
console.error('Class ss.i18n not defined'); // eslint-disable-line no-console
}
} else {
ss.i18n.addDictionary('cs', {
"GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "Uploading %s file(s). %s done. %s error(s).",

View File

@ -1,5 +1,9 @@
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined');
// This file was generated by silverstripe/tx-translator from client/lang/src/de.json.
// See https://github.com/silverstripe/silverstripe-tx-translator for details
if (typeof(ss) === 'undefined' || typeof(ss.i18n) === 'undefined') {
if (typeof(console) !== 'undefined') { // eslint-disable-line no-console
console.error('Class ss.i18n not defined'); // eslint-disable-line no-console
}
} else {
ss.i18n.addDictionary('de', {
"GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "Übertrage %s Datei(en). %s erfolgreich übertragen. %s Fehler.",

View File

@ -1,9 +1,13 @@
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined');
// This file was generated by silverstripe/tx-translator from client/lang/src/en.json.
// See https://github.com/silverstripe/silverstripe-tx-translator for details
if (typeof(ss) === 'undefined' || typeof(ss.i18n) === 'undefined') {
if (typeof(console) !== 'undefined') { // eslint-disable-line no-console
console.error('Class ss.i18n not defined'); // eslint-disable-line no-console
}
} else {
ss.i18n.addDictionary('en', {
"GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "Uploading %s file(s). %s done. %s error(s).",
"GRIDFIELD_BULK_MANAGER.BULKACTION_EMPTY_SELECT": "You must select at least one record.",
"GRIDFIELD_BULK_MANAGER.CONFIRM_DESTRUCTIVE_ACTION": "The data will be lost permanently. Do you want to continue?"
"GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "Uploading %s file(s). %s done. %s error(s).",
"GRIDFIELD_BULK_MANAGER.BULKACTION_EMPTY_SELECT": "You must select at least one record.",
"GRIDFIELD_BULK_MANAGER.CONFIRM_DESTRUCTIVE_ACTION": "The data will be lost permanently. Do you want to continue?"
});
}

View File

@ -1,5 +1,9 @@
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined');
// This file was generated by silverstripe/tx-translator from client/lang/src/fi.json.
// See https://github.com/silverstripe/silverstripe-tx-translator for details
if (typeof(ss) === 'undefined' || typeof(ss.i18n) === 'undefined') {
if (typeof(console) !== 'undefined') { // eslint-disable-line no-console
console.error('Class ss.i18n not defined'); // eslint-disable-line no-console
}
} else {
ss.i18n.addDictionary('fi', {
"GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "Lataa %s tiedosto(ja). %s Valmis. %s virhe(itä).",

View File

@ -1,5 +1,9 @@
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined');
// This file was generated by silverstripe/tx-translator from client/lang/src/fr.json.
// See https://github.com/silverstripe/silverstripe-tx-translator for details
if (typeof(ss) === 'undefined' || typeof(ss.i18n) === 'undefined') {
if (typeof(console) !== 'undefined') { // eslint-disable-line no-console
console.error('Class ss.i18n not defined'); // eslint-disable-line no-console
}
} else {
ss.i18n.addDictionary('fr', {
"GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "%s fichier(s) en transfert. %s terminer. %s erreur(s).",

View File

@ -1,5 +1,9 @@
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined');
// This file was generated by silverstripe/tx-translator from client/lang/src/it.json.
// See https://github.com/silverstripe/silverstripe-tx-translator for details
if (typeof(ss) === 'undefined' || typeof(ss.i18n) === 'undefined') {
if (typeof(console) !== 'undefined') { // eslint-disable-line no-console
console.error('Class ss.i18n not defined'); // eslint-disable-line no-console
}
} else {
ss.i18n.addDictionary('it', {
"GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "Caricamento del/dei file(s) %s. %s completato. %s errore(i).",

View File

@ -1,5 +1,9 @@
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined');
// This file was generated by silverstripe/tx-translator from client/lang/src/nl.json.
// See https://github.com/silverstripe/silverstripe-tx-translator for details
if (typeof(ss) === 'undefined' || typeof(ss.i18n) === 'undefined') {
if (typeof(console) !== 'undefined') { // eslint-disable-line no-console
console.error('Class ss.i18n not defined'); // eslint-disable-line no-console
}
} else {
ss.i18n.addDictionary('nl', {
"GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "Uploading %s file(s). %s done. %s error(s).",

View File

@ -1,5 +1,9 @@
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined');
// This file was generated by silverstripe/tx-translator from client/lang/src/pl.json.
// See https://github.com/silverstripe/silverstripe-tx-translator for details
if (typeof(ss) === 'undefined' || typeof(ss.i18n) === 'undefined') {
if (typeof(console) !== 'undefined') { // eslint-disable-line no-console
console.error('Class ss.i18n not defined'); // eslint-disable-line no-console
}
} else {
ss.i18n.addDictionary('pl', {
"GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "Wgrywanie %s plików. Ukończono %s. %s błędów.",

View File

@ -1,5 +1,9 @@
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined');
// This file was generated by silverstripe/tx-translator from client/lang/src/ru.json.
// See https://github.com/silverstripe/silverstripe-tx-translator for details
if (typeof(ss) === 'undefined' || typeof(ss.i18n) === 'undefined') {
if (typeof(console) !== 'undefined') { // eslint-disable-line no-console
console.error('Class ss.i18n not defined'); // eslint-disable-line no-console
}
} else {
ss.i18n.addDictionary('ru', {
"GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "Загружается %s файл(ов). %s завершено. %s ошибка(и).",

View File

@ -1,5 +1,9 @@
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined');
// This file was generated by silverstripe/tx-translator from client/lang/src/sk.json.
// See https://github.com/silverstripe/silverstripe-tx-translator for details
if (typeof(ss) === 'undefined' || typeof(ss.i18n) === 'undefined') {
if (typeof(console) !== 'undefined') { // eslint-disable-line no-console
console.error('Class ss.i18n not defined'); // eslint-disable-line no-console
}
} else {
ss.i18n.addDictionary('sk', {
"GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "Nahrávam %s súbor(y/ov). %s hotovo. %s chyb(a/y).",

5
client/lang/src/en.json Normal file
View File

@ -0,0 +1,5 @@
{
"GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "Uploading %s file(s). %s done. %s error(s).",
"GRIDFIELD_BULK_MANAGER.BULKACTION_EMPTY_SELECT": "You must select at least one record.",
"GRIDFIELD_BULK_MANAGER.CONFIRM_DESTRUCTIVE_ACTION": "The data will be lost permanently. Do you want to continue?"
}

View File

@ -1,5 +0,0 @@
{
"GRIDFIELD_BULK_UPLOAD.PROGRESS_INFO": "Uploading %s file(s). %s done. %s error(s).",
"GRIDFIELD_BULK_MANAGER.BULKACTION_EMPTY_SELECT": "You must select at least one record.",
"GRIDFIELD_BULK_MANAGER.CONFIRM_DESTRUCTIVE_ACTION": "The data will be lost permanently. Do you want to continue?"
}

View File

@ -16,12 +16,12 @@
}
],
"require": {
"silverstripe/framework": "~4",
"silverstripe/asset-admin": "~1"
"silverstripe/framework": "^5",
"silverstripe/asset-admin": "^2"
},
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
"dev-master": "4.x-dev"
},
"expose": [
"client/dist",

View File

@ -1,10 +1,18 @@
cs:
GRIDFIELD_BULK_UPLOAD: null
GRIDFIELD_BULK_MANAGER:
COMPONENT_TITLE: ''
EDIT_SELECT_LABEL: Upravit
UNLINK_SELECT_LABEL: Odstranit vazbu
UNLINK_SELECT_LABEL: 'Odstranit vazbu'
DELETE_SELECT_LABEL: Smazat
ACTION_BTN_LABEL: Provést
SELECT_ALL_LABEL: Vybrat vše
SELECT_ALL_LABEL: 'Vybrat vše'
PUBLISH_SELECT_LABEL: ''
UNPUBLISH_SELECT_LABEL: ''
ARCHIVE_SELECT_LABEL: ''
GRIDFIELD_BULKMANAGER_EDIT_HANDLER:
SAVE_BTN_LABEL: Uložit vše
HEADER_TEXT: ''
TOGGLE_ALL_LINK: ''
SAVE_BTN_LABEL: 'Uložit vše'
CANCEL_BTN_LABEL: Storno
SAVE_RESULT_TEXT: ''

View File

@ -1,14 +1,18 @@
de:
GRIDFIELD_BULK_UPLOAD: null
GRIDFIELD_BULK_MANAGER:
COMPONENT_TITLE: Einen oder mehrere Einträge gleichzeitig bearbeiten
COMPONENT_TITLE: 'Einen oder mehrere Einträge gleichzeitig bearbeiten'
EDIT_SELECT_LABEL: Bearbeiten
UNLINK_SELECT_LABEL: Verbindung entfernen
UNLINK_SELECT_LABEL: 'Verbindung entfernen'
DELETE_SELECT_LABEL: Löschen
ACTION_BTN_LABEL: Los
SELECT_ALL_LABEL: Alle auswählen
SELECT_ALL_LABEL: 'Alle auswählen'
PUBLISH_SELECT_LABEL: ''
UNPUBLISH_SELECT_LABEL: ''
ARCHIVE_SELECT_LABEL: ''
GRIDFIELD_BULKMANAGER_EDIT_HANDLER:
HEADER_TEXT: Bearbeite {count} {class}
TOGGLE_ALL_LINK: Alle Anzeigen/Verbergen
SAVE_BTN_LABEL: Alle speichern
HEADER_TEXT: 'Bearbeite {count} {class}'
TOGGLE_ALL_LINK: 'Alle Anzeigen/Verbergen'
SAVE_BTN_LABEL: 'Alle speichern'
CANCEL_BTN_LABEL: Abbrechen
SAVE_RESULT_TEXT: '{count} {class} erfolgreich gespeichert.'

View File

@ -1,18 +1,18 @@
en:
GRIDFIELD_BULK_UPLOAD:
GRIDFIELD_BULK_MANAGER:
COMPONENT_TITLE: Modify one or more entry at a time.
EDIT_SELECT_LABEL: Edit
UNLINK_SELECT_LABEL: Unlink
DELETE_SELECT_LABEL: Delete
ACTION_BTN_LABEL: Go
SELECT_ALL_LABEL: Select all
PUBLISH_SELECT_LABEL: Publish
UNPUBLISH_SELECT_LABEL: UnPublish
ARCHIVE_SELECT_LABEL: Archive
GRIDFIELD_BULKMANAGER_EDIT_HANDLER:
HEADER_TEXT: Editing {count} {class}
TOGGLE_ALL_LINK: Show/Hide all
SAVE_BTN_LABEL: Save all
CANCEL_BTN_LABEL: Cancel
SAVE_RESULT_TEXT: '{count} {class} saved successfully.'
en:
GRIDFIELD_BULKMANAGER_EDIT_HANDLER:
CANCEL_BTN_LABEL: Cancel
HEADER_TEXT: 'Editing {count} {class}'
SAVE_BTN_LABEL: 'Save all'
SAVE_RESULT_TEXT: '{count} {class} saved successfully.'
TOGGLE_ALL_LINK: 'Show/Hide all'
GRIDFIELD_BULK_MANAGER:
ACTION_BTN_LABEL: Go
ARCHIVE_SELECT_LABEL: Archive
COMPONENT_TITLE: 'Modify one or more entry at a time.'
DELETE_SELECT_LABEL: Delete
EDIT_SELECT_LABEL: Edit
PUBLISH_SELECT_LABEL: Publish
SELECT_ALL_LABEL: 'Select all'
UNLINK_SELECT_LABEL: Unlink
UNPUBLISH_SELECT_LABEL: UnPublish
GRIDFIELD_BULK_UPLOAD: null

View File

@ -1,13 +1,18 @@
fi:
GRIDFIELD_BULK_UPLOAD: null
GRIDFIELD_BULK_MANAGER:
COMPONENT_TITLE: Muokkaa yhtä tai useampaa merkintää kerrallaan.
COMPONENT_TITLE: 'Muokkaa yhtä tai useampaa merkintää kerrallaan.'
EDIT_SELECT_LABEL: Muokkaa
UNLINK_SELECT_LABEL: Erota
DELETE_SELECT_LABEL: Poista
ACTION_BTN_LABEL: Suorita
SELECT_ALL_LABEL: Valitse kaikki
SELECT_ALL_LABEL: 'Valitse kaikki'
PUBLISH_SELECT_LABEL: ''
UNPUBLISH_SELECT_LABEL: ''
ARCHIVE_SELECT_LABEL: ''
GRIDFIELD_BULKMANAGER_EDIT_HANDLER:
HEADER_TEXT: Muokkaa {count} {class}
TOGGLE_ALL_LINK: Näytä/Piilota kaikki
SAVE_BTN_LABEL: Tallenna kaikki
HEADER_TEXT: 'Muokkaa {count} {class}'
TOGGLE_ALL_LINK: 'Näytä/Piilota kaikki'
SAVE_BTN_LABEL: 'Tallenna kaikki'
CANCEL_BTN_LABEL: Peruuta
SAVE_RESULT_TEXT: ''

View File

@ -1,14 +1,18 @@
fr:
GRIDFIELD_BULK_UPLOAD: null
GRIDFIELD_BULK_MANAGER:
COMPONENT_TITLE: Modifier une ou plusieurs entrée à la fois.
COMPONENT_TITLE: 'Modifier une ou plusieurs entrée à la fois.'
EDIT_SELECT_LABEL: Editer
UNLINK_SELECT_LABEL: Dissocier
DELETE_SELECT_LABEL: Supprimer
ACTION_BTN_LABEL: Go
SELECT_ALL_LABEL: Sélectionner tout
SELECT_ALL_LABEL: 'Sélectionner tout'
PUBLISH_SELECT_LABEL: ''
UNPUBLISH_SELECT_LABEL: ''
ARCHIVE_SELECT_LABEL: ''
GRIDFIELD_BULKMANAGER_EDIT_HANDLER:
HEADER_TEXT: Edition de {count} {class}
TOGGLE_ALL_LINK: Afficher/Masquer tout
SAVE_BTN_LABEL: Sauvegarder tout
HEADER_TEXT: 'Edition de {count} {class}'
TOGGLE_ALL_LINK: 'Afficher/Masquer tout'
SAVE_BTN_LABEL: 'Sauvegarder tout'
CANCEL_BTN_LABEL: Annuler
SAVE_RESULT_TEXT: '{count} {class} sauvegardés avec succès.'

View File

@ -1,14 +1,18 @@
it:
GRIDFIELD_BULK_UPLOAD: null
GRIDFIELD_BULK_MANAGER:
COMPONENT_TITLE: Modifica una o più voci alla volta.
COMPONENT_TITLE: 'Modifica una o più voci alla volta.'
EDIT_SELECT_LABEL: Modifica
UNLINK_SELECT_LABEL: Scollega
DELETE_SELECT_LABEL: Elimina
ACTION_BTN_LABEL: Vai
SELECT_ALL_LABEL: Seleziona tutto
SELECT_ALL_LABEL: 'Seleziona tutto'
PUBLISH_SELECT_LABEL: ''
UNPUBLISH_SELECT_LABEL: ''
ARCHIVE_SELECT_LABEL: ''
GRIDFIELD_BULKMANAGER_EDIT_HANDLER:
HEADER_TEXT: Modifica di {count} {class}
TOGGLE_ALL_LINK: Mostra/Nascondi tutto
SAVE_BTN_LABEL: Salva tutto
HEADER_TEXT: 'Modifica di {count} {class}'
TOGGLE_ALL_LINK: 'Mostra/Nascondi tutto'
SAVE_BTN_LABEL: 'Salva tutto'
CANCEL_BTN_LABEL: Annulla
SAVE_RESULT_TEXT: '{count} {class} salvati con successo.'

View File

@ -1,13 +1,18 @@
nl:
GRIDFIELD_BULK_UPLOAD: null
GRIDFIELD_BULK_MANAGER:
COMPONENT_TITLE: Bewerk één of meerdere items tegelijkertijd
COMPONENT_TITLE: 'Bewerk één of meerdere items tegelijkertijd'
EDIT_SELECT_LABEL: Bewerken
UNLINK_SELECT_LABEL: Loskoppelen
DELETE_SELECT_LABEL: Verwijderen
ACTION_BTN_LABEL: Gaan
SELECT_ALL_LABEL: Selecteer alles
SELECT_ALL_LABEL: 'Selecteer alles'
PUBLISH_SELECT_LABEL: ''
UNPUBLISH_SELECT_LABEL: ''
ARCHIVE_SELECT_LABEL: ''
GRIDFIELD_BULKMANAGER_EDIT_HANDLER:
HEADER_TEXT: '{count} {class} aan het bewerken'
TOGGLE_ALL_LINK: Toon/verberg alle
SAVE_BTN_LABEL: Alles opslaan
TOGGLE_ALL_LINK: 'Toon/verberg alle'
SAVE_BTN_LABEL: 'Alles opslaan'
CANCEL_BTN_LABEL: Annuleren
SAVE_RESULT_TEXT: ''

View File

@ -1,14 +1,18 @@
pl:
GRIDFIELD_BULK_UPLOAD: null
GRIDFIELD_BULK_MANAGER:
COMPONENT_TITLE: Modyfikuj jednocześnie jedną lub więcej pozycji.
COMPONENT_TITLE: 'Modyfikuj jednocześnie jedną lub więcej pozycji.'
EDIT_SELECT_LABEL: Edytuj
UNLINK_SELECT_LABEL: Odłącz
DELETE_SELECT_LABEL: Usuń
ACTION_BTN_LABEL: Wykonaj
SELECT_ALL_LABEL: Zaznacz wszystkie
SELECT_ALL_LABEL: 'Zaznacz wszystkie'
PUBLISH_SELECT_LABEL: ''
UNPUBLISH_SELECT_LABEL: ''
ARCHIVE_SELECT_LABEL: ''
GRIDFIELD_BULKMANAGER_EDIT_HANDLER:
HEADER_TEXT: Edycja {count} {class}
TOGGLE_ALL_LINK: Pokaż/ukryj wszystkie
SAVE_BTN_LABEL: Zapisz wszystkie
HEADER_TEXT: 'Edycja {count} {class}'
TOGGLE_ALL_LINK: 'Pokaż/ukryj wszystkie'
SAVE_BTN_LABEL: 'Zapisz wszystkie'
CANCEL_BTN_LABEL: Anuluj
SAVE_RESULT_TEXT: 'Zapisano pomyślnie {count} {class}'

View File

@ -1,14 +1,18 @@
ru:
GRIDFIELD_BULK_UPLOAD: null
GRIDFIELD_BULK_MANAGER:
COMPONENT_TITLE: Редактировать одну или несколько записей одновременно
COMPONENT_TITLE: 'Редактировать одну или несколько записей одновременно'
EDIT_SELECT_LABEL: Редактировать
UNLINK_SELECT_LABEL: Отвязать
DELETE_SELECT_LABEL: Удалить
ACTION_BTN_LABEL: Поехали
SELECT_ALL_LABEL: Выбрать все
SELECT_ALL_LABEL: 'Выбрать все'
PUBLISH_SELECT_LABEL: ''
UNPUBLISH_SELECT_LABEL: ''
ARCHIVE_SELECT_LABEL: ''
GRIDFIELD_BULKMANAGER_EDIT_HANDLER:
HEADER_TEXT: Редактировать {count} {class}
TOGGLE_ALL_LINK: Показать/Скрыть все
SAVE_BTN_LABEL: Сохранить все
HEADER_TEXT: 'Редактировать {count} {class}'
TOGGLE_ALL_LINK: 'Показать/Скрыть все'
SAVE_BTN_LABEL: 'Сохранить все'
CANCEL_BTN_LABEL: Отменить
SAVE_RESULT_TEXT: '{count} {class} успешно сохранены'

View File

@ -1,14 +1,18 @@
sk:
GRIDFIELD_BULK_UPLOAD: null
GRIDFIELD_BULK_MANAGER:
COMPONENT_TITLE: Uprav jednu alebo viac položiek súčasne.
COMPONENT_TITLE: 'Uprav jednu alebo viac položiek súčasne.'
EDIT_SELECT_LABEL: Upraviť
UNLINK_SELECT_LABEL: Odstrániť zo zoznamu
UNLINK_SELECT_LABEL: 'Odstrániť zo zoznamu'
DELETE_SELECT_LABEL: Zmazať
ACTION_BTN_LABEL: Vykonaj
SELECT_ALL_LABEL: Označiť všetky
SELECT_ALL_LABEL: 'Označiť všetky'
PUBLISH_SELECT_LABEL: ''
UNPUBLISH_SELECT_LABEL: ''
ARCHIVE_SELECT_LABEL: ''
GRIDFIELD_BULKMANAGER_EDIT_HANDLER:
HEADER_TEXT: Upravujem {count} {class}
TOGGLE_ALL_LINK: Zobraziť/Skryť všetko
SAVE_BTN_LABEL: Uložiť všetko
HEADER_TEXT: 'Upravujem {count} {class}'
TOGGLE_ALL_LINK: 'Zobraziť/Skryť všetko'
SAVE_BTN_LABEL: 'Uložiť všetko'
CANCEL_BTN_LABEL: Zrušiť
SAVE_RESULT_TEXT: '{count} {class} úspešne uložené.'

View File

@ -1,12 +1,11 @@
{
"name": "colymba-gridfield-bulk-editing-tools",
"version": "3.0.0",
"description": "Bulk upload and record editing for SilverStripe CMS",
"engines": {
"node": ">=6.x"
"node": "^18.x"
},
"scripts": {
"build": "yarn && yarn lint && NODE_ENV=production webpack -p --bail --progress",
"build": "yarn && yarn lint && rm -rf client/dist/* && NODE_ENV=production webpack --mode production --bail --progress",
"dev": "NODE_ENV=development webpack --progress",
"watch": "NODE_ENV=development webpack --watch --progress",
"css": "WEBPACK_CHILD=css npm run build",
@ -33,18 +32,18 @@
},
"homepage": "https://github.com/colymba/GridFieldBulkEditingTools",
"dependencies": {
"babel-polyfill": "6.7.4",
"jquery": "^3.5.0"
"core-js": "^3.26.0"
},
"devDependencies": {
"@silverstripe/eslint-config": "^0.0.2",
"@silverstripe/webpack-config": "^0.7",
"expose-loader": "^0.7.4",
"sass-loader": "^6.0.7"
"@silverstripe/eslint-config": "^1.0.0-alpha6",
"@silverstripe/webpack-config": "^2.0.0-alpha5",
"webpack": "^5.76.0",
"webpack-cli": "^5.0.0"
},
"babel": {
"plugins": [
"transform-object-rest-spread"
]
}
"resolutions": {
"colors": "1.4.0"
},
"browserslist": [
"defaults"
]
}

View File

@ -3,7 +3,6 @@
namespace Colymba\BulkTools;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Core\Convert;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\DataObject;
@ -334,7 +333,7 @@ class HTTPBulkToolsResponse extends HTTPResponse
);
foreach ($this->successRecords as $record) {
$data = array('id' => $record->ID, 'class' => $record->ClassName);
$data = array('id' => $record->ID, 'class' => str_replace('\\', '\\\\', $record->ClassName));
if (!$this->removesRows) {
$data['row'] = $this->getRecordGridfieldRow($record);
}
@ -348,7 +347,7 @@ class HTTPBulkToolsResponse extends HTTPResponse
$body['isWarning'] = true;
}
$this->body = Convert::raw2json($body);
$this->body = json_encode($body);
}
/**
@ -360,12 +359,4 @@ class HTTPBulkToolsResponse extends HTTPResponse
$this->createBody();
parent::outputBody();
}
/**
* @deprecated 3.1.0 This function was used to catch PHP Errors and inject additional information in the response
*/
public function shutdown()
{
// noop
}
}

View File

@ -8,8 +8,7 @@ use SilverStripe\Control\RequestHandler;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Core\Convert;
//use SilverStripe\Core\Injector\Injector;
//use SilverStripe\ORM\DataObject;
use SilverStripe\Versioned\RecursivePublishable;
use SilverStripe\AssetAdmin\Controller\AssetAdmin;
@ -90,8 +89,10 @@ class BulkUploadHandler extends RequestHandler
$this->gridField->list->add($record);
if ($this->component->getAutoPublishDataObject() && $record->hasExtension('Versioned'))
{
if (
$this->component->getAutoPublishDataObject()
&& $record->hasExtension(RecursivePublishable::class)
) {
$record->publishRecursive();
}

View File

@ -5,13 +5,12 @@ namespace Colymba\BulkUpload;
use SilverStripe\ORM\DataObject;
use SilverStripe\View\ArrayData;
use SilverStripe\Dev\Deprecation;
use SilverStripe\Forms\FormAction;
use SilverStripe\View\Requirements;
use SilverStripe\Control\Controller;
use SilverStripe\Core\Config\Config;
use Colymba\BulkUpload\BulkUploadField;
use Colymba\BulkUpload\BulkUploadHandler;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Forms\GridField\GridField_URLHandler;
use SilverStripe\Forms\GridField\GridField_HTMLProvider;
@ -334,7 +333,7 @@ class BulkUploader implements GridField_HTMLProvider, GridField_URLHandler
{
$controller = Controller::curr();
$controller->pushCurrent();
$handler = new \Colymba\BulkUpload\BulkUploadHandler($gridField, $this);
$handler = new BulkUploadHandler($gridField, $this);
return $handler->handleRequest($request);
}

View File

@ -1,61 +1,29 @@
const Path = require('path');
const webpack = require('webpack');
// Import the core config
const webpackConfig = require('@silverstripe/webpack-config');
const {
resolveJS,
externalJS,
moduleJS,
pluginJS,
moduleCSS,
pluginCSS,
} = webpackConfig;
const { JavascriptWebpackConfig, CssWebpackConfig } = require('@silverstripe/webpack-config');
const ENV = process.env.NODE_ENV;
const PATHS = {
// the root path, where your webpack.config.js is located.
ROOT: Path.resolve(),
// your node_modules folder name, or full path
MODULES: 'node_modules',
// relative path from your css files to your other files, such as images and fonts
FILES_PATH: '../',
// the root path to your javascript source files
SRC: Path.resolve('client/src'),
DIST: Path.resolve('client/dist'),
};
const config = [
{
name: 'js',
entry: {
// Main JS bundle
new JavascriptWebpackConfig('js', PATHS, 'colymba/gridfield-bulk-editing-tools')
.setEntry({
main: `${PATHS.SRC}/bundles/bundle.js`,
},
output: {
path: PATHS.DIST,
filename: 'js/[name].js',
},
devtool: (ENV !== 'production') ? 'source-map' : '',
resolve: resolveJS(ENV, PATHS),
externals: externalJS(ENV, PATHS),
module: moduleJS(ENV, PATHS),
plugins: pluginJS(ENV, PATHS),
},
{
name: 'css',
entry: {
})
.getConfig(),
// sass to css
new CssWebpackConfig('css', PATHS)
.setEntry({
main: `${PATHS.SRC}/styles/bundle.scss`,
},
output: {
path: PATHS.DIST,
filename: 'styles/[name].css'
},
devtool: (ENV !== 'production') ? 'source-map' : '',
module: moduleCSS(ENV, PATHS),
plugins: pluginCSS(ENV, PATHS),
},
})
.getConfig(),
];
// Use WEBPACK_CHILD=js or WEBPACK_CHILD=css env var to run a single config
module.exports = (process.env.WEBPACK_CHILD)
? config.find((entry) => entry.name === process.env.WEBPACK_CHILD)
: module.exports = config;
: config;

8788
yarn.lock

File diff suppressed because it is too large Load Diff