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
| <script type="text/javascript">
var nSrcLine = 0;
function addSearchLine(formLine)
{
var tab = dijit.byId(formLine);
if (!tab)
{
tab = new dojox.layout.TableContainer({
cols: 3,
id: formLine
},
dojo.byId("searchDocsBar"));
}
nSrcLine++;
var num = nSrcLine;
var objSel = new dijit.form.FilteringSelect({id: 'selFld'+num,
name: 'selFld'+num,
store: storeFlds, // Store rempli ultérieurement
autoComplete: true,
searchAttr: "name"});
tab.addChild(objSel);
var objSel = new dijit.form.TextBox({id: 'srchFld'+num,
name: 'srchFld'+num});
tab.addChild(objSel);
var objSel = new dijit.form.TextBox({id: 'typFld'+num,
name: 'typFld'+num,
disabled: 'true',
style: 'width: 50px !important'});
tab.addChild(objSel);
var objSel = new dijit.form.TextBox({id: 'srchFld2'+num,
name: 'srchFld2'+num});
tab.addChild(objSel);
var objSel = new dijit.form.Button({id: 'srchMin'+num,
name: 'srchMin'+num,
label: ' - ',
width: '50px',
style: 'width: 50px !important, minWidth: 50px !important',
onClick: function() {
delSearchLine(formLine, num);
}});
tab.addChild(objSel);
tab.startup();
}
function delSearchLine(formLine, num)
{
dijit.byId('selFld'+num).destroy();
dijit.byId('srchFld'+num).destroy();
dijit.byId('typFld'+num).destroy();
dijit.byId('srchFld2'+num).destroy();
dijit.byId('srchMin'+num).destroy();
}
</script> |
Partager