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
449f9e8a
Commit
449f9e8a
authored
Mar 12, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get icon html from Utils
parent
90da97a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
debomatic-webui/public/javascripts/page_generic.js
debomatic-webui/public/javascripts/page_generic.js
+3
-2
debomatic-webui/public/javascripts/utils.js
debomatic-webui/public/javascripts/utils.js
+8
-3
No files found.
debomatic-webui/public/javascripts/page_generic.js
View file @
449f9e8a
...
@@ -12,9 +12,10 @@ function Page_Generic()
...
@@ -12,9 +12,10 @@ function Page_Generic()
button
.
attr
(
'
title
'
,
s
.
status
+
'
:
'
+
s
.
distribution
+
'
>
'
+
s
.
package
)
button
.
attr
(
'
title
'
,
s
.
status
+
'
:
'
+
s
.
distribution
+
'
>
'
+
s
.
package
)
button
.
attr
(
'
href
'
,
config
.
paths
.
distribution
+
'
#
'
+
s
.
distribution
+
'
/
'
+
s
.
package
.
replace
(
'
_
'
,
'
/
'
)
+
'
/datestamp
'
)
button
.
attr
(
'
href
'
,
config
.
paths
.
distribution
+
'
#
'
+
s
.
distribution
+
'
/
'
+
s
.
package
.
replace
(
'
_
'
,
'
/
'
)
+
'
/datestamp
'
)
button
.
html
(
s
.
package
.
split
(
'
_
'
)[
0
])
button
.
html
(
s
.
package
.
split
(
'
_
'
)[
0
])
var
info
=
u
tils
.
get_status_icon_and_class
(
s
)
var
info
=
U
tils
.
get_status_icon_and_class
(
s
)
button
.
addClass
(
'
btn-
'
+
info
.
className
)
button
.
addClass
(
'
btn-
'
+
info
.
className
)
button
.
html
(
button
.
html
()
+
'
<span class="icon glyphicon glyphicon-
'
+
info
.
icon
+
'
"></span>
'
)
// add icon
button
.
html
(
button
.
html
()
+
'
'
+
Utils
.
get_status_icon_html
(
s
))
li
.
html
(
button
)
li
.
html
(
button
)
var
result
=
$
(
'
<div></div>
'
)
var
result
=
$
(
'
<div></div>
'
)
result
.
html
(
li
)
result
.
html
(
li
)
...
...
debomatic-webui/public/javascripts/utils.js
View file @
449f9e8a
...
@@ -51,14 +51,14 @@ var Utils = {
...
@@ -51,14 +51,14 @@ var Utils = {
get_status_icon_and_class
:
function
(
status_data
)
{
get_status_icon_and_class
:
function
(
status_data
)
{
var
_c
=
config
.
status
.
className
var
_c
=
config
.
status
.
className
var
_i
=
config
.
status
.
icons
var
_i
=
config
.
status
.
icons
var
_s
=
status_data
var
className
=
null
var
className
=
null
var
icon
=
null
var
icon
=
null
var
s
=
status_package
if
(
_s
.
status
==
config
.
status
.
package
.
building
)
{
if
(
s
.
status
==
config
.
status
.
package
.
building
)
{
className
=
_c
.
building
className
=
_c
.
building
icon
=
_i
.
building
icon
=
_i
.
building
}
}
else
if
(
s
.
status
==
config
.
status
.
package
.
failed
)
{
else
if
(
_
s
.
status
==
config
.
status
.
package
.
failed
)
{
className
=
_c
.
failed
className
=
_c
.
failed
icon
=
_i
.
failed
icon
=
_i
.
failed
}
}
...
@@ -71,4 +71,9 @@ var Utils = {
...
@@ -71,4 +71,9 @@ var Utils = {
icon
:
icon
icon
:
icon
}
}
},
},
get_status_icon_html
:
function
(
status_data
)
{
info
=
Utils
.
get_status_icon_and_class
(
status_data
)
return
'
<span class="icon glyphicon glyphicon-
'
+
info
.
icon
+
'
"></span>
'
}
}
}
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