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


PHP QApplication::IsBrowser方法代码示例

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


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

示例1: __construct

 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)));
     }
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:16,代码来源:QTextBoxBase.class.php

示例2: GetDataGridRowHtml

 protected function GetDataGridRowHtml($objObject)
 {
     // Get the Default Style
     $objStyle = $this->objRowStyle;
     // Iterate through the Columns
     $strColumnsHtml = '';
     foreach ($this->objColumnArray as $objColumn) {
         try {
             $strHtml = $this->ParseColumnHtml($objColumn, $objObject);
             if ($objColumn->HtmlEntities) {
                 $strHtml = QApplication::HtmlEntities($strHtml);
             }
             // For IE
             if (QApplication::IsBrowser(QBrowserType::InternetExplorer) && $strHtml == '') {
                 $strHtml = ' ';
             }
         } catch (QCallerException $objExc) {
             $objExc->IncrementOffset();
             throw $objExc;
         }
         $strColumnsHtml .= sprintf('<td %s>%s</td>', $objColumn->GetAttributes(), $strHtml);
     }
     // Add an extra empty column to go underneath the Column Toggle Button
     if ($this->ShowColumnToggle || $this->ShowExportCsv) {
         // This is nasty - cloning the original object just to reset the display to true and get the attributes
         // There must be a better way to do this, but it gets the job done for now
         // Also, for inclusion in Qcodo, this might not be what you want to do. What if the last column has weird attributes, and they should go back to normal?
         // But you can't include the RowStyle because there are things in a RowStyle that don't work on cells
         $objNewColumn = clone $objColumn;
         $objNewColumn->Display = true;
         $objNewColumn->Width = null;
         $strColumnsHtml .= sprintf('<td %s>&nbsp;</td>', $objNewColumn->GetAttributes());
     }
     // Apply AlternateRowStyle (if applicable)
     if ($this->intCurrentRowIndex % 2 == 1) {
         $objStyle = $objStyle->ApplyOverride($this->objAlternateRowStyle);
     }
     // Apply any Style Override (if applicable)
     if (is_array($this->objOverrideRowStyleArray) && array_key_exists($this->intCurrentRowIndex, $this->objOverrideRowStyleArray) && !is_null($this->objOverrideRowStyleArray[$this->intCurrentRowIndex])) {
         $objStyle = $objStyle->ApplyOverride($this->objOverrideRowStyleArray[$this->intCurrentRowIndex]);
     }
     // Finish up
     $strToReturn = sprintf('<tr %s>%s</tr>', $objStyle->GetAttributes(), $strColumnsHtml);
     $this->intCurrentRowIndex++;
     return $strToReturn;
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:46,代码来源:QDataGrid.class.php

示例3: RenderCell

 public function RenderCell($item, $blnAsHeader = false)
 {
     $cellValue = $this->FetchCellValue($item);
     if ($this->blnHtmlEntities) {
         $cellValue = QApplication::HtmlEntities($cellValue);
     }
     if ($cellValue == '' && QApplication::IsBrowser(QBrowserType::InternetExplorer)) {
         $cellValue = '&nbsp;';
     }
     if ($blnAsHeader) {
         if ($this->strHeaderCssClass) {
             return '<th class="' . $this->strHeaderCssClass . '">' . $cellValue . '</th>';
         }
         return '<th>' . $cellValue . '</th>';
     } else {
         if ($this->strCssClass) {
             return '<td class="' . $this->strCssClass . '">' . $cellValue . '</td>';
         }
         return '<td>' . $cellValue . '</td>';
     }
 }
开发者ID:hiptc,项目名称:dle2wordpress,代码行数:21,代码来源:QSimpleTableColumn.class.php

示例4: GetStyleAttributes

 public function GetStyleAttributes()
 {
     $strToReturn = "";
     if ($this->strWidth) {
         if (is_numeric($this->strWidth)) {
             $strToReturn .= sprintf("width:%spx;", $this->strWidth);
         } else {
             $strToReturn .= sprintf("width:%s;", $this->strWidth);
         }
     }
     if ($this->strHeight) {
         if (is_numeric($this->strHeight)) {
             $strToReturn .= sprintf("height:%spx;", $this->strHeight);
         } else {
             $strToReturn .= sprintf("height:%s;", $this->strHeight);
         }
     }
     if ($this->strDisplayStyle && $this->strDisplayStyle != QDisplayStyle::NotSet) {
         $strToReturn .= sprintf("display:%s;", $this->strDisplayStyle);
     }
     if ($this->strForeColor) {
         $strToReturn .= sprintf("color:%s;", $this->strForeColor);
     }
     if ($this->strBackColor) {
         $strToReturn .= sprintf("background-color:%s;", $this->strBackColor);
     }
     if ($this->strBorderColor) {
         $strToReturn .= sprintf("border-color:%s;", $this->strBorderColor);
     }
     if (strlen(trim($this->strBorderWidth)) > 0) {
         $strBorderWidth = null;
         try {
             $strBorderWidth = QType::Cast($this->strBorderWidth, QType::Integer);
         } catch (QInvalidCastException $objExc) {
         }
         if (is_null($strBorderWidth)) {
             $strToReturn .= sprintf('border-width:%s;', $this->strBorderWidth);
         } else {
             $strToReturn .= sprintf('border-width:%spx;', $this->strBorderWidth);
         }
         if (!$this->strBorderStyle || $this->strBorderStyle == QBorderStyle::NotSet) {
             // For "No Border Style" -- apply a "solid" style because width is set
             $strToReturn .= "border-style:solid;";
         }
     }
     if ($this->strBorderStyle && $this->strBorderStyle != QBorderStyle::NotSet) {
         $strToReturn .= sprintf("border-style:%s;", $this->strBorderStyle);
     }
     if ($this->strFontNames) {
         $strToReturn .= sprintf("font-family:%s;", $this->strFontNames);
     }
     if ($this->strFontSize) {
         if (is_numeric($this->strFontSize)) {
             $strToReturn .= sprintf("font-size:%spx;", $this->strFontSize);
         } else {
             $strToReturn .= sprintf("font-size:%s;", $this->strFontSize);
         }
     }
     if ($this->blnFontBold) {
         $strToReturn .= "font-weight:bold;";
     }
     if ($this->blnFontItalic) {
         $strToReturn .= "font-style:italic;";
     }
     $strTextDecoration = "";
     if ($this->blnFontUnderline) {
         $strTextDecoration .= "underline ";
     }
     if ($this->blnFontOverline) {
         $strTextDecoration .= "overline ";
     }
     if ($this->blnFontStrikeout) {
         $strTextDecoration .= "line-through ";
     }
     if ($strTextDecoration) {
         $strTextDecoration = trim($strTextDecoration);
         $strToReturn .= sprintf("text-decoration:%s;", $strTextDecoration);
     }
     if ($this->strCursor && $this->strCursor != QCursor::NotSet) {
         $strToReturn .= sprintf("cursor:%s;", $this->strCursor);
     }
     if ($this->strOverflow && $this->strOverflow != QOverflow::NotSet) {
         $strToReturn .= sprintf("overflow:%s;", $this->strOverflow);
     }
     if (!is_null($this->intOpacity)) {
         if (QApplication::IsBrowser(QBrowserType::InternetExplorer)) {
             $strToReturn .= sprintf('filter:alpha(opacity=%s);', $this->intOpacity);
         } else {
             $strToReturn .= sprintf('opacity:%s;', $this->intOpacity / 100.0);
         }
     }
     if ($this->strCustomStyleArray) {
         foreach ($this->strCustomStyleArray as $strKey => $strValue) {
             $strToReturn .= sprintf('%s:%s;', $strKey, $strValue);
         }
     }
     return $strToReturn;
 }
开发者ID:qcodo,项目名称:qcodo,代码行数:98,代码来源:QControlBase.class.php

示例5: GetDataGridRowHtml

 protected function GetDataGridRowHtml($objObject)
 {
     // Get the Default Style
     $objStyle = $this->objRowStyle;
     // Iterate through the Columns
     $strColumnsHtml = '';
     $intColumnIndex = 0;
     foreach ($this->objColumnArray as $objColumn) {
         try {
             $strHtml = $this->ParseColumnHtml($objColumn, $objObject);
             if ($objColumn->HtmlEntities) {
                 $strHtml = QApplication::HtmlEntities($strHtml);
             }
             // For IE
             if (QApplication::IsBrowser(QBrowserType::InternetExplorer) && $strHtml == '') {
                 $strHtml = '&nbsp;';
             }
         } catch (QCallerException $objExc) {
             $objExc->IncrementOffset();
             throw $objExc;
         }
         $strColumnsHtml .= sprintf("    <td id=\"%s_row%s_%s\" %s>%s</td>\r\n", $this->strControlId, $this->intCurrentRowIndex, $intColumnIndex, $objColumn->GetAttributes(), $strHtml);
         $intColumnIndex++;
     }
     // Apply AlternateRowStyle (if applicable)
     if ($this->intCurrentRowIndex % 2 == 1) {
         $objStyle = $objStyle->ApplyOverride($this->objAlternateRowStyle);
     }
     // Apply any Style Override (if applicable)
     if (is_array($this->objOverrideRowStyleArray) && array_key_exists($this->intCurrentRowIndex, $this->objOverrideRowStyleArray) && !is_null($this->objOverrideRowStyleArray[$this->intCurrentRowIndex])) {
         $objStyle = $objStyle->ApplyOverride($this->objOverrideRowStyleArray[$this->intCurrentRowIndex]);
     }
     // Finish up
     $strToReturn = sprintf("  <tr id=\"%s_row%s\" %s>\r\n%s  </tr>\r\n", $this->strControlId, $this->intCurrentRowIndex, $objStyle->GetAttributes(), $strColumnsHtml);
     $this->intCurrentRowIndex++;
     return $strToReturn;
 }
开发者ID:qcodo,项目名称:qcodo-website,代码行数:37,代码来源:QDataGridBase.class.php

示例6: RenderScript

 public function RenderScript(QControl $objControl)
 {
     if (QApplication::IsBrowser(QBrowserType::InternetExplorer_6_0)) {
         return sprintf('qcodo.terminateEvent(event);', $objControl->ControlId);
     } else {
         return sprintf('return false;', $objControl->ControlId);
     }
     //			return 'return qc.terminatesEvent(event);';
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:9,代码来源:_actions.inc.php

示例7: Groups

?>
" />
		<title>Growth Groups (Abundant Life Christian Fellowship)</title>
		<script type="text/javascript" src="/assets/js/_core/_qc_packed.js"></script>
		<style type="text/css">@import url("/scripts/styles.css");</style>
		<style type="text/css">@import url("/scripts/ark.css");</style>
	</head><body style="background-image:url(/images/bkgd_GG.png)" >

	<div style="width: 100%; height: 100px; border-top: 1px solid #321;">
		<div style="width: 980px; margin: auto;">
			<a href="http://www.alcf.net/" title="ALCF Home"><div style="width: 250px; cursor: pointer; background: url(/images/alcf_logo_full.png) no-repeat; height: 80px; float: left; margin-top:20px; ">
				&nbsp;
			</div></a>
			<div style="float: left;  padding-top: 10px;">
				<img src="/images/GG_register_title.png"></img>
			</div>	
		</div>
<?php 
if (!QApplication::IsBrowser(QBrowserType::InternetExplorer)) {
    ?>
		<br clear="all"/>
<?php 
}
?>
	</div>

	<div style="width: 980px; margin: auto; padding: 16px 0 16px 0;">
<?php 
if (isset($this)) {
    $this->RenderBegin();
}
开发者ID:alcf,项目名称:chms,代码行数:31,代码来源:header_growthgroup_register.inc.php

示例8: RenderCell

 /**
  * Render a cell. 
  * 
  * Called by data table for each cell. Override and call with $blnHeader = true if you want
  * this individual cell to render with <<th>> tags instead of <<td>>.
  * 
  * @param mixed $item
  * @param boolean $blnAsHeader
  */
 public function RenderCell($item, $blnAsHeader = false)
 {
     $cellValue = $this->FetchCellValue($item);
     if ($this->blnHtmlEntities) {
         $cellValue = QApplication::HtmlEntities($cellValue);
     }
     if ($cellValue == '' && QApplication::IsBrowser(QBrowserType::InternetExplorer)) {
         $cellValue = '&nbsp;';
     }
     if ($blnAsHeader || $this->blnRenderAsHeader) {
         $tag = 'th';
     } else {
         $tag = 'td';
     }
     $strToReturn = '<' . $tag;
     $aParams = $this->GetCellParams($item);
     foreach ($aParams as $key => $str) {
         $strToReturn .= ' ' . $key . '="' . $str . '"';
     }
     $strToReturn .= '>' . $cellValue . '</' . $tag . '>';
     return $strToReturn;
 }
开发者ID:tomVertuoz,项目名称:framework,代码行数:31,代码来源:QSimpleTableColumn.class.php

示例9: GetDataGridRowHtml

 protected function GetDataGridRowHtml($objObject)
 {
     // Get the Default Style
     $objStyle = $this->objRowStyle;
     // Iterate through the Columns
     $strColumnsHtml = '';
     foreach ($this->objColumnArray as $objColumn) {
         try {
             $strHtml = $this->ParseColumnHtml($objColumn, $objObject);
             if ($objColumn->HtmlEntities) {
                 $strHtml = QApplication::HtmlEntities($strHtml);
             }
             // For IE
             if (QApplication::IsBrowser(QBrowserType::InternetExplorer) && $strHtml == '') {
                 $strHtml = '&nbsp;';
             }
         } catch (QCallerException $objExc) {
             $objExc->IncrementOffset();
             throw $objExc;
         }
         $strColumnsHtml .= sprintf("    <td %s>%s</td>\r\n", $objColumn->GetAttributes(), $strHtml);
     }
     // Apply AlternateRowStyle (if applicable)
     if ($this->intCurrentRowIndex % 2 == 1) {
         $objStyle = $objStyle->ApplyOverride($this->objAlternateRowStyle);
     }
     // Apply any Style Override (if applicable)
     if (is_array($this->objOverrideRowStyleArray) && array_key_exists($this->intCurrentRowIndex, $this->objOverrideRowStyleArray) && !is_null($this->objOverrideRowStyleArray[$this->intCurrentRowIndex])) {
         $objStyle = $objStyle->ApplyOverride($this->objOverrideRowStyleArray[$this->intCurrentRowIndex]);
     }
     // Make the event string
     $strTrId = sprintf("%srow%s", $this->strControlId, $this->intCurrentRowIndex);
     $numEvents = count($this->objRowEventArray);
     if ($numEvents > 0) {
         $this->RemoveChildControl($strTrId, true);
         $objRow = new QDataGridRow($this, $strTrId);
         // add all the row actions to this proxy
         for ($i = 0; $i < $numEvents; ++$i) {
             $objRow->AddAction($this->objRowEventArray[$i], $this->objRowActionArray[$i]);
         }
         $objRow->Style = $objStyle;
         // parse the action parameter
         $objRow->ActionParameter = QDataGridBase::ParseHtml($this->strRowActionParameterHtml, $this, null, $objObject);
         $strToReturn = $objRow->GetHtml($strColumnsHtml);
         QApplication::ExecuteJavaScript($objRow->GetActionAttributes());
     } else {
         // If there are no events, don't create any row controls'
         // Finish up
         $strToReturn = sprintf('<tr id="%s" %s>%s</tr>', $strTrId, $objStyle->GetAttributes(), $strColumnsHtml);
     }
     $this->intCurrentRowIndex++;
     return $strToReturn;
 }
开发者ID:hiptc,项目名称:dle2wordpress,代码行数:53,代码来源:QDataGridBase.class.php

示例10: GetStyleAttributes

 /**
  * Returns all style-attributes
  *
  * Similar to GetAttributes, but specifically for CSS name/value pairs that will render
  * within a control's HTML "style" attribute
  *
  * <code>
  * <?php
  * $txtTextbox = new Textbox("txtTextbox");
  * $txtTextbox->SetCustomStyle("white-space", "nowrap");
  * $txtTextbox->SetCustomStyle("margin", "10px");
  * $txtTextBox->Height = 20;
  * $txtTextBox->GetStyleAttributes();
  * ?>
  * will return:
  * white-space:nowrap;margin:10px;height:20px;
  *
  * @return string
  */
 public function GetStyleAttributes()
 {
     $strToReturn = "";
     if (strlen(trim($this->strWidth)) > 0) {
         $strToReturn .= sprintf('width:%s;', QCss::FormatLength($this->strWidth));
     }
     if (strlen(trim($this->strHeight)) > 0) {
         $strToReturn .= sprintf('height:%s;', QCss::FormatLength($this->strHeight));
     }
     if ($this->blnUseWrapper) {
         if ($this->strDisplayStyle && $this->strDisplayStyle != QDisplayStyle::NotSet) {
             $strToReturn .= sprintf("display:%s;", $this->strDisplayStyle);
         }
     } else {
         if ($this->blnDisplay && $this->strDisplayStyle && $this->strDisplayStyle != QDisplayStyle::NotSet) {
             //only apply a display style if it should be displayed and a style is set
             //in case of blnDisplay == false the "display:none;" is set in GetWrapperStyleAttributes
             $strToReturn .= sprintf("display:%s;", $this->strDisplayStyle);
         }
         $strToReturn .= $this->GetWrapperStyleAttributes();
     }
     if ($this->strForeColor) {
         $strToReturn .= sprintf("color:%s;", $this->strForeColor);
     }
     if ($this->strBackColor) {
         $strToReturn .= sprintf("background-color:%s;", $this->strBackColor);
     }
     if ($this->strBorderColor) {
         $strToReturn .= sprintf("border-color:%s;", $this->strBorderColor);
     }
     if (strlen(trim($this->strBorderWidth)) > 0) {
         $strToReturn .= sprintf('border-width:%s;', QCss::FormatLength($this->strBorderWidth));
         if (!$this->strBorderStyle || $this->strBorderStyle == QBorderStyle::NotSet) {
             // For "No Border Style" -- apply a "solid" style because width is set
             $strToReturn .= "border-style:solid;";
         }
     }
     if ($this->strBorderStyle && $this->strBorderStyle != QBorderStyle::NotSet) {
         $strToReturn .= sprintf("border-style:%s;", $this->strBorderStyle);
     }
     if ($this->strFontNames) {
         $strToReturn .= sprintf("font-family:%s;", $this->strFontNames);
     }
     if ($this->strFontSize) {
         if (is_numeric($this->strFontSize)) {
             $strToReturn .= sprintf("font-size:%spx;", $this->strFontSize);
         } else {
             $strToReturn .= sprintf("font-size:%s;", $this->strFontSize);
         }
     }
     if ($this->blnFontBold) {
         $strToReturn .= "font-weight:bold;";
     }
     if ($this->blnFontItalic) {
         $strToReturn .= "font-style:italic;";
     }
     $strTextDecoration = "";
     if ($this->blnFontUnderline) {
         $strTextDecoration .= "underline ";
     }
     if ($this->blnFontOverline) {
         $strTextDecoration .= "overline ";
     }
     if ($this->blnFontStrikeout) {
         $strTextDecoration .= "line-through ";
     }
     if ($strTextDecoration) {
         $strTextDecoration = trim($strTextDecoration);
         $strToReturn .= sprintf("text-decoration:%s;", $strTextDecoration);
     }
     if ($this->strCursor && $this->strCursor != QCursor::NotSet) {
         $strToReturn .= sprintf("cursor:%s;", $this->strCursor);
     }
     if ($this->strOverflow && $this->strOverflow != QOverflow::NotSet) {
         $strToReturn .= sprintf("overflow:%s;", $this->strOverflow);
     }
     if (!is_null($this->intOpacity)) {
         if (QApplication::IsBrowser(QBrowserType::InternetExplorer)) {
             $strToReturn .= sprintf('filter:alpha(opacity=%s);', $this->intOpacity);
         } else {
             $strToReturn .= sprintf('opacity:%s;', $this->intOpacity / 100.0);
//.........这里部分代码省略.........
开发者ID:hiptc,项目名称:dle2wordpress,代码行数:101,代码来源:QControlBase.class.php

示例11: RenderActionScripts

 /**
  * Returns all action attributes
  * @return string
  */
 public function RenderActionScripts()
 {
     $strToReturn = $this->callbackString() . " = ";
     if (!count($this->objActionArray)) {
         return $strToReturn . 'null;';
     }
     $strToReturn .= 'function() {';
     foreach (reset($this->objActionArray) as $objAction) {
         /** @var QAction $objAction */
         $strToReturn .= ' ' . $objAction->RenderScript($this);
     }
     if ($this->ActionsMustTerminate) {
         if (QApplication::IsBrowser(QBrowserType::InternetExplorer_6_0)) {
             $strToReturn .= ' qc.terminateEvent(event);';
         } else {
             $strToReturn .= ' return false;';
         }
     }
     $strToReturn .= ' }; ';
     return $strToReturn;
 }
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:25,代码来源:QJsTimerBase.class.php

示例12: RenderCell

 /**
  * Render a cell.
  * Called by data table for each cell. Override and call with $blnHeader = true if you want
  * this individual cell to render with <<th>> tags instead of <<td>>.
  *
  * @param mixed   $item
  * @param boolean $blnAsHeader
  *
  * @return string
  */
 public function RenderCell($item, $blnAsHeader = false)
 {
     if (!$this->blnVisible) {
         return '';
     }
     $cellValue = $this->FetchCellValue($item);
     if ($this->blnHtmlEntities) {
         $cellValue = QApplication::HtmlEntities($cellValue);
     }
     if ($cellValue == '' && QApplication::IsBrowser(QBrowserType::InternetExplorer)) {
         $cellValue = '&nbsp;';
     }
     if ($blnAsHeader || $this->blnRenderAsHeader) {
         $strTag = 'th';
     } else {
         $strTag = 'td';
     }
     return QHtml::RenderTag($strTag, $this->GetCellParams($item), $cellValue);
 }
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:29,代码来源:QHtmlTableColumn.class.php


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