2011-08-18 01:06:25 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Test stuff from within an eGW framework
|
|
|
|
*/
|
|
|
|
|
|
|
|
$GLOBALS['egw_info'] = array(
|
|
|
|
'flags' => array(
|
|
|
|
'currentapp' => 'etemplate',
|
|
|
|
'noheader' => True,
|
|
|
|
'nonavbar' => True,
|
2011-08-29 23:15:53 +02:00
|
|
|
'app_header' => 'eT2 Test',
|
|
|
|
'js_link_registry' => True,
|
2011-08-18 01:06:25 +02:00
|
|
|
)
|
|
|
|
);
|
|
|
|
include('../../../header.inc.php');
|
|
|
|
|
|
|
|
egw_framework::validate_file('.','etemplate2','etemplate');
|
|
|
|
egw_framework::validate_file('jquery','jquery.tools.min','phpgwapi'); // Not needed once JS require works for files like this
|
|
|
|
egw_framework::includeCSS('/etemplate/js/test/test.css');
|
|
|
|
|
|
|
|
common::egw_header();
|
|
|
|
// parse_navbar();
|
|
|
|
?>
|
|
|
|
<script src="et2_test_timesheet_edit.json"></script>
|
|
|
|
<script src="et2_test_input_validator.json"></script>
|
2011-08-29 23:15:53 +02:00
|
|
|
<script src="et2_test_text.json"></script>
|
2011-08-18 01:06:25 +02:00
|
|
|
Testing from inside framework, so JS includes work
|
|
|
|
<div class="header">Choose one of the following tests:</div>
|
|
|
|
<div id="linklist">
|
|
|
|
<a href="#" onclick="open_xet('et2_test_timesheet_edit.xet', timesheet_data);">Timesheet edit dialog</a>
|
|
|
|
<a href="#" onclick="open_xet('et2_test_template.xet');">Template proxy test</a>
|
|
|
|
<a href="#" onclick="open_xet('et2_test_grid.xet');">Grid test</a>
|
|
|
|
<a href="#" onclick="open_xet('et2_test_tabbox.xet');">Tabs test</a>
|
2011-08-29 23:15:53 +02:00
|
|
|
<a href="#" onclick="open_xet('et2_test_text.xet',text_data);">Text/URL test</a>
|
2011-08-18 01:06:25 +02:00
|
|
|
<a href="#" onclick="open_xet('et2_test_basic_widgets.xet');">Basic widgits</a>
|
2011-08-29 23:15:53 +02:00
|
|
|
<a href="#" onclick="open_xet('et2_test_date.xet');">Date/time widgits</a>
|
2011-08-18 01:06:25 +02:00
|
|
|
<a href="#" onclick="open_xet('et2_test_input_validator.xet', validation_data);">Validation</a>
|
2011-09-01 01:37:30 +02:00
|
|
|
<a href="#" onclick="open_xet('et2_test_file_upload.xet');">Upload</a>
|
2011-08-18 01:06:25 +02:00
|
|
|
</div>
|
|
|
|
<div class="header">ETemplate2 container:</div>
|
|
|
|
<div id="time"></div>
|
|
|
|
<div id="container"></div>
|
|
|
|
<script>
|
|
|
|
var et2 = new etemplate2(document.getElementById("container"), "etemplate.etemplate_new.ajax_process_content");
|
|
|
|
|
|
|
|
function open_xet(file, content) {
|
|
|
|
et2.load(file, content);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<?php
|
|
|
|
common::egw_footer();
|
|
|
|
|
|
|
|
?>
|