Version to 3.5.1
Compatible with GLPI 9.3
This commit is contained in:
@@ -21,7 +21,7 @@ function onClickContinue(obj) {
|
||||
// hide the iFrame
|
||||
caseIFrame.style.visibility = 'hidden';
|
||||
|
||||
// trigger a click on the 'add' button of the ticket
|
||||
// trigger a click on the 'add' button of the ticket
|
||||
submitButton.click();
|
||||
}
|
||||
|
||||
@@ -59,17 +59,17 @@ function onLoadFrame( evt, caseId, delIndex, caseNumber, processName ) {
|
||||
if (caseIFrame != undefined && contentDocument) {
|
||||
var buttonContinue = contentDocument.getElementById('form[btnGLPISendRequest]');
|
||||
var linkList = contentDocument.getElementsByTagName('a');
|
||||
|
||||
|
||||
if (!bButtonContinue && buttonContinue != undefined && linkList != undefined && linkList.length > 0) {
|
||||
bButtonContinue = true; //window.clearInterval(caseTimer); // to be sure that it will be done only one time
|
||||
// change action for the attached form and add some parameters
|
||||
//debugger;
|
||||
|
||||
bGLPIHideElement(linkList, 'href', 'cases_Step?TYPE=ASSIGN_TASK&UID=-1&POSITION=10000&ACTION=ASSIGN');
|
||||
|
||||
|
||||
oldHandler = buttonContinue.onclick;
|
||||
buttonContinue.onclick = onClickContinue;
|
||||
|
||||
|
||||
submitButton = $("input[name='add'][type=submit]")[0];
|
||||
submitButton.insertAdjacentHTML('beforebegin', "<input type='hidden' name='processmaker_action' value='routecase'/>");
|
||||
submitButton.insertAdjacentHTML('beforebegin', "<input type='hidden' name='processmaker_caseguid' value='" + caseId + "'/>");
|
||||
@@ -116,4 +116,4 @@ function redimTaskFrame(taskFrame) {
|
||||
taskFrame.height = newHeight;
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,18 +2,17 @@
|
||||
$(document).ajaxComplete(function (event, jqXHR, ajaxOptions) {
|
||||
//debugger;
|
||||
var pattern = /##processmaker.*(##|...)/g;
|
||||
|
||||
|
||||
$('tr.tab_bg_2 td a').each(function (index) {
|
||||
|
||||
|
||||
var textToChange = $(this).text();
|
||||
var matches = textToChange.match(pattern);
|
||||
if (matches) {
|
||||
textToChange = textToChange.replace(pattern, '');
|
||||
if (!textToChange.trim().length>0)
|
||||
{
|
||||
if (!textToChange.trim().length>0) {
|
||||
var title = $(this).parent().prev().text();
|
||||
textToChange = title;
|
||||
}
|
||||
}
|
||||
$(this).text(textToChange);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
define('GLPI_ROOT', '../../..');
|
||||
include (GLPI_ROOT."/inc/includes.php");
|
||||
header("Content-type: application/javascript");
|
||||
$plugin = new Plugin();
|
||||
if ($plugin->isActivated('processmaker')) {
|
||||
$config = PluginProcessmakerConfig::getInstance();
|
||||
if (isset($config->fields['domain']) && $config->fields['domain'] != '') {
|
||||
echo "
|
||||
//debugger;
|
||||
var d = document,
|
||||
g = d.createElement('script'),
|
||||
s = d.getElementsByTagName('script')[0];
|
||||
g.type = 'text/javascript';
|
||||
g.text = 'try { document.domain = \'".$config->fields['domain']."\'; } catch(ev) { /*console.log(ev);*/ }';
|
||||
s.parentNode.insertBefore(g, s);
|
||||
";
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ if (!defined('GLPI_ROOT')) {
|
||||
|
||||
$config = PluginProcessmakerConfig::getInstance();
|
||||
if (!$config->fields['maintenance']) {
|
||||
echo "$(function () {
|
||||
echo "$(function () {
|
||||
// look if name='helpdeskform' is present. If yes replace the form.location
|
||||
var ahrefTI = '".$CFG_GLPI["root_doc"]."/plugins/processmaker/front/tracking.injector.php';
|
||||
var formLink = $(\"form[name='helpdeskform']\")[0];
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
}
|
||||
$('input[type="checkbox"][value="PluginProcessmakerTask"]').parents('li').first().hide();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user