public function __construct($objParentObject, $strControlId = null, $blnShowCheckboxes = false) { // First, call the parent to do most of the basic setup try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->objParentObject = $objParentObject; $this->dtgLocation = new QDataGrid($this); $this->dtgLocation->Name = 'location_list'; $this->dtgLocation->CellPadding = 5; $this->dtgLocation->CellSpacing = 0; $this->dtgLocation->CssClass = "datagrid"; // Disable AJAX for the datagrid $this->dtgLocation->UseAjax = false; // Allow for column toggling $this->dtgLocation->ShowColumnToggle = true; // Allow for CSV Export $this->dtgLocation->ShowExportCsv = true; // Enable Pagination, and set to 20 items per page $objPaginator = new QPaginator($this->dtgLocation); $this->dtgLocation->Paginator = $objPaginator; $this->dtgLocation->ItemsPerPage = 20; // If the user wants the checkboxes column if ($blnShowCheckboxes) { // This will render all of the necessary controls and actions. chkSelected_Render expects a unique ID for each row of the database. $this->dtgLocation->AddColumn(new QDataGridColumnExt('<?=$_CONTROL->chkSelectAll_Render() ?>', '<?=$_CONTROL->chkSelected_Render($_ITEM->LocationId) ?>', 'CssClass="dtg_column"', 'HtmlEntities=false')); } $this->dtgLocation->AddColumn(new QDataGridColumnExt('Location', '<?= $_ITEM->__toStringWithLink("bluelink") ?>', array('OrderByClause' => QQ::OrderBy(QQN::Location()->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Location()->ShortDescription, false)), 'CssClass="dtg_column"', 'HtmlEntities=false')); $this->dtgLocation->AddColumn(new QDataGridColumnExt('Description', '<?= $_ITEM->LongDescription ?>', 'Width=200', array('OrderByClause' => QQ::OrderBy(QQN::Location()->LongDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Location()->LongDescription, false)), 'CssClass="dtg_column"')); $this->dtgLocation->AddColumn(new QDataGridColumnExt('Created By', '<?= $_ITEM->CreatedByObject->__toStringFullName() ?>', array('OrderByClause' => QQ::OrderBy(QQN::Location()->CreatedByObject->LastName), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Location()->CreatedByObject->LastName, false)), 'CssClass="dtg_column"')); // Add the custom field columns with Display set to false. These can be shown by using the column toggle menu. $objCustomFieldArray = CustomField::LoadObjCustomFieldArray(2, false); if ($objCustomFieldArray) { foreach ($objCustomFieldArray as $objCustomField) { //Only add the custom field column if the role has authorization to view it. if ($objCustomField->objRoleAuthView && $objCustomField->objRoleAuthView->AuthorizedFlag) { $this->dtgLocation->AddColumn(new QDataGridColumnExt($objCustomField->ShortDescription, '<?= $_ITEM->GetVirtualAttribute(\'' . $objCustomField->CustomFieldId . '\') ?>', 'SortByCommand="__' . $objCustomField->CustomFieldId . ' ASC"', 'ReverseSortByCommand="__' . $objCustomField->CustomFieldId . ' DESC"', 'HtmlEntities="false"', 'CssClass="dtg_column"', 'Display="false"')); } } } $this->dtgLocation->SortColumnIndex = 1; $this->dtgLocation->SortDirection = 0; $objStyle = $this->dtgLocation->RowStyle; $objStyle->ForeColor = '#000000'; $objStyle->BackColor = '#FFFFFF'; $objStyle->FontSize = 12; $objStyle = $this->dtgLocation->AlternateRowStyle; $objStyle->BackColor = '#EFEFEF'; $objStyle = $this->dtgLocation->HeaderRowStyle; $objStyle->ForeColor = '#000000'; $objStyle->BackColor = '#EFEFEF'; $objStyle->CssClass = 'dtg_header'; $this->dtgLocation->SetDataBinder('dtgLocation_Bind', $this); $this->txtLocation_Create(); $this->btnSearch_Create(); $this->btnClear_Create(); }
public function __construct($objParentObject, $intEntityQtypeId = null, $strControlId = null) { // First, call the parent to do most of the basic setup try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->objParentObject = $objParentObject; $this->intEntityQtypeId = $intEntityQtypeId; if ($objParentObject instanceof AssetListForm) { $this->txtAssetModelCode_Create(); $this->lstReservedBy_Create(); $this->lstCheckedOutBy_Create(); } if ($objParentObject instanceof ShipmentListForm) { $this->txtFromCompany_Create(); $this->txtFromContact_Create(); $this->txtTrackingNumber_Create(); $this->lstCourier_Create(); $this->txtNote_Create(); $this->dtpShipmentDate_Create(); } if ($objParentObject instanceof ReceiptListForm) { $this->txtNote_Create(); $this->dtpDueDate_Create(); $this->dtpReceiptDate_Create(); } $this->lstDateModified_Create(); $this->dtpDateModifiedFirst_Create(); $this->dtpDateModifiedLast_Create(); $this->chkAttachment_Create(); $this->customFields_Create(); }
public function __construct($objParentObject, $strControlId = null) { // First, call the parent to do most of the basic setup try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Assign the parent object (InventoryModelEditForm from inventory_edit.php) $this->objParentObject = $objParentObject; // This is necessary for blnEditMode, but not much else. // objInventoryModel is only declared because this is called, even though it is not used. $this->objParentObject->SetupInventoryModel($this); // Create the blank InventoryLocationArray $this->objInventoryLocationArray = array(); $this->lstSourceLocation_Create(); $this->txtNote_Create(); $this->txtNewInventoryModelCode_Create(); $this->lstDestinationLocation_Create(); $this->txtQuantity_Create(); $this->btnLookup_Create(); $this->btnSave_Create(); $this->btnCancel_Create(); $this->btnAdd_Create(); $this->dtgInventoryTransact_Create(); $this->ctlInventorySearchTool_Create(); }
public function __construct($objParentObject, $strControlId = null) { parent::__construct($objParentObject, $strControlId); $this->strNoun = QApplication::Translate('item'); $this->strNounPlural = QApplication::Translate('items'); $this->prxDatagridSorting = new QControlProxy($this); }
public function __construct($objParentObject, $objVariableOrParameter, $blnDefaultValueEditable, $blnShowExtendedDescription, $strControlId = null) { // First, call the parent to do most of the basic setup try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } if ($objVariableOrParameter instanceof Parameter) { $this->objParameter = $objVariableOrParameter; $this->objVariable = $this->objParameter->Variable; $blnShowReference = true; } else { $this->objVariable = $objVariableOrParameter; $blnShowReference = false; } // Setup Local Variables $this->strName = $this->objVariable->Name; // Next, we'll create our local subcontrols. Make sure to set "this" as these subcontrols' parent. $this->lstVariableType = new QListBox($this); $this->lstVariableType->Name = $this->strName . ' Variable Type'; $this->lstVariableType->CssClass .= ' vctl'; foreach (VariableType::$NameArray as $intId => $strName) { $this->lstVariableType->AddItem($strName, $intId, $this->objVariable->VariableTypeId == $intId); } $this->lstObjectType = new QListBox($this); $this->lstObjectType->Name = 'Object Type'; $this->lstObjectType->AddItem('- Unspecified -', null); $this->lstObjectType->CssClass .= ' vctl'; foreach (QcodoClass::LoadAll(QQ::Clause(QQ::OrderBy(QQN::QcodoClass()->Name))) as $objQcodoClass) { $this->lstObjectType->AddItem($objQcodoClass->Name, $objQcodoClass->Id, $this->objVariable->ObjectTypeId == $objQcodoClass->Id); } $this->chkArray = new QCheckBox($this); $this->chkArray->Name = $this->strName . ' is an Array?'; $this->chkArray->Checked = $this->objVariable->ArrayFlag; $this->chkReference = new QCheckBox($this); $this->chkReference->Visible = $blnShowReference; if ($this->objParameter) { $this->chkReference->Checked = $this->objParameter->ReferenceFlag; } $this->txtDefaultValue = new QTextBox($this); $this->txtDefaultValue->Name = $this->strName . ' Default Value'; $this->txtDefaultValue->Text = $this->objVariable->DefaultValue; $this->txtDefaultValue->Enabled = $blnDefaultValueEditable; $this->txtDefaultValue->CssClass .= ' vctl'; $this->txtShortDescription = new QTextBox($this); $this->txtShortDescription->Name = $this->strName . ' Short Description'; $this->txtShortDescription->Text = $this->objVariable->ShortDescription; $this->txtShortDescription->TextMode = QTextMode::MultiLine; $this->txtShortDescription->CssClass = 'textbox_multiline'; $this->txtExtendedDescription = new QWriteBox($this); $this->txtExtendedDescription->Name = $this->strName . ' Extended Description'; $this->txtExtendedDescription->Text = $this->objVariable->ExtendedDescription; $this->txtExtendedDescription->CssClass = 'textbox_multiline'; $this->txtExtendedDescription->Visible = $blnShowExtendedDescription; $this->lstVariableType->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'lstVariableType_Change')); $this->lstVariableType_Change(); }
public function __construct($objParentObject, $strControlId = null) { parent::__construct($objParentObject, $strControlId); $this->strLabelForRequired = QApplication::Translate('%s is required'); $this->strLabelForRequiredUnnamed = QApplication::Translate('Required'); $this->strLabelForTooShort = QApplication::Translate('%s must have at least %s characters'); $this->strLabelForTooShortUnnamed = QApplication::Translate('Must have at least %s characters'); $this->strLabelForTooLong = QApplication::Translate('%s must have at most %s characters'); $this->strLabelForTooLongUnnamed = QApplication::Translate('Must have at most %s characters'); }
public function __construct($objParentObject, $strControlId = null) { try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->Setup(); }
public function __construct($objParentObject, $strControlId = null) { try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->pnlColumnToggleMenu_Create(); }
public function __construct($objParentObject, $strControlId = null) { // First, call the parent to do most of the basic setup try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->objShortcutArray = Shortcut::LoadArrayByRoleModule(); }
public function __construct($objParentObject, $strControlId = null) { // First, call the parent to do most of the basic setup try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->objParentObject = $objParentObject; $this->dlgAssetModelSearchTool_Create(); }
public function __construct($objParentObject, QDateTimeTextBox $dtxLinkedControl, $strControlId = null) { try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Setup Linked DateTimeTextBox control $this->dtxLinkedControl = $dtxLinkedControl; // Other Setup $this->strCalendarImageSource = __IMAGE_ASSETS__ . '/calendar.png'; }
/** * Constructor method * * @param QControl|QControlBase|QForm $objParentObject * @param null|string $strControlId * * @throws Exception * @throws QCallerException */ public function __construct($objParentObject, $strControlId = null) { try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->prxPagination = new QControlProxy($this); $this->strLabelForPrevious = QApplication::Translate('Previous'); $this->strLabelForNext = QApplication::Translate('Next'); $this->Setup(); }
public function __construct($objParentObject, $intEntityQtypeId = null, $strControlId = null) { // First, call the parent to do most of the basic setup try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->objParentObject = $objParentObject; $this->intEntityQtypeId = $intEntityQtypeId; $this->chkEntityView = new QCheckBox($this); $this->chkEntityEdit = new QCheckBox($this); $this->chkBuiltInView = new QCheckBox($this); $this->chkBuiltInView->Enabled = false; $this->chkBuiltInView->Checked = true; $intRoleId = QApplication::QueryString('intRoleId'); if ($intRoleId) { $objBuiltInViewAuth = RoleEntityQtypeBuiltInAuthorization::LoadByRoleIdEntityQtypeIdAuthorizationId($intRoleId, $intEntityQtypeId, 1); } if (isset($objBuiltInViewAuth)) { $this->chkBuiltInView->Checked = $objBuiltInViewAuth->AuthorizedFlag; } $this->chkBuiltInEdit = new QCheckBox($this); if ($intRoleId) { $objBuiltInEditAuth = RoleEntityQtypeBuiltInAuthorization::LoadByRoleIdEntityQtypeIdAuthorizationId($intRoleId, $intEntityQtypeId, 2); } if (isset($objBuiltInEditAuth)) { $this->chkBuiltInEdit->Checked = $objBuiltInEditAuth->AuthorizedFlag; } // Load all custom fields and their values into an array arrCustomChecks $objCustomFieldArray = CustomField::LoadObjCustomFieldArray($intEntityQtypeId, false, null); foreach ($objCustomFieldArray as $objCustomField) { $chkCustomView = new QCheckBox($this); $chkCustomEdit = new QCheckBox($this); $objEntityQtypeCustomField = EntityQtypeCustomField::LoadByEntityQtypeIdCustomFieldId($intEntityQtypeId, $objCustomField->CustomFieldId); if ($objEntityQtypeCustomField) { $objCustomAuthView = RoleEntityQtypeCustomFieldAuthorization::LoadByRoleIdEntityQtypeCustomFieldIdAuthorizationId($intRoleId, $objEntityQtypeCustomField->EntityQtypeCustomFieldId, 1); if ($objCustomAuthView) { $chkCustomView->Checked = $objCustomAuthView->AuthorizedFlag; } $objCustomAuthEdit = RoleEntityQtypeCustomFieldAuthorization::LoadByRoleIdEntityQtypeCustomFieldIdAuthorizationId($intRoleId, $objEntityQtypeCustomField->EntityQtypeCustomFieldId, 2); if ($objCustomAuthEdit) { $chkCustomEdit->Checked = $objCustomAuthEdit->AuthorizedFlag; } } $this->arrCustomChecks[] = array('name' => $objCustomField->ShortDescription . ':', 'view' => $chkCustomView, 'edit' => $chkCustomEdit); } }
/** * @param QForm|QControl $objParentObject the form or parent control * @param int $intTime timer interval in ms * @param boolean $blnPeriodic if true the timer is "restarted" automatically after it has fired * @param boolean $blnStartNow starts the timer automatically after adding the first action * @param string $strTimerId * * @throws QCallerException * @return QJsTimer */ public function __construct($objParentObject, $intTime = 0, $blnPeriodic = true, $blnStartNow = true, $strTimerId = null) { try { parent::__construct($objParentObject, $strTimerId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->intDeltaTime = $intTime; $this->blnPeriodic = $blnPeriodic; if ($intTime != QJsTimer::Stopped && $blnStartNow) { $this->intState = QJsTimer::AutoStart; } //prepare to start the timer after the first action gets added }
public function __construct($objParentObject, $strControlId = null) { // First, call the parent to do most of the basic setup try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->objParentObject = $objParentObject; $objExpansionMap[RoleModule::ExpandModule] = true; $this->objRoleModuleArray = RoleModule::LoadArrayByRoleIdAccessFlag(QApplication::$objUserAccount->RoleId, true, null, null, $objExpansionMap); $this->lblSignOut_Create(); $this->lblLogo_Create(); $this->objDefaultWaitIcon_Create(); }
public function __construct($objParentObject, $strControlId = null) { parent::__construct($objParentObject, $strControlId); $this->strLabelForRequired = QApplication::Translate('%s is required'); $this->strLabelForRequiredUnnamed = QApplication::Translate('Required'); $this->strLabelForTooShort = QApplication::Translate('%s must have at least %s characters'); $this->strLabelForTooShortUnnamed = QApplication::Translate('Must have at least %s characters'); $this->strLabelForTooLong = QApplication::Translate('%s must have at most %s characters'); $this->strLabelForTooLongUnnamed = QApplication::Translate('Must have at most %s characters'); // When tapping into a text field on the iphone, the "Go" button on the keyboard causes a // form.submit() to be called which Qcodo will need to intercept if (QApplication::IsBrowser(QBrowserType::Iphone)) { $this->AddAction(new QFocusEvent(), new QJavaScriptAction(sprintf("qc.getW('%s').startTextboxFormSubmitOverride('%s');", $this->strControlId, $this->strControlId))); $this->AddAction(new QBlurEvent(), new QJavaScriptAction(sprintf("qc.getW('%s').endTextboxFormSubmitOverride('%s');", $this->strControlId, $this->strControlId))); } }
public function __construct($objParentObject, $strControlId = null) { try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Setup Pagination Events if ($this->blnUseAjax) { $this->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'Page_Click')); } else { $this->AddAction(new QClickEvent(), new QServerControlAction($this, 'Page_Click')); } $this->AddAction(new QClickEvent(), new QTerminateAction()); }
public function __construct($objParentObject, QDateTimeTextBox $dtxLinkedControl, $strControlId = null) { try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Setup Linked DateTimeTextBox control $this->dtxLinkedControl = $dtxLinkedControl; // Other Setup $this->strCalendarImageSource = __IMAGE_ASSETS__ . '/calendar.png'; $this->dtxLinkedControl->RemoveAllActions(QClickEvent::EventName); $this->dtxLinkedControl->AddAction(new QClickEvent(), new QJavaScriptAction("qc.getC('" . $this->strControlId . "').showCalendar(); ")); $this->dtxLinkedControl->AddAction(new QClickEvent(), new QBlurControlAction($this->dtxLinkedControl)); $this->dtxLinkedControl->AddAction(new QClickEvent(), new QTerminateAction()); }
/** * Constructor for this control * @param mixed $objParentObject Parent QForm or QControl that is responsible for rendering this control * @param string $strControlId optional control ID */ public function __construct($objParentObject, $strControlId = null) { try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Setup Control-specific CSS and JS files to be loaded // Paths are relative to the __CSS_ASSETS__ and __JS_ASSETS__ directories // Multiple files can be specified, as well, by separating with a comma // $this->strJavaScripts = 'custom.js, ../path/to/prototype.js, etc.js'; // $this->strStyleSheets = 'custom.css'; // Additional Setup Performed here $this->intExample = 28; $this->strFoo = 'Hello!'; }
public function __construct($objParentObject, $intEntityQtypeId = null, $strControlId = null) { // First, call the parent to do most of the basic setup try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->objParentObject = $objParentObject; $this->intEntityQtypeId = $intEntityQtypeId; if ($objParentObject instanceof AssetListForm || $objParentObject instanceof QAssetSearchComposite) { $this->txtAssetModelCode_Create(); $this->lstReservedBy_Create(); $this->lstCheckedOutBy_Create(); $this->lstCheckedOutToUser_Create(); if (QApplication::$TracmorSettings->CheckOutToContacts == "1") { $this->objCompanyArray = Company::LoadAllIntoArray(); $this->lstToCompany_Create(); $this->lstToContact_Create(); } $this->chkCheckedOutPastDue_Create(); $this->chkInclude_Create(); $this->lstModifiedCreated_Create(); } if ($objParentObject instanceof ShipmentListForm) { $this->txtFromCompany_Create(); $this->txtFromContact_Create(); $this->txtTrackingNumber_Create(); $this->lstCourier_Create(); $this->txtNote_Create(); $this->dtpShipmentDate_Create(); } if ($objParentObject instanceof ReceiptListForm) { $this->txtNote_Create(); $this->dtpDueDate_Create(); $this->dtpReceiptDate_Create(); } $this->lstDateModified_Create(); $this->dtpDateModifiedFirst_Create(); $this->dtpDateModifiedLast_Create(); $this->chkAttachment_Create(); $this->customFields_Create(); }
public function __construct($objParentObject, $strControlId = null) { // First, call the parent to do most of the basic setup try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Next, we'll create our local subcontrols. Make sure to set "this" as these // subcontrols' parent. $this->lblMessage = new QLabel($this); $this->btnIncrement = new QButton($this); $this->btnDecrement = new QButton($this); // Let's setup these button controls $this->btnIncrement->Text = '>>'; $this->btnDecrement->Text = '<<'; // And setup actions on those button controls $this->SetupButtonActions(); }
public function __construct($objParentObject, $strControlId = null) { // First, call the parent to do most of the basic setup try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Assign the parent object (AssetEditForm from asset_edit.php) $this->objParentObject = $objParentObject; // Setup the Asset, which assigns objAsset and blnEditMode $this->objParentObject->SetupAsset($this); // Create an empty Asset Array $this->objAssetArray = array(); if (!$this->intTransactionTypeId) { $this->intTransactionTypeId = QApplication::QueryString("intTransactionTypeId"); } // Check Out //if ($this->intTransactionTypeId == 3) { $this->CheckOutTo_Create(); $this->DueDate_Create(); // Removed it from constructor and added where it used //$this->objCompanyArray = Company::LoadAllIntoArray(); $this->lstToCompany_Create(); $this->lstToContact_Create(); $this->lblNewToCompany_Create(); $this->lblNewToContact_Create(); $this->dlgNew_Create(); //} $this->btnCancel_Create(); $this->lstLocation_Create(); $this->txtNote_Create(); $this->txtNewAssetCode_Create(); $this->btnAdd_Create(); $this->btnSave_Create(); $this->dtgAssetTransact_Create(); $this->ctlAssetSearchTool_Create(); }
public function __construct($objParentObject, $strControlId = null) { // First, call the parent to do most of the basic setup try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } // Assign the parent object (AssetEditForm from asset_edit.php) $this->objParentObject = $objParentObject; // Setup the Asset, which assigns objAsset and blnEditMode $this->objParentObject->SetupAsset($this); // Create an empty Asset Array $this->objAssetArray = array(); $this->btnCancel_Create(); $this->lstLocation_Create(); $this->txtNote_Create(); $this->txtNewAssetCode_Create(); $this->btnAdd_Create(); $this->btnSave_Create(); $this->dtgAssetTransact_Create(); }
public function __construct($objParent, $strControlId = null) { parent::__construct($objParent, $strControlId); //$this->AddCssFile(__BOOTSTRAP_CSS__); Bootstrap::LoadJS($this); }
public function __construct($objParentObject, $strControlId = null) { // First, call the parent to do most of the basic setup try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->objParentObject = $objParentObject; $this->objParentObject->SetupAsset($this); // Create Labels $this->lblHeaderAssetCode_Create(); $this->lblLocation_Create(); $this->lblAssetModelCode_Create(); $this->lblManufacturer_Create(); $this->lblCategory_Create(); $this->lblReservedBy_Create(); $this->lblCheckedOutTo_Create(); $this->lblAssetCode_Create(); $this->lblCreationDate_Create(); $this->lblModifiedDate_Create(); $this->lblNewAssetModel_Create(); $this->lblParentAssetCode_Create(); $this->lblIconParentAssetCode_Create(); $this->lblAssetModel_Create(); $this->lblLockedToParent_Create(); $this->UpdateAssetLabels(); // Create Inputs $this->txtAssetCode_Create(); $this->lstAssetModel_Create(); $this->chkAutoGenerateAssetCode_Create(); $this->dlgNewAssetModel_Create(); $this->UpdateAssetControls(); // Set a variable which defines whether the built-in fields must be rendered or not. $this->UpdateBuiltInFields(); // Set a variable which defines whether the GreenPlusButton of the AssetModel must be rendered or not $this->UpdateAssetModelAccess(); // Create all custom asset fields $this->customFields_Create(); // Create parent asset code field $this->txtParentAssetCode_Create(); $this->chkLockToParent_Create(); // Create Buttons $this->btnSave_Create(); $this->btnDelete_Create(); $this->btnEdit_Create(); $this->btnCancel_Create(); $this->btnClone_Create(); $this->atcAttach_Create(); $this->btnPrintAssetTag_Create(); $this->pnlAttachments_Create(); // Only create transaction buttons if editing an existing asset if ($this->blnEditMode) { $this->btnMove_Create(); $this->btnCheckOut_Create(); $this->btnCheckIn_Create(); $this->btnReserve_Create(); $this->btnUnreserve_Create(); $this->btnShip_Create(); $this->btnArchive_Create(); $this->btnReceive_Create(); $this->UpdateAssetControls(); $this->EnableTransactionButtons(); } // Display labels for the existing asset if ($this->blnEditMode) { // Create the transaction history datagrid $this->dtgAssetTransaction_Create(); $this->lblShipmentReceipt_Create(); $this->dtgShipmentReceipt_Create(); $this->displayLabels(); } else { $this->lstLocation_Create(); $this->displayInputs(); } }
/** * Constructor Method * * @param QControl|QControlBase|QForm $objParent Parent control * @param null|string $strControlId Control ID for this control * * @throws Exception * @throws QCallerException */ public function __construct($objParent, $strControlId = null) { parent::__construct($objParent, $strControlId); $this->mixActionParameter = new QJsClosure('return $j(this).data("qap")'); }
public function __construct($objParentObject, $strControlId = null) { parent::__construct($objParentObject, $strControlId); $this->strText = sprintf('<img src="%s/spinner_14.gif" width="14" height="14" alt="Please Wait..."/>', __VIRTUAL_DIRECTORY__ . __IMAGE_ASSETS__); }
public function __construct($objParentObject, $strControlId = null) { parent::__construct($objParentObject, $strControlId); $this->strNoun = QApplication::Translate('item'); $this->strNounPlural = QApplication::Translate('items'); }
public function __construct($objParentObject, $strControlId = null, $blnShowCheckboxes = false, $blnUseAjax = false, $blnRemoveAllLinks = false) { // First, call the parent to do most of the basic setup try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->objParentObject = $objParentObject; $this->blnUseAjax = $blnUseAjax; $this->blnRemoveAllLinks = $blnRemoveAllLinks; $this->dtgInventoryModel = new QDataGrid($this); $this->dtgInventoryModel->Name = 'inventory_model_list'; $this->dtgInventoryModel->CellPadding = 5; $this->dtgInventoryModel->CellSpacing = 0; $this->dtgInventoryModel->CssClass = "datagrid"; // Enable/Disable AJAX for the datagrid $this->dtgInventoryModel->UseAjax = $this->blnUseAjax; // Allow for column toggling $this->dtgInventoryModel->ShowColumnToggle = true; // Allow for CSV Export $this->dtgInventoryModel->ShowExportCsv = true; // Enable Pagination $objPaginator = new QPaginator($this->dtgInventoryModel); $this->dtgInventoryModel->Paginator = $objPaginator; $this->dtgInventoryModel->ItemsPerPage = QApplication::$TracmorSettings->SearchResultsPerPage; // If the user wants the checkboxes column if ($blnShowCheckboxes) { // This will render all of the necessary controls and actions. chkSelected_Render expects a unique ID for each row of the database. $this->dtgInventoryModel->AddColumn(new QDataGridColumnExt('<?=$_CONTROL->chkSelectAll_Render() ?>', '<?=$_CONTROL->chkSelected_Render($_ITEM->InventoryModelId) ?>', 'CssClass="dtg_column"', 'HtmlEntities=false')); } $this->dtgInventoryModel->AddColumn(new QDataGridColumnExt('<img src=../images/icons/attachment_gray.gif border=0 title=Attachments alt=Attachments>', '<?= Attachment::toStringIcon($_ITEM->GetVirtualAttribute(\'attachment_count\')); ?>', 'SortByCommand="__attachment_count ASC"', 'ReverseSortByCommand="__attachment_count DESC"', 'CssClass="dtg_column"', 'HtmlEntities="false"')); // Removing any links in the column data if ($this->blnRemoveAllLinks) { $this->dtgInventoryModel->AddColumn(new QDataGridColumnExt('Inventory Code', '<?= $_ITEM->InventoryModelCode; ?>', 'SortByCommand="inventory_model_code ASC"', 'ReverseSortByCommand="inventory_model_code DESC"', 'CssClass="dtg_column"', 'HtmlEntities=false')); } else { $this->dtgInventoryModel->AddColumn(new QDataGridColumnExt('Inventory Code', '<?= $_ITEM->__toStringWithLink("bluelink"); ?>', 'SortByCommand="inventory_model_code ASC"', 'ReverseSortByCommand="inventory_model_code DESC"', 'CssClass="dtg_column"', 'HtmlEntities=false')); } $this->dtgInventoryModel->AddColumn(new QDataGridColumnExt('Model', '<?= $_ITEM->ShortDescription ?>', 'Width=200', 'SortByCommand="short_description ASC"', 'ReverseSortByCommand="short_description DESC"', 'CssClass="dtg_column"')); $this->dtgInventoryModel->AddColumn(new QDataGridColumnExt('Category', '<?= $_ITEM->Category->__toString(); ?>', 'SortByCommand="inventory_model__category_id__short_description ASC"', 'ReverseSortByCommand="inventory_model__category_id__short_description DESC"', 'CssClass="dtg_column"')); $this->dtgInventoryModel->AddColumn(new QDataGridColumnExt('Manufacturer', '<?= $_ITEM->Manufacturer->__toString(); ?>', 'SortByCommand="inventory_model__manufacturer_id__short_description ASC"', 'ReverseSortByCommand="inventory_model__manufacturer_id__short_description DESC"', 'CssClass="dtg_column"')); $this->dtgInventoryModel->AddColumn(new QDataGridColumnExt('Quantity', '<?= $_ITEM->__toStringQuantity(); ?>', 'SortByCommand="inventory_model_quantity ASC"', 'ReverseSortByCommand="inventory_model_quantity DESC"', 'CssClass="dtg_column"')); // Add the custom field columns with Display set to false. These can be shown by using the column toggle menu. $objCustomFieldArray = CustomField::LoadObjCustomFieldArray(2, false); if ($objCustomFieldArray) { foreach ($objCustomFieldArray as $objCustomField) { //Only add the custom field column if the role has authorization to view it. if ($objCustomField->objRoleAuthView && $objCustomField->objRoleAuthView->AuthorizedFlag) { $this->dtgInventoryModel->AddColumn(new QDataGridColumnExt($objCustomField->ShortDescription, '<?= $_ITEM->GetVirtualAttribute(\'' . $objCustomField->CustomFieldId . '\') ?>', 'SortByCommand="__' . $objCustomField->CustomFieldId . ' ASC"', 'ReverseSortByCommand="__' . $objCustomField->CustomFieldId . ' DESC"', 'HtmlEntities="false"', 'CssClass="dtg_column"', 'Display="false"')); } } } $this->dtgInventoryModel->SortColumnIndex = 2; $this->dtgInventoryModel->SortDirection = 0; $objStyle = $this->dtgInventoryModel->RowStyle; $objStyle->ForeColor = '#000000'; $objStyle->BackColor = '#FFFFFF'; $objStyle->FontSize = 12; $objStyle = $this->dtgInventoryModel->AlternateRowStyle; $objStyle->BackColor = '#EFEFEF'; $objStyle = $this->dtgInventoryModel->HeaderRowStyle; $objStyle->ForeColor = '#000000'; $objStyle->BackColor = '#EFEFEF'; $objStyle->CssClass = 'dtg_header'; $this->dtgInventoryModel->SetDataBinder('dtgInventoryModel_Bind', $this); $this->lstCategory_Create(); $this->lstManufacturer_Create(); $this->lstLocation_Create(); $this->txtShortDescription_Create(); $this->txtInventoryModelCode_Create(); $this->btnSearch_Create(); $this->btnClear_Create(); $this->ctlAdvanced_Create(); $this->lblAdvanced_Create(); }
public function __construct($objParentObject, $strControlId = null) { if ($objParentObject) { parent::__construct($objParentObject, $strControlId); } }