This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var clickedsectionelement; | |
function noteDamage(el) | |
{ | |
var data = $('#damage-form').serializeArray(); | |
data = data.concat({'name':'vehicletypedamageareaid', 'value':el.vehicletypedamageareaid}, | |
{'name':'vehicleid', 'value':<?= $vehicleid?>}); | |
<?php echo CHtml::ajax(array( | |
'url'=>array('vehicle/DamageForm'), | |
'data'=> "js:data", | |
'type'=>'post', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<pre class='xdebug-var-dump' dir='ltr'> | |
<b>array</b> <i>(size=3)</i> | |
'VehicleDamageMap' <font color='#888a85'>=></font> | |
<b>array</b> <i>(size=10)</i> | |
'damage_dent' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'1'</font> <i>(length=1)</i> | |
'damage_signsofspray' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'1'</font> <i>(length=1)</i> | |
'damage_scratch' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'0'</font> <i>(length=1)</i> | |
'damage_rust' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'0'</font> <i>(length=1)</i> | |
'damage_chip' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'0'</font> <i>(length=1)</i> | |
'damage_prev_repairs_noted' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'0'</font> <i>(length=1)</i> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myvar; | |
function doDamage(element) | |
{ | |
console.log("TYPE:"+typeof element); | |
myvar = element; | |
vehicletypesideareaid = myvar.vehicletypesideareaid; | |
var url = '<?php echo Yii::app()->createUrl("vehicle/DamageForm"); ?>' + '&vehicleid=<?php echo $vehicleid?>&vehicletypesideareaid='+vehicletypesideareaid; | |
<?php echo CHtml::ajax(array( | |
'url'=>'js:url', | |
'data'=> "js:$(this).serialize()", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function actionDamageForm($vehicleid,$vehicletypesideareaid) { | |
$model= VehicleDamageMap::model()->find('vehicleid = :vehicleid and vehicletypedamageareaid = :vehicletypedamageareaid', | |
array('vehicleid'=>$vehicleid,'vehicletypedamageareaid'=>$vehicletypesideareaid) | |
); | |
if(count($model) == 0) { | |
$model= new VehicleDamageMap; | |
} | |
if(isset($_POST['VehicleDamageMap'])) { | |
$_POST['VehicleDamageMap']['datecreated'] = new CDbExpression('NOW()'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$criteria->select = 'concat("'.mysql_real_escape_string($V[0]).'|", make) as v, make as d'; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$user=$this->loadModel($id); - Gets this Fine | |
$userperson = $user->person; - Gets this Fine | |
$personcontactmap = $userperson->personcontactmaps; - Gets this Fine | |
$contact = $personcontactmap->contact; - Fails to get this data even though there is a contactid.... | |
var_dump($contact); | |
exit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!empty($_POST)) { | |
$datenow = new CDbExpression('NOW()'); | |
$systemaccountmodel->attributes=array('datecreated'=>$datenow,'createdbyuserid'=>0); | |
$systemaccountmodel->save(); | |
$systemaccountid = Yii::app()->db->getLastInsertId(); | |
$_POST["Person"][1]['systemaccountid'] = $systemaccountid; | |
$_POST["Person"][1]['datecreated'] = $datenow; | |
$_POST["Person"][1]['createdbyuserid'] = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{#linkTo catalogue.item item} | |
App.Router.map(function() { | |
this.resource('catalogue', function() { | |
this.route('index'); | |
this.route('search', { path: ':searchvalue' }); | |
this.route('item', {path: '/view/:itemguid'}); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Catalogue | |
// catalogue: Em.Route.extend({ | |
// route: '/catalogue', | |
// index: Ember.Route.extend({ | |
// route: '/', | |
// connectOutlets: function (router,searchvalue) { | |
// router.get('applicationController').connectOutlet('catalogue'); | |
// router.get('catalogueController').connectOutlet('cataloguelist','cataloguelist'); | |
// router.get('catalogueController').connectOutlet('cataloguegroupfilter','cataloguegroups'); | |
// router.get('catalogueController').connectOutlet('catalogueattributefilter','catalogueattributes'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This isnt going to /search/all/ | |
this.get("target").transitionTo("search.searchcontent",{filter: filter, searchvalue: searchstring}); | |
this.resource('search', function() { | |
this.resource('searchcontent', { path: ':filter/:searchvalue' }); | |
}); | |
//ERROR |
NewerOlder