Commit 9b08c899 by Dányi Bence

new-wm html fix

parent d557156a
...@@ -12,11 +12,12 @@ ...@@ -12,11 +12,12 @@
<script src="/static/jquery.min.js"></script> <script src="/static/jquery.min.js"></script>
<script src="/static/less.min.js"></script> <script src="/static/less.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var toggleDetails;
$(function(){ $(function(){
$('.wm .summary').each(function(){ $('.wm .summary').each(function(){
this.originalHeight=parseInt($(this).next('.details').css('height')); this.originalHeight=parseInt($(this).next('.details').css('height'));
}) })
var toggleDetails=function(){ toggleDetails=function(){
if($(this).next('.details').is(':hidden')){ if($(this).next('.details').is(':hidden')){
$(this).next('.details') $(this).next('.details')
.show() .show()
...@@ -47,20 +48,26 @@ $(function(){ ...@@ -47,20 +48,26 @@ $(function(){
},2000); },2000);
}) })
$('#new-wm-button').click(function(){ $('#new-wm-button').click(function(){
$('#modal').show(); $('#modal').show();
$('#modal-container').html($('#new-wm').html()); $('#modal-container').html($('#new-wm').html());
$('#modal-container .wm .summary').each(function(){ $('#modal-container .wm .summary').each(function(){
this.originalHeight=parseInt($(this).next('.details').css('height')); this.originalHeight=parseInt($(this).next('.details').css('height'));
}) })
$('#modal-container .wm .summary').click(toggleDetails); $('#modal-container .wm .summary').click(toggleDetails);
}); });
$('#new-template-button').click(function(){ $('#new-template-button').click(function(){
$('#modal').show(); $('#modal').show();
$('#modal-container').html($('#new-template').html()); $('#modal-container').html($('#new-template').html());
}); });
$('#shadow').click(function(){ $('#shadow').click(function(){
$('#modal').hide(); $('#modal').hide();
}) })
$('#new-template-button').click(function(){
$.get('/ajax/templateWizard', function(data){
$('#modal-container').html(data);
})
$('#modal').show();
});
}) })
</script> </script>
...@@ -113,6 +120,7 @@ $(function(){ ...@@ -113,6 +120,7 @@ $(function(){
<div id="modal" style="display: none"> <div id="modal" style="display: none">
<div id="shadow"></div> <div id="shadow"></div>
<div id="modal-container"> <div id="modal-container">
</div> </div>
</div> </div>
</body> </body>
......
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
</li> </li>
<li id="new-wm" style="display: none"> <li id="new-wm" style="display: none">
<h2>Rendelkezésre álló sablonok</h2> <h2>Rendelkezésre álló sablonok</h2>
<p>
Mese, hogy mit is lehet csinálni.
</p>
<div class="container"> <div class="container">
<ul class="wm-list modal"> <ul class="wm-list modal">
{% for m in templates %} {% for m in templates %}
...@@ -97,9 +100,6 @@ ...@@ -97,9 +100,6 @@
<div class="clear"></div> <div class="clear"></div>
</div> </div>
</li> </li>
<script type="text/html" id="new-template" style="display: none">
{% include "new-template-flow.html" %}
</script>
</ul> </ul>
</div> </div>
{% for box in boxes %} {% for box in boxes %}
......
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