159 Commits

Author SHA1 Message Date
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
Eloy Lafuente (stronk7)
8ebbe295ab MDL-31929 minor fixup (the file is plenty, but avoid introducing new ones) 2012-03-13 23:01:59 +01:00
Eloy Lafuente (stronk7)
4c31dfd14a Merge branch 'wip-MDL-31929-master' of git://github.com/marinaglancy/moodle 2012-03-13 23:01:11 +01:00
Marina Glancy
20ee508499 MDL-31929: Repositories wikimedia and youtube lack paging
repositories wikimedia and youtube:
- save last search in
- process parameter 'page'
- remove buttons 'Refresh', 'Search' and 'Logout' since they don't have meaning
filepicker:
- allow unknown number of pages (['pages'] = -1), show one 'Next' page after the current (both JS and non-JS modes)
repository wikimedia:
- add non-AJAX search form to make it work with JS disabled
2012-03-12 11:35:50 +08:00
Marina Glancy
7f9358fcc0 MDL-31838: Allow caching static responses from repositories in file picker 2012-03-12 11:35:35 +08:00
Andrew Robert Nicols
1628fd3bb5 MDL-31590 Correct title of error dialogue on filepicker
Thanks to Gilles-Philippe Leblanc for this patch
2012-02-14 15:42:02 +00:00
Andrew Robert Nicols
36ef66430e MDL-31000 Respect sortorder of repositories when displaying the filepicker 2012-01-13 15:52:04 +00:00
Andrew Robert Nicols
37461af103 MDL-30641 Stop italicising and underlining folder names in the filepicker 2011-12-07 17:14:25 +00:00
Jamie Pratt
1ae299f5f3 MDL-27919 Fixed a regression where I was seeing that after choosing "Overwrite"
in a filemanager form component when subsequently trying to add another file the
file picker would then immediately close upon opening.
2011-09-21 13:15:23 +07:00
Jamie Pratt
913b3cb30c MDL-27919 also adding a callback to the filepicker when a file is overwritten
but a file with the same name. This is not necessary in most cases but is
instant and some code may expect a call to the function whether the url and / or
file name has changed or not so it can update itself when the file changes.
2011-09-18 13:57:09 +07:00
Jamie Pratt
794cc7e1cf MDL-27919 Fixes 'undefined' message and similar problems when selecting a
recent file, server file or when renaming a file being uploaded with the same
name as a previous one.
2011-09-18 13:22:35 +07:00
Petr Skoda
9d753c38d7 MDL-28554 fix problematic loading of io-upload-frame
This is a bit of a mystery, somehow 'io' module dependency is not enough to load everything, this might be caused by a regression in yui.
2011-08-24 15:00:10 +02:00