From 2e8da707a0d796747eb6cef2f16be8f169217cf1 Mon Sep 17 00:00:00 2001 From: Davo Smith Date: Tue, 18 Dec 2012 20:22:20 +0000 Subject: [PATCH] MDL-31641 filemanager - display help message when drag and drop upload is not supported --- files/renderer.php | 4 ++-- lang/en/moodle.php | 3 +++ theme/base/style/filemanager.css | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/files/renderer.php b/files/renderer.php index 2a5e3512b1aa8..69278475a2da5 100644 --- a/files/renderer.php +++ b/files/renderer.php @@ -188,7 +188,7 @@ private function fm_print_generallayout($fm) { $strdroptoupload = get_string('droptoupload', 'moodle'); $icon_progress = $OUTPUT->pix_icon('i/loading_small', $strloading).''; $restrictions = $this->fm_print_restrictions($fm); - $strdndenabled = get_string('dndenabled_insentence', 'moodle').$OUTPUT->help_icon('dndenabled'); + $strdndnotsupported = get_string('dndnotsupported_insentence', 'moodle').$OUTPUT->help_icon('dndnotsupported'); $strdndenabledinbox = get_string('dndenabled_inbox', 'moodle'); $loading = get_string('loading', 'repository'); @@ -196,7 +196,7 @@ private function fm_print_generallayout($fm) {
'.$restrictions.' - - '.$strdndenabled.' + - '.$strdndnotsupported.'
diff --git a/lang/en/moodle.php b/lang/en/moodle.php index 16430f767ef24..dbfb223de0576 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -472,6 +472,9 @@ $string['dndenabled_help'] = 'You can drag one or more files from your desktop and drop them onto the box below to upload them.
Note: this may not work with other web browsers'; $string['dndenabled_insentence'] = 'drag and drop available'; $string['dndenabled_inbox'] = 'You can drag and drop files here to add them.'; +$string['dndnotsupported'] = 'Drag and drop upload not supported'; +$string['dndnotsupported_help'] = 'Your browser does not support drag and drop upload.
This feature is available in all recent versions of Chrome, Firefox and Safari, as well as Internet Explorer v10 and above.'; +$string['dndnotsupported_insentence'] = 'drag and drop not supported'; $string['dnduploadwithoutcontent'] = 'This upload does not have any content'; $string['dndworkingfiletextlink'] = 'Drag and drop files, text or links onto course sections to upload them'; $string['dndworkingfilelink'] = 'Drag and drop files or links onto course sections to upload them'; diff --git a/theme/base/style/filemanager.css b/theme/base/style/filemanager.css index 9fc9fe436aa21..2cecdc4abbc73 100644 --- a/theme/base/style/filemanager.css +++ b/theme/base/style/filemanager.css @@ -341,6 +341,8 @@ a.ygtvspacer:hover {color: transparent;text-decoration: none;} .filemanager-container.dndupload-over .dndupload-target {background:#FFFFFF;position:absolute;top:10px;bottom:10px;left:10px;right:10px;border: 2px dashed #6c8cd3;padding-top:85px;text-align:center;z-index: 3000;} .dndupload-message {display:none;} .dndsupported .dndupload-message {display:inline;} +.dnduploadnotsupported-message {display:none;} +.dndnotsupported .dnduploadnotsupported-message {display:inline;} .dndupload-target {display:none;} .dndsupported .dndupload-ready .dndupload-target {display:block;} .dndupload-uploadinprogress {display:none;text-align:center;}