コード例 #1
0
 public function actionLookup()
 {
     $term = $_GET['term'];
     if (isset($_GET['term'])) {
         $users = MetadataRelasi::model()->findAll(array('condition' => 'deskripsi LIKE :deskripsi', 'params' => array(':deskripsi' => "%{$term}%")));
         $return = array();
         $i = 0;
         foreach ($users as $user) {
             $return[$i] = $user->deskripsi;
             $i++;
         }
     }
     echo CJSON::encode($return);
 }
コード例 #2
0
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return MetadataRelasi the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = MetadataRelasi::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
コード例 #3
0
echo CHtml::dropDownList('sumbuX', '', Chtml::listData(MetadataPenelitian::model()->findAllByAttributes(array('flag' => array('1')), 'deskripsi <> \'Tahun Publikasi\''), 'deskripsi', 'deskripsi'), array('ajax' => array('type' => 'POST', 'url' => CController::createUrl('metadataPenelitian/changeDropDown'), 'update' => '#sumbuY', 'data' => array('sumbuX' => 'js:this.value', 'sumbuYselected' => 'js:$(\'#sumbuY\').val()')), 'class' => 'dropdown-style'));
?>
			</div>
			Sumbu Y
			<div class="dropdown">
				<?php 
echo CHtml::dropDownList('sumbuY', '', Chtml::listData(MetadataPenelitian::model()->findAllByAttributes(array('flag' => array('1')), 'deskripsi <> \'Domain Data\''), 'deskripsi', 'deskripsi'), array('ajax' => array('type' => 'POST', 'url' => CController::createUrl('metadataPenelitian/changeDropDown'), 'update' => '#sumbuX', 'data' => array('sumbuY' => 'js:this.value', 'sumbuXselected' => 'js:$(\'#sumbuX\').val()')), 'class' => 'dropdown-style'));
?>
			</div>
			
		</div>
		<div id="relation" class="sub-right-content" data-step="4">
			<div class="sub-heading">Ubah Relasi</div>
			<div class="dropdown">
				<?php 
echo CHtml::dropDownList('edge', '', Chtml::listData(MetadataRelasi::model()->findAll(), 'deskripsi', 'deskripsi'), array('ajax' => array('type' => 'POST', 'url' => CController::createUrl('metadataPenelitian/changeDropDown'), 'update' => '#edge', 'data' => array('edge' => 'js:this.value', 'edgeSelected' => 'js:$(\'#edge\').val()')), 'class' => 'dropdown-style'));
?>
			</div>
		</div>
		
	</div>
	<div class="left-content" style="width:80%">
	<img id="home" src="<?php 
echo Yii::app()->request->baseUrl;
?>
/images/home.png" height="40" style="display:none;float:left;margin-right:10px"></img>
	<div id="sequence" style="display:none;"></div>
	<svg class="chart" id="chart"></svg>
	
	<svg class="svg" id="svg" widht="0" height="500" style="display:none;">