mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-08 02:10:24 +00:00
Add focus handling for HLItemView
This commit is contained in:
@@ -17,6 +17,25 @@ define([
|
||||
initialize: function(options) {
|
||||
this.$el.on('mouseenter', _.bind(this.highlight, this));
|
||||
this.$el.on('mouseleave', _.bind(this.rmHighlight, this));
|
||||
this.$el.on('focus', '*', _.bind(this.focus, this));
|
||||
},
|
||||
|
||||
focus: function() {
|
||||
// if there are dropdown items or freezeItemHightlight is set, don't highlight
|
||||
if (app.ui.currentDropdown || app.ui.freezeItemHightlight) {
|
||||
console.log("app.ui.currentDropdown ");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (app.ui.currentHighlightedItem) {
|
||||
if (app.ui.currentHighlightedItem == this) {
|
||||
return true;
|
||||
} else {
|
||||
app.ui.currentHighlightedItem.rmHighlight();
|
||||
}
|
||||
}
|
||||
this.highlight();
|
||||
return true;
|
||||
},
|
||||
|
||||
highlight: function() {
|
||||
|
Reference in New Issue
Block a user