trac670 trac689 Favorites (duplicate id, background image, JavaScript)

darcs-hash:20081115033549-eefa4-cfbca6f9c723aa63869c39d6851de7a7803f0703.gz
This commit is contained in:
csarven
2008-11-14 22:35:49 -05:00
parent 6a02f5d3c2
commit 322a79739d
11 changed files with 220 additions and 174 deletions

View File

@@ -180,6 +180,9 @@ function common_show_header($pagetitle, $callable=NULL, $data=NULL, $headercall=
common_element('script', array('type' => 'text/javascript',
'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)),
' ');
@@ -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');
}