EasyUI Forum
May 18, 2024, 04:29:48 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / General Discussion / Re: clear combobox on: January 25, 2019, 12:03:03 PM
Oh, it's my bug... I used combotree, but in code (copy-pasted) using combobox... that's a reason of my problem. Sorry.
2  General Category / General Discussion / Re: clear combobox on: January 25, 2019, 11:55:49 AM
I always get: "TypeError: $.data(...) is undefined" when trying to clear or unselect item in combobox (combotree in my case).

Code:
<input id="parent_id" class="easyui-combotree form-control" name="parent_id" data-options="prompt:'<?=__('Select Parent')?>'">

var parent = $('#parent_id').combotree({
url: baseUrl+'admin/pagesrest/pages_combotree',
inputEvents: $.extend({}, $.fn.combo.defaults.inputEvents, {
keyup:function(e){
 if(e.keyCode == 46 || e.keyCode == 8){
var value = $('#parent_id').combobox('getText');  // the item value to be selected
$('#parent_id').combobox('unselect', value);
 }
}
}),
icons:[{
iconCls: 'icon-clear',
handler:function(e){
parent.combobox('clear');
}
}]
});
3  General Category / EasyUI for jQuery / Re: localization on: January 04, 2018, 12:55:13 PM
Ok, localization of my own messages I have solved just with global object from correct locale file.

message = {
    somemsg: 'Some message',
    ....
};

and use it everywhere:

$.messager.alert(message.somemsg, ...);

So, I will be glad to see my locale file in new EasyUI update package. No need any author mentions.
4  General Category / EasyUI for jQuery / Re: localization on: January 04, 2018, 09:50:52 AM
I have two short questions in this topic. Can you add my locale for Ukrainian (see in attachment)?

And how can I localize my own messages in my application? Does the EasyUI provide the instruments for that?
5  General Category / General Discussion / Re: How to prevent selection on certain datagrid column click? on: October 31, 2017, 02:21:41 PM
Thank you. I realized it in such way:
Code:
formatter: function (value, row, index) {
var out = '<a class="button_permission_read" data-options="selected:'+(value[0])+'" title="Read"></a>';
out += '<a class="button_permission_add" data-options="selected:'+(value[1])+'" title="Add"></a>';
out += '<a class="button_permission_edit" data-options="selected:'+(value[2])+'" title="Edit"></a>';
out += '<a class="button_permission_delete" data-options="selected:'+(value[3])+'" title="Delete"></a>';

return out;
}

Code:
onLoadSuccess: function (response) {
if (response.status == 'ok') {
$('.button_permission_read').linkbutton({
iconCls: 'icon-ok',
toggle: true
}).click(function (e) {
e.stopPropagation();
});
$('.button_permission_add').linkbutton({
iconCls: 'icon-add',
toggle: true
}).click(function (e) {
e.stopPropagation();
});
$('.button_permission_edit').linkbutton({
iconCls: 'icon-edit',
toggle: true
}).click(function (e) {
e.stopPropagation();
});
$('.button_permission_delete').linkbutton({
iconCls: 'icon-remove',
toggle: true
}).click(function (e) {
e.stopPropagation();
});
}
}

6  General Category / General Discussion / How to prevent selection on certain datagrid column click? on: October 26, 2017, 02:58:26 PM
I have a datagrid with a checkbox column and options checkOnSelect: true and selectOnCheck: true. It's nice.
But I have another one column 'Actions' with linkbuttons. When I click that buttons it changes some states of the database record, but it changes selection state too and it's not nice Smiley

I need to prevent changing of selection when I click the button in 'Action' column of my datagrid. How can I do that?

Thank you.
7  General Category / EasyUI for jQuery / Re: Howto set values for datalist multiselect via ajax? on: October 16, 2017, 09:17:24 AM
Thank you. It's useful.
8  General Category / EasyUI for jQuery / Howto set values for datalist multiselect via ajax? on: October 14, 2017, 12:51:06 PM
I want to use datalist for set roles to the user. When I click to the "Roles" button I show the window with datalist:

Code:
$('#button_roles').linkbutton({
onClick: function () {
var row = gridUsers.datagrid('getSelected');
var windowRoles = $('#window_roles').window({
title: 'Roles of '+row.username
});
var listRoles = $('#list_roles').datalist({
url: baseUrl+'admin/users/rolesrest/userroles',
textField: 'name',
valueField: 'id',
queryParams: {user_id: row.id},
singleSelect: false,
lines: true
});
windowRoles.window('open');
}
});

My restful returns data (as for datagrid) with all roles list. But I need to set selected some roles assigned to the user. What the best way to do it?

Thank you.
9  General Category / EasyUI for jQuery / Re: enter key on textbox on: July 20, 2017, 08:16:23 AM
What about another controls?
For example 'passwordbox' and 'switchbutton'.
I tryied to do $('#password').passwordbox('passwordbox').bind('keyup', ... ); but it does not effect.
10  General Category / General Discussion / Use font-awesome icons in linkbutton on: May 11, 2017, 10:09:17 AM
How to use font-awesome icons in linkbuttons? I tried to set iconCls:'fa fa-user-secret', but it does not work for me. Thanks.
11  General Category / EasyUI for jQuery / Re: disable "select" event on datagrid on: March 09, 2017, 09:19:29 AM
It's better:
Code:
onSelect: function(index, row) {
$(this).datagrid('unselectRow', index);
}
12  General Category / General Discussion / Re: Datagrid enableFilter - isn't working operators menu and filtering ... on: October 25, 2016, 11:03:08 AM
Thank you... I've missed extension part of the site Smiley
13  General Category / General Discussion / Re: Datagrid enableFilter - isn't working operators menu and filtering ... on: October 24, 2016, 05:53:19 PM
Is there documentation on 'enableFilter' and other filter related datagrid options?
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!