forked from extern/egroupware
Activating et2_IDetachedDOM implementation of et2_image widget as image and progressbar are now to seperate widgets
This commit is contained in:
parent
115d677113
commit
57dc999881
@ -21,7 +21,7 @@
|
|||||||
/**
|
/**
|
||||||
* Class which implements the "image" XET-Tag
|
* Class which implements the "image" XET-Tag
|
||||||
*/
|
*/
|
||||||
var et2_image = et2_baseWidget.extend(/*et2_IDetachedDOM,*/ {
|
var et2_image = et2_baseWidget.extend(et2_IDetachedDOM, {
|
||||||
|
|
||||||
attributes: {
|
attributes: {
|
||||||
"src": {
|
"src": {
|
||||||
@ -95,13 +95,6 @@ var et2_image = et2_baseWidget.extend(/*et2_IDetachedDOM,*/ {
|
|||||||
|
|
||||||
this.options.src = _value;
|
this.options.src = _value;
|
||||||
|
|
||||||
// Check whether "src" is a percentage
|
|
||||||
if (this.percentagePreg.test(_value))
|
|
||||||
{
|
|
||||||
this.getSurroundings().prependDOMNode(document.createTextNode(_value));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Get application to use from template ID
|
// Get application to use from template ID
|
||||||
var src = egw.image(_value, this.getTemplateApp());
|
var src = egw.image(_value, this.getTemplateApp());
|
||||||
if(src)
|
if(src)
|
||||||
@ -112,28 +105,23 @@ var et2_image = et2_baseWidget.extend(/*et2_IDetachedDOM,*/ {
|
|||||||
{
|
{
|
||||||
this.image.css("display","none");
|
this.image.css("display","none");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of "et2_IDetachedDOM" for fast viewing in gridview
|
* Implementation of "et2_IDetachedDOM" for fast viewing in gridview
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Does currently not work for percentages, as the surroundings manager
|
getDetachedAttributes: function(_attrs) {
|
||||||
// cannot opperate on other DOM-Nodes.
|
|
||||||
|
|
||||||
/* getDetachedAttributes: function(_attrs) {
|
|
||||||
_attrs.push("src", "label");
|
_attrs.push("src", "label");
|
||||||
},
|
},
|
||||||
|
|
||||||
getDetachedNodes: function() {
|
getDetachedNodes: function() {
|
||||||
return [this.node, this.image[0]];
|
return [this.image[0]];
|
||||||
},
|
},
|
||||||
|
|
||||||
setDetachedAttributes: function(_nodes, _values) {
|
setDetachedAttributes: function(_nodes, _values) {
|
||||||
// Set the given DOM-Nodes
|
// Set the given DOM-Nodes
|
||||||
this.node = _nodes[0];
|
this.image = $j(_nodes[0]);
|
||||||
this.image = $j(_nodes[1]);
|
|
||||||
|
|
||||||
this.transformAttributes(_values);
|
this.transformAttributes(_values);
|
||||||
|
|
||||||
@ -147,7 +135,7 @@ var et2_image = et2_baseWidget.extend(/*et2_IDetachedDOM,*/ {
|
|||||||
{
|
{
|
||||||
this.set_label(_values["label"]);
|
this.set_label(_values["label"]);
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
et2_register_widget(et2_image, ["image"]);
|
et2_register_widget(et2_image, ["image"]);
|
||||||
|
Loading…
Reference in New Issue
Block a user