From 355ef81252d6e61a4c4e8a53bb0fd3cc6215b483 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 23 Jan 2015 15:53:21 +0000 Subject: [PATCH] Support audio mime tyep for expose view, in order to play audio file --- etemplate/js/et2_widget_vfs.js | 2 +- etemplate/js/expose.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etemplate/js/et2_widget_vfs.js b/etemplate/js/et2_widget_vfs.js index 24ad549c6d..96169214c0 100644 --- a/etemplate/js/et2_widget_vfs.js +++ b/etemplate/js/et2_widget_vfs.js @@ -327,7 +327,7 @@ var et2_vfsMime = expose(et2_valueWidget.extend([et2_IDetachedDOM], { var base_url = egw.webserverUrl.match(/^\//,'ig')?egw(window).window.location.origin + egw.webserverUrl:egw.webserverUrl; var mediaContent = []; - if (_value && _value.mime && _value.mime.match(/video/,'ig')) + if (_value && _value.mime && _value.mime.match(/video|audio/,'ig')) { mediaContent = [{ title: _value.name, diff --git a/etemplate/js/expose.js b/etemplate/js/expose.js index 2532890a69..d8efd75cd3 100644 --- a/etemplate/js/expose.js +++ b/etemplate/js/expose.js @@ -48,7 +48,7 @@ function expose (widget) }; // For filtering to only show things we can handle - var mime_regex = new RegExp(/video\/|image\//); + var mime_regex = new RegExp(/video\/|image|audio\//); // Only one gallery var gallery = null;