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

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

<#--
/*
 * 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="${attributes.name?string?replace('.', '_')}">
<#assign escapedOptionId="${attributes.grid?string?replace('.', '_')}">

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

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

<#if attributes.width?if_exists != "">
options_${escapedOptionId}_colmodels_${colName}.width = <#outputformat "JavaScript">${attributes.width};

<#if attributes.editoptions?if_exists != "">
options_${escapedOptionId}_colmodels_${colName}.editoptions = <#outputformat "JavaScript">${attributes.editoptions};

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

<#if attributes.editrules?if_exists != "">
options_${escapedOptionId}_colmodels_${colName}.editrules = <#outputformat "JavaScript">${attributes.editrules};

<#if attributes.formoptions?if_exists != "">
options_${escapedOptionId}_colmodels_${colName}.formoptions = <#outputformat "JavaScript">${attributes.formoptions};

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

<#if attributes.formatoptions?if_exists != "">
options_${escapedOptionId}_colmodels_${colName}.formatoptions = <#outputformat "JavaScript">${attributes.formatoptions};

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<#if attributes.searchoptions?if_exists != "">
options_${escapedOptionId}_colmodels_${colName}.searchoptions = <#outputformat "JavaScript">${attributes.searchoptions};

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


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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy