当前位置: 首页>>代码示例>>PHP>>正文


PHP QApplication::ExecuteJavaScript方法代码示例

本文整理汇总了PHP中QApplication::ExecuteJavaScript方法的典型用法代码示例。如果您正苦于以下问题:PHP QApplication::ExecuteJavaScript方法的具体用法?PHP QApplication::ExecuteJavaScript怎么用?PHP QApplication::ExecuteJavaScript使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QApplication的用法示例。


在下文中一共展示了QApplication::ExecuteJavaScript方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: txtUsername_Create

 protected function txtUsername_Create()
 {
     $this->txtUsername = new QTextBox($this);
     $this->txtUsername->Name = QApplication::Translate('Username') . ":";
     $this->txtUsername->Required = true;
     QApplication::ExecuteJavaScript(sprintf("document.getElementById('%s').focus()", $this->txtUsername->ControlId));
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:7,代码来源:login.php

示例2: GetResetButtonHtml

 /**
  * Creates the reset button html for use with multiple select boxes.
  * 
  */
 protected function GetResetButtonHtml()
 {
     $strJavaScriptOnClick = sprintf('$j("#%s").val(null);$j("#%s").trigger("change"); return false;', $this->strControlId, $this->strControlId);
     $strToReturn = sprintf(' <a id="reset_ctl_%s" href="#" class="listboxReset">%s</a>', $this->strControlId, QApplication::Translate('Reset'));
     QApplication::ExecuteJavaScript(sprintf('$j("#reset_ctl_%s").on("%s", function(){ %s });', $this->strControlId, "click", $strJavaScriptOnClick));
     return $strToReturn;
 }
开发者ID:hiptc,项目名称:dle2wordpress,代码行数:11,代码来源:QListBox.class.php

示例3: SetupPanel

 protected function SetupPanel()
 {
     if (!$this->objStack) {
         return $this->ReturnTo('#1');
     }
     $this->btnScanCheck = new QButton($this);
     $this->btnScanCheck->Text = 'Scan Check';
     $this->btnScanCheck->CssClass = 'primary';
     $this->btnScanCheck->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnScanCheck_Click'));
     $this->dlgScanCheck = new QDialogBox($this);
     $this->dlgScanCheck->Template = dirname(__FILE__) . '/dlgScanCheck.tpl.php';
     $this->dlgScanCheck->MatteClickable = false;
     $this->dlgScanCheck->HideDialogBox();
     $this->btnScanCheckCancel = new QLinkButton($this->dlgScanCheck);
     $this->btnScanCheckCancel->Text = 'Close';
     $this->btnScanCheckCancel->CssClass = 'cancel';
     $this->btnScanCheckCancel->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnScanCheckCancel_Click'));
     $this->btnScanCheckCancel->AddAction(new QClickEvent(), new QTerminateAction());
     $this->btnScanCheckTest = new QLinkButton($this->dlgScanCheck);
     $this->btnScanCheckTest->Text = 'Test Connection to MICRImage';
     $this->btnScanCheckTest->CssClass = 'cancel';
     $this->btnScanCheckTest->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnScanCheckTest_Click'));
     $this->btnScanCheckTest->AddAction(new QClickEvent(), new QTerminateAction());
     $this->dtgTransactionType = new QDataGrid($this);
     $this->dtgTransactionType->AddColumn(new QDataGridColumn('Transaction Type', '<?= $_CONTROL->ParentControl->RenderTransactionType($_ITEM); ?>', 'Width=280px'));
     $this->dtgTransactionType->AddColumn(new QDataGridColumn('Count', '<?= $_CONTROL->ParentControl->RenderTransactionCount($_ITEM); ?>', 'Width=90px'));
     $this->dtgTransactionType->SetDataBinder('dtgTransactionType_Bind', $this);
     if ($this->strUrlHashArgument == 'scan') {
         QApplication::ExecuteJavaScript('ScrollDivToBottom("dtgContributionsDiv");');
         $this->btnScanCheck_Click();
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:32,代码来源:CpStewardship_View.class.php

示例4: SetupChildEditControls

 protected function SetupChildEditControls()
 {
     $this->lstGrowthGroupLocation = $this->mctGrowthGroup->lstGrowthGroupLocation_Create();
     $this->lstGrowthGroupStructure = $this->mctGrowthGroup->lstGrowthGroupStructures_Create();
     $this->lstGrowthGroupStructure->Rows = 10;
     $this->lstGrowthGroupStatus = new QListBox($this);
     foreach (AvailabilityStatus::LoadAll() as $objStatus) {
         $this->lstGrowthGroupStatus->AddItem($objStatus->Name, $objStatus->Id);
     }
     $this->lstGrowthGroupDayType = $this->mctGrowthGroup->lstGrowthGroupDayType_Create();
     $this->txtStartTime = $this->mctGrowthGroup->txtStartTime_Create();
     $this->txtEndTime = $this->mctGrowthGroup->txtEndTime_Create();
     $this->txtAddress1 = $this->mctGrowthGroup->txtAddress1_Create();
     $this->txtAddress2 = $this->mctGrowthGroup->txtAddress2_Create();
     $this->txtCrossStreet1 = $this->mctGrowthGroup->txtCrossStreet1_Create();
     $this->txtCrossStreet2 = $this->mctGrowthGroup->txtCrossStreet2_Create();
     $this->txtZipCode = $this->mctGrowthGroup->txtZipCode_Create();
     $this->txtLongitude = $this->mctGrowthGroup->txtLongitude_Create();
     $this->txtLatitude = $this->mctGrowthGroup->txtLatitude_Create();
     $this->txtAccuracy = $this->mctGrowthGroup->txtAccuracy_Create();
     $this->txtAccuracy->Instructions = 'as reported by Google Maps -- this should ideally be 7';
     $this->txtDescription = $this->mctGrowthGroup->txtDescription_Create();
     $this->btnRefresh = new QButton($this);
     $this->btnRefresh->Text = 'Lookup Using Google Maps';
     $this->btnRefresh->AddAction(new QClickEvent(), new QToggleEnableAction($this->btnRefresh));
     $this->btnRefresh->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnRefresh_Click'));
     $this->cblMeetings = new QCheckBoxList($this, 'days');
     $this->cblMeetings->Name = 'Meetings per Month';
     foreach (array('1st', '2nd', '3rd', '4th', '5th', 'Every Other') as $intKey => $strName) {
         $intValue = pow(2, $intKey);
         $this->cblMeetings->AddItem($strName, $intValue, $this->mctGrowthGroup->GrowthGroup->MeetingBitmap & $intValue);
     }
     QApplication::ExecuteJavaScript('document.getElementById("days[5]").onclick = EveryOtherClicked;');
 }
开发者ID:alcf,项目名称:chms,代码行数:34,代码来源:CpGroup_EditGrowthGroup.class.php

示例5: GetFooterRowHtml

 protected function GetFooterRowHtml()
 {
     QApplication::ExecuteJavaScript(sprintf('highlight_datagrid(\'%s\');', $this->ControlId));
     if ($this->objPaginatorAlternate) {
         return sprintf('<tr><td colspan="%s">%s</td></tr>', count($this->objColumnArray), $this->GetPaginatorRowHtml($this->objPaginatorAlternate));
     }
 }
开发者ID:Jobava,项目名称:narro,代码行数:7,代码来源:NarroLogDataGrid.class.php

示例6: TextItem_Cancel

 protected function TextItem_Cancel($strFormId, $strControlId, $strParameter)
 {
     // Hide the Textbox, get the label cleaned up and ready to go
     $this->lblArray[$strParameter]->Display = true;
     $this->txtArray[$strParameter]->Display = false;
     $this->lblArray[$strParameter]->CssClass = 'renamer_item';
     QApplication::ExecuteJavaScript('intSelectedIndex = -1;');
 }
开发者ID:kmcelhinney,项目名称:qcodo,代码行数:8,代码来源:renamer_2.php

示例7: HideDialogBox

 public function HideDialogBox()
 {
     if ($this->blnDisplay) {
         $this->Display = false;
     }
     QApplication::ExecuteJavaScript("qc.getWrapper('" . $this->strControlId . "').hideDialogBox()");
     $this->blnWrapperModified = false;
 }
开发者ID:klucznik,项目名称:qcodo,代码行数:8,代码来源:QDialogBox.class.php

示例8: renderLowPriorityButton_Click

 public function renderLowPriorityButton_Click($strFormId, $strControlId, $strParameter)
 {
     $this->intHitCnt++;
     $this->dtgButtons->MarkAsModified();
     QApplication::ExecuteJavaScript("alert('alert 3: a low priority script')", QJsPriority::Low);
     QApplication::ExecuteJavaScript("alert('alert 1: a low priority script')", QJsPriority::Low);
     QApplication::ExecuteJavaScript("alert('Just updated the datagrid: --> the javascript for adding the css class to the buttons is executed first!')", QJsPriority::Low);
     QApplication::ExecuteJavaScript('$j(".ui-button").addClass("ui-state-error")');
     //change the button color: this is executed with standard priority
 }
开发者ID:tomVertuoz,项目名称:framework,代码行数:10,代码来源:low_priority_js.php

示例9: GetEndScript

    public function GetEndScript()
    {
        $strJS = parent::GetEndScript();
        $strCtrlJs = <<<FUNC
\t\t\t;\$j('#{$this->ControlId}').on("sortstop", function (event, ui) {
\t\t\t\t\t\tvar ary = jQuery(this).sortable("toArray");
\t\t\t\t\t\tvar str = ary.join(",");
\t\t\t \t\t\tqcubed.recordControlModification("{$this->ControlId}", "_ItemArray", str);
\t\t\t\t\t})\t\t\t\t\t\t
FUNC;
        QApplication::ExecuteJavaScript($strCtrlJs, QJsPriority::High);
        return $strJS;
    }
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:13,代码来源:QSortableBase.class.php

示例10: lblForgotPassword_Click

 protected function lblForgotPassword_Click()
 {
     $this->txtUsername->Enabled = false;
     $this->txtPassword->Enabled = false;
     $this->btnLogin->Enabled = false;
     $this->lblForgotPassword->Display = false;
     $this->txtEmail->Visible = true;
     $this->btnRecoverPassword->Display = true;
     QApplication::ExecuteJavaScript(sprintf("if (!('placeholder' in document.createElement('input'))) qc.getC('%s').value = 'E-Mail Address'", $this->txtEmail->ControlId));
     $this->txtEmail->Focus();
     $this->txtEmail->Blink();
     $this->txtEmail->Select();
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:13,代码来源:login.php

示例11: Form_Create

 protected function Form_Create()
 {
     $this->lblLabel = new QLabel($this);
     $this->lblLabel->Text = "Members who left after ";
     $this->dtxBeforeValue = new QDateTimeTextBox($this);
     $this->dtxBeforeValue->Name = "Members who Exited Before:";
     $this->dtxBeforeValue->Required = true;
     $this->beforeCalValue = new QCalendar($this, $this->dtxBeforeValue);
     $this->dtxBeforeValue->RemoveAllActions(QClickEvent::EventName);
     $this->dtxBeforeValue->AddAction(new QChangeEvent(), new QAjaxAction('dtxDate_Change'));
     $this->dtxBeforeValue->Text = QApplication::PathInfo(1);
     $this->dtxAfterValue = new QDateTimeTextBox($this);
     $this->dtxAfterValue->Name = "Members who exited After:";
     $this->dtxAfterValue->Required = true;
     $this->afterCalValue = new QCalendar($this, $this->dtxAfterValue);
     $this->dtxAfterValue->RemoveAllActions(QClickEvent::EventName);
     $this->dtxAfterValue->AddAction(new QChangeEvent(), new QAjaxAction('dtxDate_Change'));
     $this->dtxAfterValue->Text = QApplication::PathInfo(0);
     $this->dtgExitingMembers = new QDataGrid($this);
     $this->dtgExitingMembers->AddColumn(new QDataGridColumn('Name', '<?= $_ITEM->Person->FullName; ?>', 'Width=270px'));
     $this->dtgExitingMembers->AddColumn(new QDataGridColumn('Membership End Date', '<?= $_ITEM->DateEnd; ?>', 'Width=270px'));
     $this->dtgExitingMembers->AddColumn(new QDataGridColumn('Termination Reason', '<?= $_ITEM->TerminationReason; ?>', 'Width=270px'));
     $dtAfterValue = new QDateTime($this->dtxAfterValue->Text);
     $dtBeforeValue = new QDateTime($this->dtxBeforeValue->Text);
     $objcondition = QQ::Equal(QQN::Membership()->Person->AttributeValue->Attribute->Name, 'Post-2016');
     $objMembershipArray = Membership::LoadArrayByEndDateRange($dtAfterValue, $dtBeforeValue, $objcondition);
     $this->iTotalCount = count($objMembershipArray);
     $this->dtgExitingMembers->DataSource = $objMembershipArray;
     $chartArray = array();
     $terminationReason = array();
     foreach ($objMembershipArray as $member) {
         if (array_key_exists($member->TerminationReason, $terminationReason)) {
             $terminationReason[$member->TerminationReason]++;
         } else {
             $terminationReason[$member->TerminationReason] = 1;
         }
     }
     ksort($terminationReason, SORT_STRING);
     foreach ($terminationReason as $key => $value) {
         $objItem = new memberArray();
         $objItem->reason = $key;
         $objItem->count = $value;
         $chartArray[] = $objItem;
     }
     QApplication::ExecuteJavaScript('initializeChart(' . json_encode($chartArray) . ');');
 }
开发者ID:alcf,项目名称:chms,代码行数:46,代码来源:exitMembers.php

示例12: dtgNew_Create

 private function dtgNew_Create($latestVersions)
 {
     $this->dtgNew = new QDataGrid($this, 'dtgNew');
     $this->dtgNew->AddColumn(new QDataGridColumn('Name', '<?= $_FORM->RenderName($_ITEM) ?>', 'HtmlEntities=false'));
     $this->dtgNew->AddColumn(new QDataGridColumn('Description', '<?= $_ITEM->description ?>', 'HtmlEntities=false'));
     $arrDataSource = array();
     foreach ($latestVersions as $item) {
         /** @var $item DownloadedItem */
         if ($item->installedVersion == null) {
             $arrDataSource[] = $item;
         }
     }
     $this->dtgNew->DataSource = $arrDataSource;
     if (sizeof($this->dtgNew->DataSource) > 0) {
         QApplication::ExecuteJavaScript('jQuery("#lblNoNew").hide()');
     } else {
         QApplication::ExecuteJavaScript('jQuery("#dtgNew").hide()');
     }
 }
开发者ID:tomVertuoz,项目名称:framework,代码行数:19,代码来源:update_checker.php

示例13: dtrGrowthGroups_Bind

 public function dtrGrowthGroups_Bind()
 {
     $objCondition = QQ::Equal(QQN::GrowthGroup()->GrowthGroupLocationId, $this->objLocation->Id);
     if ($this->lstDays->SelectedValue) {
         $objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQN::GrowthGroup()->GrowthGroupDayTypeId, $this->lstDays->SelectedValue));
     }
     if ($this->lstTypes->SelectedValue) {
         $objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQN::GrowthGroup()->GrowthGroupStructure->GrowthGroupStructureId, $this->lstTypes->SelectedValue));
     }
     // Filter Out "inactive" groups
     $objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQN::GrowthGroup()->Group->ActiveFlag, true));
     $this->dtrGrowthGroups->DataSource = GrowthGroup::QueryArray($objCondition, QQ::OrderBy(QQN::GrowthGroup()->Group->Name));
     // Results?
     $this->pnlNone->Visible = !count($this->dtrGrowthGroups->DataSource);
     // Markers
     QApplication::ExecuteJavaScript('hideAllMarkers();');
     foreach ($this->dtrGrowthGroups->DataSource as $objGroup) {
         QApplication::ExecuteJavaScript('showMarker(' . ($this->intMarkerArray[$objGroup->GroupId] - 1) . ');');
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:20,代码来源:index.php

示例14: RenderAsEvents

 public function RenderAsEvents($strActionParameter = null, $blnDisplayOutput = true, $strTargetControlId = null, $blnRenderControlId = true)
 {
     if ($strTargetControlId) {
         $this->strTargetControlId = $strTargetControlId;
     } else {
         $this->strTargetControlId = $this->objForm->GenerateControlId();
     }
     $this->strActionParameter = $strActionParameter;
     $strToReturn = $this->GetActionAttributes();
     QApplication::ExecuteJavaScript($strToReturn);
     if ($blnRenderControlId && $blnDisplayOutput) {
         echo sprintf("id='%s'", $this->strTargetControlId);
     } else {
         if ($blnRenderControlId) {
             return sprintf("id='%s'", $this->strTargetControlId);
         } else {
             return "";
         }
     }
 }
开发者ID:hiptc,项目名称:dle2wordpress,代码行数:20,代码来源:QControlProxy.class.php

示例15: btnSave_Click

 protected function btnSave_Click()
 {
     $strText = file_get_contents($this->flcUpload->FilePath);
     try {
         $intEntriesModified = 0;
         $intEntriesAdded = 0;
         $intRows = PaypalBatch::ProcessReport($strText, $intEntriesModified, $intEntriesAdded);
         if (!$intEntriesAdded && !$intEntriesModified) {
             QApplication::DisplayAlert('No new or modified entries found.  No changes were made.');
         } else {
             if ($intEntriesAdded) {
                 QApplication::DisplayAlert(sprintf('PayPal import successful.  %s payment entries were updated.  WARNING: %s unlinked credit card payment entries had to be created.', $intEntriesModified, $intEntriesAdded));
             } else {
                 QApplication::DisplayAlert(sprintf('PayPal import successful.  %s payment entries were updated.', $intEntriesModified));
             }
         }
         QApplication::ExecuteJavaScript('document.location = "/stewardship/paypal/";');
     } catch (QCallerException $objExc) {
         QApplication::DisplayAlert('There were problems processing the report file: "' . $objExc->getMessage() . '"');
         return;
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:22,代码来源:upload.php


注:本文中的QApplication::ExecuteJavaScript方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。