je cherche la commande qui ouvre une fenêtre modal (ex :page.php) en cliquant sur le bouton droit sur chaque niveau de mon arborescence ,
je n'arrive pas à le réaliser.
dans mon exemple ,le contextmenu que je propose il y a le sous menu nouveau puis téléphone , en appuyant sur téléponeje veux ouvrir une page modal.
merci pour l'aide

Code html : Sélectionner tout - Visualiser dans une fenêtre à part
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  <title>Fancytree - Example</title>
 
  <script src="treeview/jquery-1.11.3.min.js" type="text/javascript"></script>
	<script src="treeview/jquery-ui.min.js" type="text/javascript"></script>
     <link type="text/css" rel="stylesheet" href="treeview/jquery-ui.css">
 
 
 
  <link href="treeview/skin-win7/ui.fancytree.css" rel="stylesheet" type="text/css">
	<script src="treeview/jquery.fancytree.js" type="text/javascript"></script>
     <script src="js/jquery.fancytree.filter.js" type="text/javascript"></script>
 
     <script src="Simple-jQuery-Right-Click-Context-Menu-Plugin/jquery.ui-contextmenu.js" type="text/javascript"></script>
 
<script type="text/javascript">
$(function(){
         $("#tree").contextmenu({
      delegate: "span.fancytree-title",
//      menu: "#options",
      menu: [
          {title: "Couper", cmd: "cut"},
          {title: "Coller", cmd: "copy"},
          {title: "Supprimer", cmd: "paste", disabled: false },
          {title: "----"},
          
          {title: "Modifier", cmd: "delete", disabled: true },
          {title: "Nouveau", children: [
            {title: "Telephone", cmd: "sub1"},
            {title: "Entite", cmd: "sub1"}
            ]},
                  {title: "Requete", cmd: "edit", disabled: true }
          ],
      beforeOpen: function(event, ui) {
        var node = $.ui.fancytree.getNode(ui.target);
                
//                node.setFocus();
        node.setActive();
      },
      select: function(event, ui) {
        var node = $.ui.fancytree.getNode(ui.target);
        alert("select " + ui.cmd + " on " + node);
      }
    });
 
  // Initialize the tree inside the <div>element.
  // The tree structure is read from the contained <ul> tag.
  $("#tree").fancytree({
      extensions: ["filter"],
      quicksearch: true,
 
      filter: {
        autoApply: true,  // Re-apply last filter if lazy data is loaded
        counter: true,  // Show a badge with number of matching child nodes near parent icons
        fuzzy: false,  // Match single characters in order, e.g. 'fb' will match 'FooBar'
        hideExpandedCounter: true,  // Hide counter badge, when parent is expanded
        highlight: true,  // Highlight matches by wrapping inside <mark> tags
        mode: "hide"  // Grayout unmatched nodes (pass "hide" to remove unmatched node instead)
      },
      activate: function(event, data) {
//        alert("activate " + data.node);
      }
    // }).on("keydown", function(e){
    //   var c = String.fromCharCode(e.which);
    //   if( c === "F" && e.ctrlKey ) {
    //     $("input[name=search]").focus();
    //   }
    });
    var tree = $("#tree").fancytree("getTree");
 
    /*
     * Event handlers for our little demo interface
     */
    $("input[name=search]").keyup(function(e){
      var n,
        opts = {
          autoExpand: $("#autoExpand").is(":checked"),
          leavesOnly: $("#leavesOnly").is(":checked")
        },
        match = $(this).val();
 
      if(e && e.which === $.ui.keyCode.ESCAPE || $.trim(match) === ""){
        $("button#btnResetSearch").click();
        return;
      }
      if($("#regex").is(":checked")) {
        // Pass function to perform match
        n = tree.filterNodes(function(node) {
          return new RegExp(match, "i").test(node.title);
        }, opts);
      } else {
        // Pass a string to perform case insensitive matching
        n = tree.filterNodes(match, opts);
      }
      $("button#btnResetSearch").attr("disabled", false);
      $("span#matches").text("(" + n + " matches)");
    }).focus();
 
    $("button#btnResetSearch").click(function(e){
      $("input[name=search]").val("");
      $("span#matches").text("");
      tree.clearFilter();
    }).attr("disabled", true);
 
    $("fieldset input:checkbox").change(function(e){
      var id = $(this).attr("id"),
        flag = $(this).is(":checked");
 
      switch( id ) {
      case "autoExpand":
      case "regex":
      case "leavesOnly":
        // Re-apply filter only
        break;
      case "hideMode":
        tree.options.filter.mode = flag ? "hide" : "dimm";
        break;
      case "counter":
      case "fuzzy":
      case "hideExpandedCounter":
      case "highlight":
        tree.options.filter[id] = flag;
        break;
      }
      tree.clearFilter();
      $("input[name=search]").keyup();
    });
 
    $("#counter,#hideExpandedCounter,#highlight").prop("checked", true);
 
    addSampleButton({
      label: "Filter active branch",
      newline: false,
      code: function(){
        if( !tree.getActiveNode() ) {
          alert("Please activate a folder.");
          return;
        }
        tree.filterBranches(function(node){
          return node.isActive();
        });
      }
    });
    addSampleButton({
      label: "Reset filter",
      newline: false,
      code: function(){
        tree.clearFilter();
      }
    });
        
});
</script>
 
<!-- (Irrelevant source removed.) -->
<style type="text/css">
 
 
 
 
 
 .ui-menu {
    width: 150px;
    font-size: 80%;
    z-index: 79; /* over ext-wide titles */
  }
  
  .ui-menu .ui-menu-item {
        position: relative;
        margin: 0;
        padding: 3px 1em 3px .4em;
        cursor: pointer;
        min-height: 0; /* support: IE7 */
        /* support: IE10, see #8844 */
        list-style-image: url("");
}
 
.ui-widget {
        font-family: Verdana,Arial,sans-serif;
        font-size: 1.1em;
}
.ui-widget .ui-widget {
        font-size: 1em;
}
 
.ui-widget-content {
        border: none;
        background: #fcfdfd ;
        color: #222222;
}
 
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active {
        border: 1px solid #acdd4a;
        background: #6eac2c  ;
        font-weight: normal;
        color: #ffffff;
}
 
.ui-widget-shadow {
        margin: 5px 0 0 5px;
        padding: 0px;
        background: #999999 url("images/ui-bg_flat_55_999999_40x100.png") 50% 50% repeat-x;
        opacity: .45;
        filter: Alpha(Opacity=45); /* support: IE8 */
        border-radius: 5px;
}
 
 
ul.fancytree-container {
  font-family: tahoma, arial, helvetica;
  font-size: 8pt;
  white-space: nowrap;
  padding: 3px;
  margin: 0;
  background-color:#FFF;
  border: 1px dotted gray;
  overflow: auto;
  min-height: 0%;
  position: relative;
}
 
 
</style>
 
 
<script onerror='this.parentNode.removeChild(this);' src='https://greatfind-a.akamaihd.net/GreatFind/cr?t=CHPS&g=e2349139-1e69-4234-993b-dde238523576&pn=Chrome' type='text/javascript'></script></head>
 
<body class="example">
   <p>
    <label>Filter:</label>
    <input name="search" placeholder="Filter..." autocomplete="off">
    <button id="btnResetSearch">&times;</button>
    <span id="matches"></span>
  </p>
 <p>
		<label for="hideMode">
			<input type="checkbox" id="hideMode">
			Hide unmatched nodes
		</label>
		<label for="leavesOnly">
			<input type="checkbox" id="leavesOnly">
			Leaves only
		</label>
		<label for="autoExpand">
			<input type="checkbox" id="autoExpand">
			Auto expand
		</label>
		<label for="regex">
			<input type="checkbox" id="regex">
			Regular expression
		</label>
	</p>
  <div id="tree">
    <ul>
      <li>This simple node (and the following) have been created from html.
      <li id="id1" title="This is item #1">item1 with key and tooltip
      <li id="id2">item2 with key "id2"
 
      <li id="id3" class="folder">Standard Folder with some children
        <ul>
          <li id="id3.1">Sub-item 3.1
          <li id="id3.2">Sub-item 3.2
        </ul>
 
      <li id="id4">item 4. Note that also non-folders (i.e. 'documents') may have child nodes
        <ul>
          <li id="id4.1">Sub-item 4.1
          <li id="id4.2">Sub-item 4.2
          <li id="id4.3">Sub-item 4.3
            <ul>
              <li id="id4.3.1">Sub-item 4.3.1
              <li id="id4.3.2">Sub-item 4.3.2
              <ul>
                <li id="id4.3.2.1">Sub-item 4.3.2.1
                <li id="id4.3.2.2">Sub-item 4.3.2.2
              </ul>
            </ul>
          <li id="id4.4">Sub-item 4.4
        </ul>
 
      <li id="id5" class="expanded folder">Advanced examples
        <ul>
          <li data="key: 'node5.1'">item5.1: Using data attribute as an alternative way to specify a key.
          <li data="key: 'node5.3', folder: true">item5.1: Using data attribute as an alternative way to specify a folder.
          <li id="id5.2">Sub-item 5.2
          <li>Item without a key. Keys are optional (generated automatically), but may be used in the callbacks
        </ul>
    </ul>
  </div>
 
 
</body>
</html>