Merge pull request #8837 from owncloud/issue/8720
Fix cursor and background of app navigation
This commit is contained in:
commit
f87a91fa00
|
@ -368,7 +368,7 @@ table td.filename form { font-size:14px; margin-left:48px; margin-right:48px; }
|
||||||
padding: 28px 14px 19px !important;
|
padding: 28px 14px 19px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#fileList .action.action-share-notification span, img, a {
|
#fileList .action.action-share-notification span, #fileList a {
|
||||||
cursor: default !important;
|
cursor: default !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,13 +82,13 @@
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$el.find('li').removeClass('selected');
|
this.$el.find('li').removeClass('active');
|
||||||
if (this.$currentContent) {
|
if (this.$currentContent) {
|
||||||
this.$currentContent.addClass('hidden');
|
this.$currentContent.addClass('hidden');
|
||||||
this.$currentContent.trigger(jQuery.Event('hide'));
|
this.$currentContent.trigger(jQuery.Event('hide'));
|
||||||
}
|
}
|
||||||
this._activeItem = itemId;
|
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 = $('#app-content-' + itemId);
|
||||||
this.$currentContent.removeClass('hidden');
|
this.$currentContent.removeClass('hidden');
|
||||||
if (!options || !options.silent) {
|
if (!options || !options.silent) {
|
||||||
|
|
|
@ -200,31 +200,31 @@ describe('OCA.Files.App tests', function() {
|
||||||
expect(App.navigation.getActiveItem()).toEqual('other');
|
expect(App.navigation.getActiveItem()).toEqual('other');
|
||||||
expect($('#app-content-files').hasClass('hidden')).toEqual(true);
|
expect($('#app-content-files').hasClass('hidden')).toEqual(true);
|
||||||
expect($('#app-content-other').hasClass('hidden')).toEqual(false);
|
expect($('#app-content-other').hasClass('hidden')).toEqual(false);
|
||||||
expect($('li[data-id=files]').hasClass('selected')).toEqual(false);
|
expect($('li[data-id=files]').hasClass('active')).toEqual(false);
|
||||||
expect($('li[data-id=other]').hasClass('selected')).toEqual(true);
|
expect($('li[data-id=other]').hasClass('active')).toEqual(true);
|
||||||
|
|
||||||
App._onPopState({view: 'files', dir: '/somedir'});
|
App._onPopState({view: 'files', dir: '/somedir'});
|
||||||
|
|
||||||
expect(App.navigation.getActiveItem()).toEqual('files');
|
expect(App.navigation.getActiveItem()).toEqual('files');
|
||||||
expect($('#app-content-files').hasClass('hidden')).toEqual(false);
|
expect($('#app-content-files').hasClass('hidden')).toEqual(false);
|
||||||
expect($('#app-content-other').hasClass('hidden')).toEqual(true);
|
expect($('#app-content-other').hasClass('hidden')).toEqual(true);
|
||||||
expect($('li[data-id=files]').hasClass('selected')).toEqual(true);
|
expect($('li[data-id=files]').hasClass('active')).toEqual(true);
|
||||||
expect($('li[data-id=other]').hasClass('selected')).toEqual(false);
|
expect($('li[data-id=other]').hasClass('active')).toEqual(false);
|
||||||
});
|
});
|
||||||
it('clicking on navigation switches the panel visibility', function() {
|
it('clicking on navigation switches the panel visibility', function() {
|
||||||
$('li[data-id=other]>a').click();
|
$('li[data-id=other]>a').click();
|
||||||
expect(App.navigation.getActiveItem()).toEqual('other');
|
expect(App.navigation.getActiveItem()).toEqual('other');
|
||||||
expect($('#app-content-files').hasClass('hidden')).toEqual(true);
|
expect($('#app-content-files').hasClass('hidden')).toEqual(true);
|
||||||
expect($('#app-content-other').hasClass('hidden')).toEqual(false);
|
expect($('#app-content-other').hasClass('hidden')).toEqual(false);
|
||||||
expect($('li[data-id=files]').hasClass('selected')).toEqual(false);
|
expect($('li[data-id=files]').hasClass('active')).toEqual(false);
|
||||||
expect($('li[data-id=other]').hasClass('selected')).toEqual(true);
|
expect($('li[data-id=other]').hasClass('active')).toEqual(true);
|
||||||
|
|
||||||
$('li[data-id=files]>a').click();
|
$('li[data-id=files]>a').click();
|
||||||
expect(App.navigation.getActiveItem()).toEqual('files');
|
expect(App.navigation.getActiveItem()).toEqual('files');
|
||||||
expect($('#app-content-files').hasClass('hidden')).toEqual(false);
|
expect($('#app-content-files').hasClass('hidden')).toEqual(false);
|
||||||
expect($('#app-content-other').hasClass('hidden')).toEqual(true);
|
expect($('#app-content-other').hasClass('hidden')).toEqual(true);
|
||||||
expect($('li[data-id=files]').hasClass('selected')).toEqual(true);
|
expect($('li[data-id=files]').hasClass('active')).toEqual(true);
|
||||||
expect($('li[data-id=other]').hasClass('selected')).toEqual(false);
|
expect($('li[data-id=other]').hasClass('active')).toEqual(false);
|
||||||
});
|
});
|
||||||
it('clicking on navigation sends "show" and "urlChanged" event', function() {
|
it('clicking on navigation sends "show" and "urlChanged" event', function() {
|
||||||
var handler = sinon.stub();
|
var handler = sinon.stub();
|
||||||
|
|
Loading…
Reference in New Issue