Commit 8d2093a5 by Danyi Bence

new-template workflow updated

parent 1f024549
...@@ -77,6 +77,33 @@ a:link,a:visited{ ...@@ -77,6 +77,33 @@ a:link,a:visited{
#new-template-button .name{ #new-template-button .name{
background-image: url(icons/document--plus.png) !important background-image: url(icons/document--plus.png) !important
} }
#modal-container ul{
list-style: none;
}
#modal-container .wizard li{
border-bottom: 1px dotted #999;
}
#modal-container .wizard label{
float: left;
padding: 5px;
margin: 10px 5px;
}
.wizard .progress .bar{
background-color: green;
height: 15px;
position: absolute;
z-index: -1;
}
.wizard .progress{
text-align: center;
}
#modal-container .wizard input, #modal-container .wizard select{
display: block;
float: right;
padding: 5px;
margin: 10px 5px;
width: 200px;
}
.wm .summary{ .wm .summary{
padding: 15px 5px; padding: 15px 5px;
border-top: 1px solid #888; border-top: 1px solid #888;
......
...@@ -22,7 +22,6 @@ $(function(){ ...@@ -22,7 +22,6 @@ $(function(){
.css('padding','0px 5px') .css('padding','0px 5px')
.animate({height:this.originalHeight,paddingTop:15,paddingBottom:15},700); .animate({height:this.originalHeight,paddingTop:15,paddingBottom:15},700);
$(this).parent('.wm').addClass('opened'); $(this).parent('.wm').addClass('opened');
} else { } else {
var that=this; var that=this;
$(this).next('.details') $(this).next('.details')
...@@ -52,6 +51,10 @@ $(function(){ ...@@ -52,6 +51,10 @@ $(function(){
}) })
$('#modal-container .wm .summary').click(toggleDetails); $('#modal-container .wm .summary').click(toggleDetails);
}); });
$('#new-template-button').click(function(){
$('#modal').show();
$('#modal-container').html($('#new-template').html());
});
$('#shadow').click(function(){ $('#shadow').click(function(){
$('#modal').hide(); $('#modal').hide();
}) })
......
...@@ -98,33 +98,7 @@ ...@@ -98,33 +98,7 @@
</div> </div>
</li> </li>
<li id="new-template" style="display: none"> <li id="new-template" style="display: none">
<h2>Rendelkezésre álló sablonok</h2> {% include "new-template-flow.html" %}
<ul class="wm-list modal">
{% for m in templates %}
<li class="wm">
<form method="POST" action="/vm/new/{{m.pk}}/">{% csrf_token %}
<div class="summary">
<div class="name wm-on">{{m.name}}</div>
<div class="status">
<input type="submit" value="Indítás"/>
</div>
<div class="clear"></div>
</div>
<div class="details">
<h3>
Részletek
</h3>
<ul>
<li class="name">Rendszer: <span class="value">{{m.disk.name}}</span></li>
<li class="type">Instance típus: <span class="value">{{m.instance_type.name}}</span></li>
<li class="memory">Memória: <span class="value">{{m.instance_type.RAM}} MiB</span></li>
<li class="cpu">CPU magok: <span class="value">{{m.instance_type.CPU}}</span></li>
</ul>
</div>
</form>
</li>
{% endfor %}
</ul>
</li> </li>
</ul> </ul>
</div> </div>
......
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