johnitvn / yii2-ajaxcrud

Gii CRUD template for Single Page Ajax Administration for yii2
100 stars 114 forks source link

I have a problem whit rowOptions and CSS class danger #88

Open gvalmana opened 5 years ago

gvalmana commented 5 years ago

Hello im using de AjaxCrud and im using rowOptions to modify the css of the row based in a model atribute, this is my code

            'rowOptions'=>function($model,$key,$index){
                $dias = floor((time()-strtotime($model->fecha_arribo))/86400);
                if ($dias>=15){
                    return ['class'=>'danger'];
                }                 
                if ($dias>=13 && $dias<15 ){
                    return ['class'=>'warning'];
                }                               
                if ($model->confirmado==1){
                    return ['class'=>'success'];
                }
            },

when i do that the css class danger is not working, is removed, if i use another css class it works, what can be happening? thanks

Er-Kalpesh commented 3 years ago

maybe bootstrap version issue? please can you review it again and please point me a place of the issue exactly?