mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
ENHANCEMENT Added error messages to flash uploader panel, to be consistent with the image uploader one
BUGFIX Fixed flash uploader not searching for the correct files, due to changes in r65820 git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@65827 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
75df34d78e
commit
33467b2011
@ -119,7 +119,7 @@ class ThumbnailStripField extends FormField {
|
||||
$flashObjects = DataObject::get('File', $whereSQL);
|
||||
} else {
|
||||
if($searchText) {
|
||||
$flashObjects = DataObject::get('File', "Filename LIKE '%$searchText%'");
|
||||
$flashObjects = DataObject::get('File', "Filename LIKE '%$searchText%' AND Filename LIKE '%.swf'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -137,6 +137,12 @@ class ThumbnailStripField extends FormField {
|
||||
HTML;
|
||||
}
|
||||
$result .= '</ul>';
|
||||
} else {
|
||||
if($folder) {
|
||||
$result = '<h2>' . _t('ThumbnailStripField.NOFOLDERFLASHFOUND', 'No flash files found in') . ' ' . $folder->Title . '</h2>';
|
||||
} else {
|
||||
$result = '<h2>' . _t('ThumbnailStripField.NOFLASHFOUND', 'No flash files found') . '</h2>';
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
@ -25,7 +25,9 @@ ThumbnailStripField.prototype = {
|
||||
parentField.observeMethod('Change', this.ajaxGetFiles.bind(this));
|
||||
}
|
||||
|
||||
var searchField = $$('#' + this.updateMethod + 'Search input')[0];
|
||||
console.debug(parentField);
|
||||
|
||||
var searchField = $$('#' + this.updateMethod + 'Search input')[0];
|
||||
var timeout = undefined;
|
||||
|
||||
if(searchField) {
|
||||
@ -35,6 +37,7 @@ ThumbnailStripField.prototype = {
|
||||
timeout = setTimeout(function() {
|
||||
var searchText = searchField.value;
|
||||
|
||||
$('Flash').ajaxGetFiles(null, searchText);
|
||||
$('Image').ajaxGetFiles(null, searchText);
|
||||
}, 500);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user