FCLT#60353 Notificaties nieuwe App via Firebase
svn path=/Website/branches/v2019.2/; revision=45492
This commit is contained in:
26
APPL/MGT/aut_app_test_notification.asp
Normal file
26
APPL/MGT/aut_app_test_notification.asp
Normal file
@@ -0,0 +1,26 @@
|
||||
<%@language = "javascript" %>
|
||||
<% /*
|
||||
$Revision$
|
||||
$Id$
|
||||
|
||||
File: aut_app_test_notification.asp
|
||||
Description: Stuur een test notificatie naar alle apps van de gebruiker
|
||||
Parameters:
|
||||
Context:
|
||||
Note:
|
||||
|
||||
*/ %>
|
||||
|
||||
<%
|
||||
var JSON_Result = true;
|
||||
%>
|
||||
<!-- #include file="../Shared/common.inc" -->
|
||||
<%
|
||||
protectRequest.validateToken();
|
||||
|
||||
var puo_result = putorders.sendAPP(user_key, "Facilitor test notificatie.\nVerstuurd op " + toDateTimeString(new Date(), true));
|
||||
|
||||
var result = { success: true }
|
||||
|
||||
Response.Write(JSON.stringify(result));
|
||||
%>
|
||||
@@ -38,7 +38,15 @@ scaffolding(this_model,
|
||||
//"refreshdate",
|
||||
"login",
|
||||
"device_name"
|
||||
]
|
||||
],
|
||||
//"actions": [{ action: "scf_testnotification", caption: L("lcl_test_app_notification") }],
|
||||
"buttons": [
|
||||
{ icon: "fa-edit", title: /*L*/("lcl_test_app_notification"), action: "scf_testnotification()" }
|
||||
],
|
||||
|
||||
"requires": {
|
||||
js: ["./aut_client_perslid.js"]
|
||||
}
|
||||
},
|
||||
"edit": {
|
||||
"modal": true
|
||||
|
||||
18
APPL/MGT/aut_client_perslid.js
Normal file
18
APPL/MGT/aut_client_perslid.js
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
$Revision$
|
||||
$Id$
|
||||
*/
|
||||
|
||||
function scf_testnotification(row)
|
||||
{
|
||||
FcltMgr.confirm( /*L*/("lcl_test_app_notification"),
|
||||
function() {
|
||||
var data = { };
|
||||
protectRequest.dataToken(data);
|
||||
$.post("./aut_app_test_notification.asp"
|
||||
, data
|
||||
, FcltCallback
|
||||
, "json");
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -67,6 +67,15 @@ var putorders = {
|
||||
var result = hook.puo_sendSMS(telnr, msg);
|
||||
hook = null;
|
||||
return result;
|
||||
},
|
||||
sendAPP:
|
||||
function _sendAPP(prs_key, msg)
|
||||
{
|
||||
var hook = putorders._puo_hook();
|
||||
__Log("APP message {0} to {1}".format(msg, prs_key));
|
||||
var result = hook.puo_sendAPP(prs_key, msg);
|
||||
hook = null;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
@@ -45,6 +45,10 @@
|
||||
<PARAMETER name="telnr"/>
|
||||
<PARAMETER name="msg"/>
|
||||
</method>
|
||||
<method name="puo_sendAPP">
|
||||
<PARAMETER name="prs_key"/>
|
||||
<PARAMETER name="msg"/>
|
||||
</method>
|
||||
</public>
|
||||
|
||||
<script language="javascript" src="../wsf_shared.js"></script>
|
||||
@@ -197,6 +201,13 @@ function puo_sendSMS(telnr, msg)
|
||||
sendSMS( telnr, msg )
|
||||
}
|
||||
|
||||
// Vanuit ASP mgt/aut_app_test_notification.asp
|
||||
function puo_sendAPP(prs_key, msg)
|
||||
{
|
||||
Log2File(1, "\n====== Sending APP (" + toDateTimeString(new Date()) + ")");
|
||||
return sendAPP( prs_key, msg, "", {})
|
||||
}
|
||||
|
||||
|
||||
]]>
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user