EasyUI Forum
May 04, 2024, 10:13:18 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1] 2
1  General Category / EasyUI for jQuery / Re: Slider Hours of Day increment of .5 doesnt work [solved] on: February 25, 2018, 11:19:13 AM
Just incase anyone needs it; here is the function i used for the time range in the slider

Code:
function convertToTimeFormat(value) {
        if (value==0) {
            value = '12:00am'
        } else if (value<1) {
            value = '12:30am'
        } else if (value==12) {
            value = '12:00pm'
        } else if (value>12 && value<13) {
            value = '12:30pm'
        } else if (value==24) {
            value = '11:59pm'
        } else if (value>=13) {
            value = value-12
            value += 'pm'
        } else {
            value += 'am'
        }
        if (value.indexOf('.5')) value=value.replace('.5',':30')
        return value
    }
2  General Category / EasyUI for jQuery / Re: Slider Hours of Day increment of .5 doesnt work on: February 25, 2018, 09:39:54 AM
Awesome, works now; thanks
3  General Category / EasyUI for jQuery / Re: Slider Hours of Day increment of .5 doesnt work on: February 23, 2018, 08:10:32 AM
I know in my jsfiddle i had increment - based on docs it should be step, either case it doeen't work for .5

It works for 1.5 but not .5 or 0.5

Other random values below 1 works --  .33 .75, .51, .4 all work
.5 and .25 doesnt
4  General Category / EasyUI for jQuery / Slider Hours of Day increment of .5 doesnt work on: February 22, 2018, 09:36:17 AM
I have this slider that does a range of time thought the day - works fine for each hour, but cant get .5 value so I can convert it to the half hour mark

https://jsfiddle.net/r3us9bkk/2/

5  General Category / EasyUI for jQuery / Re: Auto Execute Combogrid Loader on: October 26, 2017, 01:11:10 PM
I get no errors now - but still not executing my onSelect automatically

            onSelect: function(index, row) { ..... }

I think I will just extract the code from the onSelect and make it a separate function and will call it it from after the selectRow \ selectRecord data result
6  General Category / EasyUI for jQuery / Re: Auto Execute Combogrid Loader on: October 23, 2017, 06:57:17 AM
anyone got any ideas - been trying a few things with no luck - just need a way to initiate onSelect
7  General Category / EasyUI for jQuery / Re: Auto Execute Combogrid Loader on: October 19, 2017, 07:46:53 AM
Thanks - Much better - The result shows in the combogrid

but ... It doesnt call the onSelect function until you actually got to the comboogrid and click on that result
I tried to do this after, but nothing
Code:
            $('#txtUserLookup').combogrid('selectRow',0)
8  General Category / EasyUI for jQuery / Re: Auto Execute Combogrid Loader on: October 18, 2017, 01:37:55 PM
I see the "value" field is populated, it was similar what i was doing which was setValue" -- but either case, it did not show the grid appear with the loader (filtered) results - it just sets the textbox value, doesnt imitate the loader function
9  General Category / EasyUI for jQuery / Auto Execute Combogrid Loader on: October 18, 2017, 07:42:56 AM
I have a combogrid that works fine with the loader when we type text into it

how can I prepopulate the box with the lookup text to start \ execute the loader function so the results will appear in the same combogrid

Code:
 $('#txtUserLookup').combogrid({
            prompt: 'Enter Name to Lookup',
            idField: 'id',
            textField: 'fullname',
            url: '/users',
            method: 'get',
            mode: 'remote',
            columns: [[
                {field:'id',title:'id',width:80},
                {field:'fullname',title:'fullname',width:120},
                {field:'title',title:'title',width:120}
            ]],
            fitColumns: true,
            onBeforeLoad: function(param){
                if (!param.q || param.q.length<2) return false;
            },
            loader: function(param,success,error){
                $.ajax({
                    url: '/users',
                    data: {search: param.q},
                    success: function(result){
                        success(result.data);
                    }
                });
            },
            onSelect: function(index, row) {
               //blah blah blah
            }
        });
10  General Category / EasyUI for jQuery / Pivot to always count on: January 20, 2017, 07:36:50 AM
I have a Pivot Grid with the following setup:
Code:
      pivot:{
                rows:['Team'],
                columns:['Factor'],
                values:[
                    {field:'Username',op:'count'}
                ]
            },

When I use the layout, if I put anything else in the Values, it always sets it to Sum.
How can it so that no matter what field is put into values that it will always do a Count instead of a Sum
11  General Category / General Discussion / Re: Drag-and-Drop to Datagrid getRows on: March 01, 2016, 02:50:28 PM
I could not figure it out any easy way; ended up using the styler to add multiple classes to each drop and use that data for dumping it into an object array to be processed once eveythting was done
12  General Category / General Discussion / Drag-and-Drop to Datagrid getRows on: February 29, 2016, 10:02:47 AM
Hi,

I tweaked the "Creating a School Timeline" tutorial to http://jsfiddle.net/w2cat25h/2

The issue I am having is once you drag something and do getRows, only the "raw" dataset is shown, not any of the values dropped in )check out the console.log to see output result)

How can I accomplish in getting the data dropped into each cell?
13  General Category / General Discussion / Re: EasyUI and Socket.IO on: January 26, 2016, 12:43:22 PM
Do you think I should still use the url: parameter for the datagrid to get the initial data and then jsut run the socket.on for updaterow
or
load all data via socket and then run updateRow as needed ?
14  General Category / General Discussion / EasyUI and Socket.IO on: January 25, 2016, 05:57:42 AM
HI,

I was wondering if I can get some ideas on how to accomplish the following:

I have a grid with 5 columns and around 30 rows.  I need the last column to be real time.  As a workaround, i have been using setInterval, but that loads the whole data (of course I can create another function to get just the data for the last column and update each row, but was hoping to find a way to use Socket.IO instead

How can i leverage realtime data with the datagrid?
15  General Category / General Discussion / Re: Filter with Format and Numbers on: December 16, 2015, 08:53:44 AM
Thanks

I tweaked it a bit as my source was <div style="....">100</div>

Code:
        ngreater: {
            text: 'Greater',
            isMatch: function(source, value){
                source = $(source).find("div").html()               
                return (parseFloat(source)||0) > (parseFloat(value)||0);
            }
        }

Thanks
Pages: [1] 2
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!