[web]数据查看页BLOB属性值没有的,禁用下载按钮

This commit is contained in:
datagear 2018-11-08 12:47:20 +08:00
parent ec35d6938d
commit 9d1614fbaf
1 changed files with 7 additions and 3 deletions

View File

@ -449,7 +449,12 @@
{
var fileDownloadButton = $("<button class='download-button' />").attr("__propName", propName)
.html(options.labels.downloadFile)
.appendTo(valuediv).button();
.appendTo(valuediv);
if(!propValue)
fileDownloadButton.attr("disabled", true);
fileDownloadButton.button();
fileDownloadButton.click(function()
{
@ -460,8 +465,7 @@
var myConcreteModel = myproperty.model;//TODO 处理抽象属性
if(propValue)
_this.options.downloadSinglePropertyValueFile.call(_this.element, myproperty, myConcreteModel, propValue);
_this.options.downloadSinglePropertyValueFile.call(_this.element, myproperty, myConcreteModel, propValue);
});
}
else