<?xml version="1.0" encoding="ISO-8859-1" ?>
<!--
  This file is part of the Meeds project (https://meeds.io/).
  Copyright (C) 2022 Meeds Association
  contact@meeds.io
  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 3 of the License, or (at your option) any later version.
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.
  You should have received a copy of the GNU Lesser General Public License
  along with this program; if not, write to the Free Software Foundation,
  Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-->
<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">


  <portal-skin>
    <skin-name>Enterprise</skin-name>
    <skin-module>taskCommentsDrawer</skin-module>
    <css-path>/skin/css/tasksCommentDrawer.css</css-path>
    <css-priority>2</css-priority>
  </portal-skin>

  <portal-skin>
    <skin-name>Enterprise</skin-name>
    <skin-module>tasksDrawer</skin-module>
    <css-path>/skin/css/tasksDrawer.css</css-path>
    <css-priority>2</css-priority>
  </portal-skin>

  <portlet-skin>
    <application-name>task-management</application-name>
    <portlet-name>tasks</portlet-name>
    <skin-name>Enterprise</skin-name>
    <css-path>/skin/css/tasks.css</css-path>
    <css-priority>2</css-priority>
  </portlet-skin>

  <portlet-skin>
    <application-name>task-management</application-name>
    <portlet-name>TasksManagement</portlet-name>
    <skin-name>Enterprise</skin-name>
    <css-path>/skin/css/tasks.css</css-path>
    <css-priority>2</css-priority>
  </portlet-skin>

  <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>vuedraggable</name>
    <script>
      <path>/js/vuedraggable.js</path>
    </script>
  </module>

  <module>
    <name>ganttChart</name>
    <script>
      <minify>false</minify>
      <path>/js/frappegantt.js</path>
    </script>
  </module>


  <portlet>
    <name>tasks</name>
    <module>
      <depends>
        <module>tasksBundle</module>
      </depends>
      <depends>
        <module>vue</module>
      </depends>
      <depends>
        <module>vuetify</module>
      </depends>
      <depends>
        <module>eXoVueI18n</module>
      </depends>
      <depends>
        <module>commonVueComponents</module>
      </depends>
      <depends>
        <module>jquery</module>
        <as>$</as>
      </depends>
    </module>
  </portlet>

  <module>
    <name>tasksBundle</name>
    <script>
      <minify>false</minify>
      <path>/js/tasks.bundle.js</path>
    </script>
    <depends>
      <module>taskDrawer</module>
    </depends>
    <depends>
      <module>eXoVueI18n</module>
    </depends>
    <depends>
      <module>extensionRegistry</module>
    </depends>
    <depends>
      <module>commonVueComponents</module>
    </depends>
    <depends>
      <module>jquery</module>
      <as>$</as>
    </depends>
  </module>

  <module>
    <name>taskDrawer</name>
    <script>
      <minify>false</minify>
      <path>/js/taskDrawer.bundle.js</path>
    </script>
    <depends>
      <module>vue</module>
    </depends>
    <depends>
      <module>commonVueComponents</module>
    </depends>
    <depends>
      <module>extensionRegistry</module>
    </depends>
    <depends>
      <module>vuetify</module>
    </depends>
    <depends>
      <module>eXoVueI18n</module>
    </depends>
    <depends>
      <module>commons-editor</module>
      <as>editor</as>
    </depends>
    <depends>
      <module>jquery</module>
      <as>$</as>
    </depends>
  </module>

  <module>
    <name>taskCommentsDrawer</name>
    <script>
      <minify>false</minify>
      <path>/js/taskCommentsDrawer.bundle.js</path>
    </script>
    <depends>
      <module>commonVueComponents</module>
    </depends>
    <depends>
      <module>extensionRegistry</module>
    </depends>
    <depends>
      <module>vue</module>
    </depends>
    <depends>
      <module>vuetify</module>
    </depends>
    <depends>
      <module>eXoVueI18n</module>
    </depends>
    <depends>
      <module>commons-editor</module>
      <as>editor</as>
    </depends>
    <depends>
      <module>jquery</module>
      <as>$</as>
    </depends>
  </module>

  <module>
    <name>TaskSearch</name>
    <script>
      <minify>false</minify>
      <path>/js/taskSearch.bundle.js</path>
    </script>
    <depends>
      <module>vue</module>
    </depends>
    <depends>
      <module>vuetify</module>
    </depends>
    <depends>
      <module>eXoVueI18n</module>
    </depends>
    <depends>
      <module>commonVueComponents</module>
    </depends>
    <depends>
      <module>extensionRegistry</module>
    </depends>
    <depends>
      <module>jquery</module>
      <as>$</as>
    </depends>
  </module>

  <portlet>
    <name>TasksManagement</name>
    <module>
      <script>
        <minify>false</minify>
        <path>/js/tasksManagement.bundle.js</path>
      </script>
      <depends>
        <module>taskCommentsDrawer</module>
      </depends>
      <depends>
        <module>commonVueComponents</module>
      </depends>
      <depends>
        <module>vuedraggable</module>
      </depends>
      <depends>
        <module>ganttChart</module>
      </depends>
      <depends>
        <module>vue</module>
      </depends>
      <depends>
        <module>vuetify</module>
      </depends>
      <depends>
        <module>vueEllipsis</module>
      </depends>
      <depends>
        <module>eXoVueI18n</module>
      </depends>
      <depends>
        <module>jquery</module>
        <as>$</as>
      </depends>
      <depends>
        <module>eCharts</module>
      </depends>
      <depends>
        <module>extensionRegistry</module>
      </depends>
    </module>
  </portlet>

  <module>
    <name>engagementCenterActionsTaskExtensions</name>
    <load-group>engagement-center-user-actions</load-group>
    <script>
      <path>/js/engagementCenterExtensions.bundle.js</path>
    </script>
    <depends>
      <module>vue</module>
    </depends>
    <depends>
      <module>vuetify</module>
    </depends>
    <depends>
      <module>eXoVueI18n</module>
    </depends>
    <depends>
      <module>extensionRegistry</module>
    </depends>
  </module>

</gatein-resources>
