Browse Source

Fixes fo Monster UI v.4.3

pull/4/head
vbarkasov 7 years ago
parent
commit
7ba0422f35
18 changed files with 47 additions and 47 deletions
  1. +11
    -11
      src/apps/callflows/app.js
  2. +1
    -1
      src/apps/callflows/submodules/blacklist/blacklist.js
  3. +2
    -2
      src/apps/callflows/submodules/callcenter/callcenter.js
  4. +1
    -1
      src/apps/callflows/submodules/conference/conference.js
  5. +2
    -2
      src/apps/callflows/submodules/device/device.js
  6. +2
    -2
      src/apps/callflows/submodules/directory/directory.js
  7. +1
    -1
      src/apps/callflows/submodules/faxbox/faxbox.js
  8. +1
    -1
      src/apps/callflows/submodules/featurecodes/featurecodes.js
  9. +5
    -5
      src/apps/callflows/submodules/groups/groups.js
  10. +4
    -4
      src/apps/callflows/submodules/media/media.js
  11. +3
    -3
      src/apps/callflows/submodules/menu/menu.js
  12. +3
    -3
      src/apps/callflows/submodules/misc/misc.js
  13. +1
    -1
      src/apps/callflows/submodules/qubicle/qubicle.js
  14. +1
    -1
      src/apps/callflows/submodules/resource/resource.js
  15. +2
    -2
      src/apps/callflows/submodules/temporalset/temporalset.js
  16. +1
    -1
      src/apps/callflows/submodules/timeofday/timeofday.js
  17. +3
    -3
      src/apps/callflows/submodules/user/user.js
  18. +3
    -3
      src/apps/callflows/submodules/vmbox/vmbox.js

+ 11
- 11
src/apps/callflows/app.js View File

@ -1,6 +1,6 @@
define(function(require){
var $ = require('jquery'),
_ = require('underscore'),
_ = require('lodash'),
monster = require('monster');
require([
@ -29,14 +29,14 @@ define(function(require){
css: [ 'app', 'icons' ],
i18n: {
i18n: {
'en-US': { customCss: false }
},
// Defines API requests not included in the SDK
requests: {},
// Define the events available for other apps
// Define the events available for other apps
subscribe: {
'callflows.fetchActions': 'define_callflow_nodes'
},
@ -342,7 +342,7 @@ define(function(require){
renderEntityManager: function(container) {
var self = this,
entityActions = _.indexBy(_.filter(self.actions, function(action) {
entityActions = _.keyBy(_.filter(self.actions, function(action) {
return action.hasOwnProperty('listEntities');
}), 'module'),
template = $(monster.template(self, 'layout', { actions: entityActions }));
@ -997,7 +997,7 @@ define(function(require){
if(data && data.id) {
self.callApi({
resource: 'callflow.get',
resource: 'callflow.get',
data: {
accountId: self.accountId,
callflowId: data.id
@ -1105,7 +1105,7 @@ define(function(require){
return parent;
},
construct_action: function(json) {
construct_action: function(json) {
var action = '';
if('data' in json) {
@ -1328,7 +1328,7 @@ define(function(require){
}
var metadata = self.dataCallflow.hasOwnProperty('ui_metadata') ? self.dataCallflow.ui_metadata : false,
isHiddenCallflow = metadata && metadata.hasOwnProperty('origin') && _.contains(['voip','migration','mobile', 'callqueues'], metadata.origin);
isHiddenCallflow = metadata && metadata.hasOwnProperty('origin') && _.includes(['voip','migration','mobile', 'callqueues'], metadata.origin);
isHiddenCallflow ? $('#hidden_callflow_warning').show() : $('#hidden_callflow_warning').hide();
},
@ -1557,7 +1557,7 @@ define(function(require){
$('.add_number', popup).click(function(event) {
event.preventDefault();
var number = $('input[name="number_type"]:checked', popup).val() === 'your_numbers' ? $('#list_numbers option:selected', popup).val() : $('#add_number_text', popup).val();
if(number !== 'select_none' && number !== '') {
self.flow.numbers.push(number);
popup.dialog('close');
@ -1599,7 +1599,7 @@ define(function(require){
callflow: self.actions[node.actionName]
}));
// If an API request takes some time, the user can try to re-click on the element, we do not want to let that re-fire a request to the back-end.
// If an API request takes some time, the user can try to re-click on the element, we do not want to let that re-fire a request to the back-end.
// So we set a 500ms timer that will prevent any other interaction with the callflow element.
var isAlreadyClicked = false;
@ -1708,7 +1708,7 @@ define(function(require){
});
$('.node-options .jump', layout).click(function() {
var $this = $(this),
callflowId = $this.attr('id');
self.editCallflow({ id: callflowId });
@ -2029,7 +2029,7 @@ define(function(require){
}
});
tabs.find('li').on('click', function(ev) {
tabs.find('li').on('click', function(ev) {
ev.preventDefault();
var $this = $(this),


+ 1
- 1
src/apps/callflows/submodules/blacklist/blacklist.js View File

@ -1,6 +1,6 @@
define(function(require){
var $ = require('jquery'),
_ = require('underscore'),
_ = require('lodash'),
monster = require('monster');
var app = {


+ 2
- 2
src/apps/callflows/submodules/callcenter/callcenter.js View File

@ -1,6 +1,6 @@
define(function(require){
var $ = require('jquery'),
_ = require('underscore'),
_ = require('lodash'),
toastr = require('toastr'),
monster = require('monster'),
timezone = require('monster-timezone');
@ -141,7 +141,7 @@ define(function(require){
ev.preventDefault();
self.queuePopupEdit({
data: _data,
data: _data,
callback: function(_data) {
node.setMetadata('id', _data.id || 'null');
node.caption = _data.name || '';


+ 1
- 1
src/apps/callflows/submodules/conference/conference.js View File

@ -1,6 +1,6 @@
define(function(require){
var $ = require('jquery'),
_ = require('underscore'),
_ = require('lodash'),
monster = require('monster');
var app = {


+ 2
- 2
src/apps/callflows/submodules/device/device.js View File

@ -1,6 +1,6 @@
define(function(require){
var $ = require('jquery'),
_ = require('underscore'),
_ = require('lodash'),
monster = require('monster');
var app = {
@ -389,7 +389,7 @@ define(function(require){
dataGlobal.extra = dataGlobal.extra || {};
dataGlobal.extra.isShoutcast = false;
// if the value is set to a stream, we need to set the value of the media_id to shoutcast so it gets selected by the old select mechanism,
// if the value is set to a stream, we need to set the value of the media_id to shoutcast so it gets selected by the old select mechanism,
// but we also need to store the value so we can display it
if (dataGlobal.data.hasOwnProperty('music_on_hold') && dataGlobal.data.music_on_hold.hasOwnProperty('media_id')) {
if (dataGlobal.data.music_on_hold.media_id.indexOf('://') >= 0) {


+ 2
- 2
src/apps/callflows/submodules/directory/directory.js View File

@ -1,6 +1,6 @@
define(function(require){
var $ = require('jquery'),
_ = require('underscore'),
_ = require('lodash'),
monster = require('monster');
var app = {
@ -287,7 +287,7 @@ define(function(require){
directoryPopupEdit: function(args) {
var self = this,
popup,
popup,
popup_html,
data = args.data,
callback = args.callback,


+ 1
- 1
src/apps/callflows/submodules/faxbox/faxbox.js View File

@ -1,6 +1,6 @@
define(function(require){
var $ = require('jquery'),
_ = require('underscore'),
_ = require('lodash'),
monster = require('monster'),
timezone = require('monster-timezone');


+ 1
- 1
src/apps/callflows/submodules/featurecodes/featurecodes.js View File

@ -1,6 +1,6 @@
define(function(require){
var $ = require('jquery'),
_ = require('underscore'),
_ = require('lodash'),
monster = require('monster'),
toastr = require('toastr');


+ 5
- 5
src/apps/callflows/submodules/groups/groups.js View File

@ -1,6 +1,6 @@
define(function(require){
var $ = require('jquery'),
_ = require('underscore'),
_ = require('lodash'),
monster = require('monster');
var app = {
@ -47,7 +47,7 @@ define(function(require){
form_data.endpoints = {};
$('.rows .row:not(#row_no_data)', groups_html).each(function(k, v) {
form_data.endpoints[$(v).data('id')] = {
form_data.endpoints[$(v).data('id')] = {
type: $(v).data('type'),
weight: k+1
};
@ -1157,7 +1157,7 @@ define(function(require){
mediaData = isCreation ? {} : { id: $('#ringback', popup_html).val() };
monster.pub('callflows.media.editPopup', {
data: mediaData,
data: mediaData,
callback: function(_mediaData) {
if (_mediaData) {
if (isCreation) {
@ -1290,7 +1290,7 @@ define(function(require){
endpoints.push(item_data);
global_timeout = computeTimeout(parseFloat(item_data.delay), parseFloat(item_data.timeout), global_timeout);
});
if (repeats < 1) {
repeats = 1;
}
@ -1476,7 +1476,7 @@ define(function(require){
delete form_data.users;
return form_data;
},
groupsSave: function(form_data, data, success, error) {
var self = this,
normalized_data = self.groupsNormalizeData($.extend(true, {}, data.data, form_data));


+ 4
- 4
src/apps/callflows/submodules/media/media.js View File

@ -1,6 +1,6 @@
define(function(require){
var $ = require('jquery'),
_ = require('underscore'),
_ = require('lodash'),
monster = require('monster');
var app = {
@ -107,7 +107,7 @@ define(function(require){
if($('#upload_div', media_html).is(':visible') && $('#file').val() != '') {
if(file === 'updating') {
monster.ui.alert(self.i18n.active().callflows.media.the_file_you_want_to_apply);
$this.removeClass('disabled');
}
else {
@ -285,7 +285,7 @@ define(function(require){
data = args.data,
callback = args.callback,
data_defaults = args.data_defaults || {},
popup,
popup,
popup_html = $('<div class="inline_popup callflows-port"><div class="inline_content main_content"/></div>');
self.mediaEdit(data, popup_html, $('.inline_content', popup_html), {
@ -377,7 +377,7 @@ define(function(require){
ev.preventDefault();
self.mediaPopupEdit({
data: _data,
data: _data,
callback: function(media) {
node.setMetadata('id', media.id || 'null');
node.caption = media.name || '';


+ 3
- 3
src/apps/callflows/submodules/menu/menu.js View File

@ -1,6 +1,6 @@
define(function(require){
var $ = require('jquery'),
_ = require('underscore'),
_ = require('lodash'),
monster = require('monster');
var app = {
@ -47,7 +47,7 @@ define(function(require){
monster.parallel({
media_list: function(callback) {
self.callApi({
resource: 'media.list',
resource: 'media.list',
data: {
accountId: self.accountId,
filters: { paginate:false }
@ -101,7 +101,7 @@ define(function(require){
menuPopupEdit: function(data, callback, data_defaults) {
var self = this,
popup,
popup,
popup_html = $('<div class="inline_popup callflows-port"><div class="inline_content main_content"/></div>');
self.menuEdit(data, popup_html, $('.inline_content', popup_html), {


+ 3
- 3
src/apps/callflows/submodules/misc/misc.js View File

@ -1,6 +1,6 @@
define(function(require){
var $ = require('jquery'),
_ = require('underscore'),
_ = require('lodash'),
monster = require('monster');
var app = {
@ -502,7 +502,7 @@ define(function(require){
data_webhook: {
'http_verb': node.getMetadata('http_verb') || 'get',
'retries': node.getMetadata('retries') || '3',
'uri': node.getMetadata('uri') || ''
'uri': node.getMetadata('uri') || ''
}
})),
popup;
@ -510,7 +510,7 @@ define(function(require){
node.setMetadata('http_verb', $('#http_verb option:selected', popup_html).val());
node.setMetadata('retries', $('#retries_input', popup_html).val());
node.setMetadata('uri', $('#uri_input', popup_html).val());
popup.dialog('close');
});


+ 1
- 1
src/apps/callflows/submodules/qubicle/qubicle.js View File

@ -1,6 +1,6 @@
define(function(require) {
var $ = require('jquery'),
_ = require('underscore'),
_ = require('lodash'),
monster = require('monster');
var app = {


+ 1
- 1
src/apps/callflows/submodules/resource/resource.js View File

@ -1,6 +1,6 @@
define(function(require){
var $ = require('jquery'),
_ = require('underscore'),
_ = require('lodash'),
monster = require('monster');
var app = {


+ 2
- 2
src/apps/callflows/submodules/temporalset/temporalset.js View File

@ -1,6 +1,6 @@
define(function(require){
var $ = require('jquery'),
_ = require('underscore'),
_ = require('lodash'),
monster = require('monster');
var app = {
@ -144,7 +144,7 @@ define(function(require){
temporalSetFormatRules: function(data) {
var self = this,
mapRules = _.indexBy(data.field_data.rules, 'id'),
mapRules = _.keyBy(data.field_data.rules, 'id'),
formattedData = {};
formattedData.available = _.map(data.field_data.rules, function(rule) {


+ 1
- 1
src/apps/callflows/submodules/timeofday/timeofday.js View File

@ -1,6 +1,6 @@
define(function(require){
var $ = require('jquery'),
_ = require('underscore'),
_ = require('lodash'),
monster = require('monster'),
timezone = require('monster-timezone');


+ 3
- 3
src/apps/callflows/submodules/user/user.js View File

@ -1,6 +1,6 @@
define(function(require){
var $ = require('jquery'),
_ = require('underscore'),
_ = require('lodash'),
monster = require('monster'),
timezone = require('monster-timezone');
@ -78,7 +78,7 @@ define(function(require){
ev.preventDefault();
self.userPopupEdit({
data: _data,
data: _data,
callback: function(_data) {
node.setMetadata('id', _data.id || 'null');
node.setMetadata('timeout', $('#parameter_input', popup_html).val());
@ -433,7 +433,7 @@ define(function(require){
render_data.extra = render_data.extra || {};
render_data.extra.isShoutcast = false;
// if the value is set to a stream, we need to set the value of the media_id to shoutcast so it gets selected by the old select mechanism,
// if the value is set to a stream, we need to set the value of the media_id to shoutcast so it gets selected by the old select mechanism,
// but we also need to store the value so we can display it
if (render_data.data.hasOwnProperty('music_on_hold') && render_data.data.music_on_hold.hasOwnProperty('media_id')) {
if (render_data.data.music_on_hold.media_id.indexOf('://') >= 0) {


+ 3
- 3
src/apps/callflows/submodules/vmbox/vmbox.js View File

@ -1,6 +1,6 @@
define(function(require){
var $ = require('jquery'),
_ = require('underscore'),
_ = require('lodash'),
monster = require('monster'),
timezone = require('monster-timezone');
@ -431,7 +431,7 @@ define(function(require){
ev.preventDefault();
self.vmboxPopupEdit({
data: _data,
data: _data,
callback: function(vmbox) {
node.setMetadata('id', vmbox.id || 'null');
@ -489,7 +489,7 @@ define(function(require){
// this is also the node we want to use when we drag it onto a callflow as we want the back-end to use the default action set in the schemas
'voicemail[id=*]': getVoicemailNode(true),
// the default action being "compose", the front-end needs a node handling the "compose" action.
// the default action being "compose", the front-end needs a node handling the "compose" action.
// but we set the flag to false so we don't have 2 times the same node in the right list of actions
'voicemail[id=*,action=compose]': getVoicemailNode(false),


Loading…
Cancel
Save