Commit 5bb7aa75 authored by preetwinder's avatar preetwinder Committed by preetwinder

[erp5_officejs] Change document link in panel and change login/logout button

parent 326acd35
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
} }
this._access_token = spec.access_token; this._access_token = spec.access_token;
this._user_id = spec.user_id; this._user_id = spec.user_id;
console.log('FEFAULTFIELDLIST', spec.default_field_list);
this._default_field_list = spec.default_field_list; this._default_field_list = spec.default_field_list;
delete this._default_field_list.__id; delete this._default_field_list.__id;
this._default_limit = spec.default_limit || 500; this._default_limit = spec.default_limit || 500;
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.12176.51879.2508</string> </value> <value> <string>961.16463.42275.10052</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1501859584.99</float> <float>1502116781.14</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -16,8 +16,16 @@ ...@@ -16,8 +16,16 @@
</head> </head>
<body> <body>
<div id="status"> Please log into the app</div> <section class="ui-content-header-plain">
<button type="button" id="login">Log In</button> <h3 class="ui-content-title ui-body-c">&nbsp;
<button type="button" id="logout">Log Out</button> <span id="status" class="ui-icon ui-icon-custom ui-icon-file-text-o">Please Log into the app</span>
</h3>
</section>
<section class="ui-body-c ui-content-section">
<ul data-role="listview" class="document-listview">
<li> <a href="" data-i18n="Log In" id="login">Log In</a> </li>
<li> <a href="" data-i18n="Log Out" id="logout">Log Out</a> </li>
</ul>
</section>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.16171.40999.28740</string> </value> <value> <string>961.16470.22894.2645</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1502099276.9</float> <float>1502117181.46</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -96,11 +96,11 @@ gadget_klass ...@@ -96,11 +96,11 @@ gadget_klass
}); });
FB.getLoginStatus(function(response) { FB.getLoginStatus(function(response) {
if (response.status == 'connected') { if (response.status == 'connected') {
document.getElementById('status').innerHTML = 'logged in'; document.getElementById('status').innerHTML = ' Logged in';
//gadget.changeState({logged: true}); //gadget.changeState({logged: true});
} }
else { else {
document.getElementById('status').innerHTML = 'logged out'; document.getElementById('status').innerHTML = ' Logged out';
} }
}) })
}) })
...@@ -109,11 +109,11 @@ gadget_klass ...@@ -109,11 +109,11 @@ gadget_klass
var status; var status;
if (modification_dict.hasOwnProperty('logged')) { if (modification_dict.hasOwnProperty('logged')) {
if(modification_dict.logged) { if(modification_dict.logged) {
document.getElementById('status').innerHTML = 'logged in'; document.getElementById('status').innerHTML = ' Logged in';
return setFacebookConfiguration(gadget, FB.getAccessToken(), FB.getUserID()); return setFacebookConfiguration(gadget, FB.getAccessToken(), FB.getUserID());
} }
else { else {
document.getElementById('status').innerHTML = 'logged out'; document.getElementById('status').innerHTML = ' Logged out';
} }
} }
}) })
...@@ -136,7 +136,7 @@ gadget_klass ...@@ -136,7 +136,7 @@ gadget_klass
} }
else if (event.target.id == 'logout') { else if (event.target.id == 'logout') {
FB.logout(function(response) { FB.logout(function(response) {
document.getElementById('status').innerHTML = 'logged out'; document.getElementById('status').innerHTML = ' Logged out';
gadget.changeState({logged: false}); gadget.changeState({logged: false});
}); });
} }
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.12175.57436.34747</string> </value> <value> <string>961.16472.57754.53162</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1502099292.64</float> <float>1502117334.01</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
// Update the global links // Update the global links
.push(function () { .push(function () {
return RSVP.all([ return RSVP.all([
context.getUrlFor({command: 'display', options: {page: "ojs_document_list"}}), context.getUrlFor({command: 'display', options: {page: "ojs_fb_posts_document_list"}}),
context.getUrlFor({command: 'display', options: {page: "ojs_facebook_configurator"}}), context.getUrlFor({command: 'display', options: {page: "ojs_facebook_configurator"}}),
context.getUrlFor({command: 'display', options: {page: "ojs_sync", 'auto_repair': true}}) context.getUrlFor({command: 'display', options: {page: "ojs_sync", 'auto_repair': true}})
]); ]);
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.16115.56693.11332</string> </value> <value> <string>961.16408.6890.18005</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1502099092.95</float> <float>1502113976.19</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment