Permalink
Browse files

"NO ITEMS" cannot be moved anymore. Empty row is where you can drop i…

…tems above the "NO ITEMS" - ugly - will fix later
  • Loading branch information...
1 parent ae16630 commit e02c0160b3ec727c70fcecdf532b29fede4ad8e1 Eero Heino committed Jun 20, 2011
Showing with 17 additions and 3 deletions.
  1. +3 −1 template/en/default/global/lists.html.tmpl
  2. +14 −2 web/js/scrums.js
@@ -20,7 +20,8 @@
#%]
<script type="text/JavaScript" src="extensions/Scrums/web/js/jquery/js/jquery-1.4.4.min.js"></script>
-<script type="text/JavaScript" src="extensions/Scrums/web/js/jquery/js/jquery-ui-1.8.10.custom.min.js"></script>
+<!--<script type="text/JavaScript" src="extensions/Scrums/web/js/jquery/js/jquery-ui-1.8.10.custom.min.js"></script>-->
+<script type="text/JavaScript" src="extensions/Scrums/web/js/jquery/js/jquery-ui-1.8.13.custom.min.js"></script>
<script type="text/javascript" src="extensions/Scrums/web/js/scrums.js"></script>
<link rel="stylesheet" href="extensions/Scrums/web/js/jquery/css/ui-lightness/jquery-ui-1.8.10.custom.css">
@@ -85,6 +86,7 @@
<li id="<#= bug[0] #>" bug_order_nr='<#= counter #>'><span class="number"><#= counter #></span> <span><a href="show_bug.cgi?id=<#= bug[0] #>"><#= bug[0] #></a> <#= bug[1] #> <#= bug[2] #> <#= bug[3] #> <#= bug[4] #></span></li>
</script>
+<!-- $( "#effect" ).effect( selectedEffect, options, 500, callback ); -->
<script id="ListTmpl" type="text/html">
<h3 id="<#= list.h_id #>"><#= list.name #></h3>
View
@@ -62,6 +62,7 @@ function switch_lists(ui, lists) {
old_vis_position = parseInt(ui.item.attr('bug_order_nr'));
to_list = undefined;
from_list = undefined;
+ var new_entry_id = '';
new_position = -1;
for (var l = 0; l < lists.length; l++) {
list = lists[l];
@@ -86,6 +87,7 @@ function switch_lists(ui, lists) {
}
order = to_list.visible[to_list.offset + i];
if ($(this).attr('id') == ui.item.attr('id')) {
+ new_entry_id = $(this).attr('id');
new_position = order;
var temp = from_list.list.splice(old_position, 1);
to_list.list.splice(new_position, 0, temp[0]);
@@ -100,6 +102,14 @@ function switch_lists(ui, lists) {
from_list.visible = -1;
update_lists(to_list);
update_lists(from_list);
+ if (new_entry_id)
+ {
+ $('#'+new_entry_id).children().each(function ()
+ {
+ $(this).effect( 'highlight', {color: '#404d6c'}, 1000 );
+ });
+ }
+
}
function bind_sortable_lists(lists) {
@@ -119,7 +129,9 @@ function bind_sortable_lists(lists) {
},
stop: function(event, ui) {
switch_lists(ui, lists);;
- }
+ },
+ items: 'tr:not(.ignoresortable)',
+
}).disableSelection();
}
@@ -172,7 +184,7 @@ function update_lists(bugs_list, move_pos, data) {
$("#" + bugs_list.ul_id).html(html);
} else
{
- $("#" + bugs_list.ul_id).html('<tr><td colspan="6"><h2 style="text-align: center;">NO ITEMS</h2></td></tr>');
+ $("#" + bugs_list.ul_id).html('<tr rowspan="1"><td colspan="6">&nbsp;</td></tr><tr class="ignoresortable"><td colspan="6"><h2 style="text-align: center;">NO ITEMS</h2></td></tr>');
}
$('#items_' + bugs_list.id).html(bugs_list.list.length);
}

6 comments on commit e02c016

Member

I think you forgot to commit extensions/Scrums/web/js/jquery/js/jquery-ui-1.8.13.custom.min.js, this commit breaks all drag + drop functionality.

Member
Member

Gentlemen,
https://github.com/bayoteers lists 11 Organization Members and GitHub seems to send messages to all of them by default.
That's all.

Cheerio,
andré

Member

For what it's worth I think you can turn them off here (if you hadn't already figured it out): https://github.com/account/notifications

Please sign in to comment.