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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hamza
erp5
Commits
4bbed504
Commit
4bbed504
authored
Jan 24, 2019
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: post view for discussion tool
parent
abefe1b5
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1586 additions
and
3 deletions
+1586
-3
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_ojs_add_post_html.html
...e_module/gadget_officejs_erp5_page_ojs_add_post_html.html
+18
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_ojs_add_post_html.xml
...ge_module/gadget_officejs_erp5_page_ojs_add_post_html.xml
+363
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_ojs_add_post_js.js
..._page_module/gadget_officejs_erp5_page_ojs_add_post_js.js
+48
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_ojs_add_post_js.xml
...page_module/gadget_officejs_erp5_page_ojs_add_post_js.xml
+359
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_post_list_js.js
...web_page_module/gadget_officejs_erp5_page_post_list_js.js
+1
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_post_list_js.xml
...eb_page_module/gadget_officejs_erp5_page_post_list_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_html_post_view_html.html
..._page_module/gadget_officejs_jio_html_post_view_html.html
+26
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_html_post_view_html.xml
...b_page_module/gadget_officejs_jio_html_post_view_html.xml
+330
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_html_post_view_js.js
.../web_page_module/gadget_officejs_jio_html_post_view_js.js
+113
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_html_post_view_js.xml
...web_page_module/gadget_officejs_jio_html_post_view_js.xml
+326
-0
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_ojs_add_post_html.html
0 → 100644
View file @
4bbed504
<!doctype html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
OfficeJS Add Post Document
</title>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"gadget_erp5_page_ojs_add_post.js"
></script>
</head>
<body>
</body>
</html>
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_ojs_add_post_html.xml
0 → 100644
View file @
4bbed504
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_ojs_add_post_js.js
0 → 100644
View file @
4bbed504
/*global window, rJS, RSVP */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
,
Blob
)
{
"
use strict
"
;
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
jio_putAttachment
"
,
"
jio_putAttachment
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
jio_post
"
,
"
jio_post
"
)
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
declareMethod
(
"
render
"
,
function
()
{
var
gadget
=
this
,
doc_id
;
return
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getSetting
(
'
portal_type
'
),
gadget
.
getSetting
(
'
parent_relative_url
'
),
gadget
.
getSetting
(
'
text_content
'
,
""
)
]);
})
.
push
(
function
(
result
)
{
var
doc
=
{
title
:
"
Untitled Document
"
,
portal_type
:
result
[
0
],
parent_relative_url
:
result
[
1
],
text_content
:
result
[
2
]
};
return
gadget
.
jio_post
(
doc
);
})
.
push
(
function
(
id
)
{
return
gadget
.
redirect
({
command
:
'
display
'
,
options
:
{
jio_key
:
id
,
editable
:
true
}
});
});
});
}(
window
,
rJS
,
RSVP
,
Blob
));
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_ojs_add_post_js.xml
0 → 100644
View file @
4bbed504
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_post_list_js.js
View file @
4bbed504
...
...
@@ -119,7 +119,7 @@
})
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
"
page
"
:
"
ojs_add_
documen
t
"
}}),
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
"
page
"
:
"
ojs_add_
pos
t
"
}}),
gadget
.
getSetting
(
'
document_title_plural
'
),
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
"
page
"
:
"
ojs_upload_convert
"
}}),
gadget
.
getSetting
(
'
upload_dict
'
,
false
)
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_post_list_js.xml
View file @
4bbed504
...
...
@@ -269,7 +269,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
973.1
0571.53704.15138
</string>
</value>
<value>
<string>
973.1
2023.55154.25190
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -287,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>
1548
247113.6
</float>
<float>
1548
320460.62
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_html_post_view_html.html
0 → 100644
View file @
4bbed504
<!doctype html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
OfficeJS Jio Web Page View
</title>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"handlebars.js"
></script>
<script
src=
"gadget_officejs_jio_html_post_view.js"
></script>
</head>
<body>
<form
class=
"save_form ui-body-c"
novalidate
>
<button
type=
"submit"
class=
"ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"
></button>
<div
data-gadget-url=
"gadget_erp5_form.html"
data-gadget-scope=
"form_view"
data-gadget-sandbox=
"public"
>
</div>
</form>
</body>
</html>
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_html_post_view_html.xml
0 → 100644
View file @
4bbed504
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_html_post_view_js.js
0 → 100644
View file @
4bbed504
/*global window, rJS, RSVP */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
)
{
"
use strict
"
;
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
getUrlParameter
"
,
"
getUrlParameter
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
updateDocument
"
,
"
updateDocument
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
'
notifySubmitted
'
)
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
declareMethod
(
"
render
"
,
function
(
options
)
{
return
this
.
changeState
({
jio_key
:
options
.
jio_key
,
doc
:
options
.
doc
});
})
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
;
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
})
.
push
(
function
(
form_gadget
)
{
return
form_gadget
.
getContent
();
})
.
push
(
function
(
content
)
{
return
gadget
.
updateDocument
(
content
);
})
.
push
(
function
()
{
return
gadget
.
notifySubmitted
({
message
:
'
Data Updated
'
,
status
:
'
success
'
});
});
})
.
declareMethod
(
"
triggerSubmit
"
,
function
()
{
return
this
.
element
.
querySelector
(
'
button[type="submit"]
'
).
click
();
})
.
onStateChange
(
function
()
{
var
gadget
=
this
;
return
gadget
.
getDeclaredGadget
(
'
form_view
'
)
.
push
(
function
(
form_gadget
)
{
return
form_gadget
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
my_title
"
:
{
"
description
"
:
""
,
"
title
"
:
"
Title
"
,
"
default
"
:
gadget
.
state
.
doc
.
title
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
,
"
key
"
:
"
title
"
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_text_content
"
:
{
"
default
"
:
gadget
.
state
.
doc
.
text_content
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
,
"
key
"
:
"
text_content
"
,
"
hidden
"
:
0
,
"
renderjs_extra
"
:
'
{"editor": "fck_editor",
'
+
'
"maximize": true}
'
,
"
type
"
:
"
GadgetField
"
,
"
url
"
:
"
gadget_editor.html
"
,
"
sandbox
"
:
"
public
"
}
}},
"
_links
"
:
{
"
type
"
:
{
name
:
""
}
}
},
form_definition
:
{
group_list
:
[[
"
left
"
,
[[
"
my_title
"
]]
],
[
"
bottom
"
,
[[
"
my_text_content
"
]]
]]
}
});
})
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getUrlFor
({
command
:
'
history_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_next
'
})
]);
})
.
push
(
function
(
url_list
)
{
return
gadget
.
updateHeader
({
page_title
:
gadget
.
state
.
doc
.
title
,
save_action
:
true
,
selection_url
:
url_list
[
0
],
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
]
});
});
});
}(
window
,
rJS
,
RSVP
));
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_html_post_view_js.xml
0 → 100644
View file @
4bbed504
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