mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 09:53:20 +01:00
Also accept file names to remove.
This commit is contained in:
parent
9743c19318
commit
378a11f841
@ -558,10 +558,16 @@ var et2_file = et2_inputWidget.extend(
|
||||
|
||||
/**
|
||||
* Remove a file from the list of values
|
||||
*
|
||||
* @param {File|string} File object, or file name, to remove
|
||||
*/
|
||||
remove_file: function(file)
|
||||
{
|
||||
//console.info(filename);
|
||||
if(typeof file == 'string')
|
||||
{
|
||||
file = {fileName: file};
|
||||
}
|
||||
for(var key in this.options.value)
|
||||
{
|
||||
if(this.options.value[key].name == file.fileName)
|
||||
@ -571,7 +577,7 @@ var et2_file = et2_inputWidget.extend(
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(!file.isComplete()) file.cancel();
|
||||
if(file.isComplete && !file.isComplete() && file.cancel) file.cancel();
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user