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
Kazuhiko Shiozaki
slapos.toolbox
Commits
98018af6
Commit
98018af6
authored
Mar 19, 2014
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Full window mode can show also tabs, menus and filetree
parent
299dbfed
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
21 deletions
+56
-21
slapos/runner/static/css/styles.css
slapos/runner/static/css/styles.css
+22
-3
slapos/runner/static/js/scripts/softwareFolder.js
slapos/runner/static/js/scripts/softwareFolder.js
+29
-13
slapos/runner/templates/softwareFolder.html
slapos/runner/templates/softwareFolder.html
+5
-5
No files found.
slapos/runner/static/css/styles.css
View file @
98018af6
...
@@ -589,7 +589,6 @@ label.header {
...
@@ -589,7 +589,6 @@ label.header {
font-weight
:
normal
;
font-weight
:
normal
;
}
}
select
{
select
{
-webkit-appearance
:
button
;
-webkit-border-radius
:
2px
;
-webkit-border-radius
:
2px
;
-moz-border-radius
:
2px
;
-moz-border-radius
:
2px
;
box-shadow
:
0px
1px
3px
rgba
(
0
,
0
,
0
,
0.1
);
box-shadow
:
0px
1px
3px
rgba
(
0
,
0
,
0
,
0.1
);
...
@@ -793,7 +792,8 @@ padding:10px; font-size:14px; color:#03406A}
...
@@ -793,7 +792,8 @@ padding:10px; font-size:14px; color:#03406A}
color
:
#333
;
color
:
#333
;
}
}
.fullScreen
.fullScreen-editor
{
.fullScreen
{
background
:
#fff
;
height
:
auto
!important
;
height
:
auto
!important
;
width
:
auto
!important
;
width
:
auto
!important
;
border
:
0
;
border
:
0
;
...
@@ -803,7 +803,26 @@ padding:10px; font-size:14px; color:#03406A}
...
@@ -803,7 +803,26 @@ padding:10px; font-size:14px; color:#03406A}
bottom
:
0
;
bottom
:
0
;
left
:
0
;
left
:
0
;
right
:
0
;
right
:
0
;
z-index
:
10000
;
z-index
:
140
;
}
.fullScreen-editor
{
height
:
auto
!important
;
width
:
auto
!important
;
position
:
fixed
!important
;
top
:
35px
;
bottom
:
0
;
left
:
244px
;
right
:
0
;
}
.fullScreen-tree
{
height
:
auto
!important
;
width
:
238px
;
position
:
fixed
!important
;
top
:
37px
;
bottom
:
0
;
left
:
0
;
right
:
0
;
}
}
.fullScreen
{
.fullScreen
{
...
...
slapos/runner/static/js/scripts/softwareFolder.js
View file @
98018af6
...
@@ -181,13 +181,6 @@ $(document).ready(function () {
...
@@ -181,13 +181,6 @@ $(document).ready(function () {
//Add new tabItem
//Add new tabItem
function
addTab
(
path
,
selected
)
{
function
addTab
(
path
,
selected
)
{
var
numberTab
=
$
(
"
#tabControl div.item
"
).
length
;
if
(
numberTab
>=
getMaxTab
()
)
{
$
(
"
#error
"
).
Popup
(
"
Sorry! We cannot add more item, please close unused tab
"
,
{
type
:
'
info
'
,
duration
:
5000
});
return
""
;
}
var
title
=
path
.
replace
(
/^.*
(\\
|
\/
|
\:)
/
,
''
);
var
hash
=
path
.
hashCode
()
+
''
;
var
hash
=
path
.
hashCode
()
+
''
;
if
(
editorlist
.
hasOwnProperty
(
hash
))
{
if
(
editorlist
.
hasOwnProperty
(
hash
))
{
//this file already exist in editor. Select file and exit!
//this file already exist in editor. Select file and exit!
...
@@ -200,6 +193,13 @@ $(document).ready(function () {
...
@@ -200,6 +193,13 @@ $(document).ready(function () {
});
});
return
""
;
return
""
;
}
}
var
title
=
path
.
replace
(
/^.*
(\\
|
\/
|
\:)
/
,
''
);
var
numberTab
=
$
(
"
#tabControl div.item
"
).
length
;
if
(
numberTab
>=
getMaxTab
()
)
{
$
(
"
#error
"
).
Popup
(
"
Sorry! We cannot add more item, please close unused tab
"
,
{
type
:
'
info
'
,
duration
:
5000
});
return
""
;
}
var
width
=
resizeTabItems
(
true
);
var
width
=
resizeTabItems
(
true
);
var
tab
=
'
<div class="item" rel="
'
+
hash
var
tab
=
'
<div class="item" rel="
'
+
hash
+
'
"><span style="width:
'
+
width
+
'
px"
'
+
'
"><span style="width:
'
+
width
+
'
px"
'
...
@@ -858,19 +858,25 @@ $(document).ready(function () {
...
@@ -858,19 +858,25 @@ $(document).ready(function () {
});
});
$
(
"
#expand
"
).
click
(
function
()
{
$
(
"
#expand
"
).
click
(
function
()
{
if
(
!
$
(
"
#expand span
"
).
hasClass
(
'
e_expanded
'
)
)
{
var
leftWith
=
$
(
'
#fileTree
'
).
width
()
+
6
;
if
(
$
(
"
#details_box
"
).
css
(
"
display
"
)
!==
'
none
'
)
{
$
(
"
#details_box
"
).
hide
();
$
(
"
#details_box
"
).
hide
();
$
(
"
#code
"
).
css
(
"
width
"
,
"
100%
"
);
$
(
"
#code
"
).
css
(
"
width
"
,
"
100%
"
);
$
(
"
#expand span
"
).
addClass
(
'
e_expanded
'
);
if
(
$
(
"
body
"
).
hasClass
(
"
fullScreen
"
)
)
{
$
(
"
.main_content
"
).
css
(
'
left
'
,
'
0
'
);
}
}
}
else
{
else
{
$
(
"
#expand span
"
).
removeClass
(
'
e_expanded
'
);
if
(
$
(
"
body
"
).
hasClass
(
"
fullScreen
"
)
)
{
$
(
"
.main_content
"
).
css
(
'
left
'
,
leftWith
+
'
px
'
);
}
$
(
"
#details_box
"
).
show
();
$
(
"
#details_box
"
).
show
();
$
(
"
#code
"
).
css
(
"
width
"
,
editorWidth
);
$
(
"
#code
"
).
css
(
"
width
"
,
editorWidth
);
}
}
if
(
$
(
"
#tabControl div.item
"
).
length
!==
0
)
{
if
(
$
(
"
#tabControl div.item
"
).
length
!==
0
)
{
getCurrentEditor
().
resize
();
getCurrentEditor
().
resize
();
}
}
$
(
"
#option
"
).
click
();
return
false
;
return
false
;
});
});
...
@@ -943,13 +949,23 @@ $(document).ready(function () {
...
@@ -943,13 +949,23 @@ $(document).ready(function () {
});
});
$
(
"
#fullscreen
"
).
click
(
function
(){
$
(
"
#fullscreen
"
).
click
(
function
(){
var
hash
=
getActiveToken
();
$
(
"
#fullscreen span
"
).
toggleClass
(
"
e_expanded
"
);
$
(
"
body
"
).
toggleClass
(
"
fullScreen
"
);
$
(
"
#software_folder
"
).
toggleClass
(
"
fullScreen
"
);
$
(
"
.main_content
"
).
toggleClass
(
"
fullScreen-editor
"
);
$
(
'
#fileTree
'
).
toggleClass
(
"
fullScreen-tree
"
);
$
(
'
#fileTreeFull
'
).
toggleClass
(
"
fullScreen-tree
"
);
$
(
"
.main_content
"
).
css
(
'
left
'
,
''
);
if
(
$
(
"
#details_box
"
).
css
(
"
display
"
)
===
'
none
'
)
{
$
(
"
.main_content
"
).
css
(
'
left
'
,
'
0
'
);
}
if
(
$
(
"
#tabControl div.item
"
).
length
===
0
)
{
if
(
$
(
"
#tabControl div.item
"
).
length
===
0
)
{
return
false
;
return
false
;
}
}
var
hash
=
getActiveToken
();
resizeTabItems
();
$
(
"
body
"
).
toggleClass
(
"
fullScreen
"
);
$
(
"
#tabContent pre.active[rel='
"
+
hash
+
"
']
"
).
toggleClass
(
"
fullScreen-editor
"
);
editorlist
[
hash
].
editor
.
resize
();
editorlist
[
hash
].
editor
.
resize
();
return
false
;
});
});
});
});
slapos/runner/templates/softwareFolder.html
View file @
98018af6
...
@@ -45,10 +45,10 @@
...
@@ -45,10 +45,10 @@
<div
class=
'box_header'
>
<div
class=
'box_header'
>
<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=
"expand"
><span
class=
"expand_editor"
title=
"Expand or reduce Editor. hint: Ctrl+E for full window"
>
</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=
"fullscreen"
><span
class=
"expand_editor"
title=
"Show Editor in Full window. Hint: Use Ctrl+E"
>
</span></li>
<li
id=
"save"
><span
class=
"save_btn"
title=
"Save current file. Hint: Use Ctrl+S"
>
</span></li>
<li
id=
"option"
><span
class=
"fmenu_btn"
title=
'Show more options'
rel=
'tooltip'
>
Menu
</span></li>
</ul>
</ul>
<div
id=
"tabControl"
></div>
<div
id=
"tabControl"
></div>
<div
class=
"clear"
></div>
<div
class=
"clear"
></div>
...
@@ -76,8 +76,8 @@
...
@@ -76,8 +76,8 @@
<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 Full window. Hint: Use Ctrl+E
"
href=
"#"
>
<li><a
id=
'
expand'
title=
"Show or Hide file tree view area.
"
href=
"#"
>
Full window
[Ctrl+E]
</a>
Show or Hide FileTree
</a>
</li>
</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>
...
...
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