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
0116a5db
Commit
0116a5db
authored
Mar 18, 2015
by
Robert Lyon
Committed by
Gerrit Code Review
Mar 18, 2015
Browse files
Merge "Hard-coded lang string in blocktype/annotation Javascript"
parents
85fededf
cba61086
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/annotation/js/annotation.js
→
htdocs/artefact/annotation/
blocktype/annotation/
js/annotation.js
View file @
0116a5db
...
...
@@ -242,7 +242,7 @@ function connectAnnotationFeedbackLinks() {
// Add a 'close' link at the bottom of the list for convenience.
if
(
$j
(
'
#closer_
'
+
blockid
).
length
==
0
)
{
var
closer
=
$j
(
'
<a id="closer_
'
+
blockid
+
'
" href="#" class="close-link">
Close
</a>
'
).
click
(
function
(
e
)
{
var
closer
=
$j
(
'
<a id="closer_
'
+
blockid
+
'
" href="#" class="close-link">
'
+
get_string
(
'
Close
'
)
+
'
</a>
'
).
click
(
function
(
e
)
{
$j
(
this
).
parent
().
toggle
(
400
,
function
()
{
link
.
focus
();
});
...
...
@@ -266,7 +266,3 @@ function connectAnnotationFeedbackLinks() {
}
});
}
addLoadEvent
(
connectAddAnnotationFeedbackForms
);
addLoadEvent
(
connectAnnotationFeedbackLinks
);
htdocs/artefact/annotation/blocktype/annotation/lib.php
View file @
0116a5db
...
...
@@ -137,9 +137,6 @@ class PluginBlocktypeAnnotation extends SystemBlocktype {
$view
=
new
View
(
$viewid
);
list
(
$feedbackcount
,
$annotationfeedback
)
=
ArtefactTypeAnnotationfeedback
::
get_annotation_feedback_for_view
(
$artefact
,
$view
,
$instance
->
get
(
'id'
),
true
,
$editing
);
$smarty
->
assign
(
'annotationfeedback'
,
$annotationfeedback
);
if
(
!
$editing
)
{
$smarty
->
assign
(
'addannotationscript'
,
get_config
(
'wwwroot'
)
.
'artefact/annotation/js/annotation.js'
);
}
}
$smarty
->
assign
(
'text'
,
$text
);
$smarty
->
assign
(
'artefactid'
,
$artefactid
);
...
...
@@ -321,4 +318,19 @@ class PluginBlocktypeAnnotation extends SystemBlocktype {
public
static
function
default_copy_type
()
{
return
'full'
;
}
public
static
function
get_instance_javascript
(
BlockInstance
$bi
)
{
return
array
(
array
(
'file'
=>
'js/annotation.js'
,
'initjs'
=>
'connectAddAnnotationFeedbackForms(); connectAnnotationFeedbackLinks();'
,
)
);
}
public
static
function
jsstrings
()
{
return
array
(
'mahara'
=>
array
(
'Close'
)
);
}
}
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