Changed way to rewrite helpdeskform form

Added a try/catch statement to prevent javascript error messages when document.domain can't be written
Changed version to 3.2.4
Fixes #45
This commit is contained in:
tomolimo
2018-01-31 15:25:51 +01:00
parent 51494d7175
commit b59d157cfa
4 changed files with 590 additions and 506 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -11,7 +11,7 @@ if( isset($config->fields['domain']) && $config->fields['domain'] != '' ) {
g = d.createElement('script'),
s = d.getElementsByTagName('script')[0];
g.type = 'text/javascript';
g.text = 'document.domain = \'".$config->fields['domain']."\';';
g.text = 'try { document.domain = \'".$config->fields['domain']."\'; } catch(ev) { /*console.log(ev);*/ }';
s.parentNode.insertBefore(g, s);
" ;
}

View File

@@ -23,11 +23,11 @@
</authors>
<versions>
<version>
<num>3.2.3</num>
<num>3.2.4</num>
<compatibility>9.2</compatibility>
</version>
<version>
<num>3.2.3</num>
<num>3.2.4</num>
<compatibility>9.1</compatibility>
</version>
</versions>

View File

@@ -37,6 +37,11 @@ function plugin_init_processmaker() {
$PLUGIN_HOOKS['pre_show_item']['processmaker']
= array('PluginProcessmakerProcessmaker', 'pre_show_item_processmakerticket');
//$PLUGIN_HOOKS['pre_item_form']['processmaker']
// = array('PluginProcessmakerProcessmaker', 'pre_item_form_processmakerticket');
//$PLUGIN_HOOKS['post_item_form']['processmaker']
// = array('PluginProcessmakerProcessmaker', 'post_item_form_processmakerticket');
$PLUGIN_HOOKS['pre_show_tab']['processmaker']
= array('PluginProcessmakerProcessmaker', 'pre_show_tab_processmaker');
$PLUGIN_HOOKS['post_show_tab']['processmaker']
@@ -114,7 +119,7 @@ function plugin_version_processmaker() {
global $LANG;
return array ('name' => 'Process Maker',
'version' => '3.2.3',
'version' => '3.2.4',
'author' => 'Olivier Moron',
'homepage' => 'https://github.com/tomolimo/processmaker',
'minGlpiVersion' => '9.1');