Skip to content

Commit c154b51

Browse files
author
minjk-bl
committed
CHROME: added parentSelector for popup and file navigation
1 parent feba20d commit c154b51

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

js/com/com_Config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ define([
4747
constructor(extensionType='notebook', initialData={}) {
4848
// initial mode
4949
this.extensionType = extensionType;
50+
this.parentSelector = 'body';
51+
if (extensionType === 'notebook') {
52+
this.parentSelector = '#site';
53+
} else if (extensionType === 'chrome') {
54+
this.parentSelector = '.notebook-horizontal';
55+
}
5056
// initial configuration
5157
this.data = {
5258
// Configuration

js/com/component/FileNavigation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ define([
4747
* @param {Object} state { type, extensions, finish ... }
4848
*/
4949
constructor(state) {
50-
super($('#site'), state);
50+
super($(vpConfig.parentSelector), state);
5151
/**
5252
* state.type open / save
5353
* state.extensions extensions list

js/com/component/PopupComponent.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ define([
4141
*/
4242
class PopupComponent extends Component {
4343
constructor(state={ config: { id: 'popup', name: 'Popup title', path: 'path/file' }}, prop={}) {
44-
super($('#site'), state, prop);
44+
// CHROME: FIXME: #site -> .notebook-vertical
45+
// super($('#site'), state, prop);
46+
super($(vpConfig.parentSelector), state, prop);
4547
}
4648

4749
_init() {

0 commit comments

Comments
 (0)