EasyUI Forum
May 14, 2024, 03:30:02 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 239
61  General Category / General Discussion / Re: Sorting fire onLoadSuccess event on: September 03, 2019, 12:36:00 AM
The sorting action will cause the sorted data to be loaded again. This will trigger the 'onLoadSuccess' event. If you want to identify the sorting action, add a flag before sorting and remote it after loading data.
Code:
$('#dg').datagrid({
remoteSort: false,
onBeforeSortColumn: function(){
var opts = $(this).datagrid('options');
opts.isSorting = true;
},
onSortColumn: function(){
//...
},
onLoadSuccess: function(data){
var opts = $(this).datagrid('options');
opts.isSorting = false;
}
})
62  General Category / EasyUI for jQuery / Re: Fix width of Searchbox menu on: August 25, 2019, 07:02:13 PM
Please try this code:
Code:
$('#sb').searchbox({
onResize: function(){
var mb = $(this).searchbox('button');
mb.outerWidth(120);
}
})
63  General Category / EasyUI for jQuery / Re: easyui-panel lyout on: August 22, 2019, 07:01:39 PM
1. Define a CSS class 'p-float'.
Code:
<style type="text/css">
    .p-float{
        float: left;
        margin-right: 10px;
    }
    .p-float .panel-body{
        display: flex;
        flex-direction:row;
    }
</style>

2. Assign it to all your panel with 'cls' property set to 'p-float'.
Code:
<div class="easyui-panel"
      id="divA" title="DivA"
      data-options="iconCls:'icon-ui-wrench'
            , fit:false,cls:'p-float'
            "
>
  ...
</div>
64  General Category / EasyUI for jQuery / Re: layout with fitted tabs on: August 22, 2019, 06:51:41 PM
The 'fit:true' property will make the tabs full fill its parent container. Remove it and use this code instead.
Code:
 <div data-options="region:'south',title:'Detail',split:true, hideCollapsedContent:false" style="height:50%">
   <div class="easyui-panel" style="padding:5px;height:50%">
     <div class="btn-sep" id="menuA">&nbsp;Menu:</div>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ui-radio-on" plain="true" onclick="btnActivate()">activate</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ui-radio-off" plain="true" onclick="btnDeactive()">deactivate</a>
    </div>
    <div id="tabsA" class="easyui-tabs" style="height:50%">
    ...
   </div>
 </div>
65  General Category / EasyUI for React / Re: documentation inconsistencies on: August 15, 2019, 12:42:19 AM
1. The LocaleBase has only one method that is only used internally. No other useful properties and methods.

2. The Messager does not extend from Dialog, but it wraps a MessagerDialog that extends from Dialog. This MessagerDialog receives the properties from Messager.

3. The MenuButton documentation has been updated.
66  General Category / EasyUI for Vue / Re: Event in switchbutton on: August 15, 2019, 12:18:19 AM
Bind the value to the component and watch it.
Code:
<SwitchButton v-model="value"></SwitchButton>
Code:
watch: {
value(){
console.log(this.value)
}
}
67  General Category / EasyUI for jQuery / Re: Datagrid Checkbox by GroupView on: August 09, 2019, 12:41:54 AM
First of all, append a checkbox element ahead of the group title.
Code:
groupFormatter:function(value, rows){
  var s = value + ' - ' + rows.length + ' Item(s)';
  s = '<input type="checkbox" onclick="checkGroup(\''+value+'\',event)">'+s;
  return s;
}
Define the 'checkGroup' function to check the group rows.
Code:
function checkGroup(value,event){
  value = $.trim(value);
  var dg = $('#dg');
  var groups = dg.datagrid('groups');
  var group = null;
  for(var i=0; i<groups.length; i++){
    if (groups[i].value == value){
      group = groups[i];
      break;
    }
  }
  var checked = $(event.target).is(':checked');
  for(var i=group.startIndex; i<group.startIndex+group.rows.length; i++){
    dg.datagrid(checked?'checkRow':'uncheckRow',i)
  }
}
68  General Category / EasyUI for Vue / Re: I want extends DataGrid on: July 30, 2019, 11:46:11 PM
Please update to the newest version.
69  General Category / EasyUI for jQuery / Re: button as linkbutton in Chrome (disable didnt work) on: July 30, 2019, 06:59:47 PM
Please try to update to the newest version.
70  General Category / EasyUI for jQuery / Re: DateBox inputmask and validation on: July 28, 2019, 06:30:47 PM
Please try to override the 'inputEvents' events.
Code:
(function($){
var keydownEventHandler = $.fn.maskedbox.defaults.inputEvents.keydown;
$.extend($.fn.maskedbox.defaults.inputEvents, {
keydown: function(e){},
keypress: function(e){
var tmp = $('<span></span>');
tmp.html(String.fromCharCode(e.which));
var c = tmp.text();
tmp.remove();
if ('0123456789'.indexOf(c) >= 0){
return true;
}
return keydownEventHandler(e)
}
})
})(jQuery);
71  General Category / General Discussion / Re: Print using printJS plugin on: July 19, 2019, 06:47:07 PM
Please pass the 'css' parameter to the printJS function.
Code:
printJS({
printable: 'dlg',
type: 'html',
css: '../../themes/default/easyui.css'
})
72  General Category / EasyUI for jQuery / Re: Datagrid with pagination - check/uncheck on: June 29, 2019, 01:20:23 AM
All the checked rows are stored in 'checkedRows' of the datagrid. You can set it with the rows that you want them to be checked. Please try this code.
Code:
var dg = $('#dg');
var state = dg.data('datagrid');
state.checkedRows = data;
dg.datagrid('loadData', data)
73  General Category / EasyUI for jQuery / Re: Disable combobox editor in a datagrid programatically on: June 29, 2019, 12:56:51 AM
The code should be:
Code:
onLoadSuccess: function(data){
if (!data.length){
$(this).combobox('disable');
}
}
74  General Category / EasyUI for jQuery / Re: A bug for resize of tagbox. on: June 27, 2019, 11:33:12 PM
Please call 'resize' method to resize the component if necessary.
75  General Category / EasyUI for jQuery / Re: Disable combobox editor in a datagrid programatically on: June 27, 2019, 11:32:14 PM
You can listen to the 'onLoadSuccess' event. If no data returned then disable it.
Code:
{
type:'combobox',
options:{
method: 'get',
valueField:'ST_DT',
textField:'ST_DT',
panelHeight:100,
url: 'getDate.php?dt1='+cald1+'&dt2='+cald2+'&pc='+row.PROGCODE,
onLoadSuccess: function(data){
if (!data.length){
// disable it
}
}
}
}
Pages: 1 ... 3 4 [5] 6 7 ... 239
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!