mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR Tidied up ThumbnailStripField->getflash() formatting
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@65445 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
58c1695c39
commit
22a4079277
@ -43,7 +43,6 @@ class ThumbnailStripField extends FormField {
|
|||||||
$folder = DataObject::get_by_id('Folder', (int) $_GET['folderID']);
|
$folder = DataObject::get_by_id('Folder', (int) $_GET['folderID']);
|
||||||
|
|
||||||
if(!$folder) return _t('ThumbnailStripField.NOTAFOLDER', 'This is not a folder');
|
if(!$folder) return _t('ThumbnailStripField.NOTAFOLDER', 'This is not a folder');
|
||||||
|
|
||||||
$folderList = $folder->getDescendantIDList("Folder");
|
$folderList = $folder->getDescendantIDList("Folder");
|
||||||
|
|
||||||
array_unshift($folderList, $folder->ID);
|
array_unshift($folderList, $folder->ID);
|
||||||
@ -84,13 +83,11 @@ class ThumbnailStripField extends FormField {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getflash() {
|
function getflash() {
|
||||||
|
$folder = DataObject::get_by_id("Folder", (int) $_GET['folderID']);
|
||||||
|
|
||||||
$folder = DataObject::get_by_id("Folder", $_GET['folderID']);
|
if(!$folder) return _t('ThumbnailStripField.NOTAFOLDER', 'This is not a folder');
|
||||||
|
|
||||||
if( !$folder )
|
$folderList = $folder->getDescendantIDList('Folder');
|
||||||
return _t('ThumbnailStripField.NOTAFOLDER');
|
|
||||||
|
|
||||||
$folderList = $folder->getDescendantIDList("Folder");
|
|
||||||
array_unshift($folderList, $folder->ID);
|
array_unshift($folderList, $folder->ID);
|
||||||
|
|
||||||
$width = Image::$strip_thumbnail_width - 10;
|
$width = Image::$strip_thumbnail_width - 10;
|
||||||
@ -101,15 +98,6 @@ class ThumbnailStripField extends FormField {
|
|||||||
if($flashObjects) {
|
if($flashObjects) {
|
||||||
$result .= '<ul>';
|
$result .= '<ul>';
|
||||||
foreach($flashObjects as $flashObject) {
|
foreach($flashObjects as $flashObject) {
|
||||||
// doesn't work well because we can't stop/mute flash-files, AND IE does not bubble javascript-events
|
|
||||||
// over a flash-object grml
|
|
||||||
// $result .= <<<HTML
|
|
||||||
//<a href="$flashObject->URL">
|
|
||||||
// <object type="application/x-shockwave-flash" data="$flashObject->URL" width="$width" height="$height">
|
|
||||||
// <param name="movie" value="$flashObject->URL" />
|
|
||||||
// </object>
|
|
||||||
//</a>
|
|
||||||
//HTML;
|
|
||||||
$result .= <<<HTML
|
$result .= <<<HTML
|
||||||
<li>
|
<li>
|
||||||
<a href="$flashObject->URL">
|
<a href="$flashObject->URL">
|
||||||
@ -124,7 +112,6 @@ HTML;
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user