mirror of https://github.com/apache/nifi.git
NIFI-256:
- Hiding the context menu when opening the shell if possible.
This commit is contained in:
parent
95b22a0aee
commit
549c97d3f4
|
@ -53,6 +53,11 @@ nf.Shell = (function () {
|
||||||
* @argument {boolean} canUndock Whether or not the shell is undockable
|
* @argument {boolean} canUndock Whether or not the shell is undockable
|
||||||
*/
|
*/
|
||||||
showPage: function (uri, canUndock) {
|
showPage: function (uri, canUndock) {
|
||||||
|
// if the context menu is on this page, attempt to close
|
||||||
|
if (nf.Common.isDefinedAndNotNull(nf.ContextMenu)) {
|
||||||
|
nf.ContextMenu.hide();
|
||||||
|
}
|
||||||
|
|
||||||
return $.Deferred(function (deferred) {
|
return $.Deferred(function (deferred) {
|
||||||
var shell = $('#shell');
|
var shell = $('#shell');
|
||||||
|
|
||||||
|
@ -108,6 +113,11 @@ nf.Shell = (function () {
|
||||||
* @argument {string} domId The id of the element to show in the shell
|
* @argument {string} domId The id of the element to show in the shell
|
||||||
*/
|
*/
|
||||||
showContent: function (domId) {
|
showContent: function (domId) {
|
||||||
|
// if the context menu is on this page, attempt to close
|
||||||
|
if (nf.Common.isDefinedAndNotNull(nf.ContextMenu)) {
|
||||||
|
nf.ContextMenu.hide();
|
||||||
|
}
|
||||||
|
|
||||||
return $.Deferred(function (deferred) {
|
return $.Deferred(function (deferred) {
|
||||||
var content = $(domId);
|
var content = $(domId);
|
||||||
if (content.length) {
|
if (content.length) {
|
||||||
|
|
Loading…
Reference in New Issue