本文整理汇总了PHP中ZendX_JQuery_View_Helper_JQuery::enableNoConflictMode方法的典型用法代码示例。如果您正苦于以下问题:PHP ZendX_JQuery_View_Helper_JQuery::enableNoConflictMode方法的具体用法?PHP ZendX_JQuery_View_Helper_JQuery::enableNoConflictMode怎么用?PHP ZendX_JQuery_View_Helper_JQuery::enableNoConflictMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZendX_JQuery_View_Helper_JQuery
的用法示例。
在下文中一共展示了ZendX_JQuery_View_Helper_JQuery::enableNoConflictMode方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _initView
protected function _initView()
{
// Initialize view
$view = new Zend_View();
$view->doctype('XHTML1_STRICT');
$view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8');
$view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
$view->addHelperPath('App/View/Helper/', 'App_View_Helper');
$view->addHelperPath('ZendX/JQuery/View/Helper', 'ZendX_JQuery_View_Helper');
Zend_Dojo::enableView($view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
// Add it to the ViewRenderer
$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
$viewRenderer->setView($view);
//seulement si on utilise d'autres frameworks ajax
ZendX_JQuery_View_Helper_JQuery::enableNoConflictMode();
// Return it, so that it can be stored by the bootstrap
return $view;
}
示例2: _initView
protected function _initView()
{
// Initialize view
$view = new Zend_View();
$view->doctype('HTML5');
$view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8');
//$view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
$view->addHelperPath('ZendX/JQuery/View/Helper', 'ZendX_JQuery_View_Helper');
//jQuery
$view->jQuery()->setLocalPath('/jtables/scripts/jquery-1.9.1.js')->setUiLocalPath('/jtables/scripts/jquery-ui-1.10.1.custom.js')->addStyleSheet('/jtables/css/jquery-ui-1.10.1.custom.css');
$view->headLink()->appendStylesheet('/jtables/scripts/jtable/themes/lightcolor/blue/jtable.css')->appendStylesheet('/jtables/css/bootstrap.css')->appendStylesheet('/jtables/css/bootstrap-theme.css');
//Script
$view->headScript()->appendFile('/jtables/scripts/jquery-1.6.4.min.js')->appendFile('/jtables/scripts/jquery-ui-1.8.16.custom.min.js')->appendFile('/jtables/scripts/jtable/jquery.jtable.min.js')->appendFile('/jtables/scripts/jtable/localization/jquery.jtable.fr.js');
//->appendFile('/jtables/scripts/bootstrap.js');
//Zend_Dojo::enableView($view);
Zend_Paginator::setDefaultScrollingStyle('Elastic');
Zend_View_Helper_PaginationControl::setDefaultViewPartial('partials/pagination.phtml');
// Add it to the ViewRenderer
$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
$viewRenderer->setView($view);
//seulement si on utilise d'autres frameworks ajax
ZendX_JQuery_View_Helper_JQuery::enableNoConflictMode();
return $view;
}
示例3: _parseOptions
/**
* Parse options to find those pertinent to jquery helper and invoke them
*
* @param array $options
* @return void
*/
protected function _parseOptions(array $options)
{
$options = array_merge($options, array('cdn_ssl' => false));
foreach ($options as $key => $value) {
switch($key) {
case 'noconflictmode':
if (!(bool)$value) {
ZendX_JQuery_View_Helper_JQuery::disableNoConflictMode();
} else {
ZendX_JQuery_View_Helper_JQuery::enableNoConflictMode();
}
break;
case 'version':
$this->_view->JQuery()->setVersion($value);
break;
case 'localpath':
$this->_view->JQuery()->setLocalPath($value);
break;
case 'uiversion':
case 'ui_version':
$this->_view->JQuery()->setUiVersion($value);
break;
case 'uilocalpath':
case 'ui_localpath':
$this->_view->JQuery()->setUiLocalPath($value);
break;
case 'cdn_ssl':
$this->_view->JQuery()->setCdnSsl($value);
break;
case 'render_mode':
case 'rendermode':
$this->_view->JQuery()->setRenderMode($value);
break;
case 'javascriptfile':
$this->_view->JQuery()->addJavascriptFile($value);
break;
case 'javascriptfiles':
foreach($options['javascriptfiles'] as $file) {
$this->_view->JQuery()->addJavascriptFile($file);
}
break;
case 'stylesheet':
$this->_view->JQuery()->addStylesheet($value);
break;
case 'stylesheets':
foreach ($value as $stylesheet) {
$this->_view->JQuery()->addStylesheet($stylesheet);
}
break;
}
}
if ((isset($options['uienable']) && (bool) $options['uienable'])
|| (isset($options['ui_enable']) && (bool) $options['ui_enable'])
|| (!isset($options['ui_enable']) && !isset($options['uienable'])))
{
$this->_view->JQuery()->uiEnable();
} else {
$this->_view->JQuery()->uiDisable();
}
}
示例4: testNoConflictModeIsRecognizedInRenderingOnLoadStackEvent
/**
* @group ZF-5344
*/
public function testNoConflictModeIsRecognizedInRenderingOnLoadStackEvent()
{
ZendX_JQuery_View_Helper_JQuery::enableNoConflictMode();
$this->jquery->addOnLoad("foo");
$this->jquery->addOnLoad("bar");
$this->jquery->enable();
$jQueryStack = $this->jquery->__toString();
$this->assertContains('$j(document).ready(function()', $jQueryStack);
ZendX_JQuery_View_Helper_JQuery::disableNoConflictMode();
$jQueryStack = $this->jquery->__toString();
$this->assertNotContains('$j(document).ready(function()', $jQueryStack);
}
示例5: Zend_Config_Ini
Zend_Session::start();
//load configuration
$config = new Zend_Config_Ini("../application/config.ini", "dev");
$registry = Zend_Registry::getInstance();
$registry->set('config', $config);
//setup database
$db = Zend_Db::factory($config->db);
Zend_Db_Table::setDefaultAdapter($db);
$registry->set('db', $db);
$db->query("SET NAMES 'utf8'");
//setup view
$view = new Zend_View();
$view->addHelperPath('Wildfire/View/Helper', 'Wildfire_View_Helper');
$view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
$view->jQuery()->enable();
ZendX_JQuery_View_Helper_JQuery::enableNoConflictMode();
//$view->headScript()->appendFile($view->baseUrl().'/scripts/jquery.corner.js');
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
//setup cache
$frontendOptions = array('lifetime' => $config->cache->frontendOptions->maxLifetime, 'automatic_serialization' => true);
$backendOptions = array('cache_dir' => $config->cache->backendOptions->cache_dir, 'lifetime' => $config->cache->backendOptions->maxLifetime);
$cache = Zend_Cache::factory('Core', 'File', $frontendOptions, $backendOptions);
$registry->set('cache', $cache);
$registry->set('testEnv', $testEnv);
// setup controller
$frontController = Zend_Controller_Front::getInstance();
if ($testEnv == 1) {
$frontController->throwExceptions(true);
}
示例6: testShouldAllowUsingCompleteEffects
/**
* @dataProvider dataCompleteEffects
* @param <type> $effect
* @param <type> $js
*/
public function testShouldAllowUsingCompleteEffects($effect, $js)
{
$link = $this->view->ajaxLink("Link to Inject", "inject.html", array('update' => '#test', 'inline' => true, 'complete' => $effect));
$this->assertContains(sprintf("\$('#test').%s", $js), $link);
ZendX_JQuery_View_Helper_JQuery::enableNoConflictMode();
$link = $this->view->ajaxLink("Link to Inject", "inject.html", array('update' => '#test', 'inline' => true, 'complete' => $effect));
$this->assertContains(sprintf("\$j('#test').%s", $js), $link);
}