EasyUI Forum
May 01, 2024, 11:47:18 PM *
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
1  General Category / EasyUI for jQuery / Re: data dont appear in a datagrid on: July 10, 2016, 08:46:54 AM
Very strange ?
It's seems the same code and it's OK on reloado.com, and KO on my web site ?
2  General Category / EasyUI for jQuery / Re: How to upload a file with an easyui-filebox on: July 09, 2016, 10:39:23 AM
Thank you VERY MUCH. it's work now.
3  General Category / EasyUI for jQuery / data dont appear in a datagrid on: July 09, 2016, 09:30:53 AM
I try to add value in a datagrid.
The following code doesn't show anything in the data grid

HTML
Code:
<table id="listeRegates" class="easyui-datagrid" style="height:450px"
       title="Regates/Courses chargees" iconCls="icon-save"
       sortName="date" sortOrder="asc"
       rownumbers="true" pagination="true"
       toolbar="#tb">
    <thead>
        <tr>
            <th field="regate" width="120" sortable="true">Regate/Course</th>
            <th field="date" width="60" sortable="true">Date debut</th>
            <th field="description" width="120" sortable="true">Description</th>
            <th field="organisateur" width="80" sortable="true">Organisateur</th>
            <th field="demo" checkbox="true" width="80" align="right" sortable="true">Demo</th>
            <th field="affichage" checkbox="true" width="120" align="right" sortable="true">Affichage autorise</th>
            <th field="supprimer" checkbox="true" align="center" width="60">A supprimer</th>
        </tr>
    </thead>
</table>
<div id="tb" style="padding:2px 5px;">
    Date From: <input class="easyui-datebox" style="width:110px">
    To: <input class="easyui-datebox" style="width:110px">
    <a id="btn_remove" href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Remove record</a>
</div>

the javascript code
Code:
$(document).ready(function(){

    $('#listeRegates').datagrid({
        data:[{
"regate": "Régate démo 1",
"date": "2014-01-01",
"description": "Régate d'hiver dans la baie d'Hyères",
"organisateur": "Hyères Plaisance Organisation",
"demo": "1",
"affichage": "1",
"supprimer": "0"
        }, {
"regate": "Régate démo 2",
"date": "2014-05-01",
"description": "Régate de printemps entre La Londe et Cavalaire",
"organisateur": "La Londe Plaisance Organisation",
"demo": "1",
"affichage": "1",
"supprimer": "0"}]
    });
});

I get the following on the screen (see enclosed file datagrid.gif)
Is a problem with my format of data ?




4  General Category / EasyUI for jQuery / Re: How to upload a file with an easyui-filebox on: July 09, 2016, 04:05:39 AM
Thank stworthy.
I implemented this code to transmit my file via a form

HTML firstly
Code:
<table>
<tr>
    <td style="width:70%;"> <form id="uploadFile" enctype="multipart/form-data" method="post">
            <input id="chooseFile" class="easyui-filebox" name="file1" data-options="prompt:'Choose a file...'" style="width:25%">
            <a id="btn_add" href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true">Add File</a>
        </form></td>
    <td style="width:30%;"><div id="progressFile" class="easyui-progressbar" style="width:100%;"></div></td>
</tr>
</table>

javascript code secondly
Code:
$(document).ready(function(){

    $('#uploadFile').form({
        url:'{PATH_TO_ROOT}/regate/?url=/ajax/tree',
        ajax:'true',
        iframe:'false', // pour activer le onProgress
        onProgress: function(percent){
            // pendant l'envoi du fichier
            $('#progressFile').progressbar('setValue', percent);    
        },
        success: function(data){
                // apres l'envoi du fichier en cas de succes
                alert('succes');
        },
        onLoadError: function(){
                // apres l'envoi du fichier en cas d'erreur
        }
    });


    $('#btn_add').bind('click', function(){
        // vérification si le champ du nom de fichier est vide ou non
        if($('#chooseFile').filebox('getValue')!="") { // transfer le fichier en assynchrone
            $('#uploadFile').submit(); // on envoie le fichier
        }
    });
});

The code is OK, the php file is called, but during the transmit of a file ( even a big file), the onProgress Method is NEVER called.
I've put iframe to false, but it's the same.

Where is my error ?
5  General Category / EasyUI for jQuery / How to upload a file with an easyui-filebox on: July 08, 2016, 08:21:55 AM
Hi
I'd like to upload the file I chose in an easyui-filebox to my server when I click an easyui-linkbutton just beside
I'v included the easyui-filebox and  the easyui-linkbutton in the toolbar of an easyui-datagrid.

Thanks for your help.

6  General Category / EasyUI for jQuery / Re: Enable or disable individual checkbox of a tree on: September 23, 2014, 11:42:31 AM
Thanks very much
7  General Category / EasyUI for jQuery / Enable or disable individual checkbox of a tree on: September 21, 2014, 11:43:58 AM
Hello

I have a tree with many nodes with checkbox.
When I select a checkbox, I call an asynchrone task which puts data in a array and when I deselect the same checkbox, I execute synchrone task which modify (delete) data from the same array.

I have a problem when I check/uncheck quickly the checkbox. The sync task is executed before the end of the async task and the behaviour is inccorect.

I can prevent this problem if I disable temporarily the checkbox (it becomes Grey tint as on microsoft Windows) and I enable the checkbox when the assync task is finished to prevent the user to modify the checkbox.

Unfortunately, I haven't seen in the documentation a means to achieve this.

Could you help me ?
8  General Category / EasyUI for jQuery / Re: How to remove all the nodes of a tree on: September 12, 2014, 04:17:51 AM
I try to use the code you proposed sworthy, but it removes only one par one the nodes of the tree.

See here the demo I wrote with this problem : http://jsfiddle.net/30ddrjkj/11/

Thanks for your help
9  General Category / EasyUI for jQuery / Re: How to use loadfilter in a tree on: September 10, 2014, 09:07:42 AM
Th aim is to modifi the return of the data from the server before displaying thes data in the tree.
Are you sure that "Loader" function is the good one for that ?

I have understood that this fonction is call for loading data instead the url method ?
10  General Category / EasyUI for jQuery / How to use loadfilter in a tree on: September 09, 2014, 12:21:24 PM
I tried to use loadFilter on an ajax tree without success. So I tried to simplify a mx the code and it doesn't succeed also and the tree doesn't appear neither !
example : http://jsfiddle.net/hgcj79cw/1/

What is the problem ? Thanks
11  General Category / EasyUI for jQuery / Re: Expand event doesn't fire every time on: September 08, 2014, 10:12:34 AM
I have not the control on the return method of my php code, because I use API framework function.

For example, it returns to me this data
Code:
{{"id":101,"text":"Groupe voiliers classe C","attributes":{"info":"Voiliers de classe C\n Sponsors: Sponsor classe C, , ","table":"phpboost_regate_groupe","idDb":"2"},"state":"closed"},{"id":102,"text":"Groupe voiliers classe D","attributes":{"info":"Voiliers de classe D\n Sponsors: Sponsor classe D, , ","table":"phpboost_regate_groupe","idDb":"2"},"state":"closed"}};

And I must transform in the javascript code in
Code:
[{"id":101,"text":"Groupe voiliers classe C","attributes":{"info":"Voiliers de classe C\n Sponsors: Sponsor classe C, , ","table":"phpboost_regate_groupe","idDb":"2"},"state":"closed"},{"id":102,"text":"Groupe voiliers classe D","attributes":{"info":"Voiliers de classe D\n Sponsors: Sponsor classe D, , ","table":"phpboost_regate_groupe","idDb":"2"},"state":"closed"}];

I have test it with my first method and The data appears in the tree after 3 selections of the expand icon. The problem isn't in this json code but in 'loadFilter' which is never called.

Maybe a supplementary parameters to put ?
12  General Category / EasyUI for jQuery / Re: Expand event doesn't fire every time on: September 07, 2014, 11:27:29 AM
Following your last remarks, I decided du test URL Method, but as my PHP code generates not directly Jsoncode, I decide to add the loadFilter Method to convert data return by PHP code to modify it as a correct json format.

But my loadFilter is never called (beakpoint inside with firebug)

Here is the javascript code. I call the 'creeArbre()' method to create the tree
Code:
function convert(nodes)
{
    var long=nodes.length;
    var nodes1='['+nodes.substring(1,long-1)+']'; // on fabrique une chaine au format json
    var nodesJson= J.parseJSON(nodes1);// on convertit en objet json (tableau de valeurs)
    return nodesJson;
}


function creeArbre(mode)
{
J('#treev').tree({
            url: '{PATH_TO_ROOT}/regate/?url=/ajax/tree', // L'url vers laquelle la requete sera envoyee
            method:'get',
            queryParams: {mode: mode}, // Les donnees que l'on souhaite envoyer au serveur au format JSON
            loadFilter:function(nodes){
                return convert(nodes);
            }
        });
}

What is wrong ? Thank you
13  General Category / EasyUI for jQuery / Re: Expand event doesn't fire every time on: September 07, 2014, 08:33:20 AM
Do I understand that I can use level1-1, level1-2 for example for the two first nodes of the first level, then level2-1, level2-2,... for the nodes of the secondlevel, exctera,.... ? I thought that id can only be a number.

If yes, it would be easyer for me to retreive the good table where are stored the data of the tree.
14  General Category / EasyUI for jQuery / Re: Expand event doesn't fire every time on: September 07, 2014, 05:23:38 AM
I tried the 'onBeforeExpand' event , but there is an other problem about the assyncrhonous answer between when I click to expand and when the answer arrive with data. So nothing appears in the tree due to the delay !

I decided to explore the way of the URL included in the create tree instead of methods based on intercepting the behaviour of the tree.

The URL method sends "id' of the node that you want to expand. When I saw this example http://www.jeasyui.com/tutorial/tree/tree2_demo.html
the data are embedded in a database with all id and parentid defined. It's a plate structure.
I have an relational database storing  my value that I want to retreive for the treeview.
So a 'regata' contains 'groups' wich contains themselves 'contacts' with contains themselves 'pointGPS'. It's a hierarchical data that I want to put in the tree with the URL mecanism. The structure is not planned as the example and when I retreive an 'id' from the userclick, I have no way to find with my database if I 'm at the first level (regata), second level (groups), third level (contact) or fourth level (pointGPS) !

Have you an idea to deal with this situation ?

Maybe must I use the scheme described here http://www.jeasyui.com/tutorial/tree/treegrid5.php.
It was just à little the first method I have to implement by without success.

Thanks for your help, because I've passed many hours on this problem , and I'm sceptical to arrive to find a solution.
15  General Category / EasyUI for jQuery / Re: Expand event doesn't fire every time on: September 06, 2014, 11:23:08 AM
OK, I well understood the mecanism with your explanation. Thanks very much.

Effectively, the children is created with a personnal ajax call, and not the url , because I don't arrive to generate a good json code in PHP, so I must transmit a string, modifiy in javascript start and finish character ( [] instead {} ) and then convert into json object before to append to the tree as a children of the node expand previously.
Pages: [1] 2 3
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!