<?php require dirname(__FILE__) . '/../_require_prepend.inc.php'; require __INCLUDES__ . '/examples/examples.inc.php'; QForm::$FormStateHandler = 'QSessionFormStateHandler'; class ExampleForm extends ExamplesBaseForm { protected $tnvExample; protected $pnlCode; // Define all the QContrtol objects for our Calculator // Make our textboxes IntegerTextboxes and make them required protected function Form_Create() { $this->tnvExample = new QTreeNav($this); $this->tnvExample->CssClass = 'treenav'; $this->tnvExample->AddAction(new QChangeEvent(), new QAjaxAction('tnvExample_Change')); $this->pnlCode = new QPanel($this); $this->pnlCode->CssClass = 'codeDisplay'; $this->objDefaultWaitIcon = new QWaitIcon($this); // Create a treenav of the file/folder directory for qcodo includes $this->tnvExample_AddItems(dirname(__INCLUDES__ . '.')); } protected function tnvExample_AddItems($strDirectory, $objParentItem = null) { $objDirectory = opendir($strDirectory); if (!$objParentItem) { $objParentItem = $this->tnvExample; } while ($strFilename = readdir($objDirectory)) { if ($strFilename && $strFilename != '.' && $strFilename != '..' && $strFilename != 'configuration.inc.php' && $strFilename != 'configuration_pro.inc.php' && $strFilename != 'CVS') { // Create the new TreeNavItem
* on the HTML page, then you need to add "foo.js" to this IgnoreJavaScriptFileArray so that Qcodo * doesn't try and also load "foo.js" for you. * * NOTE: In production or as a performance tweak, you may want to use the compressed "_qc_packed.js" * library (which is a compressed, single file version of ALL the qcodo .js files that is in _core). * * If you want to do this, MAKE SURE you FIRST MANUALLY do a <script> inclusion of * "/assets/js/_core/_qc_packed.js" in your HTML. Then, you can specify that QForm "ignore" all the * other qcodo _core javascripts by adding just "_core" to the array. * * @var array */ // protected $strIgnoreJavaScriptFileArray = array(); protected $strIgnoreJavaScriptFileArray = array('_core'); /** * This should be very rarely used. * * This mechanism acts similarly to the strIgnoreJavascriptFileArray, except it applies to StyleSheets. * However, any QControl that specifies a StyleSheet file to include is MEANT to have that property be modified / customized. * * Therefore, there should be little to no need for this attribute. However, it is here anyway, just in case. * * @var array */ protected $strIgnoreStyleSheetFileArray = array(); } // For NOAH in Production, let's use FileFormStateHandler if (array_key_exists('HTTP_HOST', $_SERVER) && strpos($_SERVER['HTTP_HOST'], 'noah') !== false) { QForm::$FormStateHandler = 'QFileFormStateHandler'; QFileFormStateHandler::$GarbageCollectDaysOld = 1; }