public function showModels() { $GLOBALS['phpgw']->js->validate_file('yahoo', 'bim.modellist', 'bim'); /*$GLOBALS['phpgw_info']['flags']['noheader'] = false; $GLOBALS['phpgw_info']['flags']['nofooter'] = false; $GLOBALS['phpgw_info']['flags']['xslt_app'] = false; $GLOBALS['phpgw']->common->phpgw_header(true);*/ $GLOBALS['phpgw']->xslttpl->add_file(array('bim_showmodels')); $bobimmodel = new bobimmodel_impl(); $sobimmodel = new sobimmodel_impl($this->db); $bobimmodel->setSobimmodel($sobimmodel); $output = $bobimmodel->createBimModelList(); $loadingImage = $GLOBALS['phpgw']->common->find_image('bim', 'ajaxLoader.gif'); $data = array('models' => $output, 'loadingImage' => $loadingImage); $GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('modelData' => $data)); $this->setupBimCss(); $GLOBALS['phpgw']->js->validate_file('yui3', 'yui/yui-min', 'phpgwapi'); // echo '<script type="text/javascript" src="http://yui.yahooapis.com/3.3.0/build/yui/yui-min.js"></script>'; $ble = <<<HTML <script>YUI().use("event-delegate", function(Y) { Y.delegate("click", function(e) { // The list item that matched the provided selector is the // default 'this' object Y.log("Default scope: " + this.get("id")); // The list item that matched the provided selector is // also available via the event's currentTarget property // in case the 'this' object is overridden in the subscription. Y.log("Clicked list item: " + e.currentTarget.get("id")); // The actual click target, which could be the matched item or a // descendant of it. Y.log("Event target: " + e.target); // The delegation container is added to the event facade Y.log("Delegation container: " + e.container.get("id")); }, "#container44", "li"); });</script> HTML; $someOutput = '<div id="container44"><ul id="list"><li id="li-1">List Item 1</li> <li id="li-2">List Item 2</li> <li id="li-3">List Item 3</li> <li id="li-4">List Item 4</li> <li id="li-5">List Item 5</li> </ul> </div> <script>doDelegate()</script>'; }
public function testCreateBimModelList() { $bobimmodel = new bobimmodel_impl(); $sobimmodel = new sobimmodel_impl($this->db); $bobimmodel->setSobimmodel($sobimmodel); $output = $bobimmodel->createBimModelList(); $modelFound = false; /* @var $bimModel BimModel */ foreach ($output as $bimModelArray) { if ($bimModelArray['fileName'] == $this->vfsFileName && $bimModelArray['name'] == $this->modelName) { $modelFound = true; break; } } $this->assertTrue($modelFound); }