//$(tree.activeNode).scrollTop(20)
//tree.activeNode.tr.offsetTop
- $(document).scrollTop(tree.activeNode.tr.offsetTop); //Replace the active node in order to see the added command
-};
+ $(document).scrollTop(tree.activeNode.tr.offsetTop ); //Repostionning of the active node in order to see the added command
+}; //BUG: Si le sendAppendChild n'est pas fini,
)
.addClass(_attr)
.find("input").css('color','black'); //TODO : A placer ds le CSS
- actionListIndex=4;
- // $tdList.eq(actionListIndex)
- // .html("<span class='glyphicon glyphicon-plus-sign' onclick='alert(\"glyphicon-plus-sign : "+key+"\")'></span>");
- if (statut == 'f') {
- $tdList.eq(actionListIndex+1)
- .html("<span class='glyphicon glyphicon-trash' onclick='alert(\"glyphicon-trash : "+key+"\")'></span>");
- };
- $tdList.eq(actionListIndex+2)
- .html("<span class='glyphicon glyphicon-question-sign' onclick='alert(\"glyphicon-question-sign : "+key+"\")'></span>");
-
- } else { // Not classeAccas == "MCSIMP"
+
+ }; // Not classeAccas == "MCSIMP"
- // THREE ICONS MANAGEMENT : +,Trash,?
+ // THREE ICONS MANAGEMENT : +,Trash,?
+
+ plusFunction = undefined;
+ //trashFunction = "alert(\"glyphicon-trash : "+key+"\")";
+ trashFunction = "clickOnRemove( \"#tree1\", \"#tree1-messages\", \""+key+"\" )";
+
+ if ( classeAccas == "MCSIMP" ) {
+ actionListIndex = 4; //TODO : Le paramétrer
+ } else {
//$tdList.eq(2).prop("colspan", 2).nextAll().remove(); //Merge unused columns for easy keyboard navigation
- plusFunction = undefined;
- trashFunction = undefined;
- if ( classeAccas == "PROCEDURE" || classeAccas == "OPER" ) {
- plusFunction = "clickOnCommand( \"#tree1\", \"#tree1-messages\", \""+name+"\", \""+key+"\" )";
- trashFunction = "clickOnRemove( \"#tree1\", \"#tree1-messages\", \""+key+"\" )";
- } else if ( classeAccas == "MCFACT" ) {
- if (repeatable) {
- plusFunction = "sendAppendChild( \""+parentKey+"\", \""+cmdName+"\",null)";
- };
- trashFunction = "clickOnRemove( \"#tree1\", \"#tree1-messages\", \""+key+"\" )";
- } else {
- // plusFunction = "alert(\"glyphicon-plus-sign : "+key+"\")";
- trashFunction = "alert(\"glyphicon-trash : "+key+"\")";
- };
-
$tdList.eq(2).prop("colspan", 2); //Merge unused columns for easy keyboard navigation
- actionListIndex=3; //TODO : Le paramétrer
- if ( plusFunction != undefined ) {
- $tdList.eq(actionListIndex)
- .html("<span class='glyphicon glyphicon-plus-sign' onclick='"+plusFunction+"'></span>");
+ actionListIndex=3; //TODO : Le paramétrer
+ }
+
+ if ( classeAccas == "PROCEDURE" || classeAccas == "OPER" ) {
+ plusFunction = "clickOnCommand( \"#tree1\", \"#tree1-messages\", \""+name+"\", \""+key+"\" )";
+ } else if ( classeAccas == "MCFACT" ) {
+ if (repeatable) {
+ plusFunction = "sendAppendChild( \""+parentKey+"\", \""+cmdName+"\",null)";
};
- if ( trashFunction != undefined ) {
- if (statut == 'f') {
- $tdList.eq(actionListIndex+1)
- .html("<span class='glyphicon glyphicon-trash' onclick='"+trashFunction+"'></span>");
- };
+ };
+
+ if ( plusFunction != undefined ) {
+ $tdList.eq(actionListIndex)
+ .html("<span class='glyphicon glyphicon-plus-sign' onclick='"+plusFunction+"'></span>");
+ };
+ if ( trashFunction != undefined ) {
+ if (statut == 'f') {
+ $tdList.eq(actionListIndex+1)
+ .html("<span class='glyphicon glyphicon-trash' onclick='"+trashFunction+"'></span>");
};
- $tdList.eq(actionListIndex+2)
- .html("<span class='glyphicon glyphicon-question-sign' onclick='alert(\"glyphicon-question-sign : "+key+"\")'></span>");
-
};
+ $tdList.eq(actionListIndex+2)
+ .html("<span class='glyphicon glyphicon-question-sign' onclick='alert(\"glyphicon-question-sign : "+key+"\")'></span>");
+
// OPTIONALS MANAGEMENT :
// # Différents tests :
-var tree1=$.ui.fancytree.getTree("#tree1")
-a={ source: [ {title: "Node 1", key: "1000"},{title: "Folder 2", key: "2", folder: true, children: [ {title: "Node 2.1", key: "3000"},{title: "Node 2.2", key: "44"} ]} ], }
-$("#Optionals").fancytree( a )
-ou
-$.ui.fancytree.createTree('#Optionals', a)
-
-var tree2=$.ui.fancytree.getTree("#Optionals")
-b=tree2.toDict()
-$("#bebe").fancytree( { source: b} )
-$("#bebe").fancytree( { source: tree1.toDict()} )
-classeAccas == "MCSIMP"
-p1=tree1.getNodeByKey("54930c427ad911ec90fb64c901d49bcd")
-let myOpt=[}
-p1.visit( (n)=>{if (n.data.classeAccas == "MCSIMP") {myOpt.push(n)}}, true)
-------
-
-var tree1=$.ui.fancytree.getTree("#tree1")
-p1=tree1.getNodeByKey("721bcb347adc11ec8c2a64c901d49bcd")
-opt=p1.data.infoOptionnels[0]
-
-var optNodes= opt.map((o)=>{return {'title':o} })
-optTreeSrc=[{'title': p1.title+' (optionals)', 'children': optNodes}];
-$optTree=$("#bebe").fancytree( { source: optTreeSrc} )
-optTree=$optTree.fancytree()
-#var optTree=$.ui.fancytree.getTree("#bebe")
-optTree.expandAll()
+// var tree1=$.ui.fancytree.getTree("#tree1")
+// a={ source: [ {title: "Node 1", key: "1000"},{title: "Folder 2", key: "2", folder: true, children: [ {title: "Node 2.1", key: "3000"},{title: "Node 2.2", key: "44"} ]} ], }
+// $("#Optionals").fancytree( a )
+// ou
+// $.ui.fancytree.createTree('#Optionals', a)
+
+// var tree2=$.ui.fancytree.getTree("#Optionals")
+// b=tree2.toDict()
+// $("#bebe").fancytree( { source: b} )
+// $("#bebe").fancytree( { source: tree1.toDict()} )
+// classeAccas == "MCSIMP"
+// p1=tree1.getNodeByKey("54930c427ad911ec90fb64c901d49bcd")
+// let myOpt=[}
+// p1.visit( (n)=>{if (n.data.classeAccas == "MCSIMP") {myOpt.push(n)}}, true)
+// ------
+
+// var tree1=$.ui.fancytree.getTree("#tree1")
+// p1=tree1.getNodeByKey("721bcb347adc11ec8c2a64c901d49bcd")
+// opt=p1.data.infoOptionnels[0]
+
+// var optNodes= opt.map((o)=>{return {'title':o} })
+// optTreeSrc=[{'title': p1.title+' (optionals)', 'children': optNodes}];
+// $optTree=$("#bebe").fancytree( { source: optTreeSrc} )
+// optTree=$optTree.fancytree()
+// #var optTree=$.ui.fancytree.getTree("#bebe")
+// optTree.expandAll()