Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
preetwinder
erp5
Commits
50570e4e
Commit
50570e4e
authored
Aug 11, 2017
by
preetwinder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_officejs] Fix sync, header in login and list results.
parent
b71b2085
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
54 additions
and
72 deletions
+54
-72
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_fbstorage_js.js
...cejs/PathTemplateItem/web_page_module/jio_fbstorage_js.js
+5
-3
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_fbstorage_js.xml
...ejs/PathTemplateItem/web_page_module/jio_fbstorage_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_facebook_configurator_html.html
...eItem/web_page_module/ojs_facebook_configurator_html.html
+1
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_facebook_configurator_html.xml
...teItem/web_page_module/ojs_facebook_configurator_html.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_facebook_configurator_js.js
...plateItem/web_page_module/ojs_facebook_configurator_js.js
+6
-10
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_facebook_configurator_js.xml
...lateItem/web_page_module/ojs_facebook_configurator_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_document_list_js.js
...thTemplateItem/web_page_module/ojs_fb_document_list_js.js
+25
-6
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_document_list_js.xml
...hTemplateItem/web_page_module/ojs_fb_document_list_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_appcache.xml
...athTemplateItem/web_page_module/ojs_fb_posts_appcache.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_jio_js.js
...s/PathTemplateItem/web_page_module/ojs_fb_posts_jio_js.js
+2
-37
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_jio_js.xml
.../PathTemplateItem/web_page_module/ojs_fb_posts_jio_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_panel_js.js
...PathTemplateItem/web_page_module/ojs_fb_posts_panel_js.js
+1
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_panel_js.xml
...athTemplateItem/web_page_module/ojs_fb_posts_panel_js.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_fbstorage_js.js
View file @
50570e4e
...
...
@@ -85,9 +85,11 @@
FBStorage
.
prototype
.
buildQuery
=
function
(
query
)
{
console
.
log
(
'
QueryRecieved
'
,
query
);
var
that
=
this
,
template_argument
=
{
user_id
:
this
.
_user_id
,
limit
:
100
,
access_token
:
this
.
_access_token
},
fields
=
[],
limit
=
this
.
_default_limit
;
var
that
=
this
,
fields
=
[],
limit
=
this
.
_default_limit
,
template_argument
=
{
user_id
:
this
.
_user_id
,
limit
:
limit
,
access_token
:
this
.
_access_token
};
if
(
query
.
include_docs
)
{
fields
=
fields
.
concat
(
that
.
_default_field_list
);
}
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_fbstorage_js.xml
View file @
50570e4e
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.
16463.42275.10052
</string>
</value>
<value>
<string>
961.
20894.37088.58897
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
1502
116781.14
</float>
<float>
1502
382636.2
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_facebook_configurator_html.html
View file @
50570e4e
...
...
@@ -18,7 +18,7 @@
<body>
<section
class=
"ui-content-header-plain"
>
<h3
class=
"ui-content-title ui-body-c"
>
<span
id=
"status"
class=
"ui-icon ui-icon-custom ui-icon-file-text-o"
>
Please Log into the app
</span>
<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"
>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_facebook_configurator_html.xml
View file @
50570e4e
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.
16470.22894.2645
</string>
</value>
<value>
<string>
961.
20845.44804.55534
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
1502
117181.46
</float>
<float>
1502
379704.19
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_facebook_configurator_js.js
View file @
50570e4e
...
...
@@ -79,20 +79,16 @@ gadget_klass
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
return
gadget
.
updateHeader
({
title
:
"
Connect To Facebook Storage
"
,
back_url
:
"
#page=document_list
"
,
panel_action
:
false
})
var
gadget
=
this
;
return
gadget
.
updateHeader
({
page_title
:
"
Facebook Login
"
})
})
.
declareService
(
function
()
{
var
gadget
=
this
;
FB
.
init
({
appId
:
'
1917551475189095
'
,
cookie
:
true
,
xfbml
:
true
,
version
:
'
v2.8
'
cookie
:
true
,
xfbml
:
true
,
version
:
'
v2.8
'
});
FB
.
getLoginStatus
(
function
(
response
)
{
if
(
response
.
status
==
'
connected
'
)
{
...
...
@@ -117,7 +113,7 @@ gadget_klass
}
}
})
.
onEvent
(
"
click
"
,
function
(
event
)
{
var
gadget
=
this
;
if
(
event
.
target
.
id
==
'
login
'
)
{
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_facebook_configurator_js.xml
View file @
50570e4e
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.
16472.57754.53162
</string>
</value>
<value>
<string>
961.
20848.25415.9847
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
1502
117334.01
</float>
<float>
1502
381591.58
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_document_list_js.js
View file @
50570e4e
...
...
@@ -20,13 +20,16 @@
.
allowPublicAcquisition
(
"
jio_allDocs
"
,
function
(
param_list
)
{
var
gadget
=
this
;
console
.
log
(
param_list
);
param_list
[
0
].
select_list
.
push
(
'
story
'
);
param_list
[
0
].
select_list
.
push
(
'
link
'
);
return
gadget
.
jio_allDocs
(
param_list
[
0
])
.
push
(
function
(
result
)
{
var
i
,
date
,
len
=
result
.
data
.
total_rows
;
var
i
,
date
,
message
,
len
=
result
.
data
.
total_rows
;
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
if
(
result
.
data
.
rows
[
i
].
value
.
hasOwnProperty
(
"
modification_dat
e
"
))
{
date
=
new
Date
(
result
.
data
.
rows
[
i
].
value
.
modification_dat
e
);
result
.
data
.
rows
[
i
].
value
.
modification_dat
e
=
{
if
(
result
.
data
.
rows
[
i
].
value
.
hasOwnProperty
(
"
created_tim
e
"
))
{
date
=
new
Date
(
result
.
data
.
rows
[
i
].
value
.
created_tim
e
);
result
.
data
.
rows
[
i
].
value
.
created_tim
e
=
{
allow_empty_time
:
0
,
ampm_time_style
:
0
,
css_class
:
"
date_field
"
,
...
...
@@ -36,10 +39,10 @@
hidden
:
0
,
hidden_day_is_last_day
:
0
,
default
:
date
.
toUTCString
(),
key
:
"
modification_dat
e
"
,
key
:
"
created_tim
e
"
,
required
:
0
,
timezone_style
:
0
,
title
:
"
Modification Dat
e
"
,
title
:
"
Creation Tim
e
"
,
type
:
"
DateTimeField
"
};
result
.
data
.
rows
[
i
].
value
[
"
listbox_uid:list
"
]
=
{
...
...
@@ -47,6 +50,22 @@
value
:
2713
};
}
if
(
!
result
.
data
.
rows
[
i
].
value
.
message
)
{
message
=
''
;
}
else
{
message
=
result
.
data
.
rows
[
i
].
value
.
message
;
}
if
(
result
.
data
.
rows
[
i
].
value
.
story
)
{
message
+=
'
'
+
result
.
data
.
rows
[
i
].
value
.
story
;
}
var
link
=
result
.
data
.
rows
[
i
].
value
.
link
;
if
(
link
)
{
if
(
!
(
message
==
link
.
slice
(
0
,
-
1
)
||
message
==
link
))
{
message
+=
'
'
+
result
.
data
.
rows
[
i
].
value
.
link
.
slice
(
0
,
100
)
+
'
...
'
;
}
}
result
.
data
.
rows
[
i
].
value
.
message
=
message
;
}
return
result
;
});
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_document_list_js.xml
View file @
50570e4e
...
...
@@ -273,7 +273,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.
16167.19263.24251
</string>
</value>
<value>
<string>
961.
20726.1023.7560
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -291,7 +291,7 @@
</tuple>
<state>
<tuple>
<float>
1502
202691.66
</float>
<float>
1502
372527.27
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_appcache.xml
View file @
50570e4e
...
...
@@ -342,7 +342,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.
17876.53189.13602
</string>
</value>
<value>
<string>
961.
20841.15763.31249
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -360,7 +360,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>
1502
286664
.9
</float>
<float>
1502
440236
.9
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_jio_js.js
View file @
50570e4e
...
...
@@ -11,43 +11,8 @@
}
return
storage
[
method_name
].
apply
(
storage
,
argument_list
)
.
push
(
undefined
,
function
(
error
)
{
if
((
error
.
target
!==
undefined
)
&&
(
error
.
target
.
status
===
401
))
{
var
regexp
,
site
,
login_page
;
if
(
gadget
.
state_parameter_dict
.
jio_storage_name
===
"
ERP5
"
)
{
regexp
=
/^X-Delegate uri=
\"(
http
[
s
]?
:
\/\/[\/\-\[\]
{}()*+=:?&.,
\\\^
$|#
\s\w
%
]
+
)\"
$/
;
login_page
=
error
.
target
.
getResponseHeader
(
'
WWW-Authenticate
'
);
if
(
regexp
.
test
(
login_page
))
{
return
gadget
.
getUrlFor
({
command
:
'
login
'
,
absolute_url
:
true
})
.
push
(
function
(
came_from
)
{
return
gadget
.
redirect
({
command
:
'
raw
'
,
options
:
{
url
:
UriTemplate
.
parse
(
regexp
.
exec
(
login_page
)[
1
]).
expand
({
came_from
:
came_from
})
}
});
});
}
}
if
(
gadget
.
state_parameter_dict
.
jio_storage_name
===
"
DAV
"
)
{
regexp
=
/^Nayookie login_url=
(
http
[
s
]?
:
\/\/[\/\-\[\]
{}()*+=:?&.,
\\\^
$|#
\s\w
%
]
+
)
$/
;
login_page
=
error
.
target
.
getResponseHeader
(
'
WWW-Authenticate
'
);
if
(
regexp
.
test
(
login_page
))
{
site
=
UriTemplate
.
parse
(
regexp
.
exec
(
login_page
)[
1
]
).
expand
({
back_url
:
window
.
location
.
href
,
origin
:
window
.
location
.
origin
});
}
}
if
(
site
)
{
return
gadget
.
redirect
({
command
:
"
row
"
,
url
:
site
});
}
if
(
error
.
status_code
===
400
)
{
return
gadget
.
redirect
({
command
:
"
display
"
,
options
:
{
page
:
'
ojs_facebook_configurator
'
}});
}
throw
error
;
});
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_jio_js.xml
View file @
50570e4e
...
...
@@ -233,7 +233,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.
19289.52390.7048
</string>
</value>
<value>
<string>
961.
20900.38898.22289
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -251,7 +251,7 @@
</tuple>
<state>
<tuple>
<float>
1502
286412.26
</float>
<float>
1502
382996.38
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_panel_js.js
View file @
50570e4e
...
...
@@ -320,7 +320,7 @@
})
.
push
(
function
(
data
)
{
var
options
=
{
page
:
"
ojs_document_list
"
page
:
"
ojs_
fb_posts_
document_list
"
};
if
(
data
.
search
)
{
options
.
extended_search
=
data
.
search
;
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_panel_js.xml
View file @
50570e4e
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.1
6408.6890.18005
</string>
</value>
<value>
<string>
961.1
9389.35931.31061
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
1502
113976.19
</float>
<float>
1502
292333.77
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment