Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Cesium
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
clients
Cesium-grp
Cesium
Commits
d3cbf7de
Commit
d3cbf7de
authored
7 years ago
by
Benoit Lavenier
Browse files
Options
Downloads
Patches
Plain Diff
[fix] Join: fix error on swiper initailization
parent
3fc8d5c5
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
www/js/controllers/join-controllers.js
+25
-25
25 additions, 25 deletions
www/js/controllers/join-controllers.js
with
25 additions
and
25 deletions
www/js/controllers/join-controllers.js
+
25
−
25
View file @
d3cbf7de
...
...
@@ -59,6 +59,11 @@ function JoinChooseAccountTypeModalController($scope, $timeout, UIUtils, csCurre
};
$scope
.
$on
(
'
modal.shown
'
,
$scope
.
load
);
$scope
.
$on
(
"
$ionicSlides.sliderInitialized
"
,
function
(
event
,
data
){
// Disable swipe
data
.
slider
.
lockSwipes
();
});
$scope
.
slidePrev
=
function
()
{
$scope
.
slides
.
slider
.
unlockSwipes
();
$scope
.
slides
.
slider
.
slidePrev
();
...
...
@@ -107,7 +112,7 @@ function JoinModalController($scope, $state, $interval, $timeout, UIUtils, Crypt
$scope
.
loading
=
true
;
$scope
.
isLicenseRead
=
false
;
$scope
.
isLicenseRead
=
false
;
$scope
.
showUsername
=
false
;
$scope
.
showPassword
=
false
;
$scope
.
formData
.
computing
=
false
;
...
...
@@ -123,7 +128,7 @@ function JoinModalController($scope, $state, $interval, $timeout, UIUtils, Crypt
$scope
.
licenseFileUrl
=
csSettings
.
getLicenseUrl
();
$
timeout
(
$scope
.
l
istenLicense
Read
,
3000
);
$
scope
.
startL
istenLicense
Bottom
(
);
$scope
.
slideBehavior
=
$scope
.
computeSlideBehavior
();
...
...
@@ -132,6 +137,11 @@ function JoinModalController($scope, $state, $interval, $timeout, UIUtils, Crypt
};
$scope
.
$on
(
'
modal.shown
'
,
$scope
.
load
);
$scope
.
$on
(
"
$ionicSlides.sliderInitialized
"
,
function
(
event
,
data
){
// Disable swipe
data
.
slider
.
lockSwipes
();
});
$scope
.
slidePrev
=
function
()
{
$scope
.
slides
.
slider
.
unlockSwipes
();
$scope
.
slides
.
slider
.
slidePrev
();
...
...
@@ -344,35 +354,25 @@ function JoinModalController($scope, $state, $interval, $timeout, UIUtils, Crypt
Modals
.
showHelp
({
anchor
:
helpAnchor
});
};
$scope
.
i
sLicense
On
Bottom
=
function
(){
$scope
.
s
tartListen
LicenseBottom
=
function
(){
var
iframeEl
=
angular
.
element
(
document
.
querySelector
(
'
.modal #iframe-license
'
));
iframeEl
=
iframeEl
&&
iframeEl
.
length
?
iframeEl
[
0
]
:
undefined
;
if
(
!
iframeEl
)
return
false
;
var
yPos
=
iframeEl
.
contentWindow
.
document
.
body
.
scrollTop
;
var
scrollHeight
=
iframeEl
.
contentWindow
.
document
.
body
.
scrollHeight
;
var
clientHeight
=
iframeEl
.
contentWindow
.
document
.
body
.
clientHeight
;
if
(
scrollHeight
-
clientHeight
===
yPos
){
return
true
;
if
(
!
iframeEl
)
{
console
.
debug
(
'
[join] Waiting license frame to be load...
'
);
return
$timeout
(
$scope
.
startListenLicenseBottom
,
1000
);
}
return
false
;
};
$scope
.
listenLicenseRead
=
function
(){
var
disableSwipe
=
false
;
$scope
.
licenseReadInterval
=
$interval
(
function
(){
// Disable swipe (only once)
if
(
!
disableSwipe
){
$scope
.
slides
.
slider
.
lockSwipes
();
disableSwipe
=
true
;
}
if
(
$scope
.
isLicenseOnBottom
()){
$scope
.
licenseBottomInterval
=
$interval
(
function
(){
var
yPos
=
iframeEl
.
contentWindow
.
document
.
body
.
scrollTop
;
var
scrollHeight
=
iframeEl
.
contentWindow
.
document
.
body
.
scrollHeight
;
var
clientHeight
=
iframeEl
.
contentWindow
.
document
.
body
.
clientHeight
;
var
isBottom
=
(
scrollHeight
-
clientHeight
===
yPos
);
if
(
isBottom
){
$scope
.
isLicenseRead
=
true
;
$interval
.
cancel
(
$scope
.
licenseReadInterval
);
$interval
.
cancel
(
$scope
.
licenseBottomInterval
);
delete
$scope
.
licenseBottomInterval
;
}
},
1000
);
},
1000
);
};
$scope
.
checkUid
=
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