Skip to content
Snippets Groups Projects
Commit 3e2f6096 authored by Preexo's avatar Preexo
Browse files

start for getting the value of the max column size from an action

parent 20b20c79
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ var Vtiger_CustomView_Js = {
contentsCotainer : false,
columnListSelect2Element : false,
advanceFilterInstance : false,
maximumColumnCount : 12,
//This will store the columns selection container
columnSelectElement : false,
......@@ -197,8 +198,18 @@ var Vtiger_CustomView_Js = {
* Function which will register the select2 elements for columns selection
*/
registerSelect2ElementForColumnsSelection : function() {
var selectElement = Vtiger_CustomView_Js.getColumnSelectElement();
app.changeSelectElementView(selectElement, 'select2', {maximumSelectionSize: 12,dropdownCss : {'z-index' : 0}});
var url = "index.php?module=CustomView&action=EditAjax&mode=getData&record=";
AppConnector.request(url).then(
function(data){
// TODO: check data returned by ajax call
console.debug(data);
var selectElement = Vtiger_CustomView_Js.getColumnSelectElement();
// access correct data key/val to set the max size
app.changeSelectElementView(selectElement, 'select2', {maximumSelectionSize: data,dropdownCss : {'z-index' : 0}});
},
function(error,err){}
);
},
registerEvents: function(){
......
<?php
/*+***********************************************************************************
* 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.
*************************************************************************************/
class CustomView_EditAjax_Action extends Vtiger_Action_Controller {
public function process(Vtiger_Request $request) {
// TODO: check record parameter is set
$customViewModel = CustomView_Record_Model::getInstanceById($request->get('record'));
// TODO: implement this function call
$customViewModel->getMaxColumnCount();
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment