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
ef60cc77
Commit
ef60cc77
authored
Nov 25, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolves #50
parent
dbdcc682
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
app.css
app/app.css
+1
-1
form.html
app/components/crud/templates/form.html
+3
-0
form_service.js
app/zetalib/form_service.js
+6
-3
No files found.
app/app.css
View file @
ef60cc77
...
...
@@ -1636,6 +1636,6 @@ table.dataTable thead .sorting:after {
}
/* end page transitions */
.move
tobottom
{
.move
-to-bottom
,
.move-to-top
{
margin-right
:
10px
!important
;
}
\ No newline at end of file
app/components/crud/templates/form.html
View file @
ef60cc77
<div
class=
"container"
>
<h1>
{{ schema.title }}
</h1>
<div
class=
"buttons-on-top"
></div>
<form
id=
"formgenerated"
name=
"formgenerated"
sf-schema=
"schema"
sf-form=
"form"
sf-model=
"model"
ng-submit=
"onSubmit(formgenerated)"
form-locator
></form>
...
...
@@ -34,4 +36,5 @@
</div>
<div
class=
"buttons-on-bottom"
></div>
</div>
\ No newline at end of file
app/zetalib/form_service.js
View file @
ef60cc77
...
...
@@ -122,10 +122,11 @@ angular.module('formService', [])
if
(
v
.
type
===
'submit'
||
v
.
type
===
'button'
)
{
var
buttonPositions
=
{
bottom
:
'move-to-bottom'
,
top
:
'move-to-top'
,
none
:
''
};
scope
.
form
[
scope
.
form
.
indexOf
(
k
)]
=
{
type
:
v
.
type
,
title
:
v
.
title
,
style
:
"btn-primary
movetobottom hide"
,
style
:
"btn-primary
hide"
+
(
buttonPositions
[
v
.
position
]
||
"move-to-bottom"
)
,
onClick
:
function
()
{
delete
scope
.
form_params
.
cmd
;
delete
scope
.
form_params
.
flow
;
...
...
@@ -144,8 +145,10 @@ angular.module('formService', [])
}
};
$timeout
(
function
()
{
var
buttons
=
angular
.
element
(
document
.
querySelector
(
'.movetobottom'
));
angular
.
element
(
document
.
querySelector
(
'.buttons-on-bottom'
)).
append
(
buttons
);
var
buttonsToBottom
=
angular
.
element
(
document
.
querySelector
(
'.move-to-bottom'
));
angular
.
element
(
document
.
querySelector
(
'.buttons-on-bottom'
)).
append
(
buttonsToBottom
);
var
buttonsToTop
=
angular
.
element
(
document
.
querySelector
(
'.move-to-top'
));
angular
.
element
(
document
.
querySelector
(
'.buttons-on-bottom'
)).
append
(
buttonsToTop
);
buttons
.
removeClass
(
'hide'
);
});
}
...
...
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