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


PHP QControl::GetEndScript方法代码示例

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


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

示例1: GetEndScript

 public function GetEndScript()
 {
     $strToReturn = parent::GetEndScript();
     if (QDateTime::$Translate) {
         $strShortNameArray = array();
         $strLongNameArray = array();
         $strDayArray = array();
         $dttMonth = new QDateTime('2000-01-01');
         for ($intMonth = 1; $intMonth <= 12; $intMonth++) {
             $dttMonth->Month = $intMonth;
             $strShortNameArray[] = '"' . $dttMonth->ToString('MMM') . '"';
             $strLongNameArray[] = '"' . $dttMonth->ToString('MMMM') . '"';
         }
         $dttDay = new QDateTime('Sunday');
         for ($intDay = 1; $intDay <= 7; $intDay++) {
             $strDay = $dttDay->ToString('DDD');
             $strDay = html_entity_decode($strDay, ENT_COMPAT, QApplication::$EncodingType);
             if (function_exists('mb_substr')) {
                 $strDay = mb_substr($strDay, 0, 2);
             } else {
                 // Attempt to account for multibyte day -- may not work if the third character is multibyte
                 $strDay = substr($strDay, 0, strlen($strDay) - 1);
             }
             $strDay = QApplication::HtmlEntities($strDay);
             $strDayArray[] = '"' . $strDay . '"';
             $dttDay->Day++;
         }
         $strArrays = sprintf('new Array(new Array(%s), new Array(%s), new Array(%s))', implode(', ', $strLongNameArray), implode(', ', $strShortNameArray), implode(', ', $strDayArray));
         $strToReturn .= sprintf('qc.regCAL("%s", "%s", "%s", "%s", %s); ', $this->strControlId, $this->dtxLinkedControl->ControlId, QApplication::Translate('Today'), QApplication::Translate('Cancel'), $strArrays);
     } else {
         $strToReturn .= sprintf('qc.regCAL("%s", "%s", "%s", "%s", null); ', $this->strControlId, $this->dtxLinkedControl->ControlId, QApplication::Translate('Today'), QApplication::Translate('Cancel'));
     }
     return $strToReturn;
 }
开发者ID:harshanurodh,项目名称:qcodo,代码行数:34,代码来源:QCalendar.class.php

示例2: GetEndScript

 public function GetEndScript()
 {
     $strId = $this->ControlId;
     $strJs = parent::GetEndScript();
     $strJs .= ';';
     $strJs .= "\$j('#{$strId}').change(function(event) {\n\t\t\tqcubed.setAdditionalPostVar('{$strId}_extra', {txt: \$j(this).val(), 'nullVal': null});\n\t\t\tqcubed.recordControlModification('{$strId}', 'Name', \$j(this).val());\n\t\t\t})";
     return $strJs;
 }
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:8,代码来源:ui_postvars.php

示例3: GetEndScript

 public function GetEndScript()
 {
     $strToReturn = parent::GetEndScript();
     $strUniqueHash = md5(microtime() . rand(0, 1000000));
     if ($this->blnVisible && !$this->strFilePath) {
         $strToReturn .= sprintf('qc.regFUP("%s", "%s", "%s"); ', $this->strControlId, QApplication::$RequestUri, $strUniqueHash);
     }
     return $strToReturn;
 }
开发者ID:sigeal,项目名称:qcodo,代码行数:9,代码来源:QFileUploader.class.php

示例4: GetEndScript

 public function GetEndScript()
 {
     $strToReturn = parent::GetEndScript();
     $strToReturn .= 'qc.regCAL("' . $this->strControlId . '","' . $this->dtxLinkedControl->ControlId . '"); ';
     return $strToReturn;
 }
开发者ID:sigeal,项目名称:qcodo,代码行数:6,代码来源:QCalendar.class.php

示例5: GetEndScript

 public function GetEndScript()
 {
     $str = '';
     if ($this->getJqControlId() !== $this->ControlId) {
         // #845: if the element receiving the jQuery UI events is different than this control
         // we need to clean-up the previously attached event handlers, so that they are not duplicated
         // during the next ajax update which replaces this control.
         $str = sprintf('jQuery("#%s").off(); ', $this->getJqControlId());
     }
     $str .= $this->GetControlJavaScript();
     if ($strParentScript = parent::GetEndScript()) {
         $str .= '; ' . $strParentScript;
     }
     return $str;
 }
开发者ID:tomVertuoz,项目名称:framework,代码行数:15,代码来源:QDraggableGen.class.php

示例6: GetEndScript

 public function GetEndScript()
 {
     $strToReturn = parent::GetEndScript();
     $strControlId = $this->strLinkUrl ? $this->strControlId . '_img' : $this->strControlId;
     if ($this->blnVisible && $this->mixImageHover) {
         $strToReturn .= sprintf('$j("#%s").hover(function(){$j("#%s").attr("src", "%s"); }, function(){$j("#%s").attr("src", "%s"); });', $strControlId, $strControlId, $this->mixImageHover instanceof QImageBase ? $this->mixImageHover->RenderAsImgSrc(false) : $this->mixImageHover, $strControlId, $this->mixImageStandard instanceof QImageBase ? $this->mixImageStandard->RenderAsImgSrc(false) : $this->mixImageStandard);
     }
     return $strToReturn;
 }
开发者ID:tomVertuoz,项目名称:framework,代码行数:9,代码来源:QImageRollover.class.php

示例7: GetEndScript

 public function GetEndScript()
 {
     $strToReturn = parent::GetEndScript();
     // MOVE TARGETS
     if (count($this->objMovesControlsArray)) {
         //				$strToReturn .= sprintf('qc.registerControlMoveHandle("%s"); ', $this->strControlId);
         $strToReturn .= sprintf('qc.regCMH("%s"); ', $this->strControlId);
         foreach ($this->objMovesControlsArray as $objControl) {
             //					$strToReturn .= sprintf('qc.getWrapper("%s").registerMoveTarget("%s"); ', $this->strControlId, $objControl->ControlId);
             $strToReturn .= sprintf('qc.getW("%s").regMT("%s"); ', $this->strControlId, $objControl->ControlId);
         }
     }
     // DROP ZONES
     foreach ($this->objDropsControlsArray as $strKey => $blnIsDropZone) {
         if ($blnIsDropZone) {
             //					$strToReturn .= sprintf('qc.getWrapper("%s").registerDropZone("%s"); ', $this->strControlId, $strKey);
             $strToReturn .= sprintf('qc.getW("%s").regDZ("%s"); ', $this->strControlId, $strKey);
         }
     }
     foreach ($this->objIsDropZoneFor as $strKey => $blnIsDropZone) {
         if ($blnIsDropZone) {
             $objControl = $this->objForm->GetControl($strKey);
             if ($objControl && $objControl->strRenderMethod) {
                 //						$strToReturn .= sprintf('qc.registerControlMoveHandle("%s"); qc.getWrapper("%s").registerDropZone("%s"); ', $strKey, $strKey, $this->strControlId);
                 $strToReturn .= sprintf('qc.regCMH("%s"); qc.getW("%s").regDZ("%s"); ', $strKey, $strKey, $this->strControlId);
             }
         }
     }
     foreach ($this->objDropsGroupingsArray as $strKey => $blnIsDropZone) {
         if ($blnIsDropZone) {
             $strToReturn .= sprintf('qc.getW("%s").regDZG("%s");', $this->strControlId, $strKey);
         }
     }
     // ResizeHandle
     // regCRH is a shortcut for registerControlResizeHandle
     // setUC = setUpperControl
     // setLC = setLowerControl
     if ($this->strResizeHandleDirection == QResizeHandleDirection::Vertical || $this->strResizeHandleDirection == QResizeHandleDirection::Horizontal) {
         if ($this->strResizeHandleDirection == QResizeHandleDirection::Vertical) {
             $strToReturn .= sprintf('qc.regCRH("%s", true);', $this->strControlId);
         } else {
             $strToReturn .= sprintf('qc.regCRH("%s", false);', $this->strControlId);
         }
         foreach ($this->objUpperResizeControlsArray as $objBlockControl) {
             $strToReturn .= sprintf('qc.getW("%s").setUC("%s");', $this->strControlId, $objBlockControl->strControlId);
         }
         foreach ($this->objLowerResizeControlsArray as $objBlockControl) {
             $strToReturn .= sprintf('qc.getW("%s").setLC("%s");', $this->strControlId, $objBlockControl->strControlId);
         }
         if (!is_null($this->intResizeHandleMinimum)) {
             $strToReturn .= sprintf('qc.getW("%s").setReMi("%s");', $this->strControlId, $this->intResizeHandleMinimum);
         } else {
             $strToReturn .= sprintf('qc.getW("%s").setReMi(null);', $this->strControlId);
         }
         if (!is_null($this->intResizeHandleMaximum)) {
             $strToReturn .= sprintf('qc.getW("%s").setReMa("%s");', $this->strControlId, $this->intResizeHandleMaximum);
         } else {
             $strToReturn .= sprintf('qc.getW("%s").setReMa(null);', $this->strControlId);
         }
     }
     return $strToReturn;
 }
开发者ID:klucznik,项目名称:qcodo,代码行数:62,代码来源:QBlockControl.class.php

示例8: GetEndScript

 /**
  * @return string
  */
 public function GetEndScript()
 {
     \QApplication::ExecuteControlCommand($this->ControlId, 'on', 'click', 'li', new \QJsClosure("qcubed.recordControlModification ('{$this->ControlId}', 'SelectedId', this.id); jQuery(this).trigger ('bsmenubarselect', this.id)"), \QJsPriority::High);
     return parent::GetEndScript();
 }
开发者ID:qcubed,项目名称:plugin_bootstrap,代码行数:8,代码来源:Navbar.php

示例9: GetEndScript

 /**
  * Returns the End Script of the Control which is sent to the client when the control's Render is complete
  * @return string The JS EndScript for the control
  */
 public function GetEndScript()
 {
     $strToReturn = parent::GetEndScript();
     // DROP ZONES
     foreach ($this->objDropsControlsArray as $strKey => $blnIsDropZone) {
         if ($blnIsDropZone) {
             $strToReturn .= sprintf('$j("#%s").droppable(); ', $strKey);
         }
     }
     foreach ($this->objIsDropZoneFor as $strKey => $blnIsDropZone) {
         if ($blnIsDropZone) {
             $objControl = $this->objForm->GetControl($strKey);
             if ($objControl && $objControl->strRenderMethod) {
                 $strToReturn .= sprintf('$j("#%s").droppable("option", "accept", "#%s");', $this->strControlId, $strKey);
             }
         }
     }
     return $strToReturn;
 }
开发者ID:tomVertuoz,项目名称:framework,代码行数:23,代码来源:QBlockControl.class.php

示例10: GetEndScript

 /**
  * Returns the script that attaches the JQueryUI widget to the html object.
  *
  * @return string
  */
 public function GetEndScript()
 {
     $strId = $this->GetJqControlId();
     $jqOptions = $this->makeJqOptions();
     $strFunc = $this->getJqSetupFunction();
     if ($strId !== $this->ControlId && QApplication::$RequestMode == QRequestMode::Ajax) {
         // If events are not attached to the actual object being drawn, then the old events will not get
         // deleted during redraw. We delete the old events here. This must happen before any other event processing code.
         QApplication::ExecuteControlCommand($strId, 'off', QJsPriority::High);
     }
     // Attach the javascript widget to the html object
     if (empty($jqOptions)) {
         QApplication::ExecuteControlCommand($strId, $strFunc, QJsPriority::High);
     } else {
         QApplication::ExecuteControlCommand($strId, $strFunc, $jqOptions, QJsPriority::High);
     }
     return parent::GetEndScript();
 }
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:23,代码来源:QResizableGen.class.php

示例11: GetEndScript

 /**
  * Returns the End Script of the Control which is sent to the client when the control's Render is complete
  * @return string The JS EndScript for the control
  */
 public function GetEndScript()
 {
     $strToReturn = parent::GetEndScript();
     // DROP ZONES
     foreach ($this->objDropsControlsArray as $strKey => $blnIsDropZone) {
         if ($blnIsDropZone) {
             QApplication::ExecuteControlCommand($strKey, 'droppable');
         }
     }
     foreach ($this->objIsDropZoneFor as $strKey => $blnIsDropZone) {
         if ($blnIsDropZone) {
             $objControl = $this->objForm->GetControl($strKey);
             if ($objControl && $objControl->strRenderMethod) {
                 QApplication::ExecuteControlCommand($this->strControlId, 'droppable', 'option', 'accept', '#' . $strKey);
             }
         }
     }
     return $strToReturn;
 }
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:23,代码来源:QBlockControl.class.php

示例12: GetEndScript

 /**
  * Returns all Javscript that needs to be executed after rendering of this control
  * (It overrides the GetEndScript of the parent to handle specific case of QJsTimers)
  * @return string
  */
 public function GetEndScript()
 {
     if ($this->objForm->CallType == QCallType::Server) {
         //this point is not reached on initial rendering
         if ($this->blnRestartOnServerAction && $this->intState === QJsTimer::Started) {
             $this->Start();
         } else {
             $this->intState = QJsTimer::Stopped;
         }
     }
     return parent::GetEndScript();
 }
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:17,代码来源:QJsTimerBase.class.php

示例13: GetEndScript

 public function GetEndScript()
 {
     $strToReturn = parent::GetEndScript();
     if ($this->blnVisible && $this->mixImageHover) {
         $strToReturn .= sprintf('qc.regIR("%s", "%s", "%s", %s); ', $this->strControlId, $this->mixImageStandard instanceof QImageBase ? $this->mixImageStandard->RenderAsImgSrc(false) : $this->mixImageStandard, $this->mixImageHover instanceof QImageBase ? $this->mixImageHover->RenderAsImgSrc(false) : $this->mixImageHover, $this->strLinkUrl ? 'true' : 'false');
     }
     return $strToReturn;
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:8,代码来源:QImageRollover.class.php

示例14: GetEndScript

 public function GetEndScript()
 {
     $strToReturn = parent::GetEndScript();
     $strToReturn .= sprintf('qc.registerTextBox("%s"); ', $this->strControlId);
     return $strToReturn;
 }
开发者ID:klucznik,项目名称:qcodo,代码行数:6,代码来源:QTextBoxBase.class.php


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