Skip to content

Commit

Permalink
MDL-40759 icons: filepicker
Browse files Browse the repository at this point in the history
Use font awesome svg icons for files in the file picker. Move the old icons to bootstrapbase.
  • Loading branch information
Damyon Wiese committed Mar 17, 2017
1 parent 663640f commit 3c88507
Show file tree
Hide file tree
Showing 463 changed files with 78 additions and 56 deletions.
42 changes: 21 additions & 21 deletions lib/classes/output/icon_system_fontawesome.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,26 +290,26 @@ public function get_core_icon_map() {
'core:f/flash-96' => 'fa-flash',
'core:f/flash-128' => 'fa-flash',
'core:f/flash-256' => 'fa-flash',
'core:f/folder' => 'fa-folder',
'core:f/folder-24' => 'fa-folder',
'core:f/folder-32' => 'fa-folder',
'core:f/folder-48' => 'fa-folder',
'core:f/folder-64' => 'fa-folder',
'core:f/folder-72' => 'fa-folder',
'core:f/folder-80' => 'fa-folder',
'core:f/folder-96' => 'fa-folder',
'core:f/folder-128' => 'fa-folder',
'core:f/folder-256' => 'fa-folder',
'core:f/folder-open' => 'fa-folder-open',
'core:f/folder-open-24' => 'fa-folder-open',
'core:f/folder-open-32' => 'fa-folder-open',
'core:f/folder-open-48' => 'fa-folder-open',
'core:f/folder-open-64' => 'fa-folder-open',
'core:f/folder-open-72' => 'fa-folder-open',
'core:f/folder-open-80' => 'fa-folder-open',
'core:f/folder-open-96' => 'fa-folder-open',
'core:f/folder-open-128' => 'fa-folder-open',
'core:f/folder-open-256' => 'fa-folder-open',
'core:f/folder' => 'fa-folder-o',
'core:f/folder-24' => 'fa-folder-o',
'core:f/folder-32' => 'fa-folder-o',
'core:f/folder-48' => 'fa-folder-o',
'core:f/folder-64' => 'fa-folder-o',
'core:f/folder-72' => 'fa-folder-o',
'core:f/folder-80' => 'fa-folder-o',
'core:f/folder-96' => 'fa-folder-o',
'core:f/folder-128' => 'fa-folder-o',
'core:f/folder-256' => 'fa-folder-o',
'core:f/folder-open' => 'fa-folder-open-o',
'core:f/folder-open-24' => 'fa-folder-open-o',
'core:f/folder-open-32' => 'fa-folder-open-o',
'core:f/folder-open-48' => 'fa-folder-open-o',
'core:f/folder-open-64' => 'fa-folder-open-o',
'core:f/folder-open-72' => 'fa-folder-open-o',
'core:f/folder-open-80' => 'fa-folder-open-o',
'core:f/folder-open-96' => 'fa-folder-open-o',
'core:f/folder-open-128' => 'fa-folder-open-o',
'core:f/folder-open-256' => 'fa-folder-open-o',
'core:f/gif' => 'fa-file-image-o',
'core:f/gif-24' => 'fa-file-image-o',
'core:f/gif-32' => 'fa-file-image-o',
Expand Down Expand Up @@ -583,7 +583,7 @@ public function get_core_icon_map() {
'theme:fp/add_file' => 'fa-file-o',
'theme:fp/alias' => 'fa-link',
'theme:fp/check' => 'fa-check',
'theme:fp/create_folder' => 'fa-folder',
'theme:fp/create_folder' => 'fa-folder-o',
'theme:fp/cross' => 'fa-remove',
'theme:fp/download_all' => 'fa-download',
'theme:fp/help' => 'fa-question-circle',
Expand Down
5 changes: 3 additions & 2 deletions lib/filelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,8 @@ function file_folder_icon($iconsize = null) {
if (!array_key_exists($iconsize, $cached)) {
foreach ($iconpostfixes as $size => $postfix) {
$fullname = $CFG->dirroot.'/pix/f/folder'.$postfix;
if ($iconsize >= $size && (file_exists($fullname.'.png') || file_exists($fullname.'.gif'))) {
if ($iconsize >= $size &&
(file_exists($fullname.'.svg') || file_exists($fullname.'.png') || file_exists($fullname.'.gif'))) {
$cached[$iconsize] = 'f/folder'.$postfix;
break;
}
Expand Down Expand Up @@ -2348,7 +2349,7 @@ function send_stored_file($stored_file, $lifetime=null, $filter=0, $forcedownloa
$size = 256;
}
$fileicon = file_file_icon($stored_file, $size);
send_file($CFG->dirroot.'/pix/'.$fileicon.'.png', basename($fileicon).'.png');
send_file($CFG->dirroot.'/pix/'.$fileicon.'.svg', basename($fileicon).'.svg');
} else {
// preview images have fixed cache lifetime and they ignore forced download
// (they are generated by GD and therefore they are considered reasonably safe).
Expand Down
2 changes: 1 addition & 1 deletion pix/f/folder-open.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion pix/f/folder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed theme/boost/pix/fp/add_file.png
Binary file not shown.
4 changes: 1 addition & 3 deletions theme/boost/pix/fp/add_file.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed theme/boost/pix/fp/alias.png
Binary file not shown.
1 change: 1 addition & 0 deletions theme/boost/pix/fp/alias.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed theme/boost/pix/fp/alias_sm.png
Binary file not shown.
Binary file removed theme/boost/pix/fp/check.png
Binary file not shown.
1 change: 1 addition & 0 deletions theme/boost/pix/fp/check.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed theme/boost/pix/fp/create_folder.png
Binary file not shown.
4 changes: 1 addition & 3 deletions theme/boost/pix/fp/create_folder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed theme/boost/pix/fp/cross.png
Binary file not shown.
1 change: 1 addition & 0 deletions theme/boost/pix/fp/cross.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed theme/boost/pix/fp/download_all.png
Binary file not shown.
4 changes: 1 addition & 3 deletions theme/boost/pix/fp/download_all.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions theme/boost/pix/fp/folder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed theme/boost/pix/fp/help.png
Binary file not shown.
4 changes: 1 addition & 3 deletions theme/boost/pix/fp/help.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed theme/boost/pix/fp/link.png
Binary file not shown.
1 change: 1 addition & 0 deletions theme/boost/pix/fp/link.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed theme/boost/pix/fp/link_sm.png
Binary file not shown.
1 change: 1 addition & 0 deletions theme/boost/pix/fp/link_sm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions theme/boost/pix/fp/list.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed theme/boost/pix/fp/logout.png
Binary file not shown.
4 changes: 1 addition & 3 deletions theme/boost/pix/fp/logout.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed theme/boost/pix/fp/path_folder.png
Diff not rendered.
1 change: 1 addition & 0 deletions theme/boost/pix/fp/path_folder.svg
Binary file removed theme/boost/pix/fp/path_folder_rtl.png
Diff not rendered.
1 change: 1 addition & 0 deletions theme/boost/pix/fp/path_folder_rtl.svg
Binary file removed theme/boost/pix/fp/refresh.png
Diff not rendered.
4 changes: 1 addition & 3 deletions theme/boost/pix/fp/refresh.svg
Binary file removed theme/boost/pix/fp/search.png
Diff not rendered.
4 changes: 1 addition & 3 deletions theme/boost/pix/fp/search.svg
Binary file removed theme/boost/pix/fp/setting.png
Diff not rendered.
Loading

0 comments on commit 3c88507

Please sign in to comment.