Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
debomatic-webui
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
debomatic-webui-admins
debomatic-webui
Commits
33443e6d
Commit
33443e6d
authored
Jun 09, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle view file preview on client side
parent
eb375756
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
debomatic-webui/public/javascripts/page_distribution.js
debomatic-webui/public/javascripts/page_distribution.js
+17
-4
debomatic-webui/public/stylesheets/style.css
debomatic-webui/public/stylesheets/style.css
+6
-1
No files found.
debomatic-webui/public/javascripts/page_distribution.js
View file @
33443e6d
...
@@ -94,10 +94,17 @@ function Page_Distrubion(socket) {
...
@@ -94,10 +94,17 @@ function Page_Distrubion(socket) {
if
(
Utils
.
check_view_file
(
view
))
{
if
(
Utils
.
check_view_file
(
view
))
{
var
complete_name
=
view
.
package
.
orig_name
+
'
.
'
+
view
.
file
.
name
;
var
complete_name
=
view
.
package
.
orig_name
+
'
.
'
+
view
.
file
.
name
;
window_title
=
complete_name
;
window_title
=
complete_name
;
if
(
!
view
.
file
.
path
);
label
=
complete_name
;
view
.
file
.
path
=
config
.
paths
.
debomatic
+
'
/
'
+
view
.
distribution
.
name
+
'
/pool/
'
+
view
.
package
.
orig_name
+
'
/
'
+
complete_name
;
if
(
!
view
.
file
.
path
)
label
=
complete_name
+
'
<a class="btn btn-link btn-lg" title="Download" href="
'
+
view
.
file
.
path
+
'
">
'
+
view
.
file
.
path
=
config
.
paths
.
debomatic
+
'
/
'
+
view
.
distribution
.
name
+
'
/pool/
'
+
view
.
package
.
orig_name
+
'
/
'
+
complete_name
;
label
+=
'
<a class="btn btn-link btn-lg" title="Download" href="
'
+
view
.
file
.
path
+
'
">
'
+
'
<span class="glyphicon glyphicon-download-alt"></span></a>
'
;
'
<span class="glyphicon glyphicon-download-alt"></span></a>
'
;
if
(
config
.
file
.
preview
.
indexOf
(
view
.
file
.
name
)
>=
0
)
{
var
view_all
=
$
(
'
<a id="get-whole-file" class="btn btn-link btn-lg" title="View the whole file"></a>
'
);
view_all
.
html
(
'
<span class="glyphicon glyphicon-eye-open"></span>
'
);
label
+=
view_all
.
get
(
0
).
outerHTML
;
}
}
else
if
(
Utils
.
check_view_package
(
view
))
}
else
if
(
Utils
.
check_view_package
(
view
))
label
=
view
.
package
.
orig_name
;
label
=
view
.
package
.
orig_name
;
else
if
(
Utils
.
check_view_distribution
(
view
))
else
if
(
Utils
.
check_view_distribution
(
view
))
...
@@ -106,6 +113,11 @@ function Page_Distrubion(socket) {
...
@@ -106,6 +113,11 @@ function Page_Distrubion(socket) {
if
(
window_title
)
if
(
window_title
)
label
=
window_title
;
label
=
window_title
;
page_generic
.
set_window_title
(
label
);
page_generic
.
set_window_title
(
label
);
// set onclick get-whole-file
$
(
"
#get-whole-file
"
).
on
(
'
click
'
,
function
()
{
file
.
get
(
true
);
});
},
},
clean
:
function
()
{
clean
:
function
()
{
$
(
'
#title
'
).
html
(
''
);
$
(
'
#title
'
).
html
(
''
);
...
@@ -286,13 +298,14 @@ function Page_Distrubion(socket) {
...
@@ -286,13 +298,14 @@ function Page_Distrubion(socket) {
}
}
}
}
},
},
get
:
function
()
{
get
:
function
(
force
)
{
if
(
Utils
.
check_view_file
(
view
))
{
if
(
Utils
.
check_view_file
(
view
))
{
var
query_data
=
{};
var
query_data
=
{};
query_data
.
distribution
=
view
.
distribution
;
query_data
.
distribution
=
view
.
distribution
;
query_data
.
package
=
view
.
package
;
query_data
.
package
=
view
.
package
;
query_data
.
file
=
view
.
file
;
query_data
.
file
=
view
.
file
;
query_data
.
file
.
content
=
null
;
query_data
.
file
.
content
=
null
;
query_data
.
file
.
force
=
force
;
// get a feedback to user while downloading file
// get a feedback to user while downloading file
$
(
'
#file pre
'
).
html
(
'
Downloading file, please wait a while ...
'
);
$
(
'
#file pre
'
).
html
(
'
Downloading file, please wait a while ...
'
);
$
(
'
#file
'
).
show
();
$
(
'
#file
'
).
show
();
...
...
debomatic-webui/public/stylesheets/style.css
View file @
33443e6d
...
@@ -45,7 +45,7 @@ aside .nav-pills li {
...
@@ -45,7 +45,7 @@ aside .nav-pills li {
}
}
#sidebar
{
#sidebar
{
position
:
relative
;
position
:
relative
;
}
}
#sidebar
.fixed
{
#sidebar
.fixed
{
...
@@ -151,3 +151,8 @@ footer {
...
@@ -151,3 +151,8 @@ footer {
border
:
none
;
border
:
none
;
color
:
#101010
;
color
:
#101010
;
}
}
#title
a
.btn
{
padding-right
:
0
;
float
:
right
;
}
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