Skip to content

Commit

Permalink
Dev: Tweaking jqgrid css
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Feb 17, 2016
1 parent 9b78692 commit 5ce0122
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 88 deletions.
21 changes: 18 additions & 3 deletions application/controllers/admin/responses.php
Expand Up @@ -46,6 +46,13 @@ function __construct($controller, $id)
Yii::app()->loadHelper('surveytranslator');
}

/**
* Used to get responses data for browse etc
*
* @param mixed $params ?
* @return array
* @todo Don't use extract
*/
private function _getData($params)
{
if (is_numeric($params))
Expand Down Expand Up @@ -105,6 +112,9 @@ private function _getData($params)
return $aData;
}

/**
* @todo View what?
*/
public function view($iSurveyID, $iId, $sBrowseLang = '')
{
if(Permission::model()->hasSurveyPermission($iSurveyID,'responses','read'))
Expand Down Expand Up @@ -337,9 +347,13 @@ public function index($iSurveyID)
$this->_renderWrappedTemplate('',$aViewUrls, $aData);
}



function browse($iSurveyId)
/**
* Show responses for survey using jQgrid
*
* @param int $iSurveyId
* @return void
*/
public function browse($iSurveyId)
{

if(!Permission::model()->hasSurveyPermission($iSurveyId,'responses','read'))
Expand All @@ -354,6 +368,7 @@ function browse($iSurveyId)
App()->getClientScript()->registerPackage('jqgrid');

App()->getClientScript()->registerScriptFile( App()->getAssetManager()->publish( ADMIN_SCRIPT_PATH . "listresponse.js" ));
App()->getClientScript()->registerCssFile(Yii::app()->getConfig('adminstyleurl') . "css/jqgrid.css" );

$aData = $this->_getData($iSurveyId);
$bHaveToken=$aData['surveyinfo']['anonymized'] == "N" && tableExists('tokens_' . $iSurveyId) && Permission::model()->hasSurveyPermission($iSurveyId,'tokens','read');// Boolean : show (or not) the token
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/admin/tokens.php
Expand Up @@ -284,8 +284,8 @@ function browse($iSurveyId, $limit = 50, $start = 0, $order = false, $searchstri
App()->getClientScript()->registerPackage('jqgrid');
App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('adminscripts') . "tokens.js");
// CSS

App()->getClientScript()->registerCssFile(Yii::app()->getConfig('adminstyleurl') . "jquery-ui/jquery-timepicker.css");
App()->getClientScript()->registerCssFile(Yii::app()->getConfig('adminstyleurl') . "css/jqgrid.css" );

Yii::app()->loadHelper('surveytranslator');
Yii::import('application.libraries.Date_Time_Converter', true);
Expand Down
87 changes: 4 additions & 83 deletions styles/Sea_Green/css/jqgrid.css
@@ -1,3 +1,7 @@
/**
* This is a stripped-down version of ui.jqgrid.css in third_part/jqgrid/css
*/

.ui-jqgrid {
position: relative
}
Expand Down Expand Up @@ -36,10 +40,6 @@
margin: 1px
}

.ui-jqgrid .ui-jqgrid-titlebar-close:hover {
padding: 0
}

.ui-jqgrid .ui-jqgrid-hdiv {
position: relative;
margin: 0;
Expand Down Expand Up @@ -293,22 +293,6 @@ tr.ui-search-toolbar select {
border-left-style: solid
}

.ui-jqgrid .ui-jqgrid-pager {
border-left: 0 none!important;
border-right: 0 none!important;
border-bottom: 0 none!important;
margin: 0!important;
padding: 0!important;
position: relative;
height: 25px;
white-space: nowrap;
overflow: hidden;
}

.ui-jqgrid .ui-pager-control {
position: relative
}

.ui-jqgrid .ui-pg-table {
position: relative;
padding-bottom: 2px;
Expand All @@ -319,7 +303,6 @@ tr.ui-search-toolbar select {
.ui-jqgrid .ui-pg-table td {
font-weight: normal;
vertical-align: middle;
padding: 1px
}

.ui-jqgrid .ui-pg-button {
Expand All @@ -332,14 +315,6 @@ tr.ui-search-toolbar select {
float: left
}

.ui-jqgrid .ui-pg-button:hover {
padding: 0
}

.ui-jqgrid .ui-state-disabled:hover {
padding: 1px
}

.ui-jqgrid .ui-pg-input {
height: 13px;
margin: 0
Expand Down Expand Up @@ -367,21 +342,6 @@ tr.ui-search-toolbar select {
margin-right: 4px
}

.ui-jqgrid .ui-jqgrid-pager .ui-pg-div {
padding: 1px 0;
float: left;
position: relative
}

.ui-jqgrid .ui-jqgrid-pager .ui-pg-button {
cursor: pointer
}

.ui-jqgrid .ui-jqgrid-pager .ui-pg-div span.ui-icon {
float: left;
margin: 0 2px
}

.ui-jqgrid td input,
.ui-jqgrid td select .ui-jqgrid td textarea {
margin: 0
Expand All @@ -392,33 +352,6 @@ tr.ui-search-toolbar select {
height: auto
}

.ui-jqgrid .ui-jqgrid-toppager {
border-left: 0 none!important;
border-right: 0 none!important;
border-top: 0 none!important;
margin: 0!important;
padding: 0!important;
position: relative;
height: 25px!important;
white-space: nowrap;
overflow: hidden
}

.ui-jqgrid .ui-jqgrid-toppager .ui-pg-div {
padding: 1px 0;
float: left;
position: relative
}

.ui-jqgrid .ui-jqgrid-toppager .ui-pg-button {
cursor: pointer
}

.ui-jqgrid .ui-jqgrid-toppager .ui-pg-div span.ui-icon {
float: left;
margin: 0 2px
}

.ui-jqgrid .ui-jqgrid-btable .ui-sgcollapsed span {
display: block
}
Expand Down Expand Up @@ -526,11 +459,6 @@ tr.ui-search-toolbar select {
margin: 1px
}

.ui-jqdialog .ui-jqdialog-titlebar-close:hover,
.ui-jqdialog .ui-jqdialog-titlebar-close:focus {
padding: 0
}

.ui-jqdialog-content,
.ui-jqdialog .ui-jqdialog-content {
border: 0;
Expand Down Expand Up @@ -672,13 +600,6 @@ div.ui-jqgrid .selected-row td {
border-left: 0 none
}

.ui-inline-del.ui-state-hover span,
.ui-inline-edit.ui-state-hover span,
.ui-inline-save.ui-state-hover span,
.ui-inline-cancel.ui-state-hover span {
margin: -1px
}

.ui-jqgrid .tree-wrap {
float: left;
position: relative;
Expand Down
3 changes: 2 additions & 1 deletion styles/Sea_Green/css/lime-admin.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5ce0122

Please sign in to comment.