[marginalia] r555 committed - Javascript was commented out on summary page - probably b/c it wasn't ...

1 view
Skip to first unread message

margi...@googlecode.com

unread,
Jun 26, 2012, 2:00:23 AM6/26/12
to marginali...@googlegroups.com
Revision: 555
Author: geof.glass
Date: Mon Jun 25 23:00:07 2012
Log: Javascript was commented out on summary page - probably b/c it
wasn't working.


http://code.google.com/p/marginalia/source/detail?r=555

Modified:
/moodle/trunk/moodle/blocks/marginalia/smartquote.js
/moodle/trunk/moodle/blocks/marginalia/summary.php

=======================================
--- /moodle/trunk/moodle/blocks/marginalia/smartquote.js Wed Jun 20
22:56:48 2012
+++ /moodle/trunk/moodle/blocks/marginalia/smartquote.js Mon Jun 25
23:00:07 2012
@@ -204,8 +204,7 @@
else if ( this.wwwroot && postId )
{
bus.publish( pub );
- window.location = this.wwwroot + '/mod/forum/post.php?reply=' + postId
- + '&message=' + restutil.encodeURIParameter( pub + "<p>&nbsp;");
+ window.location = this.wwwroot + '/mod/forum/post.php?reply=' + postId;

if ( this.extService )
this.extService.createEvent( 'smartquote', 'new post',
quote, 'annotation', annotation.getId() );
=======================================
--- /moodle/trunk/moodle/blocks/marginalia/summary.php Fri Jun 22 12:59:32
2012
+++ /moodle/trunk/moodle/blocks/marginalia/summary.php Mon Jun 25 23:00:07
2012
@@ -179,7 +179,7 @@
if( isloggedin() )
{
$profile->emit_body( );
-/* $sannotationpath = s( ANNOTATION_PATH );
+ $sannotationpath = s( ANNOTATION_PATH );
echo "<script language='JavaScript' type='text/javascript'>\n"
. "var annotationService = new
RestAnnotationService('$sannotationpath/annotate.php', "
. "{ csrfCookie: 'MoodleSession".$CFG->sessioncookie."',
noPutDelete: true } );\n"
@@ -191,7 +191,7 @@
."} );\n"
. "window.preferences = new Preferences( new
RestPreferenceService('$sannotationpath/user-preference.php' ) );\n"
. "</script>\n";
-*/ }
+ }

// Needed later to determine whether a given annotation is a keyword
$keywords = isloggedin() ? annotation_keywords_db::list_keywords(
$USER->id ) : array( );
@@ -404,6 +404,7 @@
$annotation = $annotationa[ $annotationi ];
if ( AN_USESMARTQUOTE )
{
+ // HTML ID of smartquote button
$sqid = s( 'sq'.$annotation->id );
$tuserid = s( $annotation->userid );
echo " addEvent(document.getElementById('$sqid'),'click',function()
{"
@@ -411,6 +412,7 @@
}
if ( isloggedin() && $annotation->userid == $USER->id )
{
+ // HTML ID of delete button
$delid = s( 'del'.$annotation->id );
echo " addEvent(document.getElementById('$delid'),'click',function()
{"
."
window.annotationSummary.deleteAnnotation('$delid',".(int)$annotation->id.");
} );\n";
Reply all
Reply to author
Forward
0 new messages