forked from extern/egroupware
fixed image widget uses index.php for not found images
This commit is contained in:
parent
629bd6f2ee
commit
cb8b279e94
@ -48,7 +48,7 @@
|
|||||||
var _cname = widget.getPath() ? widget.getPath().join("[") : false;
|
var _cname = widget.getPath() ? widget.getPath().join("[") : false;
|
||||||
_val = _val.replace(/form::name\(/g, "'"+widget.getRoot()._inst.uniqueId+"_'+"+(_cname ? "et2_form_name('"+_cname+"'," : '('));
|
_val = _val.replace(/form::name\(/g, "'"+widget.getRoot()._inst.uniqueId+"_'+"+(_cname ? "et2_form_name('"+_cname+"'," : '('));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_val.indexOf('egw::lang(') != -1)
|
if (_val.indexOf('egw::lang(') != -1)
|
||||||
{
|
{
|
||||||
_val = _val.replace(/egw::lang\(/g,'egw.lang(');
|
_val = _val.replace(/egw::lang\(/g,'egw.lang(');
|
||||||
@ -96,7 +96,7 @@
|
|||||||
// Check whether _code is simply "1" -- if yes replace it accordingly
|
// Check whether _code is simply "1" -- if yes replace it accordingly
|
||||||
if (_code === '1')
|
if (_code === '1')
|
||||||
{
|
{
|
||||||
_code = 'widget.getInstanceManager().submit(); return true;';
|
_code = 'widget.getInstanceManager().submit(); return false;';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check whether some pseudo-variables still reside inside of the code,
|
// Check whether some pseudo-variables still reside inside of the code,
|
||||||
|
@ -20,10 +20,10 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements the "image" XET-Tag
|
* Class which implements the "image" XET-Tag
|
||||||
*
|
*
|
||||||
* @augments et2_baseWidget
|
* @augments et2_baseWidget
|
||||||
*/
|
*/
|
||||||
var et2_image = et2_baseWidget.extend([et2_IDetachedDOM],
|
var et2_image = et2_baseWidget.extend([et2_IDetachedDOM],
|
||||||
{
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
"src": {
|
"src": {
|
||||||
@ -62,7 +62,7 @@ var et2_image = et2_baseWidget.extend([et2_IDetachedDOM],
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @memberOf et2_image
|
* @memberOf et2_image
|
||||||
*/
|
*/
|
||||||
init: function() {
|
init: function() {
|
||||||
@ -74,7 +74,7 @@ var et2_image = et2_baseWidget.extend([et2_IDetachedDOM],
|
|||||||
{
|
{
|
||||||
this.image.attr("alt", this.options.label).attr("title", this.options.label);
|
this.image.attr("alt", this.options.label).attr("title", this.options.label);
|
||||||
}
|
}
|
||||||
if (this.options.href)
|
if (this.options.href)
|
||||||
{
|
{
|
||||||
this.image.addClass('et2_clickable');
|
this.image.addClass('et2_clickable');
|
||||||
}
|
}
|
||||||
@ -84,7 +84,7 @@ var et2_image = et2_baseWidget.extend([et2_IDetachedDOM],
|
|||||||
}
|
}
|
||||||
this.setDOMNode(this.image[0]);
|
this.setDOMNode(this.image[0]);
|
||||||
},
|
},
|
||||||
|
|
||||||
click: function()
|
click: function()
|
||||||
{
|
{
|
||||||
if(this.options.href)
|
if(this.options.href)
|
||||||
@ -106,7 +106,7 @@ var et2_image = et2_baseWidget.extend([et2_IDetachedDOM],
|
|||||||
var manager = this.getArrayMgr("content");
|
var manager = this.getArrayMgr("content");
|
||||||
if(manager) {
|
if(manager) {
|
||||||
var src = manager.getEntry(_attrs["src"]);
|
var src = manager.getEntry(_attrs["src"]);
|
||||||
if (typeof src != "undefined")
|
if (typeof src != "undefined" && src !== null)
|
||||||
{
|
{
|
||||||
if(typeof src == "object")
|
if(typeof src == "object")
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user