Skip to content

Commit 9faa4d9

Browse files
authored
Merge pull request #1 from dylanht/katana
Katana
2 parents 877b420 + 3c49ac3 commit 9faa4d9

File tree

3 files changed

+2
-116
lines changed

3 files changed

+2
-116
lines changed

js/src/qgrid.css

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -76,72 +76,6 @@
7676
display: none;
7777
}
7878

79-
.qgrid-modal .q-grid-toolbar .close-modal-btn {
80-
display: block;
81-
}
82-
83-
.qgrid-modal .full-screen-btn,
84-
.qgrid-modal .modal-header,
85-
.qgrid-modal .modal-footer {
86-
display: none;
87-
}
88-
89-
.qgrid-modal {
90-
width: 100%;
91-
height: 100%;
92-
margin: 0px;
93-
}
94-
95-
.qgrid-modal .modal-dialog {
96-
position: absolute;
97-
top: 20px;
98-
left: 20px;
99-
bottom: 20px;
100-
right: 20px;
101-
margin: 0px;
102-
width: auto;
103-
height: auto;
104-
}
105-
106-
.qgrid-modal .modal-content {
107-
position: absolute;
108-
left: 0px;
109-
right: 0px;
110-
top: 0px;
111-
bottom: 0px;
112-
}
113-
114-
.qgrid-modal .modal-body {
115-
position: absolute;
116-
padding: 15px;
117-
top: 0px;
118-
left: 0px;
119-
bottom: 0px;
120-
right: 0px;
121-
}
122-
123-
.qgrid-modal .modal-body button.close {
124-
margin-top: 7px;
125-
margin-right: 14px;
126-
}
127-
128-
.qgrid-modal .q-grid-container {
129-
bottom: 25px;
130-
left: 20px;
131-
right: 20px;
132-
position: absolute;
133-
top: 15px;
134-
}
135-
136-
.qgrid-modal .q-grid {
137-
position: absolute;
138-
top: 33px;
139-
bottom: 0px;
140-
left: 0px;
141-
right: 0px;
142-
height: auto !important;
143-
}
144-
14579
.q-grid-toolbar .full-screen-btn,
14680
.q-grid-toolbar .close-modal-btn {
14781
height: 18px;

js/src/qgrid.widget.js

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ var slider_filter = require('./qgrid.sliderfilter.js');
77
var text_filter = require('./qgrid.textfilter.js');
88
var boolean_filter = require('./qgrid.booleanfilter.js');
99
var editors = require('./qgrid.editors.js');
10-
var dialog = null;
11-
try {
12-
dialog = require('base/js/dialog');
13-
} catch (e) {
14-
console.warn("Qgrid was unable to load base/js/dialog. " +
15-
"Full screen button won't be available");
16-
}
1710
var jquery_ui = require('jquery-ui-dist/jquery-ui.min.js');
1811

1912
require('slickgrid-qgrid/slick.core.js');
@@ -116,30 +109,6 @@ class QgridView extends widgets.DOMWidgetView {
116109
this.buttons.tooltip('disable');
117110

118111
this.full_screen_btn = null;
119-
if (dialog) {
120-
this.full_screen_modal = $('body').find('.qgrid-modal');
121-
if (this.full_screen_modal.length == 0) {
122-
this.full_screen_modal = $(`
123-
<div class="modal qgrid-modal">
124-
<div class="modal-dialog">
125-
<div class="modal-content">
126-
<div class="modal-body"></div>
127-
</div>
128-
</div>
129-
</div>
130-
`).appendTo($('body'));
131-
}
132-
this.full_screen_btn = $(`
133-
<button
134-
class='btn btn-default fa fa-arrows-alt full-screen-btn'/>
135-
`).appendTo(this.toolbar);
136-
this.close_modal_btn = $(`
137-
<button
138-
class='btn btn-default fa fa-times close-modal-btn'
139-
data-dismiss="modal"/>
140-
`).appendTo(this.toolbar);
141-
142-
}
143112
this.bind_toolbar_events();
144113
}
145114

@@ -176,22 +145,6 @@ class QgridView extends widgets.DOMWidgetView {
176145
if (IPython && IPython.keyboard_manager) {
177146
modal_options.keyboard_manager = IPython.keyboard_manager;
178147
}
179-
var qgrid_modal = dialog.modal(modal_options);
180-
181-
qgrid_modal.removeClass('fade');
182-
qgrid_modal.addClass('qgrid-modal');
183-
qgrid_modal.on('shown.bs.modal', (e) => {
184-
this.slick_grid.resizeCanvas();
185-
});
186-
qgrid_modal.on('hidden.bs.modal', (e) => {
187-
this.$el.detach();
188-
this.$el_wrapper.height('auto');
189-
this.$el_wrapper.append(this.$el);
190-
this.update_size();
191-
this.slick_grid.bindAllEvents();
192-
this.bind_toolbar_events();
193-
});
194-
qgrid_modal.modal('show');
195148
});
196149
}
197150

js/webpack.config.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@ module.exports = [
6161
module: {
6262
rules: rules
6363
},
64-
externals: ['@jupyter-widgets/base', '@jupyter-widgets/controls', 'base/js/dialog'],
65-
plugins: plugins,
66-
mode: 'production'
64+
externals: ['@jupyter-widgets/base', '@jupyter-widgets/controls'],
65+
plugins: plugins
6766
},
6867
{// Embeddable qgrid bundle
6968
//

0 commit comments

Comments
 (0)