fix et2-> nm_open_popup error,"undefined method getInstanceManager", in et2_extension_nextmatch_actions

This commit is contained in:
Hadi Nategh 2013-09-16 10:40:19 +00:00
parent 019db13e33
commit 8cdbbe67fc

View File

@ -254,8 +254,14 @@ var nm_popup_action, nm_popup_ids = null;
*/
function nm_open_popup(_action, _ids)
{
//Check if there is nextmatch on _action otherwise gets the uniqueid from _ids
var uid;
if (typeof _action.data.nextmatch !== 'undefined')
uid = _action.data.nextmatch.getInstanceManager().uniqueId;
else if(typeof _ids[0] !== 'undefined')
uid = _ids[0].manager.data.nextmatch.getInstanceManager().uniqueId;
// Find the popup div
var popup = jQuery("#"+(_action.data.nextmatch.getInstanceManager().uniqueId||"") + "_"+_action.id+"_popup").first() || jQuery("[id*='" + _action.id + "_popup']").first();
var popup = jQuery("#"+(uid||"") + "_"+_action.id+"_popup").first() || jQuery("[id*='" + _action.id + "_popup']").first();
if (popup) {
nm_popup_action = _action;
if(_ids.length && typeof _ids[0] == 'object')