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
70c4e1cd
Commit
70c4e1cd
authored
6 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
loading of google maps API is done only once
parent
3711a148
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend-js/src/main/js/minerva.js
+1
-7
1 addition, 7 deletions
frontend-js/src/main/js/minerva.js
with
1 addition
and
7 deletions
frontend-js/src/main/js/minerva.js
+
1
−
7
View file @
70c4e1cd
...
@@ -305,8 +305,6 @@ function create(params) {
...
@@ -305,8 +305,6 @@ function create(params) {
return
ServerConnector
.
getConfiguration
();
return
ServerConnector
.
getConfiguration
();
}).
then
(
function
(
configuration
)
{
}).
then
(
function
(
configuration
)
{
params
.
setConfiguration
(
configuration
);
params
.
setConfiguration
(
configuration
);
return
functions
.
loadScript
(
"
https://maps.google.com/maps/api/js?libraries=drawing&v=3.26&key=
"
+
configuration
.
getOption
(
ConfigurationType
.
GOOGLE_MAPS_API_KEY
));
}).
then
(
function
()
{
return
getProject
(
params
);
return
getProject
(
params
);
}).
then
(
function
(
project
)
{
}).
then
(
function
(
project
)
{
if
(
project
===
null
)
{
if
(
project
===
null
)
{
...
@@ -317,7 +315,7 @@ function create(params) {
...
@@ -317,7 +315,7 @@ function create(params) {
params
.
setProject
(
project
);
params
.
setProject
(
project
);
var
promise
=
Promise
.
resolve
();
var
promise
=
Promise
.
resolve
();
if
(
params
.
getProject
().
getMapCanvasType
()
===
"
GOOGLE_MAPS_API
"
)
{
if
(
params
.
getProject
().
getMapCanvasType
()
===
"
GOOGLE_MAPS_API
"
)
{
promise
=
functions
.
loadScript
(
"
https://maps.google.com/maps/api/js?libraries=drawing
"
);
promise
=
functions
.
loadScript
(
"
https://maps.google.com/maps/api/js?libraries=drawing
&key=
"
+
params
.
getConfiguration
().
getOption
(
ConfigurationType
.
GOOGLE_MAPS_API_KEY
)
);
}
}
return
promise
;
return
promise
;
}).
then
(
function
(){
}).
then
(
function
(){
...
@@ -605,8 +603,6 @@ function createExport(params) {
...
@@ -605,8 +603,6 @@ function createExport(params) {
// make sure that we are logged in
// make sure that we are logged in
return
ServerConnector
.
getConfiguration
().
then
(
function
(
configuration
)
{
return
ServerConnector
.
getConfiguration
().
then
(
function
(
configuration
)
{
params
.
setConfiguration
(
configuration
);
params
.
setConfiguration
(
configuration
);
return
functions
.
loadScript
(
"
https://maps.google.com/maps/api/js?libraries=drawing&v=3.26&key=
"
+
configuration
.
getOption
(
ConfigurationType
.
GOOGLE_MAPS_API_KEY
));
}).
then
(
function
()
{
return
getProject
(
params
);
return
getProject
(
params
);
}).
then
(
function
(
project
)
{
}).
then
(
function
(
project
)
{
params
.
setProject
(
project
);
params
.
setProject
(
project
);
...
@@ -637,8 +633,6 @@ function createAdmin(params) {
...
@@ -637,8 +633,6 @@ function createAdmin(params) {
return
ServerConnector
.
getConfiguration
();
return
ServerConnector
.
getConfiguration
();
}).
then
(
function
(
configuration
)
{
}).
then
(
function
(
configuration
)
{
params
.
setConfiguration
(
configuration
);
params
.
setConfiguration
(
configuration
);
return
functions
.
loadScript
(
"
https://maps.google.com/maps/api/js?libraries=drawing&v=3.26&key=
"
+
configuration
.
getOption
(
ConfigurationType
.
GOOGLE_MAPS_API_KEY
));
}).
then
(
function
()
{
result
=
new
Admin
(
params
);
result
=
new
Admin
(
params
);
return
createFooter
();
return
createFooter
();
}).
then
(
function
(
footer
)
{
}).
then
(
function
(
footer
)
{
...
...
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