EasyUI Forum
June 28, 2024, 07:46:30 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / Re: How should I set up Multiple Toolbars and Pagination="true" ? on: February 08, 2013, 04:52:04 PM
Reference:
http://www.jeasyui.com/tutorial/datagrid/datagrid19.php   

 <div id="tb" style="padding:5px;height:auto"> 
        <div style="margin-bottom:5px"> 
            <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true"></a> 
            <a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true"></a> 
            <a href="#" class="easyui-linkbutton" iconCls="icon-save" plain="true"></a> 
            <a href="#" class="easyui-linkbutton" iconCls="icon-cut" plain="true"></a> 
            <a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true"></a> 
        </div> 
        <div> 
            Date From: <input class="easyui-datebox" style="width:80px"> 
            To: <input class="easyui-datebox" style="width:80px"> 
            Language:   
            <input class="easyui-combobox" style="width:100px" 
                    url="data/combobox_data.json" 
                    valueField="id" textField="text"> 
            <a href="#" class="easyui-linkbutton" iconCls="icon-search">Search</a> 
        </div> 
    </div> 
2  General Category / EasyUI for jQuery / How should I set up Multiple Toolbars and Pagination="true" ? on: February 08, 2013, 01:05:13 PM
toolbar = " New Edit Remove "
tb1 = "Search Input"
Attached are 2 images. option 1 and option 2
1) if I set toolbar="#toolbar, #tb1"  I can see (2) both of them but Pagination at the bottom of the page

2) if I set toolbar="#toolbar"  I can see the 1 toolbar and Pagination at the bottom of the page


<table class="easyui-datagrid" id="dg" style="height:550px" title="Activities"
         url="get_te.php"
         toolbar="#toolbar, #tb1"
                        pagination="true"
         rownumbers="true" fitColumns="true" singleSelect="true" sortable="true"
            
            data-options="rowStyler: function(index,row){  
                    if (row.lo_act_id > 99){  
                       return 'background-color:#900;color:#fff;font-weight:bold;';
                                           }  
                }  
            "
            >  
      
3  General Category / EasyUI for jQuery / Is it possible to create a vertical menu ? on: February 07, 2013, 12:01:48 PM
Is it possible to create a vertical menu ?
to place it in the middle of the page as index page,
and then use the standard option horizontal one or to place a vertical one on a side of the page.

Thanks in advance.
4  General Category / EasyUI for jQuery / Re: dosearch + combobox ( How to make it to work ? ) on: February 07, 2013, 08:47:59 AM
it works perfect! Thanks!
5  General Category / EasyUI for jQuery / Re: dosearch + combobox ( How to make it to work ? ) on: February 06, 2013, 10:50:24 PM
stworthy  thank you so much for your reply but it didn't work when I tested it.

This is the Function I had, it works well using input
------------------------------------------------
function doSearch(){
         $('#dg').datagrid('load',{
               lo_empl_id_sel: $('#lo_empl_id_sel').val()
         });
      }

<input id="lo_empl_id_sel" style="line-height:26px;border:1px solid #ccc">  

<a href="#" class="easyui-linkbutton" plain="true" onClick="doSearch()">Search</a>  


-----------------------------------------------------------------------------------------
It work GREAT! Thanks Stworthy
-----------------------------------------------------------------------------------------
function doSearch(){
   $('#dg').datagrid('load',{
      lo_empl_id_sel: $('#lo_empl_id_sel').combobox('getValue')
   });
}


<span>Empl ID:</span>
<?   input id="lo_empl_id_sel" class="easyui-combobox"
        name="lo_empl_id_sel"
      data-options="
               url:'get_empl_dropdown.php',
               valueField:'emp_code',
               textField:'emp_last_name',
               panelHeight:'auto',
               required:true
         ">
      
      
<a href="#" class="easyui-linkbutton" plain="true" onClick="doSearch()">Search</a>
6  General Category / EasyUI for jQuery / dosearch + combobox ( How to make it to work ? ) on: February 06, 2013, 02:33:08 PM
How to does combobox works with dosearch?

lo_month_sel means  layout month selected
lo_empl_id_sel means layout employee ID selected

Thanks!

function doSearch(){
         $('#dg').datagrid('load',{
            lo_month_sel: $('#lo_month_sel').val(),
            lo_empl_id_sel: $('#lo_empl_id_sel').val()
         });
      }



<? /* --------     this part works great! -------------------------- */        
$curr_month = date("m");
$lo_month_sel = array (0=>"All", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
$select = "<select id=\"lo_month_sel\">\n";
foreach ($lo_month_sel as $key => $val) {
    $select .= "\t<option value=\"".$key."\"";
    if ($key == $curr_month) {
        $select .= " selected=\"selected\">".$val."</option>\n";
    } else {
        $select .= ">".$val."</option>\n";
    }
}
$select .= "</select>";
echo $select;

?>

/* ----------------------------------------------------- This Part Do Not works well for me --------- */
<span>Empl ID:</span>
<?   input id="lo_empl_id_sel" class="easyui-combobox"
        name="lo_empl_id_sel"
      data-options="
               url:'get_empl_dropdown.php',
               valueField:'emp_code',
               textField:'emp_last_name',
               panelHeight:'auto',
                    required:true
         ">
        
        
      <a href="#" class="easyui-linkbutton" plain="true" onClick="doSearch()">Search</a>
7  General Category / EasyUI for jQuery / Re: Form : How should I assign a Value to an Input Box in a Form on: February 04, 2013, 10:49:29 AM
I renamend the form id to

form id="fm1"

than I modified the call area.

$('#fm1').form('submit'

function saveUser(){
         $('#fm1').form('submit',{
            url: url,
            onSubmit: function(){
               return $(this).form('validate');
            },
8  General Category / EasyUI for jQuery / Re: Form : How should I assign a Value to an Input Box in a Form on: February 04, 2013, 10:38:16 AM
<form id="fm" method="post" novalidate>

If I removed id="fm"

I can see all the values correctly. what is the impact to have id="fm"
I'm using the basic easyui sample that the site provide and I modify it for me needs.

Thanks
9  General Category / EasyUI for jQuery / Re: Combobox - How should I build a Drop Down List from database on: February 04, 2013, 07:07:29 AM
Thanks!

I modified my php file

$items = array();
   while($row = mysql_fetch_object($rs)){
      array_push($items, $row);
   }
   $result = $items;

   echo json_encode($result);

10  General Category / EasyUI for jQuery / Combobox - How should I build a Drop Down List from database on: February 03, 2013, 12:12:20 PM
I want to made a dropdown list using the easyui. I tried different option with out luck

<input class="easyui-combobox"
         name="lo_client_id"
         data-options="
               url:'get_clients.php',
               valueField:'client_code',
               textField:'client_desc',
               panelHeight:'auto'
         ">



With the combobox_data1.json file works my get_client_php does not work.

I read that formatter can help on it. I dont know how to uses it, even when I saw examples of it I couldn't figure it out.  

Could Anyone could help me on it?

Thanks


My get_client_php bring this info.



{"total":"4","rows":
[{
"client_id":"1","client_code":"341896","client_desc":"Subway,Inc","client_location_id":"0","client_location_desc":""
},{
"client_id":"2","client_code":"341897","client_desc":"Wendy,Inc","client_location_id":"0","client_location_desc":""
},{
"client_id":"4","client_code":"341898","client_desc":"McDonald,Inc","client_location_id":"0","client_location_desc":""
},{
"client_id":"6","client_code":"351889","client_desc":"Taco Bell, Inc","client_location_id":"0","client_location_desc":""
}]}


The example combobox_data1.json file bring this info


[{
   "id":1,"text":"Java","desc":"Write once, run anywhere"
},{
   "id":2,"text":"C#","desc":"One of the programming languages designed for the Common Language Infrastructure"
},{
   "id":3,"text":"Ruby","selected":true,   "desc":"A dynamic, reflective, general-purpose object-oriented programming language"
},{
   "id":4,"text":"Perl","desc":"A high-level, general-purpose, interpreted, dynamic programming language"
},{
   "id":5,"text":"Basic","desc":"A family of general-purpose, high-level programming languages"
}]
11  General Category / EasyUI for jQuery / Form : How should I assign a Value to an Input Box in a Form on: February 03, 2013, 10:44:47 AM
How to assign a value to an input in a form?

I try to assign a value to an input box in a Form Container. I couldn't make it to work.
I made some work around. It works but I don't really like it =) [ see attachment ]

I read JavaScript or formatter function should help me on it  but I don't know how to do it.

Thanks for any help.  
I also Attached an screenshot for easy understanding of what I try to accomplish.


<form id="fm" method="post" novalidate>
-------------------------------------------------------------------------------
$i=0;
while ($row = mysql_fetch_array($result)) {
   $i=++$i;

//---------------------------------------------------------------------------------------
// I tried to assign a value to the input box directly from the db table and it didn't work so
// Assign the value to a variable and didn't work neither.
//---------------------------------------------------------------------------------------

$actidnumb[$i] = $row['act_id_numb'];    

    echo '<tr>';
   echo '<td class="even">' . $row['act_title_id_numb'] . '</td>'
   . '<td class="even">' . $row['title_code'] . '</td>'
   
    . '<td class="even">' . $row['act_desc'] . '</td>'
   . '<td align="right">' . $actidnumb[$i] . '</td>' ;

?>   

<!-- ----------------------------------------------------  -->
<!-- ** input value= 96                      It  Doesn't Work **  -->
<!-- ----------------------------------------------------  -->

<td><input name="actidnumb[]" class="easyui-validatebox" value="<? echo $actidnumb[$i]?>" type="text" size="3" maxlength="3"  /></td>  

<!-- I have tried  no luck neither ------------------------------- -->
<td><input name="actidnumb[]" class="easyui-numberbox" type="text" data-options="min:0,precision:2,value:96" size="4" maxlength="3"  /></input>

</td>

<td><input name="hours[]" class="easyui-numberbox" type="text" size="3" maxlength="5" /></td>
<td><input name="lo_desc[]" type="text" size="50"  maxlength="70" /></td>

</form>
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!