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
28541eec
Commit
28541eec
authored
Mar 09, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better select and unselect states and function
parent
533e56e1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
15 deletions
+32
-15
debomatic-webui/public/javascripts/page_distribution.js
debomatic-webui/public/javascripts/page_distribution.js
+32
-15
No files found.
debomatic-webui/public/javascripts/page_distribution.js
View file @
28541eec
...
@@ -41,6 +41,17 @@ var Page_Distrubion = {
...
@@ -41,6 +41,17 @@ var Page_Distrubion = {
new_data
.
distribution
=
data
.
distribution
new_data
.
distribution
=
data
.
distribution
socket
.
emit
(
"
get_distribution_packages
"
,
new_data
)
socket
.
emit
(
"
get_distribution_packages
"
,
new_data
)
}
}
},
select
:
function
(
data
)
{
Page_Distrubion
.
packages
.
unselect
()
if
(
!
data
)
data
=
Utils
.
from_hash_to_data
()
if
(
Utils
.
check_data_package
(
data
))
{
$
(
"
#packages li[id='package-
"
+
data
.
package
.
orig_name
+
"
']
"
).
addClass
(
'
active
'
)
}
},
unselect
:
function
()
{
$
(
'
#packages li
'
).
removeClass
(
'
active
'
)
}
}
},
},
...
@@ -96,9 +107,16 @@ var Page_Distrubion = {
...
@@ -96,9 +107,16 @@ var Page_Distrubion = {
socket
.
emit
(
"
get_package_files_list
"
,
new_data
)
socket
.
emit
(
"
get_package_files_list
"
,
new_data
)
}
}
},
},
select
:
function
(
file
)
{
select
:
function
(
data
)
{
$
(
"
#logs li
"
).
removeClass
(
'
active
'
)
Page_Distrubion
.
files
.
unselect
()
$
(
file
).
addClass
(
'
active
'
)
if
(
!
data
)
data
=
Utils
.
from_hash_to_data
()
if
(
Utils
.
check_data_file
(
data
))
{
$
(
"
#logs li[id='file-
"
+
data
.
file
.
orig_name
+
"
']
"
).
addClass
(
'
active
'
)
}
},
unselect
:
function
()
{
$
(
'
#logs li
'
).
removeClass
(
'
active
'
);
}
}
},
},
...
@@ -154,22 +172,20 @@ var Page_Distrubion = {
...
@@ -154,22 +172,20 @@ var Page_Distrubion = {
},
},
select
:
function
(
data
)
{
select
:
function
(
data
)
{
Page_Distrubion
.
unselect
()
if
(
!
data
)
if
(
!
data
)
data
=
Utils
.
from_hash_to_data
()
data
=
Utils
.
from_hash_to_data
()
if
(
Utils
.
check_data_distribution
(
data
))
{
if
(
Utils
.
check_data_distribution
(
data
))
{
$
(
'
#distributions li
'
).
removeClass
(
'
active
'
)
$
(
"
#distributions li[id='distribution-
"
+
data
.
distribution
.
name
+
"
']
"
).
addClass
(
'
active
'
)
$
(
"
#distributions li[id='distribution-
"
+
data
.
distribution
.
name
+
"
']
"
).
addClass
(
'
active
'
)
if
(
Utils
.
check_data_package
(
data
))
{
$
(
'
#packages li
'
).
removeClass
(
'
active
'
)
$
(
"
#packages li[id='package-
"
+
data
.
package
.
orig_name
+
"
']
"
).
addClass
(
'
active
'
)
if
(
Utils
.
check_data_file
(
data
))
{
$
(
'
#logs li
'
).
removeClass
(
'
active
'
);
$
(
"
#logs li[id='file-
"
+
data
.
file
.
orig_name
+
"
']
"
).
addClass
(
'
active
'
)
}
}
}
}
Page_Distrubion
.
packages
.
select
(
data
)
Page_Distrubion
.
files
.
select
(
data
)
},
unselect
:
function
()
{
$
(
'
#distributions li
'
).
removeClass
(
'
active
'
)
Page_Distrubion
.
files
.
unselect
()
Page_Distrubion
.
packages
.
unselect
()
},
},
clean
:
function
()
{
clean
:
function
()
{
...
@@ -177,7 +193,7 @@ var Page_Distrubion = {
...
@@ -177,7 +193,7 @@ var Page_Distrubion = {
Page_Distrubion
.
packages
.
clean
()
Page_Distrubion
.
packages
.
clean
()
Page_Distrubion
.
files
.
clean
()
Page_Distrubion
.
files
.
clean
()
Page_Distrubion
.
file
.
clean
()
Page_Distrubion
.
file
.
clean
()
Page_Distrubion
.
select
()
Page_Distrubion
.
un
select
()
Page_Distrubion
.
breadcrumb
.
update
()
Page_Distrubion
.
breadcrumb
.
update
()
},
},
...
@@ -203,6 +219,7 @@ var Page_Distrubion = {
...
@@ -203,6 +219,7 @@ var Page_Distrubion = {
data
.
package
.
orig_name
!=
old_data
.
package
.
orig_name
)
data
.
package
.
orig_name
!=
old_data
.
package
.
orig_name
)
{
{
Page_Distrubion
.
file
.
clean
()
Page_Distrubion
.
file
.
clean
()
Page_Distrubion
.
files
.
clean
()
Page_Distrubion
.
files
.
get
(
data
)
Page_Distrubion
.
files
.
get
(
data
)
if
(
Utils
.
check_data_package
(
data
))
{
if
(
Utils
.
check_data_package
(
data
))
{
// I will always get dataestamp from package
// I will always get dataestamp from package
...
...
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