diff --git a/_config.php b/_config.php index 332f216..b3d9bbc 100644 --- a/_config.php +++ b/_config.php @@ -1,8 +1 @@ addExtraClass('center cms-content'); $form->setAttribute('data-pjax-fragment', 'CurrentForm Content'); - Requirements::javascript(BULKEDITTOOLS_MANAGER_PATH . '/javascript/GridFieldBulkEditingForm.js'); - Requirements::css(BULKEDITTOOLS_MANAGER_PATH . '/css/GridFieldBulkEditingForm.css'); - Requirements::add_i18n_javascript(BULKEDITTOOLS_PATH . '/lang/js'); + Requirements::javascript('colymba/gridfield-bulk-editing-tools:bulkManager/javascript/GridFieldBulkEditingForm.js'); + Requirements::css('colymba/gridfield-bulk-editing-tools:bulkManager/css/GridFieldBulkEditingForm.css'); + Requirements::add_i18n_javascript('colymba/gridfield-bulk-editing-tools:lang/js'); if ($this->request->isAjax()) { $response = new HTTPResponse( diff --git a/bulkManager/code/BulkManager.php b/bulkManager/code/BulkManager.php index 39344d6..98d40d1 100644 --- a/bulkManager/code/BulkManager.php +++ b/bulkManager/code/BulkManager.php @@ -277,9 +277,9 @@ class BulkManager implements GridField_HTMLProvider, GridField_ColumnProvider, G */ public function getHTMLFragments($gridField) { - Requirements::css(BULKEDITTOOLS_MANAGER_PATH . '/css/GridFieldBulkManager.css'); - Requirements::javascript(BULKEDITTOOLS_MANAGER_PATH . '/javascript/GridFieldBulkManager.js'); - Requirements::add_i18n_javascript(BULKEDITTOOLS_PATH . '/lang/js'); + Requirements::css('colymba/gridfield-bulk-editing-tools:bulkManager/css/GridFieldBulkManager.css'); + Requirements::javascript('colymba/gridfield-bulk-editing-tools:bulkManager/javascript/GridFieldBulkManager.js'); + Requirements::add_i18n_javascript('colymba/gridfield-bulk-editing-tools:lang/js'); if (!count($this->config['actions'])) { user_error('Trying to use GridFieldBulkManager without any bulk action.', E_USER_ERROR); diff --git a/bulkUpload/code/BulkUploader.php b/bulkUpload/code/BulkUploader.php index 47514ee..b7978b7 100644 --- a/bulkUpload/code/BulkUploader.php +++ b/bulkUpload/code/BulkUploader.php @@ -427,9 +427,9 @@ class BulkUploader implements GridField_HTMLProvider, GridField_URLHandler 'UploadField' => $uploadField->Field() // call ->Field() to get requirements in right order )); - Requirements::css(BULKEDITTOOLS_UPLOAD_PATH . '/css/GridFieldBulkUpload.css'); - Requirements::javascript(BULKEDITTOOLS_UPLOAD_PATH . '/javascript/GridFieldBulkUpload.js'); - Requirements::add_i18n_javascript(BULKEDITTOOLS_PATH . '/lang/js'); + Requirements::css('colymba/gridfield-bulk-editing-tools:bulkUpload/css/GridFieldBulkUpload.css'); + Requirements::javascript('colymba/gridfield-bulk-editing-tools:bulkUpload/javascript/GridFieldBulkUpload.js'); + Requirements::add_i18n_javascript('colymba/gridfield-bulk-editing-tools:lang/js'); return array( 'header' => $data->renderWith('Colymba\\BulkUpload\\BulkUploader'), diff --git a/composer.json b/composer.json index a366cb0..4147bdd 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "colymba/gridfield-bulk-editing-tools", - "type": "silverstripe-module", + "type": "silverstripe-vendormodule", "description": "SilverStripe GridField component to upload images and edit records in bulk", "homepage": "https://github.com/colymba/GridFieldBulkEditingTools", "keywords": ["silverstripe", "bulk upload", "image upload", "gridfield bulk upload"], @@ -16,13 +16,20 @@ } ], "require": { - "silverstripe/framework": "^4.0@dev", - "silverstripe/asset-admin": "^1.0@dev" + "silverstripe/framework": "^4.0", + "silverstripe/asset-admin": "^1.0" }, "extra": { "branch-alias": { "dev-master": "3.x-dev" - } + }, + "expose": [ + "bulkManager/css", + "bulkManager/javascript", + "bulkUpload/css", + "bulkUpload/javascript", + "lang" + ] }, "autoload": { "psr-4": {