Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
ulakbus-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ulakbus
ulakbus-ui
Commits
0b5c536d
Commit
0b5c536d
authored
Jan 27, 2016
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ADD fixes GH-70 focus to first input with validation error
parent
d4607e1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
form_service.js
app/zetalib/form_service.js
+10
-1
No files found.
app/zetalib/form_service.js
View file @
0b5c536d
...
@@ -294,6 +294,12 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
...
@@ -294,6 +294,12 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
if
(
scope
[
workOnForm
].
$valid
)
{
if
(
scope
[
workOnForm
].
$valid
)
{
generator
.
submit
(
scope
,
redirectTo
);
generator
.
submit
(
scope
,
redirectTo
);
scope
.
$broadcast
(
'disposeModal'
);
scope
.
$broadcast
(
'disposeModal'
);
}
else
{
// focus to first input with validation error
$timeout
(
function
()
{
var
firsterror
=
angular
.
element
(
document
.
querySelectorAll
(
'input.ng-invalid'
))[
0
]
firsterror
.
focus
();
});
}
}
}
}
}
}
...
@@ -1016,7 +1022,10 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
...
@@ -1016,7 +1022,10 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
"query": $scope.form_params.query
"query": $scope.form_params.query
};
};
* ```
* ```
* ### Special response object process
*
* Special response object process
* -------------------------------
*
* - If response object is a downloadable pdf file, checking from headers `headers('content-type') ===
* - If response object is a downloadable pdf file, checking from headers `headers('content-type') ===
* "application/pdf"` download using Blob object.
* "application/pdf"` download using Blob object.
*
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment