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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
erp5
Commits
47ee7f53
Commit
47ee7f53
authored
Dec 12, 2016
by
Vincent Bechu
Committed by
Vincent Bechu
Dec 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: fix add document in codeeditor
parent
8509511d
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
774 additions
and
742 deletions
+774
-742
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_jio_web_page_view_html.html
...le/codeeditor_gadget_officejs_jio_web_page_view_html.html
+3
-3
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_jio_web_page_view_html.xml
...ule/codeeditor_gadget_officejs_jio_web_page_view_html.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_jio_web_page_view_js.js
...module/codeeditor_gadget_officejs_jio_web_page_view_js.js
+204
-197
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_jio_web_page_view_js.xml
...odule/codeeditor_gadget_officejs_jio_web_page_view_js.xml
+6
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_page_add_document_html.xml
...ule/codeeditor_gadget_officejs_page_add_document_html.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_page_document_list_html.xml
...le/codeeditor_gadget_officejs_page_document_list_html.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_page_jio_erp5_configurator_js.js
...deeditor_gadget_officejs_page_jio_erp5_configurator_js.js
+20
-20
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_page_jio_erp5_configurator_js.xml
...eeditor_gadget_officejs_page_jio_erp5_configurator_js.xml
+12
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_widget_listbox_js.js
...ge_module/codeeditor_gadget_officejs_widget_listbox_js.js
+159
-155
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_widget_listbox_js.xml
...e_module/codeeditor_gadget_officejs_widget_listbox_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_jiodev_js.js
.../PathTemplateItem/web_page_module/codeeditor_jiodev_js.js
+53
-66
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_jiodev_js.xml
...PathTemplateItem/web_page_module/codeeditor_jiodev_js.xml
+12
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_install_js.js
...emplateItem/web_page_module/gadget_officejs_install_js.js
+295
-285
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_install_js.xml
...mplateItem/web_page_module/gadget_officejs_install_js.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_jio_web_page_view_html.html
View file @
47ee7f53
...
...
@@ -24,12 +24,12 @@
<
div
class
=
"
ui-field-contain
"
>
<
label
data
-
i18n
=
"
Url String:
"
>
Url
String
<
/label>
<
input
type
=
"
text
"
name
=
"
url_string
"
value
=
"
{{url_string}}
"
>
<
input
type
=
"
text
"
name
=
"
url_string
"
value
=
"
{{url_string}}
"
required
>
<
/div>
<
div
class
=
"
ui-field-contain
"
>
<
label
data
-
i18n
=
"
Version:
"
>
Version
:
<
/label>
<
input
type
=
"
text
"
name
=
"
version
"
value
=
"
{{version}}
"
><
/label>
<
label
data
-
i18n
=
"
Portal Type:
"
>
Portal
Type
:
<
/label>
<
input
type
=
"
text
"
name
=
"
portal_type
"
value
=
"
{{portal_type}}
"
required
><
/label>
<
/div>
<
div
class
=
"
ui-field-contain
"
>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_jio_web_page_view_html.xml
View file @
47ee7f53
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
955.5
5534.43957.17220
</string>
</value>
<value>
<string>
955.5
9479.11249.61201
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
1481
330026.08
</float>
<float>
1481
540323.2
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_jio_web_page_view_js.js
View file @
47ee7f53
...
...
@@ -25,7 +25,12 @@
doc
.
text_content
=
data
.
text_content
;
doc
.
parent_relative_url
=
data
.
parent_relative_url
||
"
web_page_module
"
;
doc
.
portal_type
=
data
.
portal_type
||
"
Web Page
"
;
return
gadget
.
put
(
gadget
.
options
.
jio_key
,
doc
);
if
(
gadget
.
options
.
jio_key
!==
doc
.
url_string
)
{
return
gadget
.
remove
(
gadget
.
options
.
jio_key
);
}
})
.
push
(
function
()
{
return
gadget
.
put
(
doc
.
url_string
,
doc
);
});
}
...
...
@@ -69,6 +74,7 @@
.
declareAcquiredMethod
(
"
get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
translateHtml
"
,
"
translateHtml
"
)
.
declareAcquiredMethod
(
"
put
"
,
"
jio_put
"
)
.
declareAcquiredMethod
(
"
remove
"
,
"
jio_remove
"
)
.
declareAcquiredMethod
(
'
allDocs
'
,
'
jio_allDocs
'
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
...
...
@@ -98,6 +104,7 @@
var
gadget
=
this
;
gadget
.
options
=
options
;
gadget
.
options
.
doc
.
title
=
gadget
.
options
.
doc
.
title
||
""
;
gadget
.
options
.
doc
.
url_string
=
gadget
.
options
.
jio_key
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
translateHtml
(
template
(
options
.
doc
));
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_jio_web_page_view_js.xml
View file @
47ee7f53
...
...
@@ -97,6 +97,10 @@
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
</item>
<item>
<key>
<string>
revision
</string>
</key>
<value>
<string>
13
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
...
...
@@ -240,7 +244,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
955.5
6020.64919.42120
</string>
</value>
<value>
<string>
955.5
9464.8628.44953
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -258,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>
1481
331946.97
</float>
<float>
1481
541034.32
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_page_add_document_html.xml
View file @
47ee7f53
...
...
@@ -222,7 +222,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
955.5
5463.25205.49
66
</string>
</value>
<value>
<string>
955.5
6066.6312.291
66
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -240,7 +240,7 @@
</tuple>
<state>
<tuple>
<float>
1481
295803.59
</float>
<float>
1481
541101.2
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_page_document_list_html.xml
View file @
47ee7f53
...
...
@@ -222,7 +222,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
955.5
5463.28674.13312
</string>
</value>
<value>
<string>
955.5
6066.6312.29166
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -240,7 +240,7 @@
</tuple>
<state>
<tuple>
<float>
1481
295806.77
</float>
<float>
1481
541119.53
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_page_jio_erp5_configurator_js.js
View file @
47ee7f53
...
...
@@ -15,8 +15,7 @@
type
:
"
replicate
"
,
// XXX This drop the signature lists...
query
:
{
query
:
'
(portal_type: ("Web Page","Web Script","Web Manifest","Web Style"))
'
+
'
AND (version: "
'
+
version
+
'
")
'
,
query
:
'
portal_type: ("Web Page","Web Script","Web Manifest","Web Style")
'
,
limit
:
[
0
,
30
],
sort_on
:
[[
"
modification_date
"
,
"
descending
"
]]
},
...
...
@@ -27,21 +26,15 @@
database
:
version
+
"
_hash
"
}
},
use_remote_post
:
tru
e
,
use_remote_post
:
fals
e
,
conflict_handling
:
1
,
check_local_modification
:
true
,
check_local_creation
:
true
,
check_local_deletion
:
false
,
check_remote_modification
:
true
,
check_remote_creation
:
true
,
check_remote_deletion
:
tru
e
,
check_remote_deletion
:
fals
e
,
local_sub_storage
:
{
type
:
"
mapping
"
,
mapping_dict
:
{
"
id
"
:
{
"
equal
"
:
"
relative_url
"
},
"
url_string
"
:
{
"
equal
"
:
"
id
"
}
},
sub_storage
:
{
type
:
"
query
"
,
sub_storage
:
{
type
:
"
uuid
"
,
...
...
@@ -50,9 +43,15 @@
database
:
version
}
}
}
},
remote_sub_storage
:
{
type
:
"
mapping
"
,
mapping_dict
:
{
"
id
"
:
{
"
equal
"
:
"
url_string
"
},
"
relative_url
"
:
"
ignore
"
,
"
version
"
:
{
"
default_value
"
:
version
}
},
sub_storage
:
{
type
:
"
erp5
"
,
url
:
(
new
URI
(
"
hateoas
"
))
.
absoluteTo
(
erp5_url
)
...
...
@@ -60,6 +59,7 @@
default_view_reference
:
"
jio_view
"
}
}
}
);
})
.
push
(
function
()
{
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_page_jio_erp5_configurator_js.xml
View file @
47ee7f53
...
...
@@ -97,6 +97,16 @@
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
</item>
<item>
<key>
<string>
revision
</string>
</key>
<value>
<string>
7
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
OfficeJS jIO ERP5 Configurator Page JS
</string>
</value>
...
...
@@ -234,7 +244,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
955.5
5534.6594.50944
</string>
</value>
<value>
<string>
955.5
9548.4928.4881
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>
1481
327828.02
</float>
<float>
1481
541022.38
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_widget_listbox_js.js
View file @
47ee7f53
...
...
@@ -91,16 +91,20 @@
i_len
,
i
,
j_len
,
j
;
j
,
value
;
// build handlebars object
for
(
j
=
0
,
j_len
=
all_docs_result
.
data
.
total_rows
;
j
<
j_len
;
j
+=
1
)
{
cell_list
=
[];
for
(
i
=
0
,
i_len
=
option_dict
.
column_list
.
length
;
i
<
i_len
;
i
+=
1
)
{
value
=
option_dict
.
column_list
[
i
].
select
===
"
url_string
"
?
all_docs_result
.
data
.
rows
[
j
].
id
:
all_docs_result
.
data
.
rows
[
j
].
value
[
option_dict
.
column_list
[
i
].
select
];
cell_list
.
push
({
"
href
"
:
link_list
[
j
],
"
value
"
:
all_docs_result
.
data
.
rows
[
j
].
value
[
option_dict
.
column_list
[
i
].
select
]
"
value
"
:
value
});
}
row_list
.
push
({
"
cell_list
"
:
cell_list
});
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_widget_listbox_js.xml
View file @
47ee7f53
...
...
@@ -222,7 +222,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
955.5
5462.40798.5324
</string>
</value>
<value>
<string>
955.5
6066.6312.29166
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -240,7 +240,7 @@
</tuple>
<state>
<tuple>
<float>
1481
295757.83
</float>
<float>
1481
502794.84
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_jiodev_js.js
View file @
47ee7f53
...
...
@@ -8883,10 +8883,10 @@ return new Parser;
use_bulk_get
:
use_bulk_get
,
conflict_force
:
(
context
.
_conflict_handling
===
CONFLICT_KEEP_REMOTE
),
conflict_ignore
:
(
(
context
.
_conflict_handling
===
conflict_ignore
:
(
context
.
_conflict_handling
===
CONFLICT_CONTINUE
)
||
(
context
.
_conflict_handling
===
CONFLICT_KEEP_LOCAL
)
)
,
CONFLICT_KEEP_LOCAL
),
check_modification
:
context
.
_check_remote_modification
,
check_creation
:
context
.
_check_remote_creation
,
check_deletion
:
context
.
_check_remote_deletion
...
...
@@ -12077,7 +12077,8 @@ return new Parser;
};
IndexedDBStorage
.
prototype
.
getAttachment
=
function
(
id
,
name
,
options
)
{
var
type
,
var
transaction
,
type
,
start
,
end
;
if
(
options
===
undefined
)
{
...
...
@@ -12085,32 +12086,19 @@ return new Parser;
}
return
openIndexedDB
(
this
)
.
push
(
function
(
db
)
{
return
new
RSVP
.
Promise
(
function
(
resolve
,
reject
)
{
var
transaction
=
openTransaction
(
db
,
[
"
attachment
"
,
"
blob
"
],
"
readonly
"
),
transaction
=
openTransaction
(
db
,
[
"
attachment
"
,
"
blob
"
],
"
readonly
"
);
// XXX Should raise if key is not good
request
=
transaction
.
objectStore
(
"
attachment
"
)
.
get
(
buildKeyPath
([
id
,
name
]));
request
.
onerror
=
function
(
error
)
{
transaction
.
abort
();
reject
(
error
);
};
request
.
onsuccess
=
function
()
{
var
attachment
=
request
.
result
,
total_length
,
return
handleGet
(
transaction
.
objectStore
(
"
attachment
"
)
.
get
(
buildKeyPath
([
id
,
name
])));
})
.
push
(
function
(
attachment
)
{
var
total_length
=
attachment
.
info
.
length
,
i
,
promise_list
=
[],
store
=
transaction
.
objectStore
(
"
blob
"
),
start_index
,
end_index
;
if
(
!
attachment
)
{
return
reject
(
new
jIO
.
util
.
jIOError
(
"
Cannot find attachment
"
,
404
)
);
}
total_length
=
attachment
.
info
.
length
;
type
=
attachment
.
info
.
content_type
;
start
=
options
.
start
||
0
;
end
=
options
.
end
||
total_length
;
...
...
@@ -12139,9 +12127,7 @@ return new Parser;
name
,
i
])))
);
}
resolve
(
RSVP
.
all
(
promise_list
));
};
});
return
RSVP
.
all
(
promise_list
);
})
.
push
(
function
(
result_list
)
{
var
array_buffer_list
=
[],
...
...
@@ -12201,12 +12187,10 @@ return new Parser;
}
// Remove previous attachment
transaction
=
openTransaction
(
db
,
[
"
attachment
"
,
"
blob
"
],
"
readwrite
"
,
false
);
transaction
=
openTransaction
(
db
,
[
"
attachment
"
,
"
blob
"
],
"
readwrite
"
);
return
removeAttachment
(
transaction
,
id
,
name
);
})
.
push
(
function
()
{
transaction
=
openTransaction
(
db
,
[
"
attachment
"
,
"
blob
"
],
"
readwrite
"
);
var
promise_list
=
[
handleRequest
(
transaction
.
objectStore
(
"
attachment
"
).
put
({
...
...
@@ -12882,10 +12866,6 @@ return new Parser;
if
(
sub_doc
.
id
!==
undefined
)
{
return
sub_doc
.
id
;
}
throw
new
jIO
.
util
.
jIOError
(
"
Cannot find id field related
"
,
400
);
}
query
=
new
SimpleQuery
({
key
:
storage
.
_mapping_dict
.
id
.
equal
,
...
...
@@ -12938,6 +12918,10 @@ return new Parser;
return
property
;
}
}
if
(
!
storage
.
_map_all_property
||
storage
.
_mapping_dict
[
property
]
===
"
ignore
"
)
{
return
false
;
}
if
(
storage
.
_map_all_property
)
{
sub_doc
[
property
]
=
doc
[
property
];
return
property
;
...
...
@@ -12960,6 +12944,10 @@ return new Parser;
return
property
;
}
}
if
(
!
storage
.
_map_all_property
||
storage
.
_mapping_dict
[
property
]
===
"
ignore
"
)
{
return
property
;
}
if
(
storage
.
_map_all_property
)
{
if
(
sub_doc
.
hasOwnProperty
(
property
))
{
doc
[
property
]
=
sub_doc
[
property
];
...
...
@@ -13262,7 +13250,6 @@ return new Parser;
)
.
push
(
function
(
result
)
{
for
(
i
=
0
;
i
<
result
.
data
.
total_rows
;
i
+=
1
)
{
result
.
data
.
rows
[
i
].
value
.
id
=
result
.
data
.
rows
[
i
].
id
;
result
.
data
.
rows
[
i
].
value
=
mapToMainDocument
(
context
,
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_jiodev_js.xml
View file @
47ee7f53
...
...
@@ -97,6 +97,16 @@
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
</item>
<item>
<key>
<string>
revision
</string>
</key>
<value>
<string>
10
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
jio.js
</string>
</value>
...
...
@@ -234,7 +244,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
955.5
5534.6594.50944
</string>
</value>
<value>
<string>
955.5
9479.27056.28433
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>
1481
328691.34
</float>
<float>
1481
540344.93
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_install_js.js
View file @
47ee7f53
...
...
@@ -219,16 +219,26 @@ var repair = false;
});
return
gadget
.
props
.
storage
.
get
(
gadget
.
props
.
cache_file
)
.
push
(
function
(
doc
)
{
var
url_list
=
doc
.
text_content
.
split
(
'
\
n
'
),
var
url_list
=
doc
.
text_content
.
split
(
'
\
r\n
'
),
i
,
start
=
url_list
.
indexOf
(
"
CACHE:
"
)
+
1
,
len
=
url_list
.
indexOf
(
"
NETWORK:
"
);
for
(
i
=
start
;
i
<
len
;
i
+=
1
)
{
if
(
url_list
[
i
]
!==
""
&&
take
=
false
;
if
(
typeof
url_list
===
"
string
"
)
{
url_list
=
doc
.
text_content
.
split
(
'
\n
'
);
}
for
(
i
=
0
;
i
<
url_list
.
length
;
i
+=
1
)
{
if
(
url_list
[
i
].
indexOf
(
"
NETWORK:
"
)
>=
0
)
{
take
=
false
;
}
if
(
take
&&
url_list
[
i
]
!==
""
&&
url_list
[
i
].
charAt
(
0
)
!==
'
#
'
&&
url_list
[
i
].
charAt
(
0
)
!==
'
'
)
{
url_list
[
i
].
replace
(
"
\r
"
,
""
);
gadget
.
props
.
cached_url
.
push
(
url_list
[
i
]);
}
if
(
url_list
[
i
].
indexOf
(
"
CACHE:
"
)
>=
0
)
{
take
=
true
;
}
}
});
}
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_install_js.xml
View file @
47ee7f53
...
...
@@ -222,7 +222,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
955.5
5436.28704.31573
</string>
</value>
<value>
<string>
955.5
9498.53728.18602
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -240,7 +240,7 @@
</tuple>
<state>
<tuple>
<float>
1481
294187.0
7
</float>
<float>
1481
538523.8
7
</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