+ Updated the hover-state for dropping a tab into a group: * [P] The indication that you are dropping a tab onto a group should not be on the tab, but on the group.[Aza]

+ Made the focus ring slightly prettier.
This commit is contained in:
Aza Raskin 2010-05-14 22:50:12 -07:00
parent ba17afd90d
commit 6b2303e4cd
2 changed files with 9 additions and 10 deletions

View File

@ -75,7 +75,7 @@ window.Group = function(listOfEls, options) {
.data('isDragging', false)
.appendTo("body")
.dequeue();
// ___ New Tab Button
this.$ntb = $("<div class='newTabButton'/>").appendTo($container);
this.$ntb.click(function(){
@ -819,7 +819,7 @@ window.Group.prototype = $.extend(new Item(), new Subscribable(), {
$(container).droppable({
tolerance: "intersect",
over: function(){
drag.info.$el.addClass("willGroup");
$(this).addClass("acceptsDrop");
},
out: function(){
var group = drag.info.item.parent;
@ -827,10 +827,10 @@ window.Group.prototype = $.extend(new Item(), new Subscribable(), {
group.remove(drag.info.$el);
}
drag.info.$el.removeClass("willGroup");
$(this).removeClass("acceptsDrop");
},
drop: function(event){
drag.info.$el.removeClass("willGroup");
$(this).removeClass("acceptsDrop");
self.add( drag.info.$el, {left:event.pageX, top:event.pageY} );
},
accept: ".tab", //".tab, .group",
@ -1048,7 +1048,7 @@ DragInfo.prototype = {
if(this.parent && this.parent.expanded)
this.parent.arrange();
if(this.item && !this.$el.hasClass('willGroup') && !this.item.parent) {
if(this.item && !this.$el.hasClass('acceptsDrop') && !this.item.parent) {
this.item.setZ(drag.zIndex);
drag.zIndex++;
@ -1094,7 +1094,7 @@ window.Groups = {
greedy: true,
drop: function(e){
$target = $(e.target);
drag.info.$el.removeClass("willGroup")
$(this).removeClass("acceptsDrop");
var phantom = $target.data("phantomGroup")
var group = drag.info.item.parent;

View File

@ -133,7 +133,7 @@ body {
.stack-trayed .thumb{ -moz-box-shadow: none !important;}
.focus{
-moz-box-shadow: rgba(54,79,225,1) 0px 0px 5px !important;
-moz-box-shadow: rgba(54,79,225,1) 0px 0px 5px -1px !important;
}
/* Tab Group
@ -213,9 +213,8 @@ body {
-moz-box-shadow: 5px 5px 4px rgba(0,0,0,.5);
}
.willGroup{
border: 1px inset rgba(150,0,0,.5);
-moz-box-shadow: 0px 0px 10px rgba(150,0,0,1);
.acceptsDrop{
-moz-box-shadow: 1px 1px 3px -1px rgba(0,0,0,.5);
}
.titlebar{