Revision 795,
1.2 KB
checked in by viani, 15 years ago
(diff) |
Ticket #488 - Inclusão do módulo workflow no ramo trunk do repositório Expresso.
|
Rev | Line | |
---|
[795] | 1 | <?php |
---|
| 2 | /** |
---|
| 3 | * Insere código que referencia os arquivos de JavaScript responsáveis pela funcionalidade do Ajax. |
---|
| 4 | * |
---|
| 5 | * @package Smarty |
---|
| 6 | * @subpackage wf_plugins |
---|
| 7 | * @version 1.1 |
---|
| 8 | * @author Sidnei Augusto Drovetto Jr. - drovetto@gmail.com |
---|
| 9 | * @param array $params Array de parametros para a função |
---|
| 10 | * @param object &$smarty Instância do objeto smarty em uso |
---|
| 11 | * @return string codigo com referencias aos JavaScripts. |
---|
| 12 | * @access public |
---|
| 13 | */ |
---|
| 14 | function smarty_function_wf_ajax_init($params, &$smarty) |
---|
| 15 | { |
---|
| 16 | static $wf_ajax_init = false; |
---|
| 17 | |
---|
| 18 | if (!$wf_ajax_init) |
---|
| 19 | { |
---|
| 20 | $wf_ajax_init = true; |
---|
| 21 | |
---|
| 22 | $serverPath = $GLOBALS['phpgw_info']['server']['webserver_url']; |
---|
| 23 | $localPath = PHPGW_SERVER_ROOT; |
---|
| 24 | |
---|
| 25 | $includeFiles = array('JSON', 'function.library', 'NanoRequest.class', 'NanoAjax.class', 'NanoController.class'); |
---|
| 26 | $output = '<script type="text/javascript" src="' . $serverPath . '/workflow/js/jscode/prototype.js?' . @filesize($localPath . '/workflow/js/jscode/prototype.js') . '"></script>'; |
---|
| 27 | foreach ($includeFiles as $file) |
---|
| 28 | $output .= '<script type="text/javascript" src="' . $serverPath . '/workflow/js/nano/' . $file . '.js?' . @filesize($localPath . '/workflow/js/nano/' . $file . '.js') . '"></script>'; |
---|
| 29 | return $output; |
---|
| 30 | } |
---|
| 31 | else |
---|
| 32 | return ''; |
---|
| 33 | } |
---|
| 34 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.