mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:15 +01: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",
|
||||
"default": et2_no_init
|
||||
},
|
||||
expose_callback:{
|
||||
"expose_callback":{
|
||||
"name": "expose_callback",
|
||||
"type": "js",
|
||||
"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.image = jQuery(document.createElement("img"));
|
||||
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)
|
||||
{
|
||||
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
|
||||
* @param {type} _value
|
||||
|
@ -32,7 +32,7 @@ function expose (widget)
|
||||
*/
|
||||
init: function() {
|
||||
this._super.apply(this, arguments);
|
||||
expose.options = {
|
||||
this.expose_options = {
|
||||
// The Id, element or querySelector of the gallery widget:
|
||||
container: '#blueimp-gallery',
|
||||
// The tag name, Id, element or querySelector of the slides container:
|
||||
@ -180,14 +180,21 @@ function expose (widget)
|
||||
$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();
|
||||
blueimp.Gallery(mediaContent, expose.options);
|
||||
var mediaContent = this.getMedia(_value);
|
||||
blueimp.Gallery(mediaContent, this.expose_options);
|
||||
},
|
||||
expose_event:function (event){
|
||||
console.log(event);
|
||||
|
Loading…
Reference in New Issue
Block a user