EasyUI Forum
October 18, 2025, 07:08:04 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1] 2 3 ... 5
1  General Category / EasyUI for jQuery / Re: Using EasyUI in Smarty Templates on: March 12, 2016, 04:17:42 PM
Just enclose the jeasyui code (and javascript) inside a {literal} tag...
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 :

Code:
 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
4  General Category / EasyUI for jQuery / Re: How to change language from english? on: August 02, 2015, 12:33:02 PM
You can get browser language using

var language = window.navigator.userLanguage || window.navigator.language;
alert(language);

Accoring the result you can load the appropiate easyui translation file
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
6  General Category / EasyUI for jQuery / Re: setText in a ValidateBox on: July 30, 2015, 07:04:11 AM
Yes!!
I read yesterday in the docs!!!

Thanks a lot!!!
7  General Category / EasyUI for jQuery / Re: Special lightbox on: July 30, 2015, 07:02:58 AM
Thanks!!
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
Code:
<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
Code:
$('#dlg').dialog('showMask', 'Actualizando...');

But nothing is shown... I also add 'open' and it show a small dialog and above it the message :
Code:
            $('#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
Code:
<input id="ci_telefono" name="ci_telefono" class="easyui-validatebox" data-options="validType:'number'">

And my javascript code is

Code:
$('#ci_telefono').validatebox('setText', 1234);

In the javascript console I got :
Uncaught TypeError: Cannot read property 'options' of undefined

TIA,
Yamil
10  General Category / EasyUI for jQuery / Re: Special lightbox on: July 29, 2015, 01:28:41 PM
Thanks!!!
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
13  General Category / EasyUI for jQuery / Re: Hide/Show a DataList on: July 24, 2015, 03:13:35 PM
Thanks a lot!!!!
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 :
Code:
               <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

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
15  General Category / EasyUI for jQuery / Re: Closing Modal Window with Escape Key on: July 22, 2015, 07:31:13 PM
Maybe use bind of a keyboard event (keyup, keypress, etc), for example

$('#target').bind('keyup', function(event) {
 //event.keycode is the ascii code for the pressed key, so 27 is escape key...
      });

HTH,
Yamil
Pages: [1] 2 3 ... 5
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!