
######
Loader
######


****
NAME
****


Kernel::Output::HTML::Layout::Loader - CSS/JavaScript


***********
DESCRIPTION
***********


All valid functions.


****************
PUBLIC INTERFACE
****************


LoaderCreateAgentCSSCalls()
===========================


Generate the minified CSS files and the tags referencing them,
taking a list from the Loader::Agent::CommonCSS config item.


.. code-block:: perl

     $LayoutObject->LoaderCreateAgentCSSCalls(
         Skin => 'MySkin', # optional, if not provided skin is the configured by default
     );



LoaderCreateAgentJSCalls()
==========================


Generate the minified JavaScript files and the tags referencing them,
taking a list from the Loader::Agent::CommonJS config item.


.. code-block:: perl

     $LayoutObject->LoaderCreateAgentJSCalls();



LoaderCreateJavaScriptTemplateData()
====================================


Generate a minified file for the template data that
needs to be present on the client side for JavaScript based templates.


.. code-block:: perl

     $LayoutObject->LoaderCreateJavaScriptTemplateData();



LoaderCreateJavaScriptTranslationData()
=======================================


Generate a minified file for the translation data that
needs to be present on the client side for JavaScript based translations.


.. code-block:: perl

     $LayoutObject->LoaderCreateJavaScriptTranslationData();



LoaderCreateCustomerCSSCalls()
==============================


Generate the minified CSS files and the tags referencing them,
taking a list from the Loader::Customer::CommonCSS config item.


.. code-block:: perl

     $LayoutObject->LoaderCreateCustomerCSSCalls();



LoaderCreateCustomerJSCalls()
=============================


Generate the minified JavaScript files and the tags referencing them,
taking a list from the Loader::Customer::CommonJS config item.


.. code-block:: perl

     $LayoutObject->LoaderCreateCustomerJSCalls();



SkinValidate()
==============


Returns 1 if skin is available for Agent or Customer frontends and 0 if not.


.. code-block:: perl

     my $SkinIsValid = $LayoutObject->SkinValidate(
         UserType => 'Agent'     #  Agent or Customer,
         Skin => 'ExampleSkin',
     );



LoaderCreateDynamicCSS()
========================


Creates CSS string from CSS modules and adds it to HTMLHead.tt.


.. code-block:: perl

     my $Success = $LayoutObject->LoaderCreateDynamicCSS();


CSS Result:


.. code-block:: perl

     .StateID-1 {
         background: #50B5FF;
     }
     .StateID-2 {
         background: #3DD598;
     }
     .StateID-3 {
         background: #FC5A5A;
     }
     .StateID-4 {
         background: #FFC542;
     }
     .StateID-5 {
         background: #8D8D9B;
     }
     .StateID-6 {
         background: #FF8A25;
     }
     .StateID-7 {
         background: #3DD598;
     }
     .StateID-8 {
         background: #FC5A5A;
     }
     .StateID-9 {
         background: #8D8D9B;
     }


Returns:


.. code-block:: perl

     my $Success = 1;





