Adding all changes of the Gmail Integration
New Change deleting Date
This commit is contained in:
@@ -2,6 +2,11 @@
|
||||
require_once 'classes/model/AppDelegation.php';
|
||||
$delegation = new AppDelegation();
|
||||
if( $delegation->alreadyRouted($_SESSION['APPLICATION'],$_SESSION['INDEX']) ) {
|
||||
if($_SESSION['gmail'] == 1){
|
||||
$mUrl = '../cases/cases_Open?APP_UID='.$_SESSION['APPLICATION'].'&DEL_INDEX='.$_SESSION['INDEX'].'&action=sent';
|
||||
header( 'location:' . $mUrl );
|
||||
die();
|
||||
}
|
||||
G::header('location: ../cases/casesListExtJs');
|
||||
die();
|
||||
}
|
||||
@@ -9,16 +14,67 @@ if( $delegation->alreadyRouted($_SESSION['APPLICATION'],$_SESSION['INDEX']) ) {
|
||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||
G::SendTemporalMessage( 'ID_LOGIN_AGAIN', 'warning', 'labels' );
|
||||
die( '<script type="text/javascript">
|
||||
try
|
||||
{
|
||||
prnt = parent.parent;
|
||||
top.location = top.location;
|
||||
}
|
||||
catch (err)
|
||||
{
|
||||
parent.location = parent.location;
|
||||
}
|
||||
</script>');
|
||||
try
|
||||
{
|
||||
var olink = parent.uri;
|
||||
var flag = 0;
|
||||
if(olink == undefined){
|
||||
olink = window.frameElement.src;
|
||||
flag = 1;
|
||||
}
|
||||
if(olink.search("gmail") == -1){
|
||||
prnt = parent.parent;
|
||||
top.location = top.location;
|
||||
} else {
|
||||
var data = olink.split("?");
|
||||
var odata = data[1].split("&");
|
||||
|
||||
var appUid = odata[0].split("=");
|
||||
var delIndex = odata[1].split("=");
|
||||
var action = odata[2].split("=");
|
||||
|
||||
var dataToSend = {
|
||||
"action": "credentials",
|
||||
"operation": "refreshPmSession",
|
||||
"type": "processCall",
|
||||
"funParams": [
|
||||
appUid[1],
|
||||
delIndex[1],
|
||||
action[1],
|
||||
0
|
||||
],
|
||||
"expectReturn": false
|
||||
};
|
||||
if (flag == 0){
|
||||
parent.parent.postMessage(JSON.stringify(dataToSend), "https://mail.google.com");
|
||||
}else {
|
||||
//top.location =
|
||||
var x = window.postMessage(JSON.stringify(dataToSend), "https://mail.google.com");
|
||||
|
||||
if(x == undefined){
|
||||
//Here the code to access the extension from the gadget
|
||||
dataToSend = {
|
||||
"action": "credentials",
|
||||
"operation": "refreshPmSession",
|
||||
"type": "processCall",
|
||||
"funParams": [
|
||||
appUid[1],
|
||||
delIndex[1],
|
||||
action[1],
|
||||
1
|
||||
],
|
||||
"expectReturn": false
|
||||
};
|
||||
parent.postMessage(JSON.stringify(dataToSend), "*");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (err)
|
||||
{
|
||||
parent.location = parent.location;
|
||||
}
|
||||
</script>');
|
||||
}
|
||||
/**
|
||||
* cases_Step.php
|
||||
|
||||
Reference in New Issue
Block a user