From c669ba8c826bc307181c5d1d20faeb5471dc6986 Mon Sep 17 00:00:00 2001 From: Joris Tirado Date: Tue, 1 May 2018 09:13:40 -0700 Subject: [PATCH] UI-3067: Add tooltips for feature codes (#56) * UI-3067: Restructure i18n to have tooltips for feature codes * UI-3067: Add tooltip text for feature code --- i18n/en-US.json | 169 ++++++++++++++++++----- submodules/featureCodes/featureCodes.css | 9 +- submodules/featureCodes/featureCodes.js | 5 +- views/featureCodes-layout.html | 3 + 4 files changed, 147 insertions(+), 39 deletions(-) diff --git a/i18n/en-US.json b/i18n/en-US.json index 5597cbf..06bce1b 100644 --- a/i18n/en-US.json +++ b/i18n/en-US.json @@ -1151,43 +1151,138 @@ "noFeatureCodeMessage": "There are no feature codes enabled on your account yet. Feature codes are automatically created when you load the Main Number page.", "mainNumberLink": "Go to Main Number", "labels": { - "qubicle login": "Agent Login", - "qubicle set ready": "Set Agent Ready", - "qubicle set away": "Set Agent Away", - "qubicle logout": "Agent Logout", - "call_forward[action=activate]": "Enable Call-Forward", - "call_forward[action=deactivate]": "Disable Call-Forward", - "call_forward[action=toggle]": "Toggle Call-Forward", - "call_forward[action=update]": "Update Call-Forward", - "call_forward[action=on_busy_enable]": "Enable Call-Forward on Busy", - "call_forward[action=on_busy_disable]": "Disable Call-Forward on Busy", - "call_forward[action=no_answer_enable]": "Enable Call-Forward No Answer", - "call_forward[action=no_answer_disable]": "Disable Call-Forward No Answer", - "hotdesk[action=login]": "Enable Hot Desking", - "hotdesk[action=logout]": "Disable Hot Desking", - "hotdesk[action=toggle]": "Toggle Hot Desking", - "voicemail[action=check]": "Check Voicemail", - "voicemail[action=\"direct\"]": "Direct to Voicemail", - "intercom": "Intercom", - "privacy[mode=full]": "Privacy", - "park_and_retrieve": "Park and Retrieve", - "valet": "Valet", - "retrieve": "Retrieve", - "donotdisturb[action=\"enable\"]": "Enable Do not disturb", - "donotdisturb[action=\"disable\"]": "Disable Do not disturb", - "donotdisturb[action=\"toggle\"]": "Toggle Do not disturb", - "directory": "Directory", - "time": "Check Time", - "call_waiting[action=enable]": "Enable Call-Waiting", - "call_waiting[action=disable]": "Disable Call-Waiting", - "sound_test_service": "Sound Test Service", - "call_recording": "Call Recording", - "__comment": "UI-1395: Added voicemail[single_mailbox_login] feature code", - "__version": "3.20", - "voicemail[single_mailbox_login]": "Check Voicemail (auto login)", - "__comment": "UI-2256: adding move feature code", - "__version": "4.0", - "move": "Move" + "qubicle login": { + "label": "Agent Login", + "tooltip": "" + }, + "qubicle set ready": { + "label": "Set Agent Ready", + "tooltip": "" + }, + "qubicle set away": { + "label": "Set Agent Away", + "tooltip": "" + }, + "qubicle logout": { + "label": "Agent Logout", + "tooltip": "" + }, + "call_forward[action=activate]": { + "label": "Enable Call-Forward", + "tooltip": "(Dial *72, then the number to forward to)" + }, + "call_forward[action=deactivate]": { + "label": "Disable Call-Forward", + "tooltip": "(Dial *73)" + }, + "call_forward[action=toggle]": { + "label": "Toggle Call-Forward", + "tooltip": "(Dial *74) The system forwards to that same number as previous forward." + }, + "call_forward[action=update]": { + "label": "Update Call-Forward", + "tooltip": "(Dial *56, then number to forward to) This will update where your calls are forwarded to." + }, + "call_forward[action=on_busy_enable]": { + "label": "Enable Call-Forward on Busy", + "tooltip": "" + }, + "call_forward[action=on_busy_disable]": { + "label": "Disable Call-Forward on Busy", + "tooltip": "" + }, + "call_forward[action=no_answer_enable]": { + "label": "Enable Call-Forward No Answer", + "tooltip": "" + }, + "call_forward[action=no_answer_disable]": { + "label": "Disable Call-Forward No Answer", + "tooltip": "" + }, + "hotdesk[action=login]": { + "label": "Enable Hot Desking", + "tooltip": "(Dial *11 + Hotdesk ID) Hotdesk ID can be configured in SmartPBX under User. All calls will be sent to this device." + }, + "hotdesk[action=logout]": { + "label": "Disable Hot Desking", + "tooltip": "(Dial *12) \"logout\" of this phone." + }, + "hotdesk[action=toggle]": { + "label": "Toggle Hot Desking", + "tooltip": "(Dial *13 + Hotdesk ID) To turn Hotdesk on/off from any device." + }, + "voicemail[action=check]": { + "label": "Check Voicemail", + "tooltip": "(Dial *97 + extension number) You can log into other Mailboxes." + }, + "voicemail[action=\"direct\"]": { + "label": "Direct to Voicemail", + "tooltip": "(Press transfer, then ** + extension number of recipient) Call will go straight to voicemail." + }, + "voicemail[single_mailbox_login]": { + "label": "Check Voicemail (auto login)", + "tooltip": "(Dial *98 then password) If auto-login is enabled, you do not require a password." + }, + "intercom": { + "label": "Intercom", + "tooltip": "(Dial *0 + the extension number) If the phone supports intercom it will answer hands-free and you can speak." + }, + "privacy[mode=full]": { + "label": "Privacy", + "tooltip": "(Dial *67 + the number you are calling) This will block your Caller ID." + }, + "park_and_retrieve": { + "label": "Park and Retrieve", + "tooltip": "(Dial *3) This will announce the next available 'Parking Spot #'. (Dial *3) again to complete Park the call." + }, + "valet": { + "label": "Valet", + "tooltip": "(Dial *4 plus a specific number) to park a call in a specific number. Example: *4 + 101 = call is parked in spot 101" + }, + "retrieve": { + "label": "Retrieve", + "tooltip": "(Dial *5 plus a specific parked number) to retrieve parked call. Example: *5+101 = call is picked up from parking spot 101" + }, + "donotdisturb[action=\"enable\"]": { + "label": "Enable Do not disturb", + "tooltip": "" + }, + "donotdisturb[action=\"disable\"]": { + "label": "Disable Do not disturb", + "tooltip": "" + }, + "donotdisturb[action=\"toggle\"]": { + "label": "Toggle Do not disturb", + "tooltip": "" + }, + "directory": { + "label": "Directory", + "tooltip": "" + }, + "time": { + "label": "Check Time", + "tooltip": "" + }, + "call_waiting[action=enable]": { + "label": "Enable Call-Waiting", + "tooltip": "" + }, + "call_waiting[action=disable]": { + "label": "Disable Call-Waiting", + "tooltip": "" + }, + "sound_test_service": { + "label": "Sound Test Service", + "tooltip": "" + }, + "call_recording": { + "label": "Call Recording", + "tooltip": "" + }, + "move": { + "label": "Move", + "tooltip": "(Dial from any phone not in use) The system will scan for a user's call on a different phone and \"move\" it to this phone." + } }, "__comment": "UI-1028, v3.20_s0: Added categories for the feature codes.", "categories": { diff --git a/submodules/featureCodes/featureCodes.css b/submodules/featureCodes/featureCodes.css index b1d0d8a..73eb43a 100644 --- a/submodules/featureCodes/featureCodes.css +++ b/submodules/featureCodes/featureCodes.css @@ -48,6 +48,13 @@ width: 200px; text-align: right; margin-right: 20px; + padding-right: 25px; + position: relative; +} + +#feature_codes_container .feature-codes-content .feature-code-label i { + position: absolute; + right: 0; } #feature_codes_container .feature-code { @@ -61,4 +68,4 @@ } #feature_codes_container .no-feature-codes .main-number-link { cursor: pointer; -} \ No newline at end of file +} diff --git a/submodules/featureCodes/featureCodes.js b/submodules/featureCodes/featureCodes.js index 68d57b0..74c0f71 100644 --- a/submodules/featureCodes/featureCodes.js +++ b/submodules/featureCodes/featureCodes.js @@ -67,6 +67,8 @@ define(function(require) { self.featureCodesLoadData(function(featureCodesData) { var template = $(monster.template(self, 'featureCodes-layout', { featureCodes: self.featureCodesFormatData(featureCodesData) })); + monster.ui.tooltips(template); + self.featureCodesBindEvents({ parent: parent, template: template, @@ -125,7 +127,8 @@ define(function(require) { featureCodes[category].codes.push({ key: callflow.featurecode.name, - name: self.i18n.active().featureCodes.labels[callflow.featurecode.name] || callflow.featurecode.name, + name: self.i18n.active().featureCodes.labels[callflow.featurecode.name].label || callflow.featurecode.name, + tooltip: self.i18n.active().featureCodes.labels[callflow.featurecode.name].tooltip || undefined, number: callflow.featurecode.number ? callflow.featurecode.number.replace(/\\/g, '') : '', hasStar: hasStar }); diff --git a/views/featureCodes-layout.html b/views/featureCodes-layout.html index f24da20..92767b2 100644 --- a/views/featureCodes-layout.html +++ b/views/featureCodes-layout.html @@ -11,6 +11,9 @@
{{name}} + {{#if tooltip}} + + {{/if}}
{{#if hasStar}}*{{/if}}