mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Better fix for the black screen issues, reverted the old fix.
refs #6334
This commit is contained in:
parent
d046a2800d
commit
2b1910c1c1
@ -489,12 +489,6 @@ define('pgadmin.browser', [
|
||||
setTimeout(function() {
|
||||
obj.editor.setValue('-- ' + select_object_msg);
|
||||
obj.editor.refresh();
|
||||
/* In case of Runtime we need to make height of sql_textarea
|
||||
* to 101% to fix the black screen issue with NWjs.
|
||||
*/
|
||||
if (pgAdmin['pgadmim_runtime'] === 'True') {
|
||||
$('.pg-panel-content .sql_textarea').addClass('runtime_sql_textarea');
|
||||
}
|
||||
}, 10);
|
||||
|
||||
// Initialise the treeview
|
||||
|
@ -47,7 +47,6 @@ define('pgadmin.browser.utils',
|
||||
pgAdmin['csrf_token_header'] = '{{ current_app.config.get('WTF_CSRF_HEADERS')[0] }}';
|
||||
pgAdmin['csrf_token'] = '{{ csrf_token() }}';
|
||||
pgAdmin['server_mode'] = '{{ current_app.config.get('SERVER_MODE') }}';
|
||||
pgAdmin['pgadmim_runtime'] = '{{ current_app.PGADMIN_RUNTIME }}';
|
||||
|
||||
/* Get the inactivity related config */
|
||||
pgAdmin['user_inactivity_timeout'] = {{ current_app.config.get('USER_INACTIVITY_TIMEOUT') }};
|
||||
|
@ -1868,7 +1868,6 @@ define([
|
||||
}).done(function(res) {
|
||||
self.sqlCtrl.clearHistory();
|
||||
self.sqlCtrl.setValue(res.data);
|
||||
self.setCodeMirrorHeight(obj);
|
||||
}).fail(function() {
|
||||
self.model.trigger('pgadmin-view:msql:error', self.method, node, arguments);
|
||||
}).always(function() {
|
||||
@ -1884,7 +1883,6 @@ define([
|
||||
}
|
||||
this.sqlCtrl.refresh.apply(this.sqlCtrl);
|
||||
}
|
||||
this.setCodeMirrorHeight(obj);
|
||||
},
|
||||
onPanelResized: function(o) {
|
||||
if (o && o.container) {
|
||||
@ -1900,7 +1898,6 @@ define([
|
||||
'height: ' + ($tabContent.height() + 8) + 'px !important;'
|
||||
);
|
||||
}
|
||||
this.sqlCtrl.setSize($tabContent.width() + 'px', $tabContent.height() + 'px');
|
||||
}
|
||||
},
|
||||
remove: function() {
|
||||
@ -1916,26 +1913,6 @@ define([
|
||||
|
||||
Backform.Control.__super__.remove.apply(this, arguments);
|
||||
},
|
||||
setCodeMirrorHeight: function(obj) {
|
||||
// Fix for mac os code-mirror showing black screen.
|
||||
var txtArea = $('.pgadmin-controls .pg-el-sm-12 .SQL > .CodeMirror > div > textarea').first();
|
||||
txtArea.css('z-index', -1);
|
||||
var $tabContent = $('.backform-tab > .tab-content').first();
|
||||
var $sqlPane = $tabContent.find('.CodeMirror > div > textarea');
|
||||
for(let i=0; i<$sqlPane.length; i++) {$($sqlPane[i]).css('z-index', -1);}
|
||||
|
||||
$tabContent = $('.backform-tab > .tab-content').first();
|
||||
$sqlPane = $tabContent.find('div[role=tabpanel].tab-pane.' + obj.tab.innerText);
|
||||
// Set height to CodeMirror.
|
||||
if ($sqlPane.hasClass('active')) {
|
||||
$sqlPane.find('.CodeMirror').css(
|
||||
'cssText',
|
||||
'height: ' + ($tabContent.height()) + 'px !important;'
|
||||
);
|
||||
$sqlPane.find('.CodeMirror').css('z-index', 99);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
/*
|
||||
* Numeric input Control functionality just like backgrid
|
||||
|
@ -88,8 +88,6 @@
|
||||
z-index: 1050 !important;
|
||||
|
||||
&.wcFrame, & .wcPanelBackground {
|
||||
border-bottom-left-radius: $card-border-radius;
|
||||
border-bottom-right-radius: $card-border-radius;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
@ -14,12 +14,6 @@
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.wcFloating {
|
||||
& .runtime_sql_textarea {
|
||||
height: 101% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.sql_textarea .CodeMirror-scroll {
|
||||
z-index: 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user