Skip to content

Commit

Permalink
Dev: survey massive actions in footer
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed May 23, 2016
1 parent 14fafab commit 45296af
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
10 changes: 6 additions & 4 deletions application/views/admin/survey/listSurveys_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
<!-- Search Box -->
<div class="row">

<div class="col-sm-4 pull-left" id="surveyListActions">
<div class="col-sm-4 pull-left dropup" id="surveyListActions">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<?php eT('With selected survey:');?>
<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="surveyListActions" style="left: 15px;">
<ul class="dropdown-menu" aria-labelledby="surveyListActions">
<li>
<a href="#"
data-url="<?php echo App()->createUrl('/admin/survey/sa/deleteMultipleSurveys/');?>"
Expand Down Expand Up @@ -203,15 +203,17 @@
'name' => 'actions',
'value'=>'$data->buttons',
'type'=>'raw',
'htmlOptions' => array('class' => ''),
'htmlOptions' => array('class' => 'text-right'),
),

),

'htmlOptions'=>array('style'=>'cursor: pointer;', 'class'=>'hoverAction'),
'selectionChanged'=>"function(id){window.location='" . Yii::app()->urlManager->createUrl('admin/survey/sa/view/surveyid' ) . '/' . "' + $.fn.yiiGridView.getSelection(id.split(',', 1));}",
'ajaxUpdate' => true,
'afterAjaxUpdate' => 'doToolTip'
'afterAjaxUpdate' => 'doToolTip',
'template' => "{items}\n<div class=\"row-fluid\"><div class=\"col-sm-4\" id=\"massive-action-container\"></div><div class=\"col-sm-4 pager-container \">{pager}</div><div class=\"col-sm-4 summary-container\">{summary}</div></div>",
// public $template = "{items}\n<div class=\"row-fluid\"><div class=\"col-sm-4\"></div><div class=\"col-sm-4\">{pager}</div><div class=\"col-sm-4\">{summary}</div></div>";
));
?>
</div>
Expand Down
2 changes: 2 additions & 0 deletions scripts/admin/admin_core.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ $(document).ready(function(){
$elSurveyActions = $('#surveyListActions'); // The action select element
$surveyActions = $('#surveyListActions a'); // The actions in it

$elSurveyActions.appendTo($('#massive-action-container'));

// Define what should be done when clicking on a action link
$surveyActions.each(function(){
$(this).on('click', function(){
Expand Down
12 changes: 12 additions & 0 deletions styles/Sea_Green/css/lime-admin-common.css
Original file line number Diff line number Diff line change
Expand Up @@ -1885,3 +1885,15 @@ h3,.h3 {
.statisticstable {
word-wrap: break-word;
}

.summary-container, .summary, #massive-action-container, #surveyListActions {
margin: 20px 0;
}
.summary-container{
text-align: right;
}

#massive-action-container, #surveyListActions{
padding-left: 0px;
text-align: left;
}

0 comments on commit 45296af

Please sign in to comment.