Changeset View
Changeset View
Standalone View
Standalone View
lib/file_ui_output.php
Show First 20 Lines • Show All 140 Lines • ▼ Show 20 Lines | private function send_tpl($template) | ||||
return; | return; | ||||
} | } | ||||
foreach ($this->tpl_vars as $name => $value) { | foreach ($this->tpl_vars as $name => $value) { | ||||
$this->tpl->assign($name, $value); | $this->tpl->assign($name, $value); | ||||
} | } | ||||
$this->env['skin_path'] = 'skins/' . $this->skin . '/'; | $this->env['skin_path'] = 'skins/' . $this->skin . '/'; | ||||
$script = ''; | $script = array(); | ||||
if (!empty($this->env)) { | if (!empty($this->env)) { | ||||
$script[] = 'ui.set_env(' . json_encode($this->env) . ');'; | $script[] = 'ui.set_env(' . json_encode($this->env) . ');'; | ||||
} | } | ||||
$this->labels = array_unique($this->labels); | $this->labels = array_unique($this->labels); | ||||
if (!empty($this->labels)) { | if (!empty($this->labels)) { | ||||
foreach ($this->labels as $label) { | foreach ($this->labels as $label) { | ||||
Show All 9 Lines | private function send_tpl($template) | ||||
foreach ($command as $arg) { | foreach ($command as $arg) { | ||||
$args[] = json_encode($arg); | $args[] = json_encode($arg); | ||||
} | } | ||||
$script[] = sprintf('ui.%s(%s);', $cname, implode(',', $args)); | $script[] = sprintf('ui.%s(%s);', $cname, implode(',', $args)); | ||||
} | } | ||||
$this->tpl->assign('skin_path', $this->env['skin_path']); | $this->tpl->assign('skin_path', $this->env['skin_path']); | ||||
if ($script) { | if (!empty($script)) { | ||||
$script = "<script type=\"text/javascript\">\n" . implode("\n", $script) . "\n</script>"; | $script = "<script type=\"text/javascript\">\n" . implode("\n", $script) . "\n</script>"; | ||||
$this->tpl->assign('script', $script); | $this->tpl->assign('script', $script); | ||||
} | } | ||||
$this->tpl->display($template . '.html'); | $this->tpl->display($template . '.html'); | ||||
} | } | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines |