Dirk Gissing
Posts: 0
Joined: Sat Oct 12, 2013 4:18 pm

List divider behavior

Hello, I've tried the solution provided by Yves and the staff of Appery, but I still can't seem to get it right...

This is what happens with my dividers:
Image

As you can see, the dividers are all separate from the data and are not auto-dividing the data.

This is what I have done:
Made a list named "progg", made two items: one called program (this is where the data is) and one called "ProgDivider". I have followed every step provided by Yves, but I did not use Load but Page Show, because my data get's refreshed every time a user clicks on it.

Please advise!

Bikram Ray
Posts: 0
Joined: Wed May 22, 2013 5:52 pm

List divider behavior

Image

Need help on presenting the list from rest api in this format. How can I do it?

  1. Divider line
  2. Conditional Color red on negative item (May be on javascript on response of Rest services?)
Bikram Ray
Posts: 0
Joined: Wed May 22, 2013 5:52 pm

List divider behavior

Sorry I missed the second image with divider line and conditional red color.
Image

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

List divider behavior

Hi Bikram,

  1. You can make UI like you need with custom CSS. For example you can add HTML component to the list and make it 1px height and with #666 background.

  2. You can add to your list component mapping JS like: http://prntscr.com/4nja35/direct

    pre

    //Your appropriate condition to make line red.
    if(value.someParameter 1)
    //Add to goal item some CSS class.
    element.addClass("listItem_selected_red");

    return value;

    /pre

    Then you can add CSS rule based on this "listItem_selected_red" class to make UI you need.

    Regards.

Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

List divider behavior

How can I divide the list by date instead of month?

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

List divider behavior

Hi Ellen,

This is something custom. You can search online for approaches.
Probably someone from community will share a solution.

Amaury González Muro
Posts: 0
Joined: Wed Apr 22, 2015 4:11 pm

List divider behavior

hi, this code dont work for me. The label eventDivider is a out the list event? or is a iten off the list?
thanks, sorry by m english

Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

List divider behavior

I too am looking to make the divider use date. I have found this,
http://www.raymondcamden.com/2013/12/...
but I cannot seem to have success. My list is being populated from a service, and the dates are from a date field in a collection. Has anyone messed around with this before?

Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

List divider behavior

Thank you Yves. This summary helped me get on the right path.

Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

List divider behavior

I managed to figure it out with the help of that link and the rest of this post. However, the code:

$t.refreshScreenFormElements($.mobile.activePage.prop('id'));
Appery("eventList").find("li").eq(0).hide();
return;

unnecessarily hides the first divider for the first item in my list. I would like to hide the last divider since it is showing up unnecessarily. For example if my list has two items, there are three dividers. I need to remove the last one. How would I do that?

Return to “Issues”