Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
core
Commits
53db86a1
Commit
53db86a1
authored
7 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
resize of scrollable results triggered when panels are visible and switched to
parent
e1700608
No related branches found
No related tags found
1 merge request
!99
Resolve "Link from literature file to the related reaction in the map does not work"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend-js/src/main/js/gui/Panel.js
+18
-15
18 additions, 15 deletions
frontend-js/src/main/js/gui/Panel.js
frontend-js/src/main/js/gui/leftPanel/SearchPanel.js
+4
-3
4 additions, 3 deletions
frontend-js/src/main/js/gui/leftPanel/SearchPanel.js
with
22 additions
and
18 deletions
frontend-js/src/main/js/gui/Panel.js
+
18
−
15
View file @
53db86a1
...
@@ -258,23 +258,26 @@ Panel.prototype.onresize = function() {
...
@@ -258,23 +258,26 @@ Panel.prototype.onresize = function() {
// compute the width (we can only compute it for visible elements)
// compute the width (we can only compute it for visible elements)
var
size
=
100000
;
var
size
=
100000
;
$
(
"
.pre-scrollable
"
,
self
.
getElement
()).
each
(
function
(
index
,
element
)
{
if
(
$
(
self
.
getElement
()).
is
(
"
:visible
"
))
{
if
(
$
(
element
).
is
(
"
:visible
"
))
{
size
=
Math
.
min
(
size
,
footerPosition
-
$
(
element
).
offset
().
top
);
}
});
if
(
$
(
self
.
getElement
()).
hasClass
(
"
pre-scrollable
"
)
&&
$
(
self
.
getElement
()).
is
(
"
:visible
"
))
{
size
=
Math
.
min
(
size
,
footerPosition
-
$
(
self
.
getElement
()).
offset
().
top
);
}
if
(
size
!==
100000
)
{
$
(
"
.pre-scrollable
"
,
self
.
getElement
()).
each
(
function
(
index
,
element
)
{
$
(
"
.pre-scrollable
"
,
self
.
getElement
()).
each
(
function
(
index
,
element
)
{
$
(
element
).
css
(
'
max-height
'
,
size
);
if
(
$
(
element
).
is
(
"
:visible
"
))
{
$
(
element
).
css
(
'
height
'
,
size
);
size
=
Math
.
min
(
size
,
footerPosition
-
$
(
element
).
offset
().
top
);
}
});
});
}
if
(
$
(
self
.
getElement
()).
hasClass
(
"
pre-scrollable
"
)
&&
$
(
self
.
getElement
()).
is
(
"
:visible
"
))
{
if
(
$
(
self
.
getElement
()).
hasClass
(
"
pre-scrollable
"
)
&&
$
(
self
.
getElement
()).
is
(
"
:visible
"
))
{
size
=
Math
.
min
(
size
,
footerPosition
-
$
(
self
.
getElement
()).
offset
().
top
);
$
(
self
.
getElement
()).
css
(
'
max-height
'
,
size
);
}
$
(
self
.
getElement
()).
css
(
'
height
'
,
size
);
if
(
size
!==
100000
)
{
$
(
"
.pre-scrollable
"
,
self
.
getElement
()).
each
(
function
(
index
,
element
)
{
$
(
element
).
css
(
'
max-height
'
,
size
);
$
(
element
).
css
(
'
height
'
,
size
);
});
}
if
(
$
(
self
.
getElement
()).
hasClass
(
"
pre-scrollable
"
)
&&
$
(
self
.
getElement
()).
is
(
"
:visible
"
))
{
$
(
self
.
getElement
()).
css
(
'
max-height
'
,
size
);
$
(
self
.
getElement
()).
css
(
'
height
'
,
size
);
}
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
frontend-js/src/main/js/gui/leftPanel/SearchPanel.js
+
4
−
3
View file @
53db86a1
...
@@ -4,7 +4,7 @@ var Promise = require("bluebird");
...
@@ -4,7 +4,7 @@ var Promise = require("bluebird");
/* exported logger */
/* exported logger */
var
AbstractGuiElement
=
require
(
'
../AbstractGuiElement
'
);
var
Panel
=
require
(
'
../Panel
'
);
var
ChemicalPanel
=
require
(
'
./ChemicalPanel
'
);
var
ChemicalPanel
=
require
(
'
./ChemicalPanel
'
);
var
DrugPanel
=
require
(
'
./DrugPanel
'
);
var
DrugPanel
=
require
(
'
./DrugPanel
'
);
var
MiRnaPanel
=
require
(
'
./MiRnaPanel
'
);
var
MiRnaPanel
=
require
(
'
./MiRnaPanel
'
);
...
@@ -14,7 +14,8 @@ var Functions = require('../../Functions');
...
@@ -14,7 +14,8 @@ var Functions = require('../../Functions');
var
logger
=
require
(
'
../../logger
'
);
var
logger
=
require
(
'
../../logger
'
);
function
SearchPanel
(
params
)
{
function
SearchPanel
(
params
)
{
AbstractGuiElement
.
call
(
this
,
params
);
params
.
panelName
=
"
global-search
"
;
Panel
.
call
(
this
,
params
);
var
self
=
this
;
var
self
=
this
;
this
.
_tabIdCount
=
0
;
this
.
_tabIdCount
=
0
;
...
@@ -24,7 +25,7 @@ function SearchPanel(params) {
...
@@ -24,7 +25,7 @@ function SearchPanel(params) {
}
}
SearchPanel
.
prototype
=
Object
.
create
(
AbstractGuiElement
.
prototype
);
SearchPanel
.
prototype
=
Object
.
create
(
Panel
.
prototype
);
SearchPanel
.
prototype
.
constructor
=
SearchPanel
;
SearchPanel
.
prototype
.
constructor
=
SearchPanel
;
SearchPanel
.
prototype
.
_createPanelGui
=
function
()
{
SearchPanel
.
prototype
.
_createPanelGui
=
function
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment