EasyUI Forum
May 02, 2024, 01:03:45 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  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.
2  General Category / EasyUI for jQuery / Re: QueryParams not working on: March 29, 2018, 02:20:14 AM
If you

echo $action;


you destroy the output because this is then not a json-object anymore.



3  General Category / EasyUI for jQuery / Re: select all in datagrid with scrollview on: December 21, 2017, 02:52:30 AM
Ok, thanks alot.

I just wasn't sure if I may manipulate this (kind of private) data directly.

My approach should work automatically if server-side reads the query-Params correctly.

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?
5  General Category / EasyUI for jQuery / Re: select all in datagrid with scrollview on: December 20, 2017, 08:39:03 AM
Should I  try to change


$('#dg').data('datagrid').selectedRows

or

$('#dg').data('datagrid').checkedRows


?



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.

7  General Category / General Discussion / Re: Complete program for File upload with FILEBOX on: December 07, 2017, 01:01:29 AM
I tried to paste the parts of a really big programm.

Hope it works without to many modifications.
8  General Category / General Discussion / Re: Complete program for File upload with FILEBOX on: December 07, 2017, 01:00:45 AM
<?php


$f=$_FILES['uploadfile'];
$name=$f['name'];

$dest='/path/to/foo/';

if(move_uploaded_file($f['tmp_name'], fbase . "{$dest}{$name}")) {
   echo json_encode(array('status' => 'ok');
} else {
   echo json_encode(array('status' => 'error');
}



exit();
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>



10  General Category / EasyUI for jQuery / Re: Event in Layout that is called, when Layout resizes on: November 02, 2017, 03:00:46 AM
Ok, thanks a lot.

The region was it, not the layout itself.

11  General Category / EasyUI for jQuery / Event in Layout that is called, when Layout resizes [SOLVED] on: October 12, 2017, 03:02:42 AM
Is there any event for a layout that is called, if the user resizes the page? Did not find such in the documentation.

I only need this in one particular part of the dom because it contains Highcharts and that has to be redrawn then.

Just to be clear: The events from "resize" do not work.



12  General Category / General Discussion / Re: creation of datagrid not working on: March 07, 2017, 08:06:21 AM
You should define "data" outside the ready function and please enclose the whole document in <html> and </html>
13  General Category / General Discussion / Re: Trouble Selecting Tab on: May 03, 2016, 01:04:35 AM
Is the tab enabled?
14  General Category / Bug Report / Re: [solved] Datagrid updateRow not working on: May 01, 2016, 05:37:11 AM
I used in in an ajax callback and it does NOT work until I send refreshRow.

If I use 1.4.3 it works. If I use the patch it works with 1.4.5


But not 1.4.5 without patch.
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?
Pages: [1] 2 3 4
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!