diff options
author | csarven <csarven@controlyourself.ca> | 2008-11-14 22:35:49 -0500 |
---|---|---|
committer | csarven <csarven@controlyourself.ca> | 2008-11-14 22:35:49 -0500 |
commit | 322a79739dbee9f5a9bb4e012cd75a3d034a8bad (patch) | |
tree | 67f0eb5589f27d5a7c0af607028e0f55b630e9b1 /lib/util.php | |
parent | 6a02f5d3c2b2ffc93619a0e7c6e07ecc05be9909 (diff) |
trac670 trac689 Favorites (duplicate id, background image, JavaScript)
darcs-hash:20081115033549-eefa4-cfbca6f9c723aa63869c39d6851de7a7803f0703.gz
Diffstat (limited to 'lib/util.php')
-rw-r--r-- | lib/util.php | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/lib/util.php b/lib/util.php index cfc95cc36..e958a87ba 100644 --- a/lib/util.php +++ b/lib/util.php @@ -181,6 +181,9 @@ function common_show_header($pagetitle, $callable=NULL, $data=NULL, $headercall= 'src' => common_path('js/jquery.form.js')), ' '); common_element('script', array('type' => 'text/javascript', + 'src' => common_path('js/xbImportNode.js')), + ' '); + common_element('script', array('type' => 'text/javascript', 'src' => common_path('js/util.js?version='.LACONICA_VERSION)), ' '); common_element('link', array('rel' => 'search', 'type' => 'application/opensearchdescription+xml', @@ -1809,13 +1812,25 @@ function common_disfavor_form($notice) { 'method' => 'post', 'class' => 'disfavor', 'action' => common_local_url('disfavor'))); - common_hidden('token', common_session_token()); - common_hidden('notice', $notice->id); + + common_element('input', array('type' => 'hidden', + 'name' => 'token-'. $notice->id, + 'id' => 'token-'. $notice->id, + 'class' => 'token', + 'value' => common_session_token())); + + common_element('input', array('type' => 'hidden', + 'name' => 'notice', + 'id' => 'notice-n'. $notice->id, + 'class' => 'notice', + 'value' => $notice->id)); + common_element('input', array('type' => 'submit', 'id' => 'disfavor-submit-' . $notice->id, 'name' => 'disfavor-submit-' . $notice->id, 'class' => 'disfavor', - 'value' => '♥')); + 'value' => 'Disfavor favorite', + 'title' => 'Remove this message from favorites')); common_element_end('form'); } @@ -1824,13 +1839,25 @@ function common_favor_form($notice) { 'method' => 'post', 'class' => 'favor', 'action' => common_local_url('favor'))); - common_hidden('token', common_session_token()); - common_hidden('notice', $notice->id); + + common_element('input', array('type' => 'hidden', + 'name' => 'token-'. $notice->id, + 'id' => 'token-'. $notice->id, + 'class' => 'token', + 'value' => common_session_token())); + + common_element('input', array('type' => 'hidden', + 'name' => 'notice', + 'id' => 'notice-n'. $notice->id, + 'class' => 'notice', + 'value' => $notice->id)); + common_element('input', array('type' => 'submit', 'id' => 'favor-submit-' . $notice->id, 'name' => 'favor-submit-' . $notice->id, 'class' => 'favor', - 'value' => '♡')); + 'value' => 'Add to favorites', + 'title' => 'Add this message to favorites')); common_element_end('form'); } |