summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2015-06-03 14:52:00 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2015-07-06 16:32:10 +0200
commitc8145cdbd6160788569d00fbc267abd08ae019c9 (patch)
tree9757cbbf9ef2fd42074522c7b85124427f447224 /config
parent14eef434fff78bf39a926b1f27220b9ad1ebb833 (diff)
downloadnextcloud-server-c8145cdbd6160788569d00fbc267abd08ae019c9.tar.gz
nextcloud-server-c8145cdbd6160788569d00fbc267abd08ae019c9.zip
Javascript mimetype icon resolver
This makes it possible to retrieve the icon for mimetypes in javascript. It makes no additional queries to the server to retrieve the mimetype. * config/mimetypealiases.json added * mimetype.js: this is where the logic resides to convert from mimetype to icon url * mimetypelist.js: generated file with a list of mimetype mapping (aliases) and the list of icon files * ./occ maintenance:mimetypesjs : new command for occ to gernerate mimetypes.js * unit tests updated and still work * javascript tests added * theming support * folder of the theme is now present in javascript (OC.theme.folder)
Diffstat (limited to 'config')
-rw-r--r--config/mimetypealiases.json68
1 files changed, 68 insertions, 0 deletions
diff --git a/config/mimetypealiases.json b/config/mimetypealiases.json
new file mode 100644
index 00000000000..d1684460eff
--- /dev/null
+++ b/config/mimetypealiases.json
@@ -0,0 +1,68 @@
+{
+ "_comment" : "When this file is changed make sure to run",
+ "_comment2": "./occ maintenance:mimetypesjs",
+ "_comment3": "Otherwise your update won't propagate through the system",
+
+
+ "application/coreldraw": "image",
+ "application/font-sfnt": "font",
+ "application/font-woff": "font",
+ "application/illustrator": "image/vector",
+ "application/json": "text/code",
+ "application/msaccess": "database",
+ "application/msexcel": "x-office/spreadsheet",
+ "application/mspowerpoint": "x-office/presentation",
+ "application/msword": "x-office/document",
+ "application/octet-stream": "file",
+ "application/postscript": "image/vector",
+ "application/vnd.android.package-archive": "package/x-generic",
+ "application/vnd.ms-excel": "x-office/spreadsheet",
+ "application/vnd.ms-excel.addin.macroEnabled.12": "x-office/spreadsheet",
+ "application/vnd.ms-excel.sheet.binary.macroEnabled.12": "x-office/spreadsheet",
+ "application/vnd.ms-excel.sheet.macroEnabled.12": "x-office/spreadsheet",
+ "application/vnd.ms-excel.template.macroEnabled.12": "x-office/spreadsheet",
+ "application/vnd.ms-fontobject": "font",
+ "application/vnd.ms-powerpoint": "x-office/presentation",
+ "application/vnd.ms-powerpoint.addin.macroEnabled.12": "x-office/presentation",
+ "application/vnd.ms-powerpoint.presentation.macroEnabled.12": "x-office/presentation",
+ "application/vnd.ms-powerpoint.slideshow.macroEnabled.12": "x-office/presentation",
+ "application/vnd.ms-powerpoint.template.macroEnabled.12": "x-office/presentation",
+ "application/vnd.ms-word.document.macroEnabled.12": "x-office/document",
+ "application/vnd.ms-word.template.macroEnabled.12": "x-office/document",
+ "application/vnd.oasis.opendocument.presentation": "x-office/presentation",
+ "application/vnd.oasis.opendocument.presentation-template": "x-office/presentation",
+ "application/vnd.oasis.opendocument.spreadsheet": "x-office/spreadsheet",
+ "application/vnd.oasis.opendocument.spreadsheet-template": "x-office/spreadsheet",
+ "application/vnd.oasis.opendocument.text": "x-office/document",
+ "application/vnd.oasis.opendocument.text-master": "x-office/document",
+ "application/vnd.oasis.opendocument.text-template": "x-office/document",
+ "application/vnd.oasis.opendocument.text-web": "x-office/document",
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": "x-office/presentation",
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow": "x-office/presentation",
+ "application/vnd.openxmlformats-officedocument.presentationml.template": "x-office/presentation",
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "x-office/spreadsheet",
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template": "x-office/spreadsheet",
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "x-office/document",
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template": "x-office/document",
+ "application/x-7z-compressed": "package/x-generic",
+ "application/x-compressed": "package/x-generic",
+ "application/x-dcraw": "image",
+ "application/x-deb": "package/x-generic",
+ "application/x-font": "font",
+ "application/x-gimp": "image",
+ "application/x-gzip": "package/x-generic",
+ "application/x-perl": "text/code",
+ "application/x-photoshop": "image",
+ "application/x-php": "text/code",
+ "application/x-rar-compressed": "package/x-generic",
+ "application/x-tar": "package/x-generic",
+ "application/x-tex": "text",
+ "application/xml": "text/html",
+ "application/yaml": "text/code",
+ "application/zip": "package/x-generic",
+ "image/svg+xml": "image/vector",
+ "text/css": "text/code",
+ "text/csv": "x-office/spreadsheet",
+ "text/x-shellscript": "text/code"
+}
+