Joris Tirado 11 years ago
parent
commit
17a3ee8d8c
12 changed files with 171 additions and 47 deletions
  1. +2
    -1
      i18n/en-US.json
  2. +3
    -2
      i18n/fr-FR.json
  3. +45
    -0
      metadata/app.json
  4. BIN
      metadata/icon/HostedPBX_app.png
  5. BIN
      metadata/screenshots/smartpbx1.png
  6. BIN
      metadata/screenshots/smartpbx2.png
  7. BIN
      metadata/screenshots/smartpbx3.png
  8. BIN
      metadata/screenshots/smartpbx4.png
  9. BIN
      metadata/screenshots/smartpbx5.png
  10. +78
    -22
      submodules/myOffice/myOffice.css
  11. +32
    -21
      submodules/myOffice/myOffice.js
  12. +11
    -1
      views/myOffice-layout.html

+ 2
- 1
i18n/en-US.json View File

@ -704,7 +704,8 @@
"spare": "Spare Numbers",
"local": "Local Numbers",
"tollfree": "Toll-free Numbers",
"international": "International Numbers"
"international": "International Numbers",
"noNumber": "No number available"
}
}
}

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

@ -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"
}
}
}

+ 45
- 0
metadata/app.json View File

@ -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"
}

BIN
metadata/icon/HostedPBX_app.png View File

Before After
Width: 512  |  Height: 512  |  Size: 18 KiB

BIN
metadata/screenshots/smartpbx1.png View File

Before After
Width: 350  |  Height: 300  |  Size: 46 KiB

BIN
metadata/screenshots/smartpbx2.png View File

Before After
Width: 350  |  Height: 300  |  Size: 36 KiB

BIN
metadata/screenshots/smartpbx3.png View File

Before After
Width: 350  |  Height: 300  |  Size: 50 KiB

BIN
metadata/screenshots/smartpbx4.png View File

Before After
Width: 350  |  Height: 300  |  Size: 35 KiB

BIN
metadata/screenshots/smartpbx5.png View File

Before After
Width: 350  |  Height: 300  |  Size: 39 KiB

+ 78
- 22
submodules/myOffice/myOffice.css View File

@ -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; }
}

+ 32
- 21
submodules/myOffice/myOffice.js View File

@ -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


+ 11
- 1
views/myOffice-layout.html View File

@ -48,17 +48,19 @@
<div class="devices-chart-legend">
<ul>
{{#each devicesList}}
{{#if label}}
<li class="legend-element{{#unless count}} no-device{{/unless}}">
<i class="icon-circle legend-color" style="color: {{color}};"></i>
<span class="legend-label">{{label}}</span>
<span class="legend-number">{{count}}</span>
</li>
{{/if}}
{{/each}}
</ul>
</div>
</div>
<div class="unregistered-devices clearfix">
<div class="value">{{unregisteredDevices}}</div>
<div class="value{{#unless unregisteredDevices}} none{{/unless}}">{{unregisteredDevices}}</div>
<div class="title">{{i18n.myOffice.unregisteredDevices}}</div>
</div>
</div>
@ -73,6 +75,7 @@
<div class="dashboard-content-div dashboard-right-content">
<div class="dashboard-box">
{{#if mainNumbers.length}}
<div class="dashboard-box-row main-number-row link-box" data-category="strategy" data-subcategory="main-number">
<div class="row-title">
<div>{{i18n.myOffice.mainNumberLabel}}</div>
@ -94,6 +97,11 @@
</ul>
</div>
</div>
{{else}}
<div class="dashboard-warning-row main-number-row link-box" data-category="strategy" data-subcategory="main-number">
<i class="icon-warning-sign"></i>{{../i18n.myOffice.missingMainNumberMessage}}
</div>
{{/if}}
<div class="dashboard-box-row conf-number-row link-box" data-category="strategy" data-subcategory="strategy-confnum">
<div class="row-title">
<div>{{i18n.myOffice.confNumberLabel}}</div>
@ -161,6 +169,8 @@
<span class="legend-label">{{label}}</span>
<span class="legend-number">{{count}}</span>
</li>
{{else}}
<li class="no-number">{{../i18n.myOffice.numberChartLegend.noNumber}}</li>
{{/each}}
</ul>
</div>


Loading…
Cancel
Save