Merged in flash insert panel bug fixes from r65827

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@65829 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2008-11-13 05:37:10 +00:00
parent fc1b9daf50
commit d8c795b7b7
2 changed files with 9 additions and 2 deletions

View File

@ -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;

View File

@ -25,7 +25,7 @@ ThumbnailStripField.prototype = {
parentField.observeMethod('Change', this.ajaxGetFiles.bind(this));
}
var searchField = $$('#' + this.updateMethod + 'Search input')[0];
var searchField = $$('#' + this.updateMethod + 'Search input')[0];
var timeout = undefined;
if(searchField) {
@ -35,6 +35,7 @@ ThumbnailStripField.prototype = {
timeout = setTimeout(function() {
var searchText = searchField.value;
$('Flash').ajaxGetFiles(null, searchText);
$('Image').ajaxGetFiles(null, searchText);
}, 500);
});