Advertisement
mogaj

angular-wizard

Jul 16th, 2014
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*jscontroller*/
  2.  
  3.             $scope.selectedRow = function(d) {
  4.                 $("#lead-confirm").dialog({
  5.                     modal: true,
  6.                     title: 'This vehicle is under contract',
  7.                     draggable: true,
  8.                     resizable: false,
  9.                     position: 'center',
  10.                     show: 'blind',
  11.                     hide: 'blind',
  12.                     width: 400,
  13.                     dialogClass: 'ui-dialog-osx',
  14.                     buttons: {
  15.                         "Buy a vehicle?": function() {
  16.                             $scope.lead.procureasset = true;
  17.                             $scope.lead.dirtyvehicle = false;
  18.                             console.log(WizardHandler);
  19.                             WizardHandler.wizard('leadwizard').next();
  20.                             $(this).dialog("close");
  21.                         },
  22.                         "Cancel the contract and assign the vehicle  to new customer": function() {
  23.                             $scope.lead.cancelcontract = true;
  24.                             $scope.lead.dirtyvehicle = false;
  25.                             WizardHandler.wizard().next();
  26.                             $(this).dialog("close");
  27.                         },
  28.                         "Assign the existing vehicle to new customer and buy new for existing contract?": function() {
  29.                             $scope.lead.modifycontract = true;
  30.                             $scope.lead.dirtyvehicle = false;
  31.                             WizardHandler.wizard().next();
  32.                             $(this).dialog("close");
  33.                         },
  34.                         "Choose another vehicle": function() {
  35.                             $scope.lead.dirtyvehicle = true;
  36.                             $(this).dialog("close");
  37.  
  38.                         }
  39.                     }
  40.                 });
  41.             }
  42.  
  43. /*view*
  44. <wz-step title="Vehicle Selection">
  45.                 <div class="uk-panel uk-panel-box uk-panel-header">
  46.                     <h1 class="uk-panel-title">Vehicle Selection</h1>
  47.                     <form class="uk-form uk-form-horizontal" id="lead_three" name="lead_three" novalidate>
  48.                     <div id="assets" ng-grid="assetOptions" class="gridStyle"></div>
  49. <!--                    <div class="selectedItems">{{mySelections}}</div>-->
  50.  
  51.                     <input name="procureasset" value='false' type="hidden" id="procureasset" ng-model="lead.procureasset" class="uk-form-width-medium">
  52.                     <input name="cancelcontract" value='false' type="hidden" id="cancelcontract" ng-model="lead.cancelcontract" class="uk-form-width-medium">
  53.                     <input name="modifycontract" value='false' type="hidden" id="modifycontract" ng-model="lead.modifycontract" class="uk-form-width-medium">
  54.                     <input name="dirtyvehicle" value='false' type="hidden" id="dirtyvehicle" ng-model="lead.dirtyvehicle" class="uk-form-width-medium">
  55.  
  56.                     <button type="submit" ng-click="selectedRow(mySelections)" value="Continue" class="uk-button-primary" ng-disabled="lead_three.$invalid">Continue</button>
  57.                         </form>
  58.                 </div>
  59.             </wz-step>
  60.             <wz-step title="Summary"></wz-step>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement