diff --git a/tmp_msg/fresh_result.json b/tmp_msg/fresh_result.json
index f686b55e..8a817221 100644
--- a/tmp_msg/fresh_result.json
+++ b/tmp_msg/fresh_result.json
@@ -3,6 +3,7 @@
"server":"d1af658a-f094-4303-9496-9a27a8180b0b",
"sequence":1122,
"generalID":11,
+ "isChief":true,
"national":[
{
"id":1009,
diff --git a/tmp_msg/msg.js b/tmp_msg/msg.js
index 58098c23..7b61c7ae 100644
--- a/tmp_msg/msg.js
+++ b/tmp_msg/msg.js
@@ -17,7 +17,7 @@ var messageTemplate = `
bgcolor="#000055"
<%} %>
style="font-size:13px;table-layout:fixed;word-break:break-all;"
- data-id="<%id%>"
+ id="msg_<%id%>"
>
@@ -52,19 +52,55 @@ var messageTemplate = `
<<%e($datetime)%>>
<%e(message)%>
+ <%if(this.option){ console.log('HasOption!!'); %>
+
+
+
+ <%} %>
|
`;
-jQuery(function($){
-
- var generalID=1;
+var refreshMsg = (function(){
+ var generalID=null;
+ var isChief = false;
var sequence =null;
-
- function refreshMsg(){
- }
+ return function(){
+
+
+ var deferred = $.ajax({
+ url: option.targetJson,
+ type: 'post',
+ dataType:'json',
+ contentType: 'application/json',
+ data: JSON.stringify({
+ sequence:sequence
+ })
+ });
+
+ function registerGlobal(obj){
+ if(!obj.result){
+ deferred.reject();
+ return;
+ }
+ generalID = obj.generalID;
+ isChief = obj.isChief;
+ sequence = obj.sequence;
+ return obj;
+ }
+
+ deferred
+ .then(registerGlobal);
+
+
+
+
+ };
+})();
+
+jQuery(function($){
refreshMsg();
});
\ No newline at end of file
diff --git a/tmp_msg/tmp_template.html b/tmp_msg/tmp_template.html
index 0608ca6f..9f0c7864 100644
--- a/tmp_msg/tmp_template.html
+++ b/tmp_msg/tmp_template.html
@@ -13,7 +13,7 @@
bgcolor="#000055"
<%} %>
style="font-size:13px;table-layout:fixed;word-break:break-all;"
- data-id="<%id%>"
+ id="msg_<%id%>"
>
@@ -48,6 +48,11 @@
<<%e($datetime)%>>
<%e(message)%>
+ <%if(this.option){ console.log('HasOption!!'); %>
+
+
+
+ <%} %>
|
\ No newline at end of file
diff --git a/tmp_msg/update_national_result.json b/tmp_msg/update_national_result.json
index 73120f11..beba7ad3 100644
--- a/tmp_msg/update_national_result.json
+++ b/tmp_msg/update_national_result.json
@@ -3,6 +3,7 @@
"server":"d1af658a-f094-4303-9496-9a27a8180b0b",
"sequence":1357,
"generalID":11,
+ "isChief":true,
"national":[
],
diff --git a/tmp_msg/update_private_result.json b/tmp_msg/update_private_result.json
index 5ab74fcd..dfc3bd12 100644
--- a/tmp_msg/update_private_result.json
+++ b/tmp_msg/update_private_result.json
@@ -3,6 +3,7 @@
"server":"d1af658a-f094-4303-9496-9a27a8180b0b",
"sequence":1366,
"generalID":11,
+ "isChief":true,
"national":[
],
diff --git a/tmp_msg/update_public_result.json b/tmp_msg/update_public_result.json
index 27a2b9ee..271679ee 100644
--- a/tmp_msg/update_public_result.json
+++ b/tmp_msg/update_public_result.json
@@ -3,6 +3,7 @@
"server":"d1af658a-f094-4303-9496-9a27a8180b0b",
"sequence":1811,
"generalID":11,
+ "isChief":false,
"national":[
],