Show Posts
|
Pages: 1 [2] 3 4 ... 13
|
18
|
General Category / EasyUI for jQuery / Re: easyui-menubutton - create a menu with json
|
on: April 22, 2023, 02:17:05 PM
|
Add an onClick to the functions and in the json data add iconClass, if needed, and additional items to tell what should happen in the onClick
var menuData = [{ text: 'File', iconCls: 'icon-add', items: [{ text: 'Exit', iconCls: 'icon-add', link: 'test.asp', linkType: 'window_blank', linkName: 'Testside' }] }];
function createMenuBar(data, container){ $.map(data, function(btn){ var b = $('<a href="javascript:void(0)"></a>').appendTo(container); if (btn.items){ b.menubutton($.extend({}, btn, { menu: createMenu(btn.items) })); } else { b.linkbutton($.extend({}, btn, { plain: true, onClick: function(){ if (item.link) { if (item.linkType == 'window_blank') { window.open(item.link,item.linkName) } } } })); } }); function createMenu(items){ var m = $('<div></div>').appendTo('body').menu(); _create(items); return m; function _create(items, p){ $.map(items, function(item){ m.menu('appendItem', $.extend({}, item, { parent: (p?p.target:null), onclick: function(){ if (item.link) { if (item.linkType == 'window_blank') { window.open(item.link,item.linkName) } } } })); if (item.items){ var p1 = m.menu('findItem', item.text); _create(item.items, p1); } }); } } }
|
|
|
22
|
General Category / EasyUI for jQuery / Re: edatagrid destroyRow and reload
|
on: March 27, 2023, 02:45:03 AM
|
Hi jarry
Yes i see. My code is the same, but not working.
After invistigating i found that you send an json response success:true back.
So when i call my file in destroyUrl it must respond with
response.write "{" & chr(34) & "success" & chr(34) & ":" & chr(34) & "true" & chr(34) & "}"
Then it works
|
|
|
23
|
General Category / EasyUI for jQuery / [SOLVED] edatagrid destroyRow and reload
|
on: March 23, 2023, 03:44:11 AM
|
Hi.
Have problems with edatagrid
When hit button to destroyRow, it calls the url in destroyUrl and it deletes from db. But, it never removes it from the grid.
I can just remove the destroyUrl method and then it removes it from the grid, but then it cant call the db.
Then i thought i could just reload the grid after destroy the record, but it never get into onDestroy.
<a id="removeButton" href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" onclick="$('#dgLimitList').edatagrid('destroyRow')">Fjern</a>
$('#dgLimitList').edatagrid({ url: 'getfromdb.asp?st=limitlist&dataident='+row.dataIdent, onDestroy: function(index,row){ console.log('test'); }, destroyMsg:{ norecord:{ title:'Bemærk', msg:'Ingen række valgt.' }, confirm:{ title:'Bekræft', msg:'Er du sikker på den skal slettes?' } }, autoSave: true, saveUrl: 'data_limitlist.asp?st=insert&dataident='+row.dataIdent, updateUrl: 'data_limitlist.asp?st=update', destroyUrl: 'data_limitlist.asp?st=delete' });
Any help
Regards Jesper
|
|
|
24
|
General Category / EasyUI for jQuery / [SOLVED]Groupbox check items
|
on: March 17, 2023, 11:43:23 AM
|
Hi.
Want to use the groupbox to let user choose weekdays. When check monday and tuesday and save form data, it gives me weekdayslist = 1,2. This is saved in db.
But how to load form data to get monday and tuesday checked ??
<div id="dlg" class="easyui-dialog"> <form id="fm" class="easyui-form"> <div id="weekdaysList" name="weekdaysList" class="easyui-checkgroup" data-options=" data:[ {value:'1',label:'Monday'}, {value:'2',label:'Tuesday'}, {value:'3',label:'Wednesday'}, {value:'4',label:'Thursday}, {value:'5',label:'Friday'} ]"> </div> </form> </div>
function editRecord(){ $('#fm').form('clear'); var row = $('#dgList').datagrid('getSelected'); if (row){ $('#dlg').dialog('open').dialog('setTitle','Edit'); $('#fm').form('load',row); } }
|
|
|
25
|
General Category / EasyUI for jQuery / Re: easyui-linkbutton + hidden
|
on: March 16, 2023, 02:40:47 PM
|
Hi.
You can use <a href="javascript:void(0)" class="easyui-linkbutton" style="display:none">Hello</a>
To show linkbutton from code, give it an id
<a id="linkButton1" href="javascript:void(0)" class="easyui-linkbutton" style="display:none">Hello</a>
Unhide = $('#linkButton1').css('display',''); Hide = $('#linkButton1').css('display','none');
|
|
|
27
|
General Category / EasyUI for jQuery / [SOLVED]Filterbuilder more fields with own editor
|
on: December 24, 2022, 03:06:29 AM
|
If i have this code, and change field from status to typeName, the combobox still have the values from status combobox, not the values from typeName
$('#fb').filterbuilder({ rules: [{ op: 'or', children: [{ field: 'status', op: 'equal', value: '1' }] }], fields: [ { field:'status', title:'Status', editor:{ type:'combobox', options:{ editable:false, width: '200px', data:[ {value:'0',text:'Under udvikling'}, {value:'1',text:'Aktiv'}, {value:'2',text:'Afsluttet'}, {value:'3',text:'Pause'} ] } } },{ field:'typeName', title:'Type', editor:{ type:'combobox', options:{ editable:false, width: '200px', data:[ {value:'Fagspecialist',text:'Fagspecialist'}, {value:'Processejer',text:'Processejer'} ] } } } ], operators: opList })
|
|
|
29
|
General Category / EasyUI for jQuery / Re: Filterbuilder
|
on: December 23, 2022, 01:27:36 AM
|
Tried this. The opList works fine, but the combobox is only a textbox
var opList = [ { op: 'contains', text: 'Indeholder' }, { op: 'equal', text: 'Lig med' }, { op: 'notequal', text: 'Forskellig fra' }, { op: 'beginwith', text: 'begynder med' }, { op: 'endwith', text: 'Slutter med' }, { op: 'less', text: 'Mindre end' }, { op: 'lessorequal', text: 'Mindre end eller lig med' }, { op: 'greater', text: 'Større end' }, { op: 'greaterorequal', text: 'Større end eller lig med' } ]
$(function(){ $('#fb').filterbuilder({ rules: [{ op: 'or', children: [{ field: 'status', op: 'contains', value: '1' }] }], fields: [{ field:'status', title:'Status', operators: opList, editor:{ type:'combobox', options:{ editable:false, width: '200px', data:[ {value:'0',text:'Under udvikling'}, {value:'1',text:'Aktiv'}, {value:'2',text:'Afsluttet'}, {value:'3',text:'Pause'} ] } } }] }) });
|
|
|
30
|
General Category / EasyUI for jQuery / [SOLVED]Filterbuilder editor
|
on: December 21, 2022, 04:59:55 PM
|
Hi.
Can't find the right way to get all the operators into the status field. The combobox is fine, but it uses the op: 'equal. text: 'Equal'
Of course i can write all into the field operators, but if i have more fields, i think it's not the way writing all operators over and over again..
$(function(){ $('#fb').filterbuilder({ rules: [{ op: 'or', children: [{ field: 'status', op: 'contains', value: '1' }] }], fields: [ {field:'status',title:'Status', operators: [ {op:'equal',text:'Equal',editor:{ type:'combobox', options:{ editable:false, width: '200px', data:[ {value:'0',text:'Under udvikling'}, {value:'1',text:'Aktiv'}, {value:'2',text:'Afsluttet'}, {value:'3',text:'Pause'} ] } }} ] } ], operators: [ { op: 'contains', text: 'Indeholder' }, { op: 'equal', text: 'Lig med' }, { op: 'notequal', text: 'Forskellig fra' }, { op: 'beginwith', text: 'begynder med' }, { op: 'endwith', text: 'Slutter med' }, { op: 'less', text: 'Mindre end' }, { op: 'lessorequal', text: 'Mindre end eller lig med' }, { op: 'greater', text: 'Større end' }, { op: 'greaterorequal', text: 'Større end eller lig med' } ] }) });
Jesper
|
|
|
|