mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-26 21:01:30 +02:00
Expose view work in progress
This commit is contained in:
parent
811f24f9b7
commit
cb439ffc55
@ -259,7 +259,7 @@ var et2_vfsMime = expose(et2_valueWidget.extend([et2_IDetachedDOM],
|
|||||||
"description": "Size of icon / thumbnail, in pixels",
|
"description": "Size of icon / thumbnail, in pixels",
|
||||||
"default": et2_no_init
|
"default": et2_no_init
|
||||||
},
|
},
|
||||||
expose_callback:{
|
"expose_callback":{
|
||||||
"name": "expose_callback",
|
"name": "expose_callback",
|
||||||
"type": "js",
|
"type": "js",
|
||||||
"default": et2_no_init,
|
"default": et2_no_init,
|
||||||
@ -279,7 +279,13 @@ var et2_vfsMime = expose(et2_valueWidget.extend([et2_IDetachedDOM],
|
|||||||
this.iconOverlayContainer = jQuery(document.createElement('span')).addClass('iconOverlayContainer');
|
this.iconOverlayContainer = jQuery(document.createElement('span')).addClass('iconOverlayContainer');
|
||||||
this.image = jQuery(document.createElement("img"));
|
this.image = jQuery(document.createElement("img"));
|
||||||
this.image.addClass("et2_vfs vfsMimeIcon");
|
this.image.addClass("et2_vfs vfsMimeIcon");
|
||||||
var self= this;
|
this.iconOverlayContainer.append(this.image);
|
||||||
|
this.setDOMNode(this.iconOverlayContainer[0]);
|
||||||
|
},
|
||||||
|
|
||||||
|
set_expose_callback: function(_callback)
|
||||||
|
{
|
||||||
|
var self=this;
|
||||||
if (this.options.expose_callback)
|
if (this.options.expose_callback)
|
||||||
{
|
{
|
||||||
jQuery(this.expose_options.container).on ('slide', function (event) {
|
jQuery(this.expose_options.container).on ('slide', function (event) {
|
||||||
@ -291,10 +297,7 @@ var et2_vfsMime = expose(et2_valueWidget.extend([et2_IDetachedDOM],
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.iconOverlayContainer.append(this.image);
|
|
||||||
this.setDOMNode(this.iconOverlayContainer[0]);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to get media content to feed the expose
|
* Function to get media content to feed the expose
|
||||||
* @param {type} _value
|
* @param {type} _value
|
||||||
|
@ -32,7 +32,7 @@ function expose (widget)
|
|||||||
*/
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
expose.options = {
|
this.expose_options = {
|
||||||
// The Id, element or querySelector of the gallery widget:
|
// The Id, element or querySelector of the gallery widget:
|
||||||
container: '#blueimp-gallery',
|
container: '#blueimp-gallery',
|
||||||
// The tag name, Id, element or querySelector of the slides container:
|
// The tag name, Id, element or querySelector of the slides container:
|
||||||
@ -180,14 +180,21 @@ function expose (widget)
|
|||||||
$body.append($expose_node);
|
$body.append($expose_node);
|
||||||
}
|
}
|
||||||
|
|
||||||
jQuery(this.node).on('click', function (){
|
},
|
||||||
self._init_blueimp_gallery();
|
|
||||||
|
set_value:function (_value)
|
||||||
|
{
|
||||||
|
this._super.apply(this,arguments)
|
||||||
|
var self=this;
|
||||||
|
this.image.on('click', function(){
|
||||||
|
self._init_blueimp_gallery(_value);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
_init_blueimp_gallery: function ()
|
|
||||||
|
_init_blueimp_gallery: function (_value)
|
||||||
{
|
{
|
||||||
var mediaContent = this.getMedia();
|
var mediaContent = this.getMedia(_value);
|
||||||
blueimp.Gallery(mediaContent, expose.options);
|
blueimp.Gallery(mediaContent, this.expose_options);
|
||||||
},
|
},
|
||||||
expose_event:function (event){
|
expose_event:function (event){
|
||||||
console.log(event);
|
console.log(event);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user