Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gabriel Monnerat
slapos.toolbox
Commits
b3e99887
Commit
b3e99887
authored
Mar 13, 2014
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issues after merging
parent
becd5186
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
68 deletions
+47
-68
slapos/runner/static/css/editor.css
slapos/runner/static/css/editor.css
+1
-14
slapos/runner/static/css/styles.css
slapos/runner/static/css/styles.css
+16
-21
slapos/runner/static/js/scripts/process.js
slapos/runner/static/js/scripts/process.js
+1
-1
slapos/runner/static/js/scripts/softwareFolder.js
slapos/runner/static/js/scripts/softwareFolder.js
+25
-30
slapos/runner/templates/softwareFolder.html
slapos/runner/templates/softwareFolder.html
+4
-2
No files found.
slapos/runner/static/css/editor.css
View file @
b3e99887
...
@@ -41,18 +41,5 @@ border-left:1px #E4E4E4 solid; cursor:pointer; color: #5C7077; text-shadow: 0px
...
@@ -41,18 +41,5 @@ border-left:1px #E4E4E4 solid; cursor:pointer; color: #5C7077; text-shadow: 0px
#tabContent
pre
{
display
:
none
;}
#tabContent
pre
{
display
:
none
;}
#tabContent
pre
.active
{
display
:
block
;}
#tabContent
pre
.active
{
display
:
block
;}
.item-hide
{
display
:
none
;}
.item-hide
{
display
:
none
;}
.bt_close
{
text-decoration
:
none
;
color
:
#999
;
font-weight
:
bold
;
font-size
:
1em
;
padding
:
0
4px
;
-webkit-border-radius
:
.2em
;
-moz-border-radius
:
.2em
;
border-radius
:
.2em
;
cursor
:
pointer
;
}
.bt_close
:hover
{
color
:
#333
;
}
slapos/runner/static/css/styles.css
View file @
b3e99887
...
@@ -410,7 +410,7 @@ padding: 10px;height: 80px;padding-bottom:15px;}
...
@@ -410,7 +410,7 @@ padding: 10px;height: 80px;padding-bottom:15px;}
}
}
#code
{
#code
{
float
:
right
;
float
:
right
;
width
:
6
80
px
;
width
:
6
92
px
;
}
}
#details_head
{
margin-bottom
:
10px
;}
#details_head
{
margin-bottom
:
10px
;}
...
@@ -633,26 +633,6 @@ a.no-right-border:focus{border-right:none}
...
@@ -633,26 +633,6 @@ a.no-right-border:focus{border-right:none}
a
.lshare
img
{
a
.lshare
img
{
margin
:
5px
;
margin
:
5px
;
}
}
.box_header
{
background
:
#E4E4E4
;
width
:
100%
;
height
:
30px
;
padding-top
:
2px
;
text-indent
:
5px
;
color
:
#737373
;
text-shadow
:
0px
1px
#F1F1F1
;
border-bottom
:
3px
solid
#6DB9DD
;
}
.box_header
li
{
float
:
left
;
border
:
1px
solid
#AAB8C2
;
padding
:
1px
5px
1px
0
;
margin-left
:
5px
;}
.box_header
li
:last-child
{
border
:
none
}
.box_header
li
>
span
{
cursor
:
pointer
;
height
:
22px
;
display
:
block
;
line-height
:
22px
;
font-weight
:
bold
;
padding
:
1px
;}
.box_header
li
:hover
{
border
:
1px
solid
#57A1D6
;
background
:
#C7C7C7
;}
.box_header
li
:last-child:hover
{
background
:
none
;
border
:
none
}
.box_header
li
>
a
{
font-weight
:
bold
;
font-size
:
15px
;
display
:
block
;
padding
:
2px
;}
.save_btn
{
background
:
url(../images/icon_save.png)
center
right
no-repeat
;
width
:
60px
;}
.swith_btn
{
background
:
url(../images/gnome-session-switch.png)
center
right
no-repeat
;
width
:
105px
;}
.flist_btn
{
background
:
url(../images/list2_down.png)
center
right
no-repeat
;
width
:
26px
;}
.fmenu_btn
{
background
:
url(../images/ui_menu_blue.png)
center
right
no-repeat
;
width
:
58px
;}
#editor
,
#editorViewer
{
#editor
,
#editorViewer
{
margin
:
0
;
margin
:
0
;
...
@@ -798,6 +778,21 @@ padding:10px; font-size:14px; color:#03406A}
...
@@ -798,6 +778,21 @@ padding:10px; font-size:14px; color:#03406A}
max-width
:
350px
;
max-width
:
350px
;
}
}
.bt_close
{
text-decoration
:
none
;
color
:
#999
;
font-weight
:
bold
;
font-size
:
1em
;
padding
:
0
4px
;
-webkit-border-radius
:
.2em
;
-moz-border-radius
:
.2em
;
border-radius
:
.2em
;
cursor
:
pointer
;
}
.bt_close
:hover
{
color
:
#333
;
}
.fullScreen
.fullScreen-editor
{
.fullScreen
.fullScreen-editor
{
height
:
auto
!important
;
height
:
auto
!important
;
width
:
auto
!important
;
width
:
auto
!important
;
...
...
slapos/runner/static/js/scripts/process.js
View file @
b3e99887
...
@@ -251,7 +251,7 @@ function runProcess(urlfor, data) {
...
@@ -251,7 +251,7 @@ function runProcess(urlfor, data) {
}
}
}
}
setInterval
(
'
GetStateRegularly()
'
,
800
);
//
setInterval('GetStateRegularly()', 800);
function
GetStateRegularly
()
{
function
GetStateRegularly
()
{
getRunningState
();
getRunningState
();
}
}
...
...
slapos/runner/static/js/scripts/softwareFolder.js
View file @
b3e99887
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
/*global $, document, $SCRIPT_ROOT, ace, window */
/*global $, document, $SCRIPT_ROOT, ace, window */
/*global path: true */
/*global path: true */
/* vim: set et sts=4: */
/* vim: set et sts=4: */
var
beforeunload_warning_set
=
0
;
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
"
use strict
"
;
"
use strict
"
;
...
@@ -23,6 +23,7 @@ $(document).ready(function () {
...
@@ -23,6 +23,7 @@ $(document).ready(function () {
pasteMode
=
null
,
pasteMode
=
null
,
favourite_list
=
new
Array
(),
favourite_list
=
new
Array
(),
editorWidth
=
$
(
"
#code
"
).
css
(
"
width
"
),
editorWidth
=
$
(
"
#code
"
).
css
(
"
width
"
),
base_path
=
function
()
{
base_path
=
function
()
{
return
softwareDisplay
?
currentProject
:
'
workspace/
'
;
return
softwareDisplay
?
currentProject
:
'
workspace/
'
;
};
};
...
@@ -88,6 +89,9 @@ $(document).ready(function () {
...
@@ -88,6 +89,9 @@ $(document).ready(function () {
if
(
!
editorlist
[
hash
].
changed
)
{
if
(
!
editorlist
[
hash
].
changed
)
{
return
;
return
;
}
}
if
(
editorlist
[
hash
].
busy
)
{
return
;
}
editorlist
[
hash
].
busy
=
true
;
editorlist
[
hash
].
busy
=
true
;
$
.
ajax
({
$
.
ajax
({
type
:
"
POST
"
,
type
:
"
POST
"
,
...
@@ -102,6 +106,9 @@ $(document).ready(function () {
...
@@ -102,6 +106,9 @@ $(document).ready(function () {
title
=
$
(
currentSpan
).
html
();
title
=
$
(
currentSpan
).
html
();
editorlist
[
hash
].
changed
=
false
;
editorlist
[
hash
].
changed
=
false
;
$
(
currentSpan
).
html
(
title
.
substr
(
1
));
$
(
currentSpan
).
html
(
title
.
substr
(
1
));
if
(
--
beforeunload_warning_set
===
0
)
{
window
.
onbeforeunload
=
function
()
{
return
;
};
}
}
else
{
}
else
{
$
(
"
#error
"
).
Popup
(
data
.
result
,
{
type
:
'
error
'
,
duration
:
5000
});
$
(
"
#error
"
).
Popup
(
data
.
result
,
{
type
:
'
error
'
,
duration
:
5000
});
}
}
...
@@ -264,10 +271,10 @@ $(document).ready(function () {
...
@@ -264,10 +271,10 @@ $(document).ready(function () {
if
(
!
editorlist
[
activeToken
].
busy
&&
!
editorlist
[
activeToken
].
changed
)
{
if
(
!
editorlist
[
activeToken
].
busy
&&
!
editorlist
[
activeToken
].
changed
)
{
editorlist
[
activeToken
].
changed
=
true
;
editorlist
[
activeToken
].
changed
=
true
;
$
(
activeSpan
).
html
(
"
*
"
+
$
(
activeSpan
).
html
());
$
(
activeSpan
).
html
(
"
*
"
+
$
(
activeSpan
).
html
());
if
(
beforeunload_warning_set
===
0
)
{
window
.
onbeforeunload
=
function
()
{
return
"
You have unsaved changes. Your changes will be lost if you don't save them
"
;
};
}
}
if
(
!
beforeunload_warning_set
)
{
beforeunload_warning_set
++
;
window
.
onbeforeunload
=
function
()
{
return
"
You have unsaved changes
"
;
};
beforeunload_warning_set
=
true
;
}
}
});
});
editor
.
commands
.
addCommand
({
editor
.
commands
.
addCommand
({
...
@@ -410,10 +417,13 @@ $(document).ready(function () {
...
@@ -410,10 +417,13 @@ $(document).ready(function () {
files
:
clipboardNode
.
data
.
path
,
files
:
clipboardNode
.
data
.
path
,
dir
:
node
.
data
.
path
dir
:
node
.
data
.
path
};
};
// Copy mode: prevent duplicate keys:
var
request
,
cb
=
clipboardNode
.
toDict
(
true
,
function
(
dict
){
delete
dict
.
key
;
// Remove key, so a new one will be created
});
if
(
pasteMode
==
"
cut
"
)
{
if
(
pasteMode
==
"
cut
"
)
{
// Cut mode: check for recursion and remove source
// Cut mode: check for recursion and remove source
dataForSend
.
opt
=
7
;
dataForSend
.
opt
=
7
;
var
cb
=
clipboardNode
.
toDict
(
true
);
if
(
node
.
isDescendantOf
(
clipboardNode
)
)
{
if
(
node
.
isDescendantOf
(
clipboardNode
)
)
{
$
(
"
#error
"
).
Popup
(
"
ERROR: Cannot move a node to it's sub node.
"
,
{
type
:
'
error
'
,
duration
:
5000
});
$
(
"
#error
"
).
Popup
(
"
ERROR: Cannot move a node to it's sub node.
"
,
{
type
:
'
error
'
,
duration
:
5000
});
return
;
return
;
...
@@ -430,6 +440,7 @@ $(document).ready(function () {
...
@@ -430,6 +440,7 @@ $(document).ready(function () {
}
}
clipboardNode
.
remove
();
clipboardNode
.
remove
();
}
}
clipboardNode
=
pasteMode
=
null
;
});
});
}
else
{
}
else
{
if
(
node
.
key
===
clipboardNode
.
getParent
().
key
){
if
(
node
.
key
===
clipboardNode
.
getParent
().
key
){
...
@@ -441,10 +452,6 @@ $(document).ready(function () {
...
@@ -441,10 +452,6 @@ $(document).ready(function () {
request
=
fileBrowserOp
(
dataForSend
);
request
=
fileBrowserOp
(
dataForSend
);
request
.
always
(
function
()
{
request
.
always
(
function
()
{
if
(
ajaxResult
){
if
(
ajaxResult
){
// Copy mode: prevent duplicate keys:
var
cb
=
clipboardNode
.
toDict
(
true
,
function
(
dict
){
delete
dict
.
key
;
// Remove key, so a new one will be created
});
if
(
dataForSend
.
opt
===
14
){
if
(
dataForSend
.
opt
===
14
){
node
.
lazyLoad
(
true
);
node
.
lazyLoad
(
true
);
node
.
toggleExpanded
();
node
.
toggleExpanded
();
...
@@ -454,9 +461,9 @@ $(document).ready(function () {
...
@@ -454,9 +461,9 @@ $(document).ready(function () {
node
.
render
();
node
.
render
();
}
}
}
}
clipboardNode
=
pasteMode
=
null
;
});
});
}
}
clipboardNode
=
pasteMode
=
null
;
break
;
break
;
}
}
};
};
...
@@ -839,12 +846,7 @@ $(document).ready(function () {
...
@@ -839,12 +846,7 @@ $(document).ready(function () {
if
(
$
(
"
#tabControl div.item
"
).
length
===
0
)
{
if
(
$
(
"
#tabControl div.item
"
).
length
===
0
)
{
return
false
;
return
false
;
}
}
beforeunload_warning_set
=
false
;
window
.
onbeforeunload
=
function
()
{
return
;
};
var
hash
=
getActiveToken
();
var
hash
=
getActiveToken
();
if
(
editorlist
[
hash
].
busy
)
{
return
false
;
}
runSaveFile
(
hash
);
runSaveFile
(
hash
);
return
false
;
return
false
;
});
});
...
@@ -915,17 +917,6 @@ $(document).ready(function () {
...
@@ -915,17 +917,6 @@ $(document).ready(function () {
$
(
"
#option
"
).
click
();
$
(
"
#option
"
).
click
();
return
false
;
return
false
;
});
});
$
(
"
a#addflist
"
).
click
(
function
(){
addToFavourite
(
current_file
);
$
(
"
#option
"
).
click
();
return
false
;
});
$
(
"
a#find
"
).
click
(
function
(){
config
.
loadModule
(
"
ace/ext/searchbox
"
,
function
(
e
)
{
e
.
Search
(
editor
)});
$
(
"
#option
"
).
click
();
return
false
;
});
$
(
"
a#find
"
).
click
(
function
()
{
$
(
"
a#find
"
).
click
(
function
()
{
if
(
$
(
"
#tabControl div.item
"
).
length
===
0
)
{
if
(
$
(
"
#tabControl div.item
"
).
length
===
0
)
{
...
@@ -950,9 +941,13 @@ $(document).ready(function () {
...
@@ -950,9 +941,13 @@ $(document).ready(function () {
});
});
$
(
"
#fullscreen
"
).
click
(
function
(){
$
(
"
#fullscreen
"
).
click
(
function
(){
if
(
$
(
"
#tabControl div.item
"
).
length
===
0
)
{
return
false
;
}
var
hash
=
getActiveToken
();
$
(
"
body
"
).
toggleClass
(
"
fullScreen
"
);
$
(
"
body
"
).
toggleClass
(
"
fullScreen
"
);
$
(
"
#editor
"
).
toggleClass
(
"
fullScreen-editor
"
);
$
(
"
#tabContent pre.active[rel='
"
+
hash
+
"
']
"
).
toggleClass
(
"
fullScreen-editor
"
);
editor
.
resize
();
editorlist
[
hash
].
editor
.
resize
();
});
});
});
});
slapos/runner/templates/softwareFolder.html
View file @
b3e99887
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
<ul>
<ul>
<li
id=
"switch"
><span
class=
"swith_btn"
title=
"Switch between differents file source"
>
This project
</span></li>
<li
id=
"switch"
><span
class=
"swith_btn"
title=
"Switch between differents file source"
>
This project
</span></li>
<li
id=
"save"
><span
class=
"save_btn"
title=
"Save current file. Hint: Use Ctrl+S"
>
</span></li>
<li
id=
"save"
><span
class=
"save_btn"
title=
"Save current file. Hint: Use Ctrl+S"
>
</span></li>
<li
id=
"expand"
><span
class=
"expand_editor"
title=
"Expand or reduce
the editor area
"
>
</span></li>
<li
id=
"expand"
><span
class=
"expand_editor"
title=
"Expand or reduce
Editor. hint: Ctrl+E for full screen
"
>
</span></li>
<li
id=
"filelist"
><span
class=
"flist_btn"
title=
"Favourites files list"
rel=
'tooltip'
>
</span></li>
<li
id=
"filelist"
><span
class=
"flist_btn"
title=
"Favourites files list"
rel=
'tooltip'
>
</span></li>
<li
id=
"option"
><span
class=
"fmenu_btn"
title=
'Show more option'
rel=
'tooltip'
>
Menu
</span></li>
<li
id=
"option"
><span
class=
"fmenu_btn"
title=
'Show more option'
rel=
'tooltip'
>
Menu
</span></li>
</ul>
</ul>
...
@@ -76,7 +76,9 @@
...
@@ -76,7 +76,9 @@
<ul
class=
"inline"
>
<ul
class=
"inline"
>
<li><a
id=
'getmd5'
href=
"#"
>
Get or Update md5sum
</a></li>
<li><a
id=
'getmd5'
href=
"#"
>
Get or Update md5sum
</a></li>
<li><a
id=
'addflist'
href=
"#"
>
Add to favourites
</a></li>
<li><a
id=
'addflist'
href=
"#"
>
Add to favourites
</a></li>
<li><a
id=
'fullscreen'
title=
"Show Editor in Fullscreen. Hint: Use Ctrl+E"
href=
"#"
>
Full screen
[Ctrl+E]
</a></li>
<li><a
id=
'fullscreen'
title=
"Show Editor in Fullscreen. Hint: Use Ctrl+E"
href=
"#"
>
Full screen
[Ctrl+E]
</a>
</li>
<li><a
id=
'find'
href=
"#"
>
Find in file
[Ctrl+F]
</a></li>
<li><a
id=
'find'
href=
"#"
>
Find in file
[Ctrl+F]
</a></li>
<li><a
id=
'replace'
href=
"#"
>
Replace in file
[Ctrl+H]
</a></li>
<li><a
id=
'replace'
href=
"#"
>
Replace in file
[Ctrl+H]
</a></li>
</ul>
</ul>
...
...
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