"use strict";

/*
 * *******************************************************************************
 *  * Copyright (c) 2018 Edgeworx, Inc.
 *  *
 *  * This program and the accompanying materials are made available under the
 *  * terms of the Eclipse Public License v. 2.0 which is available at
 *  * http://www.eclipse.org/legal/epl-2.0
 *  *
 *  * SPDX-License-Identifier: EPL-2.0
 *  *******************************************************************************
 *
 */

ioAuthoring = ioAuthoring || {};

ioAuthoring.templates = ioAuthoring.templates || {};

ioAuthoring.templates.fogTypeList = "\
    <% for(var i=0; i<fogTypes.length; i++) { %>\
        <% var name = fogTypes[i].Name; %>\
        <% var dispName; %>\
        <% if (name.length > 19) { %>\
         <% dispName = name.substr(0,19) + '...'; %>\
        <% }else{ %> \
            <% dispName = name; %>\
        <% } %>\
    <div class='fog-type-container' data-fog-type-id='<%= fogTypes[i].ID %>' \
        data-fog-type-name='<%= fogTypes[i].Name %>' data-fog-type-description='<%= fogTypes[i].Description %>' data-fog-type-image='<%= fogTypes[i].Image %>'>\
        <img class='fog-type-icon' src='/images/shared/<%= fogTypes[i].Image %>?<%=  Date.now() %>'>\
        <p><strong><%= dispName %></strong></p>\
        <p class='pix12'><span id='fog-type-hover-icon-<%= fogTypes[i].ID %>'\
            class='hover-more-text' last='<%= fogTypes.length - 1 == i ? 1 : 0 %>'>more</span></p>\
            <div style='display:none;' id='fog-type-description-<%= fogTypes[i].ID %>'>\
            <p class='hPad8'><%= fogTypes[i].Description %></p></div>\
    </div>\
    <% } %>\
";