mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
Fix regular expression in expose view
- Exclude tif and xcf images from expose view - Define a global regexp for expose
This commit is contained in:
parent
c91fc89b48
commit
c5ddcdfcf9
@ -239,7 +239,7 @@ var et2_description = expose(et2_baseWidget.extend([et2_IDetachedDOM],
|
|||||||
var self= this;
|
var self= this;
|
||||||
var $span = this.options.mime_data? jQuery(this.span): jQuery('a',this.span);
|
var $span = this.options.mime_data? jQuery(this.span): jQuery('a',this.span);
|
||||||
$span.click(function(e) {
|
$span.click(function(e) {
|
||||||
if (self.options.expose_view && typeof self.options.mime !='undefined' && self.options.mime.match(/video\/|image\/|audio\//,'ig'))
|
if (self.options.expose_view && typeof self.options.mime !='undefined' && self.options.mime.match(self.mime_regexp,'ig'))
|
||||||
{
|
{
|
||||||
self._init_blueimp_gallery(e, href);
|
self._init_blueimp_gallery(e, href);
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ function expose (widget)
|
|||||||
};
|
};
|
||||||
|
|
||||||
// For filtering to only show things we can handle
|
// For filtering to only show things we can handle
|
||||||
var mime_regex = new RegExp(/video\/|image\/|audio\//);
|
var mime_regex = new RegExp(/(video\/)|(image\/:*(?!tif|x-xcf))|(audio\/)/);
|
||||||
|
|
||||||
// Only one gallery
|
// Only one gallery
|
||||||
var gallery = null;
|
var gallery = null;
|
||||||
@ -206,7 +206,7 @@ function expose (widget)
|
|||||||
init: function()
|
init: function()
|
||||||
{
|
{
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
this.mime_regexp = mime_regex;
|
||||||
var self=this;
|
var self=this;
|
||||||
this.expose_options = {
|
this.expose_options = {
|
||||||
// The Id, element or querySelector of the gallery widget:
|
// The Id, element or querySelector of the gallery widget:
|
||||||
|
Loading…
Reference in New Issue
Block a user