Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
officejs_fs2erp5_gadget
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
Boris Kocherov
officejs_fs2erp5_gadget
Commits
211f9a98
Commit
211f9a98
authored
Sep 19, 2017
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support exluded_paths
parent
eeeaae3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
jio_fs2erp5storage.js
jio_fs2erp5storage.js
+18
-3
No files found.
jio_fs2erp5storage.js
View file @
211f9a98
...
@@ -228,6 +228,16 @@
...
@@ -228,6 +228,16 @@
},
{
header
:
true
,
indent
:
'
'
});
},
{
header
:
true
,
indent
:
'
'
});
}
}
function
check_excluded
(
path
,
excluded_paths
)
{
var
i
;
for
(
i
=
0
;
i
<
excluded_paths
.
length
;
i
+=
1
)
{
if
(
path
.
startsWith
(
excluded_paths
[
i
]))
{
return
false
;
}
}
return
true
;
}
function
Fs2Erp5Storage
(
spec
)
{
function
Fs2Erp5Storage
(
spec
)
{
this
.
_document
=
spec
.
document
;
this
.
_document
=
spec
.
document
;
this
.
_sub_storage
=
jIO
.
createJIO
(
spec
.
sub_storage
);
this
.
_sub_storage
=
jIO
.
createJIO
(
spec
.
sub_storage
);
...
@@ -332,10 +342,15 @@
...
@@ -332,10 +342,15 @@
'
/PathTemplateItem/
'
;
'
/PathTemplateItem/
'
;
context
.
_id_dict
[
context
.
path_prefix_meta
]
=
bt_folder
;
context
.
_id_dict
[
context
.
path_prefix_meta
]
=
bt_folder
;
context
.
_template_path_list
=
{};
context
.
_template_path_list
=
{};
context
.
excluded_paths
=
context
.
_options
.
excluded_paths
||
[];
scopes
=
context
.
_options
.
scopes
||
{};
scopes
=
context
.
_options
.
scopes
||
{};
for
(
i
=
0
;
i
<
scopes
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
scopes
.
length
;
i
+=
1
)
{
size
++
;
size
++
;
scope
=
scopes
[
i
];
scope
=
scopes
[
i
];
if
(
scope
.
excluded_paths
)
{
context
.
excluded_paths
=
context
.
excluded_paths
.
concat
(
scope
.
excluded_paths
);
}
for
(
x
=
0
;
x
<
scope
.
paths
.
length
;
x
+=
1
)
{
for
(
x
=
0
;
x
<
scope
.
paths
.
length
;
x
+=
1
)
{
path
=
scope
.
paths
[
x
];
path
=
scope
.
paths
[
x
];
context
.
_paths
[
path
]
=
scope
;
context
.
_paths
[
path
]
=
scope
;
...
@@ -372,9 +387,9 @@
...
@@ -372,9 +387,9 @@
if
(
if
(
result
.
hasOwnProperty
(
id
)
&&
result
.
hasOwnProperty
(
id
)
&&
id
!==
"
/
"
&&
id
!==
"
/
"
&&
!
id
.
startsWith
(
"
http
"
)
&&
!
id
.
startsWith
(
"
erp5_/
"
)
&&
//remove meta of package
!
id
.
startsWith
(
"
erp5_/
"
)
&&
//rmove meta of package
!
id
.
startsWith
(
"
assets/
"
)
&&
// remove github added assets
!
id
.
startsWith
(
"
assets/
"
)
// remove github added assets
check_excluded
(
id
,
context
.
excluded_paths
)
)
{
)
{
xmldoc
=
{};
xmldoc
=
{};
last_index
=
id
.
lastIndexOf
(
"
/
"
)
+
1
;
last_index
=
id
.
lastIndexOf
(
"
/
"
)
+
1
;
...
...
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