Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-1149

Some states/provinces are not listed alphabetically

    Details

      Description

      States & provinces for some countries are not listed alphabetically in their drop downs.

      This has been confirmed for Italy in the create contact form on the client profile. Other countries are affected as well. See http://www.blesta.com/forums/index.php?/topic/2402-order-the-state-field-in-descending-a-z/

      My guess is that we may not be sorting these by the state name descending and that most appear alphabetically because of their insert order.

        Issue Links

          Activity

          Hide
          tyson Tyson Phillips (Inactive) added a comment -

          States are sorted by key rather than value. Since some provinces are numeric rather than alphabetical, like the first 20 or so provinces in Italy, they can appear mixed. We can consider sorting by value (name) instead.

          Show
          tyson Tyson Phillips (Inactive) added a comment - States are sorted by key rather than value. Since some provinces are numeric rather than alphabetical, like the first 20 or so provinces in Italy, they can appear mixed. We can consider sorting by value (name) instead.
          Hide
          tyson Tyson Phillips (Inactive) added a comment -

          This issue is brought up by how browsers choose to interpret the ECMAScript specifications for iterating over object properties in Javascript.

          Blesta correctly sorts the states before they are sent to the browser, but they are then not rendered in the browser correctly due to this interpretation. The specifications maintain an "unordered list" (similar to a hashmap) for object properties, so the browser interpretation cannot be relied upon.

          Show
          tyson Tyson Phillips (Inactive) added a comment - This issue is brought up by how browsers choose to interpret the ECMAScript specifications for iterating over object properties in Javascript. Blesta correctly sorts the states before they are sent to the browser, but they are then not rendered in the browser correctly due to this interpretation. The specifications maintain an "unordered list" (similar to a hashmap) for object properties, so the browser interpretation cannot be relied upon.

            People

            • Assignee:
              tyson Tyson Phillips (Inactive)
              Reporter:
              admin Paul Phillips
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                2/May/14