From 478dc1d08549d11bcf8deb737e26cd3e6d7172c4 Mon Sep 17 00:00:00 2001 From: Kaleb Murphy Date: Thu, 14 Aug 2008 00:28:19 +0000 Subject: [PATCH] Form file attachment icons and fileloader.js are no longer loaded inline. --- docs/changelog/7.x.x.txt | 2 +- lib/WebGUI/Form/File.pm | 20 ++----- www/extras/fileIcons.js | 119 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 125 insertions(+), 16 deletions(-) create mode 100644 www/extras/fileIcons.js diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 56a33d9d4..d5b96b059 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -24,7 +24,7 @@ - fixed: CS Thread sort on last post reply is now working correctly. - fixed: Gallery Cross Publish now works properly - fixed: Exposed a form element for the GalleryAlbum Others Can Add property - + - fixed: Form attachment icons no longer break Safari 3 (no longer loaded inline). 7.5.19 - fixed: paginator doesn't show correct number of page links with a limit applied - fixed: user profile defaults can contain arbitrary perl code diff --git a/lib/WebGUI/Form/File.pm b/lib/WebGUI/Form/File.pm index a5a22fb1b..b425deb8f 100644 --- a/lib/WebGUI/Form/File.pm +++ b/lib/WebGUI/Form/File.pm @@ -246,23 +246,13 @@ sub toHtml { my @files = @{ $storage->getFiles } if (defined $storage); my $maxFiles = $self->get('maxAttachments') - scalar(@files); if ($maxFiles > 0) { - $self->session->style->setScript($self->session->url->extras('FileUploadControl.js'),{type=>"text/javascript"}); - $uploadControl = '