import $ from 'jquery';
import _ from 'underscore';
-import Popup from 'components/common/popup';
-import Workspace from 'components/workspace/main';
-import '../templates';
+import Popup from '../../common/popup';
+import Workspace from '../../workspace/main';
+import Template from '../templates/source-viewer-coverage-popup.hbs';
export default Popup.extend({
- template: Templates['source-viewer-coverage-popup'],
+ template: Template,
events: {
- 'click a[data-uuid]': 'goToFile'
+ 'click a[data-id]': 'goToFile'
},
onRender: function () {
goToFile: function (e) {
e.stopPropagation();
- var uuid = $(e.currentTarget).data('uuid');
- Workspace.openComponent({ uuid: uuid });
+ var id = $(e.currentTarget).data('id');
- var RealWorkspace = Workspace.openComponent ? Workspace : require('components/workspace/main');
- RealWorkspace.openComponent({ uuid: id });
++ Workspace.openComponent({ uuid: id });
},
serializeData: function () {