Compare commits
58 Commits
Author | SHA1 | Date |
---|---|---|
dependabot[bot] | 88a08f5387 | |
Guy Sartorelli | b9c04c7356 | |
dependabot[bot] | f2e46f3a06 | |
dependabot[bot] | dbde364f0d | |
dependabot[bot] | 01aac4b2db | |
dependabot[bot] | 4680186ecc | |
dependabot[bot] | cf1e88af7b | |
dependabot[bot] | 38b6862f2d | |
dependabot[bot] | b519c53412 | |
dependabot[bot] | 2c6411605f | |
dependabot[bot] | b0ef21dfcc | |
dependabot[bot] | e7f7253ced | |
dependabot[bot] | 8374146d8c | |
dependabot[bot] | 6601755b88 | |
dependabot[bot] | 4dc6296962 | |
dependabot[bot] | 172ed0f6d8 | |
dependabot[bot] | 968feb9385 | |
dependabot[bot] | d68e4e496e | |
dependabot[bot] | 13d5ce8f49 | |
Guy Sartorelli | 58f3dee7af | |
Guy Sartorelli | 6a47857687 | |
Steve Boyd | 92ec942161 | |
Guy Sartorelli | 92ce27762a | |
Steve Boyd | 143c61fef9 | |
Guy Sartorelli | 4401d768f5 | |
Steve Boyd | e038dc3a6d | |
Steve Boyd | 793a5476ec | |
Guy Sartorelli | c62be20b57 | |
Guy Sartorelli | afc42e0495 | |
Steve Boyd | ebd634d994 | |
Guy Sartorelli | 563f253f36 | |
Guy Sartorelli | dfcc4ce482 | |
Sabina Talipova | 2f7109ac52 | |
Sabina Talipova | 1ec807ccbe | |
Guy Sartorelli | 1c5ae8a047 | |
Niklas Forsdahl | d420a29e9f | |
Steve Boyd | ece0e209ef | |
Steve Boyd | 81f34cdd7b | |
dependabot[bot] | c34bba4508 | |
dependabot[bot] | 8e58660029 | |
dependabot[bot] | b265fb622b | |
dependabot[bot] | 7825986aba | |
dependabot[bot] | 1027fc319e | |
dependabot[bot] | 0438493a97 | |
dependabot[bot] | b99a6da26d | |
dependabot[bot] | 8295483734 | |
dependabot[bot] | d756579486 | |
Steve Boyd | d51a26a872 | |
Steve Boyd | 4e82c461de | |
Steve Boyd | a2aa7475a5 | |
dependabot[bot] | 94f21a958d | |
dependabot[bot] | b4816ab02c | |
Loz Calver | ff9127739b | |
Robbie Averill | 3be003218c | |
Thomas Portelange | b00987b735 | |
Loz Calver | 7652fee82f | |
dependabot[bot] | d8f33e0c98 | |
Thierry François | 7de4f77574 |
|
@ -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. -->
|
|
@ -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
|
|
@ -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
|
|
@ -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.
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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/*]
|
11
.tx/config
11
.tx/config
|
@ -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
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
: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
|
||||
============================
|
||||
|
||||
|
@ -68,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
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"presets": [
|
||||
"@babel/preset-env",
|
||||
"@babel/preset-react"
|
||||
]
|
||||
}
|
|
@ -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)}();
|
|
@ -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"}
|
||||
|
|
|
@ -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).",
|
||||
|
|
|
@ -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.",
|
||||
|
|
|
@ -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?"
|
||||
});
|
||||
}
|
|
@ -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ä).",
|
||||
|
|
|
@ -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).",
|
||||
|
|
|
@ -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).",
|
||||
|
|
|
@ -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).",
|
||||
|
|
|
@ -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.",
|
||||
|
|
|
@ -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 ошибка(и).",
|
||||
|
|
|
@ -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).",
|
||||
|
|
|
@ -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?"
|
||||
}
|
|
@ -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?"
|
||||
}
|
|
@ -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",
|
||||
|
|
14
lang/cs.yml
14
lang/cs.yml
|
@ -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: ''
|
||||
|
|
16
lang/de.yml
16
lang/de.yml
|
@ -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.'
|
||||
|
|
36
lang/en.yml
36
lang/en.yml
|
@ -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
|
||||
|
|
15
lang/fi.yml
15
lang/fi.yml
|
@ -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: ''
|
||||
|
|
14
lang/fr.yml
14
lang/fr.yml
|
@ -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.'
|
||||
|
|
14
lang/it.yml
14
lang/it.yml
|
@ -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.'
|
||||
|
|
13
lang/nl.yml
13
lang/nl.yml
|
@ -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: ''
|
||||
|
|
14
lang/pl.yml
14
lang/pl.yml
|
@ -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}'
|
||||
|
|
14
lang/ru.yml
14
lang/ru.yml
|
@ -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} успешно сохранены'
|
||||
|
|
16
lang/sk.yml
16
lang/sk.yml
|
@ -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é.'
|
||||
|
|
27
package.json
27
package.json
|
@ -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.2.1"
|
||||
"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"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -111,8 +111,8 @@ class ArchiveHandler extends Handler
|
|||
}
|
||||
}
|
||||
|
||||
$doneCount = count($response->getSuccessRecords());
|
||||
$failCount = count($response->getFailedRecords());
|
||||
$doneCount = count($response->getSuccessRecords() ?? []);
|
||||
$failCount = count($response->getFailedRecords() ?? []);
|
||||
$message = sprintf(
|
||||
'Archived %1$d of %2$d records.',
|
||||
$doneCount,
|
||||
|
|
|
@ -104,7 +104,7 @@ class DeleteHandler extends Handler
|
|||
$record->delete();
|
||||
}
|
||||
|
||||
$doneCount = count($response->getSuccessRecords());
|
||||
$doneCount = count($response->getSuccessRecords() ?? []);
|
||||
$message = sprintf(
|
||||
'Deleted %1$d records.',
|
||||
$doneCount
|
||||
|
|
|
@ -148,7 +148,7 @@ class EditHandler extends Handler
|
|||
$recordsFieldList = new FieldList();
|
||||
$config = $this->component->getConfig();
|
||||
|
||||
$editingCount = count($recordList);
|
||||
$editingCount = count($recordList ?? []);
|
||||
$modelClass = $this->gridField->getModelClass();
|
||||
$singleton = singleton($modelClass);
|
||||
$titleModelClass = (($editingCount > 1) ? $singleton->i18n_plural_name() : $singleton->i18n_singular_name());
|
||||
|
@ -341,7 +341,7 @@ class EditHandler extends Handler
|
|||
protected function unEscapeFieldName($fieldName)
|
||||
{
|
||||
$parts = array();
|
||||
$match = preg_match('/record_(\d+)_(\w+)/i', $fieldName, $parts);
|
||||
$match = preg_match('/record_(\d+)_(\w+)/i', $fieldName ?? '', $parts);
|
||||
|
||||
if (!$match) {
|
||||
return false;
|
||||
|
|
|
@ -111,8 +111,8 @@ class PublishHandler extends Handler
|
|||
}
|
||||
}
|
||||
|
||||
$doneCount = count($response->getSuccessRecords());
|
||||
$failCount = count($response->getFailedRecords());
|
||||
$doneCount = count($response->getSuccessRecords() ?? []);
|
||||
$failCount = count($response->getFailedRecords() ?? []);
|
||||
$message = sprintf(
|
||||
'Published %1$d of %2$d records.',
|
||||
$doneCount,
|
||||
|
|
|
@ -111,8 +111,8 @@ class UnPublishHandler extends Handler
|
|||
}
|
||||
}
|
||||
|
||||
$doneCount = count($response->getSuccessRecords());
|
||||
$failCount = count($response->getFailedRecords());
|
||||
$doneCount = count($response->getSuccessRecords() ?? []);
|
||||
$failCount = count($response->getFailedRecords() ?? []);
|
||||
$message = sprintf(
|
||||
'UnPublished %1$d of %2$d records.',
|
||||
$doneCount,
|
||||
|
|
|
@ -79,7 +79,7 @@ class BulkManager implements GridField_HTMLProvider, GridField_ColumnProvider, G
|
|||
*/
|
||||
public function setConfig($reference, $value)
|
||||
{
|
||||
if (!array_key_exists($reference, $this->config)) {
|
||||
if (!array_key_exists($reference, $this->config ?? [])) {
|
||||
user_error("Unknown option reference: $reference", E_USER_ERROR);
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ class BulkManager implements GridField_HTMLProvider, GridField_ColumnProvider, G
|
|||
*/
|
||||
public function addBulkAction($handlerClassName, $action = null)
|
||||
{
|
||||
if (!class_exists($handlerClassName)) {
|
||||
if (!class_exists($handlerClassName ?? '')) {
|
||||
user_error("Bulk action handler not found: $handlerClassName", E_USER_ERROR);
|
||||
}
|
||||
|
||||
|
@ -188,7 +188,7 @@ class BulkManager implements GridField_HTMLProvider, GridField_ColumnProvider, G
|
|||
*/
|
||||
public function augmentColumns($gridField, &$columns)
|
||||
{
|
||||
if (!in_array('BulkSelect', $columns)) {
|
||||
if (!in_array('BulkSelect', $columns ?? [])) {
|
||||
$columns[] = 'BulkSelect';
|
||||
}
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ class BulkManager implements GridField_HTMLProvider, GridField_ColumnProvider, G
|
|||
Requirements::css('colymba/gridfield-bulk-editing-tools:client/dist/styles/main.css');
|
||||
Requirements::add_i18n_javascript('colymba/gridfield-bulk-editing-tools:client/lang');
|
||||
|
||||
if (!count($this->config['actions'])) {
|
||||
if (!count($this->config['actions'] ?? [])) {
|
||||
user_error('Trying to use BulkManager without any bulk action.', E_USER_ERROR);
|
||||
}
|
||||
|
||||
|
@ -302,7 +302,7 @@ class BulkManager implements GridField_HTMLProvider, GridField_ColumnProvider, G
|
|||
'Select' => array(
|
||||
'Label' => _t('GRIDFIELD_BULK_MANAGER.SELECT_ALL_LABEL', 'Select all'),
|
||||
),
|
||||
'Colspan' => (count($gridField->getColumns()) - 1),
|
||||
'Colspan' => (count($gridField->getColumns() ?? []) - 1),
|
||||
);
|
||||
|
||||
$templateData = new ArrayData($templateData);
|
||||
|
|
|
@ -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;
|
||||
|
@ -111,8 +110,6 @@ class HTTPBulkToolsResponse extends HTTPResponse
|
|||
$this->removesRows = $removesRows;
|
||||
$this->gridField = $gridfield;
|
||||
|
||||
register_shutdown_function(array($this, 'shutdown'));
|
||||
|
||||
parent::__construct(null, $statusCode);
|
||||
}
|
||||
|
||||
|
@ -336,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);
|
||||
}
|
||||
|
@ -346,11 +343,11 @@ class HTTPBulkToolsResponse extends HTTPResponse
|
|||
$body['records']['failed'] = $this->failedRecords;
|
||||
}
|
||||
|
||||
if (count($body['records']['success']) === 0) {
|
||||
if (isset($body['records']['success']) && count($body['records']['success'] ?? []) === 0) {
|
||||
$body['isWarning'] = true;
|
||||
}
|
||||
|
||||
$this->body = Convert::raw2json($body);
|
||||
$this->body = json_encode($body);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -362,18 +359,4 @@ class HTTPBulkToolsResponse extends HTTPResponse
|
|||
$this->createBody();
|
||||
parent::outputBody();
|
||||
}
|
||||
|
||||
/**
|
||||
* Catches fatal PHP error and output something useful for the front end
|
||||
*/
|
||||
public function shutdown()
|
||||
{
|
||||
$error = error_get_last();
|
||||
if ($error !== null ) {
|
||||
$this->setMessage($error['message']);
|
||||
$this->setStatusCode(500, $error['message']);
|
||||
$this->outputBody();
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -121,7 +122,7 @@ class BulkUploadHandler extends RequestHandler
|
|||
$bulkToolsResponse = new HTTPBulkToolsResponse(false, $this->gridField);
|
||||
$bulkToolsResponse->addSuccessRecord($record);
|
||||
|
||||
$responseData['bulkTools'] = json_decode($bulkToolsResponse->getBody());
|
||||
$responseData['bulkTools'] = json_decode($bulkToolsResponse->getBody() ?? '');
|
||||
$uploadResponse->setBody(json_encode(array($responseData)));
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
@ -86,7 +85,7 @@ class BulkUploader implements GridField_HTMLProvider, GridField_URLHandler
|
|||
*/
|
||||
public function setConfig($reference, $value)
|
||||
{
|
||||
if (!array_key_exists($reference, $this->config)) {
|
||||
if (!array_key_exists($reference, $this->config ?? [])) {
|
||||
user_error("Unknown option reference: $reference", E_USER_ERROR);
|
||||
}
|
||||
|
||||
|
@ -291,7 +290,7 @@ class BulkUploader implements GridField_HTMLProvider, GridField_URLHandler
|
|||
$uploadField = $this->bulkUploadField($gridField);
|
||||
|
||||
$data = ArrayData::create(array(
|
||||
'Colspan' => (count($gridField->getColumns())),
|
||||
'Colspan' => (count($gridField->getColumns() ?? [])),
|
||||
'UploadField' => $uploadField->Field() // call ->Field() to get requirements in right order
|
||||
));
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue