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
9c8adc65
Commit
9c8adc65
authored
5 years ago
by
Benoit Lavenier
Browse files
Options
Downloads
Patches
Plain Diff
[fix] Login: file chooser must be opened by controller, not by HTML element itself - Fix issue
#886
parent
132b4aae
No related branches found
No related tags found
No related merge requests found
Pipeline
#8344
failed
5 years ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
www/js/controllers/login-controllers.js
+11
-1
11 additions, 1 deletion
www/js/controllers/login-controllers.js
www/templates/login/form_file_import.html
+1
-2
1 addition, 2 deletions
www/templates/login/form_file_import.html
with
12 additions
and
3 deletions
www/js/controllers/login-controllers.js
+
11
−
1
View file @
9c8adc65
...
@@ -43,7 +43,7 @@ function LoginController($scope, $timeout, $controller, csWallet) {
...
@@ -43,7 +43,7 @@ function LoginController($scope, $timeout, $controller, csWallet) {
}
}
function
LoginModalController
(
$scope
,
$timeout
,
$q
,
$ionicPopover
,
CryptoUtils
,
csCrypto
,
ionicReady
,
function
LoginModalController
(
$scope
,
$timeout
,
$q
,
$ionicPopover
,
$document
,
CryptoUtils
,
csCrypto
,
ionicReady
,
UIUtils
,
BMA
,
Modals
,
csSettings
,
Device
,
parameters
)
{
UIUtils
,
BMA
,
Modals
,
csSettings
,
Device
,
parameters
)
{
'
ngInject
'
;
'
ngInject
'
;
...
@@ -544,6 +544,16 @@ function LoginModalController($scope, $timeout, $q, $ionicPopover, CryptoUtils,
...
@@ -544,6 +544,16 @@ function LoginModalController($scope, $timeout, $q, $ionicPopover, CryptoUtils,
});
});
};
};
/**
* On the file chooser
*/
$scope
.
openFileChooser
=
function
()
{
var
elements
=
angular
.
element
(
document
.
getElementById
(
'
loginImportFile
'
));
if
(
elements
&&
elements
.
length
)
{
elements
[
0
].
click
();
}
}
/**
/**
* On file drop
* On file drop
*/
*/
...
...
This diff is collapsed.
Click to expand it.
www/templates/login/form_file_import.html
+
1
−
2
View file @
9c8adc65
...
@@ -8,8 +8,7 @@
...
@@ -8,8 +8,7 @@
</div>
</div>
<div
dropzone=
"onKeyFileDrop(file)"
>
<div
dropzone=
"onKeyFileDrop(file)"
>
<div
ng-if=
"!formData.file"
<div
ng-if=
"!formData.file"
ng-click=
"openFileChooser()"
>
onclick=
"angular.element(document.querySelector('#loginImportFile'))[0].click();"
>
<h2
class=
"gray"
translate
>
COMMON.CHOOSE_FILE
</h2>
<h2
class=
"gray"
translate
>
COMMON.CHOOSE_FILE
</h2>
<input
type=
"file"
id=
"loginImportFile"
accept=
".dunikey,.yml"
<input
type=
"file"
id=
"loginImportFile"
accept=
".dunikey,.yml"
style=
"visibility:hidden; position:absolute;"
style=
"visibility:hidden; position:absolute;"
...
...
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