Skip to content

Commit

Permalink
Remove logging service and search input autofocus
Browse files Browse the repository at this point in the history
Unit have started using prmSearchBarAfterController in CENTRAL_PACKAGE, so we cannot use that directive anymore.
  • Loading branch information
danmichaelo committed Apr 1, 2019
1 parent 455edd9 commit 966edfb
Show file tree
Hide file tree
Showing 12 changed files with 2 additions and 913 deletions.
494 changes: 0 additions & 494 deletions js/logging.service.js

This file was deleted.

40 changes: 0 additions & 40 deletions js/main.js
Original file line number Diff line number Diff line change
@@ -1,52 +1,12 @@
import viewName from './viewName';
import LoggingService from './logging.service';

import prmActionListAfter from './prmActionListAfter.component';
import prmBriefResultContainerAfter from './prmBriefResultContainerAfter.component';
import prmBrowseSearchAfter from './prmBrowseSearchAfter.component';
import prmFullViewAfter from './prmFullViewAfter.component';
import prmNoSearchResultAfter from './prmNoSearchResultAfter.component';
import prmSaveToFavoritesButtonAfterComponent from './prmSaveToFavoritesButtonAfter.component';
import prmSearchAfterComponent from './prmSearchAfter.component';
import prmSearchBarAfterConfig from './prmSearchBarAfter.component';
import prmSearchResultListAfter from './prmSearchResultListAfter.component';
import prmSilentLoginAfterComponent from './prmSilentLoginAfter.component';


const app = angular.module('viewCustom', ['angularLoad']);

app.service('loggingService', LoggingService);

// SearchBar: The search form at the top of the page. Not reloaded on normal page changes.
app.component('prmSearchBarAfter', prmSearchBarAfterConfig);

// SearchAfter: Everything below the searchbar. Reloaded on normal page changes
app.component('prmSearchAfter', prmSearchAfterComponent);

// BrowseSearchAfter: Everything below the searchbar for browse pages. Reloaded on normal page changes
app.component('prmBrowseSearchAfter', prmBrowseSearchAfter);

// SearchResultList: The list of search results, repeated for each search page
app.component('prmSearchResultListAfter', prmSearchResultListAfter);

// NoSearchResult: If a search yields zero results, we get this instead of SearchResultList
app.component('prmNoSearchResultAfter', prmNoSearchResultAfter);

// BriefResultContainer: Each search result in the results list
app.component('prmBriefResultContainerAfter', prmBriefResultContainerAfter);

// FullView: The details view for a single record
app.component('prmFullViewAfter', prmFullViewAfter);

// ActionList: The action button bar: E-mail, Cite, Permalink, Endnote export etc.
app.component('prmActionListAfter', prmActionListAfter);

// SaveToFavoritesButton: The "pin record" button, this is found in multiple places
app.component('prmSaveToFavoritesButtonAfter', prmSaveToFavoritesButtonAfterComponent);

// SilentLogin: Component outside the root uiView.
app.component('prmSilentLoginAfter', prmSilentLoginAfterComponent);

// ------------------------------------------------------------------------

// eslint-disable-next-line no-unused-vars
Expand Down
28 changes: 0 additions & 28 deletions js/prmActionListAfter.component.js

This file was deleted.

20 changes: 0 additions & 20 deletions js/prmBriefResultContainerAfter.component.js

This file was deleted.

23 changes: 0 additions & 23 deletions js/prmBrowseSearchAfter.component.js

This file was deleted.

20 changes: 0 additions & 20 deletions js/prmFullViewAfter.component.js

This file was deleted.

72 changes: 0 additions & 72 deletions js/prmNoSearchResultAfter.component.js

This file was deleted.

41 changes: 0 additions & 41 deletions js/prmSaveToFavoritesButtonAfter.component.js

This file was deleted.

6 changes: 2 additions & 4 deletions js/prmSearchAfter.component.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class PrmSearchAfterController {

constructor($scope, $compile, $timeout, $document, loggingService) {
constructor($scope, $compile, $timeout, $document) {
$document.ready(() => {
// Note: At this point, the frontpage HTML template might not yet be ready.
// We see this problem especially in Firefox for some reason. Until we find a better
Expand All @@ -14,15 +14,13 @@ class PrmSearchAfterController {
prmSearchAfterEl.append(footer.detach().addClass('visible'));
let fnLink = $compile(footer); // returns a Link function used to bind template to the scope
fnLink($scope); // Bind scope to the template

loggingService.trackHome();
}
}, 100);
});
}
}

PrmSearchAfterController.$inject = ['$scope', '$compile', '$timeout', '$document', 'loggingService'];
PrmSearchAfterController.$inject = ['$scope', '$compile', '$timeout', '$document'];

export default {
bindings: {parentCtrl: '<'},
Expand Down
Loading

0 comments on commit 966edfb

Please sign in to comment.