<?xml version="1.0" encoding="ISO-8859-1" ?>

<gatein-resources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.exoplatform.org/xml/ns/gatein_resources_1_4 http://www.exoplatform.org/xml/ns/gatein_resources_1_4"
	xmlns="http://www.exoplatform.org/xml/ns/gatein_resources_1_4">

  <module>
    <name>taskLocale</name>
    <supported-locale>ar</supported-locale>
    <supported-locale>ca</supported-locale>
    <supported-locale>cs</supported-locale>
    <supported-locale>de</supported-locale>
    <supported-locale>el</supported-locale>
    <supported-locale>en</supported-locale>
    <supported-locale>es-ES</supported-locale>
    <supported-locale>fa</supported-locale>
    <supported-locale>fi</supported-locale>
    <supported-locale>fr</supported-locale>
    <supported-locale>it</supported-locale>
    <supported-locale>ja</supported-locale>
    <supported-locale>lt</supported-locale>
    <supported-locale>nl</supported-locale>
    <supported-locale>no</supported-locale>
    <supported-locale>pl</supported-locale>
    <supported-locale>pt-BR</supported-locale>
    <supported-locale>pt-PT</supported-locale>
    <supported-locale>ro</supported-locale>
    <supported-locale>ru</supported-locale>
    <supported-locale>sq</supported-locale>
    <supported-locale>sv-SE</supported-locale>
    <supported-locale>tr</supported-locale>
    <supported-locale>uk</supported-locale>
    <supported-locale>vi</supported-locale>
    <supported-locale>zh-CN</supported-locale>
    <supported-locale>zh-TW</supported-locale>
    <script>
      <path>/WEB-INF/classes/org/exoplatform/task/management/assets/javascripts/locale_wrapper.js</path>
      <resource-bundle>locale.portlet.taskManagement</resource-bundle>
    </script>
    <depends>
      <module>jquery</module>
      <as>$</as>
    </depends>
  </module>
  <module>
    <name>task_jquery_ui</name>
    <script>
      <adapter>
        (function() {
        // This is workaround to avoid conflict between jquery-ui and bootstrap
        var oldTooltip = jQuery.fn.tooltip;

        <include>/WEB-INF/classes/org/exoplatform/task/management/assets/jquery-ui/1.11.4/jquery-ui.js</include>

        jQuery.fn.tooltip = oldTooltip;
        return jQuery;
        })();
      </adapter>
    </script>
    <depends>
      <module>jquery</module>
      <as>jQuery</as>
    </depends>
  </module>
  <module>
    <name>bootstrap_tooltip</name>
    <script>
      <adapter>
        (function() {
        var oldJQuery = window.jQuery;
        window.jQuery = $;
        <include>/WEB-INF/classes/org/exoplatform/task/management/assets/javascripts/bootstrap/bootstrap-tooltip.js</include>
        window.jQuery = oldJQuery;
        return $;
        })();
      </adapter>
    </script>
    <depends>
      <module>jquery</module>
    </depends>
  </module>
  <module>
    <name>bootstrap_popover</name>
    <script>
      <adapter>
        (function() {
        var oldJQuery = window.jQuery;
        window.jQuery = $;
        <include>/WEB-INF/classes/org/exoplatform/task/management/assets/javascripts/bootstrap/bootstrap-popover.js</include>
        window.jQuery = oldJQuery;
        return $;
        })();
      </adapter>
    </script>
    <depends>
      <module>jquery</module>
    </depends>
    <depends>
      <module>bootstrap_tooltip</module>
    </depends>
  </module>
  <module>
    <name>bootstrap_datepicker</name>
    <script>
      <adapter>
        (function() {
        var oldJQuery = window.jQuery;
        window.jQuery = $;
        <include>/WEB-INF/classes/org/exoplatform/task/management/assets/bootstrap-datepicker/1.4.0/js/bootstrap-datepicker.js</include>
        window.jQuery = oldJQuery;

        <!--
        This is workaround because the name 'datepicker' is used in both bootstrap-datepicker and jquery-ui.
        I clone $.fn.datepicker.DPGlobal to other property to used in 'x-editable-calendar' module
        -->
        $.fn.task_datepicker = $.fn.datepicker;

        return $;
        })();
      </adapter>
    </script>
    <depends>
      <module>jquery</module>
    </depends>
  </module>

  <module>
    <name>select2</name>
    <script>
      <adapter>
        (function() {
        <include>/WEB-INF/classes/org/exoplatform/task/management/assets/select2/3.5.2/select2.js</include>
        return jQuery;
        })();
      </adapter>
    </script>
    <depends>
      <module>jquery</module>
      <as>jQuery</as>
    </depends>
  </module>
  <module>
    <name>edit_inline_js</name>
    <script>
      <adapter>
        (function() {
          var oldJQuery = window.jQuery;
          window.jQuery = $;
          <include>/WEB-INF/classes/org/exoplatform/task/management/assets/x-editable-bootstrap/1.4.6/js/bootstrap-editable.js</include>
          window.jQuery = oldJQuery;
          return $;
        })();
      </adapter>
    </script>
    <depends>
      <module>jquery</module>
    </depends>
    <depends>
      <module>bootstrap_tooltip</module>
    </depends>
    <depends>
      <module>bootstrap_popover</module>
    </depends>
    <depends>
      <module>bootstrap_datepicker</module>
    </depends>
    <depends>
      <module>select2</module>
    </depends>
    <depends>
      <module>suggester</module>
    </depends>
  </module>
  <module>
		<name>taskChatPlugin</name>
		<script>
			<path>/js/TaskChatPlugin.js</path>
		</script>
		<depends>
			<module>jquery</module>
		</depends>
    <depends>
      <module>suggester</module>
    </depends>
	</module>


  <module>
    <name>bootstrap_datepicker_locale</name>
    <script>
      <adapter>
        (function() {
        <include>/js/bootstrap-datepicker.locales.min.js</include>
        return jQuery;
        })();
      </adapter>
    </script>
    <depends>
      <module>bootstrap_datepicker</module>
    </depends>
    <depends>
      <module>jquery</module>
      <as>jQuery</as>
    </depends>
  </module>

</gatein-resources>

