Show Posts
|
Pages: 1 2 [3] 4 5 ... 239
|
35
|
General Category / EasyUI for jQuery / Re: data-options with '
|
on: December 05, 2019, 02:18:48 AM
|
Please use this code instead. <div id="expectdonedate-label" class="textbox-label">Deliverer's Expected Completion Time</div> <input id="expectdonedate" type="text" class="easyui-numberspinner" style="width:95%" value="1" data-options="label:$('#expectdonedate-label'),labelPosition:'top',min:1,max:700,buttonText:'Day(s)',buttonAlign:'right',required:true">
|
|
|
36
|
General Category / General Discussion / Re: extend linkbutton to prevent double click.
|
on: November 14, 2019, 02:43:02 AM
|
You can redefine the behaviour of the linkbutton. Please refer to this code. (function($){ function fix(target){ $(target).off('click.linkbutton').on('click.linkbutton', function(){ var opts = $(this).linkbutton('options'); if (!opts.disabled){ if (opts.toggle){ if (opts.selected){ $(this).linkbutton('unselect'); } else { $(this).linkbutton('select'); } } // $(this).linkbutton('disable') // setTimeout(function(){ // $(target).linkbutton('enable') // },1000) opts.onClick.call(this); } }) } var plugin = $.fn.linkbutton; $.fn.linkbutton = function(options, param){ if (typeof options == 'string'){ return plugin.call(this, options, param); } else { return this.each(function(){ plugin.call($(this), options, param); fix(this); }); } } $.fn.linkbutton.defaults = plugin.defaults; $.fn.linkbutton.methods = plugin.methods; $.fn.linkbutton.parseOptions = plugin.parseOptions; })(jQuery);
|
|
|
37
|
General Category / EasyUI for jQuery / Re: Use filebox in crud
|
on: November 05, 2019, 08:07:06 PM
|
Listen to the 'onChange' event and then call the 'files' method, you can retrieve all the information about the files you selected including name, size, type, etc. Please look at the code below. <input class="easyui-filebox" data-options=" onChange: function(value){ var files = $(this).filebox('files'); console.log(files) } ">
|
|
|
39
|
General Category / EasyUI for jQuery / Re: show checkbox on grid
|
on: November 04, 2019, 08:09:14 PM
|
Please define the 'formatter' function to render the specified column. {field:'isPaid',width: 50,align:'center', formatter: function(value){ return '<input type="checkbox" disabled '+(value?'checked':'')+'>'; } },
|
|
|
42
|
General Category / EasyUI for jQuery / Re: How to hide row in treegrid
|
on: October 29, 2019, 07:59:25 PM
|
Please try this code to hide a row. var target = this; var finder = $(target).treegrid('options').finder; $(target).treegrid('getChildren').forEach(function(row){ if (row.id==21){ finder.getTr(target,row.id).hide() } })
|
|
|
45
|
General Category / General Discussion / Re: TypeError: $.data(...) is undefined
|
on: October 28, 2019, 02:33:58 AM
|
Please look at this example https://www.jeasyui.com/demo/test/test8.html. It works fine. test8_1.php <table id="dg" data-options="fit:true,url:'test8_2.php'" class="easyui-datagrid"> <thead> <tr> <th field="categoryName" halign="center" width="200" sortable="true" align="left">Category</th> <th field="categoryName2" halign="center" width="200" sortable="true" align="left">Category2</th> </tr> </thead> </table>
test8_2.php <?php
$data = array( array('categoryName'=>'categoryName11','categoryName2'=>'categoryName12'), array('categoryName'=>'categoryName21','categoryName2'=>'categoryName22'), array('categoryName'=>'categoryName31','categoryName2'=>'categoryName32'), );
echo json_encode($data);
|
|
|
|