added missing error message when adding a responsible without key to an encrypted infolog, also adding timestamp to infolog-encryption.js to force loading of changed files

This commit is contained in:
Ralf Becker 2015-05-29 08:20:41 +00:00
parent 9c1ec7ba62
commit 1ca4b24ec2
3 changed files with 21 additions and 4 deletions

View File

@ -2181,7 +2181,10 @@ class infolog_ui
{
$sel_options['action']['schedule'] = array('label' => 'Schedule', 'title' => 'Schedule appointment');
}
egw_framework::validate_file('.','edit','infolog');
if ($GLOBALS['egw_info']['user']['apps']['stylite'])
{
$content['encryption_ts'] = filemtime(EGW_SERVER_ROOT.'/stylite/js/infolog-encryption.js');
}
$GLOBALS['egw_info']['flags']['app_header'] = lang('InfoLog').' - '.
($content['status_only'] ? lang('Edit Status') : lang('Edit'));
$GLOBALS['egw_info']['flags']['params']['manual'] = array('page' => ($info_id ? 'ManualInfologEdit' : 'ManualInfologAdd'));
@ -2498,7 +2501,7 @@ class infolog_ui
egw_link::get_data ($_GET['egw_data']);
return false;
}
return $this->edit($this->bo->import_mail($mailContent['addresses'],
$mailContent['subject'],
$mailContent['message'],

View File

@ -636,7 +636,7 @@ app.classes.infolog = AppJS.extend(
if (!app.stylite)
{
var self = this;
egw_LAB.script('stylite/js/infolog-encryption.js').wait(function()
egw_LAB.script('stylite/js/infolog-encryption.js?'+this.et2.getArrayMgr('content').data.encryption_ts).wait(function()
{
app.stylite = new app.classes.stylite;
app.stylite.et2 = self.et2;
@ -648,5 +648,19 @@ app.classes.infolog = AppJS.extend(
app.stylite.et2 = this.et2;
app.stylite.toggleEncrypt.call(app.stylite, _event, _widget, _node);
}
},
/**
* OnChange callback for responsible
*
* @param {jQuery.Event} _event
* @param {et2_widget} _widget
*/
onchangeResponsible: function(_event, _widget)
{
if (app.stylite && app.stylite.onchangeResponsible)
{
app.stylite.onchangeResponsible.call(app.stylite, _event, _widget);
}
}
});

View File

@ -112,7 +112,7 @@
<row class="row" valign="top">
<description value="Responsible" for="info_responsible"/>
<menulist>
<menupopup type="select-account" statustext="select a responsible user: a person you want to delegate this task" id="info_responsible" multiple="true" no_lang="1" tags="true" class="et2_fullWidth" account_type="both" empty_label="User or group"/>
<menupopup type="select-account" statustext="select a responsible user: a person you want to delegate this task" id="info_responsible" multiple="true" no_lang="1" tags="true" class="et2_fullWidth" account_type="both" empty_label="User or group" onchange="app.infolog.onchangeResponsible"/>
</menulist>
</row>
<row class="row" disabled="1">