From 9d3f4bb1af765f2e8ee527da1e28acc894b9a126 Mon Sep 17 00:00:00 2001 From: satish <satish.dvnk@vtiger.com> Date: Mon, 19 Dec 2016 20:55:03 +0530 Subject: [PATCH] Fixed: supporting to import and export Calendar records supporting Documents creation from related list --- layouts/v7/modules/Calendar/Export.tpl | 60 -- layouts/v7/modules/Documents/ModuleHeader.tpl | 249 ++++---- .../v7/modules/Documents/UploadDocument.tpl | 277 +++++---- .../modules/Documents/resources/Documents.js | 541 +----------------- .../v7/modules/Settings/Vtiger/TaxIndex.tpl | 60 +- layouts/v7/modules/Vtiger/Export.tpl | 6 +- layouts/v7/modules/Vtiger/resources/List.js | 1 + .../Vtiger/uitypes/StringDetailView.tpl | 2 + modules/Calendar/actions/ExportData.php | 5 + modules/Calendar/views/Export.php | 16 - modules/Calendar/views/Import.php | 3 + modules/Documents/models/Module.php | 44 -- modules/Documents/views/QuickCreateAjax.php | 25 +- modules/Migration/schema/660_to_700.php | 5 + test/template_imgfiles/default.png | Bin 0 -> 14136 bytes 15 files changed, 330 insertions(+), 964 deletions(-) delete mode 100644 layouts/v7/modules/Calendar/Export.tpl create mode 100644 test/template_imgfiles/default.png diff --git a/layouts/v7/modules/Calendar/Export.tpl b/layouts/v7/modules/Calendar/Export.tpl deleted file mode 100644 index 9e7945aa7..000000000 --- a/layouts/v7/modules/Calendar/Export.tpl +++ /dev/null @@ -1,60 +0,0 @@ -{*<!-- -/********************************************************************************* -** The contents of this file are subject to the vtiger CRM Public License Version 1.0 -* ("License"); You may not use this file except in compliance with the License -* The Original Code is: vtiger CRM Open Source -* The Initial Developer of the Original Code is vtiger. -* Portions created by vtiger are Copyright (C) vtiger. -* All Rights Reserved. -* -********************************************************************************/ --->*} - -<div class="fc-overlay-modal modal-content"> - <form id="exportForm" class="form-horizontal" method="post" action="index.php"> - <input type="hidden" name="module" value="{$SOURCE_MODULE}" /> - <input type="hidden" name="source_module" value="{$SOURCE_MODULE}" /> - <input type="hidden" name="action" value="ExportData" /> - <input type="hidden" name="viewname" value="{$VIEWID}" /> - <input type="hidden" name="selected_ids" value={ZEND_JSON::encode($SELECTED_IDS)}> - <input type="hidden" name="excluded_ids" value={ZEND_JSON::encode($EXCLUDED_IDS)}> - <input type="hidden" id="page" name="page" value="{$PAGE}" /> - <input type="hidden" value="export" name="view"> - - <div class="overlayHeader"> - {include file="ModalHeader.tpl"|vtemplate_path:$MODULE TITLE={vtranslate('LBL_EXPORT_RECORDS', $MODULE)}} - </div> - <div class="modal-body" style="margin-bottom:250px"> - <div class="well exportContents"> - <div> - <label style ="font-weight:normal"> {vtranslate('LBL_EXPORT_FILE_NAME',$MODULE)}</label> - <input type='text' name='filename' id='filename' size='25' value='vtiger.calendar'/> - </div> - <hr> - <div> - <input type="radio" name="mode" value="ExportSelectedRecords" id ="group1" {if !empty($SELECTED_IDS)} checked="checked" {else} disabled="disabled"{/if} /> - <label style ="font-weight:normal" for="group1"> {vtranslate('LBL_EXPORT_SELECTED_RECORDS',$MODULE)}</label> - {if empty($SELECTED_IDS)} <span style ="color:red">{vtranslate('LBL_NO_RECORD_SELECTED',$MODULE)}</span>{/if} - </div> - <br> - <div> - <input type="radio" name="mode" value="ExportCurrentPage" id ="group2"/> - <label style ="font-weight:normal" for="group2"> {vtranslate('LBL_EXPORT_DATA_IN_CURRENT_PAGE',$MODULE)}</label> - </div> - <br> - <div> - <input type="radio" name="mode" value="ExportAllData" id ="group3" {if empty($SELECTED_IDS)} checked="checked" {/if}/> - <label style ="font-weight:normal" for="group3"> {vtranslate('LBL_EXPORT_ALL_DATA',$MODULE)}</label> - </div> - </div> - </div> - <div class='modal-overlay-footer clearfix'> - <div class="row clearfix"> - <div class='textAlignCenter col-lg-12 col-md-12 col-sm-12 '><button type="submit" class="btn btn-success btn-lg">{vtranslate($MODULE, $MODULE)} {vtranslate($SOURCE_MODULE, $MODULE)}</button> - <a class='cancelLink' data-dismiss="modal" href="#">{vtranslate('LBL_CANCEL', $MODULE)}</a> - </div> - </div> - </div> - </form> -</div> - diff --git a/layouts/v7/modules/Documents/ModuleHeader.tpl b/layouts/v7/modules/Documents/ModuleHeader.tpl index 3a7a772ce..233212f49 100644 --- a/layouts/v7/modules/Documents/ModuleHeader.tpl +++ b/layouts/v7/modules/Documents/ModuleHeader.tpl @@ -8,132 +8,129 @@ * All Rights Reserved. ************************************************************************************/ -->*} - + {strip} - <div class="col-sm-12 col-xs-12 module-action-bar clearfix coloredBorderTop"> - <div class="module-action-content clearfix"> - <div class="col-lg-7 col-md-7 module-breadcrumb module-breadcrumb-{$smarty.request.view}"> - {assign var=MODULE_MODEL value=Vtiger_Module_Model::getInstance($MODULE)} - {if $MODULE_MODEL->getDefaultViewName() neq 'List'} - {assign var=DEFAULT_FILTER_URL value=$MODULE_MODEL->getDefaultUrl()} - {else} - {assign var=DEFAULT_FILTER_ID value=$MODULE_MODEL->getDefaultCustomFilter()} - {if $DEFAULT_FILTER_ID} - {assign var=CVURL value="&viewname="|cat:$DEFAULT_FILTER_ID} - {assign var=DEFAULT_FILTER_URL value=$MODULE_MODEL->getListViewUrl()|cat:$CVURL} - {else} - {assign var=DEFAULT_FILTER_URL value=$MODULE_MODEL->getListViewUrlWithAllFilter()} - {/if} - {/if} - <a title="{vtranslate($MODULE, $MODULE)}" href='{$DEFAULT_FILTER_URL}&app={$SELECTED_MENU_CATEGORY}'><h4 class="module-title pull-left textOverflowEllipsis text-uppercase"> {vtranslate($MODULE, $MODULE)} </h4> </a> - {if $smarty.session.lvs.$MODULE.viewname} - {assign var=VIEWID value=$smarty.session.lvs.$MODULE.viewname} - {/if} - {if $VIEWID} - {foreach item=FILTER_TYPES from=$CUSTOM_VIEWS} - {foreach item=FILTERS from=$FILTER_TYPES} - {if $FILTERS->get('cvid') eq $VIEWID} - {assign var=CVNAME value=$FILTERS->get('viewname')} - {break} - {/if} - {/foreach} - {/foreach} - <p class="current-filter-name filter-name pull-left cursorPointer" title="{$CVNAME}"><span class="fa fa-angle-right pull-left" aria-hidden="true"></span><a href='{$MODULE_MODEL->getListViewUrl()}&viewname={$VIEWID}'> {$CVNAME} </a> </p> - {/if} - {assign var=SINGLE_MODULE_NAME value='SINGLE_'|cat:$MODULE} - {if $RECORD and $smarty.request.view eq 'Edit'} - <p class="current-filter-name filter-name pull-left "><span class="fa fa-angle-right pull-left" aria-hidden="true"></span><a title="{$RECORD->get('label')}"> {vtranslate('LBL_EDITING', $MODULE)} : {$RECORD->get('label')} </a></p> - {else if $smarty.request.view eq 'Edit'} - <p class="current-filter-name filter-name pull-left "><span class="fa fa-angle-right pull-left" aria-hidden="true"></span><a> {vtranslate('LBL_ADDING_NEW', $MODULE)} </a></p> - {/if} - {if $smarty.request.view eq 'Detail'} - <p class="current-filter-name filter-name pull-left"><span class="fa fa-angle-right pull-left" aria-hidden="true"></span><a title="{$RECORD->get('label')}"> {$RECORD->get('label')} </a></p> - {/if} - </div> - <div class="col-lg-5 col-md-5 pull-right "> - <div id="appnav" class="navbar-right"> - <ul class="nav navbar-nav"> - {foreach item=BASIC_ACTION from=$MODULE_BASIC_ACTIONS} - {if $BASIC_ACTION->getLabel() eq 'LBL_ADD_RECORD'} - <li> - <div> - <button type="button" class="btn btn-default module-buttons dropdown-toggle" data-toggle="dropdown"> - <span class="fa fa-plus" title="{vtranslate('LBL_NEW_DOCUMENT', $MODULE)}"></span> {vtranslate('LBL_NEW_DOCUMENT', $MODULE)} <span class="caret"></span> - </button> - <ul class="dropdown-menu"> - <li class="dropdown-header"><i class="fa fa-upload"></i> {vtranslate('LBL_FILE_UPLOAD', $MODULE)}</li> - <li id="VtigerAction"> - <a href="javascript:Documents_Index_Js.uploadTo('Vtiger')"> - <img style=" margin-top: -3px;margin-right: 4%;" title="Vtiger" alt="Vtiger" src="layouts/v7/skins//images/Vtiger.png"> - {vtranslate('LBL_TO_SERVICE', $MODULE_NAME, {vtranslate('LBL_VTIGER', $MODULE_NAME)})} - </a> - </li> - <li role="separator" class="divider"></li> - <li class="dropdown-header"><i class="fa fa-link"></i> {vtranslate('LBL_LINK_EXTERNAL_DOCUMENT', $MODULE)}</li> - <li id="shareDocument"><a href="javascript:Documents_Index_Js.createDocument('E')"> <i class="fa fa-external-link"></i> {vtranslate('LBL_FROM_SERVICE', $MODULE_NAME, {vtranslate('LBL_FILE_URL', $MODULE_NAME)})}</a></li> - <li role="separator" class="divider"></li> - <li id="createDocument"><a href="javascript:Documents_Index_Js.createDocument('W')"><i class="fa fa-file-text"></i> {vtranslate('LBL_CREATE_NEW', $MODULE_NAME, {vtranslate('SINGLE_Documents', $MODULE_NAME)})}</a></li> - </ul> - </div> - </li> - {/if} + <div class="col-sm-12 col-xs-12 module-action-bar clearfix coloredBorderTop"> + <div class="module-action-content clearfix"> + <div class="col-lg-7 col-md-7 module-breadcrumb module-breadcrumb-{$smarty.request.view}"> + {assign var=MODULE_MODEL value=Vtiger_Module_Model::getInstance($MODULE)} + {if $MODULE_MODEL->getDefaultViewName() neq 'List'} + {assign var=DEFAULT_FILTER_URL value=$MODULE_MODEL->getDefaultUrl()} + {else} + {assign var=DEFAULT_FILTER_ID value=$MODULE_MODEL->getDefaultCustomFilter()} + {if $DEFAULT_FILTER_ID} + {assign var=CVURL value="&viewname="|cat:$DEFAULT_FILTER_ID} + {assign var=DEFAULT_FILTER_URL value=$MODULE_MODEL->getListViewUrl()|cat:$CVURL} + {else} + {assign var=DEFAULT_FILTER_URL value=$MODULE_MODEL->getListViewUrlWithAllFilter()} + {/if} + {/if} + <a title="{vtranslate($MODULE, $MODULE)}" href='{$DEFAULT_FILTER_URL}&app={$SELECTED_MENU_CATEGORY}'><h4 class="module-title pull-left textOverflowEllipsis text-uppercase"> {vtranslate($MODULE, $MODULE)} </h4> </a> + {if $smarty.session.lvs.$MODULE.viewname} + {assign var=VIEWID value=$smarty.session.lvs.$MODULE.viewname} + {/if} + {if $VIEWID} + {foreach item=FILTER_TYPES from=$CUSTOM_VIEWS} + {foreach item=FILTERS from=$FILTER_TYPES} + {if $FILTERS->get('cvid') eq $VIEWID} + {assign var=CVNAME value=$FILTERS->get('viewname')} + {break} + {/if} + {/foreach} + {/foreach} + <p class="current-filter-name filter-name pull-left cursorPointer" title="{$CVNAME}"><span class="fa fa-angle-right pull-left" aria-hidden="true"></span><a href='{$MODULE_MODEL->getListViewUrl()}&viewname={$VIEWID}'> {$CVNAME} </a> </p> + {/if} + {assign var=SINGLE_MODULE_NAME value='SINGLE_'|cat:$MODULE} + {if $RECORD and $smarty.request.view eq 'Edit'} + <p class="current-filter-name filter-name pull-left "><span class="fa fa-angle-right pull-left" aria-hidden="true"></span><a title="{$RECORD->get('label')}"> {vtranslate('LBL_EDITING', $MODULE)} : {$RECORD->get('label')} </a></p> + {else if $smarty.request.view eq 'Edit'} + <p class="current-filter-name filter-name pull-left "><span class="fa fa-angle-right pull-left" aria-hidden="true"></span><a> {vtranslate('LBL_ADDING_NEW', $MODULE)} </a></p> + {/if} + {if $smarty.request.view eq 'Detail'} + <p class="current-filter-name filter-name pull-left"><span class="fa fa-angle-right pull-left" aria-hidden="true"></span><a title="{$RECORD->get('label')}"> {$RECORD->get('label')} </a></p> + {/if} + </div> + <div class="col-lg-5 col-md-5 pull-right "> + <div id="appnav" class="navbar-right"> + <ul class="nav navbar-nav"> + {foreach item=BASIC_ACTION from=$MODULE_BASIC_ACTIONS} + {if $BASIC_ACTION->getLabel() eq 'LBL_ADD_RECORD'} + <li> + <div> + <button type="button" class="btn btn-default module-buttons dropdown-toggle" data-toggle="dropdown"> + <span class="fa fa-plus" title="{vtranslate('LBL_NEW_DOCUMENT', $MODULE)}"></span> {vtranslate('LBL_NEW_DOCUMENT', $MODULE)} <span class="caret"></span> + </button> + <ul class="dropdown-menu"> + <li class="dropdown-header"><i class="fa fa-upload"></i> {vtranslate('LBL_FILE_UPLOAD', $MODULE)}</li> + <li id="VtigerAction"> + <a href="javascript:Documents_Index_Js.uploadTo('Vtiger')"> + <img style=" margin-top: -3px;margin-right: 4%;" title="Vtiger" alt="Vtiger" src="layouts/v7/skins//images/Vtiger.png"> + {vtranslate('LBL_TO_SERVICE', $MODULE_NAME, {vtranslate('LBL_VTIGER', $MODULE_NAME)})} + </a> + </li> + <li role="separator" class="divider"></li> + <li class="dropdown-header"><i class="fa fa-link"></i> {vtranslate('LBL_LINK_EXTERNAL_DOCUMENT', $MODULE)}</li> + <li id="shareDocument"><a href="javascript:Documents_Index_Js.createDocument('E')"> <i class="fa fa-external-link"></i> {vtranslate('LBL_FROM_SERVICE', $MODULE_NAME, {vtranslate('LBL_FILE_URL', $MODULE_NAME)})}</a></li> + <li role="separator" class="divider"></li> + <li id="createDocument"><a href="javascript:Documents_Index_Js.createDocument('W')"><i class="fa fa-file-text"></i> {vtranslate('LBL_CREATE_NEW', $MODULE_NAME, {vtranslate('SINGLE_Documents', $MODULE_NAME)})}</a></li> + </ul> + </div> + </li> + {/if} + {/foreach} - {/foreach} - - {if $MODULE_SETTING_ACTIONS|@count gt 0} - <li> - <div class="settingsIcon"> - <button type="button" class="btn btn-default module-buttons dropdown-toggle" data-toggle="dropdown"> - <span class="fa fa-wrench" aria-hidden="true" title="{vtranslate('LBL_SETTINGS', $MODULE)}"></span> {vtranslate('LBL_CUSTOMIZE', 'Reports')} <span class="caret"></span> - </button> - <ul class="detailViewSetting dropdown-menu"> - {foreach item=SETTING from=$MODULE_SETTING_ACTIONS} - {if {vtranslate($SETTING->getLabel())} eq "%s Numbering"} - <li id="{$MODULE_NAME}_listview_advancedAction_{$SETTING->getLabel()}"><a href={$SETTING->getUrl()}>{vtranslate($SETTING->getLabel(), $MODULE_NAME ,vtranslate($MODULE_NAME))}</a></li> - {elseif $SETTING->getLabel() eq 'LBL_REVOKE_ACCESS_TO_DRIVE' || $SETTING->getLabel() eq 'LBL_REVOKE_ACCESS_TO_DROPBOX'} - <li id="{$MODULE_NAME}_listview_customsettingaction_{$SETTING->getLabel()}" class="{if $SETTING->get('linkvisibility') eq false}hide{/if}"><a href="javascript:Documents_Index_Js.revokeAccess('{$SETTING->getLabel()}','{{$SETTING->getUrl()}}')">{vtranslate($SETTING->getLabel(), $MODULE_NAME)}</a></li> - {else} - <li id="{$MODULE_NAME}_listview_advancedAction_{$SETTING->getLabel()}"><a href={$SETTING->getUrl()}>{vtranslate($SETTING->getLabel(), $MODULE_NAME, vtranslate("SINGLE_$MODULE_NAME", $MODULE_NAME))}</a></li> - {/if} - {/foreach} - </ul> - </div> - </li> - {/if} - </ul> - </div> - </div> - </div> - {if $FIELDS_INFO neq null} - <script type="text/javascript"> - var uimeta = (function() { - var fieldInfo = {$FIELDS_INFO}; - return { - field: { - get: function(name, property) { - if(name && property === undefined) { - return fieldInfo[name]; - } - if(name && property) { - return fieldInfo[name][property] - } - }, - isMandatory : function(name){ - if(fieldInfo[name]) { - return fieldInfo[name].mandatory; - } - return false; - }, - getType : function(name){ - if(fieldInfo[name]) { - return fieldInfo[name].type - } - return false; - } - }, - }; - })(); - </script> - {/if} - </div> + {if $MODULE_SETTING_ACTIONS|@count gt 0} + <li> + <div class="settingsIcon"> + <button type="button" class="btn btn-default module-buttons dropdown-toggle" data-toggle="dropdown"> + <span class="fa fa-wrench" aria-hidden="true" title="{vtranslate('LBL_SETTINGS', $MODULE)}"></span> {vtranslate('LBL_CUSTOMIZE', 'Reports')} <span class="caret"></span> + </button> + <ul class="detailViewSetting dropdown-menu"> + {foreach item=SETTING from=$MODULE_SETTING_ACTIONS} + {if {vtranslate($SETTING->getLabel())} eq "%s Numbering"} + <li id="{$MODULE_NAME}_listview_advancedAction_{$SETTING->getLabel()}"><a href={$SETTING->getUrl()}>{vtranslate($SETTING->getLabel(), $MODULE_NAME ,vtranslate($MODULE_NAME))}</a></li> + {else} + <li id="{$MODULE_NAME}_listview_advancedAction_{$SETTING->getLabel()}"><a href={$SETTING->getUrl()}>{vtranslate($SETTING->getLabel(), $MODULE_NAME, vtranslate("SINGLE_$MODULE_NAME", $MODULE_NAME))}</a></li> + {/if} + {/foreach} + </ul> + </div> + </li> + {/if} + </ul> + </div> + </div> + </div> + {if $FIELDS_INFO neq null} + <script type="text/javascript"> + var uimeta = (function() { + var fieldInfo = {$FIELDS_INFO}; + return { + field: { + get: function(name, property) { + if(name && property === undefined) { + return fieldInfo[name]; + } + if(name && property) { + return fieldInfo[name][property] + } + }, + isMandatory : function(name){ + if(fieldInfo[name]) { + return fieldInfo[name].mandatory; + } + return false; + }, + getType : function(name){ + if(fieldInfo[name]) { + return fieldInfo[name].type + } + return false; + } + } + }; + })(); + </script> + {/if} + </div> {/strip} diff --git a/layouts/v7/modules/Documents/UploadDocument.tpl b/layouts/v7/modules/Documents/UploadDocument.tpl index a08a84999..a7c20094d 100644 --- a/layouts/v7/modules/Documents/UploadDocument.tpl +++ b/layouts/v7/modules/Documents/UploadDocument.tpl @@ -8,55 +8,53 @@ ************************************************************************************} {strip} -<div class="modal-dialog modelContainer"> - {assign var=HEADER_TITLE value={vtranslate('LBL_UPLOAD_TO_VTIGER', $MODULE)}} - <div class="modal-content" style="width:675px;"> - {include file="ModalHeader.tpl"|vtemplate_path:$MODULE TITLE=$HEADER_TITLE} - <div class="modal-body"> - <div class="uploadview-content container-fluid"> - <div class="uploadcontrols row"> - <div id="upload" data-filelocationtype="I"> - <br/> - <form class="form-horizontal recordEditView" name="upload" method="post" action="index.php"> - {if !empty($PICKIST_DEPENDENCY_DATASOURCE)} - <input type="hidden" name="picklistDependency" value='{Vtiger_Util_Helper::toSafeHTML($PICKIST_DEPENDENCY_DATASOURCE)}' /> - {/if} - <input type="hidden" name="module" value="{$MODULE}" /> - <input type="hidden" name="action" value="SaveAjax" /> - <input type="hidden" name="document_source" value="Vtiger" /> - {if $RELATION_OPERATOR eq 'true'} - <input type="hidden" name="relationOperation" value="{$RELATION_OPERATOR}" /> - <input type="hidden" name="sourceModule" value="{$PARENT_MODULE}" /> - <input type="hidden" name="sourceRecord" value="{$PARENT_ID}" /> - {if $RELATION_FIELD_NAME} - <input type="hidden" name="{$RELATION_FIELD_NAME}" value="{$PARENT_ID}" /> + <div class="modal-dialog modelContainer"> + {assign var=HEADER_TITLE value={vtranslate('LBL_UPLOAD_TO_VTIGER', $MODULE)}} + <div class="modal-content" style="width:675px;"> + <form class="form-horizontal recordEditView" name="upload" method="post" action="index.php"> + {include file="ModalHeader.tpl"|vtemplate_path:$MODULE TITLE=$HEADER_TITLE} + <div class="modal-body"> + <div class="uploadview-content container-fluid"> + <div class="uploadcontrols row"> + <div id="upload" data-filelocationtype="I"> + {if !empty($PICKIST_DEPENDENCY_DATASOURCE)} + <input type="hidden" name="picklistDependency" value='{Vtiger_Util_Helper::toSafeHTML($PICKIST_DEPENDENCY_DATASOURCE)}' /> + {/if} + <input type="hidden" name="module" value="{$MODULE}" /> + <input type="hidden" name="action" value="SaveAjax" /> + <input type="hidden" name="document_source" value="Vtiger" /> + {if $RELATION_OPERATOR eq 'true'} + <input type="hidden" name="relationOperation" value="{$RELATION_OPERATOR}" /> + <input type="hidden" name="sourceModule" value="{$PARENT_MODULE}" /> + <input type="hidden" name="sourceRecord" value="{$PARENT_ID}" /> + {if $RELATION_FIELD_NAME} + <input type="hidden" name="{$RELATION_FIELD_NAME}" value="{$PARENT_ID}" /> + {/if} {/if} - {/if} - <input type="hidden" name="max_upload_limit" value="{$MAX_UPLOAD_LIMIT_BYTES}" /> - <input type="hidden" name="max_upload_limit_mb" value="{$MAX_UPLOAD_LIMIT_MB}" /> + <input type="hidden" name="max_upload_limit" value="{$MAX_UPLOAD_LIMIT_BYTES}" /> + <input type="hidden" name="max_upload_limit_mb" value="{$MAX_UPLOAD_LIMIT_MB}" /> - <div id="dragandrophandler" class="dragdrop-dotted"> - <div style="font-size:175%;"> - <span class="fa fa-upload"></span> - {vtranslate('LBL_DRAG_&_DROP_FILE_HERE', $MODULE)} - </div> - <div style="margin-top: 1%;text-transform: uppercase;margin-bottom: 2%;"> - {vtranslate('LBL_OR', $MODULE)} - </div> - <div> - <div class="fileUploadBtn btn btn-primary"> - <span><i class="fa fa-laptop"></i> {vtranslate('LBL_SELECT_FILE_FROM_COMPUTER', $MODULE)}</span> - {assign var=FIELD_MODEL value=$FIELD_MODELS['filename']} - <input type="file" name="{$FIELD_MODEL->getFieldName()}" value="{$FIELD_VALUE}" data-rule-required="true" /> + <div id="dragandrophandler" class="dragdrop-dotted"> + <div style="font-size:175%;"> + <span class="fa fa-upload"></span> + {vtranslate('LBL_DRAG_&_DROP_FILE_HERE', $MODULE)} + </div> + <div style="margin-top: 1%;text-transform: uppercase;margin-bottom: 2%;"> + {vtranslate('LBL_OR', $MODULE)} + </div> + <div> + <div class="fileUploadBtn btn btn-primary"> + <span><i class="fa fa-laptop"></i> {vtranslate('LBL_SELECT_FILE_FROM_COMPUTER', $MODULE)}</span> + {assign var=FIELD_MODEL value=$FIELD_MODELS['filename']} + <input type="file" name="{$FIELD_MODEL->getFieldName()}" value="{$FIELD_VALUE}" data-rule-required="true" /> + </div> + <i class="fa fa-info-circle cursorPointer" data-toggle="tooltip" title="{vtranslate('LBL_MAX_UPLOAD_SIZE', $MODULE)} {$MAX_UPLOAD_LIMIT_MB}{vtranslate('MB', $MODULE)}"></i> </div> - <i class="fa fa-info-circle cursorPointer" data-toggle="tooltip" title="{vtranslate('LBL_MAX_UPLOAD_SIZE', $MODULE)} {$MAX_UPLOAD_LIMIT_MB}{vtranslate('MB', $MODULE)}"></i> + <div class="fileDetails"></div> </div> - <div class="fileDetails"></div> - </div> - <table class="massEditTable table no-border"> - <tr> + <table class="massEditTable table no-border"> <tr> {assign var="FIELD_MODEL" value=$FIELD_MODELS['notes_title']} <td class="fieldLabel col-lg-2"> @@ -71,21 +69,8 @@ {include file=vtemplate_path($FIELD_MODEL->getUITypeModel()->getTemplateName(),$MODULE)} </td> </tr> - {assign var="FIELD_MODEL" value=$FIELD_MODELS['assigned_user_id']} - <td class="fieldLabel col-lg-2"> - <label class="muted pull-right"> - {vtranslate($FIELD_MODEL->get('label'), $MODULE)} - {if $FIELD_MODEL->isMandatory() eq true} - <span class="redColor">*</span> - {/if} - </label> - </td> - <td class="fieldValue col-lg-4"> - {include file=vtemplate_path($FIELD_MODEL->getUITypeModel()->getTemplateName(),$MODULE)} - </td> - - {assign var="FIELD_MODEL" value=$FIELD_MODELS['folderid']} - {if $FIELD_MODELS['folderid']} + <tr> + {assign var="FIELD_MODEL" value=$FIELD_MODELS['assigned_user_id']} <td class="fieldLabel col-lg-2"> <label class="muted pull-right"> {vtranslate($FIELD_MODEL->get('label'), $MODULE)} @@ -97,97 +82,111 @@ <td class="fieldValue col-lg-4"> {include file=vtemplate_path($FIELD_MODEL->getUITypeModel()->getTemplateName(),$MODULE)} </td> - {/if} - </tr> - <tr> - {assign var="FIELD_MODEL" value=$FIELD_MODELS['notecontent']} - {if $FIELD_MODELS['notecontent']} - <td class="fieldLabel col-lg-2" colspan="1"> - <label class="muted pull-right"> - {vtranslate($FIELD_MODEL->get('label'), $MODULE)} - {if $FIELD_MODEL->isMandatory() eq true} - <span class="redColor">*</span> + + {assign var="FIELD_MODEL" value=$FIELD_MODELS['folderid']} + {if $FIELD_MODELS['folderid']} + <td class="fieldLabel col-lg-2"> + <label class="muted pull-right"> + {vtranslate($FIELD_MODEL->get('label'), $MODULE)} + {if $FIELD_MODEL->isMandatory() eq true} + <span class="redColor">*</span> + {/if} + </label> + </td> + <td class="fieldValue col-lg-4"> + {include file=vtemplate_path($FIELD_MODEL->getUITypeModel()->getTemplateName(),$MODULE)} + </td> + {/if} + </tr> + <tr> + {assign var="FIELD_MODEL" value=$FIELD_MODELS['notecontent']} + {if $FIELD_MODELS['notecontent']} + <td class="fieldLabel col-lg-2" colspan="1"> + <label class="muted pull-right"> + {vtranslate($FIELD_MODEL->get('label'), $MODULE)} + {if $FIELD_MODEL->isMandatory() eq true} + <span class="redColor">*</span> + {/if} + </label> + </td> + <td class="fieldValue col-lg-4" colspan="3"> + {include file=vtemplate_path($FIELD_MODEL->getUITypeModel()->getTemplateName(),$MODULE)} + </td> + {/if} + </tr> + <tr> + {assign var=HARDCODED_FIELDS value=','|explode:"filename,assigned_user_id,folderid,notecontent,notes_title"} + {assign var=COUNTER value=0} + {foreach key=FIELD_NAME item=FIELD_MODEL from=$FIELD_MODELS} + {if $FIELD_MODEL->isMandatory() && !in_array($FIELD_NAME,$HARDCODED_FIELDS) && $FIELD_MODEL->isQuickCreateEnabled()} + {assign var="isReferenceField" value=$FIELD_MODEL->getFieldDataType()} + {assign var="referenceList" value=$FIELD_MODEL->getReferenceList()} + {assign var="referenceListCount" value=count($referenceList)} + {if $FIELD_MODEL->get('uitype') eq "19"} + {if $COUNTER eq '1'} + <td></td><td></td></tr><tr> + {assign var=COUNTER value=0} + {/if} {/if} - </label> - </td> - <td class="fieldValue col-lg-4" colspan="3"> - {include file=vtemplate_path($FIELD_MODEL->getUITypeModel()->getTemplateName(),$MODULE)} - </td> - {/if} - </tr> - <tr> - {assign var=HARDCODED_FIELDS value=','|explode:"filename,assigned_user_id,folderid,notecontent,notes_title"} - {assign var=COUNTER value=0} - {foreach key=FIELD_NAME item=FIELD_MODEL from=$FIELD_MODELS} - {if $FIELD_MODEL->isMandatory() && !in_array($FIELD_NAME,$HARDCODED_FIELDS) && $FIELD_MODEL->isQuickCreateEnabled()} - {assign var="isReferenceField" value=$FIELD_MODEL->getFieldDataType()} - {assign var="referenceList" value=$FIELD_MODEL->getReferenceList()} - {assign var="referenceListCount" value=count($referenceList)} - {if $FIELD_MODEL->get('uitype') eq "19"} - {if $COUNTER eq '1'} - <td></td><td></td></tr><tr> - {assign var=COUNTER value=0} + {if $COUNTER eq 2} + </tr><tr> + {assign var=COUNTER value=1} + {else} + {assign var=COUNTER value=$COUNTER+1} {/if} - {/if} - {if $COUNTER eq 2} - </tr><tr> - {assign var=COUNTER value=1} - {else} - {assign var=COUNTER value=$COUNTER+1} - {/if} - <td class='fieldLabel col-lg-2'> - {if $isReferenceField neq "reference"}<label class="muted pull-right">{/if} - {if $isReferenceField eq "reference"} - {if $referenceListCount > 1} - {assign var="DISPLAYID" value=$FIELD_MODEL->get('fieldvalue')} - {assign var="REFERENCED_MODULE_STRUCT" value=$FIELD_MODEL->getUITypeModel()->getReferenceModule($DISPLAYID)} - {if !empty($REFERENCED_MODULE_STRUCT)} - {assign var="REFERENCED_MODULE_NAME" value=$REFERENCED_MODULE_STRUCT->get('name')} + <td class='fieldLabel col-lg-2'> + {if $isReferenceField neq "reference"}<label class="muted pull-right">{/if} + {if $isReferenceField eq "reference"} + {if $referenceListCount > 1} + {assign var="DISPLAYID" value=$FIELD_MODEL->get('fieldvalue')} + {assign var="REFERENCED_MODULE_STRUCT" value=$FIELD_MODEL->getUITypeModel()->getReferenceModule($DISPLAYID)} + {if !empty($REFERENCED_MODULE_STRUCT)} + {assign var="REFERENCED_MODULE_NAME" value=$REFERENCED_MODULE_STRUCT->get('name')} + {/if} + <span class="pull-right"> + <select style="width:150px;" class="select2 referenceModulesList {if $FIELD_MODEL->isMandatory() eq true}reference-mandatory{/if}"> + {foreach key=index item=value from=$referenceList} + <option value="{$value}" {if $value eq $REFERENCED_MODULE_NAME} selected {/if} >{vtranslate($value, $value)}</option> + {/foreach} + </select> + </span> + {else} + <label class="muted pull-right">{vtranslate($FIELD_MODEL->get('label'), $MODULE)} {if $FIELD_MODEL->isMandatory() eq true} <span class="redColor">*</span> {/if}</label> {/if} - <span class="pull-right"> - <select style="width:150px;" class="select2 referenceModulesList {if $FIELD_MODEL->isMandatory() eq true}reference-mandatory{/if}"> - {foreach key=index item=value from=$referenceList} - <option value="{$value}" {if $value eq $REFERENCED_MODULE_NAME} selected {/if} >{vtranslate($value, $value)}</option> - {/foreach} - </select> - </span> - {else} - <label class="muted pull-right">{vtranslate($FIELD_MODEL->get('label'), $MODULE)} {if $FIELD_MODEL->isMandatory() eq true} <span class="redColor">*</span> {/if}</label> - {/if} - {else if $FIELD_MODEL->get('uitype') eq '83'} - {include file=vtemplate_path($FIELD_MODEL->getUITypeModel()->getTemplateName(),$MODULE) COUNTER=$COUNTER MODULE=$MODULE} - {if $TAXCLASS_DETAILS} - {assign 'taxCount' count($TAXCLASS_DETAILS)%2} - {if $taxCount eq 0} - {if $COUNTER eq 2} - {assign var=COUNTER value=1} - {else} - {assign var=COUNTER value=2} + {else if $FIELD_MODEL->get('uitype') eq '83'} + {include file=vtemplate_path($FIELD_MODEL->getUITypeModel()->getTemplateName(),$MODULE) COUNTER=$COUNTER MODULE=$MODULE} + {if $TAXCLASS_DETAILS} + {assign 'taxCount' count($TAXCLASS_DETAILS)%2} + {if $taxCount eq 0} + {if $COUNTER eq 2} + {assign var=COUNTER value=1} + {else} + {assign var=COUNTER value=2} + {/if} {/if} {/if} + {else} + {vtranslate($FIELD_MODEL->get('label'), $MODULE)} {if $FIELD_MODEL->isMandatory() eq true} <span class="redColor">*</span> {/if} {/if} - {else} - {vtranslate($FIELD_MODEL->get('label'), $MODULE)} {if $FIELD_MODEL->isMandatory() eq true} <span class="redColor">*</span> {/if} - {/if} - {if $isReferenceField neq "reference"}</label>{/if} - </td> - {if $FIELD_MODEL->get('uitype') neq '83'} - <td class="fieldValue col-lg-4" {if $FIELD_MODEL->get('uitype') eq '19'} colspan="3" {assign var=COUNTER value=$COUNTER+1} {/if}> - {include file=vtemplate_path($FIELD_MODEL->getUITypeModel()->getTemplateName(),$MODULE)} + {if $isReferenceField neq "reference"}</label>{/if} </td> + {if $FIELD_MODEL->get('uitype') neq '83'} + <td class="fieldValue col-lg-4" {if $FIELD_MODEL->get('uitype') eq '19'} colspan="3" {assign var=COUNTER value=$COUNTER+1} {/if}> + {include file=vtemplate_path($FIELD_MODEL->getUITypeModel()->getTemplateName(),$MODULE)} + </td> + {/if} {/if} - {/if} - {/foreach} - </tr> - </table> - {assign var=BUTTON_NAME value={vtranslate('LBL_UPLOAD', $MODULE)}} - {assign var=BUTTON_ID value="js-upload-document"} - {include file="ModalFooter.tpl"|vtemplate_path:$MODULE} - </form> + {/foreach} + </tr> + </table> + </div> + </div> </div> </div> - </div> + {assign var=BUTTON_NAME value={vtranslate('LBL_UPLOAD', $MODULE)}} + {assign var=BUTTON_ID value="js-upload-document"} + {include file="ModalFooter.tpl"|vtemplate_path:$MODULE} + </form> </div> </div> -</div> {/strip} diff --git a/layouts/v7/modules/Documents/resources/Documents.js b/layouts/v7/modules/Documents/resources/Documents.js index 5d1795d77..8dce6cace 100644 --- a/layouts/v7/modules/Documents/resources/Documents.js +++ b/layouts/v7/modules/Documents/resources/Documents.js @@ -10,25 +10,13 @@ Vtiger.Class('Documents_Index_Js', { fileObj : false, - referenceCreateMode : false, referenceFieldName : '', - hierarchyMap : { - 'GoogleDrive' : {}, - 'Dropbox' : {} - }, - getInstance : function() { return new Documents_Index_Js(); }, - authorize : function(serviceName,parentId,relatedModule,mode,referenceFieldName) { - var instance = Documents_Index_Js.getInstance(); - instance.detectReferenceCreateMode(referenceFieldName); - instance.authorize(serviceName,parentId,relatedModule,mode,referenceFieldName); - }, - uploadTo : function(service,parentId,relatedModule,referenceFieldName) { var instance = Documents_Index_Js.getInstance(); instance.detectReferenceCreateMode(referenceFieldName); @@ -41,17 +29,6 @@ Vtiger.Class('Documents_Index_Js', { instance.createDocument(type,parentId,relatedModule); }, - revokeAccess : function(label,revokeUrl) { - var instance = Documents_Index_Js.getInstance(); - instance.revokeAccess(label,revokeUrl); - }, - - selectFrom : function(service,parentId,relatedModule, referenceFieldName) { - var instance = Documents_Index_Js.getInstance(); - instance.detectReferenceCreateMode(referenceFieldName); - instance.selectFrom(service,parentId,relatedModule); - } - }, { detectReferenceCreateMode : function(referenceFieldName) { @@ -64,34 +41,6 @@ Vtiger.Class('Documents_Index_Js', { } }, - revokeAccess : function(label,revokeUrl) { - app.helper.showConfirmationBox({ - message:app.vtranslate('JS_ARE_YOU_SURE_TO_REVOKE_ACCESS') - }).then(function() { - app.helper.showProgress(); - app.request.post({'url' : revokeUrl}).then(function(e,resp) { - app.helper.hideProgress(); - if(!e) { - if(resp.accessRevoked) { - jQuery('#Documents_listview_customsettingaction_'+label).addClass('hide'); - if(jQuery('.settingsIcon').find('ul.dropdown-menu').find('li').not('.hide').length <= 0) { - jQuery('.settingsIcon').parent('li').addClass('hide'); - } - var service = 'GoogleDrive' - if(label !== 'LBL_REVOKE_ACCESS_TO_DRIVE') { - service = 'Dropbox'; - } - jQuery('#'+service+'UploadAction > a').attr('href','javascript:Documents_Index_Js.authorize(\''+service+'\', undefined, undefined, "upload")'); - jQuery('#'+service+'SelectAction > a').attr('href','javascript:Documents_Index_Js.authorize(\''+service+'\', undefined, undefined, "select")'); - app.helper.showSuccessNotification({ - 'message' : app.vtranslate('JS_ACCESS_REVOKED') - }); - } - } - }); - }); - }, - getFile : function() { return Documents_Index_Js.fileObj; }, @@ -124,8 +73,7 @@ Vtiger.Class('Documents_Index_Js', { var parentId = jQuery('#recordId').val(); var parentModule = app.getModuleName(); var relatedModuleName = jQuery('.relatedModuleName').val(); - var selectedRelatedTabElement = jQuery('div.related-tabs') - .find('li').filter('.active'); + var selectedRelatedTabElement = jQuery('div.related-tabs').find('li').filter('.active'); var relatedList = Vtiger_RelatedList_Js.getInstance(parentId, parentModule, selectedRelatedTabElement, relatedModuleName); relatedList.loadRelatedList(); }, @@ -329,100 +277,23 @@ Vtiger.Class('Documents_Index_Js', { vtUtils.enableTooltips(); }, - tabChangeHandler : function(container) { - jQuery('.tab-item', container).on('click', function() { - var currentTab = jQuery(this); - //activate tab - currentTab.closest('.nav-tabs').find('.tab-item').removeClass('active'); - currentTab.addClass('active'); - - //activate tab-pane - container.find('.tab-content > .tab-pane').removeClass('active in'); - var activatedPane = container.find('.tab-content > '+currentTab.data('tabcontentSelector')); - activatedPane.addClass('active in'); - - //intimate activated tab-pane - activatedPane.trigger('Documents.Upload.Tab.Active'); - }); - }, - - addToHierarchyMap : function(childDir,parentDir,service) { - Documents_Index_Js.hierarchyMap[service][childDir] = parentDir; - }, - - getParentDirFromHierarchyMap : function(childDir,service) { - if(childDir == '/') return false; - return Documents_Index_Js.hierarchyMap[service][childDir]; - }, - updateDirectoryMeta : function(folderId,tab,backwardNavigation) { backwardNavigation = (typeof backwardNavigation == "undefined") ? false : true; var currentDirElement = jQuery('input[name="currentDir"]',tab); var parentDirElement = jQuery('input[name="parentDir"]',tab); - var service = jQuery('input[name="serviceProvider"]',tab).val(); var currentDir = currentDirElement.val(); var parentDir = parentDirElement.val(); if(!backwardNavigation) { - this.addToHierarchyMap(folderId,currentDir,service); parentDirElement.val(currentDir); currentDirElement.val(folderId); jQuery('.browseBack',tab).removeAttr('disabled'); jQuery('.gotoRoot',tab).removeAttr('disabled'); } else { currentDirElement.val(folderId); - parentDir = this.getParentDirFromHierarchyMap(folderId,service) - if(!parentDir) { - jQuery('.browseBack',tab).attr('disabled','disabled'); - jQuery('.gotoRoot',tab).attr('disabled','disabled'); - } parentDirElement.val(parentDir); } }, - registerInlineAuthEvent : function(container) { - var self = this; - var authorizeButton = jQuery('.inlineAuth',container); - if(authorizeButton.length) { - authorizeButton.on('click', function() { - var currentTarget = jQuery(this); - currentTarget.attr('disabled','disabled'); - self._getAuthUrl(currentTarget.data('service'),true).then(function(authUrl) { - window.resumeAuth = function(status) { - if(status) { - app.helper.hideModal(); - var serviceProvider = container.find('input[name="serviceProvider"]').val(), - parentId, relatedModule; - if(container.find('.relationDetails').length) { - var relationDetailsContainer = container.find('.relationDetails'); - parentId = relationDetailsContainer.find('input[name="sourceRecord"]').val(); - relatedModule = relationDetailsContainer.find('input[name="sourceModule"]').val(); - } - Documents_Index_Js.selectFrom(serviceProvider,parentId,relatedModule); - } - }; - window.open(authUrl,'','height=600,width=600,channelmode=1'); - }, function(e) { - console.log("error : ",e); - }); - }); - } - }, - - registerExternalStorageTabEvents : function(tab) { - this.registerSearchFilesEvent(tab); - this.registerGotoRootFolderEvent(tab); - this.registerBackBrowseButton(tab); - this.registerFileSelectionHandler(tab); - this.registerBrowseFolder(tab); - this.registerInlineAuthEvent(tab); - }, - - registerPostTabLoadEvents : function(tab) { - if(tab.data('service') === 'GoogleDrive' || tab.data('service') === 'Dropbox') { - this.registerExternalStorageTabEvents(tab); - } - }, - loadTab : function(tab) { var self = this; var url = tab.data('url'); @@ -432,7 +303,6 @@ Vtiger.Class('Documents_Index_Js', { if(!e) { tab.html(resp); vtUtils.applyFieldElementsView(tab); - self.registerPostTabLoadEvents(tab); } else { console.log("error while loading tab : ",e); } @@ -487,47 +357,6 @@ Vtiger.Class('Documents_Index_Js', { }); }, - _uploadToExternalStorage : function(container) { - var self = this; - if(!self.getFile()) { - app.helper.showErrorNotification({ - 'message' : app.vtranslate('JS_PLEASE_SELECT_A_FILE') - }); - return; - } - var uploadForm = container.find('form[name="uploadToService"]'); - self._upload(uploadForm).then(function(resp) { - if(resp.uploadFail) { - app.helper.showErrorNotification({ - 'message' : app.vtranslate(resp.msg) - }); - } else { - app.helper.showSuccessNotification({ - 'message' : app.vtranslate('JS_UPLOAD_SUCCESSFUL') - }); - } - app.helper.hideModal(); - self.reloadList(); - - if(Documents_Index_Js.referenceCreateMode === true && Documents_Index_Js.referenceFieldName !== '') { - self.postQuickCreateSave(resp); - } - }, function(e) { - app.helper.showErrorNotification({'message' : app.vtranslate('JS_UPLOAD_FAILED')}); - }); - }, - - registerUploadToExternalStorageEvents : function(container) { - var self = this; - container.find('form').vtValidate({ - 'submitHandler' : function() { - self._uploadToExternalStorage(container); - return false; - } - }); - this.registerFileHandlingEvents(container); - }, - applyScrollToModal : function(modalContainer) { app.helper.showVerticalScroll(modalContainer.find('.modal-body').css('max-height', '415px'), {'autoHideScrollbar': true}); @@ -535,195 +364,7 @@ Vtiger.Class('Documents_Index_Js', { uploadTo : function(service,parentId,relatedModule) { this.setFile(false); - this.showUploadToVtigerModal(service,parentId,relatedModule); - }, - - createExternalDocument : function(container) { - var self = this; - var selection = jQuery('.selectList', container).find('.selectedFile'); - if(!selection.length) { - app.helper.showAlertNotification({ - 'message' : app.vtranslate('JS_PLEASE_SELECT_A_FILE') - }); - return; - } - - var service = jQuery('input[name="serviceProvider"]', container).val(); - - var assignedUserId = jQuery('select[name="assigned_user_id"] option:selected', container).val(); - var documentSource = service; - if(service === 'GoogleDrive') { - documentSource = 'Google Drive'; - } - - var params = { - module : 'Documents', - action : 'SaveAjax', - service : service, - notes_title : selection.data('title'), - filename : selection.data('link'), - filelocationtype : 'E', - assigned_user_id : assignedUserId, - document_source : documentSource, - externalFileId : selection.data('fileid'), - folderid : jQuery('input[name="vtigerFolderId"]',container).val() - }; - - if(service === 'Dropbox'){ - params.createDirectLink = "yes"; - } - - var relationDetailsContainer = container.find('.relationDetails'); - if(relationDetailsContainer.length) { - var relationOperationElement = relationDetailsContainer.find('input[name="relationOperation"]'); - var relationOperator = relationOperationElement.val(); - var sourceModule = relationDetailsContainer.find('input[name="sourceModule"]').val(); - var sourceRecord = relationDetailsContainer.find('input[name="sourceRecord"]').val(); - var relationFieldName = relationDetailsContainer.find('input[name="relationFieldName"]').val(); - params.relationOperation = relationOperator; - params.sourceModule = sourceModule; - params.sourceRecord = sourceRecord; - if(relationFieldName){ - params[relationFieldName] = sourceRecord; - } - } - - app.helper.showProgress(); - app.request.post({'data':params}).then(function(e,res) { - app.helper.hideProgress(); - if(!e) { - app.helper.showSuccessNotification({ - 'message' : app.vtranslate('JS_DOCUMENT_CREATED') - }); - app.helper.hideModal(); - self.reloadList(); - - //reference create handling - if (Documents_Index_Js.referenceCreateMode === true && Documents_Index_Js.referenceFieldName !== '') { - self.postQuickCreateSave(res); - } - } else { - app.event.trigger('post.save.failed', e); - } - }); - }, - - registerLinkExternalDocumentEvent : function(container) { - var self = this; - jQuery('#js-select-document',container).on('click',function() { - self.createExternalDocument(container.find('form')); - }); - }, - - updateFilesList : function(files, container) { - var tableContainer = container.find('.selectList').find('tbody'), - listItem = ''; - tableContainer.empty(); - if(typeof files === 'undefined' || !files.length) { - listItem = '<div style="padding:20px">'+ - '<span class="span">'+ - '<i class="fa fa-info-circle"></i>'+ - app.vtranslate('JS_NO_RESULTS_FOUND')+ - '</span>'+ - '</div>'; - tableContainer.append(listItem); - return; - } else { - for(var i=0;i<files.length;i++) { - if(files[i].is_dir) { - listItem = "<tr class='listViewEntries folder' data-fileid='"+files[i].id+"' data-title='"+files[i].title+"' data-link='"+files[i].alternateLink+"'>"+ - "<td class='listViewEntryValue medium fileTitleData' nowrap=''>"+ - "<i class='fa fa-folder'></i> <a>"+files[i].title+"</a>"+ - "</td>"; - if(files[i].owner_name) { - listItem += "<td class='listViewEntryValue medium fileOwnerData' nowrap=''>"+ - "<a>" + files[i].owner_name + "</a>"+ - "</td>"; - } - if(files[i].fileSize && !files[i].is_dir) { - var fileSize = files[i].fileSize; - if(container.find('input[name="serviceProvider"]').val() === 'GoogleDrive') { - fileSize = vtUtils.convertFileSizeInToDisplayFormat(fileSize); - } - listItem += "<td class='listViewEntryValue medium fileSizeData' nowrap=''>"+ - "<a>" + fileSize + "</a>"+ - "</td>"; - } - listItem += "</tr>"; - } else { - listItem = "<tr class='listViewEntries file' data-fileid='"+files[i].id+"' data-title='"+files[i].title+"' data-link='"+files[i].alternateLink+"'>"+ - "<td class='listViewEntryValue medium fileTitleData' nowrap=''>"+ - "<i class='fa fa-file'></i> <a>"+files[i].title+"</a>"+ - "</td>"; - if(files[i].owner_name) { - listItem += "<td class='listViewEntryValue medium fileOwnerData' nowrap=''>"+ - "<a>" + files[i].owner_name + "</a>"+ - "</td>"; - } - if(files[i].fileSize) { - var fileSize = files[i].fileSize; - if(container.find('input[name="serviceProvider"]').val() === 'GoogleDrive') { - fileSize = vtUtils.convertFileSizeInToDisplayFormat(fileSize); - } - listItem += "<td class='listViewEntryValue medium fileSizeData' nowrap=''>"+ - "<a>" + fileSize + "</a>"+ - "</td>"; - } - listItem += "</tr>"; - } - tableContainer.append(listItem); - } - } - this.registerFileSelectionHandler(container); - this.registerBrowseFolder(container); - }, - - showEmptyDirectoryMessage : function(tab) { - var container = jQuery('.selectList',tab).find('tbody'); - container.empty(); - var content = '<div style="padding:20px">\n\ - <span class="span">\n\ - <i class="fa fa-info-circle"></i>\n\ - '+app.vtranslate('JS_DIRECTORY_IS_EMPTY')+ - '</span>\n\ - </div>'; - container.append(content); - }, - - openFolder : function(folderId,container,backwardNavigation) { - var self = this; - var service = jQuery('input[name="serviceProvider"]',container).val(); - - var params = { - 'module' : 'Documents', - 'action' : 'ServiceProvidersAjax', - 'mode' : 'getFilesForDirectory', - 'service' : service, - 'folderId' : folderId - }; - app.helper.showProgress(app.vtranslate('JS_PLEASE_WAIT')); - app.request.post({'data':params}).then(function(e,res) { - app.helper.hideProgress(); - if(!e) { - if(res.is_directory_empty) { - self.showEmptyDirectoryMessage(container); - } else { - self.updateFilesList(res.filesList,container); - } - self.updateDirectoryMeta(folderId,container,backwardNavigation); - self.registerBackBrowseButton(container); - } - }); - }, - - registerBrowseFolder : function(container) { - var self = this; - jQuery('.folder', container).on('click', function() { - jQuery('.folder',container).off('click'); - jQuery('.browseBack',container).off('click'); - var folderId = jQuery(this).data('fileid'); - self.openFolder(folderId,container); - }); + this.showUploadToVtigerModal(parentId,relatedModule); }, registerFileSelectionHandler : function(container) { @@ -736,178 +377,6 @@ Vtiger.Class('Documents_Index_Js', { }); }, - registerBackBrowseButton : function(container) { - var thisInstance = this; - var currentDirElement = jQuery('input[name="currentDir"]',container); - jQuery('.browseBack',container).on('click',function() { - var service = jQuery('input[name="serviceProvider"]',container).val(); - var parentDir = thisInstance.getParentDirFromHierarchyMap(currentDirElement.val(),service); - if(parentDir) { - jQuery('.browseBack',container).off('click'); - jQuery('.folder',container).off('click'); - thisInstance.openFolder(parentDir,container,true); - } - }); - }, - - registerGotoRootFolderEvent : function(container) { - var self = this; - jQuery('.gotoRoot', container).on('click', function() { - jQuery(this).attr('disabled','disabled'); - jQuery('.browseBack',container).attr('disabled','disabled'); - var rootMetaElement = jQuery('input[name="rootDirContents"]',container); - var filesList = rootMetaElement.val(); - var rootDirId = rootMetaElement.attr('data-rootDirId'); - filesList = JSON.parse(filesList); - self.updateFilesList(filesList,container); - jQuery('input[name="currentDir"]',container).val(rootDirId); - jQuery('input[name="parentDir"]',container).val(''); - }); - }, - - registerSearchFilesEvent : function(container) { - var self = this; - jQuery('input[name="searchFiles"]', container).on('change', function() { - var searchKey = jQuery(this).val(); - searchKey = jQuery.trim(searchKey); - if(searchKey.length === 0) { - jQuery(this).val(''); - return; - } - - var params = { - 'module' : 'Documents', - 'action' : 'ServiceProvidersAjax', - 'mode' : 'search', - 'searchKey' : searchKey, - 'service' : jQuery('input[name="serviceProvider"]',container).val() - }; - app.helper.showProgress(app.vtranslate('JS_PLEASE_WAIT')); - app.request.post({'data':params}).then(function(e,res) { - app.helper.hideProgress(); - if(!e) { - self.updateFilesList(res,container); - jQuery('.browseBack',container).attr('disabled','disabled'); - jQuery('.gotoRoot',container).removeAttr('disabled'); - } - }); - }); - }, - - registerSelectFromExternalStorageEvents : function(modalContainer) { - modalContainer.find('form').vtValidate({ - 'submitHandler' : function() { - return false; - } - }); - - this.registerSearchFilesEvent(modalContainer); - this.registerGotoRootFolderEvent(modalContainer); - this.registerBackBrowseButton(modalContainer); - this.registerFileSelectionHandler(modalContainer); - this.registerBrowseFolder(modalContainer); - this.registerInlineAuthEvent(modalContainer); - this.registerLinkExternalDocumentEvent(modalContainer); - - app.helper.showVerticalScroll(modalContainer.find('.selectList'), - {'autoHideScrollbar' : true, 'setHeight' : 270}); - }, - - showSelectFromExternalStorageModal : function(service,parentId,relatedModule) { - var self = this; - var url = 'index.php?module=Documents&view=ExternalStorage&operation=SelectFrom'+service; - if(typeof parentId !== 'undefined' && typeof relatedModule !== 'undefined') { - url += '&relationOperation=true&sourceModule='+relatedModule+'&sourceRecord='+parentId; - } - var relationField = jQuery('div.related-tabs').find('li').filter('.active').data('relatedfield'); - if (relationField && parentId) { - url += '&'+relationField+"="+parentId; - } - app.helper.showProgress(); - app.request.get({'url':url}).then(function(e,resp) { - app.helper.hideProgress(); - if(!e) { - app.helper.showModal(resp, { - 'cb' : function(modalContainer) { - self.registerSelectFromExternalStorageEvents(modalContainer); - } - }); - } - }); - }, - - selectFrom : function(service,parentId,relatedModule) { - this.showSelectFromExternalStorageModal(service,parentId,relatedModule); - }, - - _getAuthUrl : function(serviceName,inline) { - var aDeferred = jQuery.Deferred(); - if(typeof inline === 'undefined') { - inline = false; - } - var params = { - 'module' : 'Documents', - 'action' : 'ServiceProvidersAjax', - 'mode' : 'getOauthUrl', - 'service' : serviceName, - 'inline' : inline - }; - app.helper.showProgress(); - app.request.post({'data':params}).then(function(e,resp) { - app.helper.hideProgress(); - if(!e) { - if(resp.hasOwnProperty('authUrl')) { - aDeferred.resolve(resp.authUrl); - } else if(resp.hasOwnProperty('postAuthorization')) { - aDeferred.reject({postAuthorization:resp.postAuthorization}); - } - } else { - aDeferred.reject(e); - } - }); - return aDeferred.promise(); - }, - - authorize : function(serviceName,parentId,relatedModule,mode,referenceFieldName) { - if(typeof mode === 'undefined') { - mode = 'upload'; - } - this._getAuthUrl(serviceName,true).then(function(authUrl) { - window.resumeAuth = function(status) { - if(status) { - var actionHref = 'javascript:Documents_Index_Js.uploadTo(\''+serviceName+'\''; - if(typeof parentId !== 'undefined' && typeof relatedModule !== 'undefined') { - actionHref += ','+parentId+',\''+relatedModule+'\''; - } - actionHref += ')'; - jQuery('#'+serviceName+'Action').find('a').attr('href',actionHref); - if(mode === 'select') { - Documents_Index_Js.selectFrom(serviceName,parentId,relatedModule,referenceFieldName); - } else { - Documents_Index_Js.uploadTo(serviceName,parentId,relatedModule,referenceFieldName); - } - var revokeSelector = 'Documents_listview_customsettingaction_LBL_REVOKE_ACCESS_TO_DRIVE'; - if(serviceName === 'Dropbox') { - revokeSelector = 'Documents_listview_customsettingaction_LBL_REVOKE_ACCESS_TO_DROPBOX'; - } - jQuery('#'+revokeSelector).removeClass('hide'); - jQuery('.settingsIcon').parent('li').removeClass('hide'); - } - }; - window.open(authUrl,'','height=600,width=600,channelmode=1'); - }, function(e) { - if(e.hasOwnProperty('postAuthorization')) { - if(e.postAuthorization) { - if(mode === 'select') { - Documents_Index_Js.selectFrom(serviceName,parentId,relatedModule,referenceFieldName); - } else { - Documents_Index_Js.uploadTo(serviceName,parentId,relatedModule,referenceFieldName); - } - } - } - }); - }, - _createDocument : function(form) { var self = this; var noteContentElement = form.find('#Documents_editView_fieldName_notecontent_popup'); @@ -966,7 +435,7 @@ Vtiger.Class('Documents_Index_Js', { this.registerCreateDocumentEvent(container); }, - showCreateDocumentModal : function(type,parentId,relatedModule) { + createDocument : function(type,parentId,relatedModule) { var self = this; var url = 'index.php?module=Documents&view=QuickCreateAjax&operation=CreateDocument&type='+type; if(typeof parentId !== 'undefined' && typeof relatedModule !== 'undefined') { @@ -991,10 +460,6 @@ Vtiger.Class('Documents_Index_Js', { }); }, - createDocument : function(type,parentId,relatedModule) { - this.showCreateDocumentModal(type,parentId,relatedModule); - }, - registerQuickCreateEvents : function(container) { var vtigerInstance = Vtiger_Index_Js.getInstance(); vtigerInstance.registerReferenceCreate(container); diff --git a/layouts/v7/modules/Settings/Vtiger/TaxIndex.tpl b/layouts/v7/modules/Settings/Vtiger/TaxIndex.tpl index 7bfd0228f..1d20cc3f0 100644 --- a/layouts/v7/modules/Settings/Vtiger/TaxIndex.tpl +++ b/layouts/v7/modules/Settings/Vtiger/TaxIndex.tpl @@ -9,40 +9,28 @@ {* modules/Settings/Vtiger/views/TaxIndex.php *} {strip} - <div class="col-lg-12 col-md-12 col-sm-12" id="TaxCalculationsContainer"> - <div class="editViewHeader"> - <h4>{vtranslate('LBL_TAX_CALCULATIONS', $QUALIFIED_MODULE)}</h4> - </div> - <hr> - <br> - <div class="contents tabbable clearfix"> - <ul class="nav nav-tabs layoutTabs massEditTabs"> - <li class="tab-item taxesTab active"><a data-toggle="tab" href="#taxes"><strong>{vtranslate('LBL_TAXES', $QUALIFIED_MODULE)}</strong></a></li> - <li class="tab-item chargesTab"><a data-toggle="tab" href="#charges"><strong>{vtranslate('LBL_CHARGES_AND ITS_TAXES', $QUALIFIED_MODULE)}</strong></a></li> - <li class="tab-item taxRegionsTab"><a data-toggle="tab" href="#taxRegions"><strong>{vtranslate('LBL_TAX_REGIONS', $QUALIFIED_MODULE)}</strong></a></li> - </ul> - <div class="tab-content layoutContent padding20 overflowVisible"> - <div class="tab-pane active" id="taxes"> - <div class="col-lg-3 col-md-3 col-sm-3"></div> - <div class="col-lg-6"> - <div class="defaultTaxMode"> - <input type="hidden" id="selectedTaxMode" value="{$SELECTED_TAX_MODE}"> - <div class="pull-left">{vtranslate('LBL_DEFAULT_TAX_MODE', $QUALIFIED_MODULE)} : </div> - <label class="span radio-group"> - <input class="input-medium" type="radio" name="default_tax_mode" {if $SELECTED_TAX_MODE eq 'group'}checked{/if} value='group' style="display: inline-block;"> - <span class="mode radio-label">{vtranslate('LBL_GROUP', $QUALIFIED_MODULE)}</span> - </label> - <label class="span radio-group"> - <input class="input-medium" type="radio" name="default_tax_mode" {if $SELECTED_TAX_MODE eq 'individual'}checked{/if} value='individual' style="display: inline-block;"> - <span class="mode radio-label">{vtranslate('LBL_INDIVIDUAL', $QUALIFIED_MODULE)}</span> - </label> - </div> - <br> + <div class="col-lg-12 col-md-12 col-sm-12" id="TaxCalculationsContainer"> + <div class="editViewHeader"> + <h4>{vtranslate('LBL_TAX_CALCULATIONS', $QUALIFIED_MODULE)}</h4> + </div> + <hr> + <br> + <div class="contents tabbable clearfix"> + <ul class="nav nav-tabs layoutTabs massEditTabs"> + <li class="tab-item taxesTab active"><a data-toggle="tab" href="#taxes"><strong>{vtranslate('LBL_TAXES', $QUALIFIED_MODULE)}</strong></a></li> + <li class="tab-item chargesTab"><a data-toggle="tab" href="#charges"><strong>{vtranslate('LBL_CHARGES_AND ITS_TAXES', $QUALIFIED_MODULE)}</strong></a></li> + <li class="tab-item taxRegionsTab"><a data-toggle="tab" href="#taxRegions"><strong>{vtranslate('LBL_TAX_REGIONS', $QUALIFIED_MODULE)}</strong></a></li> + </ul> + <div class="tab-content layoutContent padding20 overflowVisible"> + <div class="tab-pane active" id="taxes"> + <div class="col-lg-3 col-md-3 col-sm-3"></div> + <div class="col-lg-6"> {assign var=CREATE_TAX_URL value=$TAX_RECORD_MODEL->getCreateTaxUrl()} {assign var=WIDTHTYPE value=$CURRENT_USER_MODEL->get('rowheight')} <div class="marginBottom10px"> <button type="button" class="btn btn-default addTax addButton btn-default module-buttons" data-url="{$CREATE_TAX_URL}" data-type="0"> - <i class="fa fa-plus"></i> {vtranslate('LBL_ADD_NEW_TAX', $QUALIFIED_MODULE)}</button> + <i class="fa fa-plus"></i> {vtranslate('LBL_ADD_NEW_TAX', $QUALIFIED_MODULE)} + </button> </div> <table class="table table-bordered inventoryTaxTable"> <tr> @@ -68,10 +56,10 @@ {/foreach} </table> </div> - </div> - <div class="tab-pane" id="charges"></div> - <div class="tab-pane" id="taxRegions"></div> - </div> - </div> - </div> + </div> + <div class="tab-pane" id="charges"></div> + <div class="tab-pane" id="taxRegions"></div> + </div> + </div> + </div> {/strip} \ No newline at end of file diff --git a/layouts/v7/modules/Vtiger/Export.tpl b/layouts/v7/modules/Vtiger/Export.tpl index 98b5cd282..2fffe80e6 100644 --- a/layouts/v7/modules/Vtiger/Export.tpl +++ b/layouts/v7/modules/Vtiger/Export.tpl @@ -57,19 +57,19 @@ <br><div><b>{vtranslate('LBL_EXPORT_DATA',$MODULE)}</b></div><br> <div style="margin-left: 50px;"> <div> - <input type="radio" name="mode" value="ExportSelectedRecords" id="group1" {if !empty($SELECTED_IDS)} checked="checked" {else} disabled="disabled"{/if} /> + <input type="radio" name="mode" value="ExportSelectedRecords" id="group1" {if !empty($SELECTED_IDS)} checked="checked" {else} disabled="disabled"{/if} style="margin:2px 0 -4px" /> <label style="font-weight:normal" for="group1"> {vtranslate('LBL_EXPORT_SELECTED_RECORDS',$MODULE)}</label> {if empty($SELECTED_IDS)} <span style="color:red">{vtranslate('LBL_NO_RECORD_SELECTED',$MODULE)}</span>{/if} <input type="hidden" class="isSelectedRecords" value="{if $SELECTED_IDS}1{else}0{/if}" > </div> <br> <div> - <input type="radio" name="mode" value="ExportCurrentPage" id="group2"/> + <input type="radio" name="mode" value="ExportCurrentPage" id="group2" style="margin:2px 0 -4px" /> <label style="font-weight:normal" for="group2"> {vtranslate('LBL_EXPORT_DATA_IN_CURRENT_PAGE',$MODULE)}</label> </div> <br> <div> - <input type="radio" name="mode" value="ExportAllData" id="group3" {if empty($SELECTED_IDS)} checked="checked" {/if}/> + <input type="radio" name="mode" value="ExportAllData" id="group3" {if empty($SELECTED_IDS)} checked="checked" {/if} style="margin:2px 0 -4px" /> <label style="font-weight:normal" for="group3"> {vtranslate('LBL_EXPORT_ALL_DATA',$MODULE)}</label> </div> {if $MULTI_CURRENCY} diff --git a/layouts/v7/modules/Vtiger/resources/List.js b/layouts/v7/modules/Vtiger/resources/List.js index 219451874..d170c6fc5 100644 --- a/layouts/v7/modules/Vtiger/resources/List.js +++ b/layouts/v7/modules/Vtiger/resources/List.js @@ -1071,6 +1071,7 @@ Vtiger.Class("Vtiger_List_Js", { }, 500)); } } + e.preventDefault(); e.stopPropagation(); }); diff --git a/layouts/v7/modules/Vtiger/uitypes/StringDetailView.tpl b/layouts/v7/modules/Vtiger/uitypes/StringDetailView.tpl index 0d109d581..6ece8c7be 100644 --- a/layouts/v7/modules/Vtiger/uitypes/StringDetailView.tpl +++ b/layouts/v7/modules/Vtiger/uitypes/StringDetailView.tpl @@ -39,6 +39,8 @@ {else} <span class="currencyValue">{$FIELD_MODEL->getDisplayValue($FIELD_MODEL->get('fieldvalue'))}</span> {$CURRENCY_SYMBOL} {/if} +{else if $FIELD_MODEL->get('name') eq 'signature'} + {decode_html($FIELD_MODEL->getDisplayValue($FIELD_MODEL->get('fieldvalue'), $RECORD->getId(), $RECORD))} {else} {$FIELD_MODEL->getDisplayValue($FIELD_MODEL->get('fieldvalue'), $RECORD->getId(), $RECORD)} {/if} diff --git a/modules/Calendar/actions/ExportData.php b/modules/Calendar/actions/ExportData.php index 56a8a8a0b..8933e4819 100644 --- a/modules/Calendar/actions/ExportData.php +++ b/modules/Calendar/actions/ExportData.php @@ -186,6 +186,11 @@ class Calendar_ExportData_Action extends Vtiger_ExportData_Action { $moduleModel = Vtiger_Module_Model::getInstance($moduleName); $moduleFields = $moduleModel->getFields(); + + $eventsModuleModel = Vtiger_Module_Model::getInstance('Events'); + $eventModuleFieldList = $eventsModuleModel->getFields(); + $moduleFields = array_merge($moduleFields, $eventModuleFieldList); + foreach ($moduleFields as $fieldName => $fieldModel) { if (in_array($fieldName, $skippedFields)) { unset($moduleFields[$fieldName]); diff --git a/modules/Calendar/views/Export.php b/modules/Calendar/views/Export.php index 5f32eaebe..5c5a247fd 100644 --- a/modules/Calendar/views/Export.php +++ b/modules/Calendar/views/Export.php @@ -9,20 +9,4 @@ *************************************************************************************/ class Calendar_Export_View extends Vtiger_Export_View { - - public function preprocess(Vtiger_Request $request) { - } - - public function process(Vtiger_Request $request) { - $moduleName = $request->getModule(); - - $viewer = $this->getViewer($request); - $viewer->assign('MODULE', $moduleName); - $viewer->assign('ACTION', 'ExportData'); - - $viewer->view('Export.tpl', $moduleName); - } - - public function postprocess(Vtiger_Request $request) { - } } \ No newline at end of file diff --git a/modules/Calendar/views/Import.php b/modules/Calendar/views/Import.php index 996c44f72..85db9b8b9 100644 --- a/modules/Calendar/views/Import.php +++ b/modules/Calendar/views/Import.php @@ -89,6 +89,9 @@ class Calendar_Import_View extends Vtiger_Import_View { if(strtotime($dueDate) < strtotime($currentDate)) $activityFieldsList['eventstatus'] = 'Held'; } + if (!$activityFieldsList['time_end']) { + $activityFieldsList['time_end'] = ''; + } $recordModel = Vtiger_Record_Model::getCleanInstance($moduleName); $recordModel->setData($activityFieldsList); diff --git a/modules/Documents/models/Module.php b/modules/Documents/models/Module.php index 5ec623418..89a8a3d53 100644 --- a/modules/Documents/models/Module.php +++ b/modules/Documents/models/Module.php @@ -121,50 +121,6 @@ class Documents_Module_Model extends Vtiger_Module_Model { return $relatedListFields; } - public function getSettingLinks() { - vimport('~~modules/com_vtiger_workflow/VTWorkflowUtils.php'); - - - $layoutEditorImagePath = Vtiger_Theme::getImagePath('LayoutEditor.gif'); - $editWorkflowsImagePath = Vtiger_Theme::getImagePath('EditWorkflows.png'); - $settingsLinks = array(); - $currentUserModel = Users_Record_Model::getCurrentUserModel(); - if($currentUserModel->isAdminUser()) { - if(VTWorkflowUtils::checkModuleWorkflow($this->getName())) { - $settingsLinks[] = array( - 'linktype' => 'LISTVIEWSETTING', - 'linklabel' => 'LBL_EDIT_WORKFLOWS', - 'linkurl' => 'index.php?parent=Settings&module=Workflows&view=List&sourceModule='.$this->getName(), - 'linkicon' => $editWorkflowsImagePath - ); - } - - $settingsLinks[] = array( - 'linktype' => 'LISTVIEWSETTING', - 'linklabel' => 'LBL_EDIT_FIELDS', - 'linkurl' => 'index.php?parent=Settings&module=LayoutEditor&sourceModule='.$this->getName(), - 'linkicon' => $layoutEditorImagePath - ); - - $settingsLinks[] = array( - 'linktype' => 'LISTVIEWSETTING', - 'linklabel' => 'LBL_EDIT_PICKLIST_VALUES', - 'linkurl' => 'index.php?parent=Settings&module=Picklist&source_module='.$this->getName(), - 'linkicon' => '' - ); - - if($this->hasSequenceNumberField()) { - $settingsLinks[] = array( - 'linktype' => 'LISTVIEWSETTING', - 'linklabel' => 'LBL_MODULE_SEQUENCE_NUMBERING', - 'linkurl' => 'index.php?parent=Settings&module=Vtiger&view=CustomRecordNumbering&sourceModule='.$this->getName(), - 'linkicon' => '' - ); - } - } - return $settingsLinks; - } - /** * Function is used to give links in the All menu bar */ diff --git a/modules/Documents/views/QuickCreateAjax.php b/modules/Documents/views/QuickCreateAjax.php index 5ad17797a..97a66313f 100644 --- a/modules/Documents/views/QuickCreateAjax.php +++ b/modules/Documents/views/QuickCreateAjax.php @@ -41,9 +41,21 @@ class Documents_QuickCreateAjax_View extends Vtiger_IndexAjax_View { $picklistDependencyDatasource = Vtiger_DependencyPicklist::getPicklistDependencyDatasource($moduleName); - $fieldsInfo = array(); + $relationOperation = $request->get('relationOperation'); $fieldList = $moduleModel->getFields(); - foreach($fieldList as $name => $model){ + $requestFieldList = array_intersect_key($request->getAll(), $fieldList); + foreach($requestFieldList as $requestFieldName => $requestFieldValue) { + if(array_key_exists($requestFieldName, $fieldList)) { + $moduleFieldModel = $fieldList[$requestFieldName]; + $recordModel->set($requestFieldName, $moduleFieldModel->getDBInsertValue($requestFieldValue)); + } + } + + $fieldsInfo = array(); + foreach ($fieldList as $name => $model) { + if ($relationOperation && array_key_exists($name, $requestFieldList)) { + $relationFieldName = $name; + } $fieldsInfo[$name] = $model->getFieldInfo(); } @@ -61,6 +73,15 @@ class Documents_QuickCreateAjax_View extends Vtiger_IndexAjax_View { $viewer->assign('FILE_LOCATION_TYPE', $request->get('type')); $viewer->assign('SCRIPTS', $this->getHeaderScripts($request)); + if ($relationOperation) { + $viewer->assign('RELATION_OPERATOR', $relationOperation); + $viewer->assign('PARENT_MODULE', $request->get('sourceModule')); + $viewer->assign('PARENT_ID', $request->get('sourceRecord')); + if ($relationFieldName) { + $viewer->assign('RELATION_FIELD_NAME', $relationFieldName); + } + } + $viewer->assign('MAX_UPLOAD_LIMIT_MB', Vtiger_Util_Helper::getMaxUploadSize()); $viewer->assign('MAX_UPLOAD_LIMIT_BYTES', Vtiger_Util_Helper::getMaxUploadSizeInBytes()); echo $viewer->view('QuickCreate.tpl',$moduleName,true); diff --git a/modules/Migration/schema/660_to_700.php b/modules/Migration/schema/660_to_700.php index 2c244d16e..ca2db5568 100644 --- a/modules/Migration/schema/660_to_700.php +++ b/modules/Migration/schema/660_to_700.php @@ -12,10 +12,15 @@ if(defined('VTIGER_UPGRADE')) { global $adb, $current_user; $db = PearDatabase::getInstance(); + if (!Vtiger_Utils::CheckTable('vtiger_activity_recurring_info')) { + $db->pquery('CREATE TABLE IF NOT EXISTS vtiger_activity_recurring_info(activityid INT(19) NOT NULL, recurrenceid INT(19) NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=UTF8;', array()); + } + $columns = $db->getColumnNames('vtiger_crmentity'); if (!in_array('smgroupid', $columns)) { $db->pquery('ALTER TABLE vtiger_crmentity ADD COLUMN smgroupid INT(19)', array()); } + $db->pquery('UPDATE vtiger_settings_field SET name=? WHERE name=?', array('Configuration Editor', 'LBL_CONFIG_EDITOR')); $db->pquery('UPDATE vtiger_links SET linktype=? WHERE linklabel=?', array('DETAILVIEW', 'LBL_SHOW_ACCOUNT_HIERARCHY')); $db->pquery('UPDATE vtiger_field SET defaultvalue=? WHERE fieldname=?', array('1', 'discontinued')); diff --git a/test/template_imgfiles/default.png b/test/template_imgfiles/default.png new file mode 100644 index 0000000000000000000000000000000000000000..796b3d5d65febfb585da2a71395c58a82320a975 GIT binary patch literal 14136 zcmYLPQ*<WH7X4z|wr$(CZQI7goY=N)+n!hxJDJ$Y&Hr?Jt?GK{wYsbJ*|pC;)fK5I zF98RQ4GjPQ;G`r)m4Et}{~9Ft&%L%^i2tX9a+K6^0RUi7{%b&h%xp{m09wIHL_|^1 z(!tfi#nQo%P)bCE(9zk!+{)Gr0Px(%QL#`}IYZ}r-gyv~i3m)VaZpBsBvclT4n$2L zrzV0zl#U=OSVvPDKoS!J#Tn0!0EvqWj6qYPg^hw<gE%BAjQdp-5jFX~=Tl^}(*1lq z^VPD-e^Py)(=-Rs4+)zp$)dy-2wNeHkM#G~*zoAyA-!M_G^ry15wgjY$mNp+2=L<1 z%S%Jt577$%@?3&}1oX>g^)upze<Pd=XXpY2h5+@uCUD9?2BHE4z2k&S0fOQ{fjQ~q zDu8@YfZ>#h@c}@Q4q!+TaJ&Qv%z4T10RreG6QKd+Cjbah%pybqmOOy!IrS(pfF>gV z)m&zn3$R89V3g7@mju+e0s3bVVHyFDumDD-h)^m3s1Lw!oP@*^5Rw5v6~EKqy``x| zJfZ$UDx;CNgOp1wNC%S62|`1I9-nen3WElf-3ZtyQ;>epD+7x;h!x@Q{WJiOpMdr= z+xt(?S@_!7S@yVAcmulgKJag1W8;Ibqq!<aK>%RS)qmlOmZ1qdkOw@_?yHdO8q`uB zCg1Hj+Po1#umzBRwxMzF_#ZZ61;0Di*N+Yl*QAGqb&Mu8{Jty(4f-`cZD0L)Kb{}| z_U@AgG3y0MfWG`4oPLlk!JSKl3NhX~j+gjogZcizTOuBoGVai%Mm<nMc8U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