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


PHP vmCommonHTML::scriptTag方法代码示例

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


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

示例1: sprintf

		$text = $VM_LANG->_('VM_LEGALINFO_SHORTTEXT');
	} else {
		$text = VM_ONCHECKOUT_LEGALINFO_SHORTTEXT;
	}
	?>
    <div class="legalinfo"><?php
    	echo sprintf( $text, $link, $jslink );
    	?>
    </div><br />
    <?php
	}
    ?>
<div>
<input type="submit" onclick="return( submit_order( this.form ) );" class="button" name="formSubmit" value="<?php echo $VM_LANG->_('PHPSHOP_ORDER_CONFIRM_MNU') ?>" />
</div>
<?php
if(  PSHOP_AGREE_TO_TOS_ONORDER == '1' ) {
	echo vmCommonHTML::scriptTag('', "function submit_order( form ) {
    if (!form.agreed.checked) {
        alert( \"". $VM_LANG->_('PHPSHOP_AGREE_TO_TOS',false) ."\" );
        return false;
    }
    else {
        return true;
    }
}" );
} else {
	echo vmCommonHTML::scriptTag('', "function submit_order( form ) { return true;  }" );
}
?>
开发者ID:rubengarcia0510,项目名称:tienda,代码行数:30,代码来源:get_final_confirmation.tpl.php

示例2: updateFunc

$db->sp("function_description");
?>
</textarea>
      </td>
    </tr>
   
  </table>
<?php 
// Add necessary hidden fields
$formObj->hiddenField('function_id', $function_id);
$formObj->hiddenField('module_id', $module_id);
$funcname = !empty($function_id) ? "functionUpdate" : "functionAdd";
// Write your form with mixed tags and text fields
// and finally close the form:
$formObj->finishForm($funcname, 'admin.function_list', $option);
$script = 'function updateFunc(){
	var el = $("function_class" );
	new Ajax( "' . $_SERVER['PHP_SELF'] . '?" + $(document.adminForm).toQueryString() + "&func=&page=admin.ajax_tools&task=get_class_methods&class=" + el.options[el.selectedIndex].value + "&function=" + document.adminForm.function_method.value,
				{ 
				method: "get",
				update: $("function_method_container")
				}).request();

		return false;
	}
	
	$("function_class").onchange = function() { updateFunc() };
	updateFunc();
';
echo vmCommonHTML::scriptTag('', $script);
开发者ID:BackupTheBerlios,项目名称:kmit-svn,代码行数:30,代码来源:admin.function_form.php

示例3: vmCategoryTree

echo vmCommonHTML::scriptTag('', 'var ctThemeXPBase = "' . $js_src . '/ThemeXP/";');
if ($jscook_type == "tree") {
    if ($jscookTree_style == "ThemeXP") {
        $jscook_tree = "ctThemeXP1";
    }
    if ($jscookTree_style == "ThemeNavy") {
        $jscook_tree = "ctThemeNavy";
    }
    echo vmCommonHTML::scriptTag($js_src . '/JSCookTree.js');
    echo vmCommonHTML::linkTag($js_src . "/{$jscookTree_style}/theme.css");
    echo vmCommonHTML::scriptTag($js_src . "/{$jscookTree_style}/theme.js");
    $vm_jscook = new vmCategoryTree();
} else {
    echo vmCommonHTML::scriptTag($mosConfig_live_site . '/includes/js/JSCookMenu.js');
    echo vmCommonHTML::linkTag($mosConfig_live_site . "/includes/js/{$jscookMenu_style}/theme.css");
    echo vmCommonHTML::scriptTag($mosConfig_live_site . "/includes/js/{$jscookMenu_style}/theme.js");
    $vm_jscook = new vmCategoryMenu();
}
// create a unique tree identifier, in case multiple trees are used
// (max one per module)
$varname = "JSCook_" . uniqid($jscook_type . "_");
$menu_htmlcode = "<div align=\"left\" class=\"mainlevel\" id=\"div_{$varname}\"></div>\r\n<script type=\"text/javascript\"><!--\r\nvar {$varname} = \r\n[\r\n";
$vm_jscook->traverse_tree_down($menu_htmlcode);
$menu_htmlcode .= "];\r\n";
if ($jscook_type == "tree") {
    $menu_htmlcode .= "var treeindex = ctDraw ('div_{$varname}', {$varname}, {$jscook_tree}, '{$jscookTree_style}', 0, 0);";
} else {
    $menu_htmlcode .= "cmDraw ('div_{$varname}', {$varname}, '{$menu_orientation}', cm{$jscookMenu_style}, '{$jscookMenu_style}');";
}
$menu_htmlcode .= "\r\n--></script>\n";
if ($jscook_type == "tree") {
开发者ID:albertobraschi,项目名称:Hab,代码行数:31,代码来源:vm_JSCook.php

示例4:

<?php 
}
?>

<?php 
include PAGEPATH . 'checkout_register_form.php';
?>

<?php 
if ($show_login) {
    ?>
   </div>
   <br />
   
<?php 
    echo vmCommonHTML::scriptTag('', 'Window.onDomReady(function() {
	
	// get accordion elements
	myStretch = $$( \'.toggler\' );
	myStretcher = $$( \'.stretcher\' );
	
	// Create the accordion
	myAccordion = new Fx.Accordion(myStretch, myStretcher, 
		{
			/*fixedHeight: 125,*/
			opacity : true,
			display: ' . $open_to_stretcher . '
		});

});');
}
开发者ID:BackupTheBerlios,项目名称:kmit-svn,代码行数:31,代码来源:login_registration.tpl.php

示例5: function

    if ($vmLayout != 'extended') {
        echo '<br style="clear:both;"/><div class="smallgrey" align="center">' . $VMVERSION->PRODUCT . ' ' . $VMVERSION->RELEASE . ' (<a href="http://virtuemart.net/index2.php?option=com_versions&amp;catid=1&amp;myVersion=' . @$VMVERSION->RELEASE . '" onclick="javascript:void window.open(this.href, \'win2\', \'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=580,directories=no,location=no\'); return false;" title="' . $VM_LANG->_('VM_VERSIONCHECK_TITLE') . '" target="_blank">' . $VM_LANG->_('VM_VERSIONCHECK_NOW') . '</a>)</div>';
    }
    if (DEBUG == '1' && $no_menu != 1) {
        // Load PAGE
        include PAGEPATH . "shop.debug.php";
    }
    if ($vmLayout == 'extended') {
        echo '</div>';
        if (stristr($page, '_list') && $page != 'product.file_list') {
            echo vmCommonHTML::scriptTag('', 'var listItemClicked = function(e){
        // find the <a> element that was clicked
        var a = e.getTarget("a");
       try {
	        if(a && !a.onclick && a.href.indexOf("javascript:") == -1 && a.href.indexOf("func=") == -1 ) {
	            e.preventDefault();
	            parent.addSimplePanel( a.title != "" ? a.title : a.innerHTML, a.href );
	   		}  
	    } catch(e) {}
	};
	
	Ext.get("vmPage").mon("click", listItemClicked );');
        }
    } else {
        echo '</td></tr></table>';
    }
}
// Render the script and style resources into the document head
$vm_mainframe->close();
?>

<div style="border-top: 1px solid #eee; text-align:center; padding:3px;">
开发者ID:patricmutwiri,项目名称:joomlaclube,代码行数:32,代码来源:admin.virtuemart.php

示例6: formFactory

$formObj =& new formFactory($VM_LANG->_('PHPSHOP_PRODUCT_DISCOUNT_ADDEDIT'));
//Then Start the form
$formObj->startForm();
$discount_id = vmGet($_REQUEST, 'discount_id', null);
$option = empty($option) ? vmGet($_REQUEST, 'option', 'com_virtuemart') : $option;
if (!empty($discount_id)) {
    $q = "SELECT * FROM #__{vm}_product_discount WHERE discount_id='{$discount_id}'";
    $db->query($q);
    $db->next_record();
}
echo vmCommonHTML::scriptTag($mosConfig_live_site . '/includes/js/calendar/calendar.js');
if (class_exists('JConfig')) {
    // in Joomla 1.5, the name of calendar lang file is changed...
    echo vmCommonHTML::scriptTag($mosConfig_live_site . '/includes/js/calendar/lang/calendar-en-GB.js');
} else {
    echo vmCommonHTML::scriptTag($mosConfig_live_site . '/includes/js/calendar/lang/calendar-en.js');
}
echo vmCommonHTML::linkTag($mosConfig_live_site . '/includes/js/calendar/calendar-mos.css');
?>
 

<table class="adminform">
    <tr> 
      <td colspan="2">&nbsp;</td>
    </tr>
    <tr> 
      <td width="24%"><div align="right"><?php 
echo $VM_LANG->_('PHPSHOP_PRODUCT_DISCOUNT_AMOUNT');
?>
:</div></td>
      <td width="76%"> 
开发者ID:albertobraschi,项目名称:Hab,代码行数:31,代码来源:product.product_discount_form.php

示例7: endPane

 /**
  * Ends Tab Pane
  */
 function endPane()
 {
     echo "</div>";
     $scripttag = "\n\ttabinit_{$this->panel_id} = function() {\n\tExt.QuickTips.init();\n\tvar state = Ext.state.Manager;\n\tvar tabs_{$this->panel_id} = new Ext.TabPanel({\n\t\trenderTo: '{$this->pane_id}',\n\t\tactiveTab: 0,\n\t\tdeferredRender: false,\n\t\tenableTabScroll: true,\n\t\tautoScroll: true,\n\t\t listeners : {\n\t\t    'beforerender' : {\n\t\t        fn: function() { \$\$('textarea.mce_editable').each(function(elem) { if(tinyMCE.get(elem.id)) tinyMCE.execCommand('mceRemoveControl',false,elem.id);}) }\n\t\t    },\n\t\t    'afterrender' : {\n\t\t        fn: function() { \$\$('textarea.mce_editable').each(function(elem) { tinyMCE.execCommand('mceAddControl',false,elem.id);}) },\n\t\t        scope: this\n\t\t    }\n\t\t},\n\t\tautoWidth: true,\n\t\titems: [";
     $num = 0;
     $numTabs = count($this->tabs);
     foreach ($this->tabs as $id => $title) {
         $scripttag .= "{ autoHeight: true, contentEl: '{$id}', title: '" . addslashes($title) . "' , tabTip: '" . addslashes(strip_tags($title)) . "' }";
         $num++;
         if ($num < $numTabs) {
             $scripttag .= ",\n";
         }
     }
     $scripttag .= "]\n\t\t});";
     reset($this->tabs);
     if ($this->useCookies) {
         $scripttag .= "tabs_{$this->panel_id}.activate(state.get('{$this->panel_id}-active', '" . key($this->tabs) . "'));";
     } else {
         $scripttag .= "tabs_{$this->panel_id}.activate( '" . key($this->tabs) . "'); ";
     }
     if ($this->useCookies) {
         $scripttag .= "\n\tExt.state.Manager.setProvider(new Ext.state.CookieProvider());\t\n\ttabs_{$this->panel_id}.on('tabchange', function(tp, tab){\n     state.set('{$this->panel_id}-active', tab.id);\n     });\n\t";
     }
     $scripttag .= "};\n\tif( Ext.isIE6 || Ext.isIE7 ) {\n\tExt.EventManager.addListener( window, 'load', tabinit_{$this->panel_id} );\n}\nelse {\n\tExt.onReady( tabinit_{$this->panel_id} );\n}\n\t\n\t\t";
     echo vmCommonHTML::scriptTag('', $scripttag);
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:29,代码来源:htmlTools.class.php

示例8: vmTheme

* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details.
*
* http://virtuemart.net
*/
global $mainframe;
// include the stylesheet for this template
if (vmIsJoomla('1.0') && mosGetParam($_REQUEST, 'option') != VM_COMPONENT_NAME) {
    // This can only be a call from a module or mambot
    // In Joomla 1.0 it is not possible to add a JS or CSS into the HEAD from a module or content mambot,
    // using addcustomheadtag, that's why we just print the tags here
    echo vmCommonHTML::scriptTag(VM_THEMEURL . 'theme.js');
    echo vmCommonHTML::linkTag(VM_THEMEURL . 'theme.css');
} else {
    $vm_mainframe->addStyleSheet(VM_THEMEURL . 'theme.css');
    $vm_mainframe->addScript(VM_THEMEURL . 'theme.js');
}
class vmTheme extends vmTemplate
{
    function vmTheme()
    {
        parent::vmTemplate();
        vmCommonHTML::loadMooTools();
    }
    function vmBuildFullImageLink($product)
    {
        global $VM_LANG;
开发者ID:noikiy,项目名称:owaspbwa,代码行数:31,代码来源:theme.php

示例9: render

 /**
  * Renders the Ext Toolbar for VirtueMart
  * means: it assembles the javascript to add the buttons/separators/links to the toolbar
  *
  */
 function render()
 {
     if ($this->buttons != '') {
         vmCommonHTML::loadExtjs();
         $toolbarscript = "var renderVMTb = function() {\r\n\t\t\t\tvar vmTb = new Ext.Toolbar({renderTo: \"vm-toolbar\"});\n" . $this->buttons . "\nvmTb.addSeparator();\n vmTb.addButton({text: '<div style=\"float:left;background: url(" . VM_THEMEURL . "images/administration/menu/icon-16-reload.png) 50% 0 no-repeat;height:17px;width:17px;\" border=\"0\" alt=\"" . $GLOBALS['VM_LANG']->_('RELOAD') . "\">&nbsp;</div>" . $GLOBALS['VM_LANG']->_('RELOAD') . "', handler: new Function('location.reload();') });\r\n\t\t\t\t};\r\n\t\t\t\tif( Ext.isIE6 || Ext.isIE7 ) {\r\n\t\t\t\t\tExt.EventManager.addListener( window, 'load', renderVMTb );\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tExt.onReady( renderVMTb );\r\n\t\t\t\t}";
         echo vmCommonHTML::scriptTag('', $toolbarscript);
     }
     //
 }
开发者ID:BackupTheBerlios,项目名称:kmit-svn,代码行数:14,代码来源:menuBar.class.php

示例10: ps_product_category

if (!isset($ps_product_category)) {
    $ps_product_category = new ps_product_category();
}
// The tree generator
$vmTigraTree = new vmTigraTreeMenu();
// A unique name for our tree (to support multiple instances of the menu)
$varname = uniqid("TigraTree_");
// Get necessary scripts
if (vmIsJoomla('1.5')) {
    $js_src = $mosConfig_live_site . '/modules/mod_virtuemart';
} else {
    $js_src = $mosConfig_live_site . '/modules';
}
if (!defined("_TIGRATREE_LOADED")) {
    echo vmCommonHTML::scriptTag($js_src . '/tigratree/tree_tpl.js.php');
    echo vmCommonHTML::scriptTag($js_src . '/tigratree/tree.js');
    define("_TIGRATREE_LOADED", "1");
}
// Create the menu output
$menu_htmlcode = "<div class=\"{$class_mainlevel}\" style=\"text-align:left;\">\r\n<script type=\"text/javascript\"><!--\r\nvar TREE_ITEMS_{$varname} = [\n";
// Create the root node
$menu_htmlcode .= "['" . $root_label . "', '" . $sess->url('index.php?page=' . HOMEPAGE) . "',\n";
// Get the actual category items
$vmTigraTree->traverse_tree_down($menu_htmlcode);
$menu_htmlcode .= "]];\r\n\r\nvar o_tree_{$varname} = new tree(TREE_ITEMS_{$varname}, TREE_TPL);\r\nitem_expand(o_tree_{$varname}, {$Treeid});\r\no_tree_{$varname}.select({$Treeid});\r\n--></script>\n";
// Add a linked list in case JavaScript is disabled
$menu_htmlcode .= "<noscript>\n";
$menu_htmlcode .= $ps_product_category->get_category_tree($category_id, $class_mainlevel);
$menu_htmlcode .= "\n</noscript>\n";
$menu_htmlcode .= "</div>";
echo $menu_htmlcode;
开发者ID:rafarubert,项目名称:megafiltros,代码行数:31,代码来源:vm_tigratree.php

示例11: listUserFields

    /**
     * This allows us to print the user fields on
     * the various sections of the shop
     *
     * @param array $rowFields An array returned from ps_database::loadObjectlist
     * @param array $skipFields A one-dimensional array holding the names of fields that should NOT be displayed
     * @param ps_DB $db A ps_DB object holding ovalues for the fields
     * @param boolean $startform If true, print the starting <form...> tag
     */
    function listUserFields($rowFields, $skipFields = array(), $db = null, $startForm = true)
    {
        global $mm_action_url, $ps_html, $VM_LANG, $my, $default, $mainframe, $vm_mainframe, $vendor_country_3_code, $mosConfig_live_site, $mosConfig_absolute_path, $page;
        $dbf = new ps_DB();
        if ($db === null) {
            $db = new ps_DB();
        }
        $default['country'] = $vendor_country_3_code;
        $missing = vmGet($_REQUEST, 'missing', '');
        // collect all required fields
        $required_fields = array();
        foreach ($rowFields as $field) {
            if ($field->required == 1) {
                $required_fields[$field->name] = $field->type;
            }
            $allfields[$field->name] = $field->name;
        }
        foreach ($skipFields as $skip) {
            unset($required_fields[$skip]);
        }
        // Form validation function
        if (!vmIsAdminMode()) {
            ps_userfield::printJS_formvalidation($required_fields, $rowFields);
        } else {
            echo vmCommonHTML::scriptTag('', 'function submitregistration() { return true }');
        }
        if (file_exists($mosConfig_absolute_path . '/includes/js/mambojavascript.js')) {
            $vm_mainframe->addScript('includes/js/mambojavascript.js');
        }
        if ($startForm) {
            echo '<form action="' . $mm_action_url . basename($_SERVER['PHP_SELF']) . '" method="post" name="adminForm">';
        }
        echo '
		<div style="width:90%;">';
        if (!empty($required_fields)) {
            echo '<div style="padding:5px;text-align:center;"><strong>(* = ' . $VM_LANG->_('CMN_REQUIRED') . ')</strong></div>';
        }
        $delimiter = 0;
        foreach ($rowFields as $field) {
            if (!isset($default[$field->name])) {
                $default[$field->name] = $field->default;
            }
            $readonly = $field->readonly ? ' readonly="readonly"' : '';
            if (in_array($field->name, $skipFields)) {
                continue;
            }
            // Title handling.
            $key = $field->title;
            if ($key[0] == '_') {
                $key = substr($key, 1, strlen($key) - 1);
            }
            if ($VM_LANG->exists($key)) {
                $field->title = $VM_LANG->_($key);
            }
            if ($field->name == 'agreed') {
                $field->title = '<script type="text/javascript">//<![CDATA[
				document.write(\'<label for="agreed_field">' . str_replace("'", "\\'", $VM_LANG->_('PHPSHOP_I_AGREE_TO_TOS')) . '</label><a href="javascript:void window.open(\\\'' . $mosConfig_live_site . '/index2.php?option=com_virtuemart&page=shop.tos&pop=1\\\', \\\'win2\\\', \\\'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no\\\');">\');
				document.write(\' (' . $VM_LANG->_('PHPSHOP_STORE_FORM_TOS') . ')</a>\');
				//]]></script>
				<noscript>
					<label for="agreed_field">' . $VM_LANG->_('PHPSHOP_I_AGREE_TO_TOS') . '</label>
					<a target="_blank" href="' . $mosConfig_live_site . '/index.php?option=com_virtuemart&amp;page=shop.tos" title="' . $VM_LANG->_('PHPSHOP_I_AGREE_TO_TOS') . '">
					 (' . $VM_LANG->_('PHPSHOP_STORE_FORM_TOS') . ')
					</a></noscript>';
            }
            if ($field->name == 'username' && VM_REGISTRATION_TYPE == 'OPTIONAL_REGISTRATION') {
                echo '<div class="formLabel">
						<input type="checkbox" id="register_account" name="register_account" value="1" class="inputbox" onchange="showFields( this.checked, new Array(\'username\', \'password\', \'password2\') );if( this.checked ) { document.adminForm.remember.value=\'yes\'; } else { document.adminForm.remember.value=\'yes\'; }" checked="checked" />
					</div>
					<div class="formField">
						<label for="register_account">' . $VM_LANG->_('VM_REGISTER_ACCOUNT') . '</label>
					</div>
					';
            } elseif ($field->name == 'username') {
                echo '<input type="hidden" id="register_account" name="register_account" value="1" />';
            }
            // a delimiter marks the beginning of a new fieldset and
            // the end of a previous fieldset
            if ($field->type == 'delimiter') {
                if ($delimiter > 0) {
                    echo "</fieldset>\n";
                }
                if (VM_REGISTRATION_TYPE == 'SILENT_REGISTRATION' && $field->title == $VM_LANG->_('PHPSHOP_ORDER_PRINT_CUST_INFO_LBL') && $page == 'checkout.index') {
                    continue;
                }
                echo '<fieldset>
				     <legend class="sectiontableheader">' . $field->title . '</legend>
';
                $delimiter++;
                continue;
            }
//.........这里部分代码省略.........
开发者ID:albertobraschi,项目名称:Hab,代码行数:101,代码来源:ps_userfield.php

示例12: prep4SQL

        divColsRows.toggle();
        divValues.toggle();
        if (elem=getObject('vNames[0]')) {
          elem.setAttribute('mosReq',1);
        }
      break;

      case 'webaddress':
        divWeb.toggle();
      break;
	  	
      case 'delimiter':
      default: 
        
    }
  }

  function prep4SQL(o){
	if(o.value!='') {
		o.value=o.value.replace('vm_','');
    	o.value='vm_' + o.value.replace(/[^a-zA-Z]+/g,'');
	}
  }

</script>  
<?php 
if ($fieldid > 0) {
    echo vmCommonHTML::scriptTag('', 'document.adminForm.name.readOnly=true;');
}
echo vmCommonHTML::scriptTag('', "\t\tvar divValues = new Fx.Slide('divValues' , {duration: {$duration} } );\r\n\t\tvar divColsRows = new Fx.Slide('divColsRows' , {duration: {$duration} } );\r\n\t\tvar divWeb = new Fx.Slide('divWeb' , {duration: {$duration} } );\r\n\t\tvar divShopperGroups = new Fx.Slide('divShopperGroups' , {duration: {$duration} } );\r\n\t\tvar divAgeVerification = new Fx.Slide('divAgeVerification' , {duration: {$duration} } );\r\n\t\tvar divText = new Fx.Slide('divText' , {duration: {$duration} } ); \r\n\t\ttoggleType('" . $db->f('type') . "');");
开发者ID:albertobraschi,项目名称:Hab,代码行数:30,代码来源:admin.user_field_form.php

示例13: render

 function render()
 {
     vmCommonHTML::loadExtjs();
     if ($this->buttons != '') {
         $this->buttons = "var vmTb = new Ext.Toolbar('vm-toolbar');\n" . $this->buttons . "\nvmTb.addSeparator();\n vmTb.addButton({text: '<div style=\"float:left;background: url(" . VM_THEMEURL . "images/administration/menu/icon-16-reload.png) 50% 0 no-repeat;height:17px;width:17px;\" border=\"0\" alt=\"" . $GLOBALS['VM_LANG']->_('RELOAD') . "\">&nbsp;</div>" . $GLOBALS['VM_LANG']->_('RELOAD') . "', handler: new Function('location.reload();') });";
     }
     echo vmCommonHTML::scriptTag('', $this->buttons);
 }
开发者ID:albertobraschi,项目名称:Hab,代码行数:8,代码来源:menuBar.class.php

示例14: setPageTitle

 /**
  * Sets the page title
  *
  * @param string $title
  */
 function setPageTitle($title)
 {
     global $mainframe;
     $title = strip_tags(str_replace('&nbsp;', ' ', $title));
     $title = trim($title);
     if (defined('_VM_IS_BACKEND')) {
         echo vmCommonHTML::scriptTag('', "//<![CDATA[\n\t\t\tvar vm_page_title=\"" . str_replace('"', '\\"', $title) . "\";\n\t\t\ttry{ parent.document.title = vm_page_title; } catch(e) { document.title =vm_page_title; } \n\t\t\t//]]>\n\t\t\t");
     } elseif (vmIsJoomla('1.5')) {
         $document =& JFactory::getDocument();
         $document->setTitle($title);
     } else {
         $mainframe->setPageTitle($title);
     }
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:19,代码来源:mainframe.class.php

示例15: endPane

 /**
  * Ends Tab Pane
  */
 function endPane()
 {
     echo "</div>";
     $scripttag = "\r\nExt.onReady( function() {\r\n\tExt.QuickTips.init();\r\n\tvar state = Ext.state.Manager;\r\n\tvar tabs_{$this->panel_id} = new Ext.TabPanel({\r\n\t\trenderTo: '{$this->pane_id}',\r\n\t\tactiveTab: 0,\r\n\t\tdeferredRender: false,\r\n\t\tenableTabScroll: true,\r\n\t\tautoScroll: true,\r\n\t\tautoWidth: true,\r\n\t\titems: [";
     $num = 0;
     $numTabs = count($this->tabs);
     foreach ($this->tabs as $id => $title) {
         $scripttag .= "{ autoHeight: true, contentEl: '{$id}', title: '" . addslashes($title) . "' , tabTip: '" . addslashes(strip_tags($title)) . "' }";
         $num++;
         if ($num < $numTabs) {
             $scripttag .= ",\n";
         }
     }
     $scripttag .= "]\r\n\t\t});";
     reset($this->tabs);
     if ($this->useCookies) {
         $scripttag .= "tabs_{$this->panel_id}.activate(state.get('{$this->panel_id}-active', '" . key($this->tabs) . "'));";
     } else {
         $scripttag .= "tabs_{$this->panel_id}.activate( '" . key($this->tabs) . "'); ";
     }
     if ($this->useCookies) {
         $scripttag .= "\r\n\tExt.state.Manager.setProvider(new Ext.state.CookieProvider());\t\r\n\ttabs_{$this->panel_id}.on('tabchange', function(tp, tab){\r\n     state.set('{$this->panel_id}-active', tab.id);\r\n     });\r\n\t";
     }
     $scripttag .= "});";
     echo vmCommonHTML::scriptTag('', $scripttag);
 }
开发者ID:albertobraschi,项目名称:Hab,代码行数:29,代码来源:htmlTools.class.php


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