37 Commits

Author SHA1 Message Date
David Woloszyn
dfa476e5a5 MDL-76271 dndupload: Corrected layout when uploading to course via dnd 2022-11-16 11:16:45 +11:00
Huong Nguyen
0d4069918e MDL-73457 Course: Fix drag & drop image prevents moving resources
Including in this commit:
 - Modify the UI to make the section dropzone more visible
 - Prevent the direct image dragging in Chrome, Safari by improving the check
2022-02-28 14:00:57 +07:00
Ferran Recio
3d2a6eacae MDL-71779 core_courseformat: reactive add and delete sections 2021-10-28 16:41:17 +02:00
Ferran Recio
ef745009ed MDL-71209 courseformat: add state suport to legacy action
Adapt the current course editing libraries to modify also
the course state data. This way, any UI component that
watches the course structure can react to the changes.
2021-08-20 16:49:06 +02:00
Andrew Nicols
a1ccefe2ac MDL-70990 core_form: Standardise event name usage
The `types` object introduced in Moodle 3.11 has been replaced with the
`eventTypes` object which is used consistently across all CustomEvent
definitinos.

Likewise the trigger functions have been renamed from
`triggerUploadStarted` to `notifyUploadStarted` and from
`triggerUploadCompleted` to `notifyUploadCompleted`.

Backwards compatability is maintained.
2021-05-26 10:46:52 +08:00
Huong Nguyen
c6fb80b639 MDL-70947 File upload: Upload protection
Interacts badly with double-submit protection, and not all uploads protected
2021-04-29 15:28:19 +07:00
Peter
6afbdf2778 MDL-59954 mod_course: Remove file size restriction on D&D on course page
Remove file size restrictions for teachers on course page.
Use user_max_upload_file_size instead of the max_file_size
2018-12-19 08:36:45 +08:00
Huong Nguyen
0b245bf390 MDL-62712 Filepicker: Improve upload process
Lost the uploading file when user press Submit before upload process has done
2018-07-10 15:18:45 +07:00
Davo Smith
96eaee3daf MDL-60427 dndupload: fix Firefox handling of 0-byte folders 2018-01-10 09:58:51 +00:00
Davo Smith
4e737cf37f MDL-60427 dndupload: detect attempts to upload folders 2018-01-03 12:36:32 +00:00
Jake Dallimore
865c4f5df9 MDL-57480 core_course: make drag and drop fire a dom updated event
When adding media via drag and drop, the notifyFilterContentUpdated
event should be called after the item is added to the DOM. This allows
things like videojs for example, to process the new content.
2017-01-10 07:42:52 +08:00
Andrew Nicols
296af14b19 MDL-51117 JavaScript: Convert alert to M.core.alert in dndupload
This also updates a language string to use string params instead of
hard-prefixing.
2016-02-11 08:43:27 +08:00
Barry Oosthuizen
a3657f8b42 MDL-49959 course: Fix hidden drag and drop message 2015-06-09 09:37:53 +01:00
Eric Merrill
6f0776b6ff MDL-48643 Javascript: Create modals hidden, then show, to prevent scroll
Modal dialogs need to be created with visible: false and then call
.show() on it to make it visible. This prevents the page from jumping to
the top.
2014-12-21 22:54:25 -05:00
Andrew Nicols
d2782804cb MDL-45124 dndupload: Lowercase types when comparing
IE helpfull uses a mixed-case version of 'Text' which fails the string
comparison. All other browsers use lowercase for their mime-types.
2014-04-22 16:08:26 +08:00
Sam Hemelryk
5a3e5fa078 MDL-43688 dndupload: fixed positioning across themes 2014-01-24 09:52:47 +13:00
Andrew Nicols
9b2ad813b8 MDL-42801 JavaScript: Fix dndupload to match actual style 2013-12-28 09:13:40 +08:00
Andrew Nicols
d5367fb566 MDL-42117 JavaScript: Ensure that new activities are fully set up
We don't need to set up anything specifically for toolboxes any more, but
other third-party JS may require additional setup following new module
creation.
2013-10-22 11:26:44 +08:00
Sam Hemelryk
f803ce267f MDL-39814 actionmenu: tweaked the action menu post integration
The following changes have been made:
 * course_section_cm_edit_actions now allows the caller more options for the
   display of the action menu.
 * The site menu block now disables the JS enhancement of the actionmenu so
   that it displays as it did before. After more testing this seemed like the
   only option that worked in the limited space of the block when it had
   several modules.
 * draganddrop of resources now triggers the action menu enhancement as well.
 * Fixed display of title when the menu is not being enhanced by JS.
 * Fixed the alignment of the completion icon in the bootstrapbase theme.
 * Tweaked the CSS for the standard theme.
2013-08-01 13:05:04 +12:00
Davo Smith
09fd07fe00 MDL-38367 course dndupload - deprecate public 'add_type' function, remove non-YUI3 API call to _node 2013-03-18 18:47:04 +00:00
Davo Smith
413bca9f76 MDL-38367 course dndupload - workaround to allow 'add X here' text to be drop target in Firefox 2013-03-11 22:44:55 +00:00
Davo Smith
66079e28fd MDL-38367 course dndupload - various tweaks to the UI
Switched to Moodle-style dialog boxes (thanks Andrew for the pointer)
Enter button now submits the form (from within the 'name' field)
Upload button is disabled when the name is empty (if the name is required for the selected handler)
Dialog now has 'What do you want to do with this text?' and 'Name' for the text
Entire course section now has a class added when you drag over it (to enable it to be styled in the future)
2013-03-11 22:44:55 +00:00
Davo Smith
2748d8efdb MDL-33946 course dndupload - fixes to dialog when dragging text
Radio buttons have unique IDs, matching the label IDs
'What do you want to call this text' input moved down and disabled when 'label' selected
'Add page here' changed to 'Add text here'
2013-03-06 22:38:01 +00:00
Davo Smith
04a38bd311 MDL-38033 dndupload - ignore case when comparing dropped file extensions with those supported by activity modules 2013-02-14 20:19:41 +00:00
Davo Smith
785e09a7e3 MDL-32456 mod_label - support course drag and drop upload images to create labels 2013-02-08 08:13:24 +00:00
Davo Smith
0470a094e2 MDL-35568 course dndupload - resources created with the same visibility as the section they are dragged onto 2013-01-04 12:31:31 +00:00
Frederic Massart
eacc63ab57 MDL-36883 course: Fixed HTML differences with drag & drop 2012-11-29 11:14:05 +08:00
Frederic Massart
8a3b8918cb MDL-36449 usability: Course drag and drop field styling 2012-11-14 11:38:10 +08:00
Aparup Banerjee
d022f63202 MDL-35587 fixed up whitespaces 2012-10-09 16:35:32 +08:00
Rex Lorenzo
bc3f5bcae1 MDL-35587 - Display grouping name for Drag and Dropped resources 2012-09-23 01:14:14 -07:00
Davo Smith
4d40dc9256 MDL-34214 Course dndupload - removed unneeded classes from preview element 2012-07-07 19:02:23 +01:00
Davo Smith
6c0ae99b69 MDL-33056 Course dnd upload - improved status box styling and added fade in/out 2012-06-01 11:27:42 +01:00
Davo Smith
f684250bda MDL-22504 Course drag and drop upload - removed browser specific content hacks, made 'text and link' dragging an experimental feature 2012-05-21 08:34:50 +01:00
Davo Smith
5a4decbc2d MDL-22504 Course drag and drop upload - (mostly) fixed the dragging of text between Firefox <==> Chrome 2012-05-17 21:19:52 +01:00
Davo Smith
b64300fc42 MDL-22504 Improved drag and drop status message, fixed text dragged from firefox, fix icon 2012-05-17 13:59:54 +01:00
Sam Hemelryk
a0a06d05fa MDL-22504 course-dndupload: Fixed up a couple of minor bugs 2012-05-17 11:29:38 +12:00
Davo Smith
33b24bdd99 MDL-22504 Course drag and drop upload - moved file locations 2012-05-16 08:25:22 +01:00