Show Posts
|
Pages: [1] 2 3 ... 6
|
2
|
General Category / EasyUI for jQuery / Could you please advice how to add contextmenu when right click on textbox
|
on: November 21, 2023, 11:00:45 PM
|
I try the code below <input class="easyui-textbox" id="textbox1">
<div id="mm" class="easyui-menu" style="width:120px;"> <div data-options="iconCls:'icon-copy'">Copy</div> <div data-options="iconCls:'icon-cut'">Cut</div> <div class="menu-sep"></div> <div data-options="iconCls:'icon-paste'">Paste</div> </div>
$(document).ready(function (data) { $(document).bind('contextmenu', function (e) { var t = $(e.target).closest('.validatebox-text'); if (!t.length) { e.preventDefault(); $('#mm').menu('show', { left: e.pageX, top: e.pageY }); } }); });
When right click any position on display will show contextmenu 'mm' but I want to show contextmenu when right click at textbox1 only. Could you please advice? Many Thank.
|
|
|
6
|
General Category / EasyUI for jQuery / datagrid formatter disappear after used updateRow method
|
on: September 05, 2020, 12:41:48 AM
|
Dear Sir, I would like to update some cell value after close update window without reload datagrid. But after used updateRow method the column formatter that display linkbutton disappear only updated row. Could you advice how to correct. <script type="text/javascript"> function fmCmd(value, row) { var cmd = '<a href="javascript:void(0)" onclick="setTimeout(function() {' + 'viewPatron(\'GridPatron\',0)},500)' + '" class="easyui-linkbutton" iconCls="icon-aim" title="Open Update Window"></a>'; return cmd; } function updateLastAct(last_action) { var selectedRow = $('#GridPatron').datagrid('getSelected'); var rowIndex = $('#GridPatron').datagrid('getRowIndex', selectedRow); $('#GridPatron').datagrid('updateRow', { index: rowIndex, row: { last_act: last_action } }); } </script>
<table id="GridPatron" class="easyui-datagrid" border="true" idField="id" data-options=" url: 'getPatrons.ashx', method: 'post', fit: true, pagination: true, singleSelect: true, }, onLoadSuccess:function(data){ $(this).datagrid('getPanel').find('a.easyui-linkbutton').linkbutton(); } "> <thead> <tr> <th data-options="field:'expire',align:'center',resizable:true" width="9%"><b>Expire</b></th> <th data-options="field:'last_act',align:'left',resizable:true" width="12%"><b>Last Activity</b></th> <th data-options="field:'id',align:'center',formatter:fmCmd" width="9%"><b>Command</b></th> </tr> </thead> </table>
Thank you for you help.
|
|
|
10
|
General Category / EasyUI for jQuery / How to set collapsedContent when south panel is hide?
|
on: June 15, 2020, 06:10:53 PM
|
I define south panel like this. <div id="ItemCheckoutDetail" data-options="region:'south',border:true,collapsible:true,hideCollapsedContent:false" style="height:50%;">
when I click row in datagrid on center panel I set title of south panel title with selected row data. $('#ItemCheckoutDetail').panel({ title: 'Item Detail: ' + row.item_barcode + " " + row.title }); $('#ItemCheckoutDetail').panel({ collapsedContent: 'Item Detail: ' + row.item_barcode + " " + row.title });
But the title of south panel when is collapsed not update with selected row. Could you please advice. Thank you.
|
|
|
11
|
General Category / EasyUI for jQuery / Re: Latest Chrome Causing Ajax Form Issues
|
on: June 11, 2020, 05:35:58 PM
|
try to set iframe: false, $('#ff').form('submit', { iframe: false, url: 'saveFormPatronStatus.ashx', onSubmit: function(param) { param.id = id; param.barcode = barcode; param.status = status; var isValid = $(this).form('validate'); if (!isValid) { $.messager.progress('close'); // hide progress bar while the form is invalid } return isValid; }, success: function(result) { console.log(result); } })
|
|
|
|