Show Posts
|
Pages: 1 2 [3]
|
32
|
General Category / EasyUI for jQuery / Re: How to use loadData for a tree with data contained in a variabble
|
on: April 05, 2014, 11:10:47 PM
|
Ok, I understand the needs of an array, but when I put an array, I obtain nothing to the screen Look at the code: I have an ajx method from jquery to ask the server J.ajax({ type: 'GET', // Le type de ma requete dataType: "json", url: '{PATH_TO_ROOT}/regate/?url=/ajax/tree', // L'url vers laquelle la requete sera envoyee data: { mode: mode // Les donnees que l'on souhaite envoyer au serveur au format JSON }, success: function(data, textStatus, jqXHR) { J('#treev').tree('loadData', data); //var donnee= jqXHR.responseText; //J('#treev').tree('loadData',donnee); }, error: function(jqXHR, textStatus, errorThrown) { // Une erreur s'est produite lors de la requete alert('Echec de la requete'); } });
My server give me a jsonresponse. With firebug the data contains: data Object { id=1, text="node1", state="closed"}and the jqXHR.responseText contains: responseText "{"id":1,"text":"node1","state":"closed"}"If I use J('#treev').tree('loadData', data); I obtain no display in the treeview although data is an array ! If I use var donnee= jqXHR.responseText; J('#treev').tree('loadData',donnee); I obtain "a too much recursion" error and a lot of "undefined" in the treeview
|
|
|
34
|
General Category / EasyUI for jQuery / Numbering the id of a treeview
|
on: March 23, 2014, 09:28:18 AM
|
I have a problem to understand the numbering of the id folder in a treeview.
I explain: My treeview must be display data from a database. I can gave an unlimited first level folders and unlimited sublevels folders and again for subsublevel folders,... If I use 1,2,3,4,... to number the folders, can I use 1,2,3,4,.. to number the sublevel folders and again for subsublevel ? Or the number for id must be all different ?
Thanks. Cyril
|
|
|
36
|
General Category / EasyUI for jQuery / Re: How to remove an icon put with SetIcon
|
on: March 09, 2014, 01:36:03 AM
|
Stworthy. Thanks for your answer, but I'm not a specialist of javascript. I have some difficulties how to use your code.
For me the documentation of menu setIcon gives: $('#mm').menu('setIcon', { target: $('#m-open')[0], iconCls: 'icon-closed' });
In setIcon there are 2 parameters: the target menu and the iconCls that gives the bitmap. I understand this syntax.
If I add your code to override the setIcon methode, how I use it (syntax of calling ?) to delete the icon affected to one specific menu ?
Please give me an example of calling method. Cyril
|
|
|
37
|
General Category / EasyUI for jQuery / How to remove an icon put with SetIcon
|
on: March 08, 2014, 11:54:21 AM
|
Hello
For my menu , to show which "mode " is on, I put an icon-ok .
J('#menu1').menu('setIcon', {target: J('#mn11')[0],iconCls: 'icon-ok'});
When I select an other menu, I want to remove this icon-ok. I have used J('#menu1').menu('setIcon', {target: J('#mn11')[0],iconCls: null}); or J('#menu1').menu('setIcon', {target: J('#mn11')[0],iconCls: ''});
This is OK only for the first time. If I put again an icon-ok, then remove the icon, the icon-ok stay displayed ? If I try with an other icon 'icon-remove' for example, after two changes, I have the two icons displayed in the same place !
So how to delete an icon of a menu ? Thanks Cyril
|
|
|
38
|
General Category / EasyUI for jQuery / Re: Intercept size changing of a region in a easyui-layout
|
on: December 26, 2013, 01:30:31 AM
|
Thanks stworthy, but nothing happens in using OnResize method Here is my code modified (javascript and html): <script type="text/javascript"> var J = jQuery.noConflict(); J(document).ready(function(){ J('#ce').layout({ // appel du plugin //onStopResize:function(item){ onResize:function(width, height){ alert("resize"); } }); }); </script>
</head> <body> <!-- Menu supérieur --> <div style="background:#fafafa;padding:2px;width:200px;border:1px solid #ccc"> <a href="#" class="easyui-menubutton" menu="#mm" iconCls="icon-edit">Fonctions</a> </div> <div id="mm" class="easyui-menu" style="width:160px;"> <div data-options="name:'TR'">Mode Temps réel</div> <div data-options="name:'TD'">Mode Temps différé</div> </div> <!-- fin du Menu supérieur --> <div id="cc" class="easyui-layout" style="width:960px;height:800px;"> <div id="we" data-options="region:'west',title:'Régates',split:true" style="width:150px;"> <div id="ce" data-options="region:'center',title:'Carte'" style="padding:5px;background:#eee;">{GMAP}</div> <div data-options="region:'south',title:'Log'"> <div class="easyui-layout" data-options="fit:true"> <div data-options="region:'north'" style="height:100px"></div> <div data-options="region:'south'" style="height:30px;background:#eee;""></div> </div> </div>
</body>
Have you an idea ?
|
|
|
39
|
General Category / EasyUI for jQuery / Intercept size changing of a region in a easyui-layout
|
on: December 25, 2013, 01:34:37 PM
|
I have implemented an easyui-layout with North, West, Center and South region I try to intercept when an user who wants change size of a region, has finished to move separator between region West and Center with the mouse . The id of my Est region is "we".
The aim is to resize elements inside of the Center region, especially a googlemap
I use this code but it is not OK . Nothing arrives.
var J = jQuery.noConflict(); J(document).ready(function(){ J('#we').layout({ // appel du plugin onStopResize:function(item){ alert("resize"); } }); });
Is someone could help me ? The documentation doesn't give any method for this.
|
|
|
|