diff --git a/data/CRMEntity.php b/data/CRMEntity.php index 5f5c5b04a5029e3dab314cd979f4510ee120542d..43a5f81a54cc3c6b630490cc64704056d0d98400 100755 --- a/data/CRMEntity.php +++ b/data/CRMEntity.php @@ -267,9 +267,7 @@ class CRMEntity { $groupid = 0; - if(empty($ownerid) && $ownerid === 0 && $module == "Cases"){ - // Allow $ownerid = 0 for Cases module - } else if(empty($ownerid)) { + if (empty($ownerid)) { $ownerid = $current_user->id; } diff --git a/layouts/v7/modules/Vtiger/ListViewQuickPreview.tpl b/layouts/v7/modules/Vtiger/ListViewQuickPreview.tpl index 22744f95297f6b12cfc56f957d28d38efd3d2eed..f03215f9325342f60390a9350683430056d4eb7e 100644 --- a/layouts/v7/modules/Vtiger/ListViewQuickPreview.tpl +++ b/layouts/v7/modules/Vtiger/ListViewQuickPreview.tpl @@ -72,7 +72,7 @@ </div> <br> - {if $MODULE_MODEL->isCommentEnabled() && $MODULE_NAME neq 'Cases'} + {if $MODULE_MODEL->isCommentEnabled()} <div class="quickPreviewComments"> {include file="ListViewQuickPreviewSectionHeader.tpl"|vtemplate_path:$MODULE_NAME TITLE="{vtranslate('LBL_RECENT_COMMENTS',$MODULE_NAME)}"} {include file="QuickViewCommentsList.tpl"|vtemplate_path:$MODULE_NAME} diff --git a/layouts/v7/modules/Vtiger/RecentComments.tpl b/layouts/v7/modules/Vtiger/RecentComments.tpl index 18b574ac227dbc399d5e44bcde84720ffb3e098e..bb7aebc7dcdbd9826e269e6f2173050d84ef411c 100644 --- a/layouts/v7/modules/Vtiger/RecentComments.tpl +++ b/layouts/v7/modules/Vtiger/RecentComments.tpl @@ -108,11 +108,7 @@ </span> <div class=""> - {if $COMMENT->get('module') eq 'Cases' and !$COMMENT->get('is_private')} - {assign var=COMMENT_CONTENT value={decode_html($COMMENT->get('commentcontent'))}} - {else} - {assign var=COMMENT_CONTENT value={nl2br($COMMENT->get('commentcontent'))}} - {/if} + {assign var=COMMENT_CONTENT value={nl2br($COMMENT->get('commentcontent'))}} {if $COMMENT_CONTENT} {assign var=DISPLAYNAME value={decode_html($COMMENT_CONTENT)}} <span class="commentInfoContent" style="display: block" data-fullComment="{$COMMENT_CONTENT|escape:"html"}" data-shortComment="{$DISPLAYNAME|mb_substr:0:200|escape:"html"}..." data-more='{vtranslate('LBL_SHOW_MORE',$MODULE)}' data-less='{vtranslate('LBL_SHOW',$MODULE)} {vtranslate('LBL_LESS',$MODULE)}'> diff --git a/layouts/v7/modules/Vtiger/resources/AdvanceSearchList.js b/layouts/v7/modules/Vtiger/resources/AdvanceSearchList.js index bf1d434bde0629bdee0c91b66746ecb4db040d38..56d99c86fca2d3ab54836c66eda0b3259a3e1c09 100644 --- a/layouts/v7/modules/Vtiger/resources/AdvanceSearchList.js +++ b/layouts/v7/modules/Vtiger/resources/AdvanceSearchList.js @@ -72,39 +72,7 @@ Vtiger_List_Js('Vtiger_AdvanceSearchList_Js',{},{ window.location.href = url +'&'+ $.param(postData); }); }, - - registerAcceptRecordClickEvent: function(){ - jQuery('#searchResults-container').on('click', '.acceptCase', function(e){ - var elem = jQuery(e.currentTarget); - var originalDropDownMenu = elem.closest('.dropdown-menu').data('original-menu'); - var parent = app.helper.getDropDownmenuParent(originalDropDownMenu); - var recordId = parent.closest('tr').data('id'); - var params = { - 'module' : 'Cases', - 'action' : 'SaveAjax', - 'record' : recordId, - 'mode' : 'updateCaseStatus' - } - app.helper.showProgress(); - app.request.post({data:params}).then( - function(error,data) { - app.helper.hideProgress(); - if(error === null) { - app.helper.showSuccessNotification({ - 'message':app.vtranslate('JS_CASE_ACCEPTED_SUCCESSFULLY') - }); - window.location.href = data.url; - } else { - app.helper.showErrorNotification({message : app.vtranslate(error.message)}); - } - } - ); - e.stopPropagation(); - }); - }, - - registerDeleteRecordClickEvent :function(){ var thisInstance = this; jQuery('#searchResults-container').off('click'); diff --git a/layouts/v7/modules/Vtiger/resources/List.js b/layouts/v7/modules/Vtiger/resources/List.js index fd38877a4fd18ff880b853ff2f587b98ded0ac39..aed3b587b663640cf7cf298495ca99323e960942 100644 --- a/layouts/v7/modules/Vtiger/resources/List.js +++ b/layouts/v7/modules/Vtiger/resources/List.js @@ -2426,38 +2426,7 @@ Vtiger.Class("Vtiger_List_Js", { self.registerFloatingThead(); }); }, - /* - * Function to register the list view accept record click event - */ - registerAcceptRecordClickEvent: function () { - jQuery('#page').on('click', '.acceptCase', function (e) { - var elem = jQuery(e.currentTarget); - var originalDropDownMenu = elem.closest('.dropdown-menu').data('original-menu'); - var parent = app.helper.getDropDownmenuParent(originalDropDownMenu); - var recordId = parent.closest('tr').data('id'); - var params = { - 'module': 'Cases', - 'action': 'SaveAjax', - 'record': recordId, - 'mode': 'updateCaseStatus' - } - app.helper.showProgress(); - app.request.post({data: params}).then( - function (error, data) { - app.helper.hideProgress(); - if (error === null) { - app.helper.showSuccessNotification({ - 'message': app.vtranslate('JS_CASE_ACCEPTED_SUCCESSFULLY') - }); - window.location.href = data.url; - } else { - app.helper.showErrorNotification({message: app.vtranslate(error.message)}); - } - } - ); - e.stopPropagation(); - }); - }, + registerEvents: function () { var thisInstance = this; this._super(); @@ -2481,7 +2450,6 @@ Vtiger.Class("Vtiger_List_Js", { this.registerDynamicDropdownPosition(); this.registerDropdownPosition(); this.registerConfigureColumnsEvents(); - this.registerAcceptRecordClickEvent(); var recordSelectTrackerObj = this.getRecordSelectTrackerInstance(); recordSelectTrackerObj.registerEvents();