Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - queensgambit9

Pages: 1 [2] 3 4 ... 21
16
Help for ParamQuery Pro / html tags in json.stringify
« on: June 09, 2020, 05:36:32 pm »
Trying to create clickable link inside json string... in column.render:

render: function (ui) {
        data = JSON.parse(ui.cellData)
        a = data.test
        a.forEach(function(i, j){
        data.test[j].attr ="<a href='http://www....' target='_blank'>test</a>"
            })
        }
        return JSON.stringify(data)

but it won't render correctly in browser...

17
Help for ParamQuery Pro / Prism
« on: June 03, 2020, 05:59:59 pm »
Trying to implement prism (prismjs.com) to highligt json data.

Using in render callback:

Code: [Select]
return '<pre class="language-json"><code class="language-json">' + (JSON.stringify(JSON.parse(ui.cellData), null, 2)) + '</code></pre>' } },
But can't get it work...code is displayed but prism class doesn't seem to be applied...do I need to modify it somehow to make it work with grid?


18
Help for ParamQuery Pro / Re: Custom filter
« on: May 29, 2020, 01:00:34 pm »
Hmm...not sure I understand what you mean. I'll try clarify a bit what I would like to have:

In addition to the standard filters, I would like to have a global filter possibility, ex:

User select some column filters and choose to apply global filter from custom dropdown value 'only team 1 in country b'. In PHP file I check this value and generate SQL for it (added to filterQuery).
That setting should be saved with the state so that the user do not have to select it manually again when loading their state and want to perform same search.

Does it make sense or is there a better way of this?


19
Help for ParamQuery Pro / Re: Custom filter
« on: May 28, 2020, 07:43:53 pm »
No, it is saved in localStorage. The state contain the custom data but it ain't sent to php on:

this.loadState({ state: state })

...do I need to modify postData somehow?
Other grid state info works fine.

20
Help for ParamQuery Pro / Re: Custom filter
« on: May 28, 2020, 05:50:17 pm »
Thanks.

Loading issue:
The custom values does not seem to be sent when state is loaded even though they are set in state...?
How do I send the custom values to php file?

21
Help for ParamQuery Pro / Re: Custom filter
« on: May 28, 2020, 03:05:08 pm »
Got it working by:

Code: [Select]
var state = this.saveState({ stringify: false });

var $toolbar = this.toolbar()
key = $toolbar.find(".filter100").attr('class')
value = $toolbar.find(".filter100").val()

state.key = value
state = JSON.stringify( state )

Thanks.

22
Help for ParamQuery Pro / Re: Custom filter
« on: May 28, 2020, 02:31:51 pm »
Sorry. I pick up the key value and add it to state, but not sure how to proceed:

Code: [Select]
var $toolbar = this.toolbar()
key = $toolbar.find(".filter100").attr('class')
value = $toolbar.find(".filter100").val()

state.key = value

Modified jsfiddle:
https://jsfiddle.net/queensgambit9/n2035zLo/17/

23
Help for ParamQuery Pro / Re: Custom filter
« on: May 27, 2020, 03:10:38 pm »
Thank you.

Trying to add the custom value to save state but can't get it to work. Made a JSFiddle:

https://jsfiddle.net/queensgambit9/n2035zLo/13/

Would like the custom filter to be saved along with state.   

24
Help for ParamQuery Pro / Re: Custom filter
« on: May 26, 2020, 01:23:17 pm »
Ok, thanks.
How can I add the condition to the filterQuery request to DB in a effective way (PHP)?

if ( isset($_POST["custom_param"]))
{
    $pq_custom_params = $_POST["custom_param"];
...
}

25
Help for ParamQuery Pro / Custom filter
« on: May 25, 2020, 07:37:43 pm »
I would like to apply a global filter and have that setting saved along with state data.
Would that be possible?

Ex. User selects 'a' from dropdown which applies
Code: [Select]
WHERE b = 1 to the select from DB.

Using PHP.

26
Help for ParamQuery Pro / Re: Reload tab
« on: February 28, 2020, 01:52:53 pm »
Thank you, works fine.

27
Help for ParamQuery Pro / Re: Reload tab
« on: February 27, 2020, 03:28:25 pm »
https://jsfiddle.net/queensgambit9/g4h0mory/12/

When I click grid title 'test' in Tab 1 I would like to load a state called 'test'.

28
Help for ParamQuery Pro / Re: Reload tab
« on: February 26, 2020, 05:34:31 pm »
Thanks, using:

Code: [Select]
create: function() {
 
    $( '#grid1' ).find(".pq-grid-title").click(function(){
$(this).closest(".pq-grid").pqGrid('refreshDataAndView');
})...

Do not work as I would like it to...grid in current tab should reloaded to its initial state...with above code columns are not restored, filters not removed etc.
Is it correct to use it in create event?

29
Help for ParamQuery Pro / Re: Reload tab
« on: February 26, 2020, 03:30:52 pm »
Ex:

Code: [Select]
title: "<a href='index.php#tab1'>test</a>"
But that doesn't seem to work...

30
Help for ParamQuery Pro / Re: Reload tab
« on: February 25, 2020, 06:35:42 pm »
It is the grid title and not the tab title. Sorry for being unclear.

Pages: 1 [2] 3 4 ... 21