Skip to content

Commit

Permalink
FIX add_i18n_javascript calls not being updated after JS move
Browse files Browse the repository at this point in the history
This fixes alert / confirm boxes that were popping up without text (for
example silverstripe-cms/issues/1476), although ideally we wouldn't
show empty dialog boxes on this sort of error - we'd have some default,
or a way to detect the issue.
  • Loading branch information
Hamish Friedlander committed May 9, 2016
1 parent d52058a commit 2af63a8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .tx/config
Expand Up @@ -8,7 +8,7 @@ source_lang = en
type = YML

[silverstripe-cms.master-js]
file_filter = javascript/lang/src/<lang>.js
source_file = javascript/lang/src/en.js
file_filter = client/lang/src/<lang>.js
source_file = client/lang/src/en.js
source_lang = en
type = KEYVALUEJSON
2 changes: 1 addition & 1 deletion code/controllers/AssetAdmin.php
Expand Up @@ -66,7 +66,7 @@ public function init() {
Versioned::set_stage(Versioned::DRAFT);

Requirements::javascript(CMS_DIR . "/client/dist/js/AssetAdmin.js");
Requirements::add_i18n_javascript(CMS_DIR . '/client/src/lang', false, true);
Requirements::add_i18n_javascript(CMS_DIR . '/client/lang', false, true);
Requirements::css(CMS_DIR . '/client/dist/styles/bundle.css');
CMSBatchActionHandler::register('delete', 'AssetAdmin_DeleteBatchAction', 'Folder');
}
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/CMSMain.php
Expand Up @@ -70,7 +70,7 @@ public function init() {

Requirements::css(CMS_DIR . '/client/dist/styles/bundle.css');
Requirements::customCSS($this->generatePageIconsCss());
Requirements::add_i18n_javascript(CMS_DIR . '/client/src/lang', false, true);
Requirements::add_i18n_javascript(CMS_DIR . '/client/lang', false, true);
Requirements::javascript(CMS_DIR . '/client/dist/js/bundle-legacy.js', [
'provides' => [
CMS_DIR . '/client/dist/js/CMSMain.AddForm.js',
Expand Down
2 changes: 1 addition & 1 deletion code/forms/SiteTreeURLSegmentField.php
Expand Up @@ -38,7 +38,7 @@ public function getAttributes() {

public function Field($properties = array()) {
Requirements::javascript(CMS_DIR . '/client/dist/js/SiteTreeURLSegmentField.js');
Requirements::add_i18n_javascript(CMS_DIR . '/client/src/lang', false, true);
Requirements::add_i18n_javascript(CMS_DIR . '/client/lang', false, true);
Requirements::css(FRAMEWORK_ADMIN_DIR . '/client/dist/styles/bundle.css');
return parent::Field($properties);
}
Expand Down

0 comments on commit 2af63a8

Please sign in to comment.