﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
13917	Multiple popup window feature of related objects popup through id_to_windowname	davidcooper	nobody	"In an app that has a cascading set of objects we required the ability to have multiple popup windows.  In tabbed browsers this can work out well, especially when the tabs can cascade like the firefox tree-style view.  To bring this support to django all that is required is an override for the two methods id_to_windowname and windowname_to_id at line 18 of django/contrib/admin/media/js/admin/RelatedObjectLookups.js, such as this:

{{{
var uniqueness=(new Date()).valueOf();

function id_to_windowname(text) {
    text = text.replace(/\./g, '__dot__');
    text = text.replace(/\-/g, '__dash__');
    return uniqueness + text;
}

function windowname_to_id(text) {
    text = text.replace(uniqueness, '');
    text = text.replace(/__dot__/g, '.');
    text = text.replace(/__dash__/g, '-');
    return text;
}

}}}

This trivial change to the 'name' of the window allows multiple caller-callee connections, even involving the same models, as used as the id.

Dave"	New feature	new	contrib.admin	1.2	Normal				Accepted	1	0	0	1	0	1
