From: <gem...@li...> - 2013-01-21 14:29:36
|
Revision: 1117 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1117&view=rev Author: matijsdejong Date: 2013-01-21 14:29:29 +0000 (Mon, 21 Jan 2013) Log Message: ----------- Making sure the whole compliance token cell is clickable Modified Paths: -------------- trunk/library/classes/Gems/Default/ComplianceAction.php trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php Modified: trunk/library/classes/Gems/Default/ComplianceAction.php =================================================================== --- trunk/library/classes/Gems/Default/ComplianceAction.php 2013-01-21 13:55:56 UTC (rev 1116) +++ trunk/library/classes/Gems/Default/ComplianceAction.php 2013-01-21 14:29:29 UTC (rev 1117) @@ -136,8 +136,7 @@ $select = $this->db->select(); $select->from('gems__tokens', array( 'gto_id_respondent_track', 'gto_id_round', 'gto_id_token', 'status' => $status, - )) - ->joinInner('gems__reception_codes', 'gto_reception_code = grc_id_reception_code', array()) + ))->joinInner('gems__reception_codes', 'gto_reception_code = grc_id_reception_code', array()) // ->where('grc_success = 1') ->where('gto_id_track = ?', $filter['gr2t_id_track']) ->order('grc_success') Modified: trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php 2013-01-21 13:55:56 UTC (rev 1116) +++ trunk/library/classes/Gems/Snippets/Tracker/Compliance/ComplianceTableSnippet.php 2013-01-21 14:29:29 UTC (rev 1117) @@ -102,23 +102,33 @@ ); $token = 'tok_' . substr($name, 5); + $href = new MUtil_Html_HrefArrayAttribute(array( + $this->request->getControllerKey() => 'track', // This code is only used for tracks :) + $this->request->getActionKey() => 'show', + MUtil_Model::REQUEST_ID => $bridge->$token, + )); + $href->setRouteReset(); + + $onclick = new MUtil_Html_OnClickArrayAttribute(); + $onclick->addUrl($href) + ->addCancelBubble(); + $tds = $bridge->addColumn( array( MUtil_Html_AElement::iflink( $bridge->$token, array( - 'href' => array( - 'controller' => 'track', // This code is only used for tracks :) - 'action' => 'show', - MUtil_Model::REQUEST_ID => $bridge->$token, - ), + $href, 'onclick' => 'event.cancelBubble = true;', 'title' => $title, $bridge->$name, ), - $bridge->$name), - 'class' => array('round', MUtil_Lazy::method($tUtil, 'getStatusClass', $bridge->$name)), - 'title' => $title, + $bridge->$name + ), + 'class' => array('round', MUtil_Lazy::method($tUtil, 'getStatusClass', $bridge->$name)), + 'title' => $title, + // onclick is needed because the link does not fill the whole cell + 'onclick' => MUtil_Lazy::iff($bridge->$token, $onclick), ), array($label, 'title' => $model->get($name, 'description'), 'class' => 'round') ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |