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
144e6b63
Commit
144e6b63
authored
Jun 22, 2018
by
Cecilia Vela Gurovic
Committed by
Robert Lyon
Aug 07, 2018
Browse files
Bug 1741987: Update jquery - tinymce/imagebrowser
behatnotneeded Change-Id: I0ac194b7d87298f49a0e0b2f926e7312febf17a3
parent
841c042b
Changes
1
Show whitespace changes
Inline
Side-by-side
htdocs/js/tinymce/plugins/imagebrowser/plugin.js
View file @
144e6b63
...
...
@@ -137,7 +137,7 @@ tinymce.PluginManager.add('imagebrowser', function(editor) {
jQuery
(
'
body
'
).
append
(
browser
);
win
=
jQuery
(
'
#imagebrowser
'
);
jQuery
(
formname
).
submit
(
function
(
event
)
{
jQuery
(
formname
).
on
(
'
submit
'
,
function
(
event
)
{
event
.
preventDefault
();
onSubmitForm
();
});
...
...
@@ -148,12 +148,12 @@ tinymce.PluginManager.add('imagebrowser', function(editor) {
});
// Formatting options toggle
jQuery
(
'
#imgbrowserconf_toggleformatting_container
'
).
click
(
function
(
event
)
{
jQuery
(
'
#imgbrowserconf_toggleformatting_container
'
).
on
(
'
click
'
,
function
(
event
)
{
jQuery
(
'
#imgbrowserconf_formattingoptions_container
'
).
toggleClass
(
'
js-hidden
'
);
jQuery
(
'
#formattingoptionstoggle
'
).
toggleClass
(
'
retracted
'
);
});
jQuery
(
formname
+
'
_align,
'
+
formname
+
'
_hspace,
'
+
formname
+
'
_vspace,
'
+
formname
+
'
_border
'
).
change
(
function
()
{
jQuery
(
formname
+
'
_align,
'
+
formname
+
'
_hspace,
'
+
formname
+
'
_vspace,
'
+
formname
+
'
_border
'
).
on
(
'
change
'
,
function
()
{
updateStyle
();
});
...
...
@@ -185,24 +185,24 @@ tinymce.PluginManager.add('imagebrowser', function(editor) {
eval
(
configblock
.
data
.
javascript
);
if
(
deletebutton
.
length
)
{
deletebutton
.
focus
(
);
deletebutton
.
trigger
(
'
focus
'
);
}
// As we have several submit buttons in the form
// Add the attribute clicked=true to the clicked button
// This will help identify which submit button was clicked
jQuery
(
'
form
'
+
formname
+
'
input[type=submit], button[type=submit]
'
).
click
(
function
()
{
jQuery
(
'
form
'
+
formname
+
'
input[type=submit], button[type=submit]
'
).
on
(
'
click
'
,
function
()
{
jQuery
(
"
input[type=submit], button[type=submit]
"
,
jQuery
(
this
).
parents
(
'
form
'
+
formname
)).
removeAttr
(
"
clicked
"
);
// Add the submit button name/value as a hidden field to get this to work in FF
if
(
jQuery
(
'
#edit_file
'
).
length
)
{
jQuery
(
'
#edit_file
'
).
prop
(
'
name
'
,
jQuery
(
this
)
.
context
.
name
).
prop
(
'
value
'
,
jQuery
(
this
)
.
context
.
value
);
jQuery
(
'
#edit_file
'
).
prop
(
'
name
'
,
jQuery
(
this
)
[
0
]
.
name
).
prop
(
'
value
'
,
jQuery
(
this
)
[
0
]
.
value
);
}
else
{
jQuery
(
'
<input>
'
).
attr
({
type
:
'
hidden
'
,
id
:
'
edit_file
'
,
name
:
jQuery
(
this
)
.
context
.
name
,
value
:
jQuery
(
this
)
.
context
.
value
name
:
jQuery
(
this
)
[
0
]
.
name
,
value
:
jQuery
(
this
)
[
0
]
.
value
}).
appendTo
(
jQuery
(
this
).
parents
(
'
form
'
+
formname
));
}
jQuery
(
this
).
attr
(
"
clicked
"
,
"
true
"
);
...
...
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