EasyUI Forum
May 06, 2024, 12:47:15 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
1  General Category / EasyUI for jQuery / Re: datagrid background color rows on: March 04, 2018, 08:45:32 AM
Yes it's work, but what change the colors ?
Thanks.
2  General Category / EasyUI for jQuery / datagrid background color rows on: March 03, 2018, 09:01:15 AM
how can I set the background colors to alternating rows in a datagrid?
3  General Category / EasyUI for jQuery / help datagrid filter on: January 24, 2018, 02:49:08 AM
I'm trying to use the example of a data grid filter.
datagrid.html

Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>jQuery EasyUI Demo</title>
<link rel="stylesheet" type="text/css" href="css/easyui.css">
<link rel="stylesheet" type="text/css" href="css/icon.css">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="js/comp.js"></script>

        <style>
.icon-filter{
background:url('filter.png') no-repeat center center;
}
</style>

</head>
<body>
<h1>DataGrid Filter Row</h1>

<table id="dg" title="DataGrid" style="width:700px;height:250px" data-options="
singleSelect:true,
data:data
">
<thead>
<tr>
<th data-options="field:'itemid',width:80">Item ID</th>
<th data-options="field:'productid',width:100">Product</th>
<th data-options="field:'listprice',width:80,align:'right'">List Price</th>
<th data-options="field:'unitcost',width:80,align:'right'">Unit Cost</th>
<th data-options="field:'attr1',width:250">Attribute</th>
<th data-options="field:'status',width:60,align:'center'">Status</th>
</tr>
</thead>
</table>
</body>
</html>

and comp.js

Code:
		var data = [
            {"productid":"FI-SW-01","productname":"Koi","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"},
        {"productid":"K9-DL-01","productname":"Dalmation","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"},
        {"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":38.50,"attr1":"Venomless","itemid":"EST-11"},
        {"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"},
        {"productid":"RP-LI-02","productname":"Iguana","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"},
        {"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"N","listprice":158.50,"attr1":"Tailless","itemid":"EST-14"},
        {"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":83.50,"attr1":"With tail","itemid":"EST-15"},
        {"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":23.50,"attr1":"Adult Female","itemid":"EST-16"},
        {"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"N","listprice":89.50,"attr1":"Adult Male","itemid":"EST-17"},
        {"productid":"AV-CB-01","productname":"Amazon Parrot","unitcost":92.00,"status":"N","listprice":63.50,"attr1":"Adult Male","itemid":"EST-18"}
        ];
$(function(){
var dg = $('#dg').datagrid({
filterBtnIconCls:'icon-filter'
});
dg.datagrid('enableFilter', [{
field:'listprice',
type:'numberbox',
options:{precision:1},
op:['equal','notequal','less','greater']
},{
field:'unitcost',
type:'numberbox',
options:{precision:1},
op:['equal','notequal','less','greater']
},{
field:'status',
type:'combobox',
options:{
panelHeight:'auto',
data:[{value:'',text:'All'},{value:'P',text:'P'},{value:'N',text:'N'}],
onChange:function(value){
if (value == ''){
dg.datagrid('removeFilterRule', 'status');
} else {
dg.datagrid('addFilterRule', {
field: 'status',
op: 'equal',
value: value
});
}
dg.datagrid('doFilter');
}
}
}]);
});

the example as it is written works, but if I try to put the script in an external file, but the filter no longer works, where am I wrong?
4  General Category / EasyUI for jQuery / Re: submit form with link button on: November 18, 2017, 09:17:11 AM
I tried, but they did not work.

the first and the second solution  works partially because it does not send me to the "controllers / login.php" page and reload
 the same page.

I should send the "login.php" data form for the user's verification in the DB and chase the main page (of course with login control in the open session)
5  General Category / EasyUI for jQuery / Re: submit form with link button on: November 18, 2017, 08:53:45 AM
thanks, now I try.
I would like to use the link button before it checks.
6  General Category / EasyUI for jQuery / submit form with link button on: November 18, 2017, 02:09:17 AM
how can you use the link button to submit a form without ajax?
because i have problems using ajax.
If I use the classic
Code:
<input type="submit" value="Submit">
works the post variables are sent, but if I use
Code:
<a href="controllers/login.php" class="easyui-linkbutton" onclick="$('#flogin').submit();" style="width:80px">Submit</a>
the variables they are not sent or read.

code HTML index.php

Code:
<body>
<div id='win'>

    <form id="flogin" action='controllers/login.php'  method="post">
                <div style="margin-bottom:20px ; margin-top:20px" >
                    <input id="user"  type="text" name="utente">
                </div>
                <div style="margin-bottom:20px">
                    <input id="pwd" type="password" name="password">
                </div>
                <input type="hidden" id="dbinuso" value="frasema" />
   <a href="javascript:void(0)" class="easyui-linkbutton" onclick="sublogin()" style="width:80px">Submit</a>

          
</form>

</div>
<script type="text/javascript" src="js/login.js"></script>    
</body>
where #win is an window

code JAVASCRIPT login.js
Code:
function sublogin(){
$('#flogin').form('submit',{
success:function(data){
   window.location.href = 'controllers/login.php';
  }
})

code PHP login.php
Code:
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<?php 
echo ($_POST['utente']);

?>


PAGINA 'login.php'
</body>
</html>
you only see:  PAGINA 'login.php'

can anyone help me find a solution with or without ajax?
7  General Category / EasyUI for jQuery / Re:[SOLVED] input (textbox) set focus on: November 18, 2017, 01:30:41 AM
i have resolved so:
$('#user').textbox('clear').textbox('textbox').focus();

and the windows:
$('#win').window({
    width:300,
    height:250,
    modal:true,
    title:"LOGIN",
   collapsible:false,
   minimizable:false,
   maximizable:false,
   closable:false
});
8  General Category / General Discussion / Re: [Please Help!] Submit form using linkbutton problem. on: November 16, 2017, 07:46:03 PM
I say that they are at the beginning.
I'm experiencing the same problem, but I can not figure out what to put in the function {date} {...} to send the data to the server-side php file.
9  General Category / EasyUI for jQuery / Re: input (textbox) set focus on: October 31, 2017, 09:49:29 AM
I tried the two solutions, but they did not work.
can it depend on other settings?
10  General Category / EasyUI for jQuery / [solved] input (textbox) set focus on: October 31, 2017, 05:39:52 AM
I have a problem setting focus in textbox in a modal windows form.
the HTML code:
  <form id = "ff" method = "post">
                <div style = "margin-bottom: 20px">
                    <input id = "user" type = "text" name = "user">
                </ Div>
....
the javascript code:
$ ( '# User'). Textbox ({
label: 'Password:',
labelPosition: 'top',
required: true,
width: 80% ',
});

$ ( '# User'). Textbox.focus ();

but it does not work, where am I wrong?
11  General Category / EasyUI for jQuery / documentation on: October 24, 2017, 10:46:59 AM
where can i find the the documentation and/or tutorial for offline reading?
12  General Category / EasyUI for jQuery / speed query execution on: November 28, 2016, 02:12:13 AM
it is possible that the execute bit of a query (select) with 2 fields and the same with 8 fields (1000 records), the page load times with datagrid (url: file.php) range from 3 seconds to 30 seconds?
Code:
$sql = "SELECT idCliente,cognome,nome,codFisc,via,tel,telCell,note
FROM clienti ORDER BY idCliente DESC ";
try {
    $stmt = $DB->prepare($sql);
    $stmt->execute();
    $results = $stmt->fetchAll();
} catch (Exception $ex) {
    printErrorMessage($ex->getMessage());
}
$returnArray = array();
if (count($results) > 0) {
foreach ($results as $rs) {
$returnArray[] = $rs;
}
}
echo json_encode($returnArray);

13  General Category / EasyUI for jQuery / Re: widgets creation with javascript on: November 09, 2016, 02:56:18 AM
OK, it works.
now I understand where wrong.
thank you
14  General Category / EasyUI for jQuery / widgets creation with javascript on: November 08, 2016, 01:09:50 AM
I have problems with the creation of widgets using javascript.
taking for example the linkbutton, with markdown mosta me icon, and with no javascript.
I copied verbatim the related tutorial code, let me know where I'm wrong.
you can have a code sample to set the properties, events and methods (I admit that I'm ignorant on the use of javascript)?
thanks for help
15  General Category / EasyUI for jQuery / Re: responsive menu on: November 08, 2016, 01:00:38 AM

thanks, I'll try, I thought that would become wildly small buttons.
Pages: [1] 2
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!