<md-dialog aria-label="Selezione conto corrente" style="height:580px;min-height:580px;width:98%" layout="column">
		<md-toolbar class="small-toolbar" layout="row">
		   <div class="md-toolbar-tools small-toolbar">
		     <h3>Destinatari</h3>
		     <span flex></span>
		     <md-button ng-click="stampaDestinatari()" aria-label="Stampa anagrafica destinatari" class="hilight" style="margin-right:24px" layout="row">
		      	<md-icon  md-font-icon="fa-print" class="fa"></md-icon>
		       	Stampa
				<md-tooltip>Stampa anagrafica destinatari</md-tooltip>
		     </md-button>
		     
		     <md-icon ng-click="cancelDialog()" md-font-icon="fa-times" class="fa button-icon" style="color:white">
					<md-tooltip>Chiudi</md-tooltip>
			 </md-icon>
		   </div>
		 </md-toolbar>

	<md-dialog-content style="min-height:390px">
		<div class="md-dialog-content">
			<div layout-gt-md="row" layout="column" layout-padding>
				<div id="destinatari" flex>
					<div layout="row" flex>
			 			<h2>Destinatari</h2>
			 			<md-icon md-font-icon="fa-plus" class="fa button-icon" style="margin-left:48px;text-align:center" ng-click="nuovoDestinatario($event)"></md-icon>
			 			<md-input-container md-theme="toolbar" md-no-float class="md-hue-1" layout="row" layout-align="end center">
							<input type="text" ng-model="filter.filterText" ng-change="getDestinatari()" aria-label="filtro ricerca" class="toolbar-search" ng-model-options="{debounce: 400}" style="min-width:120px">
							<i class="fa fa-search"></i>
						</md-input-container>	   
		 			</div>
				 	<md-list id="list" flex>
				 		<div layout="row" class="md-1-line">
				 			<div flex="100" layout="row" id="header">
								<div style="width:100px">&nbsp;</div>				
					 		 	<md-button ng-click="setDestinatarioOrderField('destinatario')" ng-style="getDestinatarioColumnWidth(0)">
					 				Destinatario
					 				<md-icon md-font-icon="fa fa-sort" class="fa"></md-icon>
				 				</md-button>
						 		<md-button ng-click="setDestinatarioOrderField('codiceFiscale')" ng-style="getDestinatarioColumnWidth(1)">
						 			Codice Fiscale
						 			<i class="fa fa-sort"></i>
					 			</md-button>
				 			</div>
						</div>
				 		
						<div class="virtualRepeatVerticalUsage" id="container"  style="height:200px" ang-style="getListHeight()">
							<md-virtual-repeat-container id="vertical-container" >
							     <div class="md-1-line " md-on-demand md-virtual-repeat="data in infiniteItems" md-item-size="30" style="width:100%" ng-style="ctrl.getGridItemHeight()">
								     <div class="md-1-line hilight"  ng-style="getGridItemHeight()" layout="row" flex				       
								     		ng-class="{'odd-row':$index%2==1,'even-row':$index%2==0, 'selectedRow': selectedIndex===$index}"
								     		 layout-align="center center" 
								     		 >
				
										<div style="width:0" ng-style="getGridItemHeight()"></div>
										<div style="width:58px;vertical-align:middle"  ng-style="getGridItemHeight()"><md-checkbox ng-model="selected[$index]"></md-checkbox></div>
										<div style="width:48px;vertical-align:middle" ng-style="getGridItemHeight()">
											<md-icon md-font-icon="fa-pencil" class="fa button-icon" ng-click="editDestinatario($index, $event)"></md-icon>
										</div>
										<div ng-click="setSelectedDestinatariIndex(data, $index, $event)" layout="row" style="vertical-align:middle" layout-align="start center" ng-style="getGridItemHeight()">
								     		<div ng-style="getDestinatarioColumnWidth(0)"><span >{{data.destinatario}}</span></div>
								     		<div ng-style="getDestinatarioColumnWidth(1)" style="text-align:center"><span >{{data.codiceFiscale}}</span></div>
							     		</div>
										<div style="width:58px;margin-left:24px" ng-style="getGridItemHeight()">
											<md-icon md-font-icon="fa-trash" class="fa button-icon" ng-click="eliminaDestinatario($index, $event)"></md-icon>
										</div>
								     	<div flex></div>
								     	
								     </div>
							     </div>
						     </md-virtual-repeat-container>
					     </div>
				 	</md-list>				
				
				</div>
				<div id="conti" flex>
			 		<div layout="row" flex>
			 			<h2>Conti</h2>
			 			<md-icon md-font-icon="fa-plus" class="fa button-icon" style="margin-left:48px;text-align:center" ng-click="nuovoConto($event)"></md-icon>
		 			</div>
			 		<md-list id="listConti" flex>
			 			<div layout="row" id="headerConti">
<!-- 							<div style="width:px">&nbsp;</div>				 -->
				 		 	<md-button ng-click="setContiOrderField('abi')" ng-style="getContiColumnWidth(0)">
				 				Abi
				 				<md-icon md-font-icon="fa fa-sort" class="fa"></md-icon>
			 				</md-button>
					 		<md-button ng-click="setContiOrderField('cab')" ng-style="getContiColumnWidth(1)">
					 			Cab
					 			<i class="fa fa-sort"></i>
				 			</md-button>
					 		<md-button ng-click="setContiOrderField('conto')" ng-style="getContiColumnWidth(2)">
					 			Conto
					 			<i class="fa fa-sort"></i>
				 			</md-button>
					 		<md-button ng-click="setContiOrderField('contoDefault')" ng-style="getContiColumnWidth(3)">
					 			Default
					 			<i class="fa fa-sort"></i>
				 			</md-button>
					 		<md-button ng-click="setContiOrderField('coordinateIban')" ng-style="getContiColumnWidth(4)">
					 			Coordinate IBAN
					 			<i class="fa fa-sort"></i>
				 			</md-button>
					 		<md-button ng-click="setContiOrderField('codiceBic')" ng-style="getContiColumnWidth(5)">
					 			Codice BIC
					 			<i class="fa fa-sort"></i>
				 			</md-button>
					 		<md-button ng-click="setContiOrderField('intestatarioConto')" ng-style="getContiColumnWidth(6)">
					 			Denominazione banca
					 			<i class="fa fa-sort"></i>
				 			</md-button>
					 		<md-button ng-click="setContiOrderField('cin')" ng-style="getContiColumnWidth(7)">
					 			Cin
					 			<i class="fa fa-sort"></i>
				 			</md-button>
			 			</div>
			 		
					<div class="virtualRepeatVerticalUsage" id="container"  style="height:200px;width:1300px" >
						<md-virtual-repeat-container id="vertical-container" >
						     <div class="md-1-line hilight" md-on-demand md-virtual-repeat="data in contiInfiniteItems">
							     <div class="md-1-line hilight"  ng-style="getGridItemHeight()" layout="row" 				       
							     		ng-class="{'odd-row':$index%2==1,'even-row':$index%2==0, 'selectedRow': selectedIndex===$index}"
							     		 layout-align="start center">
			
<!-- 									<div style="width:0;height:48px"></div> -->
									<div style="width:48px" ng-style="getGridItemHeight()">
										<md-icon md-font-icon="fa-pencil" class="fa button-icon" ng-click="editConto($index, $event)"></md-icon>
									</div>
									<div ng-click="setSelectedContoIndex(data, $index, $event)" layout="row" style="margin-left:12px" layout-align="start center" ng-style="getGridItemHeight()">
								     	<div ng-style="getContiColumnWidth(0)"><span>{{data.abi}}</span></div>
								     	<div ng-style="getContiColumnWidth(1)"><span>{{data.cab}}</span></div>
								     	<div ng-style="getContiColumnWidth(2)"><span>{{data.conto}}</span></div>
								     	<div ng-style="getContiColumnWidth(3)" style="text-align:center"><md-checkbox disabled="disabled" ng-model="data.contoDefault" style="margin-top:8px"></md-checkbox></div>
								     	<div ng-style="getContiColumnWidth(4)"><span>{{data.coordinateIban}}</span></div>
								     	<div ng-style="getContiColumnWidth(5)"><span>{{data.codiceBic}}</span></div>
								     	<div ng-style="getContiColumnWidth(6)"><span>{{data.descrizioneBanca}}</span></div>
								     	<div ng-style="getContiColumnWidth(7)" style="text-align:center"><span>{{data.cin}}</span></div>
							     	</div>
							     	<div style="width:58px" ng-style="getGridItemHeight()">
										<md-icon md-font-icon="fa-trash" class="fa button-icon" ng-click="eliminaConto($index, $event)"></md-icon>
									</div>
							     	<div flex></div>
							     	
							     </div>
						     </div>
					     </md-virtual-repeat-container>
				     </div>
			 	</md-list>						
				
				
				</div>
			
			
			</div>
			

      	</div>			
	</md-dialog-content>
	
	<md-dialog-actions layout="row" >
		<span flex></span>
   		<md-button type="submit" ng-click="cambioSocieta()" aria-label="Chiudi" class="md-raised md-primary" title="Cambio società" >
	       	<md-icon md-font-icon="fa-check" class="fa" aria-label="Cambio società"></md-icon>
    	    Cambio società
      	</md-button>
   		<md-button type="submit" ng-click="cancelDialog()" aria-label="Chiudi" class="md-raised md-warn" title="Chiudi" >
	       	<md-icon md-font-icon="fa-check" class="fa" aria-label="Chiudi"></md-icon>
    	    Chiudi
      	</md-button>
 	</md-dialog-actions>		
  			
</md-dialog>
