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
Papa Tamsir Kane
erp5
Commits
df74a9f6
Commit
df74a9f6
authored
Sep 13, 2017
by
Papa Tamsir Kane
Committed by
Papa Tamsir Kane
Sep 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_office_js: Bookmark Manager, add migration code url_string -> coordinate_text
parent
5d9f2d19
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
3 deletions
+46
-3
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bookmark_page_list_js.js
.../web_page_module/gadget_officejs_bookmark_page_list_js.js
+44
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bookmark_page_list_js.xml
...web_page_module/gadget_officejs_bookmark_page_list_js.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bookmark_page_list_js.js
View file @
df74a9f6
...
...
@@ -12,6 +12,48 @@
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
.
declareAcquiredMethod
(
"
jio_put
"
,
"
jio_put
"
)
// This is migration code from url_string to coordinate_text.
// Can be removed whenever deemed no longer necessary.
// May consider removing aquired method jio_put and setSetting above.
// Also remove [url_string, url_string] from column list below.
// begin migration code
.
allowPublicAcquisition
(
"
jio_allDocs
"
,
function
(
param_list
)
{
var
gadget
=
this
,
data
,
query_result
;
return
gadget
.
jio_allDocs
(
param_list
[
0
])
.
push
(
function
(
result
)
{
query_result
=
result
;
return
gadget
.
getSetting
(
'
migrated
'
,
false
);
})
.
push
(
function
(
migrated
)
{
if
(
!
migrated
)
{
var
i
,
len
=
query_result
.
data
.
total_rows
,
promises_list
=
[];
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
var
row_value
=
query_result
.
data
.
rows
[
i
].
value
;
if
(
row_value
.
hasOwnProperty
(
"
url_string
"
))
{
if
(
!
row_value
.
hasOwnProperty
(
"
coordinate_text
"
))
{
row_value
.
coordinate_text
=
query_result
.
data
.
rows
[
i
].
value
.
url_string
;
row_value
.
modification_date
=
(
new
Date
()).
toUTCString
();
row_value
.
parent_relative_url
=
"
url_module
"
;
row_value
.
portal_type
=
"
Url
"
;
promises_list
.
push
(
gadget
.
jio_put
(
query_result
.
data
.
rows
[
i
].
id
,
row_value
));
}
}
data
=
query_result
;
promises_list
.
push
(
gadget
.
setSetting
(
'
migrated
'
,
true
));
return
RSVP
.
all
(
promises_list
);
}
}
else
{
data
=
query_result
;
}
})
.
push
(
function
()
{
return
data
;
});
})
// end migration code
/////////////////////////////////////////////////////////////////
// declared methods
...
...
@@ -39,7 +81,8 @@
[
'
reference
'
,
'
Reference
'
],
[
'
title
'
,
'
Title
'
],
[
'
coordinate_text
'
,
'
Url
'
],
[
'
description
'
,
'
Description
'
]
[
'
description
'
,
'
Description
'
],
[
'
url_string
'
,
'
url_string
'
]
];
return
result
[
0
].
render
({
erp5_document
:
{
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bookmark_page_list_js.xml
View file @
df74a9f6
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
1.49415.17092.22306
</string>
</value>
<value>
<string>
96
2.4164.48194.47035
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
150
4099713.54
</float>
<float>
150
5311051.82
</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