EasyUI Forum
December 01, 2025, 11:51:33 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
1  General Category / General Discussion / Malware Warning from Chrome on: July 23, 2013, 05:57:01 AM
When i visit the domain jeasyui.com i become a Malware warning from google chrome...
google means that the site has 1 trojan on it.


2  General Category / General Discussion / Re: datagrid / getPager? on: January 30, 2013, 01:17:12 PM
no ideas why this not work inside tabs with href content?
3  General Category / General Discussion / Re: datagrid / getPager? on: January 29, 2013, 02:51:25 AM
Thanks again;-)

I think i find the problem. I used tabs for the display content. When i use the Site without tabs, its getPager work, inside the tab, doesn't work.

Code:
function addTab(url, title, icon) {
   
    if ($('#tabs').tabs('exists', title)) {
        $('#tabs').tabs('select', title)
    } else {
        index++;

        $('#tabs').tabs('add', {
title: title,
href: url,
iconCls: icon,
closable: true,
border: 0,
selected: true
});
    }
}
4  General Category / General Discussion / Re: datagrid / getPager? on: January 28, 2013, 02:16:14 AM
Thanks stworthy, but i don´t have a problem with the editor in the grid. That works all fine...

My Problem ist the getPager request, that not works. I will send a queryParams request to the rest server when i click
the refresh/reload icon on the pagination panel... But the think is, with my code i become no alert back, when i click this button.

Code:
...
var p = $('#servicegrid').datagrid('getPager');
$(p).pagination({
    onBeforeRefresh:function(){
        alert('before refresh');
    }
});
5  General Category / General Discussion / datagrid / getPager? on: January 27, 2013, 04:37:09 PM
Hello @all:

Any Ideas why this not work, i become no alert?

Code:
$('#servicegrid').datagrid({
    nowrap: false,
    striped: true,
    collapsible:true,
    url:'/manage/json.php',
    pagination: true,
    singleSelect: true,
    sortName: 'sort',
    sortOrder: 'ASC',
    fitColumns: true,
    idField:'id',
    pageSize:30,
    pageNumber: 1,
    queryParams: {"action": "service"},
    columns:[[  
{field:'id',title:'ID',width:20, sortable: 'true'},  
{field:'short',title:'Abk.', width:30, sortable: true, editor: 'text' },  
{field:'long',title:'Service', width:100, sortable: true, editor: 'text' },
{field:'dict',title:'Beschreibung', width:160, sortable: true, editor: 'text' },
        {field:'sort',title:'Sortierung', width:120, sortable: true, editor: 'numberspinner'},
        {field:'action',title:'', width:100,
        formatter:function(value,row,index){
                if(row.editing){
                    var link = '<a href="#" onclick="saverow('+index+')">Speichern</a> ';
   link += '<a href="#" onclick="cancelrow('+index+')">Abrechen</a>';
}
else {
                    var link  = '<a href="#" onclick="editrow('+index+')">Ändern</a> ';
   link += '<a href="#" onclick="deleterow('+index+')">Löschen</a>';
}
return link;
   }
        }
    ]],
    onBeforeEdit:function(index,row){    
        row.editing = true;
        updateActions(index);
    },
    onAfterEdit:function(index,row){
row.editing = false;
        updateActions(index);
    },
    onCancelEdit:function(index,row){
        row.editing = false;
        //updateActions(index);
    },
});
var p = $('#servicegrid').datagrid('getPager');
$(p).pagination({
    onBeforeRefresh:function(){
        alert('before refresh');
    }
});
$('#servicegrid').datagrid({
    nowrap: false,
    striped: true,
    collapsible:true,
    url:'/manage/json.php',
    pagination: true,
    singleSelect: true,
    sortName: 'sort',
    sortOrder: 'ASC',
    fitColumns: true,
    idField:'id',
    pageSize:30,
    pageNumber: 1,
    queryParams: {"action": "service"},
    columns:[[  
{field:'id',title:'ID',width:20, sortable: 'true'},  
{field:'short',title:'Abk.', width:30, sortable: true, editor: 'text' },  
{field:'long',title:'Service', width:100, sortable: true, editor: 'text' },
{field:'dict',title:'Beschreibung', width:160, sortable: true, editor: 'text' },
        {field:'sort',title:'Sortierung', width:120, sortable: true, editor: 'numberspinner'},
        {field:'action',title:'', width:100,
        formatter:function(value,row,index){
                if(row.editing){
                    var link = '<a href="#" onclick="saverow('+index+')">Speichern</a> ';
   link += '<a href="#" onclick="cancelrow('+index+')">Abrechen</a>';
}
else {
                    var link  = '<a href="#" onclick="editrow('+index+')">Ändern</a> ';
   link += '<a href="#" onclick="deleterow('+index+')">Löschen</a>';
}
return link;
   }
        }
    ]],
    onBeforeEdit:function(index,row){    
        row.editing = true;
        updateActions(index);
    },
    onAfterEdit:function(index,row){
row.editing = false;
        updateActions(index);
    },
    onCancelEdit:function(index,row){
        row.editing = false;
        //updateActions(index);
    },
});

var p = $('#servicegrid').datagrid('getPager');
$(p).pagination({
    onBeforeRefresh:function(){
        alert('before refresh');
    }
});
6  General Category / EasyUI for jQuery / Problem after change of jquery 1.8.0 on: January 26, 2013, 06:07:13 PM
After change of jquery 1.8.0 i have a problem with the function getEditor.

I read a change after a line edit in datagrid with the follow code:

Code:
function saverow(index){
    var nameEditor = $('#servicegrid').datagrid('getEditor',{ index:index, field:'dict' });
    var nameValue = $(nameEditor.target).val(); // get name field value

    console.log(nameValue)
}
When i save the line, i become the error:

Uncaught Error: Syntax error, unrecognized expression: ://develop/manage/#

Have anybody a tip for me? In the older version of jquery the function works fine....

Thanks
baxter
7  General Category / EasyUI for jQuery / panel icon on: October 04, 2012, 07:45:09 AM
Hey,

how can i add i custom icon on panel header with own handler function. On the left side of the close icon as example. For help functions e.g.

Thanks
8  General Category / EasyUI for jQuery / Re: data(jq[0], "datagrid") is undefined on: September 21, 2012, 01:18:13 AM
Thanks stworthy, here is the code:

Code:
    $('#orders').datagrid({  
url:'/client/jclient.php',
pagination: true,
singleSelect: false,
queryParams: {"methode": "ListOrders"},
fitColumns: true,
idField:'orderid',
sortName: 'orderid',
        sortOrder: 'DESC',
pageSize:20,
pageNumber: 1,
loadMsg: LG1342,
rowStyler:function(index,row){
            if (row.userid){ return 'color:#0A5100;'; }
            return 1;
},
columns:[[  
   {field:'orderid', title:'Orderid', width:65, sortable:true},  
   {field:'userid', title:LG970, width:60,  sortable:true},  
   {field:'domain', title:LG1267, width:320, sortable:true},
   {field:'status', title:LG940, width:110, sortable:true},
   {field:'createtime', title:LG1348, width:130, sortable:true},
   {field:'regtime', title:LG1349, width:130, sortable:true},
   {field:'expiredate',title:LG1350,width:130, sortable:true},
   {field: 'Action', title:'', width:150, align:'center', formatter:function(value,row,index){
   
                    var a = '<select id="jumpDomAction_'+row.orderid+'" style="width: 160px" onchange="DomJump(this.options[this.selectedIndex].value, '+row.orderid+')">';
   a += '<option value="action" selected=selected disabled=disabled>'+LG941+'</option>';
   
   if(row.status.match(/TRANSFER-OK|REG-OK/)){

a += '<option value="update">'+LG194+'</option>';
a += '<option value="close">'+LG195+'</option>';

if(row.domain.match(/\.de$/)){
   a += '<option value="transit">'+LG196+'</option>';
}

if(row.hasAuthcode && !row.domain.match(/\.de$/)){
   a += '<option value="authcode">'+LG197+'</option>';
}

if(row.hasLock){
   if(row.lock == '1'){
a += '<option value="deLock">'+LG198+'</option>';
     }else{
a += '<option value="enLock">'+LG199+'</option>';
   }
}
   
if(row.domain.match(/\.de$/)){
   if(row.authcode){
a += '<option value="authinfo">'+LG1246+'</option>';
   }else{
a += '<option value="authinfo">'+LG1245+'</option>';
   }
}
   }
   a += '<option value="info">'+LG943+'</option>';
                    
                    a += '</select>';
                    
                    return a;
                }
            
            }
]],
onBeforeLoad: function(rowIndex,rowData){
   $('#domainBTNchange,#domainBTNclose').menubutton({ disabled: true });
},
        onClickRow:function(rowIndex,rowData){

   var orderid = rowData.orderid;
   
   var row = $('#orders').datagrid('getSelected');
   if(row){
$('#domainBTNchange,#domainBTNclose').menubutton({ disabled: false });
   }else{
$('#domainBTNchange,#domainBTNclose').menubutton({ disabled: true });
   }


            if(orderid){
document.getElementById("domaininfo").style.display = 'inline';
                document.getElementById("domaininfo_main").style.display = 'inline';
           
                $.post('/client/jclient.php', { methode: 'detail', orderid: orderid, view: 'table' }, function(data){
                    document.getElementById('domaininfo').innerHTML = data.table;
                },'json');
            }
        },
          
        onDblClickRow:function(rowIndex,rowData){
            
   var orderid = rowData.orderid;
   addTab('?tp=neworder&domainid='+orderid, LG1339, 'icon-domain');
        },

onBeforeRefresh:function(){
            $('#orders').datagrid('reload', {});  
        },
    });

And the json string (copy from firebug):
Code:
{"total":"74998","rows":[
{"orderid":"200997","domain":"domain1.de","status":"REG-OK","createtime":"15.09.2012 15:29:30","userid":"250469","regtime":"15.09.2012 15:29:33","action":null,"expiredate":"15.09.2013.15:29:33","hasAuthcode":1,"authcode":"","lock":"1","hasLock":false},
{"orderid":"200996","domain":"domain2.de","status":"REG-OK","createtime":"15.09.2012 13:24:37","userid":"250534","regtime":"15.09.2012 13:25:14","action":null,"expiredate":"15.09.2013.13:25:14","hasAuthcode":1,"authcode":"","lock":"1","hasLock":1},
{"orderid":"200995","domain":"domain3.de","status":"REG-OK","createtime":"15.09.2012 13:24:35","userid":"250534","regtime":"15.09.2012 13:24:37","action":null,"expiredate":"15.09.2013.13:24:37","hasAuthcode":1,"authcode":"","lock":"1","hasLock":1},
{"orderid":"200994","domain":"domain4.de","status":"REG-OK","createtime":"15.09.2012 13:24:34","userid":"250534","regtime":"15.09.2012 13:25:12","action":null,"expiredate":"15.09.2013.13:25:12","hasAuthcode":1,"authcode":"","lock":"1","hasLock":false},
{"orderid":"200993","domain":"domain5.de","status":"REG-OK","createtime":"15.09.2012 13:24:27","userid":"250534","regtime":"15.09.2012 13:24:34","action":null,"expiredate":"15.09.2013.13:24:34","hasAuthcode":1,"authcode":"","lock":"1","hasLock":false},
{"orderid":"200992","domain":"domain6.de","status":"TRANSFER-OK","createtime":"14.09.2012 20:18:05","userid":"202782","regtime":"14.09.2012 20:18:10","action":null,"expiredate":"14.09.2013.20:18:10","hasAuthcode":1,"authcode":"eNErDcKnU","lock":"1","hasLock":false},
{"orderid":"200991","domain":"domain7.de","status":"TRANSFER-OK","createtime":"14.09.2012 20:16:28","userid":"202782","regtime":"14.09.2012 20:16:34","action":null,"expiredate":"14.09.2013.20:16:34","hasAuthcode":1,"authcode":"+j672EF7z7Y","lock":"1","hasLock":false},
{"orderid":"200990","domain":"domain8.de","status":"TRANSFER-OK","createtime":"14.09.2012 20:15:45","userid":"202782","regtime":"14.09.2012 20:15:52","action":null,"expiredate":"14.09.2013.20:15:52","hasAuthcode":1,"authcode":"pgBhYyzCN*ytU","lock":"1","hasLock":false},
{"orderid":"200989","domain":"domain9.de","status":"TRANSFER-OK","createtime":"14.09.2012 20:14:57","userid":"202782","regtime":"14.09.2012 20:15:03","action":null,"expiredate":"14.09.2013.20:15:03","hasAuthcode":1,"authcode":"CStS\/Ryw6i","lock":"1","hasLock":false},
{"orderid":"200988","domain":"domain10.de","status":"TRANSFER-OK","createtime":"14.09.2012 20:09:51","userid":"202782","regtime":"14.09.2012 20:09:55","action":null,"expiredate":"14.09.2013.20:09:55","hasAuthcode":1,"authcode":"UVNELeqJA","lock":"1","hasLock":false},
{"orderid":"200987","domain":"domain11.de","status":"TRANSFER-OK","createtime":"14.09.2012 20:06:26","userid":"250534","regtime":"14.09.2012 20:06:30","action":null,"expiredate":"14.09.2013.20:06:30","hasAuthcode":1,"authcode":"CRNCxJaFNTMvXdt4","lock":"1","hasLock":false},
{"orderid":"200986","domain":"domain12.de","status":"TRANSFER-OK","createtime":"14.09.2012 20:04:06","userid":"250534","regtime":"14.09.2012 20:04:13","action":null,"expiredate":"14.09.2013.20:04:13","hasAuthcode":1,"authcode":"CRNCxJaFNTMvXdt4","lock":"1","hasLock":false},
{"orderid":"200985","domain":"domain13.de","status":"REG-OK","createtime":"14.09.2012 16:56:10","userid":"250517","regtime":"14.09.2012 16:56:11","action":null,"expiredate":"14.09.2013.16:56:11","hasAuthcode":1,"authcode":"","lock":"1","hasLock":1},
{"orderid":"200984","domain":"domain14.de","status":"TRANSFER-OK","createtime":"14.09.2012 16:40:49","userid":"250534","regtime":"14.09.2012 16:40:54","action":null,"expiredate":"14.09.2013.16:40:54","hasAuthcode":1,"authcode":"CRNcEay5rvyaG72V","lock":"1","hasLock":false},
{"orderid":"200983","domain":"domain15.de","status":"TRANSFER-OK","createtime":"14.09.2012 16:39:53","userid":"250534","regtime":"14.09.2012 16:39:58","action":null,"expiredate":"14.09.2013.16:39:58","hasAuthcode":1,"authcode":"CRNcEay5rvyaG72V","lock":"1","hasLock":false},
{"orderid":"200982","domain":"domain16.de","status":"TRANSFER-OK","createtime":"14.09.2012 16:38:37","userid":"250534","regtime":"14.09.2012 16:38:41","action":null,"expiredate":"14.09.2013.16:38:41","hasAuthcode":1,"authcode":"CRNcEay5rvyaG72V","lock":"1","hasLock":false},
{"orderid":"200981","domain":"domain17.de","status":"TRANSFER-OK","createtime":"14.09.2012 16:35:18","userid":"250534","regtime":"14.09.2012 16:35:24","action":null,"expiredate":"14.09.2013.16:35:24","hasAuthcode":1,"authcode":"CRNcEay5rvyaG72V","lock":"1","hasLock":false},
{"orderid":"200980","domain":"domain18.de","status":"REG-OK","createtime":"14.09.2012 15:21:22","userid":"250517","regtime":"14.09.2012 15:21:25","action":null,"expiredate":"14.09.2013.15:21:25","hasAuthcode":1,"authcode":"","lock":"1","hasLock":false},
{"orderid":"200979","domain":"domain19.de","status":"REG-OK","createtime":"14.09.2012 13:48:07","userid":"250310","regtime":"14.09.2012 13:48:11","action":null,"expiredate":"14.09.2013.13:48:11","hasAuthcode":1,"authcode":"","lock":"1","hasLock":false},
{"orderid":"200978","domain":"domain20.de","status":"REG-OK","createtime":"14.09.2012 11:16:28","userid":"250517","regtime":"14.09.2012 11:16:30","action":null,"expiredate":"14.09.2013.11:16:30","hasAuthcode":1,"authcode":"","lock":"1","hasLock":false}]}

html:
Code:
<table id="orders" class="easyui-datagrid" style="height:auto" title="{%TPL['LG']['LG']['151']%}" iconCls="icon-domain"></table>
9  General Category / EasyUI for jQuery / data(jq[0], "datagrid") is undefined on: September 20, 2012, 03:44:12 PM
Since the last update i have the follow error in Firebug on all datagrids. What is wrong?

Code:
TypeError: $.data(jq[0], "datagrid") is undefined
options()jquery....min.js (Zeile 7686)
jq =

[table#orders.easyui-datagrid]

datagrid()jquery....min.js (Zeile 7553)
_541 =

"options"

_542 =

undefined

loader()jquery....min.js (Zeile 8087)
_5e7 = Object { methode=

"ListOrders"

, page=

1

, rows=

20

, mehr...}
_5e8 = function()
_5e9 = function()
_53b()jquery....min.js (Zeile 7507)
(?)()jquery....min.js (Zeile 7496)
error source line:
[Bei diesem Fehler anhalten]

var _58a=$.data(jq[0],"datagrid").options;
10  General Category / General Discussion / Re: Plug in for jquery-easyui on: September 20, 2012, 12:21:00 PM
ok, thats a way too;-) and the code is the documentation;-)) Thanks
11  General Category / General Discussion / Re: Plug in for jquery-easyui on: September 19, 2012, 04:02:19 PM
really nice job, where can i download for testing?
12  General Category / EasyUI for jQuery / Re: calling php OOP method that retuns a JSON on: September 14, 2012, 11:16:26 AM
try this:

Code:
Class Users{
   
    public function get_data() {

        $rs = mysql_query("select field1, field2 from users");

        $items = array();
        $items['rows'] = array();

        while($row = mysql_fetch_object($rs)){
            $items['rows'][] = array('field1' => $row['field1'], 'field2' => $row['field2']);
        }

        echo json_encode($items);
    }
}

When you will have a json string directly from mysql use CONCAT:
Code:
SELECT CONCAT('[',GROUP_CONCAT(CONCAT('{name:',USER.name,''),CONCAT(',email:',USER.email,'}')),']') FROM users WHERE STATUS = 'active' ORDER BY created ASC
13  General Category / Bug Report / Re: Progress in datagrid not centered on: September 10, 2012, 07:04:05 AM
Jepp, is correct.

The problem if exist by the first request, when i open the tab. When i push the reload function, the loader is centered correct.
14  General Category / Bug Report / Re: Type Errors on: September 10, 2012, 07:02:20 AM
I had check the json data, there a correct.

Code:
{"total":"726","rows":[
{"orderid":"182882","domain":"domain1.co.uk","status":"CLOSE-WAIT","closetime":"02.07.2010 17:07:27"},
{"orderid":"189156","domain":"domain2.co.uk","status":"CLOSE-WAIT","closetime":"18.09.2011 23:00:00"},
{"orderid":"189469","domain":"domain3.me.uk","status":"CLOSE-WAIT","closetime":"06.10.2011 23:00:00"},
{"orderid":"189499","domain":"domain4.co.uk","status":"CLOSE-WAIT","closetime":"10.10.2011 23:00:00"},
{"orderid":"191061","domain":"domain5.co.uk","status":"CLOSE-WAIT","closetime":"28.12.2011 23:00:00"},
]}
15  General Category / Bug Report / Progress in datagrid not centered on: September 10, 2012, 01:58:18 AM
After upgrade to version 1.3.1 the progress layer is not centered when i load a datagrid.

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!