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
e5ca8624
authored
Apr 18, 2013
by
Őry Máté
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into releases
parents
31b2839f
b9372b31
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
44 deletions
+48
-44
one/static/script/cloud.js
+17
-17
one/templates/box/file/box.html
+23
-21
school/templates/box/person/box.html
+1
-1
school/templates/show-group.html
+7
-5
No files found.
one/static/script/cloud.js
View file @
e5ca8624
...
@@ -21,9 +21,9 @@ $(function() {
...
@@ -21,9 +21,9 @@ $(function() {
$
(
'a[href=#]'
).
click
(
function
(
e
)
{
$
(
'a[href=#]'
).
click
(
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
});
});
$
(
'.host-toggle'
).
click
(
function
(
e
){
$
(
'.host-toggle'
).
click
(
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
if
(
$
(
this
).
find
(
'.v4'
).
is
(
':hidden'
))
{
if
(
$
(
this
).
find
(
'.v4'
).
is
(
':hidden'
))
{
$
(
this
).
find
(
'.v4'
).
show
();
$
(
this
).
find
(
'.v4'
).
show
();
$
(
this
).
find
(
'.v6'
).
hide
();
$
(
this
).
find
(
'.v6'
).
hide
();
$
(
this
).
parent
().
next
().
find
(
'.host'
).
show
();
$
(
this
).
parent
().
next
().
find
(
'.host'
).
show
();
...
@@ -88,20 +88,20 @@ $(function() {
...
@@ -88,20 +88,20 @@ $(function() {
var
handler
=
arguments
.
callee
;
var
handler
=
arguments
.
callee
;
var
oldName
=
$
(
this
).
data
(
'name'
);
var
oldName
=
$
(
this
).
data
(
'name'
);
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'
);
$
(
'#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
).
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
+
'" />\
<input type="submit" value="'
+
gettext
(
'Rename'
)
+
'" data-url="'
+
url
+
'"/>'
);
<input type="submit" value="'
+
gettext
(
'Rename'
)
+
'" data-url="'
+
url
+
'"/>'
);
$
(
'#vm-'
+
id
+
'-name'
).
find
(
'input[type="text"]'
).
click
(
function
(
f
)
{
$
(
'#vm-'
+
id
+
'-name'
).
find
(
'input[type="text"]'
).
click
(
function
(
f
)
{
f
.
preventDefault
();
f
.
preventDefault
();
f
.
stopPropagation
();
f
.
stopPropagation
();
...
@@ -120,7 +120,7 @@ $(function() {
...
@@ -120,7 +120,7 @@ $(function() {
$
(
'#vm-'
+
id
+
'-name'
).
text
(
data
.
name
);
$
(
'#vm-'
+
id
+
'-name'
).
text
(
data
.
name
);
$
(
self
).
click
(
handler
);
$
(
self
).
click
(
handler
);
$
(
self
).
data
(
'name'
,
newName
);
$
(
self
).
data
(
'name'
,
newName
);
$
(
'#vm-'
+
id
).
removeClass
(
'editing'
);
$
(
'#vm-'
+
id
).
removeClass
(
'editing'
);
}
}
});
});
})
})
...
@@ -171,14 +171,14 @@ $(function() {
...
@@ -171,14 +171,14 @@ $(function() {
})
})
$
(
'#modal'
).
show
();
$
(
'#modal'
).
show
();
});
});
$
(
'.edit-template'
).
click
(
function
(
e
){
$
(
'.edit-template'
).
click
(
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopPropagation
();
e
.
stopPropagation
();
var
id
=
$
(
this
).
data
(
'id'
);
var
id
=
$
(
this
).
data
(
'id'
);
$
.
ajax
({
$
.
ajax
({
type
:
'GET'
,
type
:
'GET'
,
url
:
$
(
this
).
data
(
'url'
),
url
:
$
(
this
).
data
(
'url'
),
success
:
function
(
data
){
success
:
function
(
data
)
{
$
(
'#modal'
).
show
();
$
(
'#modal'
).
show
();
$
(
'#modal-container'
).
html
(
data
);
$
(
'#modal-container'
).
html
(
data
);
}
}
...
@@ -285,9 +285,9 @@ $(function() {
...
@@ -285,9 +285,9 @@ $(function() {
function
get_vm_details
(
id
)
{
function
get_vm_details
(
id
)
{
$
.
get
(
'/vm/credentials/'
+
id
,
function
(
data
)
{
$
.
get
(
'/vm/credentials/'
+
id
,
function
(
data
)
{
$
(
'#modal-container'
).
html
(
data
);
$
(
'#modal-container'
).
html
(
data
);
$
(
'#modal-container .host-toggle'
).
click
(
function
(
e
){
$
(
'#modal-container .host-toggle'
).
click
(
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
if
(
$
(
this
).
find
(
'.v4'
).
is
(
':hidden'
))
{
if
(
$
(
this
).
find
(
'.v4'
).
is
(
':hidden'
))
{
$
(
this
).
find
(
'.v4'
).
show
();
$
(
this
).
find
(
'.v4'
).
show
();
$
(
this
).
find
(
'.v6'
).
hide
();
$
(
this
).
find
(
'.v6'
).
hide
();
$
(
this
).
parent
().
next
().
find
(
'.host'
).
show
();
$
(
this
).
parent
().
next
().
find
(
'.host'
).
show
();
...
@@ -327,7 +327,7 @@ $(function() {
...
@@ -327,7 +327,7 @@ $(function() {
});
});
}
}
cloud
.
confirm
=
vm_confirm_popup
;
cloud
.
confirm
=
vm_confirm_popup
;
/**
/**
* Manage VM State (STOP)
* Manage VM State (STOP)
*/
*/
...
@@ -372,8 +372,8 @@ $(function() {
...
@@ -372,8 +372,8 @@ $(function() {
function
renew_suspend_vm
(
id
)
{
function
renew_suspend_vm
(
id
)
{
manage_vm
(
id
,
"renew/suspend"
,
function
(
data
)
{
manage_vm
(
id
,
"renew/suspend"
,
function
(
data
)
{
//workaround for some strange jquery parse error :o
//workaround for some strange jquery parse error :o
var
foo
=
$
(
'<div />'
).
append
(
data
);
var
foo
=
$
(
'<div />'
).
append
(
data
);
$
(
'#vm-'
+
id
+
' .details-container'
).
replaceWith
(
foo
.
find
(
'.details-container'
));
$
(
'#vm-'
+
id
+
' .details-container'
).
replaceWith
(
foo
.
find
(
'.details-container'
));
});
});
}
}
/**
/**
...
@@ -392,7 +392,7 @@ $(function() {
...
@@ -392,7 +392,7 @@ $(function() {
type
:
'POST'
,
type
:
'POST'
,
url
:
'/vm/'
+
state
+
'/'
+
id
+
'/'
,
url
:
'/vm/'
+
state
+
'/'
+
id
+
'/'
,
success
:
function
(
data
,
b
,
c
)
{
success
:
function
(
data
,
b
,
c
)
{
if
(
f
)
{
if
(
f
)
{
f
(
data
);
f
(
data
);
}
else
if
(
state
==
"resume"
)
{
}
else
if
(
state
==
"resume"
)
{
window
.
location
.
href
=
'/vm/show/'
+
id
+
"/"
;
window
.
location
.
href
=
'/vm/show/'
+
id
+
"/"
;
...
...
one/templates/box/file/box.html
View file @
e5ca8624
...
@@ -105,7 +105,7 @@
...
@@ -105,7 +105,7 @@
<div
class=
"clear"
></div>
<div
class=
"clear"
></div>
</div>
</div>
<div
class=
"details"
>
<div
class=
"details"
>
<div
class=
"container"
>
<div
class=
"
details-
container"
>
<form
style=
"padding-bottom: 10px"
action=
"{% url one.views.key_add %}"
method=
"POST"
>
<form
style=
"padding-bottom: 10px"
action=
"{% url one.views.key_add %}"
method=
"POST"
>
{% csrf_token %}
{% csrf_token %}
<textarea
style=
"margin-bottom: 5px"
name=
"key"
placeholder=
"{% trans "
Public
key
in
OpenSSH
format
"
%}"
></textarea><br
/>
<textarea
style=
"margin-bottom: 5px"
name=
"key"
placeholder=
"{% trans "
Public
key
in
OpenSSH
format
"
%}"
></textarea><br
/>
...
@@ -129,26 +129,28 @@
...
@@ -129,26 +129,28 @@
<div
class=
"clear"
></div>
<div
class=
"clear"
></div>
</div>
</div>
<div
class=
"details"
>
<div
class=
"details"
>
<div
class=
"container"
>
<div
class=
"details-container"
>
<div
id=
"upload-zone"
class=
"upload-zone"
>
<div
class=
"container"
>
<p>
{% trans "Drag and drop files here to start uploading." %}
</p>
<div
id=
"upload-zone"
class=
"upload-zone"
>
<p>
<p>
{% trans "Drag and drop files here to start uploading." %}
</p>
{% trans 'You can also use the
<a
href=
"#"
id=
"old-upload"
>
the traditional upload form
</a>
.' %}
<p>
</p>
{% trans 'You can also use the
<a
href=
"#"
id=
"old-upload"
>
the traditional upload form
</a>
.' %}
<p>
{% trans 'Upload limit is 1GB per file!' %}
</p>
</p>
</div>
<p>
{% trans 'Upload limit is 1GB per file!' %}
</p>
<div
style=
"display: none"
id=
"upload-progress-text"
class=
"upload-zone"
></div>
</div>
<div
style=
"display: none"
id=
"upload-error"
class=
"upload-zone"
>
<div
style=
"display: none"
id=
"upload-progress-text"
class=
"upload-zone"
></div>
<p
id=
"upload-error-size"
style=
"display: none"
>
{% trans "Error: File is bigger than 1GB!" %}
</p>
<div
style=
"display: none"
id=
"upload-error"
class=
"upload-zone"
>
<p
id=
"upload-error-server"
style=
"display: none"
>
{% trans "Error: Upload server is not available!" %}
</p>
<p
id=
"upload-error-size"
style=
"display: none"
>
{% trans "Error: File is bigger than 1GB!" %}
</p>
<p
id=
"upload-error-overwrite"
style=
"display: none"
>
{% trans "Error: File already exists!" %}
</p>
<p
id=
"upload-error-server"
style=
"display: none"
>
{% trans "Error: Upload server is not available!" %}
</p>
<p
id=
"upload-error-unknown"
style=
"display: none"
></p>
<p
id=
"upload-error-overwrite"
style=
"display: none"
>
{% trans "Error: File already exists!" %}
</p>
</div>
<p
id=
"upload-error-unknown"
style=
"display: none"
></p>
<div
style=
"display: none"
class=
"upload-zone"
id=
"old-upload-form"
>
</div>
<form
action=
"{% url one.views.home %}"
method=
"POST"
data-bind=
"attr: {action: uploadURL}"
enctype=
"multipart/form-data"
>
<div
style=
"display: none"
class=
"upload-zone"
id=
"old-upload-form"
>
<input
type=
"file"
name=
"data"
/>
<form
action=
"{% url one.views.home %}"
method=
"POST"
data-bind=
"attr: {action: uploadURL}"
enctype=
"multipart/form-data"
>
<input
type=
"submit"
value=
"Feltöltés"
/>
<input
type=
"file"
name=
"data"
/>
</form>
<input
type=
"submit"
value=
"Feltöltés"
/>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
school/templates/box/person/box.html
View file @
e5ca8624
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
{% include "box/person/entry.html" %}
{% include "box/person/entry.html" %}
{% endfor %}
{% endfor %}
<li
class=
"entry small-row"
>
<li
class=
"entry small-row"
>
<div
class=
"summary"
id=
"new-member"
>
<div
class=
"summary"
id=
"new-member"
data-fallback=
"slide"
>
<div
class=
"name"
>
{% trans "Add user" %}
</div>
<div
class=
"name"
>
{% trans "Add user" %}
</div>
<div
id=
"new-member-form"
>
<div
id=
"new-member-form"
>
<input
type=
"text"
placeholder=
"{% trans "
User
NEPTUN
code
"
%}"
/>
<input
type=
"text"
placeholder=
"{% trans "
User
NEPTUN
code
"
%}"
/>
...
...
school/templates/show-group.html
View file @
e5ca8624
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<div
class=
"clear"
></div>
<div
class=
"clear"
></div>
</div>
</div>
<div
class=
"details"
>
<div
class=
"details"
>
<div
class=
"container"
>
<div
class=
"
details-
container"
>
{% if not owner.user %}
{% if not owner.user %}
{% trans "This user never logged in, no data available" %}
{% trans "This user never logged in, no data available" %}
{% else %}
{% else %}
...
@@ -53,14 +53,16 @@
...
@@ -53,14 +53,16 @@
</li>
</li>
{% endfor %}
{% endfor %}
<li
class=
"entry small-row"
>
<li
class=
"entry small-row"
>
<div
class=
"summary"
id=
"new-owner"
data-gid=
"{{group.id}}"
>
<div
class=
"summary"
id=
"new-owner"
data-gid=
"{{group.id}}"
data-fallback=
"slide"
>
<div
class=
"name"
>
{% trans "Add owner" %}
</div>
<div
class=
"name"
>
{% trans "Add owner" %}
</div>
<div
class=
"clear"
></div>
<div
class=
"clear"
></div>
</div>
</div>
<div
class=
"details"
id=
"new-owner-form"
>
<div
class=
"details"
id=
"new-owner-form"
>
<div
class=
"container"
>
<div
class=
"details-container"
>
<input
type=
"text"
placeholder=
"{% trans "
Owner
name
/
NEPTUN
"
%}"
data-url=
"{% url school.views.group_ajax_owner_autocomplete %}"
/>
<div
class=
"container"
>
<div
id=
"new-owner-autocomplete"
></div>
<input
type=
"text"
placeholder=
"{% trans "
Owner
name
/
NEPTUN
"
%}"
data-url=
"{% url school.views.group_ajax_owner_autocomplete %}"
/>
<div
id=
"new-owner-autocomplete"
></div>
</div>
</div>
</div>
</div>
</div>
</li>
</li>
...
...
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