53442 Commits

Author SHA1 Message Date
Barbara Ramiro
0f1bdd0d2c MDL-32900 Change Icons to FileTypesIcons 2012-05-21 16:37:14 +08:00
Marina Glancy
559276b153 MDL-32247,MDL-32831,MDL-32900 Use correct url building of file type icons
- function get_mimetypes_array() now contains also information about filetype groups and language strings
- use 'smart' human-readable mimetype description
- never determine filetype group based on filetype icon image! remove function mimeinfo_from_icon()
- get rid of class filetype_parser and file lib/filestorage/file_types.mm, replaced with functions file_get_typegroup(), file_extension_in_typegroup() and file_mimetype_in_typegroup()
- support multiple icon sizes, not only 16 and 32
- retrieve filetype icon only using proper functions file_..._icon() from lib/filelib.php throughout the code
- increase size of repository thumbnails to 90 and icons to 24 (will take effect when new icons exist)
2012-05-21 16:01:04 +08:00
Dongsheng Cai
8177b7b9f0 MDL-33082 Detecting mimetype based on content bytes 2012-05-21 15:26:39 +08:00
Barbara Ramiro
b456271028 MDL-31901 filemanager and filepicker styling
- Swaped tool buttons and view buttons sequence for keyboard access both on filemanager and filepicker
- Added "new folder name" label and "cancel" button on create a folder dialogue
- Added href="#" and resized fonts on confirmation  and message dialogue
2012-05-21 15:25:20 +08:00
David Mudrak
f653c9d830 MDL-33096 update the file's timemodified if it was changed in the draft area
Previously up to 2.2, new file records were created for all files that
were modified in the draft area - see file_save_draft_area_files().
The commit aba1e17dd7ffa5e42d309fb2efe7945aeb3b3d39 introduced a new way
of re-using the previous file's record. We need to transfer the
timemodified of the file in the draft area into the file in the real
area when saving the draft area to achieve the same behaviour now in 2.3.

Note this may eventually lead to kinda weird situation when the file was
created say on a certain timecreated but then was replaced with another file
that has timemodified set to a lower value (in other words, the file
will look as if it was firstly modified and then created). This case
should be handled by the filepicker if it is seen as the issue.
2012-05-21 11:57:56 +08:00
David Mudrak
3333e7e20c MDL-33093 invalidate the thumbnail in the local browser's cache on update
This adds &oid= parameter to the URL of file preview images. The
parameter is supposed to be ignored by draftfile.php and pluginfile.php.
It just holds some unique identification of the original file's
revision. Currently, we use the timestamp of the most recent
modification of the original file.
2012-05-21 11:57:56 +08:00
David Mudrak
b53fad1e8b MDL-33098 filemanager now stores the new author field correctly 2012-05-21 11:57:56 +08:00
Dongsheng Cai
61506a0af9 MDL-33032 Fixed issues for file integration
1. Added tracker issue number in comment
2. Fixed stored_file::delete_reference()
3. repository::send_file() will throw exception if not implemented by subclass
4. Fixed renaming unit test, added one unit test for deleting original file
5. Fixed copyright statement for googledoc and picasa repository plugin
6. Implemented stored_file::set_filesize()
2012-05-21 11:57:56 +08:00
Dongsheng Cai
4712676dfa MDL-28666, Fixed source field when download a file using filepicker 2012-05-21 11:57:56 +08:00
Barbara Ramiro
0f0d10c5be MDL-31901 filemanager and filepicker styling
- Thumbnail for Private files, Server file and Recent file restyled
- Thumbnail for Context menu made flexible
- Filenames on hover made all text visible
- Drag and drop arrow hidden for unsupported browsers
- Drag and drop styled applied on edit profile
- Yui3 panel focused removed
2012-05-21 11:57:55 +08:00
Marina Glancy
16dfd717f7 MDL-31901 fixed forgotten overwrite dialogue in filepicker 2012-05-21 11:57:55 +08:00
Dongsheng Cai
fc4e8034fc MDL-32867 filemanager and repository
1. Allowing "." as filename, so filemanager can rename folder
2. Fixed import_external_file method
3. Disallow recent repository to list file references
2012-05-21 11:57:55 +08:00
Marina Glancy
55e868053c MDL-32867: changed renaming of folders to the new API (function 'rename'), removed unused code 2012-05-21 11:57:55 +08:00
Petr Skoda
9bd553b7b8 MDL-33015 fix invalid PAGE->url in repo instance config pages
Conflicts:

	admin/repositoryinstance.php
2012-05-21 11:57:55 +08:00
Petr Skoda
a38a17a12a MDL-33015 revert form actions to default back to FULLME
This is a temporary workaround until we fix all admin pages to set up actual url properly in admin_externalpage_setup().
2012-05-21 11:57:55 +08:00
Marina Glancy
469a53a053 MDL-31901 Implemented lazy loading of thumbnails in filemanager 2012-05-21 11:57:55 +08:00
Dongsheng Cai
04e3b007c2 MDL-28666 phpdoc improvements 2012-05-21 11:57:54 +08:00
Marina Glancy
9dbdf31f8c MDL-32867 Display a list of references pointing to the file in filemanager 2012-05-21 11:57:54 +08:00
Barbara Ramiro
420e7bb27b MDL-31901 Styled File Manager Icon view, Table view and Tree view 2012-05-21 11:57:54 +08:00
Dongsheng Cai
462c4955f4 MDL-28666 file_storage::get_directory_files() supports references 2012-05-21 11:57:54 +08:00
Dongsheng Cai
7051415cca MDL-28666 Files API and db changes
1. Fix db regression
2. Unit tests for is_external_file() and rename exception
3. Searching reference method exclude draft files
2012-05-21 11:57:54 +08:00
Marina Glancy
6dd299befa MDL-31901, MDL-28666 merged files API changes 2012-05-21 11:57:53 +08:00
David Mudrak
dafe129637 MDL-31901 draft files manager supports realthumbnail, realicon and dimensions for images 2012-05-21 11:57:53 +08:00
David Mudrak
9d19777234 MDL-31901 draftfile.php supports the preview parameter 2012-05-21 11:57:53 +08:00
David Mudrak
97b603c621 MDL-31901 fixed the name of user draft file serving handler
Files stored in user context, draft are must be served by draftfile.php,
not the pluginfile.php.
2012-05-21 11:57:53 +08:00
David Mudrak
dfad252c9e MDL-31901 repositories serving images from the filepool now provide preview details 2012-05-21 11:57:53 +08:00
David Mudrak
0dbf6c88bb MDL-31901 file_info_stored now provides access to the wrapped stored_file's get_imageinfo() method 2012-05-21 11:57:53 +08:00
Marina Glancy
b7725e30c2 MDL-32914 fixed function get_imageinfo() to get rid of notice messages 2012-05-21 11:57:53 +08:00
Marina Glancy
9a62f7799b MDL-32867 Working with external references in filemanager
- Files that are references to external resources have special shortcut icon in filemanager
- When user selects a REF file in filemanager, he can see the 'Original' of the file in the way that original repository wants to show it, it is loaded dynamically via AJAX request
- Files that are themselves the source of references of other files in the system have 'link' icon in filemanager. When user tries to remove/rename/overwrite SRC file he is warned that all ## existing references will be updated/converted to copies.
- Changed confirmation messages for deleting, moving/renaming of the folders
- confirmation dialog in filemanager is using YUI3 now
2012-05-21 11:57:53 +08:00
Marina Glancy
dd1f051e4a MDL-31901 filepicker interface changes:
- fixed displaying and dragging of dialog popups;
- fixed error when repository results are filtered;
- added string for image dimensions
2012-05-21 11:57:53 +08:00
Marina Glancy
55089a9d01 MDL-31901: moved select-file panel outside of filepicker/filemanager for better UI 2012-05-21 11:57:53 +08:00
Marina Glancy
5cf44c1f1f MDL-31901,MDL-28666: add support for external references in new filepicker design 2012-05-21 11:57:53 +08:00
Marina Glancy
1908ae06fb MDL-31901: filemanger: fixed bug with switching to treeview in empty folder 2012-05-21 11:57:52 +08:00
Marina Glancy
e0ff0867bd MDL-31901: filemanager: fixed 'Original' label, and small bug in treeview navigation 2012-05-21 11:57:52 +08:00
Marina Glancy
4325db53ab MDL-31901: Filemanager and Filepicker, cleaned up requirements and strings 2012-05-21 11:57:52 +08:00
Marina Glancy
6c2367ccf1 MDL-31901: Highlighting main file in FileManager 2012-05-21 11:57:52 +08:00
Marina Glancy
c092681b4b MDL-31901: Updating/moving files in FileManager
- added new functions to the backend (repository/draftfiles_ajax.php) to allow changing of file name, location, license and author in one request
- enabled changing file properties using JS UI (lib/form/filemanager.js)
2012-05-21 11:57:52 +08:00
Marina Glancy
694beb548c MDL-31901: FileManager uses more YUI3 windows and more renderers
- Add folder dialog in FileManager now uses YUI3 and renderer;
- Fixed bug with remembering current folder in Tree view;
- Display error messages in FileManager using YUI3 and not using 'alert'
2012-05-21 11:57:52 +08:00
Marina Glancy
23b830091a MDL-31901: FileManager, added image for accessing right-click action 2012-05-21 11:57:52 +08:00
Marina Glancy
acd78d9d82 MDL-31901: removed accidentally commited testing code 2012-05-21 11:57:52 +08:00
Barbara Ramiro
e88d564186 MDL-31901: Change the UI in filepicker CSS rendered and images 2012-05-21 11:57:52 +08:00
Marina Glancy
e709ddd29c MDL-31901: Allow FileManager to re-use FilePicker JS code for view modes:
- when loading core_filepicker we extend the Node element with functions necessary to display files list in different view modes;
- repository/filepicker.js is changed to use those functions;
- FileManager now has three different view modes (icon view, tree view and table view), JS code is re-used from FilePicker;
- files in FileManager no longer have context menu, they have one popup Widget with different actions instead;
- Added more templates for JS code to FileManager, use similar CSS class names as FilePicker;
- lib/filelib.php : fixed double slashes in path, return more data about files;
- lib/form/filemanager.php : pass information to FileManager about available licenses and default author;
- repository/draftfiles_ajax.php : return information about directory tree for file moving UI in FileManager, return formatted information;
- repository/lib.php : function repository::prepare_listing() now can work also with draftarea files listing;
2012-05-21 11:57:52 +08:00
Marina Glancy
d1d186917c MDL-31901: moved filepicker html to files/renderer.php, pass templates once per page 2012-05-21 11:57:52 +08:00
Marina Glancy
906e7d89a5 MDL-31901: user renderer for filemanager, decrease html generation in filemanager.js and dndupload.js 2012-05-21 11:57:52 +08:00
Marina Glancy
830acea6c1 MDL-31901: show shorttile instead of title where applicable 2012-05-21 11:57:52 +08:00
Marina Glancy
ce3eeb98f1 MDL-32473,MDL-32471: Lazy loading of next page and image thumbnails when scrolling 2012-05-21 11:57:52 +08:00
Marina Glancy
7ccf18a629 MDL-31901: Simple loading of the next page, migrating to YUI 3.5.0
- instead of using paging bar and navigating between pages, there is a link 'more' in the bottom of the list that loads the files from the next page and adds them to the bottom of the list;
- DataTable is updated to YUI 3.5.0, sorting is done properly
2012-05-21 11:57:52 +08:00
Marina Glancy
b92241f280 MDL-31901: Changing interface of file picker, use renderers:
- Filepicker window is now resizable and draggable;
- filepicker&renderer: removed id substitution from renderer, replaced it with classes (better readability);
- filepicker: allowed tree and table view for search results;
- filepicker: fixed small bug with displaying external link checkbox
- filepicker: display additional information about file in select window, repository returns more formatted information
2012-05-21 11:57:51 +08:00
Marina Glancy
5bdf63cce0 MDL-14636: Support table view in Filepicker, provide more info about files
- Added table view in Filepicker where for each file we show Name, Last modified, Size and Type. Sortable by column
- Preprocess list of files returned from repositories to include formatted size, dates, type and also add filetype icon
- Make sure that local repositories (coursefiles, filesystem, local, recent, user) return information about file size, datemodified, datecreated, author, license
2012-05-21 11:57:51 +08:00
Marina Glancy
2f6749f4bf MDL-32083: Filepicker tree view should display folders starting from top
- path bar is not displayed in tree view mode
 - display (and load) hierarchy of folders above the current - take it from path and load siblings
 - make sure the current folder is remembered when navigating between folders in tree view so it remains when switching to other view mode
 - fix couple of small bugs caused by previous changes in MDL-31901
2012-05-21 11:57:51 +08:00