diff --git a/i18n/en-US.json b/i18n/en-US.json index 3ee71d0..db08706 100644 --- a/i18n/en-US.json +++ b/i18n/en-US.json @@ -704,7 +704,8 @@ "spare": "Spare Numbers", "local": "Local Numbers", "tollfree": "Toll-free Numbers", - "international": "International Numbers" + "international": "International Numbers", + "noNumber": "No number available" } } } diff --git a/i18n/fr-FR.json b/i18n/fr-FR.json index b5bd979..6493790 100644 --- a/i18n/fr-FR.json +++ b/i18n/fr-FR.json @@ -100,7 +100,7 @@ "advancedTitle": "Avancés", "basicTitle": "Réglages", "basicSectionTitle": "Réglages basiques", - "dragAndDrop": "Pour sélectionner un codec, glisser-déposer depuis la boite des codecs disponilbes jusqu'à celle des codecs sélectionnés", + "dragAndDrop": "Pour sélectionner un codec, glisser-déposer depuis la boite des codecs disponibles jusqu'à celle des codecs sélectionnés", "options": { "menuTitle": "Réglages" }, @@ -683,7 +683,8 @@ "spare": "Numéros assignés", "local": "Numéros locaux", "tollfree": "Numéros verts", - "international": "Numéros internationaux" + "international": "Numéros internationaux", + "noNumber": "Aucun numéro disponible" } } } diff --git a/metadata/app.json b/metadata/app.json new file mode 100644 index 0000000..37948dc --- /dev/null +++ b/metadata/app.json @@ -0,0 +1,45 @@ +{ + "name": "voip", + "source_url": "http://webdev/monster-modules/voip", + "i18n": { + "en-US": { + "label": "Smart PBX", + "description": "Hosted PBX gives you full control to set up and manage office phone system.", + "extended_description": "It's a complete web portal that allows you to visualize and manage your full-featured PBX without an ounce of hardware. Manage your users, departments, numbers, devices, voicemails, conference bridges in just few simple clicks.", + "features": [ + "Call flows", + "Unlimited extensions", + "Phone auto-provisioner", + "Conferencing", + "Feature codes", + "Manage devices for all users", + "Time of Day Routing", + "Call History", + "All standard call handling features", + "Directory", + "Voicemail boxes" + ] + } + }, + "tags": [ + "reseller" + ], + "icon": "HostedPBX_app.png", + "api_url": "http://10.26.0.41:8000/v2", + "author": "2600Hz", + "version": "1.0", + "license": "-", + "price": 0, + "screenshots": [ + "smartpbx1.png", + "smartpbx2.png", + "smartpbx3.png", + "smartpbx4.png", + "smartpbx5.png" + ], + "urls": { + "documentation": "{documentation_url}", + "howto": "{howto_video_url}" + }, + "pvt_type": "app" +} \ No newline at end of file diff --git a/metadata/icon/HostedPBX_app.png b/metadata/icon/HostedPBX_app.png new file mode 100644 index 0000000..620cfbd Binary files /dev/null and b/metadata/icon/HostedPBX_app.png differ diff --git a/metadata/screenshots/smartpbx1.png b/metadata/screenshots/smartpbx1.png new file mode 100644 index 0000000..8e0a279 Binary files /dev/null and b/metadata/screenshots/smartpbx1.png differ diff --git a/metadata/screenshots/smartpbx2.png b/metadata/screenshots/smartpbx2.png new file mode 100644 index 0000000..ed2cbdc Binary files /dev/null and b/metadata/screenshots/smartpbx2.png differ diff --git a/metadata/screenshots/smartpbx3.png b/metadata/screenshots/smartpbx3.png new file mode 100644 index 0000000..60cfd70 Binary files /dev/null and b/metadata/screenshots/smartpbx3.png differ diff --git a/metadata/screenshots/smartpbx4.png b/metadata/screenshots/smartpbx4.png new file mode 100644 index 0000000..b27d83a Binary files /dev/null and b/metadata/screenshots/smartpbx4.png differ diff --git a/metadata/screenshots/smartpbx5.png b/metadata/screenshots/smartpbx5.png new file mode 100644 index 0000000..f746518 Binary files /dev/null and b/metadata/screenshots/smartpbx5.png differ diff --git a/submodules/myOffice/myOffice.css b/submodules/myOffice/myOffice.css index 003a89c..e219cf0 100644 --- a/submodules/myOffice/myOffice.css +++ b/submodules/myOffice/myOffice.css @@ -73,10 +73,6 @@ #myoffice_container .dashboard-content-div.dashboard-left-content { padding-right: 10px; } -#myoffice_container .dashboard-content-div .link-box:hover { - cursor: pointer; - background: #eeeeee !important; -} #myoffice_container .dashboard-left-content .left-section-header { height: 50px; line-height: 50px; @@ -140,14 +136,17 @@ font-size: 14px; } #myoffice_container .devices-section-content .unregistered-devices .value { - float: right; - color: red; - font-weight: bold; + float: right; + color: red; + font-weight: bold; +} +#myoffice_container .devices-section-content .unregistered-devices .value.none { + color: #22ccff; } #myoffice_container .devices-section-content .unregistered-devices { - margin-top: 25px; - padding: 0px 10px; - font-size: 16px; + margin-top: 25px; + padding: 0px 10px; + font-size: 16px; } /*****************/ @@ -166,6 +165,23 @@ border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; } +#myoffice_container .dashboard-right-content .dashboard-box .dashboard-warning-row { + padding: 10px; + line-height: 40px; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #faa732; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + opacity: 0.8; +} +#myoffice_container .dashboard-right-content .dashboard-box .dashboard-warning-row > i { + margin-right: 10px; + color: #ffffff; +} #myoffice_container .dashboard-right-content .dashboard-box .dashboard-box-row { padding: 10px; background-color: #f6f6f6; @@ -177,7 +193,7 @@ color: #555; } #myoffice_container .dashboard-right-content .dashboard-box .dashboard-box-row.fax-number-row { - display: none; /*Hiding Fax temporarily*/ + display: none; /*Hiding Fax temporarily*/ } #myoffice_container .dashboard-right-content .dashboard-box > * { border-bottom: solid 1px #c0c0c0; @@ -216,10 +232,10 @@ margin: 0; } #myoffice_container .dashboard-right-content .dashboard-box .dashboard-box-row .row-content .number-list li { - line-height: 25px; + line-height: 25px; } #myoffice_container .dashboard-right-content .dashboard-box .dashboard-box-row .row-content .number-list li.caller-id { - color: #22ccff; + color: #22ccff; } #myoffice_container .dashboard-right-content .dashboard-box .dashboard-box-row .row-content .number-list .features > i { display: none; @@ -324,6 +340,25 @@ #myoffice_container .dashboard-right-content .dashboard-box .dashboard-box-div .number-types-legend .legend-number { font-size: 16px; } +#myoffice_container .dashboard-right-content .dashboard-box .dashboard-box-div .number-types-legend .no-number { + line-height: 90px; + font-style: italic; + color: #999; +} + +#myoffice_container .dashboard-content-div .link-box:hover, +#myoffice_container .dashboard-content-div .div-title.link-box:hover { + cursor: pointer; + background: #eeeeee; +} +#myoffice_container .dashboard-right-content .dashboard-box .dashboard-warning-row.link-box:hover { + background-color: #faa732; + background-image: -moz-linear-gradient(top, #f89406, #fbb450); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f89406), to(#fbb450)); + background-image: -webkit-linear-gradient(top, #f89406, #fbb450); + background-image: -o-linear-gradient(top, #f89406, #fbb450); + background-image: linear-gradient(to bottom, #f89406, #fbb450); +} /********** Music-On-Hold Popup **********/ #my_office_music_on_hold_popup .media-dropdown { @@ -348,23 +383,44 @@ /********** Caller ID Popup **********/ #my_office_caller_id_popup .emergency-form { - margin-top: 15px; + margin-top: 15px; } #my_office_caller_id_popup .emergency-form form { - margin: 0px; + margin: 0px; } #my_office_caller_id_popup .emergency-form label { - margin: 0; + margin: 0; } #my_office_caller_id_popup .emergency-form label.monster-invalid { - margin: 12px 0 0 5px; - display: inline-block !important; - font-size: 30px; + margin: 12px 0 0 5px; + display: inline-block !important; + font-size: 30px; } #my_office_caller_id_popup .emergency-form-label { - display: inline-block; - width: 120px; + display: inline-block; + width: 120px; } #my_office_caller_id_popup .caller-id-name { - margin-top: 5px; + margin-top: 5px; +} + +#myoffice_container .warning-pulse-box { + -webkit-animation: "warning-pulse-box" 1s ease-in-out 0 infinite alternate; + + animation-name: warning-pulse-box; + animation-duration: 1s; + animation-timing-function: ease-in-out; + animation-delay: 0; + animation-iteration-count: infinite; + animation-direction: alternate; } + +@-webkit-keyframes warning-pulse-box { + 0% { box-shadow: 0px 0px 5px #fbb450 inset, 0px 0px 5px #f89406; } + 100% { box-shadow: 0px 0px 30px #fbb450 inset, 0px 0px 10px #f89406; } +} + +@keyframes warning-pulse-box { + 0% { box-shadow: 0px 0px 5px #fbb450 inset, 0px 0px 5px #f89406; } + 100% { box-shadow: 0px 0px 30px #fbb450 inset, 0px 0px 10px #f89406; } +} \ No newline at end of file diff --git a/submodules/myOffice/myOffice.js b/submodules/myOffice/myOffice.js index 23197ee..a57b40e 100644 --- a/submodules/myOffice/myOffice.js +++ b/submodules/myOffice/myOffice.js @@ -117,21 +117,25 @@ define(function(require){ percentageInnerCutout: 60 }, devicesChart = new Chart(template.find('#dashboard_devices_chart').get(0).getContext("2d")).Doughnut( + myOfficeData.devicesData.totalCount > 0 ? $.map(myOfficeData.devicesData, function(val) { - return { + return typeof val === 'object' ? { value: val.count, color: val.color - }; - }).sort(function(a, b) { return b.value - a.value ; }), + } : null; + }).sort(function(a, b) { return b.value - a.value ; }) : + [{ value:1, color:"#DDD" }], chartOptions ), assignedNumbersChart = new Chart(template.find('#dashboard_assigned_numbers_chart').get(0).getContext("2d")).Doughnut( + myOfficeData.assignedNumbersData.totalCount > 0 ? $.map(myOfficeData.assignedNumbersData, function(val) { - return { + return typeof val === 'object' ? { value: val.count, color: val.color - }; - }).sort(function(a, b) { return b.value - a.value ; }), + } : null; + }).sort(function(a, b) { return b.value - a.value ; }) : + [{ value:1, color:"#DDD" }], chartOptions ), numberTypesChart = new Chart(template.find('#dashboard_number_types_chart').get(0).getContext("2d")).Doughnut( @@ -141,12 +145,14 @@ define(function(require){ // color: val.color // }; // }).sort(function(a, b) { return b.value - a.value ; }), + myOfficeData.classifiedNumbers.length > 0 ? $.map(myOfficeData.classifiedNumbers, function(val, index) { - return { + return typeof val === 'object' ? { value: val.count, color: val.color - }; - }), + } : null; + }) : + [{ value:1, color:"#DDD" }], chartOptions ); @@ -312,7 +318,8 @@ define(function(require){ label: self.i18n.active().devices.types.ata, count: 0, color: self.chartColors[7] - } + }, + totalCount: 0 }, assignedNumbers = { "spare": { @@ -324,7 +331,8 @@ define(function(require){ label: self.i18n.active().myOffice.numberChartLegend.assigned, count: 0, color: self.chartColors[3] - } + }, + totalCount: 0 }, // numberTypes = { // "local": { @@ -390,6 +398,7 @@ define(function(require){ _.each(data.devices, function(val) { if(val.device_type in devices) { devices[val.device_type].count++; + devices.totalCount++; } else { console.log('Unknown device type: '+val.device_type); } @@ -401,6 +410,7 @@ define(function(require){ } else { assignedNumbers["spare"].count++; } + assignedNumbers.totalCount++; //TODO: Find out the number type and increment the right category // numberTypes["local"].count++; @@ -445,16 +455,17 @@ define(function(require){ } }) - if(!data.mainNumbers || data.mainNumbers.length === 0) { - data.topMessage = { - class: 'btn-warning', - message: self.i18n.active().myOffice.missingMainNumberMessage - } - } else if(!('caller_id' in data.account) - || !('emergency' in data.account.caller_id) - || !('number' in data.account.caller_id.emergency) - || !(data.account.caller_id.emergency.number in data.numbers) - || data.numbers[data.account.caller_id.emergency.number].features.indexOf('dash_e911') < 0) { + if( + data.mainNumbers + && data.mainNumbers.length > 0 + && ( + !('caller_id' in data.account) + || !('emergency' in data.account.caller_id) + || !('number' in data.account.caller_id.emergency) + || !(data.account.caller_id.emergency.number in data.numbers) + || data.numbers[data.account.caller_id.emergency.number].features.indexOf('dash_e911') < 0 + ) + ) { data.topMessage = { class: 'btn-danger', message: self.i18n.active().myOffice.missingE911Message diff --git a/views/myOffice-layout.html b/views/myOffice-layout.html index d87b623..712e39e 100644 --- a/views/myOffice-layout.html +++ b/views/myOffice-layout.html @@ -48,17 +48,19 @@