All Downloads are FREE. Search and download functionalities are using the official Maven repository.

template.jquery.gridcolumn.ftl Maven / Gradle / Ivy

There is a newer version: 5.0.6
Show newest version
<#--
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
-->
<#assign colName="${parameters.name?string?replace('.', '_')}">
<#assign escapedOptionId="${parameters.grid?string?replace('.', '_')}">

options_${escapedOptionId?html}_colmodels_${colName} = {};
options_${escapedOptionId?html}_colmodels_${colName}.name = "${parameters.name?string}";
<#if parameters.jsonmap?if_exists != "">
options_${escapedOptionId?html}_colmodels_${colName}.jsonmap = "${parameters.jsonmap?html}";
<#else>
options_${escapedOptionId?html}_colmodels_${colName}.jsonmap = "${parameters.name?html}";

<#if parameters.index?if_exists != "">
options_${escapedOptionId?html}_colmodels_${colName}.index = "${parameters.index?html}";

<#if parameters.width?if_exists != "">
options_${escapedOptionId?html}_colmodels_${colName}.width = ${parameters.width?html};

<#if parameters.editoptions?if_exists != "">
options_${escapedOptionId?html}_colmodels_${colName}.editoptions = ${parameters.editoptions?html};

<#if parameters.edittype?if_exists != "">
options_${escapedOptionId?html}_colmodels_${colName}.edittype = "${parameters.edittype?html}";

<#if parameters.editrules?if_exists != "">
options_${escapedOptionId?html}_colmodels_${colName}.editrules = ${parameters.editrules?html};

<#if parameters.formoptions?if_exists != "">
options_${escapedOptionId?html}_colmodels_${colName}.formoptions = ${parameters.formoptions?html};

<#if parameters.formatter?if_exists != "">
	<#if parameters.formatter == "integer" 
		|| parameters.formatter == "number" 
		|| parameters.formatter == "currency" 
		|| parameters.formatter == "date" 
		|| parameters.formatter == "email" 
		|| parameters.formatter == "link" 
		|| parameters.formatter == "showlink" 
		|| parameters.formatter == "checkbox" 
		|| parameters.formatter == "select" 
		>
		options_${escapedOptionId?html}_colmodels_${colName}.formatter = "${parameters.formatter?html}";
	<#else>
		options_${escapedOptionId?html}_colmodels_${colName}.formatter = ${parameters.formatter?html};
	

<#if parameters.formatoptions?if_exists != "">
options_${escapedOptionId?html}_colmodels_${colName}.formatoptions = ${parameters.formatoptions?html};

<#if parameters.align?if_exists != "">
options_${escapedOptionId?html}_colmodels_${colName}.align = "${parameters.align?html}";

<#if parameters.cssClass?if_exists != "">
options_${escapedOptionId?html}_colmodels_${colName}.classes = "${parameters.cssClass?html}";

<#if parameters.fixed?default(false)>
options_${escapedOptionId?html}_colmodels_${colName}.fixed = true;
options_${escapedOptionId?html}.true = false;

<#if parameters.frozen?default(false)>
options_${escapedOptionId?html}_colmodels_${colName}.frozen = true;
options_${escapedOptionId?html}.frozen = true;

<#if parameters.editable?default(false)>
options_${escapedOptionId?html}_colmodels_${colName}.editable = true;
<#else>
options_${escapedOptionId?html}_colmodels_${colName}.editable = false;

<#if parameters.sortable?default(true)>
options_${escapedOptionId?html}_colmodels_${colName}.sortable = true;
<#else>
options_${escapedOptionId?html}_colmodels_${colName}.sortable = false;

<#if parameters.sorttype?if_exists != "">
options_${escapedOptionId?html}_colmodels_${colName}.sorttype = "${parameters.sorttype?html}";

<#if parameters.resizable?default(true)>
options_${escapedOptionId?html}_colmodels_${colName}.resizable = true;
<#else>
options_${escapedOptionId?html}_colmodels_${colName}.resizable = false;

<#if parameters.search?default(true)>
options_${escapedOptionId?html}_colmodels_${colName}.search = true;
	<#if parameters.searchtype?if_exists != "">
options_${escapedOptionId?html}_colmodels_${colName}.stype = "${parameters.searchtype?html}";
	
<#else>
options_${escapedOptionId?html}_colmodels_${colName}.search = false;

<#if parameters.key?default(false)>
options_${escapedOptionId?html}_colmodels_${colName}.key = true;

<#if parameters.hidedlg?default(false)>
options_${escapedOptionId?html}_colmodels_${colName}.hidedlg = true;

<#if parameters.hidden?default(false)>
options_${escapedOptionId?html}_colmodels_${colName}.hidden = true;

<#if parameters.defval?if_exists != "">
options_${escapedOptionId?html}_colmodels_${colName}.defval = "${parameters.defval?html}";

<#if parameters.surl?if_exists != "">
options_${escapedOptionId?html}_colmodels_${colName}.surl = "${parameters.surl?string}";

<#if parameters.searchoptions?if_exists != "">
options_${escapedOptionId?html}_colmodels_${colName}.searchoptions = ${parameters.searchoptions?html};

<#if !parameters.displayTitle?default(true)>
options_${escapedOptionId?html}_colmodels_${colName}.title = false;


options_${escapedOptionId?html}_colnames.push("${parameters.title?html}");
options_${escapedOptionId?html}_colmodels.push(options_${escapedOptionId?html}_colmodels_${colName});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy