Browse Source

UI-1027: Add checkboxes to select which features to remove

4.3
Joris Tirado 11 years ago
parent
commit
330e9cc9bb
5 changed files with 21 additions and 34 deletions
  1. +3
    -7
      i18n/en-US.json
  2. +3
    -7
      i18n/fr-FR.json
  3. +0
    -4
      i18n/ru-RU.json
  4. +4
    -12
      submodules/strategy/strategy.js
  5. +11
    -4
      views/strategy-popupRemoveFeatures.html

+ 3
- 7
i18n/en-US.json View File

@ -630,14 +630,10 @@
"removeNumberSuccess": "Number successfully removed from the main callflow."
},
"popupRemoveFeatures": {
"title": "Remove Features",
"questionPartOne": "Do you want to remove features from number",
"title": "Features",
"questionPartOne": "Do you want to remove features from",
"questionPartTwo": "?",
"featuresToRemove": "Feature(s) to remove :",
"dialogConfirm": {
"keep": "Keep",
"remove": "Remove"
},
"featuresToRemove": "Check the feature(s) to remove :",
"features": {
"cnam": "Caller-ID",
"dash_e911": "e911"


+ 3
- 7
i18n/fr-FR.json View File

@ -606,14 +606,10 @@
"removeNumberSuccess": "Numéro retiré du callflow principal."
},
"popupRemoveFeatures": {
"title": "Supprimer des fonctionnalités",
"questionPartOne": "Voulez-vous supprimer des fonctionnalités du numéro",
"title": "Fonctionnalités",
"questionPartOne": "Voulez-vous supprimer des fonctionnalités de",
"questionPartTwo": "?",
"featuresToRemove": "Fonctionnalité(s) à supprimer :",
"dialogConfirm": {
"keep": "Garder",
"remove": "Supprimer"
},
"featuresToRemove": "Sélectionner les fonctionnalité(s) à supprimer :",
"features": {
"cnam": "Caller-ID",
"dash_e911": "Adresse d'urgence (e911)"


+ 0
- 4
i18n/ru-RU.json View File

@ -634,10 +634,6 @@
"questionPartOne": "Вы хотите удалить функции с номера",
"questionPartTwo": "?",
"featuresToRemove": "Функции для удаления :",
"dialogConfirm": {
"keep": "Оставить",
"remove": "Удалить"
},
"features": {
"cnam": "Caller-ID",
"dash_e911": "Экстр.выз.911"


+ 4
- 12
submodules/strategy/strategy.js View File

@ -556,25 +556,17 @@ define(function(require){
width: '540px'
});
popup.find('.delete-feature').on('click', function() {
$(this).parents('tr').remove();
if ( popup.find('tbody').is(':empty') ) {
popup.dialog('close');
updateCallflow();
}
});
monster.ui.prettyCheck.create(popup);
popup.find('.cancel-link').on('click', function() {
popup.dialog('close');
updateCallflow();
});
popup.find('#remove_features').on('click', function() {
popup.find('.table td').each(function(idx, elem) {
delete dataNumber[$(this).data('name')];
if ($(elem).find('input').is(':checked')) {
delete dataNumber[$(elem).data('name')];
}
});
self.strategyUpdateNumber(numberToRemove, dataNumber, function() {


+ 11
- 4
views/strategy-popupRemoveFeatures.html View File

@ -1,5 +1,5 @@
<div id="action_confirmation">
<h4>{{i18n.strategy.popupRemoveFeatures.questionPartOne}} <span class="monster-blue">{{phoneNumber}}</span> {{i18n.strategy.popupRemoveFeatures.questionPartTwo}}</h4>
<h4>{{i18n.strategy.popupRemoveFeatures.questionPartOne}} <span class="monster-blue">{{formatPhoneNumber phoneNumber}}</span> {{i18n.strategy.popupRemoveFeatures.questionPartTwo}}</h4>
<div class="table-wrapper">
<table class="table">
<thead>
@ -9,13 +9,20 @@
</thead>
<tbody>
{{#each featureList}}
<tr><td data-name="{{name}}">{{friendlyName}}<i class="icon-remove-circle pull-right delete-feature"></i></td></tr>
<tr>
<td data-name="{{name}}">
<label class="checkbox" for="{{name}}">
<input type="checkbox" id="{{name}}">
{{friendlyName}}
</label>
</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
<div class="actions pull-right">
<a class="cancel-link monster-link blue" href="javascript:void(0);">{{i18n.strategy.popupRemoveFeatures.dialogConfirm.keep}}</a>
<button class="btn btn-danger" id="remove_features">{{i18n.strategy.popupRemoveFeatures.dialogConfirm.remove}}</button>
<a class="cancel-link monster-link blue" href="javascript:void(0);">{{i18n.cancel}}</a>
<button class="btn btn-danger" id="remove_features">{{i18n.remove}}</button>
</div>
</div>

Loading…
Cancel
Save