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


PHP vmJsApi::js方法代码示例

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


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

示例1:

if (!class_exists('Permissions')) {
    require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php';
}
$admin = Permissions::getInstance()->check('admin');
$vendor = VmModel::getModel('vendor');
// $vendor->setId($this->vendorId);
$vendor->setId(Permissions::getInstance()->isSuperVendor());
$store = $vendor->getVendor();
// html code for front-end administration
$view = jrequest::getWord('view');
$task = jrequest::getWord('task');
JHtml::_('script', 'system/core.js', false, true);
$document = JFactory::getDocument();
JHtml::_('jquery.ui');
vmJsApi::js('jquery.ui.autocomplete.html');
vmJsApi::js('template', 'administrator/components/com_virtuemart/assets/js');
$document->addStyleSheet(JURI::root(true) . '/administrator/components/com_virtuemart/assets/css/admin.styles.css');
$j = "\n\tjQuery(function() {\n\t\tjQuery( '#virtuemartSave').click(function(e){\n\t\t\te.preventDefault();\n\t\t\tjQuery( '#media-dialog' ).remove();\n\t\t\tdocument.adminForm.task.value='apply';\n\t\t\tdocument.adminForm.submit();\n\t\t\treturn false;\n\t\t});\n\t\tjQuery('link[rel=stylesheet][href*=\"template\"]').remove();\n\t\tjQuery('.btn-micro').addClass('btn-mini');\n\t\tjQuery('#menu li a').click(function(e)\n\t\t{\n\t\t\t\$('#menu li.open').removeClass('open');\n\t\t\t// console.log('toggle');\n\t\t\t// \$('#menu li a')\n\t\t\t// e.stopPropagation();\n\t\t});\n\t});\n";
$document->addScriptDeclaration($j);
$document->addStyleDeclaration('
@media (max-width: 767px) {
 body { padding-top: 0px;}
 .vm2admin .navbar-fixed-top,.vm2admin .header{ margin:0px;max-width:100%}
 .vm2admin .subhead {margin-left:0px;margin-right:0px}
}
 body,.vmadmin{width:100%;padding:0}
 .vm2admin .subhead,.vmadmin{margin:0px;}
body {margin:0px}
.page-title{font-size:150%;}
.navbar-fixed-top {
 margin-bottom: 0px;
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:31,代码来源:edit.html.php

示例2: jDate

    static function jDate($date = '', $name = "date", $id = NULL, $resetBt = TRUE, $yearRange = '')
    {
        if ($yearRange) {
            $yearRange = 'yearRange: "' . $yearRange . '",';
        }
        if ($date == "0000-00-00 00:00:00") {
            $date = 0;
        }
        if (empty($id)) {
            $id = $name;
        }
        static $jDate;
        $dateFormat = JText::_('COM_VIRTUEMART_DATE_FORMAT_INPUT_J16');
        //="m/d/y"
        $search = array('m', 'd');
        $replace = array('mm', 'dd');
        $jsDateFormat = str_replace($search, $replace, $dateFormat);
        if ($date) {
            if (JVM_VERSION === 1) {
                $search = array('m', 'd', 'y');
                $replace = array('%m', '%d', '%y');
                $dateFormat = str_replace($search, $replace, $dateFormat);
            }
            $formatedDate = JHTML::_('date', $date, $dateFormat);
        } else {
            $formatedDate = JText::_('COM_VIRTUEMART_NEVER');
        }
        $display = '<input class="datepicker-db" id="' . $id . '" type="hidden" name="' . $name . '" value="' . $date . '" />';
        $display .= '<input id="' . $id . '_text" class="datepicker" type="text" value="' . $formatedDate . '" />';
        if ($resetBt) {
            $display .= '<span class="vmicon vmicon-16-logout icon-nofloat js-date-reset"></span>';
        }
        // If exist exit
        if ($jDate) {
            return $display;
        }
        $front = 'components/com_virtuemart/assets/';
        $document = JFactory::getDocument();
        $document->addScriptDeclaration('
			jQuery(document).ready( function($) {
			$(".datepicker").live( "focus", function() {
				$( this ).datepicker({
					changeMonth: true,
					changeYear: true,
					' . $yearRange . '
					dateFormat:"' . $jsDateFormat . '",
					altField: $(this).prev(),
					altFormat: "yy-mm-dd"
				});
			});
			$(".js-date-reset").click(function() {
				$(this).prev("input").val("' . JText::_('COM_VIRTUEMART_NEVER') . '").prev("input").val("0");
			});
		});
		');
        vmJsApi::js('jquery.ui.core', FALSE, '', TRUE);
        vmJsApi::js('jquery.ui.datepicker', FALSE, '', TRUE);
        vmJsApi::css('jquery.ui.all', $front . 'css/ui');
        $lg = JFactory::getLanguage();
        $lang = $lg->getTag();
        $existingLang = array("af", "ar", "ar-DZ", "az", "bg", "bs", "ca", "cs", "da", "de", "el", "en-AU", "en-GB", "en-NZ", "eo", "es", "et", "eu", "fa", "fi", "fo", "fr", "fr-CH", "gl", "he", "hr", "hu", "hy", "id", "is", "it", "ja", "ko", "kz", "lt", "lv", "ml", "ms", "nl", "no", "pl", "pt", "pt-BR", "rm", "ro", "ru", "sk", "sl", "sq", "sr", "sr-SR", "sv", "ta", "th", "tj", "tr", "uk", "vi", "zh-CN", "zh-HK", "zh-TW");
        if (!in_array($lang, $existingLang)) {
            $lang = substr($lang, 0, 2);
        } elseif (!in_array($lang, $existingLang)) {
            $lang = "en-GB";
        }
        vmJsApi::js('jquery.ui.datepicker-' . $lang, $front . 'js/i18n');
        $jDate = TRUE;
        return $display;
    }
开发者ID:romuland,项目名称:khparts,代码行数:70,代码来源:config.php

示例3: defined

 * @package	VirtueMart
 * @subpackage
 * @author Max Milbers, Valerie Isaksen

 * @link http://www.virtuemart.net
 * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
 * @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.
 * @version $Id: default_images.php 6188 2012-06-29 09:38:30Z Milbo $
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
vmJsApi::js( 'fancybox/jquery.fancybox-1.3.4.pack');
vmJsApi::css('jquery.fancybox-1.3.4');
$document = JFactory::getDocument ();
$imageJS = '
jQuery(document).ready(function() {
	jQuery("a[rel=vm-additional-images]").fancybox({
		"titlePosition" 	: "inside",
		"transitionIn"	:	"elastic",
		"transitionOut"	:	"elastic"
	});
	jQuery(".additional-images .product-image").click(function() {
		jQuery(".main-image img").attr("src",this.src );
		jQuery(".main-image img").attr("alt",this.alt );
		jQuery(".main-image a").attr("href",this.src );
		jQuery(".main-image a").attr("title",this.alt );
	}); 
开发者ID:sergy444,项目名称:joomla,代码行数:31,代码来源:default_images.php

示例4: getUserInfoST


//.........这里部分代码省略.........
            $dc = OPCloader::getDefaultCountry($ref->cart, true);
            $html22 = $OPCloader->getSTfields($ref, true, true, $dc);
            $html22 .= '<input type="hidden" name="shipto_logged" value="new" />';
            //$html2 .= '<div id="hidden_st_" style="display: none;">'.$html22.'</div>';
            $html22 = str_replace('id="', 'id="REPLACEnewREPLACE', $html22);
            $html22 = str_replace('name="', 'name="REPLACEnewREPLACE', $html22);
            $html22 = '<div id="hidden_st_new" style="display: none;">' . $html22 . '<div id="opc_st_new">&nbsp;</div><input type="hidden" name="opc_st_changed_new" id="opc_st_changed_new" value="1" /></div>';
            if (!isset(OPCloader::$extrahtml)) {
                OPCloader::$extrahtml = '';
            }
            OPCloader::$extrahtml .= $html22;
            $html22 = '';
            if (!isset($html2)) {
                $html2 = '';
            }
        } else {
            $html2 = '';
        }
        $ref->cart->ST = 0;
        $STnamed = $STaddress;
        $STnamed = $OPCloader->setCountryAndState($STnamed);
        $vars = array('STaddress' => $STnamed, 'bt_user_info_id' => $virtuemart_userinfo_id, 'BTaddress' => $BTaddress, 'STaddressList' => $STaddressList, 'uid' => $uid, 'cart' => $ref->cart, 'new_address_link' => $new_address_link);
        // a default BT address
        $htmlbt = '<input type="hidden" name="ship_to_info_id_bt" id="ship_to_info_id_bt" value="' . $virtuemart_userinfo_id . '"  class="stradio"/>';
        $html2 .= '<div id="hidden_st_' . $virtuemart_userinfo_id . '" style="display: none;">' . $htmlbt . '</div>';
        //$ref->cart->STaddress = $STaddress;
        //$ref->cart->BTaddress = $BTaddress;
        if (empty($html3) && empty($htmlsingle)) {
            $html = $OPCloader->fetch($OPCloader, 'list_shipto_addresses.tpl', $vars);
        } else {
            $html = '';
        }
        //if (!empty($html) && (!empty($html2)))
        if (!empty($html2)) {
            $html = $html3 . '<div id="edit_address_list_st_section">' . $html . '</div>' . $html2;
        }
        foreach ($STaddressList as $ST) {
            $html = str_replace('for="' . $ST->virtuemart_userinfo_id . '"', ' for="id' . $ST->virtuemart_userinfo_id . '" ', $html);
            $html = str_replace('id="' . $ST->virtuemart_userinfo_id . '"', ' id="id' . $ST->virtuemart_userinfo_id . '" onclick="javascript:Onepage.op_runSS(this);" ', $html);
        }
        $html = str_replace('for="' . $virtuemart_userinfo_id . '"', ' for="id' . $virtuemart_userinfo_id . '" ', $html);
        $html = str_replace('id="' . $virtuemart_userinfo_id . '"', ' id="id' . $virtuemart_userinfo_id . '" onclick="javascript:Onepage.op_runSS(this);" ', $html);
        if (!empty($selected_id)) {
            $jsst = '
//<![CDATA[				  
if (typeof jQuery != \'undefined\')
jQuery(document).ready(function($) {
				  var elst = document.getElementById(\'id' . $virtuemart_userinfo_id . '\'); 
				  if (elst != null)
				   {
				   ';
            if ($addressCountAjax) {
                $jsst .= '
				  Onepage.changeSTajax(elst);
				    ';
            } else {
                $jsst .= '
				  Onepage.changeST(elst);
				    ';
            }
            $jsst .= '
				   }
				  });
//]]>				  
				  ';
            $doc = JFactory::getDocument();
            $doc->addScriptDeclaration($jsst);
        }
        if (defined('OPC_DETECTED_DEVICE') && OPC_DETECTED_DEVICE != 'DESKTOP') {
            $nochosen = true;
        } else {
            $nochosen = false;
        }
        if (!$nochosen) {
            if ($addressCountAjax) {
                if (OPCJ3) {
                    JHtml::_('jquery.framework');
                    JHtml::_('jquery.ui');
                    JHtml::_('formbehavior.chosen', 'select');
                } else {
                    vmJsApi::js('chosen.jquery.min');
                    vmJsApi::css('chosen');
                }
                $document = JFactory::getDocument();
                $document->addScriptDeclaration('
//<![CDATA[
		 if (typeof jQuery != \'undefined\')
		 jQuery( function() {
			var d = jQuery(".opc-chzn-select"); 
			if (typeof d.chosen != \'undefined\')
			d.chosen({
			    enable_select_all: false,
				});
		});
//]]>
				');
            }
        }
        return $html;
    }
开发者ID:aldegtyarev,项目名称:stelsvelo,代码行数:101,代码来源:loggedshopper.php

示例5: defined

* @version $Id: edit.php 6472 2012-09-19 08:46:21Z alatak $
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
//AdminMenuHelper::startAdminArea();
// vmdebug('User edit',$this);
// Implement Joomla's form validation
JHTML::_('behavior.formvalidation');
JHTML::stylesheet('vmpanels.css', JURI::root() . 'components/com_virtuemart/assets/css/');
// VM_THEMEURL
if ($this->userDetails->user_is_vendor) {
    JHtml::_('jquery.ui');
    vmJsApi::js('jquery.ui.autocomplete.html');
    vmJsApi::js('fancybox/jquery.fancybox-1.3.4.pack');
    vmJsApi::js('jquery.coookie', JURI::root() . 'administrator/components/com_virtuemart/assets/js');
    vmJsApi::js('vm2admin', JURI::root() . 'administrator/components/com_virtuemart/assets/js');
}
?>
<style type="text/css">
.invalid {
	border-color: #f00;
	background-color: #ffd;
	color: #000;
}
label.invalid {
	background-color: #fff;
	color: #f00;
}
</style>
<script language="javascript">
function myValidator(f, t)
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:31,代码来源:edit.php

示例6: lVendor

 function lVendor()
 {
     // If the current user is a vendor, load the store data
     if ($this->_userDetails->user_is_vendor) {
         $front = JURI::root(true) . '/components/com_virtuemart/assets/';
         $admin = JURI::root(true) . '/administrator/components/com_virtuemart/assets/';
         $document = JFactory::getDocument();
         $document->addScript($front . 'js/fancybox/jquery.mousewheel-3.0.4.pack.js');
         $document->addScript($front . 'js/fancybox/jquery.easing-1.3.pack.js');
         $document->addScript($front . 'js/fancybox/jquery.fancybox-1.3.4.pack.js');
         vmJsApi::js('jquery-ui', FALSE, '', TRUE);
         vmJsApi::js('jquery.ui.autocomplete.html');
         vmJsApi::js('jquery.noConflict');
         $document->addScript($admin . 'js/vm2admin.js');
         $currencymodel = VmModel::getModel('currency', 'VirtuemartModel');
         $currencies = $currencymodel->getCurrencies();
         $this->assignRef('currencies', $currencies);
         if (!$this->_orderList) {
             $this->lOrderlist();
         }
         $vendorModel = VmModel::getModel('vendor');
         if (Vmconfig::get('multix', 'none') === 'none') {
             $vendorModel->setId(1);
         } else {
             $vendorModel->setId($this->_userDetails->virtuemart_vendor_id);
         }
         $vendor = $vendorModel->getVendor();
         $vendorModel->addImages($vendor);
         $this->assignRef('vendor', $vendor);
     }
 }
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:31,代码来源:view.html.php

示例7: define

    $task = '';
    $basePath = JPATH_VM_SITE;
} else {
    /* Front-end helpers */
    if (!class_exists('VmImage')) {
        require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'image.php';
    }
    //dont remove that file it is actually in every view except the state view
    if (!class_exists('shopFunctionsF')) {
        require JPATH_VM_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
    }
    //dont remove that file it is actually in every view
    /* Loading jQuery and VM scripts. */
    //vmJsApi::jPrice();    //in create button
    define('JQUERY_DEFINED', "1");
    vmJsApi::js('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.2', '', TRUE);
    /*vmJsApi::jQuery();*/
    vmJsApi::jSite();
    vmJsApi::cssSite();
    $_controller = JRequest::getWord('view', JRequest::getWord('controller', 'virtuemart'));
    $trigger = 'onVmSiteController';
    // 	$task = JRequest::getWord('task',JRequest::getWord('layout',$_controller) );		$this makes trouble!
    $task = JRequest::getWord('task');
    if (($_controller == 'product' || $_controller == 'category') && ($task == 'save' || $task == 'edit')) {
        $app = JFactory::getApplication();
        if (!class_exists('Permissions')) {
            require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php';
        }
        if (Permissions::getInstance()->check("admin,storeadmin")) {
            $jlang = JFactory::getLanguage();
            $jlang->load('com_virtuemart', JPATH_ADMINISTRATOR, null, true);
开发者ID:romuland,项目名称:khparts,代码行数:31,代码来源:virtuemart.php

示例8: plgVmConfirmedOrder

 /**
  *
  *
  * @author Valérie Isaksen
  */
 function plgVmConfirmedOrder($cart, $order)
 {
     if (!($method = $this->getVmPluginMethod($order['details']['BT']->virtuemart_paymentmethod_id))) {
         return null;
         // Another method was selected, do nothing
     }
     if (!$this->selectedThisElement($method->payment_element)) {
         return false;
     }
     $this->order_id = $order['details']['BT']->order_number;
     $url = JURI::root();
     vmJsApi::js('facebox');
     vmJsApi::css('facebox');
     // carrega os js e css
     $doc =& JFactory::getDocument();
     $url_lib = $url . DS . 'plugins' . DS . 'vmpayment' . DS . 'moip' . DS;
     $url_js = $url_lib . 'assets' . DS . 'js' . DS;
     $this->url_imagens = $url_lib . 'imagens' . DS;
     $url_css = $url_lib . 'assets' . DS . 'css' . DS;
     // redirecionar dentro do componente para validar
     $url_redireciona_moip = JROUTE::_(JURI::root() . 'index.php?option=com_virtuemart&view=pluginresponse&task=pluginnotification&tmpl=component&pm=' . $order['details']['BT']->virtuemart_paymentmethod_id);
     $url_pedidos = JROUTE::_(JURI::root() . 'index.php?option=com_virtuemart&view=orders');
     $url_recibo_moip = JROUTE::_(JURI::root() . 'index.php?option=com_virtuemart&view=pluginresponse&task=pluginresponsereceived&on=' . $this->order_id . '&pm=' . $order['details']['BT']->virtuemart_paymentmethod_id);
     // carrega ou não o squeezebox
     $load_squeezebox = $method->load_squeezebox;
     $sq_js = '<script type="text/javascript" language="javascript" src="' . $url_js . 'SqueezeBox.js"></script>';
     $sq_css = '<link href="' . $url_css . 'SqueezeBox.css" rel="stylesheet" type="text/css"/>';
     $doc->addCustomTag('
        <script language="javascript">
         jQuery.noConflict();
         var redireciona_moip = "' . $url_redireciona_moip . '";
         var url_pedidos = "' . $url_pedidos . '";
         var url_recibo_moip = "' . $url_recibo_moip . '";
     </script>
     <script type="text/javascript" language="javascript" src="' . $url_js . 'jquery.mask.js"></script>
     <script type="text/javascript" charset="utf-8" language="javascript" src="' . $url_js . 'moip.js"></script>
     <script type="text/javascript" language="javascript" src="' . $url_js . 'jquery.card.js"></script>
     <script type="text/javascript" language="javascript" src="' . $url_js . 'validar_cartao.js"></script>
     ' . ($load_squeezebox != 0 ? $sq_js : '') . '
     <link href="' . $url_css . 'css_pagamento.css" rel="stylesheet" type="text/css"/>
     <link href="' . $url_css . 'card.css" rel="stylesheet" type="text/css"/>
     ' . ($load_squeezebox != 0 ? $sq_css : '') . '
     ');
     $lang = JFactory::getLanguage();
     $filename = 'com_virtuemart';
     $lang->load($filename, JPATH_ADMINISTRATOR);
     $vendorId = 0;
     $this->logInfo('plgVmConfirmedOrder order number: ' . $order['details']['BT']->order_number, 'message');
     $html = "";
     if (!class_exists('VirtueMartModelOrders')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php';
     }
     $this->getPaymentCurrency($method);
     $q = 'SELECT `currency_code_3` FROM `#__virtuemart_currencies` WHERE `virtuemart_currency_id`="' . $method->payment_currency . '" ';
     $db =& JFactory::getDBO();
     $db->setQuery($q);
     $currency_code_3 = $db->loadResult();
     $paymentCurrency = CurrencyDisplay::getInstance($method->payment_currency);
     $totalInPaymentCurrency = round($paymentCurrency->convertCurrencyTo($method->payment_currency, $order['details']['BT']->order_total, false), 2);
     $cd = CurrencyDisplay::getInstance($cart->pricesCurrency);
     // pega o nome do método de pagamento
     $dbValues['payment_name'] = $this->renderPluginName($method);
     $html = '<table>' . "\n";
     $html .= $this->getHtmlRowBE('MOIP_PAYMENT_NAME', $dbValues['payment_name']);
     if (!empty($payment_info)) {
         $lang =& JFactory::getLanguage();
         if ($lang->hasKey($method->payment_info)) {
             $payment_info = JText::_($method->payment_info);
         } else {
             $payment_info = $method->payment_info;
         }
         $html .= $this->getHtmlRowBE('MOIP_INFO', $payment_info);
     }
     if (!class_exists('VirtueMartModelCurrency')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'currency.php';
     }
     $currency = CurrencyDisplay::getInstance('', $order['details']['BT']->virtuemart_vendor_id);
     $html .= $this->getHtmlRowBE('MOIP_ORDER_NUMBER', $order['details']['BT']->order_number);
     $html .= $this->getHtmlRowBE('MOIP_AMOUNT', $currency->priceDisplay($order['details']['BT']->order_total));
     $html .= '
     <input type="hidden" name="order_id" id="order_id" value="' . $order['details']['BT']->order_number . '"/>
 </table>' . "\n";
     $this->chave_moip = $this->getChaveMoip($method);
     $this->token_moip = $this->getAfiliacaoMoip($method);
     if ($method->modo_teste) {
         // url do ambiente de desenvolvimento
         $this->setaUrlRequest('https://desenvolvedor.moip.com.br/sandbox/ws/alpha/EnviarInstrucao/Unica');
         $this->setaUrlJs('https://desenvolvedor.moip.com.br/sandbox/transparente/MoipWidget-v2.js');
     } else {
         // url do ambiente de produção
         $this->setaUrlRequest('https://www.moip.com.br/ws/alpha/EnviarInstrucao/Unica');
         $this->setaUrlJs('https://www.moip.com.br/transparente/MoipWidget-v2.js');
     }
     $arr_pagamento = $this->solicitaToken($method, $order);
     $this->_virtuemart_paymentmethod_id = $order['details']['BT']->virtuemart_paymentmethod_id;
//.........这里部分代码省略.........
开发者ID:edrdesigner,项目名称:MoIP-VirtueMart-3,代码行数:101,代码来源:moip.php

示例9: datePicker

    function datePicker($jsDateFormat, $name, $id, $date = '', $placeholder = '')
    {
        $display = '<input class="datepicker-db" id="' . $id . '" type="hidden" name="' . $name . '" value="' . $date . '" />';
        $formatedDate = $date;
        //JFactory::getDate($date);
        $display .= '<input id="' . $id . '_text" class="datepicker" type="text" value="' . $formatedDate . '" placeholder="' . $placeholder . '" />';
        // If exist exit
        $front = 'components/com_virtuemart/assets/';
        $document = JFactory::getDocument();
        $document->addScriptDeclaration('
//<![CDATA[
			jQuery(document).ready( function($) {
			$("#' . $id . '_text").live( "focus", function() {
				$( this ).datepicker({
					changeMonth: true,
					changeYear: true,
					dateFormat:"' . $jsDateFormat . '",
					altField: $(this).prev(),
					altFormat: "yy-mm-dd"
				});
			});
			$(".js-date-reset").click(function() {
				$(this).prev("input").val("' . $placeholder . '").prev("input").val("0");
			});
		});
//]]>
		');
        vmJsApi::js('jquery.ui.core', FALSE, '', TRUE);
        vmJsApi::js('jquery.ui.datepicker', FALSE, '', TRUE);
        vmJsApi::css('jquery.ui.all', $front . 'css/ui');
        $lg = JFactory::getLanguage();
        $lang = $lg->getTag();
        $existingLang = array("af", "ar", "ar-DZ", "az", "bg", "bs", "ca", "cs", "da", "de", "el", "en-AU", "en-GB", "en-NZ", "eo", "es", "et", "eu", "fa", "fi", "fo", "fr", "fr-CH", "gl", "he", "hr", "hu", "hy", "id", "is", "it", "ja", "ko", "kz", "lt", "lv", "ml", "ms", "nl", "no", "pl", "pt", "pt-BR", "rm", "ro", "ru", "sk", "sl", "sq", "sr", "sr-SR", "sv", "ta", "th", "tj", "tr", "uk", "vi", "zh-CN", "zh-HK", "zh-TW");
        if (!in_array($lang, $existingLang)) {
            $lang = substr($lang, 0, 2);
        } elseif (!in_array($lang, $existingLang)) {
            $lang = "en-GB";
        }
        vmJsApi::js('jquery.ui.datepicker-' . $lang, $front . 'js/i18n');
        return $display;
    }
开发者ID:aldegtyarev,项目名称:stelsvelo,代码行数:41,代码来源:orders.php

示例10: JvalideForm

 static function JvalideForm($name = '#adminForm')
 {
     static $jvalideForm;
     // If exist exit
     if ($jvalideForm === $name) {
         return;
     }
     $document = JFactory::getDocument();
     $document->addScriptDeclaration("\n//<![CDATA[\n\t\t\tjQuery(document).ready(function() {\n\t\t\t\tjQuery('" . $name . "').validationEngine();\n\t\t\t});\n//]]>\n");
     if ($jvalideForm) {
         return;
     }
     vmJsApi::js('jquery.validationEngine');
     $lg = JFactory::getLanguage();
     $lang = substr($lg->getTag(), 0, 2);
     /*$existingLang = array("cz", "da", "de", "en", "es", "fr", "it", "ja", "nl", "pl", "pt", "ro", "ru", "tr");
     		if (!in_array ($lang, $existingLang)) {
     			$lang = "en";
     		}*/
     $vlePath = vmJsApi::setPath('languages/jquery.validationEngine-' . $lang, FALSE, '', $minified = NULL, 'js', true);
     if (file_exists($vlePath) and !is_dir($vlePath)) {
         vmJsApi::js('languages/jquery.validationEngine-' . $lang);
     } else {
         vmJsApi::js('languages/jquery.validationEngine-en');
     }
     vmJsApi::css('validationEngine.template');
     vmJsApi::css('validationEngine.jquery');
     $jvalideForm = $name;
 }
开发者ID:lenard112,项目名称:cms,代码行数:29,代码来源:vmjsapi.php

示例11: jQuery

			main = jQuery(".main-image"),
			ext = href.substring(href.length-4),
			isImg ;
		ext = ext.toLowerCase();
		isImg = (ext ==".png" || ext ==".jpg" || ext =="jpeg" || ext ==".gif");
		if (isImg) {
			main.find("img").attr("src",this.href ).attr("alt",this.title );
			main.find("a").attr("href",this.href ).attr("alt",this.title );
			$(this).parent().addClass("active").siblings().removeClass("active");
			return false;
		}
	}); 

';
if ($isSlide) {
    vmJsApi::js('jquery.lightSlider.min');
    vmJsApi::css('lightSlider');
    $imageJS .= '
		var $slideBar = $(".additional-images .row-fluid");
		var lightSlider =
			$slideBar.lightSlider({
				  minSlide:' . $imgagesPerRow . ',
				  maxSlide:' . $imgagesPerRow . ',
				  slideMove:' . $imgagesPerRow . ',
				  pager:false,
				  gallery:true,
				  prevHtml:\'<span class="icon-previous"></span>\',
				  nextHtml:\'<span class="icon-next"></span>\',
				  onAfterSlide: function() {
					$slideBar.children(".active").children().trigger("click");
					// console.log($slideBar.children(".active"),this);
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:31,代码来源:default_images.php

示例12: elseif

 if (!class_exists('shopFunctionsF')) {
     require JPATH_VM_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
 }
 //dont remove that file it is actually in every view
 /* Loading jQuery and VM scripts. */
 //vmJsApi::jPrice();    //in create button
 vmJsApi::jQuery();
 vmJsApi::jSite();
 vmJsApi::cssSite();
 $_controller = JRequest::getWord('view', JRequest::getWord('controller', 'virtuemart'));
 $trigger = 'onVmSiteController';
 // 	$task = JRequest::getWord('task',JRequest::getWord('layout',$_controller) );		$this makes trouble!
 $task = JRequest::getWord('task', '');
 if (($_controller == 'product' || $_controller == 'category') && ($task == 'save' || $task == 'edit')) {
     $app = JFactory::getApplication();
     vmJsApi::js('vmsite');
     vmJsApi::jQuery(FALSE);
     if (!class_exists('Permissions')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php';
     }
     if (Permissions::getInstance()->check("admin,storeadmin")) {
         $jlang = JFactory::getLanguage();
         $jlang->load('com_virtuemart', JPATH_ADMINISTRATOR, null, true);
         $basePath = JPATH_VM_ADMINISTRATOR;
         $trigger = 'onVmAdminController';
     } else {
         $app->redirect('index.php?option=com_virtuemart', jText::_('COM_VIRTUEMART_RESTRICTED_ACCESS'));
     }
 } elseif ($_controller) {
     $basePath = JPATH_VM_SITE;
 }
开发者ID:Roma48,项目名称:abazherka_old,代码行数:31,代码来源:virtuemart.php

示例13: endAdminArea

    /**
     * Close out the adminstrator area table.
     * @author RickG, Max Milbers, Patrick Kohl
     * @boolean $ajaxResults, in case of raw/ajax result exist, include the file
     * Note the script must be set after joomla javascript declaration to overide it.
     */
    static function endAdminArea($ajaxResults = false)
    {
        if (!self::$backEnd) {
            echo '</div></div></div></div>';
            vmJsApi::js('jquery.ui.autocomplete.html');
            if ($ajaxResults) {
                include 'ajax/results.html.php';
            }
            include 'front/langs.html.php';
            return;
        }
        self::$vmAdminAreaStarted = false;
        if (VmConfig::get('debug') == '1') {
            //TODO maybe add debuggin again here
            //		include(JPATH_VM_ADMINISTRATOR.'debug.php');
        }
        ?>
					<div class="clear"></div>
				</div>
				<div class="clear"></div>
			</div>
		</div>
		</div>

		<?php 
        // add ajax results script
        if ($ajaxResults) {
            include 'ajax/results.html.php';
        }
    }
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:36,代码来源:adminui.php

示例14: jQuery

    require JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php';
}
VmConfig::loadConfig();
if (method_exists('vmJsApi', 'js')) {
    $app = JFactory::getApplication();
    $jq = $app->get('jquery');
    if (empty($jq) && !OPCJ3) {
        vmJsApi::js('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.6.4', '', TRUE);
        vmJsApi::js('jquery-ui', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16', '', TRUE);
    }
    if (OPCJ3) {
        JHtml::_('jquery.framework');
        JHtml::_('jquery.ui');
        JHtml::_('formbehavior.chosen', 'select');
    } else {
        vmJsApi::js('chosen.jquery.min');
        vmJsApi::css('chosen');
    }
    $document->addScriptDeclaration('
//<![CDATA[
		var vm2string ={' . $vm2string . '} ;
		 jQuery( function($) {
			$(".vm-chzn-select").chosen({enable_select_all: true,select_all_text : vm2string.select_all_text,select_some_options_text:vm2string.select_some_options_text});
		});
//]]>
				');
} else {
    vmJsApi::jQuery();
}
$base = JURI::base();
$jbase = str_replace('/administrator', '', $base);
开发者ID:aldegtyarev,项目名称:stelsvelo,代码行数:31,代码来源:default_header.php

示例15: buildTabs

    /**
     * Admin UI Tabs
     * Gives A Tab Based Navigation Back And Loads The Templates With A Nice Design
     * @param $load_template = a key => value array. key = template name, value = Language File contraction
     * @example 'shop' => 'COM_VIRTUEMART_ADMIN_CFG_SHOPTAB'
     */
    function buildTabs($load_template = array())
    {
        vmJsApi::js('vmtabs');
        $html = '<div id="ui-tabs">';
        $i = 1;
        foreach ($load_template as $tab_content => $tab_title) {
            $html .= '<div id="tab-' . $i . '" class="tabs" title="' . JText::_($tab_title) . '">';
            $html .= $this->loadTemplate($tab_content);
            $html .= '<div class="clear"></div>
			    </div>';
            $i++;
        }
        $html .= '</div>';
        echo $html;
    }
开发者ID:joselapria,项目名称:virtuemart,代码行数:21,代码来源:shopfunctionsf.php


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