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
9f98460f
authored
Apr 04, 2013
by
Bence Dányi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webui: fix vm-renaming issue
fixes
#120
parent
12a342c9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
one/static/script/cloud.js
+4
-0
one/static/style/box.less
+20
-0
No files found.
one/static/script/cloud.js
View file @
9f98460f
...
@@ -81,12 +81,14 @@ $(function() {
...
@@ -81,12 +81,14 @@ $(function() {
var
content
=
$
(
'#vm-'
+
id
+
'-name'
).
html
();
var
content
=
$
(
'#vm-'
+
id
+
'-name'
).
html
();
var
self
=
this
;
var
self
=
this
;
var
url
=
$
(
this
).
data
(
'url'
);
var
url
=
$
(
this
).
data
(
'url'
);
$
(
'#vm-'
+
id
).
addClass
(
'editing'
);
$
(
this
).
unbind
(
'click'
).
click
(
function
(
e
){
$
(
this
).
unbind
(
'click'
).
click
(
function
(
e
){
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopPropagation
();
e
.
stopPropagation
();
$
(
this
).
unbind
(
'click'
).
click
(
handler
);
$
(
this
).
unbind
(
'click'
).
click
(
handler
);
$
(
'#vm-'
+
id
+
'-name-details'
).
show
();
$
(
'#vm-'
+
id
+
'-name-details'
).
show
();
$
(
'#vm-'
+
id
+
'-name'
).
html
(
content
);
$
(
'#vm-'
+
id
+
'-name'
).
html
(
content
);
$
(
'#vm-'
+
id
).
removeClass
(
'editing'
);
})
})
$
(
'#vm-'
+
id
+
'-name-details'
).
hide
();
$
(
'#vm-'
+
id
+
'-name-details'
).
hide
();
$
(
'#vm-'
+
id
+
'-name'
).
html
(
'<input type="text" value="'
+
oldName
+
'" />\
$
(
'#vm-'
+
id
+
'-name'
).
html
(
'<input type="text" value="'
+
oldName
+
'" />\
...
@@ -108,6 +110,8 @@ $(function() {
...
@@ -108,6 +110,8 @@ $(function() {
$
(
'#vm-'
+
id
+
'-name-details'
).
removeAttr
(
'style'
);
$
(
'#vm-'
+
id
+
'-name-details'
).
removeAttr
(
'style'
);
$
(
'#vm-'
+
id
+
'-name'
).
text
(
data
.
name
);
$
(
'#vm-'
+
id
+
'-name'
).
text
(
data
.
name
);
$
(
self
).
click
(
handler
);
$
(
self
).
click
(
handler
);
$
(
self
).
data
(
'name'
,
newName
);
$
(
'#vm-'
+
id
).
removeClass
(
'editing'
);
}
}
});
});
})
})
...
...
one/static/style/box.less
View file @
9f98460f
...
@@ -67,7 +67,27 @@
...
@@ -67,7 +67,27 @@
list-style-type: none;
list-style-type: none;
}
}
.entry {
.entry {
&.editing {
.summary {
&:hover .name > span {
width: 100%;
max-width: 100%;
}
.name > span {
width: 100%;
max-width: 100%;
}
}
}
&.opened {
&.opened {
&.editing {
.summary {
.name > span {
width: 100%;
max-width: 100%;
}
}
}
.actions {
.actions {
display: block !important;
display: block !important;
}
}
...
...
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