Show Posts
|
Pages: [1] 2 3 ... 5
|
2
|
General Category / EasyUI for jQuery / Strange problem
|
on: August 30, 2015, 05:38:09 PM
|
I am facing a strange problem. I have an app when some CRUD screens. Those screens have a Datagrid and use a button in the toolbar to add, edit or delete rows. To be most specific, I have two screens to update two kinds of users. Those screens share some common fields(email, Lastname, FirstName, document Id and so on). Screen 1 is for doctors and Screen 2 is for patients.
When I select screen 1, entered to edit a row, all the information is shown in the dialog and then if after selects Screen2 and edits a row, some fields are shown empty but this does not happen if I select Screen 2 first, the problem comes when select Screen 1 after that... But this only happen when fields in the two screens share the same name (and same id too) It looks like the field is already created in DOM and javascript (or me, for sure) got confused...
Is there a way to "kill" a page from DOM or reload it everytime...
TIA, Yamil
|
|
|
3
|
General Category / EasyUI for jQuery / Refresh Datagrid after Search
|
on: August 29, 2015, 07:14:04 PM
|
Hi I add search function in my datagrid according 'Add search functionality in DataGrid' tutorial. In my php code, i checked my quey is filtering the database and bring only filtered records. However my grid does not get refresh with the filtered information. The javascript code is : doSearch: function() { $('#dg').datagrid('load', { itemSearch: $('#txtSearchNombre').val() }); }
And my php code return the appropiate JSON {"total":1,"rows":[{"id_cliente":"10","tx_cliente":"SOSMedi"]} because i filtered by cliente name starting with S... Is there something else to do ? TIA, Yamil
|
|
|
5
|
General Category / EasyUI for jQuery / Re: How to change language from english?
|
on: August 01, 2015, 03:14:40 PM
|
In the jEasyui download, folder 'locale', you can find translation for many languages. To use just include the appropiate file for your language, for example, if you want spanish messages just :
<script type="text/javascript" src="easyui/locale/easyui-lang-es.js"></script>
HTH, Yamil
|
|
|
8
|
General Category / EasyUI for jQuery / Re: Special lightbox
|
on: July 29, 2015, 02:10:56 PM
|
I am trying to use this code but i am having problems: 1) Do I need to define a div for this, say <div id='dlg' class="easyui-dialog" data-options='collapsed:true, closed:true'></div> I have to add closed:true because when i run my form it was shown on the screen... And to call I use $('#dlg').dialog('showMask', 'Actualizando...'); But nothing is shown... I also add 'open' and it show a small dialog and above it the message : $('#dlg').dialog('open'); $('#dlg').dialog('showMask', 'Actualizando...');
What i am doing wrong ? TIA; Yamil
|
|
|
9
|
General Category / EasyUI for jQuery / setText in a ValidateBox
|
on: July 29, 2015, 01:32:57 PM
|
Hi. I read some data from php and want to set some validateBoxes in my form. My html code is <input id="ci_telefono" name="ci_telefono" class="easyui-validatebox" data-options="validType:'number'"> And my javascript code is $('#ci_telefono').validatebox('setText', 1234); In the javascript console I got : Uncaught TypeError: Cannot read property 'options' of undefined TIA, Yamil
|
|
|
11
|
General Category / EasyUI for jQuery / Special lightbox
|
on: July 28, 2015, 08:44:37 AM
|
Hi I know we can use $.messager.progress to show a message while a lengthy ajax call is made but I would like to use the little dialog EasyUI uses in grids as it shown in the attached picture. Is there a easyu way to use thsi feature ?
TIA, yamil
|
|
|
12
|
General Category / EasyUI for jQuery / Re: Treegrid Dynamic load
|
on: July 28, 2015, 08:12:08 AM
|
When you click in a node, an ajax call is made and your server side code receives the node id. In the php code you can see a sql select where parentId is the received id. You have to build your table with thsi structure:
id, int parentId, int ...
ParentId = 0 for nodes whose parent is the root of the tree.
HTH, Yamil
|
|
|
14
|
General Category / EasyUI for jQuery / Hide/Show a DataList
|
on: July 23, 2015, 01:33:51 PM
|
I have a DataList inside a accordion and after click a checkbox I want to show the datalist. Initially, i specify display :none to hide the datalist, so : <div id='especialidadList' class="easyui-datalist" title="Especialidades" style="width:400px; height:200px; display:none" data-options=" fit : true, lines : true, checkbox: true, url: './plan/crud_plan.php?action=FC', valueField : 'id_especialidad', textField : 'nb_especialidad', selectOnCheck: false, onBeforeSelect: function(){return false;}"> </div>
When i run my app, the datalist is shown!!! Also i add the change event code for the checkbox and add this code if (this.checked) { $('#cboEspecialidad').prop('disabled', false); $('#especialidadList').show(); } else { $('#cboEspecialidad').prop('disabled', 'disabled'); $('#especialidadList').hide(); } But 'especialidadList' (the datalist) does not set hide/show TIA, Yamil
|
|
|
|