Commit 66876fa1 authored by 神楽坂玲奈's avatar 神楽坂玲奈

sortable

parent 6cf4f1b7
...@@ -106,7 +106,9 @@ class Deck extends Spine.Controller ...@@ -106,7 +106,9 @@ class Deck extends Spine.Controller
main_count += card_usage.count main_count += card_usage.count
category_count[(category for category in card.card_type when category in Card.categories).pop()] += card_usage.count category_count[(category for category in card.card_type when category in Card.categories).pop()] += card_usage.count
@html $('#deck_template').tmpl({main: @main, side: @side, extra: @extra, main_count: main_count, side_count: side_count, extra_count: extra_count, category_count: category_count}) @html $('#deck_template').tmpl({main: @main, side: @side, extra: @extra, main_count: main_count, side_count: side_count, extra_count: extra_count, category_count: category_count})
$('.card_usage').draggable() $( ".deck_part" ).sortable(
connectWith: ".deck_part"
).disableSelection();
if $('.operate_area').hasClass('text') if $('.operate_area').hasClass('text')
@el.jscroll({W: "12px", Btn: @el.jscroll({W: "12px", Btn:
{btn: false}}); {btn: false}});
......
...@@ -279,7 +279,9 @@ ...@@ -279,7 +279,9 @@
extra_count: extra_count, extra_count: extra_count,
category_count: category_count category_count: category_count
})); }));
$('.card_usage').draggable(); $(".deck_part").sortable({
connectWith: ".deck_part"
}).disableSelection();
if ($('.operate_area').hasClass('text')) { if ($('.operate_area').hasClass('text')) {
this.el.jscroll({ this.el.jscroll({
W: "12px", W: "12px",
......
...@@ -175,11 +175,12 @@ body{margin:0;padding:0;background:#eee;} ...@@ -175,11 +175,12 @@ body{margin:0;padding:0;background:#eee;}
fieldset{ fieldset{
border:1px solid #cccccc;padding:5px;margin:14px 0 0 0;background:#F9F9F9;border-radius:6px;font-size:12px;color:#666666;//height:586px; border:1px solid #cccccc;padding:5px;margin:14px 0 0 0;background:#F9F9F9;border-radius:6px;font-size:12px;color:#666666;//height:586px;
legend{font-size:14px;color:#666666;margin:0 0 0 8px;font-size:14px;} legend{font-size:14px;color:#666666;margin:0 0 0 8px;font-size:14px;}
.card_usage{margin: 3px 3px 3px 0; padding: 1px; float: left; width: 44px; height: 64px; }
} }
} }
.search_data.graphic{width:162px;height:700px;float:right; .search_data.graphic{width:162px;height:700px;float:right;
overflow: hidden; overflow: hidden;
} }
......
...@@ -86,19 +86,25 @@ ...@@ -86,19 +86,25 @@
<span class="deck_category_count ${$index}">${$value}</span>{{/each}}) <span class="deck_category_count ${$index}">${$value}</span>{{/each}})
</small> </small>
</legend> </legend>
{{tmpl(main) '#card_usage_' + ($('.operate_area').hasClass('text') ? 'text' : 'graphic') + '_template'}} <div class="deck_part main">
{{tmpl(main) '#card_usage_' + ($('.operate_area').hasClass('text') ? 'text' : 'graphic') + '_template'}}
</div>
</fieldset> </fieldset>
<fieldset id="deck_side"> <fieldset id="deck_side">
<legend id="deck_side_title" class="deck_title main">副卡组 <legend id="deck_side_title" class="deck_title main">副卡组
<small>(${side_count})</small> <small>(${side_count})</small>
</legend> </legend>
{{tmpl(side) '#card_usage_' + ($('.operate_area').hasClass('text') ? 'text' : 'graphic') + '_template'}} <div class="deck_part side">
{{tmpl(side) '#card_usage_' + ($('.operate_area').hasClass('text') ? 'text' : 'graphic') + '_template'}}
</div>
</fieldset> </fieldset>
<fieldset id="deck_extra"> <fieldset id="deck_extra">
<legend id="deck_extra_title" class="deck_title main">额外卡组 <legend id="deck_extra_title" class="deck_title main">额外卡组
<small>(${extra_count})</small> <small>(${extra_count})</small>
</legend> </legend>
{{tmpl(extra) '#card_usage_' + ($('.operate_area').hasClass('text') ? 'text' : 'graphic') + '_template'}} <div class="deck_part extra">
{{tmpl(extra) '#card_usage_' + ($('.operate_area').hasClass('text') ? 'text' : 'graphic') + '_template'}}
</div>
</fieldset> </fieldset>
</script> </script>
</head> </head>
......
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 to comment