EasyUI Forum
October 16, 2025, 09:40:22 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
1  General Category / EasyUI for jQuery / Position Form/Div in Dialog Easyui on: May 04, 2014, 06:59:57 AM
Hi guys,

How do I set the position of the form/div with dialog easyui in the middle of the screen?
When the dialog = 1 dialog, the position is located in the middle of screen, but when there is 2 or more dialogthen there is a dialogue that goes down to the first position (not located in the middle of the screen).

Regards,

- Jaki -
2  General Category / EasyUI for jQuery / Re: How to hide or disable/hide easyui-link button where user not admin on: May 04, 2014, 06:30:36 AM
SOLVED

Thx stworthy.
3  General Category / EasyUI for jQuery / Re: How to hide or disable/hide easyui-link button where user not admin on: May 01, 2014, 08:26:50 PM
I write this code above function addTab_user but still not effect.
This is my code

<?php
         $akses = $_SESSION['s_akses'];
         if($akses == "ADMIN"){
            ?>
            <script type="text/javascript">
               $('#btn-adm').linkbutton('enable');
            </script>
            <?php
         } else {
            ?>
            <script type="text/javascript">
               $('#btn-adm').linkbutton('disable');
            </script>
            <?php
         }
      ?>

4  General Category / EasyUI for jQuery / How to hide or disable/hide easyui-link button where user not admin on: April 30, 2014, 12:59:10 AM
Hi,

I have two type user ( ADMIN and OPERATOR) who access a page with easyui tab.
This is my script
function addTab_user(title){
            if($('#tab_content').tabs('exists',title)){
               $('#tab_content').tabs('select', title);
            } else {
               var content = "<div title='tb_user' iconCls='icon-home' closable='true' style='overflow:hidden;padding:5px'>";
               content += "<table id='tb_user' title='Data User' class='easyui-datagrid' style='width:auto;height:350px;'";
               content += "url='model/tb_user/get_user.php' toolbar='#toolbar_tb_user' rownumbers='true' singleSelect='true' pagination='true' nowrap='false' striped='true'>";
               content += "<thead>";
               content += "<tr>";
                  content += "<th field='id' width='100' hidden='true'>ID</th>";
                  content += "<th field='username' width='300'>Username</th>";
                  content += "<th field='password' width='50' hidden='true'>Password</th>";
                  content += "<th field='nama_lengkap' width='350'>Nama Lengkap</th>";
                  content += "<th field='akses' width='200'>Akses</th>";
                  content += "<th field='status' width='150'>Status</th>";
               content += "</tr>";
               content += "</thead>";
               content += "</table>";
               content += "<div id='toolbar_tb_user'>";
                  content += "<a href='#' class='easyui-linkbutton add-adm' iconCls='icon-add' plain='true' onclick='tambah_user()'>Add </a>";
                  content += "<a href='#' class='easyui-linkbutton' iconCls='icon-edit' plain='true' onclick='edit_user()'>Edit</a>";
                  content += "<a href='#' class='easyui-linkbutton delete-adm' iconCls='icon-remove' plain='true' onclick='hapus_user()'>Delete</a>";
               content += "</div>";
               content += "</div>";
               $('#tab_content').tabs('add', {
                  title: title,
                  content: content,
                  iconCls: 'icon-home',
                  closable: true
               });
            }
         }

My Problem is How to Disable or Hide link button easyui-linkbutton add-adm & easyui-linkbutton delete-adm in div toolbar_tb_user where user not ADMIN.
5  General Category / EasyUI for jQuery / how to set up the panel in the middle of the browser page on: October 23, 2013, 03:55:18 AM
I want create a login page with easyui-panel, but wen i running in browser, the panel login not in center page middle of the browser page. This is my code
----
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Please Login First</title>
   <link rel="stylesheet" type="text/css" href="themes/default/easyui.css">
   <link rel="stylesheet" type="text/css" href="themes/icon.css">
   <link rel="stylesheet" type="text/css" href="themes/demo.css">
   <link rel="stylesheet" type="text/css" href="style-login.css">
   
   <script type="text/javascript" src="jquery.min.js"></script>
   <script type="text/javascript" src="jquery.easyui.min.js"></script>
</head>
<body>
<div id ="login-panel" class="easyui-panel" title="Silahkan Login terlebih dahulu !!!" style="width:250px;height:200px;padding:10px;">
<div class="easyui-layout" fit="true">
   <div region="north" border="false">
      <label>Silahkan masukkan username & password</label>
   </div>
   <div region="center" border="false">
   <form name="frmLogin" method="post" action="checkLogin.php">
    <table>
      <tr>
         <td>Username</td>
         <td>:</td>
         <td><input type="text" name="user"></input></td>
      </tr>
      <tr>
         <td>Password</td>
         <td>:</td>
         <td><input type="password" name="pass"></input></td>
      </tr>
      <tr>
         <td>&nbsp;</td>
         <td>&nbsp;</td>
         <td><input type="submit" name="submit" value="Login"></input>
            <input type="reset" name="reset" value="Reset"></input></td>
      </tr>
    </table>
    </form>
   </div>
   <div region="south" border="false">
      <div class="msgError"></div>
   </div>
</div>
</div>
</body>
</html>
----

Please any one help me.
6  General Category / EasyUI for jQuery / Group View Unload Data on: September 02, 2013, 09:49:02 AM
I have this script. I dont know whyd data grid can load data from my query.Please help me..

BR
- dearsh-
   <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="keywords" content="jquery,ui,easy,easyui,web">
    <meta name="description" content="easyui help you build your web page easily!">
    <title>Group Rows in DataGrid - jQuery EasyUI Demo</title>
<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/demo/demo.css">
<script type="text/javascript" src="../../library/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../../library/jquery.easyui.min.js"></script>
<script type="text/javascript" src="http://www.jeasyui.com/easyui/datagrid-groupview.js"></script>
    </head>
    <body>
    <h2>Group Rows in DataGrid</h2>
    <div class="demo-info" style="margin-bottom:10px">
    <div class="demo-tip icon-tip">&nbsp;</div>
    <div>This sample shows how to group rows via specified column.</div>
    </div>
<table class="easyui-datagrid" title="Group Rows in DataGrid" style="width:700px;height:250px"
   data-options="
   singleSelect:true,
   collapsible:true,
   rownumbers:true,
   fitColumns:true,
   data:data,
   view:groupview,
   groupField:'lokasi_awal',
   groupFormatter:function(value,rows){
   return value + ' - ' + rows.length + ' Item(s)';
   }
   ">
    <thead>
    <tr>
    <th data-options="field:'lokasi_awal',width:80">Lokasi Awal</th>
    <th data-options="field:'lokasi_tujuan',width:100">Lokasi Tujuan</th>
    <th data-options="field:'status',width:80,align:'right'">Status</th>
    <th data-options="field:'waktu',width:80,align:'right'">Waktu</th>
    <th data-options="field:'no_pengirim',width:250">No. Pengirim</th>   
    </tr>
    </thead>
    </table>
   
    <script type="text/javascript">
   var data = json_encode($result);
   /*
   var data = [{"lokasi_awal":"RAGUNAN","lokasi_tujuan":"MAMPANG","status":"LANCAR","waktu":"2013-09-02 21:58:15","no_pengirim":"085655443242"},{"lokasi_awal":"RAGUNAN","lokasi_tujuan":"MAMPANG","status":"MACET","waktu":"2013-08-30 22:04:38","no_pengirim":"+6285655443242"},{"lokasi_awal":"SLIPI","lokasi_tujuan":"RAWAMANGUN","status":"LANCAR","waktu":"2013-08-30 22:04:29","no_pengirim":"+6285655443242"},{"lokasi_awal":"CAWANG","lokasi_tujuan":"SLIPI","status":"MACET","waktu":"2013-09-02 21:58:51","no_pengirim":"085655443242"},{"lokasi_awal":"CAWANG","lokasi_tujuan":"SLIPI","status":"LANCAR","waktu":"2013-08-30 22:04:33","no_pengirim":"+6285655443242"},{"lokasi_awal":"PANCORAN","lokasi_tujuan":"TEBET","status":"LANCAR","waktu":"2013-08-30 22:04:41","no_pengirim":"+6285655443242"},{"lokasi_awal":"PANCORAN","lokasi_tujuan":"TEBET","status":"MACET","waktu":"2013-09-02 21:57:42","no_pengirim":"085655443242"},{"lokasi_awal":"LENTENG AGUNG","lokasi_tujuan":"MARGONDA","status":"LANCAR","waktu":"2013-08-30 22:04:44","no_pengirim":"+6285655443242"},{"lokasi_awal":"KALIDERES","lokasi_tujuan":"CENGKARENG","status":"MACET","waktu":"2013-09-02 21:57:05","no_pengirim":"085655443242"},{"lokasi_awal":"KALIDERES","lokasi_tujuan":"CENGKARENG","status":"LANCAR","waktu":"2013-08-30 22:04:47","no_pengirim":"+6285655443242"},{"lokasi_awal":"RAGUNAN","lokasi_tujuan":"BUNCIT","status":"LANCAR","waktu":"2013-09-02 21:58:15","no_pengirim":"085655443242"}];
   */
   
    </script>
   <?php
   include '../../library/conn.php';
   $rs = mysql_query("SELECT
               A.nama_lokasi AS lokasi_awal,
               B.nama_lokasi AS lokasi_tujuan,
               C.nama_status_lalin AS status,
               D.waktu AS waktu,
               D.no_pengirim AS no_pengirim
               FROM tbl_info_lalin D
               INNER JOIN v_lokasi_awal A ON D.id_lokasi_awal = A.id
               INNER JOIN v_lokasi_tujuan B ON D.id_lokasi_tujuan = B.id
               INNER JOIN tbl_status_lalin C ON D.id_status_lalin = C.id");
   $items = array();
   while($row = mysql_fetch_object($rs)){
      array_push($items, $row);
   }
   $result["data"] = $items;

   echo json_encode($result);
   ?>
    </body>
    </html>
7  General Category / EasyUI for jQuery / Re: Problem Filter Mode Remote on Combogrid on: August 18, 2013, 02:33:16 AM
It's work.

Thx Very Much

- dearsh -
8  General Category / EasyUI for jQuery / Re: Problem Filter Mode Remote on Combogrid on: August 17, 2013, 03:37:54 AM
Filtered is not work.whatever i type word in combogrid
9  General Category / EasyUI for jQuery / Re: Problem Filter Mode Remote on Combogrid on: August 16, 2013, 11:41:48 PM
This code is not worked when running (File get_data_tabel.php)

$q = isset($_POST['q']) ? strval($_POST['q']) : ''; -> Line 3

$rs = mysql_query("select count(*) from tb_referensi where uraian like '%$q%' or keterangan like '%$q%' "); -> Line 11

$rs = mysql_query("select * from tb_referensi where uraian like '%$q%' or keterangan like '%$q%' limit $offset,$rows "); -> Line 14


10  General Category / EasyUI for jQuery / Re: Problem Filter Mode Remote on Combogrid on: August 16, 2013, 01:52:34 PM
9090 is mysql port that i used.

Btw when you tested mycode, filter combogrid work fine or not ?
especially when we type a word in combogrid, whether the contents of combogrid adjust (filtered) based on the parameters that we just type that?
11  General Category / EasyUI for jQuery / Re: Problem Filter Mode Remote on Combogrid on: August 13, 2013, 12:40:09 AM
This is my code
1. File Index.php
  <html>
  .......
  <script>
  $(function(){
      $('#cg').combogrid({
         panelWidth:500,
         url:'get_data_tabel.php',
         idField:'id',
         textField:'uraian',
         mode:'remote',
         striped: true, 
         editable:true,
         collapsible:false,
         rownumbers:true,
         fit:true,
         fitColumns:true,
         pagination:true,
         pageSize: 10, 
         pageList: [10],
         columns:[[
            {field:'id',title:'Id',width:5,hidden:true},
            {field:'uraian',title:'Uraian',width:10},
            {field:'keterangan',title:'Keterangan',widht:60},
            {field:'active',title:'Status',width:10}
         ]]
   });
   });
</script>
<body>
      <h2> Filter in Combogrid </h1>
      <input id="cg" style="width:150px"></input>
</body>
</html>

2. File get_data_tabel.php
   <?php
   include 'config.php';
   $q = isset($_POST['q']) ? strval($_POST['q']) : '';
   $page = isset($_POST['page']) ? intval($_POST['page']) : 1;
   $rows = isset($_POST['rows']) ? intval($_POST['rows']) : 10;
   $offset = ($page-1)*$rows;
   $result = array();
      
   //$where = "uraian like '%a%' or keterangan like '%a%'";
   //$rs = mysql_query("select count(*) from tb_referensi where ".$where);
   $rs = mysql_query("select count(*) from tb_referensi where uraian like '%$q%' or keterangan like '%$q%' ");
   $row = mysql_fetch_row($rs);
   $result["total"] = $row[0];
   $rs = mysql_query("select * from tb_referensi where uraian like '%$q%' or keterangan like '%$q%' limit $offset,$rows ");
   
   $items = array();
   while($row = mysql_fetch_object($rs)){
      array_push($items, $row);
   }
   $result["rows"] = $items;

   echo json_encode($result);
?>

3. File config.php
<?php

$conn = @mysql_connect('127.0.0.1','root','','9090');
if (!$conn) {
   die('Could not connect: ' . mysql_error());
}
mysql_select_db('gammu', $conn);

?>
12  General Category / General Discussion / Re: combogrid problemsql on: August 11, 2013, 01:47:35 AM
$("input[name='mode']").change(function(){
            var mode = $(this).val();
            $('#ccode').combogrid({
               mode: mode
            });
});

what purpose that code ?

Best regard
- dearsh -
13  General Category / General Discussion / Re: IDE editor on: August 11, 2013, 01:05:16 AM
Try komodo editor
14  General Category / General Discussion / Re: Need .chm file on: August 11, 2013, 01:00:44 AM
I can't download this file. Do you have another link ?
 
http://www.cnblogs.com/hxling/archive/2012/04/19/2457817.html
[/quote]
15  General Category / EasyUI for jQuery / Problem Filter Mode Remote on Combogrid on: August 11, 2013, 12:39:28 AM
Hello all,
I have concerns about the use of filters on combogrid remote mode.
I have tried the tutorial you know about filters combogrid http://www.jeasyui.com/tutorial/form/form5.php

After I try to implement it turns out the use of the filter is not running. It looks like the query parameter q in sintact
$ q = isset ($ _POST ['q']) ? strval ($ _POST ['q']) :  '' ; does not run / not functioning properly.

Please help to solve the problem.
thank you.

-dearsh -
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!