Commit d30fc623 by x

Merge branch 'master' of ssh://giccero.cloud.ik.bme.hu/cloud into production

parents f8dfa252 9220cd73
...@@ -185,8 +185,10 @@ $(function() { ...@@ -185,8 +185,10 @@ $(function() {
$('.hidden-password').click(function() { $('.hidden-password').click(function() {
if($(this).attr('type') == 'password'){ if($(this).attr('type') == 'password'){
$(this).attr('type', 'text'); $(this).attr('type', 'text');
$(this).addClass('shown');
} else { } else {
$(this).attr('type', 'password'); $(this).attr('type', 'password');
$(this).removeClass('shown');
} }
}); });
$('.selected-summary').next().show(); $('.selected-summary').next().show();
...@@ -197,15 +199,12 @@ $(function() { ...@@ -197,15 +199,12 @@ $(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);
$('.hidden-password').each(function() { $('#modal-container .hidden-password').click(function() {
$(this).val('******'); if($(this).attr('type') == 'password'){
}); $(this).attr('type', 'text');
$('.hidden-password').click(function() {
if(!$(this).hasClass('shown')) {
$(this).val($(this).data('value'));
$(this).addClass('shown'); $(this).addClass('shown');
} else { } else {
$(this).val('******'); $(this).attr('type', 'password');
$(this).removeClass('shown'); $(this).removeClass('shown');
} }
}) })
......
...@@ -460,10 +460,10 @@ ...@@ -460,10 +460,10 @@
background-image: url(/static/icons/computer-off.png); background-image: url(/static/icons/computer-off.png);
} }
#template .wm .summary .name{ #template .entry .summary .name{
background-image: url(/static/icons/document-template.png) background-image: url(/static/icons/document-template.png)
} }
#template .wm .public-template .name{ #template .entry .public-template .name{
background-image: url(/static/icons/blue-document-share.png) background-image: url(/static/icons/blue-document-share.png)
} }
#new-template-button .name{ #new-template-button .name{
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<ul class="vm-list entry-list"> <ul class="vm-list entry-list" id="template">
{% for t in mytemplates %} {% for t in mytemplates %}
{% include "box/template/entry.html" %} {% include "box/template/entry.html" %}
{% endfor %} {% endfor %}
......
...@@ -40,9 +40,9 @@ ...@@ -40,9 +40,9 @@
<a href="#" class="try-template" data-id="{{t.id}}" title="{% trans "Try" %}"> <a href="#" class="try-template" data-id="{{t.id}}" title="{% trans "Try" %}">
<img src="/static/icons/control.png" alt="{% trans "Start" %}"/> <img src="/static/icons/control.png" alt="{% trans "Start" %}"/>
</a> </a>
<a href="#" title="{% trans "Edit" %}"> <!--<a href="#" title="{% trans "Edit" %}">
<img src="/static/icons/pencil.png" alt="{% trans "Edit" %}" /> <img src="/static/icons/pencil.png" alt="{% trans "Edit" %}" />
</a> </a>-->
<a href="#" class="template-share" data-id="{{t.id}}" data-gid="{{group.id}}" title="{% trans "Share" %}"> <a href="#" class="template-share" data-id="{{t.id}}" data-gid="{{group.id}}" title="{% trans "Share" %}">
<img src="/static/icons/user-share.png" alt="{% trans "Share" %}" /> <img src="/static/icons/user-share.png" alt="{% trans "Share" %}" />
</a> </a>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<a href="#" class="delete-template" data-id="{{ t.id }}" data-name="{{ t.name }}" title="{% trans "Remove" %}"> <a href="#" class="delete-template" data-id="{{ t.id }}" data-name="{{ t.name }}" title="{% trans "Remove" %}">
<img src="/static/icons/minus-circle.png" alt="{% trans "Remove" %}" /> <img src="/static/icons/minus-circle.png" alt="{% trans "Remove" %}" />
</a> </a>
<a href="#" class="edit-template" data-id="{{ t.id }}" title="{% trans "Edit" %}"> <!--<a href="#" class="edit-template" data-id="{{ t.id }}" title="{% trans "Edit" %}">
<img src="/static/icons/pencil.png" alt="{% trans "Edit" %}" /> <img src="/static/icons/pencil.png" alt="{% trans "Edit" %}" />
</a> </a>-->
{% endblock actions %} {% endblock actions %}
...@@ -242,13 +242,13 @@ def group_ajax_owner_autocomplete(request): ...@@ -242,13 +242,13 @@ def group_ajax_owner_autocomplete(request):
results = map(lambda u: { results = map(lambda u: {
'name': u.get_full_name(), 'name': u.get_full_name(),
'neptun': u.username }, User.objects.filter(last_name__startswith=request.POST['q'])[:5]) 'neptun': u.username }, User.objects.filter(last_name__istartswith=request.POST['q'])[:5])
results += map(lambda u: { results += map(lambda u: {
'name': u.get_full_name(), 'name': u.get_full_name(),
'neptun': u.username }, User.objects.filter(first_name__startswith=request.POST['q'])[:5]) 'neptun': u.username }, User.objects.filter(first_name__istartswith=request.POST['q'])[:5])
results += map(lambda u: { results += map(lambda u: {
'name': u.get_full_name(), 'name': u.get_full_name(),
'neptun': u.username }, User.objects.filter(username__startswith=request.POST['q'])[:5]) 'neptun': u.username }, User.objects.filter(username__istartswith=request.POST['q'])[:5])
return HttpResponse(json.dumps(results, ensure_ascii=False)) return HttpResponse(json.dumps(results, ensure_ascii=False))
@login_required @login_required
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment