Show Posts
|
Pages: [1]
|
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). <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: 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; }
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 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.
|
|
|
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: $('#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.
|
|
|
|