- More checks for sub-template referred to by partial name

- Fix sub-template modifications missed if namespace mismatch
This commit is contained in:
Nathan Gray 2013-10-16 23:16:29 +00:00
parent d271990b84
commit 4d35323f52
2 changed files with 12 additions and 1 deletions

View File

@ -62,6 +62,9 @@ class etemplate_widget_template extends etemplate_widget
{
list($c_app, $c_main, $c_sub) = explode('.',$c_name, 3);
if($name == $c_sub) return $c_template;
$parts = explode('.',$c_name);
if($name == $parts[count($parts)-1]) return $c_template;
}
}
// Template not found, try again with content expansion

View File

@ -643,7 +643,15 @@ var et2_widget = Class.extend(
// Try again, but skip the fancy stuff
// TODO: Figure out why the getEntry() call doesn't always work
var entry = modifications.data[_node.getAttribute("id")];
if(entry) this.egw().debug("warn", "getEntry("+_node.getAttribute("id")+") failed, but the data is there.", modifications, entry);
if(entry)
{
this.egw().debug("warn", "getEntry("+_node.getAttribute("id")+") failed, but the data is there.", modifications, entry);
}
else
{
// Try the root, in case a namespace got missed
var entry = modifications.getRoot().getEntry(_node.getAttribute("id"));
}
}
if(entry && entry.type)
{