Problem:
die th-Spalte im DetailView ist per CSS 160px breit, passt nicht so einfach in eine schmale Sidebar
Lösung:
class UserInfo extends CWidget
{
public $user;
public function run()
{
Yii::app()->clientScript->registerCss('sidebar', 'table.sidebar th {width: 100px;}');
$this->widget('zii.widgets.CDetailView', array(
'data' => $this->user,
'htmlOptions' => array('class' => 'detail-view sidebar'),
'attributes' => array(
'firstname',
'lastname'
),
));
}
}
Theme hier runterladen.
Den Ordner redmond nach framework/web/js/source/jui/css kopieren.
Datei jquery-ui-1.8.17.custom.css umbenennen in jquery-ui.css.
Assets-Ordner leeren.
//framework/zii/widgets/jui/CJuiWidget.php
public $theme='redmond';
//view.php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(
'id'=>'mydialog',
// additional javascript options for the dialog plugin
'options'=>array(
'title'=>'Dialog box 1',
'autoOpen'=>false,
),
));
echo 'dialog content here';
$this->endWidget('zii.widgets.jui.CJuiDialog');
// the link that may open the dialog
echo CHtml::link('open dialog', '#', array(
'onclick'=>'$("#mydialog").dialog("open"); return false;',
));
Diagramme erstellen kann man mit der Highcharts-Extension:
Letzte Kommentare