mirror of
https://github.com/colymba/GridFieldBulkEditingTools.git
synced 2024-10-22 09:05:57 +00:00
FIX tmpl.js requirement
This commit is contained in:
parent
cc418a2947
commit
7972cef1f1
@ -275,23 +275,21 @@ class GridFieldBulkImageUpload_Request extends RequestHandler {
|
||||
Requirements::javascript(FRAMEWORK_DIR . '/javascript/AssetUploadField.js');
|
||||
Requirements::css(FRAMEWORK_DIR . '/css/AssetUploadField.css');
|
||||
|
||||
Requirements::javascript(BULK_EDIT_TOOLS_PATH . '/javascript/GridFieldBulkImageUpload.js');
|
||||
Requirements::css(BULK_EDIT_TOOLS_PATH . '/css/GridFieldBulkImageUpload.css');
|
||||
Requirements::javascript(BULK_EDIT_TOOLS_PATH . '/javascript/GridFieldBulkImageUpload_downloadtemplate.js');
|
||||
|
||||
$form = $this->uploadForm();
|
||||
$form->setTemplate('LeftAndMain_EditForm');
|
||||
$form->addExtraClass('cms-content center LeftAndMain'); //not using cms-edit-form to avoid btn being hooked with default handlers
|
||||
$form->setAttribute('data-pjax-fragment', 'Content');
|
||||
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/javascript-templates/tmpl.js');
|
||||
|
||||
Requirements::javascript(BULK_EDIT_TOOLS_PATH . '/javascript/GridFieldBulkImageUpload.js');
|
||||
Requirements::css(BULK_EDIT_TOOLS_PATH . '/css/GridFieldBulkImageUpload.css');
|
||||
Requirements::javascript(BULK_EDIT_TOOLS_PATH . '/javascript/GridFieldBulkImageUpload_downloadtemplate.js');
|
||||
|
||||
if($request->isAjax())
|
||||
{
|
||||
$response = new SS_HTTPResponse(
|
||||
Convert::raw2json(
|
||||
array(
|
||||
'Content' => $form->forTemplate()->getValue()//$form->forAjaxTemplate()->getValue()
|
||||
)
|
||||
)
|
||||
Convert::raw2json(array( 'Content' => $form->forAjaxTemplate()->getValue() ))
|
||||
);
|
||||
$response->addHeader('X-Pjax', 'Content');
|
||||
$response->addHeader('Content-Type', 'text/json');
|
||||
@ -300,9 +298,7 @@ class GridFieldBulkImageUpload_Request extends RequestHandler {
|
||||
}
|
||||
else {
|
||||
$controller = $this->getToplevelController();
|
||||
return $controller->customise(array(
|
||||
'Content' => $form
|
||||
));
|
||||
return $controller->customise(array( 'Content' => $form ));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
jQuery(document).ready(function(){
|
||||
window.tmpl.cache['colymba-gfbiu-uploadfield-downloadtemplate'] = tmpl(
|
||||
'{% for (var i=0, files=o.files, l=files.length, file=files[0]; i<l; file=files[++i]) { %}' +
|
||||
'<li class="ss-uploadfield-item template-download{% if (file.error) { %} ui-state-error{% } %}" data-fileid="{%=file.id%}">' +
|
||||
@ -45,5 +44,4 @@ jQuery(document).ready(function(){
|
||||
'</li>' +
|
||||
'{% } %}'
|
||||
);
|
||||
});
|
||||
//'<div class="ss-uploadfield-item-editform loading"><iframe frameborder="0" src="{%=file.edit_url%}"></iframe></div>' +
|
||||
|
Loading…
x
Reference in New Issue
Block a user