Welcome Guest, Not a member yet? Register   Sign In
Any good and simle CI tutorial on ordering results by clicking on up/down arrows?
#1

[eluser]term25[/eluser]
I mean something like:

Order Title Order-ID

▲ Cat 1
▲ ▼ Dog 2
▲ ▼ Fish 3
▲ ▼ Sheep 4
▲ ▼ Tiger 5
▼ Zebra 6

So when I click on an ▼ arrow it changes the Order-ID of Zebra from 6 to 5 and Tiger's from 5 to 6.

I am looking for some simple way because right now my code is really gross.

Thanks in advance.
#2

[eluser]InsiteFX[/eluser]
You would need to use javascript for something like this, like jQuery's sortable.
#3

[eluser]PhilTem[/eluser]
Do you want to change your data ordering just optically (i.e. just in the view) or within the database? These are two totally different targets/approaches and I'm not a 100% sure, which one you want Wink
#4

[eluser]InsiteFX[/eluser]
@PhilTem, He probaly will need both taking a guess by what he is showing.

This would likly need to be a nested sortable list and stored in the database.

I am goint to be using the jQuery sortable and a nested list for my new backend menu designer.
Yes, when finish I will post it here for all CodeIgniter users for FREE.




Theme © iAndrew 2016 - Forum software by © MyBB