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


PHP ZurmoHtml::script方法代码示例

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


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

示例1: actionStepTwo

 /**
  * Upgrade step two:
  */
 public function actionStepTwo()
 {
     // Upgrade process can take much time, because upgrade schema script.
     // Set timeout for upgrade to 12 hours.
     set_time_limit(12 * 60 * 60);
     Yii::app()->gameHelper->muteScoringModelsOnSave();
     $nextView = new UpgradeStepTwoCompleteView($this->getId(), $this->getModule()->getId());
     $view = new InstallPageView($nextView);
     echo $view->render();
     $template = ZurmoHtml::script("\$('#logging-table').prepend('{message}<br/>');");
     $messageStreamer = new MessageStreamer($template);
     $messageStreamer->setExtraRenderBytes(4096);
     $messageStreamer->add(Zurmo::t('InstallModule', 'Starting upgrade process.'));
     UpgradeUtil::runPart2($messageStreamer);
     ForgetAllCacheUtil::forgetAllCaches();
     echo ZurmoHtml::script('$("#progress-table").hide(); $("#upgrade-step-two").show();');
     Yii::app()->gameHelper->unmuteScoringModelsOnSave();
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:21,代码来源:UpgradeController.php

示例2: actionInstallDemoData

 /**
  * Added forgetAllCaches in case you are debugging and want to run this action again with a saved db.
  */
 public function actionInstallDemoData()
 {
     RedBeanDatabase::setup(Yii::app()->db->connectionString, Yii::app()->db->username, Yii::app()->db->password);
     InstallUtil::freezeDatabase();
     ForgetAllCacheUtil::forgetAllCaches();
     Yii::app()->user->userModel = User::getByUsername('super');
     $nextView = new InstallCompleteView($this->getId(), $this->getModule()->getId());
     $view = new InstallPageView($nextView);
     echo $view->render();
     $template = ZurmoHtml::script("\$('#logging-table').prepend('{message}<br/>');");
     $messageStreamer = new MessageStreamer($template);
     $messageStreamer->add(Zurmo::t('InstallModule', 'Starting to load demo data.'));
     $messageLogger = new MessageLogger($messageStreamer);
     DemoDataUtil::load($messageLogger, 6);
     $messageStreamer->add(Zurmo::t('InstallModule', 'Finished loading demo data.'));
     $messageStreamer->add(Zurmo::t('InstallModule', 'Locking Installation.'));
     InstallUtil::writeInstallComplete(INSTANCE_ROOT);
     ForgetAllCacheUtil::forgetAllCaches();
     echo ZurmoHtml::script('$("#progress-table").hide(); $("#complete-table").show();');
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:23,代码来源:DefaultController.php

示例3: actionQueueJob

 public function actionQueueJob($type, $delay = 0, $messageLoggerClassName = 'MessageLogger')
 {
     if (!Group::isUserASuperAdministrator(Yii::app()->user->userModel)) {
         echo Zurmo::t('JobsManagerModule', 'Only super administrators can run jobs from the browser');
         Yii::app()->end(0, false);
     }
     if (!Yii::app()->jobQueue->isEnabled()) {
         echo Zurmo::t('JobsManagerModule', 'Job queuing must be enabled in order to queue a job');
         Yii::app()->end(0, false);
     }
     $breadCrumbLinks = array(Zurmo::t('JobsManagerModule', 'JobsManagerModuleSingularLabel', LabelUtil::getTranslationParamsForAllModules()) => array('/jobsManager/default'), Yii::app()->jobQueue->getQueueJobLabel());
     $messageLogger = new $messageLoggerClassName();
     $queueJobView = new QueueJobView($this->getId(), $this->getModule()->getId(), $type, (int) $delay, $messageLogger);
     $view = new JobsManagerPageView(ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $queueJobView, $breadCrumbLinks, 'SettingsBreadCrumbView'));
     echo $view->render();
     $template = ZurmoHtml::script("\$('#logging-table ol').append('<li>{message}</li>');");
 }
开发者ID:KulturedKitsch,项目名称:kulturedkitsch.info,代码行数:17,代码来源:DefaultController.php

示例4: actionRunJob

 public function actionRunJob($type, $timeLimit = 500, $messageLoggerClassName = 'MessageLogger')
 {
     if (!Group::isUserASuperAdministrator(Yii::app()->user->userModel)) {
         echo Zurmo::t('JobsManagerModule', 'Only super administrators can run jobs from the browser');
         Yii::app()->end(0, false);
     }
     $breadcrumbLinks = array(Zurmo::t('JobsManagerModule', 'Run Job'));
     $runJobView = new RunJobView($this->getId(), $this->getModule()->getId(), $type, (int) $timeLimit);
     $view = new JobsManagerPageView(ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $runJobView, $breadcrumbLinks, 'JobsManagerBreadCrumbView'));
     echo $view->render();
     $template = ZurmoHtml::script("\$('#logging-table ol').append('<li>{message}</li>');");
     JobsManagerUtil::runFromJobManagerCommandOrBrowser($type, (int) $timeLimit, $messageLoggerClassName, $template);
     echo ZurmoHtml::script('$("#progress-table").hide(); $("#complete-table").show();');
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:14,代码来源:DefaultController.php


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