「Phpgrid語法」:修訂間差異

出自TSK WIKI
跳至導覽 跳至搜尋
Root​(留言 | 貢獻)
 
(未顯示同一使用者於中間所作的 12 次修訂)
第16行: 第16行:
<style>
<style>
     .comppk{background-color: greenyellow !important;}
     .comppk{background-color: greenyellow !important;}
</style>
</css>
==變更phpgrid header顏色==
<css>
<style type="text/css">
.ui-jqgrid .ui-widget-header {
border: 1px solid #0b3e6f;
background: #0b3e6f url(http://ajax.aspnetcdn.com/ajax/jquery.ui/1.10.3/themes/dot-luv/images//ui-bg_diagonals-thick_15_0b3e6f_40x40.png) 50% 50% repeat-x;
color: #f6f6f6;
}
</style>
</css>
==自動更新頁數==
<VB>
<script type="text/javascript">
// REFRESH EVERY 1 MIN
window.setTimeout( refreshGrid, 1000);
          function refreshGrid()
          {
              var grid = jQuery("#v_WMMOCTA");
      i=parseInt(grid.getGridParam("page"))+10;
if (i >parseInt(grid.getGridParam("lastpage"))) i=1;  
  grid.setGridParam({
                          page: i
});
 
            grid.trigger("reloadGrid"); 
            window.setTimeout(refreshGrid, 1000);
          }
</script>
</vb>
==修改欄位名稱粗體==
<css>
<style type="text/css">
div.ui-jqgrid-sortable {
    font-weight:bold;
}
</style>
</css>
==修改搜索輸入框字體顏色==
<css>
<style type="text/css">
div.ui-jqgrid-sortable {
    font-weight:bold;
}
</style>
</css>
==隱藏搜索輸入框clear按鈕==
<css>
<style type="text/css">
td.ui-search-clear {
    display: none;
}
</style>
</css>
==修改grid字邊界大小==
<css>
<style type="text/css">
.ui-jqgrid .ui-jqgrid-bdiv tr.ui-row-ltr > td {
  padding: 2px !important;
}
</style>
</css>
==修改欄位名稱字邊界大小==
<css>
<style type="text/css">
th.ui-state-default {
    padding: 2px !important;
}
</style>
</css>
==Change header row height==
<css>
<style type="text/css">
.ui-jqgrid .ui-jqgrid-htable th div {
height:auto;
height:30px; /* your own height in pixel */
overflow:hidden;
padding-right:4px;
padding-top:2px;
position:relative;
vertical-align:text-top;
white-space:normal !important;
}
</style>
</style>
</css>
</css>

於 2024年4月26日 (五) 11:36 的最新修訂

<php> $sg1 -> set_col_property("TA003",

                       array("formatter"=>"string",
                           "sorttype"=>"date"))->enable_advanced_search(true);

</php>

變更Column Color

<php> <?php ... $dg->set_col_property('orderNumber', array('classes'=>'comppk')); $dg->set_col_property('productCode', array('classes'=>'comppk')); ... ?> </php> <css> <style>

   .comppk{background-color: greenyellow !important;}

</style> </css>

變更phpgrid header顏色

<css> <style type="text/css"> .ui-jqgrid .ui-widget-header { border: 1px solid #0b3e6f; background: #0b3e6f url(ui-bg_diagonals-thick_15_0b3e6f_40x40.png) 50% 50% repeat-x; color: #f6f6f6; } </style> </css>

自動更新頁數

<VB> <script type="text/javascript"> // REFRESH EVERY 1 MIN window.setTimeout( refreshGrid, 1000);

         function refreshGrid()
         {
             var grid = jQuery("#v_WMMOCTA");

i=parseInt(grid.getGridParam("page"))+10; if (i >parseInt(grid.getGridParam("lastpage"))) i=1; grid.setGridParam({

                         page: i

});

            grid.trigger("reloadGrid");   
            window.setTimeout(refreshGrid, 1000);			 
         }

</script> </vb>

修改欄位名稱粗體

<css> <style type="text/css"> div.ui-jqgrid-sortable {

   font-weight:bold;

} </style> </css>

修改搜索輸入框字體顏色

<css> <style type="text/css"> div.ui-jqgrid-sortable {

   font-weight:bold;

} </style> </css>

隱藏搜索輸入框clear按鈕

<css> <style type="text/css"> td.ui-search-clear {

   display: none;

} </style> </css>

修改grid字邊界大小

<css> <style type="text/css"> .ui-jqgrid .ui-jqgrid-bdiv tr.ui-row-ltr > td {

 padding: 2px !important;

} </style> </css>

修改欄位名稱字邊界大小

<css> <style type="text/css"> th.ui-state-default {

   padding: 2px !important;

} </style> </css>

Change header row height

<css> <style type="text/css"> .ui-jqgrid .ui-jqgrid-htable th div { height:auto; height:30px; /* your own height in pixel */ overflow:hidden; padding-right:4px; padding-top:2px; position:relative; vertical-align:text-top; white-space:normal !important; } </style> </css>