Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
76c164a5
authored
May 07, 2013
by
Bence Dányi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webui: better password selection
parent
4a235168
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
22 deletions
+18
-22
one/static/script/cloud.js
+0
-19
one/static/style/base.less
+2
-2
one/templates/vm-credentials.html
+16
-1
No files found.
one/static/script/cloud.js
View file @
76c164a5
...
@@ -241,16 +241,6 @@ $(function() {
...
@@ -241,16 +241,6 @@ $(function() {
$
(
'#new-group-semester'
).
change
(
updateSummary
);
$
(
'#new-group-semester'
).
change
(
updateSummary
);
$
(
'#new-group-members'
).
change
(
updateSummary
);
$
(
'#new-group-members'
).
change
(
updateSummary
);
});
});
$
(
'.hidden-password'
).
click
(
function
()
{
if
(
$
(
this
).
attr
(
'type'
)
==
'password'
)
{
$
(
this
).
attr
(
'type'
,
'text'
);
$
(
this
).
addClass
(
'shown'
);
this
.
select
();
}
else
if
(
this
.
selectionStart
-
this
.
selectionEnd
==
0
)
{
$
(
this
).
attr
(
'type'
,
'password'
);
$
(
this
).
removeClass
(
'shown'
);
}
});
$
(
'.shares li'
).
click
(
function
(
e
)
{
$
(
'.shares li'
).
click
(
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopPropagation
();
e
.
stopPropagation
();
...
@@ -302,15 +292,6 @@ $(function() {
...
@@ -302,15 +292,6 @@ $(function() {
$
(
this
).
parent
().
next
().
find
(
'.ipv4host'
).
show
();
$
(
this
).
parent
().
next
().
find
(
'.ipv4host'
).
show
();
}
}
});
});
$
(
'#modal-container .hidden-password'
).
click
(
function
()
{
if
(
$
(
this
).
attr
(
'type'
)
==
'password'
)
{
$
(
this
).
attr
(
'type'
,
'text'
);
$
(
this
).
addClass
(
'shown'
);
}
else
{
$
(
this
).
attr
(
'type'
,
'password'
);
$
(
this
).
removeClass
(
'shown'
);
}
})
})
})
$
(
'#modal'
).
show
();
$
(
'#modal'
).
show
();
};
};
...
...
one/static/style/base.less
View file @
76c164a5
...
@@ -245,12 +245,12 @@ textarea {
...
@@ -245,12 +245,12 @@ textarea {
.hidden-password {
.hidden-password {
padding-right: 25px;
padding-right: 25px;
background-image: url(/static/icons/eye
-half
.png);
background-image: url(/static/icons/eye.png);
background-repeat: no-repeat;
background-repeat: no-repeat;
background-position: right center;
background-position: right center;
cursor: pointer;
cursor: pointer;
&.shown {
&.shown {
background-image: url(/static/icons/eye.png);
background-image: url(/static/icons/eye
-half
.png);
}
}
}
}
...
...
one/templates/vm-credentials.html
View file @
76c164a5
...
@@ -50,7 +50,22 @@
...
@@ -50,7 +50,22 @@
</tr>
</tr>
<tr>
<tr>
<th>
{% trans "Password" %}:
</th>
<th>
{% trans "Password" %}:
</th>
<td><input
type=
"password"
class=
"hidden-password"
value=
"{{ i.pw }}"
/></td>
<td><input
id=
"vm-password"
type=
"password"
class=
"hidden-password"
value=
"{{ i.pw }}"
/></td>
</tr>
</tr>
</table>
</table>
<script
type=
"text/javascript"
>
$
(
'#vm-password'
).
click
(
function
(
e
)
{
if
(
e
.
offsetX
>
130
)
{
if
(
$
(
this
).
attr
(
'type'
)
==
'password'
)
{
$
(
this
).
attr
(
'type'
,
'text'
);
$
(
this
).
addClass
(
'shown'
);
this
.
select
();
}
else
{
$
(
this
).
attr
(
'type'
,
'password'
);
$
(
this
).
removeClass
(
'shown'
);
this
.
selectionStart
=
this
.
selectionEnd
=
0
;
}
}
});
</script>
</div>
</div>
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