Show Posts
|
|
Pages: [1] 2 3 ... 16
|
|
3
|
General Category / EasyUI for jQuery / [SOLVED]Change locale dynamic
|
on: January 19, 2026, 04:19:34 AM
|
|
Hi
Have an combobox with locale and a datagrid
<input id="countryCode" name="countryCode" class="easyui-combobox" style="width:200px" data-options=" valueField: 'countryCode', textField: 'countryName', editable: false, data:[ {'countryName':'Danish','countryCode':'da'}, {'countryName':'English','countryCode':'en'} ], onClick: function(rec){ loadLocale(rec.countryCode); }">
How can i set the language in loadLocale function
Have tried a lot of things, but with no luck.
When i load <script src="easyui/easyloader.js"></script> and use easyloader.locale = 'da' in the document ready, it works, but not in loadLocale.
However, if i load easyloader.js then the datagrid on the site is now without filter. Just remove the script tag then filter is back.
Any help
|
|
|
|
|
4
|
General Category / EasyUI for jQuery / Re: Datagrid Cell Color based on column
|
on: January 11, 2026, 09:02:12 AM
|
|
Solution.
Columns: from db (added opacity)
{ "field": "number", "styler": "columnColorStyler('ffcccc','0.5')", "title": "Number 1" }, { "field": "number", "styler": "colColor", "styler": "columnColorStyler('c1ffc1','0.5')", "title": "Number 2" }
Then these 2 functions.
function columnColorStyler(color,colorOpacity){ return function(value){ return 'background-color:'+hexToRGBA(color, colorOpacity) } }
function hexToRGBA(hex, opacity) { return 'rgba(' + (hex).match(new RegExp('(.{' + hex.length/3 + '})', 'g')).map(function(l) { return parseInt(hex.length%2 ? l+l : l, 16) }).concat(isFinite(opacity) ? opacity : 1).join(',') + ')'; }
With this, save an hex color and opacity to db for each column data
If you don't want opacity, use this only
function columnColorStyler(color){ return function(value){ return 'background-color:'+color) } }
|
|
|
|
|
5
|
General Category / EasyUI for jQuery / [SOLVED]Datagrid Cell Color based on column type
|
on: January 10, 2026, 02:53:47 AM
|
|
Hi.
Have problems finding a solution on this.
Populating datagrid with columns from database. The columns has individual colors depending on the type.
ajax call: success: function(data){ data.forEach(col => { if (col.styler){ col.styler = eval(col.styler) } }); $('#dgList').datagrid({ columns:[data], title: data.titleName }) }
Columns:
{ "field": "number", "align": "center", "styler": "colColor", "colorValue": "#ffcccc", "title": "Number 1", "formatter": "formatTooltip" }, { "field": "number", "align": "center", "styler": "colColor", "colorValue": "#c1ffc1", "title": "Number 2", "formatter": "formatTooltip" }
But how to cell style the column based on this individual color
|
|
|
|
|
6
|
General Category / EasyUI for jQuery / Re: Change text in menu item by ID
|
on: January 03, 2026, 04:16:02 PM
|
|
Found solution
var item = $('#menu_setup').menu('findItem', {id:'objID'}); $('#menu_setup').menu('setText', { target: item.target, text: 'New Text' })
Or if you want så search by name
var item = $('#menu_setup').menu('findItem', {name:'xxx'});
|
|
|
|
|
7
|
General Category / EasyUI for jQuery / [SOLVED]Change text in menu item by ID
|
on: January 03, 2026, 06:43:07 AM
|
|
Looking for a way to change the text dynamicaly
<div id="menu_setup" class="easyui-menu"> <div id="upload" data-options="iconCls:'icon-upload'"> <span>(1) Upload</span> <div> <div id="objID" data-options="iconCls:'icon-imageupload'">TEXT TO CHANGE</div> </div> </div> </div>
Tried $('#objID').html('Changed text') and $('#objID').text('Changed text') whiuch both change the text but now there is no icon class and text starts from icon place. See attachement
Happy New Year
Jesper
|
|
|
|
|
11
|
General Category / EasyUI for jQuery / [SOLVED]Drag and drop between datagrids
|
on: December 13, 2025, 02:27:58 PM
|
|
HI.
Have searched around but not found exact what i need.
Have a datagrid with players and 4 datagrids for teams.
Players dg have an ID, playerUUID and playerName column. Team dg has playerUUID and playerName columns
Want to drag from player to a team (and remove it from player). If placed wrong, drag it from team back to player. No dnd between teams.
Need it in a small project in 8 days. ;-)
Any help
Regards Jesper
|
|
|
|
|
13
|
General Category / EasyUI for jQuery / Auto Icons in tree/treegrid
|
on: November 02, 2025, 10:37:07 AM
|
|
Hi.
Want to use the aicon on a tree/treegrid, as on buttons etc.
data.json [ { "id": 1, "text": "Text 1", "iconCls": "aicontest-testicon1", "children": [ { "id": 2, "text": "Text", "iconCls": "aicontest-testicon2" } ] } ]
Then the treenodes just have the default icons
But if i create 2 buttons, they get the test1 and test2 icons
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'aicontest-testicon1',width:80">Test1</a> <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'aicontest-testicon2',width:80">Test2</a>
AND then the tree nodes also get the test1 and test2 icons. Like something not loading.
Need a quick fix if possible.
Regards Jesper
|
|
|
|
|
15
|
General Category / EasyUI for jQuery / Re: Mobile menu Iphone
|
on: August 12, 2025, 08:16:38 AM
|
|
Hi Jarry.
It's excatly the same i do.
Problem is, when you go to the site on an iphone, and click on menu button, the three dots, it open and close the menu again.
It doesn't work on iphone/ipad. Have tried it on both Safari and Chrome, same error
Try your demo/mobile demos/menu/basic. Same problem. Can't show menu on iphone/ipad
|
|
|
|
|