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
Labels
Merge Requests
144
Merge Requests
144
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
f31f08bd
Commit
f31f08bd
authored
Jul 03, 2019
by
Lu Xu
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs:implement App on officeJS
parent
cfb9d0cc
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
169 additions
and
91 deletions
+169
-91
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_smart_assistant_home_html.html
.../gadget_officejs_erp5_page_smart_assistant_home_html.html
+7
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_smart_assistant_home_html.xml
...e/gadget_officejs_erp5_page_smart_assistant_home_html.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_smart_assistant_home_js.js
...dule/gadget_officejs_erp5_page_smart_assistant_home_js.js
+108
-5
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_smart_assistant_home_js.xml
...ule/gadget_officejs_erp5_page_smart_assistant_home_js.xml
+4
-46
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_smart_assistant_text_view_js.js
...odule/gadget_officejs_jio_smart_assistant_text_view_js.js
+27
-16
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_smart_assistant_text_view_js.xml
...dule/gadget_officejs_jio_smart_assistant_text_view_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_smart_assistant_text_js.js
.../gadget_officejs_page_jio_erp5_smart_assistant_text_js.js
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_smart_assistant_text_js.xml
...gadget_officejs_page_jio_erp5_smart_assistant_text_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_panel_smart_assistant_js.xml
..._page_module/gadget_officejs_panel_smart_assistant_js.xml
+15
-15
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_smart_assistant_home_html.html
View file @
f31f08bd
...
...
@@ -31,6 +31,12 @@
class=
'ui-flex-center'
>
</div>
</form>
<form
class=
"save_form ui-body-c"
novalidate
>
<div
data-gadget-url=
"gadget_erp5_pt_form_list.html"
data-gadget-scope=
"form_list"
data-gadget-sandbox=
"public"
class=
'ui-flex-bottom'
>
</div>
</form>
</body>
</html>
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_smart_assistant_home_html.xml
View file @
f31f08bd
...
...
@@ -273,7 +273,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
67.17859.46531.61866
</string>
</value>
<value>
<string>
9
76.22725.48476.52138
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -291,7 +291,7 @@
</tuple>
<state>
<tuple>
<float>
15
25278837.04
</float>
<float>
15
60351706.09
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_smart_assistant_home_js.js
View file @
f31f08bd
/*global window, rJS, jIO, Handlebars, RSVP, Blob*/
/*global window, rJS, jIO, Handlebars, RSVP, Blob
, SimpleQuery, ComplexQuery, Query
*/
/*jslint indent:2, maxlen: 80, nomen: true */
(
function
(
window
,
rJS
,
jIO
,
RSVP
)
{
(
function
(
window
,
rJS
,
jIO
,
RSVP
,
SimpleQuery
,
ComplexQuery
,
Query
)
{
"
use strict
"
;
rJS
(
window
)
...
...
@@ -18,8 +18,44 @@
.
declareAcquiredMethod
(
"
notifyChange
"
,
"
notifyChange
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
"
notifySubmitted
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
getUrlParameter
"
,
"
getUrlParameter
"
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
allowPublicAcquisition
(
"
jio_allDocs
"
,
function
(
param_list
)
{
var
gadget
=
this
;
return
gadget
.
jio_allDocs
(
param_list
[
0
])
.
push
(
function
(
result
)
{
var
i
,
date
,
len
=
result
.
data
.
total_rows
;
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
if
(
result
.
data
.
rows
[
i
].
value
.
hasOwnProperty
(
"
modification_date
"
))
{
date
=
new
Date
(
result
.
data
.
rows
[
i
].
value
.
modification_date
);
result
.
data
.
rows
[
i
].
value
.
modification_date
=
{
field_gadget_param
:
{
allow_empty_time
:
0
,
ampm_time_style
:
0
,
css_class
:
"
date_field
"
,
date_only
:
0
,
description
:
"
The Date
"
,
editable
:
0
,
hidden
:
0
,
hidden_day_is_last_day
:
0
,
"
default
"
:
date
.
toUTCString
(),
key
:
"
modification_date
"
,
required
:
0
,
timezone_style
:
0
,
title
:
"
Modification Date
"
,
type
:
"
DateTimeField
"
}
};
result
.
data
.
rows
[
i
].
value
[
"
listbox_uid:list
"
]
=
{
key
:
"
listbox_uid:list
"
,
value
:
2713
};
}
}
return
result
;
});
})
.
allowPublicAcquisition
(
'
updateHeader
'
,
function
()
{
return
;
...
...
@@ -98,8 +134,11 @@
};
});
})
.
declareMethod
(
"
render
"
,
function
()
{
var
gadget
=
this
;
this
.
getDeclaredGadget
(
'
form_list
'
);
return
gadget
.
getSetting
(
'
jio_storage_name
'
)
.
push
(
function
(
result
)
{
if
(
!
result
)
{
...
...
@@ -110,10 +149,38 @@
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getDeclaredGadget
(
'
form_view_upload_audio
'
),
gadget
.
getDeclaredGadget
(
'
form_view_image_text
'
)
gadget
.
getDeclaredGadget
(
'
form_view_image_text
'
),
gadget
.
getDeclaredGadget
(
'
form_list
'
),
//added
gadget
.
getSetting
(
"
portal_type
"
)
]);
})
.
push
(
function
(
result
)
{
var
column_list
=
[
[
'
title
'
,
'
Title
'
],
[
'
modification_date
'
,
'
Modification Date
'
],
[
'
validation_state
'
,
'
Validation State
'
]
],
portal_type
=
result
[
3
].
split
(
'
,
'
),
query
=
"
urn:jio:allDocs?query=
"
,
i
,
jio_query_list
=
[];
for
(
i
=
0
;
i
<
portal_type
.
length
;
i
+=
1
)
{
jio_query_list
.
push
(
new
SimpleQuery
({
key
:
"
portal_type
"
,
operator
:
""
,
type
:
"
simple
"
,
value
:
portal_type
[
i
]
}));
}
query
+=
Query
.
objectToSearchText
(
new
ComplexQuery
({
operator
:
"
OR
"
,
query_list
:
jio_query_list
,
type
:
"
complex
"
}));
return
RSVP
.
all
([
result
[
0
].
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
...
...
@@ -194,6 +261,42 @@
[[
"
text
"
]]
]]
}
}),
result
[
2
].
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
listbox
"
:
{
"
column_list
"
:
column_list
,
"
show_anchor
"
:
0
,
"
default_params
"
:
{},
"
editable
"
:
1
,
"
editable_column_list
"
:
[],
"
key
"
:
"
field_listbox
"
,
"
lines
"
:
30
,
"
list_method
"
:
"
portal_catalog
"
,
"
query
"
:
query
,
"
portal_type
"
:
[],
"
search_column_list
"
:
column_list
,
"
sort_column_list
"
:
column_list
,
"
sort
"
:
[[
'
modification_date
'
,
'
descending
'
]],
"
title
"
:
"
Notification
"
,
"
type
"
:
"
ListBox
"
}
}},
"
_links
"
:
{
"
type
"
:
{
// form_list display portal_type in header
name
:
""
}
}
},
form_definition
:
{
group_list
:
[[
"
bottom
"
,
[[
"
listbox
"
]]
]]
}
})
]);
})
...
...
@@ -216,4 +319,4 @@
});
}(
window
,
rJS
,
jIO
,
RSVP
));
\ No newline at end of file
}(
window
,
rJS
,
jIO
,
RSVP
,
SimpleQuery
,
ComplexQuery
,
Query
));
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_smart_assistant_home_js.xml
View file @
f31f08bd
...
...
@@ -58,29 +58,12 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
contributor/person_module/1
</string>
<string>
classification/collaborative/team
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
cedric.le.ninivin
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_erp5_page_ojs_smart_assistant_home.js
</string>
</value>
...
...
@@ -101,25 +84,6 @@
<none/>
</value>
</item>
<item>
<key>
<string>
modification_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1455284352.18
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
...
...
@@ -134,12 +98,6 @@
<key>
<string>
title
</string>
</key>
<value>
<string>
Gadget Smart Assistant JS
</string>
</value>
</item>
<item>
<key>
<string>
url_string
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
001
</string>
</value>
...
...
@@ -224,7 +182,7 @@
</tuple>
<state>
<tuple>
<float>
15
19634719.01
</float>
<float>
15
62159205.06
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
@@ -269,7 +227,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
67.20676.40581.32768
</string>
</value>
<value>
<string>
9
76.54308.37653.52753
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -287,7 +245,7 @@
</tuple>
<state>
<tuple>
<float>
15
25444169.16
</float>
<float>
15
62162159.44
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
@@ -344,7 +302,7 @@
</tuple>
<state>
<tuple>
<float>
15
19633924.76
</float>
<float>
15
62158825.48
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_smart_assistant_text_view_js.js
View file @
f31f08bd
...
...
@@ -12,7 +12,8 @@
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
updateDocument
"
,
"
updateDocument
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
'
notifySubmitted
'
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
"
notifySubmitted
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
...
...
@@ -52,8 +53,7 @@
})
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
,
title
;
var
gadget
=
this
;
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
...
...
@@ -63,14 +63,9 @@
return
form_gadget
.
getContent
();
})
.
push
(
function
(
result
)
{
title
=
result
.
title
;
if
(
result
.
text_
===
""
)
{
result
.
text_
=
"
"
;
}
var
reply
=
result
.
reply
;
return
gadget
.
updateDocument
({
'
text_content
'
:
result
.
text_
,
title
:
title
'
text_content
'
:
gadget
.
state
.
content
.
text_content
+
"
\n
"
+
reply
});
})
.
push
(
function
()
{
...
...
@@ -78,6 +73,9 @@
"
message
"
:
"
Data Updated
"
,
"
status
"
:
"
success
"
});
})
.
push
(
function
()
{
return
gadget
.
redirect
({
command
:
'
reload
'
});
});
})
.
declareMethod
(
"
triggerSubmit
"
,
function
()
{
...
...
@@ -104,15 +102,25 @@
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_text
"
:
{
"
default
"
:
gadget
.
state
.
text
,
"
my_text_content
"
:
{
"
default
"
:
gadget
.
state
.
content
.
text_content
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
0
,
"
key
"
:
"
text_content
"
,
"
hidden
"
:
0
,
"
title
"
:
'
History
'
,
"
type
"
:
"
TextAreaField
"
},
"
my_reply
"
:
{
"
default
"
:
""
,
"
title
"
:
"
Reply
"
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
,
"
key
"
:
"
text_
"
,
"
key
"
:
"
reply
"
,
"
hidden
"
:
0
,
"
renderjs_extra
"
:
'
{"editor": "fck_editor",
'
+
'
"maximize": "auto"}
'
,
"
renderjs_extra
"
:
'
{"editor": "fck_editor"}
'
,
"
type
"
:
"
GadgetField
"
,
"
url
"
:
"
gadget_editor.html
"
,
"
sandbox
"
:
"
public
"
...
...
@@ -130,9 +138,12 @@
group_list
:
[[
"
left
"
,
[[
"
my_title
"
]]
],
[
"
center
"
,
[[
"
my_text_content
"
]]
],
[
"
bottom
"
,
[[
"
my_
text
"
]]
[[
"
my_
reply
"
]]
]]
}
});
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_smart_assistant_text_view_js.xml
View file @
f31f08bd
...
...
@@ -239,7 +239,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
66.50123.54319.23415
</string>
</value>
<value>
<string>
9
76.31373.10382.14609
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -257,7 +257,7 @@
</tuple>
<state>
<tuple>
<float>
15
23439452.07
</float>
<float>
15
60873588.93
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_smart_assistant_text_js.js
View file @
f31f08bd
...
...
@@ -85,7 +85,7 @@
return
form_gadget
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
my_content
"
:
{
"
my_
text_
content
"
:
{
"
default
"
:
""
,
"
css_class
"
:
""
,
"
required
"
:
0
,
...
...
@@ -118,7 +118,7 @@
[[
"
my_description
"
]]
],
[
"
bottom
"
,
[[
"
my_content
"
]]
[[
"
my_
text_
content
"
]]
]]
}
});
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_smart_assistant_text_js.xml
View file @
f31f08bd
...
...
@@ -239,7 +239,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
67.17930.59246.1075
</string>
</value>
<value>
<string>
9
76.14145.4153.46813
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -257,7 +257,7 @@
</tuple>
<state>
<tuple>
<float>
15
25279476.0
9
</float>
<float>
15
59836938.7
9
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_panel_smart_assistant_js.xml
View file @
f31f08bd
...
...
@@ -58,20 +58,16 @@
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
classification/collaborative/team
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
application/javascript
</string>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_erp5_ojs_panel_smart_assistant.js
</string>
</value>
...
...
@@ -88,7 +84,9 @@
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
...
...
@@ -188,7 +186,7 @@
</tuple>
<state>
<tuple>
<float>
15
20002302.3
8
</float>
<float>
15
62163551.2
8
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
@@ -233,7 +231,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
66.14275.9143.23296
</string>
</value>
<value>
<string>
9
76.54306.32835.10854
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -251,7 +249,7 @@
</tuple>
<state>
<tuple>
<float>
15
22761698.8
</float>
<float>
15
62160158.27
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
@@ -274,7 +272,9 @@
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
detect_converted_file
</string>
</value>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
...
...
@@ -290,7 +290,7 @@
</item>
<item>
<key>
<string>
external_processing_state
</string>
</key>
<value>
<string>
converted
</string>
</value>
<value>
<string>
empty
</string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
...
...
@@ -308,7 +308,7 @@
</tuple>
<state>
<tuple>
<float>
15
20001217.02
</float>
<float>
15
62159899.76
</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