Changeset 972
- Timestamp:
- 08/20/08 06:29:48 (3 months ago)
- Files:
-
- trunk/Dug/Template_Snippets.txt (modified) (2 diffs)
- trunk/Dug/plugins/Dug/lib/Dug/App.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Dug/Template_Snippets.txt
r867 r972 1 1 Add the following template snippet to entry's metadata section to show the number of votes and clickable link. 2 2 3 <a href="javascript:void(0)" onclick="dug('<$MTEntryID$>');">((<span id="dug_count "><$MTDugCount$></span>))</a>3 <a href="javascript:void(0)" onclick="dug('<$MTEntryID$>');">((<span id="dug_count_<$MTEntryID$>"><$MTDugCount$></span>))</a> 4 4 5 5 Also add the following template snippet to the <head> section of Entry archive template. … … 22 22 xh.send(null); 23 23 } 24 function dug_response(count ) {25 var el = document.getElementById('dug_count ');24 function dug_response(count,entry_id) { 25 var el = document.getElementById('dug_count_' + entry_id); 26 26 if (el) el.innerHTML = count; 27 27 } trunk/Dug/plugins/Dug/lib/Dug/App.pm
r867 r972 28 28 $app->{no_print_body} = 1; 29 29 require JSON; 30 $app->print("dug_response($count );");30 $app->print("dug_response($count,$entry_id);"); 31 31 return undef; 32 32 }
