Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plugins bot
moodle-plugins-snapshots
Commits
b040b523
Commit
b040b523
authored
Jan 30, 2017
by
Dan Poltawski
Browse files
Merge branch 'MDL-35978-master' of
https://github.com/snake/moodle
parents
9e3df32f
af65270e
Changes
2
Hide whitespace changes
Inline
Side-by-side
comment/comment.js
View file @
b040b523
...
...
@@ -57,6 +57,12 @@ M.core_comment = {
this
.
view
(
0
);
return
false
;
},
this
);
// Also handle space/enter key.
handle
.
on
(
'
key
'
,
function
(
e
)
{
e
.
preventDefault
();
this
.
view
(
0
);
return
false
;
},
'
13,32
'
,
this
);
}
scope
.
toggle_textarea
(
false
);
},
...
...
@@ -335,6 +341,7 @@ M.core_comment = {
);
},
view
:
function
(
page
)
{
var
commenttoggler
=
Y
.
one
(
'
#comment-link-
'
+
this
.
client_id
);
var
container
=
Y
.
one
(
'
#comment-ctrl-
'
+
this
.
client_id
);
var
ta
=
Y
.
one
(
'
#dlg-content-
'
+
this
.
client_id
);
var
img
=
Y
.
one
(
'
#comment-img-
'
+
this
.
client_id
);
...
...
@@ -351,6 +358,7 @@ M.core_comment = {
if
(
img
)
{
img
.
set
(
'
src
'
,
M
.
util
.
image_url
(
'
t/expanded
'
,
'
core
'
));
}
commenttoggler
.
setAttribute
(
'
aria-expanded
'
,
'
true
'
);
}
else
{
// hide
container
.
setStyle
(
'
display
'
,
'
none
'
);
...
...
@@ -364,6 +372,7 @@ M.core_comment = {
if
(
ta
)
{
ta
.
set
(
'
value
'
,
''
);
}
commenttoggler
.
setAttribute
(
'
aria-expanded
'
,
'
false
'
);
}
if
(
ta
)
{
//toggle_textarea.apply(ta, [false]);
...
...
comment/lib.php
View file @
b040b523
...
...
@@ -460,7 +460,13 @@ class comment {
}
else
{
$collapsedimage
=
't/collapsed'
;
}
$html
.
=
html_writer
::
start_tag
(
'a'
,
array
(
'class'
=>
'comment-link'
,
'id'
=>
'comment-link-'
.
$this
->
cid
,
'href'
=>
'#'
));
$html
.
=
html_writer
::
start_tag
(
'a'
,
array
(
'class'
=>
'comment-link'
,
'id'
=>
'comment-link-'
.
$this
->
cid
,
'href'
=>
'#'
,
'role'
=>
'button'
,
'aria-expanded'
=>
'false'
)
);
$html
.
=
html_writer
::
empty_tag
(
'img'
,
array
(
'id'
=>
'comment-img-'
.
$this
->
cid
,
'src'
=>
$OUTPUT
->
pix_url
(
$collapsedimage
),
'alt'
=>
$this
->
linktext
,
'title'
=>
$this
->
linktext
));
$html
.
=
html_writer
::
tag
(
'span'
,
$this
->
linktext
.
' '
.
$countstring
,
array
(
'id'
=>
'comment-link-text-'
.
$this
->
cid
));
$html
.
=
html_writer
::
end_tag
(
'a'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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