With my last commit, we can now omit script path for all jquery.ui and jquery.effects scripts...
It's really clearer like this:
{combine_script id="jquery" load="async"}
{combine_script id="jquery.ui" load="async"}
{combine_script id="jquery.ui.draggable" load="async"}
But maybe we can do better: template class can automaticaly load required script with this simple function:
private function load_known_required_script($id, $load_mode)
{
if ( isset(self::$known_paths[$id])
or strncmp($id, 'jquery.ui.', 10)==0
or strncmp($id, 'jquery.effetcs.', 15)==0
)
{
$this->add($id, $load_mode, array(), null);
return true;
}
return false;
}
We call this function in add_inline function (before fatal error) and at the end of add function if required script are missing.
For example, we will be able to write {footer_script require='jquery.ui.xxxx'} without any combine_script before.
What do you think?