Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
bda8ec8c
Commit
bda8ec8c
authored
Oct 09, 2017
by
Cecilia Vela Gurovic
Browse files
Bug 1722120: Fix layout form init actions
behatnotneeded Change-Id: I9167c5f87354337f86d45db6faa33b7df01f6b42
parent
f641864c
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/js/customlayout.js
View file @
bda8ec8c
...
...
@@ -185,31 +185,13 @@
}(
window
.
CustomLayoutManager
=
window
.
CustomLayoutManager
||
{},
jQuery
));
function
init
(
pieformname
)
{
$
(
'
#
'
+
pieformname
+
'
_basic_container legend a, #
'
+
pieformname
+
'
_adv_container legend a
'
).
click
(
function
(
event
)
{
var
containerclicked
=
$
(
$
(
this
).
context
).
attr
(
'
aria-controls
'
);
var
basiccollapse
=
advancedcollapse
=
customcollapse
=
'
hide
'
;
if
(
containerclicked
==
'
#
'
+
pieformname
+
'
_layoutselect_container
'
)
{
basiccollapse
=
'
toggle
'
;
}
else
if
(
containerclicked
==
'
#
'
+
pieformname
+
'
_advancedlayoutselect_container
'
)
{
advancedcollapse
=
'
toggle
'
;
}
else
if
(
containerclicked
==
'
#
'
+
pieformname
+
'
_createcustomlayout_container
'
)
{
customcollapse
=
'
toggle
'
;
}
$
(
'
#
'
+
pieformname
+
'
_layoutselect_container
'
).
collapse
(
basiccollapse
);
$
(
'
#
'
+
pieformname
+
'
_advancedlayoutselect_container
'
).
collapse
(
advancedcollapse
);
$
(
'
#
'
+
pieformname
+
'
_createcustomlayout_container
'
).
collapse
(
customcollapse
);
$
(
'
#
'
+
pieformname
+
'
_basic_container legend a,
'
+
'
#
'
+
pieformname
+
'
_layout_container legend a,
'
+
'
#
'
+
pieformname
+
'
_skin_container legend a
'
).
click
(
function
(
event
)
{
var
layoutselected
=
$
(
'
#
'
+
pieformname
+
'
_currentlayoutselect
'
).
val
();
var
layoutfallback
=
$
(
'
#
'
+
pieformname
+
'
_layoutfallback
'
).
val
();
if
(
$
(
'
.layoutselect :radio[value=
'
+
layoutselected
+
'
]
'
).
length
)
{
$
(
'
.layoutselect :radio[value=
'
+
layoutselected
+
'
]
'
).
attr
(
"
checked
"
,
"
checked
"
);
}
else
{
$
(
'
.layoutselect :radio[value=
'
+
layoutfallback
+
'
]
'
).
attr
(
"
checked
"
,
"
checked
"
);
$
(
'
#
'
+
pieformname
+
'
_currentlayoutselect
'
).
val
(
layoutfallback
);
}
if
(
$
(
'
.advancedlayoutselect :radio[value=
'
+
layoutselected
+
'
]
'
).
length
)
{
$
(
'
.advancedlayoutselect :radio[value=
'
+
layoutselected
+
'
]
'
).
attr
(
"
checked
"
,
"
checked
"
);
}
...
...
Cecilia Vela Gurovic
@ceciliavg
mentioned in commit
c575aa29
·
Oct 10, 2017
mentioned in commit
c575aa29
mentioned in commit c575aa295a3aa78f5d44f61533f0155be2c58e7b
Toggle commit list
Write
Preview
Supports
Markdown
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