當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。