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


PHP QApplication::ExecuteJavascript方法代码示例

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


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

示例1: AddControlToMove

 public function AddControlToMove($objTargetControl = null)
 {
     $this->strJavaScripts = __JQUERY_EFFECTS__;
     if ($objTargetControl && $objTargetControl->ControlId != $this->ControlId) {
         QApplication::ExecuteJavascript(sprintf('var pos_%s = $j("#%s").offset()', $objTargetControl->ControlId, $objTargetControl->ControlId));
         QApplication::ExecuteJavascript(sprintf('$j("#%s").on("drag",  function (ev, ui) { p = $j("#%s").offset(); p.left = pos_%s.left + ui.position.left; p.top = pos_%s.top + ui.position.top; $j("#%s").offset(p); } );', $this->strControlId, $objTargetControl->ControlId, $objTargetControl->ControlId, $objTargetControl->ControlId, $objTargetControl->ControlId));
         $this->objMovesControlsArray[$objTargetControl->ControlId] = true;
         // TODO:
         // Replace ExecuteJavascript with this:
         //$this->AddAttributeScript('qcubed', 'ctrlToMove', $objTargetControl->ControlId);
     }
     return;
 }
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:13,代码来源:QBlockControl.class.php

示例2: __set

    public function __set($strName, $mixValue)
    {
        switch ($strName) {
            case '_SelectedItems':
                // Internal only. Do not use. Used by JS above to keep track of selections.
                try {
                    $strItems = QType::Cast($mixValue, QType::String);
                    $this->arySelectedItems = explode(",", $strItems);
                } catch (QInvalidCastException $objExc) {
                    $objExc->IncrementOffset();
                    throw $objExc;
                }
                break;
            case 'SelectedItems':
                // Set the selected items to an array of object ids
                try {
                    $aValues = QType::Cast($mixValue, QType::ArrayType);
                    $aJqIds = array();
                    foreach ($aValues as $val) {
                        $aJqIds[] = '"#' . $val . '"';
                    }
                    $strJqItems = join(',', $aJqIds);
                    $strJS = <<<FUNC
\t\t\t\t\t\t\tvar item = jQuery("#{$this->ControlId}");
\t\t\t\t\t\t\t
\t\t\t\t\t\t\tjQuery(".ui-selectee", item).each(function() {
\t\t\t\t\t\t\t\tjQuery(this).removeClass('ui-selected');
\t\t\t\t\t\t\t});
\t\t\t\t\t\t\t
\t\t\t\t\t\t\tjQuery({$strJqItems}).each(function() {
\t\t\t\t\t\t\t\tjQuery(this).addClass('ui-selected');
\t\t\t\t\t\t\t});
FUNC;
                    $this->arySelectedItems = $aValues;
                    QApplication::ExecuteJavascript($strJS);
                } catch (QInvalidCastException $objExc) {
                    $objExc->IncrementOffset();
                    throw $objExc;
                }
                break;
            default:
                try {
                    parent::__set($strName, $mixValue);
                    break;
                } catch (QCallerException $objExc) {
                    $objExc->IncrementOffset();
                    throw $objExc;
                }
        }
    }
开发者ID:tomVertuoz,项目名称:framework,代码行数:50,代码来源:QSelectableBase.class.php

示例3: dtgPersonsRow_Click

 public function dtgPersonsRow_Click($strFormId, $strControlId, $strParameter)
 {
     $intPersonId = intval($strParameter);
     $objPerson = Person::Load($intPersonId);
     QApplication::ExecuteJavascript("alert('You clicked on a person with ID #" . $intPersonId . ": " . $objPerson->FirstName . " " . $objPerson->LastName . "');");
 }
开发者ID:hiptc,项目名称:dle2wordpress,代码行数:6,代码来源:rowactions.php

示例4: Polling_Process

 protected function Polling_Process($strFormId, $strControlId, $strParameter)
 {
     if ($this->strPollingMethod) {
         $objObject = $this->objPollingParentObject ? $this->objPollingParentObject : $this;
         $strMethod = $this->strPollingMethod;
         $objObject->{$strMethod}();
         QApplication::ExecuteJavascript(sprintf('qc.regPP("%s", %s);', $this->pxyPollingProxy->ControlId, $this->intPollingInterval));
     }
 }
开发者ID:klucznik,项目名称:qcodo,代码行数:9,代码来源:QFormBase.class.php

示例5: chkHoldAtLocationFlag_Click

 public function chkHoldAtLocationFlag_Click($strFormId, $strControlId, $strParameter)
 {
     if ($this->chkHoldAtLocationFlag->Checked) {
         QApplication::ExecuteJavascript('document.getElementById("HAL").style.display="";');
     } else {
         QApplication::ExecuteJavascript('document.getElementById("HAL").style.display="none";');
     }
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:8,代码来源:shipment_edit.php

示例6: RemoveAllDropZones

 public function RemoveAllDropZones()
 {
     QApplication::ExecuteJavascript(sprintf('$j("#%s").draggable("option", "revert", "invalid");', $this->strControlId));
     foreach ($this->objDropsControlsArray as $strControlId => $blnValue) {
         if ($blnValue) {
             $objControl = $this->objForm->GetControl($strControlId);
             if ($objControl) {
                 $objControl->objIsDropZoneFor[$this->ControlId] = false;
             }
         }
     }
     $this->objDropsControlsArray = array();
 }
开发者ID:tomVertuoz,项目名称:framework,代码行数:13,代码来源:QBlockControl.class.php


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