120 Commits

Author SHA1 Message Date
Frederic Massart
954b354511 MDL-37507 repositories: improved formatting of external resources 2013-03-04 13:28:41 +13:00
Davo Smith
039677df70 MDL-37831 filepicker - icons / details / tree selector buttons now work more reliably 2013-02-08 20:37:19 +00:00
Petr Škoda
83be0dfd57 MDL-36475 tweak zIndexes once more
The expected ranges are now:
* 0-1000 for normal code
* 5000-5999 for TinyMCE
* 7000-8999 for filepicker and filemanager

This patch fixes also incorrect location of "MDL-25736 - French spellchecker fixes." modification reminder.
2012-12-15 11:46:46 +01:00
Paul Nicholls
80d92db940 MDL-36548: Major performance boost to Detail (list) view in file picker
Pass the data (filelist) into the DataTable when initialising it, rather than rendering an empty DataTable and then pushing all of the data into it via addRows().

It's also slightly more efficient to just pass the node in, rather than fetching the node and passing its ID in, as DataTable.render() will just re-select the node if given the ID. [Spotted by Andrew Nicols]
2012-11-14 12:36:13 +13:00
Dan Poltawski
a56dc90320 Merge branch 'MDL-33766-master' of git://github.com/FMCorz/moodle
Conflicts:
	version.php
2012-11-08 18:10:26 +08:00
Frederic Massart
68acd1157e MDL-33766 files: Improved validation of areamaxbytes 2012-11-01 16:47:06 +08:00
Frederic Massart
21e3ea77a3 MDL-33766 files: Support for userquota/size limit in draft areas 2012-11-01 16:46:42 +08:00
Petr Škoda
e13b330d49 MDL-35771 lower the index values in file related code to prevent dragging problems in YUI 2012-10-21 14:37:10 +08:00
Frederic Massart
7dab27b313 MDL-35664 filepicker: Filepicker knows about the current path and uses it 2012-10-15 09:46:03 +08:00
Rossiani Wijaya
a3433213a1 MDL-29872 Dropbox repository: add message handler to filepicker header and add message to logout from dropbox. When user clicked on logout button from dropbox repository, it will also logging them out from dropbox site through a popup window 2012-09-07 15:42:43 +08:00
Sam Hemelryk
0bb0f086ac Merge branch 'MDL-33640_master' of git://github.com/MaxThrax/moodle 2012-08-15 11:48:40 +12:00
Petr Škoda
3b715c5f80 MDL-34741 use 2in3 in file picker 2012-08-11 20:40:03 +02:00
Paul Nicholls
ec3eaa2c38 MDL-33640 - change $templatesinitialized to an array; improve naming and automate use of template
* $templatesinitialized is now an array, so that subsequent calls to initialise_filepicker which request different repositories will include those (and only those) templates which it requires but have not yet been included
* The get_template method has also been renamed to get_upload_template (and the template to "uploadform_" followed by the repository type), since it only applies to upload forms
* If a plugin provides a get_upload_template method, the template it returns will now automatically be used instead of the standard uploadform template when generating an upload form
2012-08-09 09:47:40 +12:00
Paul Nicholls
013cf2878c MDL-33640 - Add ability to use custom filepicker templates
Allow repository plugins to register a template by defining a get_template() method, coupled with the ability to request the template be used by create_upload_form() instead of the standard 'uploadform' template.  The template is automatically registered using the plugin's name, and core templates will override any which clash; this also means that a theme can override these templates in a custom renderer if it wants to.
2012-08-08 13:50:47 +12:00
Marina Glancy
0c2fe3aac1 MDL-34213 fixed mistype causing wrong link in some browsers 2012-07-13 16:12:17 +08:00
Marina Glancy
6133c2ea21 MDL-33444 Upload repository can specify custom label for filepicker 2012-07-06 09:43:50 +08:00
Dan Poltawski
6e471afe8b Merge branch 'wip-MDL-33417-master' of git://github.com/marinaglancy/moodle 2012-06-20 13:42:19 +08:00
Sam Hemelryk
dae0c90dbd Merge branch 'wip-mdl-33506' of git://github.com/rajeshtaneja/moodle 2012-06-20 09:15:48 +12:00
Sam Hemelryk
9d7d2b03c8 MDL-33423 filepicker: Fixed visibility problem with loading icon 2012-06-19 16:53:44 +12:00
Marina Glancy
1778f310f3 MDL-33417 Show reference icon for files in filepicker 2012-06-19 11:15:51 +08:00
Sam Hemelryk
2e7ce603ff MDL-33423 filepicker: Added delay and fade in to loading icon 2012-06-19 10:11:21 +12:00
Rajesh Taneja
d01ebb940d MDL-33506 Filepicker: Search box text will be selected on focus 2012-06-14 13:03:08 +08:00
Dan Poltawski
837eef2e64 MDL-33541 - remove cookies from filepicker 2012-06-13 12:17:52 +08:00
Marina Glancy
5e11746696 MDL-33218 fixing filemanager/filepicker look in IE
now all YUI dialogues are under the div with id #filesskin. This way we can avoid using !important in CSS and use #filesskin instead. It will have priority over YUI skin in all browswers including IE (!important does not work in IE).

Conflicts:

	files/renderer.php
	theme/base/style/filemanager.css
2012-05-28 11:54:33 +08:00
Marina Glancy
9213f5476f MDL-33324 fixed bugs with icons in filepicker/filemanager treeview
- in treeview the icons for parent folders did not appear
- in treeview after refreshing (expanding subtrees) the image previews were replaced back to filetype icons
- also fixed a mistype in icon url in repository_local
2012-05-24 14:10:40 +08:00
Dan Poltawski
6a0d7194f7 MDL-31901: filemanager/picker.js - match coding style
* No inline ifs
* Spacing between ternary operators
* Missing ;'s
2012-05-21 18:25:56 +08:00
Dan Poltawski
f8e74b20f9 MDL-28666 repository - Switch usefilereference to PARAM_BOOL 2012-05-21 18:21:31 +08:00
Marina Glancy
16dfd717f7 MDL-31901 fixed forgotten overwrite dialogue in filepicker 2012-05-21 11:57:55 +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
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
23b830091a MDL-31901: FileManager, added image for accessing right-click action 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
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
Marina Glancy
3a1e425b7f MDL-31901: Modifying filepicker to use renderers
- fixed some small errors and made cosmetic changes to the code
- added 'loading' icon when selecting a file
- finished population of login form, added support for radio elements there
2012-05-21 11:57:51 +08:00
Marina Glancy
5ce13292b5 MDL-31901: Filepicker: Moved HTML for loginform into renderer 2012-05-21 11:57:51 +08:00
Marina Glancy
b5e7b6385e MDL-31901: Introducing renderers for filepicker:
- create repository renderer, implement functions for returning HTML templates used in filepicker
- let filepicker use HTML from templates
- move CSS for filemanager and filepicker to the separate css file in base theme
- use only YUI3 in filepicker (get rid of YUI2)
- add button for 'View details' in filepicker (though this view mode is still not ready)
2012-05-21 11:57:51 +08:00
Marina Glancy
4adecd7beb MDL-31901: brushing the filepicker code
- use the same function for displaying request result for list/search/login/logout commands since sometimes we can not predict what kind of result is going to be returned
- prevent default behaviour for links, so ### does not appear in URL
- use flag issearchresult as received in the response from repository because we can't guess it right sometimes
- do not make excessive AJAX request when user switches to list view
2012-05-21 11:57:51 +08:00
Dongsheng Cai
6723372514 MDL-28666 Extends repository to support references
1. Allow repository to create references to external contents
2. Extends files API to handle file references
3. Generic file caching
4. Backup/restore file references
5. Download external contents if repository uninstalled
6. Allow filepicker to display iframe
7. PHPUnit test suits
2012-05-21 11:57:51 +08:00
Marina Glancy
400d228e51 MDL-32106: fixed JS bug - when html element did not exist the script stopped 2012-03-26 09:52:01 +08:00
Marina Glancy
a5159b864d MDL-32037: MDL-32037: After displaying error message filepicker could not send proper request to server
We need to make sure that code executed on error does not create more requests and
especially does not create the same request that resulted with error. So now by default
filepicker will clear the right side of the window if repository_ajax.php returned an
error.
Also fixed an 'invalidsesskey' error string.
2012-03-16 09:38:33 +08:00