1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 15:09:14 +00:00

fix conflict of dropdown

This commit is contained in:
Daniel Pan
2016-04-01 17:53:41 +08:00
parent 56ca37d953
commit ffabf2353c
6 changed files with 39 additions and 39 deletions

View File

@@ -42,7 +42,7 @@ define([
this.$el.html(this.template(data));
new DropdownView({
el: this.$('.dropdown'),
el: this.$('.sf-dropdown'),
left: '-60px'
});

View File

@@ -50,7 +50,7 @@ define([
});
this.$el.html(this.template(obj));
this.dropdown = new DropdownView({
el: this.$('.dropdown')
el: this.$('.sf-dropdown')
});
return this;
},

View File

@@ -19,8 +19,8 @@ define([
return true;
}
if (!view.$('.dropdown-menu').is(target)
&& !view.$('.dropdown-menu').find('*').is(target))
if (!view.$('.sf-dropdown-menu').is(target)
&& !view.$('.sf-dropdown-menu').find('*').is(target))
{
view.hide();
if (app.ui.currentHighlightedItem) {
@@ -50,7 +50,7 @@ define([
},
initialize: function(options) {
this.$el.on('click', '.dropdown-toggle', _.bind(this.toggleDropdown, this));
this.$el.on('click', '.sf-dropdown-toggle', _.bind(this.toggleDropdown, this));
this.$el.on('keydown', _.bind(this.handleKeydown, this));
this.options = {};
_.extend(this.options, this.defaultOptions, options);
@@ -58,18 +58,18 @@ define([
hide: function() {
app.ui.currentDropdown = null;
this.$('.dropdown-menu').addClass('hide');
this.$('.sf-dropdown-menu').addClass('hide');
},
show: function() {
var $menu = this.$('.dropdown-menu');
var $menu = this.$('.sf-dropdown-menu');
app.ui.currentDropdown = this;
if (this.options.right) {
$menu.css('right', this.options.right);
} else {
$menu.css('left', this.options.left);
}
this.$('.dropdown-menu').removeClass('hide');
this.$('.sf-dropdown-menu').removeClass('hide');
},
toggleDropdown: function() {
@@ -77,7 +77,7 @@ define([
app.ui.currentDropdown.hide();
}
if (this.$('.dropdown-menu').is(':hidden')) {
if (this.$('.sf-dropdown-menu').is(':hidden')) {
this.show();
} else {
this.hide();