mirror of https://gitee.com/bigwinds/arangodb
added missing logo event
This commit is contained in:
parent
e0e4336d53
commit
1ce418a7cf
|
@ -10,6 +10,7 @@
|
||||||
"change #arangoCollectionSelect": "navigateBySelect",
|
"change #arangoCollectionSelect": "navigateBySelect",
|
||||||
"click .tab": "navigateByTab",
|
"click .tab": "navigateByTab",
|
||||||
"click li": "switchTab",
|
"click li": "switchTab",
|
||||||
|
"click .arangodbLogo": "selectMenuItem",
|
||||||
"mouseenter .dropdown > *": "showDropdown",
|
"mouseenter .dropdown > *": "showDropdown",
|
||||||
"mouseleave .dropdown": "hideDropdown"
|
"mouseleave .dropdown": "hideDropdown"
|
||||||
},
|
},
|
||||||
|
@ -43,6 +44,8 @@
|
||||||
template: templateEngine.createTemplate("navigationView.ejs"),
|
template: templateEngine.createTemplate("navigationView.ejs"),
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
$(this.el).html(this.template.render({
|
$(this.el).html(this.template.render({
|
||||||
currentDB: this.currentDB
|
currentDB: this.currentDB
|
||||||
}));
|
}));
|
||||||
|
@ -60,6 +63,10 @@
|
||||||
if (this.renderFirst) {
|
if (this.renderFirst) {
|
||||||
this.renderFirst = false;
|
this.renderFirst = false;
|
||||||
this.selectMenuItem((window.location.hash).substr(1, (window.location.hash).length) + '-menu');
|
this.selectMenuItem((window.location.hash).substr(1, (window.location.hash).length) + '-menu');
|
||||||
|
|
||||||
|
$('.arangodbLogo').on('click', function() {
|
||||||
|
self.selectMenuItem();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
@ -122,8 +129,10 @@
|
||||||
|
|
||||||
selectMenuItem: function (menuItem) {
|
selectMenuItem: function (menuItem) {
|
||||||
$('.navlist li').removeClass('active');
|
$('.navlist li').removeClass('active');
|
||||||
if (menuItem) {
|
if (typeof menuItem === 'string') {
|
||||||
$('.' + menuItem).addClass('active');
|
if (menuItem) {
|
||||||
|
$('.' + menuItem).addClass('active');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue