<md-toolbar layout="row" class="md-toolbar-tools md-whiteframe-4dp small-toolbar" >
	<span flex></span>
   	<h5>Tabella gestione firme distinte</h5>
    <span flex></span>
    <md-button ng-click="ctrl.nuovaFirma($event)" aria-label="Inserisci funzione" class="hilight" style="margin-left:8px" layout="row">
		<md-icon  md-font-icon="fa-plus" class="fa"></md-icon>
	    Nuova
		<md-tooltip>Inserisci firma</md-tooltip>
	</md-button>
    
 </md-toolbar>
 
 <div layout="row" flex="100" style="width:100%">
	<md-list id="list" flex>
 		<md-subheader layout="row">
 			<div flex="100" layout="row" id="header">
				<div style="width:20px">&nbsp;</div>				
	 		 	<div ng-style="ctrl.getColumnWidth(0)">
	 				Tipologia
 				</div>
		 		<div ng-style="ctrl.getColumnWidth(1)">
		 			Prefisso flusso in ingresso
	 			</div>
	 			<div ng-style="ctrl.getColumnWidth(2)" style="text-align:center">
		 			Richiede firmatario
	 			</div>
				<div ng-style="ctrl.getColumnWidth(3)">
		 			Descrizione
	 			</div>	 		
	 			<div style="width:48px">&nbsp;</div>	
 			</div>
		</md-subheader>
 		
		<div class="virtualRepeatVerticalUsage" id="container" ng-style="ctrl.getListHeight()" ang-style="ctrl.getMaxListWidth()">
			<md-virtual-repeat-container id="vertical-container" ng-style="ctrl.getMaxListWidth()">
			     <div class="md-1-line hilight" md-on-demand md-virtual-repeat="data in ctrl.infiniteItems" md-item-size="30" ng-style="ctrl.getMaxListWidth()">
				     <div class="md-1-line" style="padding-left:42px" ng-style="ctrl.getGridItemHeight()" layout="row" ng-class="{'odd-row':$index%2==1,'even-row':$index%2==0, 'selectedRow': ctrl.selectedIndex===$index}"
				     		 layout-align="start center">
				     	<div flex layout="row" layout-align="start center" ng-click="ctrl.editFirma($index, $event)" ng-style="ctrl.getGridItemHeight()">
	 	 					<div style="width:0" ng-style="ctrl.getGridItemHeight()"></div>
				     		<div ng-style="ctrl.getColumnWidth(0)"><span >{{ctrl.decodeTipologia(data.tipologia)}}</span></div>
				     		<div ng-style="ctrl.getColumnWidth(1)"><span>{{data.prefissoFlussoInput}}</span></div>
				     		<div ng-style="ctrl.getColumnWidth(2)" style="min-height:35px;height:35px;padding:0!important;text-align:center"><md-checkbox ng-style="ctrl.getGridItemHeight()" ng-model="data.attivaRequiresFirmatario" disabled="disabled" style="margin-top:4px;padding:0!important"></md-checkbox></div>
				     		<div ng-style="ctrl.getColumnWidth(3)"><span>{{data.descrizione}}</span></div>
				     		<div style="width:48px">
			     				<i class="fa fa-trash icon-button" ng-click="ctrl.cancellaFirma($index,$event)"></i>
				     		</div>
			     		</div>
				     </div>
			     </div>
		     </md-virtual-repeat-container>
	     </div>
			 	
 	</md-list> 
 </div>				     		 	 			