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


PHP js::closeModal方法代码示例

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


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

示例1: upload

 public function upload($productID, $planID, $sprintID)
 {
     if (!empty($_FILES)) {
         $msg = $this->importbugs->uploadExcel('', $productID, $planID, $sprintID);
         echo "<script>alert('{$msg}')</script>";
         // if(isonlybody()) die(js::closeModal('parent'));
         die(js::closeModal('parent'));
     }
     $this->display();
 }
开发者ID:XMGmen,项目名称:zentao,代码行数:10,代码来源:control.php

示例2: editImage

 public function editImage($userId)
 {
     if (!empty($_FILES)) {
         $this->loadModel('myImage')->uploadImg();
         if (isonlybody()) {
             die(js::closeModal('parent'));
         }
     }
     $file = $this->loadModel('myImage')->getFile($userId);
     $this->view->file = $file;
     $this->display();
 }
开发者ID:XMGmen,项目名称:zentao,代码行数:12,代码来源:control.php

示例3: edit

 public function edit($projectID)
 {
     // echo "edit";
     if (!empty($_POST)) {
         $changes = $this->project->update($projectID);
         $this->project->updateProducts($projectID);
         if (dao::isError()) {
             die(js::error(dao::getError()));
         }
         if ($changes) {
             $actionID = $this->loadModel('action')->create('project', $projectID, 'edited');
             $this->action->logHistory($actionID, $changes);
         }
         if (isonlybody()) {
             die(js::closeModal('parent.parent'));
         }
         die(js::locate(inlink('view', "projectID={$projectID}"), 'parent'));
     }
     /* Judge a private todo or not, If private, die. */
     /* Set menu. */
     $this->project->setMenu($this->projects, $projectID);
     $projects = array('' => '') + $this->projects;
     $project = $this->project->getById($projectID);
     $managers = $this->project->getDefaultManagers($projectID);
     if ($project->private and $this->app->user->account != $project->account) {
         die('private');
     }
     /* Remove current project from the projects. */
     unset($projects[$projectID]);
     $title = $this->lang->project->edit . $this->lang->colon . $project->name;
     $position[] = html::a($browseProjectLink, $project->name);
     $position[] = $this->lang->project->edit;
     $allProducts = $this->loadModel('product')->getPairs('noclosed|nocode');
     $linkedProducts = $this->project->getProducts($project->id);
     $allProducts += $linkedProducts;
     $linkedProducts = join(',', array_keys($linkedProducts));
     $this->view->title = $title;
     $this->view->position = $position;
     $this->view->projects = $projects;
     $this->view->project = $project;
     $this->view->poUsers = $this->loadModel('user')->getPairs('noclosed,nodeleted,pofirst', $project->PO);
     $this->view->pmUsers = $this->user->getPairs('noclosed,nodeleted,pmfirst', $project->PM);
     $this->view->qdUsers = $this->user->getPairs('noclosed,nodeleted,qdfirst', $project->QD);
     $this->view->rdUsers = $this->user->getPairs('noclosed,nodeleted,devfirst', $project->RD);
     $this->view->groups = $this->loadModel('group')->getPairs();
     $this->view->allProducts = $allProducts;
     $this->view->linkedProducts = $linkedProducts;
     $this->display();
 }
开发者ID:XMGmen,项目名称:zentao,代码行数:49,代码来源:control.php

示例4: close

 /**
  * Close a story.
  * 
  * @param  int    $storyID 
  * @access public
  * @return void
  */
 public function close($storyID)
 {
     if (!empty($_POST)) {
         $changes = $this->story->close($storyID);
         if (dao::isError()) {
             die(js::error(dao::getError()));
         }
         $actionID = $this->action->create('story', $storyID, 'Closed', $this->post->comment, ucfirst($this->post->closedReason));
         $this->action->logHistory($actionID, $changes);
         $this->sendmail($storyID, $actionID);
         if (isonlybody()) {
             die(js::closeModal('parent.parent', 'this'));
         }
         die(js::locate(inlink('view', "storyID={$storyID}"), 'parent'));
     }
     /* Get story and product. */
     $story = $this->story->getById($storyID);
     $product = $this->dao->findById($story->product)->from(TABLE_PRODUCT)->fields('name, id')->fetch();
     /* Set menu. */
     $this->product->setMenu($this->product->getPairs(), $product->id);
     /* Set the closed reason options. */
     if ($story->status == 'draft') {
         unset($this->lang->story->reasonList['cancel']);
     }
     $this->view->title = $this->lang->story->close . "STORY" . $this->lang->colon . $story->title;
     $this->view->position[] = html::a($this->createLink('product', 'browse', "product={$product->id}"), $product->name);
     $this->view->position[] = $this->lang->story->common;
     $this->view->position[] = $this->lang->story->close;
     $this->view->product = $product;
     $this->view->story = $story;
     $this->view->actions = $this->action->getList('story', $storyID);
     $this->view->users = $this->loadModel('user')->getPairs();
     $this->display();
 }
开发者ID:iamazhi,项目名称:zentaopms,代码行数:41,代码来源:control.php

示例5: close

 /**
  * Close a bug.
  * 
  * @param  int    $bugID 
  * @access public
  * @return void
  */
 public function close($bugID)
 {
     if (!empty($_POST)) {
         $this->bug->close($bugID);
         if (dao::isError()) {
             die(js::error(dao::getError()));
         }
         $actionID = $this->action->create('bug', $bugID, 'Closed', $this->post->comment);
         $this->sendmail($bugID, $actionID);
         if (isonlybody()) {
             die(js::closeModal('parent.parent'));
         }
         die(js::locate($this->createLink('bug', 'view', "bugID={$bugID}"), 'parent'));
     }
     $bug = $this->bug->getById($bugID);
     $productID = $bug->product;
     $this->bug->setMenu($this->products, $productID, $bug->branch);
     $this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->close;
     $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID={$productID}"), $this->products[$productID]);
     $this->view->position[] = $this->lang->bug->close;
     $this->view->bug = $bug;
     $this->view->users = $this->user->getPairs('noletter');
     $this->view->actions = $this->action->getList('bug', $bugID);
     $this->display();
 }
开发者ID:jsyinwenjun,项目名称:zentao,代码行数:32,代码来源:control.php

示例6: copy

 /**
  * Copy a group.
  * 
  * @param  int    $groupID 
  * @access public
  * @return void
  */
 public function copy($groupID)
 {
     if (!empty($_POST)) {
         $this->group->copy($groupID);
         if (dao::isError()) {
             die(js::error(dao::getError()));
         }
         if (isonlybody()) {
             die(js::closeModal('parent.parent', 'this'));
         }
         die(js::locate($this->createLink('group', 'browse'), 'parent'));
     }
     $this->view->title = $this->lang->group->copy;
     $this->view->position[] = $this->lang->group->copy;
     $this->view->group = $this->group->getById($groupID);
     $this->display();
 }
开发者ID:leowh,项目名称:colla,代码行数:24,代码来源:control.php

示例7: runCase

 /**
  * Run case.
  * 
  * @param  int    $runID 
  * @param  String $extras   others params, forexample, caseID=10, version=3
  * @access public
  * @return void
  */
 public function runCase($runID, $caseID = 0, $version = 0)
 {
     if ($caseID) {
         $run = new stdclass();
         $run->case = $this->loadModel('testcase')->getById($caseID, $version);
     } else {
         $run = $this->testtask->getRunById($runID);
     }
     $caseID = $caseID ? $caseID : $run->case->id;
     $preAndNext = $this->loadModel('common')->getPreAndNextObject('testcase', $caseID);
     if (!empty($_POST)) {
         $this->testtask->createResult($runID);
         if (dao::isError()) {
             die(js::error(dao::getError()));
         }
         /* set cookie for ajax load caselist when close colorbox. */
         setcookie('selfClose', 1);
         if ($preAndNext->next) {
             $nextRunID = $runID ? $preAndNext->next->id : 0;
             $nextCaseID = $runID ? $preAndNext->next->case : $preAndNext->next->id;
             $nextVersion = $preAndNext->next->version;
             die(js::locate(inlink('runCase', "runID={$nextRunID}&caseID={$nextCaseID}&version={$nextVersion}")));
         } else {
             die(js::closeModal('parent'));
         }
     }
     $preCase = '';
     $nextCase = '';
     if ($preAndNext->pre) {
         $preCase['runID'] = $runID ? $preAndNext->pre->id : 0;
         $preCase['caseID'] = $runID ? $preAndNext->pre->case : $preAndNext->pre->id;
         $preCase['version'] = $preAndNext->pre->version;
     }
     if ($preAndNext->next) {
         $nextCase['runID'] = $runID ? $preAndNext->next->id : 0;
         $nextCase['caseID'] = $runID ? $preAndNext->next->case : $preAndNext->next->id;
         $nextCase['version'] = $preAndNext->next->version;
     }
     $this->view->run = $run;
     $this->view->preCase = $preCase;
     $this->view->nextCase = $nextCase;
     $this->view->results = $this->testtask->getResults($runID, $caseID);
     $this->view->users = $this->loadModel('user')->getPairs('noclosed, noletter');
     $this->view->caseID = $caseID;
     $this->view->version = $version;
     die($this->display());
 }
开发者ID:fanscky,项目名称:HTPMS,代码行数:55,代码来源:control.php

示例8: activate

 /**
  * Activate a task.
  * 
  * @param  int    $taskID 
  * @access public
  * @return void
  */
 public function activate($taskID)
 {
     $this->commonAction($taskID);
     if (!empty($_POST)) {
         $this->loadModel('action');
         $changes = $this->task->activate($taskID);
         if (dao::isError()) {
             die(js::error(dao::getError()));
         }
         if ($this->post->comment != '' or !empty($changes)) {
             $actionID = $this->action->create('task', $taskID, 'Activated', $this->post->comment);
             $this->action->logHistory($actionID, $changes);
             $this->sendmail($taskID, $actionID);
         }
         if (isonlybody()) {
             die(js::closeModal('parent.parent', 'this'));
         }
         die(js::locate($this->createLink('task', 'view', "taskID={$taskID}"), 'parent'));
     }
     if (!isset($this->view->members[$this->view->task->finishedBy])) {
         $this->view->members[$this->view->task->finishedBy] = $this->view->task->finishedBy;
     }
     $this->view->title = $this->view->project->name . $this->lang->colon . $this->lang->task->activate;
     $this->view->position[] = $this->lang->task->activate;
     $this->view->users = $this->loadModel('user')->getPairs('noletter');
     $this->display();
 }
开发者ID:caiwenhao,项目名称:zentao,代码行数:34,代码来源:control.php

示例9: manageMember

 /**
  * Manage members of a group.
  * 
  * @param  int    $groupID 
  * @access public
  * @return void
  */
 public function manageMember($groupID)
 {
     if (!empty($_POST)) {
         $this->group->updateUser($groupID);
         if (isonlybody()) {
             die(js::closeModal('parent.parent', 'this'));
         }
         die(js::locate($this->createLink('group', 'browse'), 'parent'));
     }
     $group = $this->group->getById($groupID);
     $groupUsers = $this->group->getUserPairs($groupID);
     $allUsers = $this->user->getPairs('nodeleted|noclosed|noempty|noletter');
     $otherUsers = array_diff_assoc($allUsers, $groupUsers);
     $title = $this->lang->company->common . $this->lang->colon . $group->name . $this->lang->colon . $this->lang->group->manageMember;
     $position[] = $group->name;
     $position[] = $this->lang->group->manageMember;
     $this->view->title = $title;
     $this->view->position = $position;
     $this->view->group = $group;
     $this->view->groupUsers = $groupUsers;
     $this->view->otherUsers = $otherUsers;
     $this->display();
 }
开发者ID:fanscky,项目名称:HTPMS,代码行数:30,代码来源:control.php

示例10: weatheredit

 public function weatheredit($sprintID = 0)
 {
     if (!empty($_POST)) {
         $this->my->create();
         die(js::closeModal('parent.parent'));
     }
     $this->view->sprintID = $sprintID;
     $this->display();
 }
开发者ID:XMGmen,项目名称:zentao,代码行数:9,代码来源:control.php


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