Show Posts
|
Pages: 1 ... 4 5 [6]
|
76
|
General Category / EasyUI for jQuery / Re: show the parent node also
|
on: January 09, 2014, 06:51:01 PM
|
hi, stworthy sorry but is my first tree if the data were also: <script> var data = [{ id:100, text:'Node 1' },{ id:200, text:'Node 2', children:[{ id:210, text:'Node 2.1' },{ id:220, text:'Node 2.2' },{ id:230, text:'Node 2.3' }] },{ id:300, text:'Node 3' },{ id:400, text:'Node 4' }]; </script> then loadfilter: loadFilter:function(nodes){ return } how can I call for the ID node 200 and their children thank for your time
|
|
|
81
|
General Category / EasyUI for jQuery / edatagrid pass extra data and the editors?
|
on: December 17, 2013, 08:42:59 AM
|
hi, Im using edatagrid extension to update some values but not how to get server side some extra data here my example: $('#dg-ab').edatagrid({ url: 'get_datagrid_data.php', idField: 'id_game', updateUrl: 'update_data.php', }); <table id="dg-ab"> <thead> <tr> <th field="game_name" width="290" sortable="true"></th> <th field="score_game" width="50" sortable="true">High Score</th> <th field="player1" width="50" sortable="true" editor="{type:'numberbox',options:{min:0, max:100, precision:2}}">Player 1</th> <th field="player2" width="50" sortable="true" editor="{type:'numberbox',options:{min:0, max:100, precision:2}}">Player 2</th> <th field="player3" width="50" sortable="true" editor="{type:'numberbox',options:{min:0, max:100, precision:2}}">Player 3</th> <th field="player4" width="50" sortable="true" editor="{type:'numberbox',options:{min:0, max:100, precision:2}}">Player 4</th> <th field="player5" width="50" sortable="true" editor="{type:'numberbox',options:{min:0, max:100, precision:2}}">Player 5</th> </tr> </thead> </table>
the entire row was edited updating scores of five players per game although not shown in Table I have the game id from the 'get_datagrid_data.php', I need to get in 'update_data.php' is $id_game = $_POST['id_game']; $score_game = $_POST['score_game']; $player_1_score = $_POST['player1']; $player_2_score = $_POST['player2']; $player_3_score = $_POST['player3']; $player_4_score = $_POST['player4']; $player_5_score = $_POST['player5']; then the question is how to get the field score_game which is not editable?
|
|
|
82
|
General Category / EasyUI for jQuery / Re: issue with multiple property of combogrid
|
on: October 30, 2013, 01:02:48 PM
|
hi thank you for your time first change the name tag, like you said: name="almacenes[]" I seems reasonable but, then if I change this: $almacenes = $_POST['almacenes']; to this: $almacenes = join(',', $_POST['almacenes']); almacenes field is not saved in the database mi query insert is: $sql = "INSERT INTO table (field1, field2, field3, almacenes) values ('$value1', '$value2', '$value3', '$almacenes')"; and in the edition still do not checked the selected rows
|
|
|
83
|
General Category / EasyUI for jQuery / Re: combogrid -> post more variables besides q
|
on: October 29, 2013, 09:01:49 AM
|
thank for you reply, look here is my issue I have this two combogrid, cg2 depends on cg1 <input class="easyui-combogrid" id="cg1" name="cg1" style="width:230px;" data-options=" panelWidth:200, panelHeight:305, idField:'key', textField:'name', url:'get_category.php', mode:'remote', fitColumns:'false', columns:[[ {field:'key',title:'Id',width:60}, {field:'name',title:'Name',width:175} ]], onHidePanel: function(){ var g = $('#cg1').combogrid('grid'); var r = g.datagrid('getSelected'); var key = r.key; $('#cg2').combogrid('clear'); $('#cg2').combogrid('grid').datagrid('load', { param1: $('#other_combo').combogrid('getValue'), param2: key }); $('#dg').datagrid('load', { other_combo: $('#other_combo').combogrid('getValue'), cg1: key, cg2: $('#cg2').combogrid('getValue') }); }" />
<input class="easyui-combogrid" id="cg2" name="cg2" style="width:270px;" data-options=" panelWidth:500, idField:'key', textField:'description', url:'get_products.php', mode:'remote', fitColumns:'false', columns:[[ {field:'key',title:'Id',width:100}, {field:'description',title:'Description',width:140}, {field:'price',title:'Price',width:60} ]], queryParams: { param1: $('#other_combo').combogrid('getValue'), param2: $('#cg1').combogrid('getValue') }, onHidePanel: function(){ var g = $('#cg2').combogrid('grid'); var r = g.datagrid('getSelected'); var key = r.key; $('#dg').datagrid('load', { other_combo: $('#other_combo').combogrid('getValue'), cg1: $('#cg1').combogrid('getValue'), cg2: key }); }" />
When I change a category in cg1 I notice that cg2 change his content ok, for example: cg1 = garden cg2 loads the content of products: -- plantpot -- shovel -- fertilizer then I change it another category: cg1 = cleaning cg2 loads the content of products: -- vacuum cleaner -- garbage bag -- trash can The problem is that having selected cleaning category, I write fertilizer for search and the combogrid show me the result. Looks like the param2 don't be send it in cg2 That's a mistake because fertilizer dont belong it to cleaning category any idea?
|
|
|
84
|
General Category / EasyUI for jQuery / combogrid -> post more variables besides q
|
on: October 28, 2013, 06:24:05 PM
|
hi everybody
how can I post more variables besides q?
I've already used the queryParams property, and is helpful at te begining, but then I have another combogrid and when I change it updates this combogrid with other variables, the problem comes when I type a word, I think that the combo only sends q no my others variables.
I may think that I should use filter function but I dont know how implement
would appreciate any help
thanks
|
|
|
85
|
General Category / EasyUI for jQuery / issue with multiple property of combogrid
|
on: October 14, 2013, 04:57:46 PM
|
I'm using the combogrid with multiple property in a form. I have 2 actions: Add and Edit, so when I do the Add, the combogrid it looks ok but in the php side only got the last item I selected. To correct this issue I added like a "new" parameter in the onSubmit function for the submit method. Like this: param.almacenes = $('#almacenes').combogrid('getValues'); and it works, I've got every item I selected. But when I want do a edit a register, I select it and I get a message error: The object does not accept the property or method join. In this case the combogird should load the values store in the data base in that field and I get a blank combogrid. Here's my full code: the html: the combogrid: <input id="almacenes" name="almacenes" class="easyui-combogrid" style="width:240px" data-options=" multiple: true, panelWidth:240, panelHeight:280, mode:'remote', url: 'folder/get_almacenes.php', idField:'id', //like 100, 300 o A23 textField:'id', fitColumns:false, columns:[[ {field:'ck',checkbox:true}, {field:'id',title:'Clave',width:50}, {field:'name',title:'Nombre',width:155} ]]" />
easyui function to save the form data: function save(){ $('#form').form('submit',{ url: url, onSubmit: function(param){ param.almacenes = $('#almacenes').combogrid('getValues'); //this instruction had to add to get all the items I select......otherwise I only get the last one select var isValid = $(this).form('validate'); return isValid; }, success: function(result){ var result = eval('('+result+')'); if (result.success){ $('#dlg').dialog('close'); $('#dg').datagrid('reload'); $.messager.alert('Aviso','Operación éxitosa','info'); } else{ $.messager.alert('Error',result.msg,'error'); } } }); }
and the php code: //get the variable, $almacenes = $_POST['almacenes']; //the content should be like: 100,300,A23 (for example) //and after do the insert to db
the field that stores this variable is varchar (100) I'm using the 1.3.2. version thank you so much *sorry for my bad english
|
|
|
|