EasyUI Forum
April 24, 2024, 05:53:25 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 3 ... 6
1  General Category / EasyUI for jQuery / Re: Could you please advice how to add contextmenu when right click on textbox on: November 22, 2023, 03:28:41 AM
Thank you every one. I got temporary solution  Grin by using tag span wrap textbox and bind context menu to span.

Code:
        $('#textbox1span').bind('contextmenu',function(e){
            e.preventDefault();
            $('#mm').menu('show', {
                left: e.pageX,
                top: e.pageY
            });
        });
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

Code:
<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.
3  General Category / EasyUI for jQuery / Re: Filebox on IOS device always force open Camera on: September 28, 2021, 09:36:51 PM
On Android has the same behavior too. Huh
4  General Category / General Discussion / Re: calendar event onPaint or onRepaint on: October 02, 2020, 06:19:15 PM
Thank you very much.  Grin

Could you please add event 'onNavigate' to Documentation?
5  General Category / EasyUI for jQuery / Re: datagrid formatter disappear after used updateRow method on: September 07, 2020, 06:37:52 AM
 Grin Wow, Work Great! You save my day. Thank you
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.

Code:
<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.
7  General Category / EasyUI for jQuery / Re: How to set maxlength of searchbox and accept only numeric? on: July 05, 2020, 11:43:36 PM
Work great!  Grin Thank you
8  General Category / EasyUI for jQuery / How to set maxlength of searchbox and accept only numeric? on: June 28, 2020, 03:13:49 AM
I tried code but not work.

Code:
$('#sb').searchbox('textbox').attr('maxlength', 10);

And how to set searchbox accept only numeric.


Thank you.
9  General Category / EasyUI for jQuery / Re: How to set collapsedContent when south panel is hide? on: June 16, 2020, 05:57:04 PM
OK. I got a trick.

Code:
var p = $('#itemckout').layout('panel', 'expandSouth'); // id of layout
p.panel('setTitle', 'Item Detail: ' + row.item_barcode + " " + row.title );
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.

Code:
<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.

Quote
$('#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,

Code:
$('#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);
                }
            })
12  General Category / EasyUI for jQuery / Re: How to check the form is dirty or Not? on: June 02, 2020, 08:33:51 PM
In some situation, user changed something on text field and then unchanged but onChange of textfield or combobox event has occurred already. So the form should not dirty.
13  General Category / EasyUI for jQuery / How to check the form is dirty or Not? on: May 29, 2020, 11:14:48 PM
I want to submit a form if form is dirty.
How to check it.

Could you please advice?
Thank you.
14  General Category / EasyUI for jQuery / Re: Combobox not select value while reading text from barcode on: March 06, 2020, 07:27:29 AM
Could you paste your code?
15  General Category / EasyUI for jQuery / Re: Is possible to load form with method 'post' like a load panel on: March 05, 2020, 06:36:32 PM
Wonderful!!  Grin
Pages: [1] 2 3 ... 6
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!