#V. 1.0
//DESCRIZIONE DEI POSSIBILI ATTRIBUTI NEI CAMBI

1. PER TUTTI GLI ATTRIBUTI LA CLASSE STANDARD E’
class="form-control input-sm"
per input ridotti
input-sm-40
input-sm-50
input-sm-60
########################################################################################################
2. PER LE DATE LA CLASSE STANDARD E’
class="form-control input-sm 	" 
########################################################################################################

3. PER LE COMBO BOX LA CLASSE STANDARD E’
"form-control input-sm select2" 
<select  class="form-control select2" style="width: 100%;" name="id_userProfile"  >
                      <ab:optionvec  boundcolumn="id_userProfile" desccolumn="descrizione" vectumerator="listaProfiliUtente" value="<%=bean.getId_userProfile()%>">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</ab:optionvec>
                    </select>

########################################################################################################
4. PER I NUMERI LA CLASSE STANDARD E’
"form-control input-sm numberinput"

########################################################################################################
5. PER LE ORE LA CLASSE STANDARD E’
class="form-control input-sm timemask" 


########################################################################################################
6. POSSIBILI ATTRIBUTI AGGIUNTIVI SUI CAMPI

6.1 FOCUS ALL’APERTURA DELLA PAGINA
defaultFocus="focus"

6.2 FORZATURA NEXT FIELD SUL CAMPO
nextFocus="NOMEDELCAMPOSUCCESSIVO"

6.3 SE SELEZIONO IL CAMBIO CON IL MOUSE VOGLIO CHE SELEZIONI TUTTO
autofocus

6.4. SUBMIT SU INVIO: attributo submit sui campi fa la searching sulla cr, la save sul dettaglio

########################################################################################################
7.RICERCA DINAMICA TRAMITE AJAX. CLASSICO FOMRMATO DEL CAMPO DI RICERCA

<div class="col-lg-6">
                  <label for="txtRicerca">Cliente:</label>
                  <input readonly name="id_cliente" type="hidden"  value="<%= bean.getId_cliente() %>" />
                  <div class="input-group input-group-sm">
                    <input name="descrizioneCliente" type="text" class="form-control input-sm ajSearchText mandatory"  id="descrizioneCliente" value="<ab:inputTextFormat><%= bean.getCliente().getNominativo()%></ab:inputTextFormat>" maxlength="60"  <%=Ab.jsAjSearchText4("/admin/anag/Cliente.abl?txtRicerca=","descrizioneCliente","listaClienti","main.id_cliente,main.descrizioneCliente",0,"oggetto")%> />
                    <span class="input-group-addon "><a href="javascript:Ab.clrField('main','id_cliente','descrizioneCliente');"><i class="fa fa-refresh fa-sm" title="pulisci campi"></i> </a>&nbsp;&nbsp;<a href="javascript:modificaCliente();"><i class="fa fa-edit fa-sm" title="modifica cliente"></i> </a>&nbsp;&nbsp;<a href="javascript:nuovoCliente();"><i class="fa fa-file-o fa-sm" title="nuovo cliente"></i> </a></span> </div>
                  <%=Ab.divAjSearchDiv4("listaClienti")%> </div>



########################################################################################################
7.1 RICERCA DINAMICA TRAMITE AJAX CON TAGLIB
 <div class="col-lg-6 col-xs-6">
                     <label><%=bean.getTipoDocumento().getClienteFornitore()%>:</label>
                    <br>
                    <ab:inputajax bean="bean" boundcolumn="id_clifor" resultboundcolumn="id_clifor" action='<%="/admin/anag/Clifor.abl?flgCF="+bean.getTipoDocumento().getFlgClienteFornitore()+"&searchTxt="%>' 
   nchar="0" returndata="indirizzoClifor,id_tipoPagamento,banca,iban,,,,telDocumento,cellDocumento,eMailDocumento,,,id_tipoPagamento"  nextacion="applicaListino()"
   usesubmit="false" usemono="false" javascriptmodify="modificaCliente()" javascriptnew="nuovoCliente()">
                      <div class="input-group input-group-sm">
                        <input name="nominativoDocumento" type="text" class="form-control input-sm ajSearchText"  id="nominativoDocumento" value="<ab:inputTextFormat><%= bean.getNominativoDocumento()%></ab:inputTextFormat>"  />
                       </div>
                    </ab:inputajax>
                  </div>


########################################################################################################
8. chekboxes. dopo il click 

viene lenciata anche una funzione PER COMPATIBILITA'... DA TOGLIERE
postClickICheckCR oppure
postClickICheck(nomeflg non ck)
a seconda della maschera di ricerca o dettaglio
ADESSO VIENE CHIAMATA LA onChange() del campo hidden corrispondente (senza ck iniziale)


il campo è il seguente
per ogni campo c'è un input hidden con il metodo onchange (eventualmente) e il campo checkbox classe minimal

  <input type="checkbox" class="minimal" readonly <%= bean.getFlgBordero()==1?"checked":""%> name="ckflgBordero" id="ckflgBordero" ">
<input name="flgBordero" type="hidden" id="flgBordero" value="<%= bean.getFlgBordero()%>" onChange="borderoClick()>


########################################################################################################
9. optionflg
<select name="flgMovimento" id="flgMovimento"  onChange="searching()" class="form-control select2">  
   <ab:optionflg  boundcolumn="flgMovimento" valuelist="-1,0,1,2,3,4,5,10,15,20,21,30"> </ab:optionflg>
 </select>
 
########################################################################################################
 10. TEXT AREA
 <textarea class="form-control  input-sm" name="nota"  rows="4" id="nota"><%= bean.getNota() %></textarea>
 
 10.1 editor html summernote (ma funziona male!!!!)
   <textarea class="summernote" name="help"   id="help"><%= bean.getHelp() %></textarea>
   ##versione completa
     <textarea class="summernote" name="testo_<%=bean.getCurrentLang()%>"   
     id="testo_<%=bean.getCurrentLang()%>"><ab:inputTextFormat><%= bean.getDescTxtLangScript("testo",bean.getCurrentLang()) %></ab:inputTextFormat></textarea>
     
aggiungere su documentready(caso con div, non con textarea)
function documentReadyScript()
{
	
	$('.summernote').summernote({
	  height: 300,                 // set editor height
  minHeight: null,             // set minimum height of editor
  maxHeight: null,             // set maximum height of editor
  focus: true                  // set focus to editable area after initializing summernote
	});
	
	
}

10.2 editor html ckeditor. SEMPLICEMENTE AGGIUNGERE LA CLASSE ckeditor
<textarea class="ckeditor" name="sommario_<%=bean.getCurrentLang()%>" 
id="sommario_<%=bean.getCurrentLang()%>"><ab:inputTextFormat><%= bean.getDescTxtLang("sommario",bean.getCurrentLang()) %></ab:inputTextFormat>
</textarea>



### DOCUMENT READY PER CONFIGURARE LA TOOLBAR ##
function documentReadyScript()
{
	 CKEDITOR.editorConfig = function( config ) {
	config.toolbarGroups = [
		{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
		{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
		{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing' ] },
		{ name: 'forms', groups: [ 'forms' ] },
		{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
		'/',
		{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi', 'paragraph' ] },
		{ name: 'links', groups: [ 'links' ] },
		{ name: 'insert', groups: [ 'insert' ] },
		'/',
		{ name: 'styles', groups: [ 'styles' ] },
		{ name: 'colors', groups: [ 'colors' ] },
		{ name: 'tools', groups: [ 'tools' ] },
		{ name: 'others', groups: [ 'others' ] },
		{ name: 'about', groups: [ 'about' ] }
	];

	config.removeButtons = 'Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,About,Templates,Save,NewPage,Preview,Print';
};
	
}
 
########################################################################################################
 11. tabelle che si riformattano se ristrette
   <div class="box-body" id="no-more-tables"> 
              <table class="table table-bordered table-hover table-striped dataTable table-condensed">
                <thead>
                  <tr>
                    <th  rowspan="2">&nbsp;</th>
                    <th  rowspan="2">Chiave</th>
                    <th  rowspan="2">Descrizione</th>
                    <th colspan="3">Case Attributi (solo stringhe)</th>
                  </tr>
                  <tr>
                    <th >MAIUSCOLE</th>
                    <th  >minuscole</th>
                    <th >Prima Maiuscola</th>
                  </tr>
                </thead>
                <ab:whilevec rowbeanclass="com.ablia.anag.Clifor" vectumerator="list">
                  <tr>
                    <td class="comandi text-center"><div class="inline text-center hidden-print"> <a href="javascript:modifyCommand('<%=rowBean.getId_clifor()%>');"><i class="fa fa-edit" title="Modifica Record"></i></a> <a href="javascript:deleteCommandCR('<%=rowBean.getId_clifor()%>','<%= rowBean.getLastUpdTmstString() %>');"><i class="fa fa-trash-o" title="Cancella Record"></i></a> </div></td>
                    <td data-title="Nominativo">
                    	<ab:if wherecondition="<%=!rowBean.isOk()%>"><span class="red"><i class="fa fa-exclamation-triangle" title="<%=rowBean.getKoMsg()%>"></i></span></ab:if><%= rowBean.getDescrizioneCompleta() %>
                    </td>
                    <td data-title="Indirizzo"><%= rowBean.getIndirizzoCompleto() %></td>
                    
                    .....
########################################################################################################
12. tabelle semplicemente responsive
  <div class="box-body table-responsive">         
                 <table class="table table-bordered table-hover table-striped dataTable table-condensed">
                 
                 ecc. ecc.
                 
                 
                 
########################################################################################################
13. TEBELLE SECONDARIE:
13.1  GESTIONE TABS SULLA PRIMARY DETAIL
 			<div class="row tabs">
                <div class="col-lg-12"> 
                  <!-- Custom Tabs -->
                  <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs" id="tabs">
                      <li class="active"><a href="#DESC" data-toggle="tab">Descrizione</a></li>
                      <li><a href="#IMG" data-toggle="tab">Immag.</a></li>
                      <li><a href="#ALL" data-toggle="tab">Allegati</a></li>
                      
                    </ul>
                    <div class="tab-content">
                      <div class="tab-pane active" id="DESC">
                        <jsp:include page="_inc_articolo_descrizione.jsp" flush="true" />
                      </div>
                      <div class="tab-pane" id="IMG">
                        <jsp:include page="_inc_articolo_immagine.jsp" flush="true" />
                      </div>
                      <div class="tab-pane" id="ALL">
                        <jsp:include page="_inc_articolo_allegato.jsp" flush="true" />
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              
13.2 FILE INCLUDE TEMPLATE
            ----------------------------------
            
            
            <%@ taglib uri="/WEB-INF/ablia.tld" prefix="ab" %>
<%@ page language="java" import="com.ablia.jsp.*" %>
<%-- DICHIARAZIONE BEAN --%>
<jsp:useBean id="nf" scope="request" type="java.text.NumberFormat" >
</jsp:useBean>
<jsp:useBean id="df" class="com.ablia.util.SimpleDateFormat" scope="request" type="com.ablia.util.SimpleDateFormat" >
</jsp:useBean>
<jsp:useBean id="bean" class="com.ablia.art.Articolo" type="com.ablia.art.Articolo" scope="request" >
</jsp:useBean>
<jsp:useBean id="beanRIV" scope="request" class="com.ablia.art.Rivalutazione" type="com.ablia.art.Rivalutazione" >
</jsp:useBean>
<%-- FINE DICHIARAZIONE BEAN --%>

<input name="id_allegatoArticolo" type="hidden" id="id_allegato">
<ab:if wherecondition="<%=bean.getDBState()==0%>">
  <h1>Salvare prima i dati di testata</h1>
</ab:if>
<ab:else>
  <div class="row">
    <div class="col-lg-3">
      <label>Nome File Allegato:</label>
      <br>
      <div class="loadFile">
        <label>
        <input name="btn-upload_file_1" type="file" id="btn-upload_file_1" size="40" maxlength="200" onChange="Ab.saveFile(0,1)">
        <input type="hidden" id="fileNameOnServer_1" name="fileNameOnServer_1">
        <div id="uploadFileRes_1">CARICA IL FILE</div>
      </div>
    </div>
    <div class="col-lg-3">
      <label>Tipo Allegato:</label>
      <br>
      <select name="id_tipoAllegatoArticolo" id="id_tipoAllegatoArticolo" class="form-control input-sm select2">
        <ab:optionvec  boundcolumn="id_tipoAllegatoArticolo" desccolumn="descrizione" vectumerator="listaTipiAllegatoArticolo" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</ab:optionvec>
      </select>
    </div>
    <div class="col-lg-5">&nbsp;</div>
    <div class="col-lg-1">
      <label for="txtRicerca"> &nbsp; </label>
      <br>
      <a href="javascript:addAllegato();"><i class="fa fa-plus fa-2x" aria-hidden="true"></i></a> </div>
  </div>
  <div class="row">
    <div class="col-lg-12">
      <table class="table table-striped" style="border: 1px solid #ededed;">
        <tr>
          <th width="6%">&nbsp;</th>
          <th>Tipo</th>
          <th>Nome Attach</th>
        </tr>
        <ab:whilevec  rowbeanclass="com.ablia.art.AllegatoArticolo"  vectumerator="listaAllegati">
          <tr>
            <td><a href="javascript:delAllegato(<%=rowBean.getId_allegatoArticolo()%>)"><i class="fa fa-trash-o" title="Cancella Record"></i></a></td>
            <td><%=rowBean.getTipoAllegatoArticolo().getDescrizione()%></td>
            <td><a href="../../_attach/_art/<%=rowBean.getNomeFileSuDisco()%>?id=<%=rowBean.getId_allegatoArticolo()%>" target="_blank"><%=rowBean.getNomeFile()%></a></td>
          </tr>
        </ab:whilevec>
      </table>
    </div>
  </div>
</ab:else>
                   
            ----------------------------------      
            
14. colonna con + elementi
 <div class="col-lg-3 col-inline">
    <div class="col-lg-12"> 
    <label for="descrizione">Comune:</label>
    </div>
    <input type="hidden" id="id_comuneDD" readonly class="input-group input-group-sm" name="id_comuneDD" maxlength="" value="<%=destinazioneDiversa.getId_comuneDD()%>">
   <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 col-left">  <input name="codiceDD" readonly type="text" id="codiceDD" class="form-control input-sm" size="4" value="<%=destinazioneDiversa.getComuneDD().getCodice()%>"  >
   </div>
     <div class="col-lg-9 col-md-9 col-sm-9 col-xs-9 col-right"> 
    <div class="input-group input-group-sm">
      <input class="form-control input-sm ajSearchText" name="descrizioneComuneDD" id="descrizioneComuneDD" type="text" value="<%=destinazioneDiversa.getDescrizioneComuneDD()%>" maxlength="30" <%=Ab.jsAjSearchText4("/admin/anagConfig/Comune.abl?searchTxt=","descrizioneComuneDD","listaComuneDD","main.id_comuneDD,main.codiceDD,main.descrizioneComuneDD,main.capDD",3,"capZonaDD")%>>
      <span class="input-group-addon "><a href="javascript:Ab.clrField('main','id_comuneDD','codiceDD','comuneDescrizioneDD','capDD');"><i class="fa fa-refresh fa-sm"></i> </a></span> </div>
    <%=Ab.divAjSearchDiv4("listaComuneDD")%> </div></div>
    
    
    15. altro modo ad esempio con data
     <div class="input-group">
      <input type="text" class="form-control  input-sm datemask" id="dataScadenzaDocumento" name="dataScadenzaDocumento"  maxlength="10" value="<%= df.format(bean.getDataScadenzaDocumento()) %>" >
      <div class="input-group-addon"> <i class="fa fa-calendar"></i> </div>
    </div>