Commit 4398f17a0decc7657197777b168c66d84a47e3d8
1 parent
83c2698c
Exists in
master
Redmine #4859
Showing
3 changed files
with
19 additions
and
1 deletions
Show diff stats
cit-core/src/main/java/br/com/centralit/framework/util/UtilString.java
1 | 1 | package br.com.centralit.framework.util; |
2 | 2 | |
3 | 3 | import java.io.UnsupportedEncodingException; |
4 | +import java.text.ParseException; | |
5 | + | |
6 | +import javax.swing.text.MaskFormatter; | |
4 | 7 | |
5 | 8 | |
6 | 9 | /** |
... | ... | @@ -209,4 +212,16 @@ public class UtilString { |
209 | 212 | else |
210 | 213 | return str.substring(0, 1).toLowerCase() + str.substring(1); |
211 | 214 | } |
215 | + | |
216 | + public static String formatarString(String texto, String mascara){ | |
217 | + String result = texto; | |
218 | + try { | |
219 | + MaskFormatter mf = new MaskFormatter(mascara); | |
220 | + mf.setValueContainsLiteralCharacters(false); | |
221 | + result = mf.valueToString(texto); | |
222 | + } catch (ParseException e) { | |
223 | + e.printStackTrace(); | |
224 | + } | |
225 | + return result; | |
226 | + } | |
212 | 227 | } | ... | ... |
cit-portal-web/src/main/java/br/com/centralit/listener/StartupListener.java
... | ... | @@ -1466,6 +1466,8 @@ public class StartupListener extends UtilStartup implements ApplicationListener< |
1466 | 1466 | internacionalizacaoList.add(new Internacionalizacao("LABEL.DETALHES_AUDITORIA", "Detalhes Auditoria", dominio, modulo)); |
1467 | 1467 | internacionalizacaoList.add(new Internacionalizacao("LABEL.DOCUMENTOS", "Documentos", dominio, modulo)); |
1468 | 1468 | |
1469 | + internacionalizacaoList.add(new Internacionalizacao("LABEL.CPF_CNPJ", "CPF/CNPJ", dominio, modulo)); | |
1470 | + | |
1469 | 1471 | } |
1470 | 1472 | |
1471 | 1473 | /** | ... | ... |
cit-portal-web/src/main/webapp/assets/js/angular/custom/directive/html/listView.html
... | ... | @@ -29,7 +29,8 @@ |
29 | 29 | <th ng-if="(isCheckBox == undefined || !isCheckBox) && exibirColunaSelecao" class="text-center" style="width: 5%"></th> |
30 | 30 | <th ng-if="exibirExpandir" class="text-center" style="width: 5%"></th> |
31 | 31 | <th class="text-center" ng-repeat="header in headers" style="width: {{header.tamanho ? header.tamanho : divisaoColunas}}%"> |
32 | - <sort-by onsort="onSort" sortdir="filterCriteria.dir" sortedby="filterCriteria.sort" sortvalue="{{ header.value }}">{{ header.title }}</sort-by> | |
32 | + <div ng-if="!header.notSort"><sort-by onsort="onSort" sortdir="filterCriteria.dir" sortedby="filterCriteria.sort" sortvalue="{{ header.value }}">{{ header.title }}</sort-by></div> | |
33 | + <div ng-if="header.notSort">{{ header.title }}</div> | |
33 | 34 | </th> |
34 | 35 | </tr> |
35 | 36 | </thead> | ... | ... |