Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
3pia
VISPA
VISPA web
Commits
10bee47a
Commit
10bee47a
authored
Oct 16, 2017
by
Benjamin Fischer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FileManager: added openWith contextmenu to navbar
parent
87691966
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
7 deletions
+18
-7
vispa/extensions/file2/static/html/vue/navbar-segment.html
vispa/extensions/file2/static/html/vue/navbar-segment.html
+1
-0
vispa/extensions/file2/static/js/vue/browser.js
vispa/extensions/file2/static/js/vue/browser.js
+2
-2
vispa/extensions/file2/static/js/vue/navbar.js
vispa/extensions/file2/static/js/vue/navbar.js
+8
-0
vispa/static/js/filehandler2.js
vispa/static/js/filehandler2.js
+7
-5
No files found.
vispa/extensions/file2/static/html/vue/navbar-segment.html
View file @
10bee47a
<li
@
click=
"navi"
@
contextmenu=
"openMenu"
:class=
"{
'dropok': dropok
}"
...
...
vispa/extensions/file2/static/js/vue/browser.js
View file @
10bee47a
...
...
@@ -117,7 +117,7 @@ define([
var
sel
=
this
.
selectedItems
;
if
(
sel
.
length
&&
(
!
info
.
data
||
sel
.
filter
(
function
(
it
)
{
return
it
.
name
==
info
.
data
.
name
;
}).
length
))
{
}).
length
)
&&
!
info
.
pathBase
)
{
ext
.
items
=
sel
;
}
else
if
(
info
.
data
)
{
ext
.
items
=
[
info
.
data
];
...
...
@@ -125,7 +125,7 @@ define([
// add other info
ext
.
view
=
this
.
view
;
ext
.
wsId
=
ext
.
view
.
workspaceId
;
ext
.
pathBase
=
this
.
path
;
ext
.
pathBase
=
info
.
pathBase
||
this
.
path
;
// add hook entry point fo us
ext
.
_f2br
=
this
;
return
$
.
extend
({},
info
,
ext
);
...
...
vispa/extensions/file2/static/js/vue/navbar.js
View file @
10bee47a
...
...
@@ -109,6 +109,14 @@ define([
dropFilter
:
function
(
ev
)
{
return
dropFilter
(
ev
,
this
.
workspaceId
,
this
.
fullPath
);
},
openMenu
:
function
(
ev
)
{
this
.
$dispatch
(
"
openMenu
"
,
{
pathBase
:
this
.
fullPath
,
menuPP
:
function
(
menu
)
{
return
(
menu
.
openWith
||
{}).
items
;
},
},
ev
);
},
},
events
:
{
dropped
:
function
(
data
,
ev
)
{
...
...
vispa/static/js/filehandler2.js
View file @
10bee47a
...
...
@@ -24,10 +24,10 @@ define([
var
menu
=
this
.
_filterMenu
(
this
.
handlersBase
,
info
);
// need the open with menu?
if
(
!
info
.
data
)
{
// nothing directly hit (just in a folder)
var
n
,
p
=
info
.
pathBase
.
split
(
"
/
"
);
while
(
!
n
&&
p
)
n
=
p
.
pop
()
;
info
.
pathBase
=
p
.
join
(
"
/
"
)
;
var
n
=
""
,
p
=
info
.
pathBase
.
split
(
"
/
"
);
while
(
(
n
=
p
.
pop
())
==
""
);
info
.
pathBase
=
p
.
join
(
"
/
"
)
||
"
/
"
;
n
=
n
||
"
/
"
;
info
.
data
=
{
root
:
n
,
name
:
n
,
...
...
@@ -46,6 +46,8 @@ define([
// add divider
menu
.
divider1
=
{
divider
:
true
,
position
:
10
};
menu
.
divider2
=
{
divider
:
true
,
position
:
100
};
if
(
info
.
menuPP
)
menu
=
info
.
menuPP
(
menu
)
||
{};
return
menu
;
},
action
:
function
(
what
,
info
)
{
...
...
@@ -124,7 +126,7 @@ define([
M
.
clsBib
.
single
=
M
.
clsBib
.
base
.
_extend
({
fullPath
:
function
(
info
)
{
return
info
.
pathBase
+
"
/
"
+
info
.
data
.
name
;
return
(
info
.
pathBase
+
"
/
"
+
info
.
data
.
name
).
replace
(
/
\/
+/g
,
"
/
"
)
;
},
ext
:
function
(
info
)
{
if
(
!
info
.
data
)
return
;
...
...
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