-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTeste.html
68 lines (53 loc) · 2.1 KB
/
Teste.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<html>
<script type='text/javascript' src="rendering.desktop.production.js"></script>
<script type='text/javascript' src="jquery.mask.js"></script>
<script type='text/javascript'>
var objBz = {
properties: {
value: "",
Mask: "000.000.000-00",
displayName: "CPF",
editable:true,
},
getControl: function(){},
getGenericControl: function () {
//standard initialization
var self = this;
var control = self.getControl();
var properties = self.properties;
var extendedData = self.extendedData;
var editableInput = self.properties.editable === undefined ? true : Boolean(self.properties.editable);
var bindedXpathValue = properties.value || "";
var mascara = properties.Mask || "000.000.000-00";
self.myinput = $("<div width='100%'/>");
self.myinput.addClass("W008_mainDiv");
var toL = $("<div><b>" + properties.displayName + "</b></div>");
toL.addClass("W008_fromDiv");
var SpanResult = $("<input type='text' id='masktextfld' name='field-name' data-mask='"+ mascara +"' />");
if(!editableInput)
{
SpanResult = $("<input readOnly='readOnly'/>");
}
SpanResult.addClass("W008_spanResultClass");
//setTimeout( function(){ $("#masktextfld").mask(mascara, { reverse: true }); } ,1000);
SpanResult.mask(mascara);
SpanResult.val(bindedXpathValue);
self.myinput.myinitial = SpanResult;
self.myinput.myresult = SpanResult;
SpanResult.appendTo(toL);
toL.appendTo(self.myinput);
self.myinput.addClass("MaskTextBox_MainDivClass");
return self.myinput;
}
};
function addGraph()
{
$('#chart_div').append(objBz.getGenericControl());
}
</script>
<body>
<input id="jdata" />
<button onclick="addGraph()">Monta input</button>
<div id='chart_div' class='minhaDIV'></div>
</body>
</html>