Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-rest-fs-openacs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-rest-fs-openacs
Commits
89a7fe42
Commit
89a7fe42
authored
Jan 07, 2019
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Removed redundand local files
parent
d6baa866
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
91 deletions
+0
-91
LocalFile.js
posync/model/LocalFile.js
+0
-34
LocalFiles.js
posync/store/LocalFiles.js
+0
-57
No files found.
posync/model/LocalFile.js
deleted
100644 → 0
View file @
d6baa866
/*
* Data related to a local file.
*
* This data is provided by the electron-tree module.
*/
Ext
.
define
(
'POSync.model.LocalFile'
,
{
extend
:
'Ext.data.TreeModel'
,
idProperty
:
'path'
,
fields
:
[
'path'
,
// The full path of the file or directory
'name'
,
// The name (with extension) of the file or directory
'extension'
,
// The extension of the file or directory
'size'
,
// The size in bytes
'type'
,
// Either 'directory' or 'file'
'children'
,
// List of files and subdirectories (for directories only)
// Added for internal sencha management
'expandable'
,
// true if directory contents are shown
'expanded'
,
// true if directory contents are shown
'leaf'
,
// true if node has no children
'sha1'
,
'date'
,
'mime_type'
,
'iconCls'
],
proxy
:
{
type
:
'memory'
,
reader
:
{
type
:
'json'
,
root
:
'children'
}
}
});
posync/store/LocalFiles.js
deleted
100644 → 0
View file @
d6baa866
/*
* DataStore for local files.
*
* Proxy URL depends on application's configuration settings.
*/
Ext
.
define
(
'POSync.store.LocalFiles'
,
{
extend
:
'Ext.data.TreeStore'
,
requires
:
'POSync.model.LocalFile'
,
model
:
'POSync.model.LocalFile'
,
isLoaded
:
null
,
// ID of project loaded
root
:
{
expanded
:
true
,
children
:
[]
},
/* Load the store with the specified tree */
loadTree
:
function
(
tree
)
{
var
proxy
=
this
.
getProxy
();
proxy
.
data
=
tree
;
this
.
load
();
},
/**
* Check if a file with the given path exists
*/
searchUsingPathArray
:
function
(
pathArray
)
{
var
me
=
this
;
var
root
=
me
.
getRootNode
();
// console.log(root);
// Iterate through the pathArray elements from
// the top to find the file in the local folder
var
node
=
root
;
for
(
var
i
=
0
;
i
<
pathArray
.
length
;
i
++
)
{
var
path
=
pathArray
[
i
];
// Check all children
var
child
=
null
;
var
children
=
node
.
children
;
if
(
!
children
)
return
null
;
for
(
var
j
=
0
;
j
<
children
.
length
;
j
++
)
{
var
childName
=
children
[
j
].
get
(
'name'
);
if
(
path
==
childName
)
{
child
=
children
[
j
];
}
}
if
(
!
child
)
return
null
;
node
=
child
;
}
}
});
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