From a10ac05b63dabd7370df37045a1907ec8f12a95c Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 13 Nov 2013 17:18:55 +0000 Subject: [PATCH] Allow app's custom file drop code to run even if no row data found --- etemplate/js/et2_extension_nextmatch.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/etemplate/js/et2_extension_nextmatch.js b/etemplate/js/et2_extension_nextmatch.js index e6dc0ffccd..ae35f45529 100644 --- a/etemplate/js/et2_extension_nextmatch.js +++ b/etemplate/js/et2_extension_nextmatch.js @@ -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 = []; @@ -1351,7 +1350,9 @@ 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('::');