Show Posts
|
Pages: [1] 2 3 4
|
1
|
General Category / EasyUI for jQuery / Re: QueryParams not working
|
on: March 29, 2018, 02:29:54 AM
|
And easyui does just post the data and then gets json-data.
However you create that object on server-side it makes no difference for easyui.
Just remove your echo-line.
Else the answer to easyui looks like that:
items[{"nr":"ab","dummy":"dumm"},{"nr":"ab","dummy":"dumm"}]
That can't work. Try to JSON.parse() it, there will be no result.
|
|
|
4
|
General Category / EasyUI for jQuery / Re: select all in datagrid with scrollview
|
on: December 20, 2017, 09:00:16 AM
|
I now do the following:
onSelectAll: function() { var dg=$(this); var opts=dg.datagrid('options'); var params={ sort: opts.sortName, order: opts.sortOrder, page:1, rows: dg.datagrid('getData').total }; $.extend(params,opts.queryParams); $.post(opts.url, params, function(data) { dg.data('datagrid').selectedRows = data.rows; dg.data('datagrid').checkedRows = data.rows;
},'json'); },
Seems to work at first glance, but is that reliable?
|
|
|
6
|
General Category / EasyUI for jQuery / select all in datagrid with scrollview [SOLVED]
|
on: December 20, 2017, 08:34:42 AM
|
Hi,
is there any solution for the "selectAll" function in a datagrid with scrollview?
Can one load all data somehow unvisible into the grid and do only the rendering of the grid on the scoll-events?
Or can one access the array returned by
datagrid('getSelections') and modify it, that it could contain ALL data? This should be sufficent to make an Ajax-call and get the whole data.
Thanks in advance.
|
|
|
9
|
General Category / General Discussion / Re: Complete program for File upload with FILEBOX
|
on: December 07, 2017, 12:58:11 AM
|
<script>
function putfile(mform) { var url='upload.php';
var fname=mform.find('.uploadfile').val(); fname=fname.split('\\').pop().split('/').pop();
$('#progressbar').progressbar({ value: 0, text: 'Upload of "' + fname + '", progress: {value}%' });
$('#progress').dialog({ modal:true, title:false });
$(mform[0]).form('submit', { url: url, type: 'POST', onProgress: function(percent) { $('#progressbar').progressbar({ value: percent }); }, iframe: false, success: function(d) { var data=JSON.parse(d); $('#progress').dialog('close'); if(typeof data.error != 'undefined') { alert(data.error); } else { $(from).closest('.upload').find('.loadlink').val(data.url); } }, error: function(data) { $('#progress').dialog('close'); alert('Fehler im Prozess'); }, cache: false, contentType: false, dataType: 'json', processData: false }); }
</script>
<div id='progress' style='display:none'> <div id="progressbar" style="width:400px;" class="easyui-progressbar"></div> </div>
<form class='uploadform'> <input type='file' class='uploadfile' name='uploadfile' onchange='putfile(this)' width='200px' /> <input type='hidden' name='target' value='information for uploadscript here' /> </form>
|
|
|
15
|
General Category / Bug Report / Re: Datagrid updateRow not working
|
on: April 29, 2016, 03:14:11 AM
|
I now did the following fix:
(function($){ var updateRow = $.fn.datagrid.methods.updateRow; $.fn.datagrid.methods.updateRow = function(jq, options){ updateRow(jq, options); $(jq).datagrid('refreshRow', options.index); } })(jQuery);
so it works throughout the whole application without changing every single piece.
Is that ok?
|
|
|
|