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


PHP Ajax::UpdateItemJsCode方法代码示例

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


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

示例1: deleteitemtodefatc

 function deleteitemtodefatc($type, $a_items_id, $taskjobs_id)
 {
     global $CFG_GLPI;
     $this->getFromDB($taskjobs_id);
     $a_type = importArrayFromDB($this->fields[$type]);
     $split = explode("-", $a_items_id);
     foreach ($split as $key) {
         unset($a_type[$key]);
     }
     $input = array();
     $input['id'] = $this->fields['id'];
     $input[$type] = exportArrayToDB($a_type);
     $this->update($input);
     // reload item list
     $params = array();
     $params['taskjobs_id'] = $taskjobs_id;
     $params['typename'] = $type;
     echo "<script type='text/javascript'>";
     Ajax::UpdateItemJsCode("show" . $type . "list" . $taskjobs_id . "_", $CFG_GLPI["root_doc"] . "/plugins/fusioninventory/ajax/dropdownlist.php", $params);
     echo "</script>";
 }
开发者ID:korial29,项目名称:fusioninventory-for-glpi,代码行数:21,代码来源:taskjob.class.php

示例2: showFormForTask

 function showFormForTask($projet, PluginProjetTask $task)
 {
     global $CFG_GLPI;
     $PluginProjetProjet = new PluginProjetProjet();
     $PluginProjetProjet->getFromDB($projet);
     $taskid = $task->getField('id');
     if ($taskid > 0 && $this->getFromDBbyTask($taskid)) {
         if ($this->canCreate()) {
             echo "<script type='text/javascript' >\n";
             echo "function showPlan" . $taskid . "(){\n";
             echo "Ext.get('plan').setDisplayed('none');";
             $params = array('form' => 'followups', 'id' => $this->fields["id"], 'begin' => $this->fields["begin"], 'end' => $this->fields["end"], 'entity' => $PluginProjetProjet->fields["entities_id"]);
             Ajax::updateItemJsCode('viewplan', $CFG_GLPI["root_doc"] . "/plugins/projet/ajax/planning.php", $params);
             echo "}";
             echo "</script>\n";
             echo "<div id='plan' onClick='showPlan" . $taskid . "()'>\n";
             echo "<span class='showplan'>";
         }
         if ($this->fields["begin"] && $this->fields["end"]) {
             echo Html::convDateTime($this->fields["begin"]) . "&nbsp;->&nbsp;" . Html::convDateTime($this->fields["end"]);
         } else {
             _e('Plan this task');
         }
         if ($this->canCreate()) {
             echo "</span>";
             echo "</div>\n";
             echo "<div id='viewplan'></div>\n";
         }
     } else {
         if ($this->canCreate()) {
             echo "<script type='text/javascript' >\n";
             echo "function showPlanUpdate(){\n";
             echo "Ext.get('plan').setDisplayed('none');";
             $params = array('form' => 'followups', 'entity' => $_SESSION["glpiactive_entity"]);
             Ajax::UpdateItemJsCode('viewplan', $CFG_GLPI["root_doc"] . "/plugins/projet/ajax/planning.php", $params);
             echo "};";
             echo "</script>";
             echo "<div id='plan'  onClick='showPlanUpdate()'>\n";
             echo "<span class='showplan'>" . __('Plan this task') . "</span>";
             echo "</div>\n";
             echo "<div id='viewplan'></div>\n";
         } else {
             _e('None');
         }
     }
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:46,代码来源:taskplanning.class.php

示例3: showModifyCommentFrom

 static function showModifyCommentFrom($item, $rand)
 {
     global $CFG_GLPI;
     $items_id = $item['id'];
     echo "<script type='text/javascript' >\n";
     echo "function showComment{$items_id} () {\n";
     echo "Ext.get('commentneed{$items_id}{$rand}').setDisplayed('none');";
     echo "Ext.get('viewaccept{$items_id}{$rand}').setDisplayed('block');";
     $params = array('name' => 'commentneed' . $items_id, 'data' => rawurlencode($item["comment"]));
     Ajax::UpdateItemJsCode("viewcommentneed{$items_id}{$rand}", $CFG_GLPI["root_doc"] . "/plugins/resources/ajax/inputtext.php", $params, false);
     echo "}";
     echo "</script>\n";
     echo "<div id='commentneed{$items_id}{$rand}' class='center' onClick='showComment{$items_id}()'>\n";
     echo $item["comment"];
     echo "</div>\n";
     echo "<div id='viewcommentneed{$items_id}{$rand}'>\n";
     echo "</div>\n";
     echo "<div id='viewaccept{$items_id}{$rand}' style='display:none;' class='center'>";
     echo "<p><input type='submit' name='updateneedcomment[" . $items_id . "]' value=\"" . _sx('button', 'Update') . "\" class='submit'>";
     echo "&nbsp;<input type='button' onclick=\"hideForm{$items_id}();\" value=\"" . _sx('button', 'Cancel') . "\" class='submit'></p>";
     echo "</div>";
     echo "<script type='text/javascript' >\n";
     echo "function hideForm{$items_id}() {\n";
     echo "Ext.get('commentneed{$items_id}{$rand}').setDisplayed('block');";
     echo "Ext.select('#viewcommentneed{$items_id}{$rand} textarea').remove();";
     echo "Ext.get('viewaccept{$items_id}{$rand}').setDisplayed('none');";
     echo "}\n";
     echo "</script>\n";
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:29,代码来源:choice.class.php


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