Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom pgtext always show an input type text, config to show only text #1004

Closed
fredsal opened this issue Feb 2, 2022 · 3 comments
Closed

Comments

@fredsal
Copy link
Contributor

fredsal commented Feb 2, 2022

is there a config to show pages just like recordtext, where you can put Page {} of {}, and it will show Page 1 of 5 only as text?,
is there any way to achieve that?

if it doesn't exist, it could be a feature,
actually if you put Page {0} of {1} on pgtext it shows an input Page <input class="ui-pg-input form-control" type="text" size="2" maxlength="7" value="1" role="textbox"> of 5

Actual behaivor
image
New behaivor?
image

On recordtext
image


I propose change the line

$('.ui-pg-input',pgboxes).val(ts.p.page);

To

$('.ui-pg-input',pgboxes).val(ts.p.page).html(ts.p.page);
// Or 
$('.ui-pg-input',pgboxes)[$('.ui-pg-input',pgboxes).first().is(':input')?'val':'html'](ts.p.page);

Now it works using

{
     pgtext : "Page <span class='ui-pg-input'></span> of {1}",
}

Other way(longer)
Creating {2} with "sp_2_"+pgid

please, let me know if i have to do a PR for this

@tonytomov
Copy link
Owner

Hello,

Thank you for the recommendation.
I will look deeper in pager functions and will let you know what we can do.

@tonytomov
Copy link
Owner

I have added this new feature.
Please let me know if it is ok.

Best Regards,
Tony

@fredsal
Copy link
Contributor Author

fredsal commented Feb 3, 2022

It seems to be working now,

Thank you very much

@fredsal fredsal closed this as completed Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants