Merge pull request #8837 from owncloud/issue/8720

Fix cursor and background of app navigation
This commit is contained in:
Morris Jobke 2014-06-03 16:46:04 +02:00
commit f87a91fa00
3 changed files with 11 additions and 11 deletions

View File

@ -368,7 +368,7 @@ table td.filename form { font-size:14px; margin-left:48px; margin-right:48px; }
padding: 28px 14px 19px !important;
}
#fileList .action.action-share-notification span, img, a {
#fileList .action.action-share-notification span, #fileList a {
cursor: default !important;
}

View File

@ -82,13 +82,13 @@
}
return;
}
this.$el.find('li').removeClass('selected');
this.$el.find('li').removeClass('active');
if (this.$currentContent) {
this.$currentContent.addClass('hidden');
this.$currentContent.trigger(jQuery.Event('hide'));
}
this._activeItem = itemId;
this.$el.find('li[data-id=' + itemId + ']').addClass('selected');
this.$el.find('li[data-id=' + itemId + ']').addClass('active');
this.$currentContent = $('#app-content-' + itemId);
this.$currentContent.removeClass('hidden');
if (!options || !options.silent) {

View File

@ -200,31 +200,31 @@ describe('OCA.Files.App tests', function() {
expect(App.navigation.getActiveItem()).toEqual('other');
expect($('#app-content-files').hasClass('hidden')).toEqual(true);
expect($('#app-content-other').hasClass('hidden')).toEqual(false);
expect($('li[data-id=files]').hasClass('selected')).toEqual(false);
expect($('li[data-id=other]').hasClass('selected')).toEqual(true);
expect($('li[data-id=files]').hasClass('active')).toEqual(false);
expect($('li[data-id=other]').hasClass('active')).toEqual(true);
App._onPopState({view: 'files', dir: '/somedir'});
expect(App.navigation.getActiveItem()).toEqual('files');
expect($('#app-content-files').hasClass('hidden')).toEqual(false);
expect($('#app-content-other').hasClass('hidden')).toEqual(true);
expect($('li[data-id=files]').hasClass('selected')).toEqual(true);
expect($('li[data-id=other]').hasClass('selected')).toEqual(false);
expect($('li[data-id=files]').hasClass('active')).toEqual(true);
expect($('li[data-id=other]').hasClass('active')).toEqual(false);
});
it('clicking on navigation switches the panel visibility', function() {
$('li[data-id=other]>a').click();
expect(App.navigation.getActiveItem()).toEqual('other');
expect($('#app-content-files').hasClass('hidden')).toEqual(true);
expect($('#app-content-other').hasClass('hidden')).toEqual(false);
expect($('li[data-id=files]').hasClass('selected')).toEqual(false);
expect($('li[data-id=other]').hasClass('selected')).toEqual(true);
expect($('li[data-id=files]').hasClass('active')).toEqual(false);
expect($('li[data-id=other]').hasClass('active')).toEqual(true);
$('li[data-id=files]>a').click();
expect(App.navigation.getActiveItem()).toEqual('files');
expect($('#app-content-files').hasClass('hidden')).toEqual(false);
expect($('#app-content-other').hasClass('hidden')).toEqual(true);
expect($('li[data-id=files]').hasClass('selected')).toEqual(true);
expect($('li[data-id=other]').hasClass('selected')).toEqual(false);
expect($('li[data-id=files]').hasClass('active')).toEqual(true);
expect($('li[data-id=other]').hasClass('active')).toEqual(false);
});
it('clicking on navigation sends "show" and "urlChanged" event', function() {
var handler = sinon.stub();