Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Sorting Bible verses
(1 viewing) (1) Guest
Go to bottomPage: 123
TOPIC: Sorting Bible verses
#60004
Sorting Bible verses 7 Years ago Karma: 0
Hello,

Is there a way to sort correctly Bible verses in ARI Data Tables without having a separate column for chapter and verse?

For example the correct order of verses should be:
1.3
1.7
1.15
1.27
1.28

But with numeric sorting, it ends up like this:
1.15
1.27
1.28
1.3
1.7

I have also tried sorting by string, separating chapters and verses with : instead of . but that didn't work either.

And by the way, I can't find any information anywhere about what is the difference between numeric, numeric HTML and numeric (advanced) sorting.

Thanks,

AV
The administrator has disabled public write access.
 
#60007
Re:Sorting Bible verses 7 Years ago Karma: 747
Hello,

Your requirement requires a specific sorting rule, we can implement it as a custom development.

About difference between "Numeric", "Numeric HTML" and "Numeric (Advanced)" sorting types. "Numeric" is used if numbers are stored in plain format (like 2, 5 and etc.), "Numeric HTML" is used when values contain some prefix, postfix and etc., in this case all non-numeric characters (excluding - and .) will be removed before sorting, "Number (Advanced)" is used for float numbers.

BTW, If you don't need "Numeric HTML" sorting then you can modify <joomla_directory>/modules/mod_aridatatables/includes/js/widgets/datatables/js/jquery.dataTables.extra.js file and replace the following code:

Code:


var x = a.replace(/[^-.0-9]/g, "");
var y = b.replace(/[^-.0-9]/g, "");



with the following one:

Code:


var x = a.replace(/[^-.0-9]/g, "");
var y = b.replace(/[^-.0-9]/g, "");



and use "Numeric HTML" type to sort Bible verses.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#60008
Re:Sorting Bible verses 7 Years ago Karma: 0
Thanks very much for your answer... but unless I'm missing something, it looks like the two code snippets you provided are exactly identical!
The administrator has disabled public write access.
 
#60009
Re:Sorting Bible verses 7 Years ago Karma: 747
Sorry, replace it with the following code:

Code:


var x = a.replace(/[^-0-9]/g, "");
var y = b.replace(/[^-0-9]/g, "");



Regards,
ARI Soft
The administrator has disabled public write access.
 
#60010
Re:Sorting Bible verses 7 Years ago Karma: 0
Thank you. I have changed the code but it doesn't work. The table seems to just ignore the colon and read the numbers as whole numbers. So it ends up like this:

1:3
2:1
5:1
6:9
7:3
10:6
10:9
1:17
11:9
12:2
1:28
etc.

See here: www.catholicsforisrael.com/resources/613-mitzvot


Is it necessary that chapters and verses be separated by a period . or can they be separated by a colon : instead?

(The colon would be the better option)
Last Edit: 2017/03/27 14:57 By andreville.
The administrator has disabled public write access.
 
#60013
Re:Sorting Bible verses 7 Years ago Karma: 747
In your first post you use . symbol as separator in verses so we provided the solution for this format.

Values with : symbol should be sorted as float numbers?

Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 123