Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
3pia
VISPA
VISPA web
Commits
3f1ba2db
Commit
3f1ba2db
authored
Aug 09, 2017
by
Benjamin Fischer
Browse files
FileManager: set tab-label to current path
parent
2ab4fc29
Changes
3
Hide whitespace changes
Inline
Side-by-side
vispa/extensions/file2/static/js/view/base.js
View file @
3f1ba2db
...
...
@@ -7,26 +7,23 @@ define([
path
:
this
.
prefs
.
get
(
"
homePath
"
),
},
args
);
this
.
state
.
on
(
"
path
"
,
function
()
{
this
.
state
.
on
(
"
path
"
,
function
(
path
)
{
if
(
!
this
.
vue
)
return
;
if
(
!
this
.
vue
.
content
)
return
;
if
(
this
.
autoPathLabel
)
this
.
setLabel
(
path
,
true
);
this
.
reload
();
}.
bind
(
this
));
this
.
socket
.
on
(
"
watch
"
,
function
(
data
)
{
// console.log(data);
if
(
data
.
event
!=
"
change
"
)
return
;
this
.
reload
();
// The following two parameters are defined in remote/filesystem.py
// MAX_INLINE_SUBJECTS = 10
// MAX_SUBJECT_NAMES = 25
// if (data.subject_count <= 10) {
// self.fb.view.reactOnChange(data);
// } else {
// self.fb.updateView();
// }
// TODO: handle inline diffs
}.
bind
(
this
));
if
(
this
.
autoPathLabel
)
this
.
setLabel
(
this
.
state
.
get
(
"
path
"
),
true
);
this
.
prefs
.
forceWorkspace
(
"
bookmarks
"
);
},
navigate
:
function
(
path
)
{
...
...
vispa/extensions/file2/static/js/view/main.js
View file @
3f1ba2db
...
...
@@ -20,9 +20,8 @@ define([
var
FileMainView
=
MainView
.
_extend
(
$
.
extend
({},
BaseMixin
,
{
init
:
function
init
(
args
)
{
init
.
_super
.
apply
(
this
,
arguments
);
this
.
autoPathLabel
=
true
;
BaseMixin
.
init
.
call
(
this
,
args
);
this
.
prefs
.
forceWorkspace
(
"
bookmarks
"
);
},
getFragment
:
function
()
{
...
...
vispa/extensions/file2/static/js/view/selector.js
View file @
3f1ba2db
...
...
@@ -64,18 +64,11 @@ define([
var
FileSelectorView
=
DialogView
.
_extend
(
$
.
extend
({},
BaseMixin
,
{
init
:
function
init
(
args
)
{
init
.
_super
.
apply
(
this
,
arguments
);
BaseMixin
.
init
.
call
(
this
,
args
);
this
.
prefs
.
forceWorkspace
(
"
bookmarks
"
);
this
.
_args
=
args
;
if
(
args
.
label
===
undefined
)
this
.
label
=
args
.
label
;
else
this
.
state
.
on
(
"
path
"
,
function
(
path
)
{
this
.
label
=
path
;
}.
bind
(
this
));
this
.
autoPathLabel
=
true
;
BaseMixin
.
init
.
call
(
this
,
args
);
},
render
:
function
()
{
...
...
Write
Preview
Supports
Markdown
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