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
f913b247
Commit
f913b247
authored
Aug 09, 2017
by
preetwinder
Committed by
preetwinder
Aug 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_officejs] Change default config page
parent
7a014d36
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
439 additions
and
4 deletions
+439
-4
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_appcache.xml
...athTemplateItem/web_page_module/ojs_fb_posts_appcache.xml
+2
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_jio_html.html
...thTemplateItem/web_page_module/ojs_fb_posts_jio_html.html
+1
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_jio_html.xml
...athTemplateItem/web_page_module/ojs_fb_posts_jio_html.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
+110
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_jio_js.xml
.../PathTemplateItem/web_page_module/ojs_fb_posts_jio_js.xml
+324
-0
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_appcache.xml
View file @
f913b247
...
...
@@ -198,6 +198,7 @@ gadget_erp5_page_ojs_fb_posts_panel.html\n
gadget_erp5_page_ojs_fb_posts_panel.js\n
jio_fbstorage.js\n
gadget_erp5_page_ojs_fb_posts_jio.html\n
gadget_ojs_fb_posts_jio.js\n
GADGET:\n
NETWORK:\n
*
</string>
</value>
...
...
@@ -359,7 +360,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>
15022
01569.8
9
</float>
<float>
15022
86664.
9
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_jio_html.html
View file @
f913b247
...
...
@@ -16,7 +16,7 @@
<!-- custom script -->
<script
src=
"gadget_ojs_jio.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_ojs_
fb_posts_
jio.js"
type=
"text/javascript"
></script>
</head>
<body>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_jio_html.xml
View file @
f913b247
...
...
@@ -238,7 +238,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.16
142.29893.22408
</string>
</value>
<value>
<string>
961.16
340.21976.59340
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>
1502
099015.21
</float>
<float>
1502
286442.68
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_jio_js.js
0 → 100644
View file @
f913b247
/*global window, rJS, jIO, FormData, UriTemplate */
/*jslint indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
jIO
)
{
"
use strict
"
;
// jIO call wrapper for redirection to authentication page if needed
function
wrapJioCall
(
gadget
,
method_name
,
argument_list
)
{
var
storage
=
gadget
.
state_parameter_dict
.
jio_storage
;
if
(
storage
===
undefined
)
{
return
gadget
.
redirect
({
command
:
'
display
'
,
options
:
{
page
:
'
ojs_facebook_configurator
'
}});
}
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
});
}
}
throw
error
;
});
}
rJS
(
window
)
.
ready
(
function
(
gadget
)
{
// Initialize the gadget local parameters
gadget
.
state_parameter_dict
=
{};
})
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
.
declareAcquiredMethod
(
'
getUrlFor
'
,
'
getUrlFor
'
)
.
declareMethod
(
'
createJio
'
,
function
(
jio_options
)
{
var
gadget
=
this
;
if
(
jio_options
===
undefined
)
{
return
;
}
this
.
state_parameter_dict
.
jio_storage
=
jIO
.
createJIO
(
jio_options
);
return
this
.
getSetting
(
"
jio_storage_name
"
)
.
push
(
function
(
jio_storage_name
)
{
gadget
.
state_parameter_dict
.
jio_storage_name
=
jio_storage_name
;
});
})
.
declareMethod
(
'
allDocs
'
,
function
()
{
return
wrapJioCall
(
this
,
'
allDocs
'
,
arguments
);
})
.
declareMethod
(
'
allAttachments
'
,
function
()
{
return
wrapJioCall
(
this
,
'
allAttachments
'
,
arguments
);
})
.
declareMethod
(
'
get
'
,
function
()
{
return
wrapJioCall
(
this
,
'
get
'
,
arguments
);
})
.
declareMethod
(
'
put
'
,
function
()
{
return
wrapJioCall
(
this
,
'
put
'
,
arguments
);
})
.
declareMethod
(
'
post
'
,
function
()
{
return
wrapJioCall
(
this
,
'
post
'
,
arguments
);
})
.
declareMethod
(
'
remove
'
,
function
()
{
return
wrapJioCall
(
this
,
'
remove
'
,
arguments
);
})
.
declareMethod
(
'
getAttachment
'
,
function
()
{
return
wrapJioCall
(
this
,
'
getAttachment
'
,
arguments
);
})
.
declareMethod
(
'
putAttachment
'
,
function
()
{
return
wrapJioCall
(
this
,
'
putAttachment
'
,
arguments
);
})
.
declareMethod
(
'
removeAttachment
'
,
function
()
{
return
wrapJioCall
(
this
,
'
removeAttachment
'
,
arguments
);
})
.
declareMethod
(
'
repair
'
,
function
()
{
return
wrapJioCall
(
this
,
'
repair
'
,
arguments
);
});
}(
window
,
rJS
,
jIO
));
\ No newline at end of file
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_jio_js.xml
0 → 100644
View file @
f913b247
This diff is collapsed.
Click to expand it.
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