diff --git a/code/ThumbnailStripField.php b/code/ThumbnailStripField.php
index 5a7b619f..b72652d5 100755
--- a/code/ThumbnailStripField.php
+++ b/code/ThumbnailStripField.php
@@ -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 .= '';
+ } else {
+ if($folder) {
+ $result = '
' . _t('ThumbnailStripField.NOFOLDERFLASHFOUND', 'No flash files found in') . ' ' . $folder->Title . '
';
+ } else {
+ $result = '' . _t('ThumbnailStripField.NOFLASHFOUND', 'No flash files found') . '
';
+ }
}
return $result;
diff --git a/javascript/ThumbnailStripField.js b/javascript/ThumbnailStripField.js
index 5c2bd396..b2e46336 100755
--- a/javascript/ThumbnailStripField.js
+++ b/javascript/ThumbnailStripField.js
@@ -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);
});