Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Katana #1

Merged
merged 2 commits into from
Dec 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 0 additions & 66 deletions js/src/qgrid.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,72 +76,6 @@
display: none;
}

.qgrid-modal .q-grid-toolbar .close-modal-btn {
display: block;
}

.qgrid-modal .full-screen-btn,
.qgrid-modal .modal-header,
.qgrid-modal .modal-footer {
display: none;
}

.qgrid-modal {
width: 100%;
height: 100%;
margin: 0px;
}

.qgrid-modal .modal-dialog {
position: absolute;
top: 20px;
left: 20px;
bottom: 20px;
right: 20px;
margin: 0px;
width: auto;
height: auto;
}

.qgrid-modal .modal-content {
position: absolute;
left: 0px;
right: 0px;
top: 0px;
bottom: 0px;
}

.qgrid-modal .modal-body {
position: absolute;
padding: 15px;
top: 0px;
left: 0px;
bottom: 0px;
right: 0px;
}

.qgrid-modal .modal-body button.close {
margin-top: 7px;
margin-right: 14px;
}

.qgrid-modal .q-grid-container {
bottom: 25px;
left: 20px;
right: 20px;
position: absolute;
top: 15px;
}

.qgrid-modal .q-grid {
position: absolute;
top: 33px;
bottom: 0px;
left: 0px;
right: 0px;
height: auto !important;
}

.q-grid-toolbar .full-screen-btn,
.q-grid-toolbar .close-modal-btn {
height: 18px;
Expand Down
47 changes: 0 additions & 47 deletions js/src/qgrid.widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ var slider_filter = require('./qgrid.sliderfilter.js');
var text_filter = require('./qgrid.textfilter.js');
var boolean_filter = require('./qgrid.booleanfilter.js');
var editors = require('./qgrid.editors.js');
var dialog = null;
try {
dialog = require('base/js/dialog');
} catch (e) {
console.warn("Qgrid was unable to load base/js/dialog. " +
"Full screen button won't be available");
}
var jquery_ui = require('jquery-ui-dist/jquery-ui.min.js');

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

this.full_screen_btn = null;
if (dialog) {
this.full_screen_modal = $('body').find('.qgrid-modal');
if (this.full_screen_modal.length == 0) {
this.full_screen_modal = $(`
<div class="modal qgrid-modal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body"></div>
</div>
</div>
</div>
`).appendTo($('body'));
}
this.full_screen_btn = $(`
<button
class='btn btn-default fa fa-arrows-alt full-screen-btn'/>
`).appendTo(this.toolbar);
this.close_modal_btn = $(`
<button
class='btn btn-default fa fa-times close-modal-btn'
data-dismiss="modal"/>
`).appendTo(this.toolbar);

}
this.bind_toolbar_events();
}

Expand Down Expand Up @@ -176,22 +145,6 @@ class QgridView extends widgets.DOMWidgetView {
if (IPython && IPython.keyboard_manager) {
modal_options.keyboard_manager = IPython.keyboard_manager;
}
var qgrid_modal = dialog.modal(modal_options);

qgrid_modal.removeClass('fade');
qgrid_modal.addClass('qgrid-modal');
qgrid_modal.on('shown.bs.modal', (e) => {
this.slick_grid.resizeCanvas();
});
qgrid_modal.on('hidden.bs.modal', (e) => {
this.$el.detach();
this.$el_wrapper.height('auto');
this.$el_wrapper.append(this.$el);
this.update_size();
this.slick_grid.bindAllEvents();
this.bind_toolbar_events();
});
qgrid_modal.modal('show');
});
}

Expand Down
5 changes: 2 additions & 3 deletions js/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ module.exports = [
module: {
rules: rules
},
externals: ['@jupyter-widgets/base', '@jupyter-widgets/controls', 'base/js/dialog'],
plugins: plugins,
mode: 'production'
externals: ['@jupyter-widgets/base', '@jupyter-widgets/controls'],
plugins: plugins
},
{// Embeddable qgrid bundle
//
Expand Down