Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
4a7515c4
authored
Nov 14, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network: related field if changed by magic
parent
435f4556
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
circle/network/static/js/network.js
+18
-2
No files found.
circle/network/static/js/network.js
View file @
4a7515c4
...
@@ -28,6 +28,17 @@ function getURLParameter(name) {
...
@@ -28,6 +28,17 @@ function getURLParameter(name) {
);
);
}
}
function
doBlink
(
id
,
count
)
{
if
(
count
>
0
)
{
$
(
id
).
parent
().
delay
(
200
).
queue
(
function
()
{
$
(
this
).
delay
(
200
).
queue
(
function
()
{
$
(
this
).
removeClass
(
"has-warning"
).
dequeue
();
doBlink
(
id
,
count
-
1
);});
$
(
this
).
addClass
(
"has-warning"
).
dequeue
()
});
}
}
$
(
function
()
{
$
(
function
()
{
$
(
"[title]"
).
tooltip
();
$
(
"[title]"
).
tooltip
();
...
@@ -44,9 +55,10 @@ $("#ipv4-magic").click(function() {
...
@@ -44,9 +55,10 @@ $("#ipv4-magic").click(function() {
data
:
{
vlan
:
$
(
"[name=vlan]"
).
val
()},
data
:
{
vlan
:
$
(
"[name=vlan]"
).
val
()},
success
:
function
(
data
)
{
success
:
function
(
data
)
{
$
(
"[name=ipv4]"
).
val
(
data
[
"ipv4"
]);
$
(
"[name=ipv4]"
).
val
(
data
[
"ipv4"
]);
if
(
!
$
(
"[name=ipv6]"
).
val
()
)
{
if
(
$
(
"[name=ipv6]"
).
val
()
!=
data
[
"ipv6"
]
)
{
$
(
"[name=ipv6]"
).
val
(
data
[
"ipv6"
]
);
doBlink
(
"[name=ipv6]"
,
3
);
}
}
$
(
"[name=ipv6]"
).
val
(
data
[
"ipv6"
]);
}});
}});
});
});
$
(
"#ipv6-tpl-magic"
).
click
(
function
()
{
$
(
"#ipv6-tpl-magic"
).
click
(
function
()
{
...
@@ -55,6 +67,10 @@ $("#ipv6-tpl-magic").click(function() {
...
@@ -55,6 +67,10 @@ $("#ipv6-tpl-magic").click(function() {
network6
:
$
(
"[name=network6]"
).
val
()},
network6
:
$
(
"[name=network6]"
).
val
()},
success
:
function
(
data
)
{
success
:
function
(
data
)
{
$
(
"[name=ipv6_template]"
).
val
(
data
[
"ipv6_template"
]);
$
(
"[name=ipv6_template]"
).
val
(
data
[
"ipv6_template"
]);
if
(
$
(
"[name=host_ipv6_prefixlen]"
).
val
()
!=
data
[
"host_ipv6_prefixlen"
])
{
doBlink
(
"[name=host_ipv6_prefixlen]"
,
3
);
}
$
(
"[name=host_ipv6_prefixlen]"
).
val
(
data
[
"host_ipv6_prefixlen"
]);
}});
}});
});
});
});
});
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