Entry point for UploadField_select.js

Used in iframe, so can't be rolled into other code.
Moved in admin/ since that's easier for now with Webpack entry points,
and we'll move all JS/CSS into admin/ anyway soon.
This commit is contained in:
Ingo Schommer 2016-09-10 22:17:39 +12:00
parent 25f4741142
commit 6be25f3b52
3 changed files with 4 additions and 1 deletions

View File

@ -60,7 +60,7 @@ class UploadField_SelectHandler extends RequestHandler
public function index()
{
// Requires a separate JS file, because we can't reach into the iframe with entwine.
Requirements::javascript(FRAMEWORK_DIR . '/client/dist/js/UploadField_select.js');
Requirements::javascript(FRAMEWORK_DIR . '/admin/client/dist/js/UploadField_select.js');
return $this->renderWith('SilverStripe\\Admin\\CMSDialog');
}

View File

@ -0,0 +1,2 @@
!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(1),i=r(o);i["default"].entwine("ss",function(e){e("form.uploadfield-form .TreeDropdownField").entwine({onmatch:function t(){this._super();var e=this;this.bind("change",function(){var t=e.closest("form").find(".grid-field");t.setState("ParentID",e.getValue()),t.reload()})},onunmatch:function n(){this._super()}})})},function(e,t){e.exports=jQuery}]);
//# sourceMappingURL=UploadField_select.js.map

View File

@ -48,6 +48,7 @@ const config = [
leaktools: `${PATHS.ADMIN_JS_SRC}/legacy/leaktools.js`,
MemberImportForm: `${PATHS.ADMIN_JS_SRC}/legacy/MemberImportForm.js`,
CMSSecurity: `${PATHS.ADMIN_JS_SRC}/legacy/CMSSecurity.js`,
UploadField_select: `${PATHS.FRAMEWORK_JS_SRC}/legacy/UploadField_select.js`,
},
resolve: {
modulesDirectories: [PATHS.ADMIN_JS_SRC, PATHS.FRAMEWORK_JS_SRC, PATHS.MODULES],