function GroupView(e){function t(){n()}function n(){r()}function r(){$(e).on("group_remove group_create",function(t,n){i(n);var r=funcObj.content.getSettingsSrc()[0]||funcObj.content.getCurSrc()[0];srcObj[r]!=undefined&&srcObj[r].getFeature("settings")&&funcObj.settingsBrowse.removeLastPage(!0,!0),e.endSetup()}).on("group_change",function(e,t,n){(n.indexOf("roles")>=0||n.indexOf("groupName")>=0||n.indexOf("groupMaster")>=0||n.indexOf("groupStatus")>=0)&&i(t);if(n.indexOf("groupMaster")>=0){var r=funcObj.content.getSettingsSrc()[0]||funcObj.content.getCurSrc()[0];srcObj[r]!=undefined&&srcObj[r].getFeature("settings")&&funcObj.settingsBrowse.removeLastPage(!0,!0),funcObj.groupCon.recheckGroupDeBounced(t)}})}function i(e){for(var t in e.roles)funcObj.deviceTray.setDevice(e.roles[t])}function s(t){funcObj.message.closeMessage("groupremove"),funcObj.message.createMessage(obj={title:"##TRANS_InternalMessages_Dialogs_Submitting_Title##",copy:"##TRANS_InternalMessages_Dialogs_Submitting_Copy##",modal:!0,close:!1,ref:"submitting",loading:!0,background:!0,buttons:[]}),parallelFlow([function(n){var r=e.getGroupByUID(t);r?e.removeGroup({groupID:r.groupID,onSuccess:function(){n(!0)},onFailure:function(){e.groupCloudController.fetchCloudGroups();for(var t in r.roles)e.groupDeviceController.fetchDeviceGroup(r.roles[t]);setTimeout(function(){var t=e.getGroup(r.groupID);t?n(!1):n(!0)},e.getSpinnerDelay())}}):n(!0)},function(t){setTimeout(function(){t()},e.getSpinnerDelay())}],function(t){funcObj.settingsBrowse.removeLastPage(!0,!0),funcObj.message.closeMessage("submitting");var n=t[0];n?funcObj.message.createQuickMessage("##TRANS_InternalMessages_QuickMessages_GroupDisbanded##"):funcObj.message.createQuickMessage("##TRANS_InternalMessages_QuickMessages_GroupNotDisbanded##",!0,e.getSpinnerDelay())})}this.removeGroup=s,t()};