From: Evan Prodromou Date: Thu, 15 Jan 2009 20:54:03 +0000 (+0000) Subject: Merge ../csarven into uiredesign X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7233e89be621c2b9ad80b8a7eb2bc16185596cca;p=quix0rs-gnu-social.git Merge ../csarven into uiredesign Conflicts: lib/action.php --- 7233e89be621c2b9ad80b8a7eb2bc16185596cca diff --cc lib/disfavorform.php index 25f99f43c1,25f99f43c1..ffca0cd8bf --- a/lib/disfavorform.php +++ b/lib/disfavorform.php @@@ -127,4 -127,4 +127,16 @@@ class DisfavorForm extends For $this->out->submit('disfavor-submit-' . $this->notice->id, _('Disfavor favorite')); } ++ ++ /** ++ * Class of the form. ++ * ++ * @return string the form's class ++ */ ++ ++ function formClass() ++ { ++ return 'disfavor'; ++ } ++ } diff --cc lib/favorform.php index c67e186974,c67e186974..4f4fd72a9d --- a/lib/favorform.php +++ b/lib/favorform.php @@@ -127,4 -127,4 +127,15 @@@ class FavorForm extends For $this->out->submit('favor-submit-' . $this->notice->id, _('Make a favorite')); } ++ ++ /** ++ * Class of the form. ++ * ++ * @return string the form's class ++ */ ++ ++ function formClass() ++ { ++ return 'favor'; ++ } } diff --cc lib/form.php index 5c75bb65fa,5c75bb65fa..bd68fb0c5f --- a/lib/form.php +++ b/lib/form.php @@@ -65,6 -65,6 +65,7 @@@ class Form extends Widge { $this->out->elementStart('form', array('id' => $this->id(), ++ 'class' => $this->formClass(), 'method' => 'POST', 'action' => $this->action())); $this->out->elementStart('fieldset'); @@@ -153,4 -153,4 +154,15 @@@ function action() { } ++ ++ /** ++ * Class of the form. ++ * ++ * @return string the form's class ++ */ ++ ++ function formClass() ++ { ++ return 'form'; ++ } } diff --cc lib/noticelist.php index fb3e66f9fb,fb3e66f9fb..0fc6d513f4 --- a/lib/noticelist.php +++ b/lib/noticelist.php @@@ -229,9 -229,9 +229,11 @@@ class NoticeListItem extends Widge $user = common_current_user(); if ($user) { if ($user->hasFave($this->notice)) { -- common_disfavor_form($this->notice); ++ $disfavor = new DisfavorForm($this->out, $this->notice); ++ $disfavor->show(); } else { -- common_favor_form($this->notice); ++ $favor = new FavorForm($this->out, $this->notice); ++ $favor->show(); } } }