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
fdfb7925
Commit
fdfb7925
authored
Jan 02, 2015
by
Martin Urban
Browse files
Merge
parents
18587a20
d31df7b7
Changes
5
Hide whitespace changes
Inline
Side-by-side
vispa/extensions/codeeditor/static/css/styles.css
View file @
fdfb7925
...
...
@@ -40,7 +40,7 @@
top
:
0px
;
bottom
:
0px
;
width
:
4px
;
overflow
:
auto
;
overflow
:
visible
;
z-index
:
1
;
background-color
:
#E8E8E8
;
}
...
...
@@ -69,7 +69,7 @@
left
:
0px
;
right
:
0px
;
height
:
4px
;
overflow
:
auto
;
overflow
:
visible
;
z-index
:
1
;
background-color
:
#E8E8E8
;
}
...
...
vispa/extensions/codeeditor/static/js/editor.js
View file @
fdfb7925
...
...
@@ -284,19 +284,36 @@ var CodeEditor = Emitter.extend({
var
args
=
{
"
path
"
:
path
,
callback
:
function
(
path
)
{
var
fileExtension
=
path
.
split
(
"
.
"
).
pop
().
toLowerCase
();
if
(
!~
self
.
view
.
_extension
.
fileExtensions
.
indexOf
(
fileExtension
))
{
var
msg
=
"
<html>File extension '
"
+
fileExtension
+
"
' is not supported! <br /> Save anyway?</html>
"
;
self
.
view
.
confirm
(
msg
,
function
(
confirmed
)
{
if
(
confirmed
)
{
self
.
view
.
POST
(
vispa
.
url
.
dynamic
(
"
/ajax/fs/exists
"
),
{
path
:
path
}).
done
(
function
(
selectedType
)
{
var
proceedSave
=
function
()
{
var
fileExtension
=
path
.
split
(
"
.
"
).
pop
().
toLowerCase
();
if
(
!~
self
.
view
.
_extension
.
fileExtensions
.
indexOf
(
fileExtension
))
{
var
msg
=
"
<html>File extension '
"
+
fileExtension
+
"
' is not supported! <br /> Save anyway?</html>
"
;
self
.
view
.
confirm
(
msg
,
function
(
confirmed
)
{
if
(
confirmed
)
{
self
.
save
(
callback
,
"
new
"
,
path
);
}
});
}
else
{
self
.
save
(
callback
,
"
new
"
,
path
);
}
});
}
else
{
self
.
save
(
callback
,
"
new
"
,
path
);
}
};
if
(
selectedType
==
"
f
"
)
{
//selected element is an existing file
var
msg
=
"
<html> File exists already! <br />
"
+
"
Do you want to overwrite it ? </html>
"
;
self
.
view
.
confirm
(
msg
,
function
(
confirmed
)
{
if
(
confirmed
)
proceedSave
();
else
return
;
});
}
else
proceedSave
();
});
},
sort
:
[
"
name
"
,
"
ext
"
],
reverse
:
[
false
,
false
]
...
...
vispa/extensions/codeeditor/static/js/extension.js
View file @
fdfb7925
...
...
@@ -29,7 +29,7 @@ var CodeEditorExtension = vispa.Extension.extend({
// register to listen to certain file extensions
this
.
fileExtensions
=
[
"
bsc
"
,
"
c
"
,
"
cc
"
,
"
conf
"
,
"
cpp
"
,
"
csh
"
,
"
css
"
,
"
diff
"
,
"
f
"
,
"
f70
"
,
"
f90
"
,
"
f95
"
,
"
f03
"
,
"
h
"
,
"
hh
"
,
"
hpp
"
,
"
html
"
,
"
ini
"
,
"
java
"
,
"
js
"
,
"
less
"
,
"
log
"
,
"
json
"
,
"
md
"
,
"
orig
"
,
"
php
"
,
"
py
"
,
"
pyc
"
,
"
rb
"
,
"
sh
"
,
"
tex
"
,
"
txt
"
,
"
xml
"
,
"
yml
"
,
"
yaml
"
,
"
zsh
"
"
md
"
,
"
orig
"
,
"
php
"
,
"
py
"
,
"
rb
"
,
"
sh
"
,
"
tex
"
,
"
txt
"
,
"
xml
"
,
"
yml
"
,
"
yaml
"
,
"
zsh
"
];
$
.
each
(
this
.
fileExtensions
,
function
(
i
,
key
)
{
self
.
addFileHandler
(
key
,
function
(
workspaceId
,
path
)
{
...
...
vispa/extensions/codeeditor/static/js/ui.js
View file @
fdfb7925
...
...
@@ -22,6 +22,24 @@ var CodeEditorUI = Emitter.extend({
this
.
xDragbar
=
$
(
"
.codeeditor-x-dragbar
"
,
this
.
view
.
_nodes
.
content
);
this
.
yDragbar
=
$
(
"
.codeeditor-y-dragbar
"
,
this
.
view
.
_nodes
.
content
);
if
(
vispa
.
device
.
hasTouch
)
{
var
xMarker
=
$
(
"
<div />
"
).
css
({
"
height
"
:
"
15px
"
,
"
width
"
:
"
15px
"
,
"
top
"
:
"
30%
"
,
"
position
"
:
"
absolute
"
}).
append
(
$
(
"
<i />
"
).
addClass
(
"
glyphicon glyphicon-resize-horizontal
"
));
var
yMarker
=
$
(
"
<div />
"
).
css
({
"
height
"
:
"
15px
"
,
"
width
"
:
"
15px
"
,
"
left
"
:
"
30%
"
,
"
position
"
:
"
absolute
"
,
"
bottom
"
:
"
0%
"
}).
append
(
$
(
"
<i />
"
).
addClass
(
"
glyphicon glyphicon-resize-vertical
"
));
this
.
xDragbar
.
append
(
xMarker
);
this
.
yDragbar
.
append
(
yMarker
);
}
this
.
xDragbar
.
on
({
mouseover
:
function
()
{
$
(
"
body
"
).
css
(
"
cursor
"
,
"
col-resize
"
);
...
...
vispa/extensions/file/static/js/menuentries.js
View file @
fdfb7925
...
...
@@ -49,11 +49,7 @@ function getFileMenuEntries() {
iconClass
:
"
glyphicon glyphicon-list
"
,
buttonClass
:
"
btn-default
"
,
callback
:
function
()
{
if
(
this
.
_name
==
"
FileBrowser
"
)
{
this
.
fb
.
changeView
(
Tableview
);
}
else
{
this
.
fb
.
changeView
(
SelectorTableview
);
}
this
.
fb
.
changeView
(
Tableview
);
}
}]
},
{
...
...
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