public function __construct($objParentObject, $strMethodCallback, $strControlId = null) { try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->strMethodCallback = $strMethodCallback; $this->strTemplate = dirname(__FILE__) . '/PersonSelectorDialog.tpl.php'; $this->MatteClickable = false; $this->HideDialogBox(); $this->txtMemberSearch = new QTextBox($this); $this->txtMemberSearch->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'txtMemberSearch_Enter')); $this->txtMemberSearch->AddAction(new QEnterKeyEvent(), new QTerminateAction()); $this->dtrResults = new QDataRepeater($this); $this->dtrResults->SetDataBinder('dtrResults_Bind', $this); $this->dtrResults->Template = dirname(__FILE__) . '/dtrPersonSelectorResults.tpl.php'; $this->dtrResults->CssClass = 'dtrPersonSelectorResults'; $this->pxyName = new QControlProxy($this); $this->pxyName->AddAction(new QMouseOverEvent(), new QJavaScriptAction("this.className='hover';")); $this->pxyName->AddAction(new QMouseOutEvent(), new QJavaScriptAction("this.className='';")); $this->pxyName->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'pxyName_Click')); $this->btnCancel = new QLinkButton($this); $this->btnCancel->Text = 'Cancel'; $this->btnCancel->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnCancel_Click')); $this->btnCancel->AddAction(new QClickEvent(), new QTerminateAction()); }
public function __construct($objParentObject, $strFileUploadCallback, $strControlId = null) { // Call parent constructor and define FileUploadCallback parent::__construct($objParentObject, $strControlId); $this->strFileUploadCallback = $strFileUploadCallback; // Setup the Dialog Box, itself $this->strTemplate = __DOCROOT__ . __PHP_ASSETS__ . '/QFileAssetDialog.tpl.php'; $this->blnDisplay = false; $this->blnMatteClickable = false; $this->strTitle = QApplication::Translate("Upload a File"); // Controls for Upload FileAsset Dialog Box $this->lblMessage = new QLabel($this); $this->lblMessage->HtmlEntities = false; $this->lblError = new QLabel($this); $this->lblError->HtmlEntities = false; $this->flcFileAsset = new QFileControl($this); $this->btnUpload = new QButton($this); $this->btnCancel = new QButton($this); $this->objSpinner = new QWaitIcon($this); // Events on the Dialog Box Controls $this->flcFileAsset->AddAction(new QEnterKeyEvent(), new QTerminateAction()); $this->btnUpload->AddAction(new QClickEvent(), new QToggleEnableAction($this->btnUpload)); $this->btnUpload->AddAction(new QClickEvent(), new QToggleEnableAction($this->btnCancel)); $this->btnUpload->AddAction(new QClickEvent(), new QToggleDisplayAction($this->objSpinner)); $this->btnUpload->AddAction(new QClickEvent(), new QServerControlAction($this, 'btnUpload_Click')); $this->btnCancel->AddAction(new QClickEvent(), new QHideDialogBox($this)); }
public function __construct($objParent, $strControlId = null) { parent::__construct($objParent, $strControlId); $this->strTemplate = dirname(__FILE__) . '/MessageEditDialogBox.tpl.php'; $this->strCssClass = 'dialogbox'; $this->strWidth = '620px'; $this->mctMessage = new MessageMetaControl($this, new Message()); $this->lblHeading = new QLabel($this); $this->lblHeading->TagName = 'h4'; $this->lblHeading->SetCustomStyle('margin', '0'); $this->lstForum = new QListBox($this); $this->txtTopicName = new QTextBox($this); $this->txtTopicName->Name = 'Topic Name'; $this->txtTopicName->Required = true; $this->txtMessage = $this->mctMessage->txtMessage_Create('message'); $this->txtMessage->TextMode = QTextMode::MultiLine; $this->txtMessage->CrossScripting = QCrossScripting::Allow; $this->txtMessage->Required = true; $this->btnOkay = new QButton($this); $this->btnOkay->CausesValidation = $this; $this->btnCancel = new QLinkButton($this); $this->btnCancel->Text = 'Cancel'; // Define Actions $this->txtTopicName->AddAction(new QEnterKeyEvent(), new QFocusControlAction($this->txtMessage)); $this->txtTopicName->AddAction(new QEnterKeyEvent(), new QTerminateAction()); $this->btnOkay->AddAction(new QClickEvent(), new QToggleEnableAction($this->btnOkay)); $this->btnOkay->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnOkay_Click')); $this->btnCancel->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnCancel_Click')); $this->btnCancel->AddAction(new QClickEvent(), new QTerminateAction()); $this->Display = false; $this->blnMatteClickable = false; }
public function pxyEmailMessage_Click($strFormId, $strControlId, $strParameter) { $objEmailMessageRoute = EmailMessageRoute::Load($strParameter); if ($objEmailMessageRoute && $objEmailMessageRoute->GroupId == $this->objGroup->Id) { $this->objSelectedEmailMessageRoute = $objEmailMessageRoute; $this->dlgEmailMessage->ShowDialogBox(); } }
public function ShowDialogBox() { if (!$this->btnCancel) { $this->btnCancel = new QLinkButton($this); $this->btnCancel->Text = 'Cancel'; $this->btnCancel->CssClass = 'cancel'; $this->dtgPeople = new PersonDataGrid($this); $this->dtgPeople->Paginator = new QPaginator($this->dtgPeople); $this->dtgPeople->MetaAddColumn('LastName', 'Name=Name', 'Html=<?= $_CONTROL->ParentControl->RenderName($_ITEM); ?>', 'HtmlEntities=false', 'Width=220px', 'FontSize=11px'); $this->dtgPeople->MetaAddColumn('PrimaryAddressText', 'Name=Primary Address and City', 'Html=<?= $_ITEM->PrimaryAddressText . ", " . $_ITEM->PrimaryCityText; ?>', 'Width=310px', 'FontSize=11px'); $this->dtgPeople->MetaAddColumn('PrimaryPhoneText', 'Name=Phone', 'Width=80px', 'FontSize=10px'); $this->dtgPeople->AddColumn(new QDataGridColumn('Select', '<?= $_CONTROL->ParentControl->RenderSelect($_ITEM, $_CONTROL->CurrentRowIndex); ?>', 'HtmlEntities=false', 'Width=120px')); $this->dtgPeople->SetDataBinder('dtgPeople_Bind', $this); $this->dtgPeople->NoDataHtml = '<p>Enter in a search criteria above.</p>'; $this->dtgPeople->SortColumnIndex = 0; $this->dtgPeople->ItemsPerPage = 20; //$this->AddAction(new QInsertKeyEvent(), new QAjaxControlAction($this, 'btnSelect_Click')); //$this->dtgPeople->AddAction(new QInsertKeyEvent(), new QAjaxControlAction($this, 'btnSelect_Click')); $this->txtName = new QTextBox($this); $this->txtName->Name = 'Name'; $this->txtName->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh')); $this->txtName->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh')); $this->txtName->AddAction(new QEnterKeyEvent(), new QTerminateAction()); $this->txtFirstName = new QTextBox($this); $this->txtFirstName->Name = 'First Name'; $this->txtFirstName->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh')); $this->txtFirstName->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh')); $this->txtFirstName->AddAction(new QEnterKeyEvent(), new QTerminateAction()); $this->txtLastName = new QTextBox($this); $this->txtLastName->Name = 'Last Name'; $this->txtLastName->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh')); $this->txtLastName->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh')); $this->txtLastName->AddAction(new QEnterKeyEvent(), new QTerminateAction()); $this->txtPhone = new QTextBox($this); $this->txtPhone->Name = 'Phone'; $this->txtPhone->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh')); $this->txtPhone->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh')); $this->txtPhone->AddAction(new QEnterKeyEvent(), new QTerminateAction()); $this->txtAddress = new QTextBox($this); $this->txtAddress->Name = 'Address'; $this->txtAddress->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh')); $this->txtAddress->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh')); $this->txtAddress->AddAction(new QEnterKeyEvent(), new QTerminateAction()); $this->txtCity = new QTextBox($this); $this->txtCity->Name = 'City'; $this->txtCity->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh')); $this->txtCity->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'dtgPeople_Refresh')); $this->txtCity->AddAction(new QEnterKeyEvent(), new QTerminateAction()); $this->pnlPerson = new QPanel($this); $this->pnlPerson->Template = dirname(__FILE__) . '/StewardshipSelectPersonPanel.tpl.php'; $this->pnlPerson->CssClass = 'section personSection'; $this->pxyViewPerson = new QControlProxy($this); $this->pxyViewPerson->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'pxyViewPerson_Click')); $this->pxyViewPerson->AddAction(new QClickEvent(), new QTerminateAction()); $this->btnSelect = new QButton($this); $this->btnSelect->Text = 'Select'; $this->btnSelect->CssClass = 'primary'; $this->btnSelect->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnSelect_Click')); $this->lblOr = new QLabel($this); $this->lblOr->Text = ' or '; $this->lblOr->HtmlEntities = false; $this->pxySelectPerson = new QControlProxy($this); $this->pxySelectPerson->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'pxySelectPerson_Click')); $this->pxySelectPerson->AddAction(new QClickEvent(), new QTerminateAction()); if (!$this->objContribution->Id && is_file($this->objContribution->TempPath)) { $this->imgCheckImage = new TiffImageControl($this); $this->imgCheckImage->ImagePath = $this->objContribution->TempPath; $this->imgCheckImage->Width = '424'; $this->imgCheckImage->AddAction(new QClickEvent(), new QJavaScriptAction("OpenInNewWindow('" . $this->objContribution->ViewLargeUrl . "');")); } else { if ($this->objContribution->Id && is_file($this->objContribution->Path)) { $this->imgCheckImage = new TiffImageControl($this); $this->imgCheckImage->ImagePath = $this->objContribution->Path; $this->imgCheckImage->Width = '424'; $this->imgCheckImage->AddAction(new QClickEvent(), new QJavaScriptAction("OpenInNewWindow('" . $this->objContribution->ViewLargeUrl . "');")); } } $this->imgHistoricCheckImage = new TiffImageControl($this); $this->imgHistoricCheckImage->ImagePath = __DOCROOT__ . __IMAGE_ASSETS__ . '/no_check_image.tiff'; $this->imgHistoricCheckImage->Width = '212'; $this->imgHistoricCheckImage->Height = '100'; $this->pxyViewCheckImage = new QControlProxy($this); $this->pxyViewCheckImage->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'pxyViewCheckImage_Click')); $this->pxyViewCheckImage->AddAction(new QClickEvent(), new QTerminateAction()); } $this->btnCancel->RemoveAllActions(QClickEvent::EventName); // If no one has been selected AND we are scanning a check, cancel should redirect back to scan if ($this->objParentControl->blnScanFlag && !$this->objParentControl->mctContribution->StewardshipContribution->Person) { $this->btnCancel->AddAction(new QClickEvent(), new QHideDialogBox($this)); $this->btnCancel->AddAction(new QClickEvent(), new QJavaScriptAction("document.location='#" . $this->objParentControl->objStack->StackNumber . "/view/scan';")); $this->btnCancel->AddAction(new QClickEvent(), new QTerminateAction()); // If no one has been selected AND we are NEW, cancel should redirect to the main } else { if (!$this->objParentControl->mctContribution->EditMode && !$this->objParentControl->mctContribution->StewardshipContribution->Person) { $this->btnCancel->AddAction(new QClickEvent(), new QHideDialogBox($this)); $this->btnCancel->AddAction(new QClickEvent(), new QJavaScriptAction("document.location='#" . $this->objParentControl->objStack->StackNumber . "';")); $this->btnCancel->AddAction(new QClickEvent(), new QTerminateAction()); // Otherwise, Cancel should just close the dbox } else { $this->btnCancel->AddAction(new QClickEvent(), new QHideDialogBox($this)); $this->btnCancel->AddAction(new QClickEvent(), new QTerminateAction()); } } $this->objSelectedPerson = $this->objContribution->Person; $this->pnlPerson_Refresh(); $this->txtName->Text = null; $this->txtPhone->Text = null; $this->txtAddress->Text = null; $this->txtCity->Text = null; $this->dtgPeople_Refresh(null, null, null); parent::ShowDialogBox(); $this->txtName->Focus(); }
public function __set($strName, $mixValue) { $this->blnModified = true; switch ($strName) { case "Value": // Depending on the format of $mixValue, set $this->fltValue appropriately // It will try to cast to Integer if possible, otherwise Float, otherwise just 0 $this->fltValue = 0; try { $this->fltValue = QType::Cast($mixValue, QType::Float); break; } catch (QInvalidCastException $objExc) { } try { $this->fltValue = QType::Cast($mixValue, QType::Integer); break; } catch (QInvalidCastException $objExc) { } break; default: try { parent::__set($strName, $mixValue); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } break; } }
/** * Constructor * * @param QDialogBox $objControl * * @throws QCallerException */ public function __construct($objControl) { if (!$objControl instanceof QDialogBox) { throw new QCallerException('First parameter of constructor is expecting an object of type QDialogBox'); } $this->strJavaScript = $objControl->GetHideDialogJavaScript(); }