Esempio n. 1
0
 /**
  * Updates a particular model.
  * If update is successful, the browser will be redirected to the 'view' page.
  * @param integer $id the ID of the model to be updated
  */
 public function actionUpdate($id)
 {
     $model = $this->loadModel($id);
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['Job'])) {
         $model->attributes = $_POST['Job'];
         if ($model->save()) {
             EQuickDlgs::checkDialogJsScript();
             $this->redirect(array('index', 'id' => $model->id));
         }
     }
     EQuickDlgs::render('update', array('model' => $model));
 }
Esempio n. 2
0
 /**
  * Render the code for the update-CJuidialog
  * Modify or copy the ext.config.juimodal.php to change the look and feel of the CJuiDialog
  */
 protected function renderUpdateDialogWidget()
 {
     $widgetAttributes = EQuickDlgs::getDialogWidgetAttributes($this->updateDialog, $this->viewDialogConfig);
     $widgetAttributes['id'] = $this->getDialogWidgetId('update');
     $widgetAttributes['controllerRoute'] = $this->getUpdateControllerRoute('view');
     $widgetAttributes['actionParams'] = array();
     //reset for the widget: was used to create the button url;
     $widgetAttributes['renderOpenButton'] = false;
     $widgetAttributes['url'] = null;
     EQuickDlgs::renderDialogWidget($widgetAttributes, EQuickDlgs::TYPEIFRAME);
 }
Esempio n. 3
0
$this->breadcrumbs = array('Registered Jobs');
$this->menu = array(array('label' => 'List Scheduled Jobs', 'url' => array('scheduledJob/index')));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('job-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<h1>Manage Jobs</h1>

<p>
You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
</p>

<?php 
echo CHtml::link('Advanced Search', '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->


<div class="right">
<?php 
EQuickDlgs::iframeButton(array('controllerRoute' => 'create', 'dialogTitle' => 'Create item', 'dialogWidth' => 580, 'dialogHeight' => 275, 'openButtonText' => 'Register New Job', 'closeButtonText' => 'Close', 'closeOnAction' => true, 'refreshGridId' => 'job-grid'));
?>
</div>

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'job-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('name', 'action', array('class' => 'EJuiDlgsColumn', 'updateDialog' => array('dialogWidth' => 580, 'dialogHeight' => 250), 'viewDialog' => array('dialogWidth' => 580, 'dialogHeight' => 250)))));