Browse Source

UI-2256: Updated code for MOVE Feature code

4.3
Jean-Roch Maitre 10 years ago
parent
commit
f58264bc3b
3 changed files with 12 additions and 8 deletions
  1. +6
    -2
      submodules/featureCodes/featureCodes.js
  2. +1
    -1
      submodules/strategy/strategy.js
  3. +5
    -5
      views/featureCodes-layout.html

+ 6
- 2
submodules/featureCodes/featureCodes.js View File

@ -99,7 +99,9 @@ define(function(require){
_.each(featureCodeData, function(callflow) {
// Some old callflows have been created with the feature code key, so we had the check to make sure they also have a name associated
if(callflow.featurecode.hasOwnProperty('name')) {
var category = 'misc';
var category = 'misc',
hasStar = (callflow.hasOwnProperty('numbers') && callflow.numbers.length && callflow.numbers[0].substr(0,1) === '*') || (callflow.hasOwnProperty('patterns') && callflow.patterns.length && callflow.patterns[0].substr(0,3) === '^\\*');
_.find(self.categories, function(cat, key) {
if(cat.indexOf(callflow.featurecode.name) >= 0) {
category = key;
@ -115,10 +117,12 @@ define(function(require){
};
}
console.log(hasStar);
featureCodes[category].codes.push({
key: callflow.featurecode.name,
name: self.i18n.active().featureCodes.labels[callflow.featurecode.name] || callflow.featurecode.name,
number: callflow.featurecode.number ? callflow.featurecode.number.replace(/\\/g,'') : ''
number: callflow.featurecode.number ? callflow.featurecode.number.replace(/\\/g,'') : '',
hasStar: hasStar
});
}
});


+ 1
- 1
submodules/strategy/strategy.js View File

@ -146,7 +146,7 @@ define(function(require){
{
name: 'move',
number: '6683',
callflowNumber: '*6683',
callflowNumber: '6683',
moduleName: 'move'
}
],


+ 5
- 5
views/featureCodes-layout.html View File

@ -5,16 +5,16 @@
<div class="feature-codes-content">
{{#each featureCodes}}
<div class="feature-codes-category">
<div class="category-header">{{this.category}}</div>
<div class="category-header">{{category}}</div>
<div class="category-content">
{{#each this.codes}}
{{#each codes}}
<div class="feature-code-line">
<div class="feature-code-label">
{{this.name}}
{{name}}
</div>
<div class="feature-code">
<div class="code-prefix">*</div>
<div class="code-number">{{this.number}}</div>
<div class="code-prefix">{{#if hasStar}}*{{/if}}</div>
<div class="code-number">{{number}}</div>
</div>
</div>
{{/each}}


Loading…
Cancel
Save