Allow app's custom file drop code to run even if no row data found

This commit is contained in:
Nathan Gray 2013-11-13 17:18:55 +00:00
parent 1d54a4d3d6
commit a10ac05b63

View File

@ -1329,8 +1329,7 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput],
// Check to see if we can handle the link // Check to see if we can handle the link
// First, find the UID // First, find the UID
var row = this.controller.getRowByNode(target); var row = this.controller.getRowByNode(target);
if(!row || !row.uid) return false; var uid = row.uid || null;
var uid = row.uid;
// Get the file information // Get the file information
var files = []; var files = [];
@ -1351,7 +1350,9 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput],
} }
event.stopPropagation(); event.stopPropagation();
event.preventDefault(); event.preventDefault();
if(!row || !row.uid) return false;
// Link the file to the row // Link the file to the row
// just use a link widget, it's all already done // just use a link widget, it's all already done
var split = uid.split('::'); var split = uid.split('::');