Order Header and Footer lists by name field not by table id
authorSeamus Lee <seamuslee001@gmail.com>
Thu, 6 Aug 2015 21:34:42 +0000 (21:34 +0000)
committerSeamus Lee <seamuslee001@gmail.com>
Thu, 6 Aug 2015 21:34:42 +0000 (21:34 +0000)
ang/crmMailing/BlockHeaderFooter.html

index 45c47ee32ab509c86942c38c12fd9073636ecf5f..249560d7856e92bb3b2ce566fda165d6303ae179 100644 (file)
@@ -12,7 +12,7 @@ Required vars: mailing, crmMailingConst
         ui-options="{dropdownAutoWidth : true, allowClear: true}"
         ng-change="checkTokens(mailing, '*')"
         ng-model="mailing.header_id"
-        ng-options="mc.id as mc.name for mc in crmMailingConst.headerfooterList | filter:{component_type: 'Header'}">
+        ng-options="mc.id as mc.name for mc in crmMailingConst.headerfooterList | filter:{component_type: 'Header'} | orderBy:'name'">
         <option value=""></option>
       </select>
     </div>
@@ -24,7 +24,7 @@ Required vars: mailing, crmMailingConst
         ui-options="{dropdownAutoWidth : true, allowClear: true}"
         ng-change="checkTokens(mailing, '*')"
         ng-model="mailing.footer_id"
-        ng-options="mc.id as mc.name for mc in crmMailingConst.headerfooterList | filter:{component_type: 'Footer'}">
+        ng-options="mc.id as mc.name for mc in crmMailingConst.headerfooterList | filter:{component_type: 'Footer'} | orderBy:'name'">
         <option value=""></option>
       </select>
     </div>