Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Luciano Barletta
/
mini-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 2f588b4f
authored
2019-11-22 11:42:10 -0300
by
Georgina Mondino
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'Geo' of
http://git.anacsoft.com/Lusho/mini-web
into Geo
2 parents
6d66d30a
c5247537
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
Scripts/construct.js
Scripts/construct.js
View file @
2f588b4
...
...
@@ -2,22 +2,26 @@
* Armado de formulario
*/
function
removeField
(
b
){
let
div
=
b
.
parentElement
;
let
tab
=
div
.
parentElement
;
tab
.
removeChild
(
div
);
while
(
b
.
getAttribute
(
"name"
)
==
"Field"
)
b
=
b
.
parentElement
;
if
(
b
.
nodeElement
==
"body"
)
return
;
b
.
parentElement
.
removeChild
(
b
);
}
function
addField
(
b
){
let
newfield
=
document
.
createElement
(
"div"
);
newfield
.
setAttribute
(
"name"
,
"Field"
);
newfield
.
innerHTML
=
document
.
getElementById
(
"fieldTemplate"
).
innerHTML
;
b
.
parentElement
.
appendChild
(
newfield
);
let
tab
=
b
.
parentElement
;
// swap
tab
.
removeChild
(
b
);
tab
.
appendChild
(
newfield
);
tab
.
appendChild
(
b
);
}
function
removeTab
(
b
){
let
div
=
b
.
parentElement
;
let
tab
=
div
.
parentElement
;
tab
.
removeChild
(
div
);
while
(
b
.
getAttribute
(
"name"
)
==
"Tab"
)
b
=
b
.
parentElement
;
if
(
b
.
nodeElement
==
"body"
)
return
;
b
.
parentElement
.
removeChild
(
b
);
}
function
addTab
(
t
){
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment