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
// First, find the UID
var row = this.controller.getRowByNode(target);
if(!row || !row.uid) return false;
var uid = row.uid;
var uid = row.uid || null;
// Get the file information
var files = [];
@ -1352,6 +1351,8 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput],
event.stopPropagation();
event.preventDefault();
if(!row || !row.uid) return false;
// Link the file to the row
// just use a link widget, it's all already done
var split = uid.split('::');