forked from GNUsocial/gnu-social
trac670 trac689 Favorites (duplicate id, background image, JavaScript)
darcs-hash:20081115033549-eefa4-cfbca6f9c723aa63869c39d6851de7a7803f0703.gz
This commit is contained in:
39
lib/util.php
39
lib/util.php
@@ -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');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user