本文整理汇总了PHP中vmJsApi::addJScript方法的典型用法代码示例。如果您正苦于以下问题:PHP vmJsApi::addJScript方法的具体用法?PHP vmJsApi::addJScript怎么用?PHP vmJsApi::addJScript使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vmJsApi
的用法示例。
在下文中一共展示了vmJsApi::addJScript方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getInput
function getInput()
{
$js = '
//<![CDATA[
jQuery(document).ready(function( $ ) {
jQuery("#paybox_getpaybox_link").click( function() {
if ( $("#paybox_getpaybox_show_hide").is(":visible") ) {
$("#paybox_getpaybox_show_hide").hide("slow");
$("#paybox_getpaybox_link").html("' . addslashes(vmText::_('VMPAYMENT_PAYBOX_ALREADY_ACCOUNT')) . '");
} else {
$("#paybox_getpaybox_show_hide").show("slow");
$("#paybox_getpaybox_link").html("' . addslashes(vmText::_('VMPAYMENT_PAYBOX_GET_PAYBOX_HIDE')) . '");
}
});
});
//]]>
';
vmJsApi::addJScript("vm.getPaybox", $js);
vmJsApi::addJScript('/plugins/vmpayment/paybox/paybox/assets/js/admin.js');
vmJsApi::css('admin', 'plugins/vmpayment/paybox/paybox/assets/css/');
$cid = vRequest::getvar('cid', NULL, 'array');
if (is_Array($cid)) {
$virtuemart_paymentmethod_id = $cid[0];
} else {
$virtuemart_paymentmethod_id = $cid;
}
$query = "SELECT * FROM `#__virtuemart_paymentmethods` WHERE virtuemart_paymentmethod_id = '" . $virtuemart_paymentmethod_id . "'";
$db = JFactory::getDBO();
$db->setQuery($query);
$params = $db->loadObject();
$html = '<img src="http://virtuemart.boutique-paybox.com/PayboxLogo.jpg" width="200px"/><br />';
if ($params->created_on == $params->modified_on) {
$id = "paybox_getpaybox_link";
$html .= '<a href="#" id="' . $id . '">' . vmText::_('VMPAYMENT_PAYBOX_GET_PAYBOX_HIDE') . '</a>';
$display = '';
$html .= '<div id="paybox_getpaybox_show_hide" align=""' . $display . ' >';
} else {
$id = "paybox_getpaybox_link";
$html .= '<a href="#" id="' . $id . '">' . vmText::_('VMPAYMENT_PAYBOX_ALREADY_ACCOUNT') . '</a>';
$display = ' style="display: none;"';
$html .= '<div id="paybox_getpaybox_show_hide" align=""' . $display . ' >';
}
$id = "";
$lang = $this->getLang();
if ($lang == 'fr') {
$url = "http://virtuemart.boutique-paybox.com/PayboxPres.html";
} else {
$url = "http://virtuemart.boutique-paybox.com/PayboxPres.html";
}
$html .= '<iframe src="' . $url . '" scrolling="yes" style="x-overflow: none;" frameborder="0" height="1400px" width="800px"></iframe>';
$html .= "</div>";
return $html;
}
示例2: getInput
protected function getInput()
{
vmJsApi::addJScript('/plugins/vmpayment/realex_hpp_api/realex_hpp_api/assets/js/admin.js');
vmJsApi::css('admin', 'plugins/vmpayment/realex_hpp_api/realex_hpp_api/assets/css/');
$url = "http://www.realexpayments.com/partner-referral?id=tsmart";
$logo = '<img src="http://www.realexpayments.com/images/logo_realex_large.png" width="150"/>';
$html = '<p><a target="_blank" href="' . $url . '" >' . $logo . '</a></p>';
$html .= '<p><a target="_blank" href="' . $url . '" class="signin-button-link">' . tsmText::_('VMPAYMENT_REALEX_HPP_API_REGISTER') . '</a>';
$html .= ' <a target="_blank" href="http://docs.tsmart.net/manual/shop-menu/payment-methods/realex-hpp-and-api.html" class="signin-button-link">' . tsmText::_('VMPAYMENT_REALEX_HPP_API_DOCUMENTATION') . '</a></p>';
return $html;
}
示例3: getInput
protected function getInput()
{
JHtml::_('behavior.colorpicker');
vmJsApi::addJScript('/plugins/vmpayment/paypal/paypal/assets/js/admin.js');
vmJsApi::css('paypal', 'plugins/vmpayment/paypal/paypal/assets/css/');
$url = "https://www.paypal.com/us/webapps/mpp/referral/paypal-payments-standard?partner_id=83EP5DJG9FU6L";
$logo = '<img src="https://www.paypalobjects.com/en_US/i/logo/PayPal_mark_60x38.gif" />';
$html = '<p><a target="_blank" href="' . $url . '" >' . $logo . '</a></p>';
$html .= '<p><a target="_blank" href="' . $url . '" class="signin-button-link">' . vmText::_('VMPAYMENT_PAYPAL_REGISTER') . '</a>';
$html .= ' <a target="_blank" href="http://docs.virtuemart.net/manual/shop-menu/payment-methods/paypal.html" class="signin-button-link">' . vmText::_('VMPAYMENT_PAYPAL_DOCUMENTATION') . '</a></p>';
return $html;
}
示例4: getInput
function getInput()
{
vmJsApi::addJScript('/plugins/vmpayment/klikandpay/klikandpay/assets/js/admin.js');
$lang = $this->getLang();
if ($lang == 'fr') {
$url = "https://www.klikandpay.com/cgi-bin/connexion.pl?FROM=869B834067";
} else {
$url = "https://www.klikandpay.com/cgi-bin/connexion.pl?FROM=869B834067&L=en";
}
$logo = '<img src="https://www.klikandpay.com/images/logo_en.png" style="width: 150px;">';
$html = '<p><a target="_blank" href="' . $url . '" >' . $logo . '</a></p>';
$html .= '<p><a class="signin-button-link" href="' . $url . '" target="_blank">' . vmText::_('VMPAYMENT_KLIKANDPAY_GET') . '</a>';
$html .= ' <a target="_blank" href="https://www.youtube.com/watch?v=DVcUU3FiuMM" class="signin-button-link">' . vmText::_('VMPAYMENT_KLIKANDPAY_DOCUMENTATION') . '</a></p>';
return $html;
}
示例5: getInput
function getInput()
{
vmJsApi::addJScript('/plugins/vmpayment/klarnacheckout/klarnacheckout/assets/js/admin.js');
vmJsApi::css('klarnacheckout', 'plugins/vmpayment/klarnacheckout/klarnacheckout/assets/css/');
$jlang = JFactory::getLanguage();
$lang = $jlang->getTag();
$langArray = explode("-", $lang);
$lang = strtolower($langArray[1]);
$countriesData = KlarnaHandler::countriesData();
$signLang = "en";
foreach ($countriesData as $countryData) {
if ($countryData['country_code'] == $lang) {
$signLang = $lang;
break;
}
}
/*
$logo = '<a href="https://merchants.klarna.com/signup?locale=' . $signLang . '&partner_id=7829355537eae268a17667c199e7c7662d3391f7" target="_blank">
<img src="' . JURI::root () . VMKLARNAPLUGINWEBROOT . '/klarna/assets/images/logo/get_klarna_now.png" /></a> ';
*/
$logo = '<img src="' . JURI::root() . VMKLARNAPLUGINWEBROOT . '/klarna/assets/images/logo/get_klarna_now.jpg" style="margin-bottom: 10px"/>';
$html = '<p><a href="#" id="klarna_getklarna_link" ">' . $logo . '</a></p>';
// https://merchants.klarna.com/signup?locale=en&partner_id=7829355537eae268a17667c199e7c7662d3391f7&utm_campaign=Platform&utm_medium=Partners&utm_source=Virtuemart
$html .= '<div id="klarna_getklarna_show_hide" >';
$url = "https://merchants.klarna.com/signup/?locale=" . $signLang . "&partner_id=7829355537eae268a17667c199e7c7662d3391f7&utm_campaign=Platform&utm_medium=Partners&utm_source=Virtuemart";
$js = '
jQuery(document).ready(function( $ ) {
$("#klarna_getklarna_show_hide").hide();
jQuery("#klarna_getklarna_link").click( function() {
if ( $("#klarna_getklarna_show_hide").is(":visible") ) {
$("#klarna_getklarna_show_hide").hide("slow");
$("#klarna_getklarna_link").html("' . addslashes($logo) . '");
} else {
$("#klarna_getklarna_show_hide").show("slow");
$("#klarna_getklarna_link").html("' . addslashes(vmText::_('VMPAYMENT_KLARNA_GET_KLARNA_HIDE')) . '");
}
});
});
';
vmJsApi::addJScript('vm.getKlarna', $js);
$html .= '<iframe src="' . $url . '" scrolling="yes" style="x-overflow: none;" frameborder="0" height="600px" width="850px"></iframe>';
$html .= '</div>';
$html .= '<p><a target="_blank" href="http://cdn.klarna.com/1.0/shared/content/integration/guide/virtuemart.pdf" class="signin-button-link">' . vmText::_('VMPAYMENT_KLARNA_DOCUMENTATION') . '</a></p>';
return $html;
}
示例6: sendPostRequest
function sendPostRequest () {
$post_variables = $this->getPostVariables();
$jump_url = $this->getJumpUrl();
$html = '';
if ($this->_method->debug) {
$html .= '<form action="' . $jump_url . '" method="post" name="vm_realex_form" target="realex">';
} else {
if (vmconfig::get('css')) {
$msg = vmText::_('VMPAYMENT_REALEX_HPP_API_REDIRECT_MESSAGE', true);
} else {
$msg='';
}
vmJsApi::addJScript('vm.paymentFormAutoSubmit', '
jQuery(document).ready(function($){
jQuery("body").addClass("vmLoading");
var msg="'.$msg.'";
jQuery("body").append("<div class=\"vmLoadingDiv\"><div class=\"vmLoadingDivMsg\">"+msg+"</div></div>");
jQuery("#vmPaymentForm").submit();
})
');
$html .= '<form action="' . $jump_url . '" method="post" name="vm_realex_form" id="vmPaymentForm" accept-charset="UTF-8">';
}
$html .= '<input type="hidden" name="charset" value="utf-8">';
foreach ($post_variables as $name => $value) {
$html .= '<input type="hidden" name="' . $name . '" value="' . $value . '" />';
}
if ($this->_method->debug) {
$html .= '<div style="background-color:red;color:white;padding:10px;">
<input type="submit" value="The method is in debug mode. Click here to be redirected to Realex" />
</div>';
$this->debugLog($post_variables, 'sendPostRequest:', 'debug');
}
$html .= '</form>';
return $html;
}
示例7: showActionOrderBEPayment
private function showActionOrderBEPayment($virtuemart_order_id, $virtuemart_paymentmethod_id, $payments)
{
$orderModel = VmModel::getModel('orders');
$order = $orderModel->getOrder($virtuemart_order_id);
$options = array();
if ($this->isDelayedSettlement()) {
$options[] = JHTML::_('select.option', 'settlePayment', vmText::_('VMPAYMENT_REALEX_HPP_API_ORDER_BE_CAPTURE'), 'value', 'text');
}
$options[] = JHTML::_('select.option', 'rebatePayment', vmText::_('VMPAYMENT_REALEX_HPP_API_ORDER_BE_REBATE'), 'value', 'text');
$actionList = JHTML::_('select.genericlist', $options, 'action', '', 'value', 'text', 'capturePayment', 'action', true);
$html = '<table class="adminlist table" >' . "\n";
$html .= $this->getHtmlHeaderBE();
$html .= '<form action="index.php" method="post" name="updateOrderBEPayment" id="updateOrderBEPayment">';
$html .= '<tr ><td >';
$html .= $actionList;
$html .= ' </td><td>';
$html .= '<input type="text" id="amount" name="amount" size="20" value="" class="required" maxlength="25" placeholder="' . vmText::sprintf('VMPAYMENT_REALEX_HPP_API_ORDER_BE_AMOUNT', shopFunctions::getCurrencyByID($payments[0]->payment_currency, 'currency_code_3')) . '"/>';
$html .= '<input type="hidden" name="type" value="vmpayment"/>';
$html .= '<input type="hidden" name="name" value="realex_hpp_api"/>';
$html .= '<input type="hidden" name="view" value="plugin"/>';
$html .= '<input type="hidden" name="option" value="com_virtuemart"/>';
$html .= '<input type="hidden" name="virtuemart_order_id" value="' . $virtuemart_order_id . '"/>';
$html .= '<input type="hidden" name="virtuemart_paymentmethod_id" value="' . $virtuemart_paymentmethod_id . '"/>';
$html .= '<a class="updateOrderBEPayment btn btn-small" href="#" >' . vmText::_('COM_VIRTUEMART_SAVE') . '</a>';
$html .= '</form>';
$html .= ' </td></tr>';
vmJsApi::addJScript('vmRealex.updateOrderBEPayment', "\n\t\tjQuery(document).ready( function(\$) {\n\t\t\tjQuery('.updateOrderBEPayment').click(function() {\n\t\t\t\tdocument.updateOrderBEPayment.submit();\n\t\t\t\treturn false;\n\n\t});\n});\n");
//$html .= '</table>' ;
return $html;
}
示例8: addCheckRequiredJs
public static function addCheckRequiredJs()
{
$j = 'jQuery(document).ready(function(){
jQuery(".required").change(function(){
var count = 0;
var hit = 0;
jQuery.each(jQuery(".required"), function (key, value){
count++;
if(jQuery(this).attr("checked")){
hit++;
}
});
if(count==hit){
console.log("Now fire");
var form = jQuery("#checkoutFormSubmit");
//document.checkoutForm.task = "checkout";
document.checkoutForm.submit()
}
});
});';
vmJsApi::addJScript('autocheck', $j);
}
示例9: defined
* @subpackage
* @author Max Milbers, Valerie Isaksen
* @link http://www.virtuemart.net
* @copyright Copyright (c) 2004 - 2014 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_showprices.php 8024 2014-06-12 15:08:59Z Milbo $
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
static $ask_recommened_loaded = false;
if ($ask_recommened_loaded) {
return '';
}
$product = $viewData['product'];
// addon for joomla modal Box
JHtml::_('behavior.modal');
if (VmConfig::get('usefancy', 1)) {
vmJsApi::addJScript('fancybox/jquery.fancybox-1.3.4.pack', false);
vmJsApi::css('jquery.fancybox-1.3.4');
$Modal = "\n\t\t\t\$('a.ask-a-question, a.printModal, a.recommened-to-friend, a.manuModal').click(function(event){\n event.preventDefault();\n\t\t \$.fancybox({\n\t\t href: \$(this).attr('href'),\n\t\t type: 'iframe',\n\t\t height: 550\n\t\t });\n\t\t });\n\t\t\t";
} else {
vmJsApi::addJScript('facebox', false);
vmJsApi::css('facebox');
$Modal = "\n \t\t\$('a.ask-a-question, a.printModal, a.recommened-to-friend, a.manuModal').click(function(event){\n\t\t event.preventDefault();\n\t\t \$.facebox({\n\t\t iframe: \$(this).attr('href'),\n\t\t rev: 'iframe|550|550'\n\t\t });\n\t\t });\n \t\t";
}
vmJsApi::addJScript('popups', "\n//<![CDATA[\n\tjQuery(document).ready(function(\$) {\n\t\t" . $Modal . "\n\t});\n//]]>\n");
示例10: defined
<?php
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.modal');
$js = "\njQuery(document).ready(function () {\n jQuery('.orderlistcontainer').hover(\n function() { jQuery(this).find('.orderlist').stop().show()},\n function() { jQuery(this).find('.orderlist').stop().hide()}\n )\n\t\n\t// Click Button\n\tfunction display(view) {\n\t\tjQuery('.browse-view .row').removeClass('vm-list vm-grid').addClass(view);\n\t\tjQuery('.icon-list-grid .vm-view').removeClass('active');\n\t\tif(view == 'vm-list') {\n\t\t\tjQuery('.browse-view .product').addClass('col-lg-12');\n\t\t\tjQuery('.products-list .product .vm-product-media-container').addClass('col-md-4');\n\t\t\tjQuery('.products-list .product .product-info').addClass('col-md-8');\n\t\t\tjQuery('.icon-list-grid .' + view).addClass('active');\n\t\t}else{\n\t\t\tjQuery('.browse-view .product').removeClass('col-lg-12');\n\t\t\tjQuery('.products-list .product .vm-product-media-container').removeClass('col-md-4');\n\t\t\tjQuery('.products-list .product .product-info').removeClass('col-md-8');\n\t\t\tjQuery('.icon-list-grid .' + view).addClass('active');\n\t\t}\n\t}\n\t\t\n jQuery('.vm-view-list .vm-view').each(function() {\n var ua = navigator.userAgent,\n event = (ua.match(/iPad/i)) ? 'touchstart' : 'click';\n jQuery(this).bind(event, function() {\n jQuery(this).addClass(function() {\n if(jQuery(this).hasClass('active')) return '';\n return 'active';\n });\n jQuery(this).siblings('.vm-view').removeClass('active');\n\t\t\tcatalog_mode = jQuery(this).data('view');\n\t\t\tdisplay(catalog_mode);\n\t\t\t\n });\n\n });\n});\n";
vmJsApi::addJScript('vm.hover', $js);
if (empty($this->keyword) and !empty($this->category)) {
?>
<div class="category_description">
<?php
//echo $this->category->images;
?>
<?php
echo $this->category->category_description;
?>
</div>
<?php
}
// Show child categories
if (VmConfig::get('showCategory', 1) and empty($this->keyword)) {
if (!empty($this->category->haschildren)) {
echo ShopFunctionsF::renderVmSubLayout('categories', array('categories' => $this->category->children));
}
}
if ($this->showproducts) {
?>
<div class="browse-view">
<?php
if (!empty($this->keyword)) {
//id taken in the view.html.php could be modified
示例11: array
<!-- End View Category -->
</div>
<?php
}
?>
</div>
<?php
// Show child categories
// Show child categories
if (VmConfig::get('showCategory', 1) and empty($this->keyword)) {
if (!empty($this->category->haschildren)) {
echo ShopFunctionsF::renderVmSubLayout('categories', array('categories' => $this->category->children));
}
}
?>
<?php
$j = "Virtuemart.container = jQuery('.category-view');\nVirtuemart.containerSelector = '.category-view';";
vmJsApi::addJScript('ajaxContent', $j);
?>
<!-- end browse-view -->
示例12: addCheckRequiredJs
public static function addCheckRequiredJs()
{
$updF = '';
if (VmConfig::get('oncheckout_ajax', false)) {
$updF = 'Virtuemart.updForm();';
}
$j = 'jQuery(document).ready(function(){
jQuery(".output-shipto").find(":radio").change(function(){
var form = jQuery("#checkoutFormSubmit");
jQuery(this).vm2front("startVmLoading");
document.checkoutForm.submit();
});
jQuery("#checkoutForm").change(function(){
jQuery("#checkoutFormSubmit").attr("name","checkout");
jQuery("#checkoutFormSubmit").html("<span>' . vmText::_('COM_VIRTUEMART_CHECKOUT_TITLE') . '</span>");
});
jQuery(".required").change(function(){
var count = 0;
var hit = 0;
jQuery.each(jQuery(".required"), function (key, value){
count++;
if(jQuery(this).attr("checked")){
hit++;
}
});
if(count==hit){
//jQuery(this).vm2front("startVmLoading");
var form = jQuery("#checkoutFormSubmit");
form.attr("task","checkout");
' . $updF . '
form.submit();
//jQuery(this).vm2front("stopVmLoading");
}
});
});';
vmJsApi::addJScript('autocheck', $j);
}
示例13: getConfirmedHtml
/**
* @param $post_variables
* @return string
*/
function getConfirmedHtml($post_variables)
{
$pbxServer = $this->getPayboxServerUrl();
// add spin image
$html = '';
if ($this->_method->debug) {
$html .= '<form action="' . $pbxServer . '" method="post" name="vm_paybox_form" target="paybox">';
} else {
if (tsmConfig::get('css')) {
$msg = tsmText::_('VMPAYMENT_PAYBOX_REDIRECT_MESSAGE', true);
} else {
$msg = '';
}
vmJsApi::addJScript('vm.paymentFormAutoSubmit', '
jQuery(document).ready(function($){
jQuery("body").addClass("vmLoading");
var msg="' . $msg . '";
jQuery("body").append("<div class=\\"vmLoadingDiv\\"><div class=\\"vmLoadingDivMsg\\">"+msg+"</div></div>");
jQuery("#vmPaymentForm").submit();
})
');
$html .= '<form action="' . $pbxServer . '" method="post" name="vm_paybox_form" id="vmPaymentForm">';
}
foreach ($post_variables as $name => $value) {
$html .= '<input type="hidden" name="' . $name . '" value="' . $value . '" />';
}
if ($this->_method->debug) {
$this->plugin->debugLog($this->_method->virtuemart_paymentmethod_id, 'sendPostRequest: payment method', 'debug');
$this->plugin->debugLog($pbxServer, 'sendPostRequest: Server', 'debug');
$html .= '<div style="background-color:red;color:white;padding:10px;">
<input type="submit" value="The method is in debug mode. Click here to be redirected to Paybox" />
</div>';
$this->plugin->debugLog($post_variables, 'sendPostRequest:', 'debug');
} else {
$html .= '<input type="submit" value="' . tsmText::_('VMPAYMENT_PAYBOX_REDIRECT_MESSAGE') . '" />';
}
$html .= '</form>';
return $html;
}
示例14: defined
*
* @package tsmart
* @subpackage Orders
* @author Oscar van Eijk
* @link http://www.tsmart.net
* @copyright Copyright (c) 2004 - 2010 tsmart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* tsmart 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: order_editstatus.php 8682 2015-02-04 23:21:06Z Milbo $
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
vmJsApi::addJScript('orderstatus', "\n\n\t\tfunction cancelOrderStatFormEdit(e) {\n\t\t\tjQuery('#orderStatForm').each(function(){\n\t\t\t\tthis.reset();\n\t\t\t});\n\t\t\tjQuery('#order_items_status')\n\t\t\t\t.find('option:selected').prop('selected', true)\n\t\t\t\t.end().trigger('liszt:updated');\n\t\t\tjQuery('div#updateOrderStatus').hide();\n\t\t\te.preventDefault();\n\t\t}\n\n\t\t");
?>
<form action="index.php" method="post" name="orderStatForm" id="orderStatForm">
<fieldset>
<table class="admintable table" >
<tr>
<td align="center" colspan="2">
<h1><?php
echo tsmText::_('com_tsmart_ORDER_UPDATE_STATUS');
?>
</h1>
</td>
</tr>
<tr>
<td class="key"><?php
示例15: imitateTabs
/**
* Admin UI Tabs Imitation
* Gives A Tab Based Navigation Back And Loads The Templates With A Nice Design
* @param $return = return the start tag or the closing tag - choose 'start' or 'end'
* @params $language = pass the language string
*/
static function imitateTabs($return, $language = '')
{
if ($return == 'start') {
vmJsApi::addJScript('vm.cookietab', '
var virtuemartcookie="vm-tab";
');
$html = '<div id="admin-ui-tabs">
<div class="tabs" title="' . vmText::_($language) . '">';
echo $html;
}
if ($return == 'end') {
$html = ' </div>
</div>';
echo $html;
}
}