Update form UI

pull/3890/head
Julio Montoya 4 years ago
parent 31a9fa18bc
commit 54f383b204
  1. 72
      assets/css/app.scss
  2. 4
      assets/css/scss/_exercise.scss
  3. 4
      assets/css/scss/index.scss
  4. 470
      assets/vue/App.vue
  5. 23
      assets/vue/components/Breadcrumb.vue
  6. 3
      assets/vue/components/documents/FormNewDocument.vue
  7. 2
      assets/vue/components/layout/DashboardLayout.vue
  8. 16
      assets/vue/main.js
  9. 5
      assets/vue/styles/quasar.sass
  10. 10
      assets/vue/views/documents/List.vue
  11. 56
      assets/vue/views/user/courses/List.vue
  12. 6
      public/main/inc/lib/display.lib.php
  13. 10
      public/main/inc/lib/formvalidator/FormValidator.class.php
  14. 36
      public/main/inc/lib/pear/HTML/QuickForm/checkbox.php
  15. 10
      public/main/inc/lib/pear/HTML/QuickForm/radio.php
  16. 12
      public/main/inc/lib/pear/HTML/QuickForm/text.php
  17. 8
      public/main/inc/lib/sortable_table.class.php

@ -1,4 +1,30 @@
@import "tailwindcss/base";
@layer base {
[type='text'],
[type='email'],
[type='url'],
[type='password'],
[type='number'],
[type='date'],
[type='datetime-local'],
[type='month'],
[type='search'],
[type='tel'],
[type='time'],
[type='week'],
[multiple],
textarea,
select {
@apply rounded border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500;
}
[type='checkbox'],
[type='radio'] {
@apply rounded border-gray-300 text-blue-600 focus:ring-blue-500;
}
}
@import "tailwindcss/components";
@import "tailwindcss/utilities";
@ -6,29 +32,41 @@
//@import 'bootstrap.scss';
// undo
@import "~@fortawesome/fontawesome-free/css/all.css";
@import '~cropper/dist/cropper.css';
@import '~flag-icon-css/sass/flag-icon.scss';
@import "~select2/dist/css/select2.css";
@import "~bootstrap-daterangepicker/daterangepicker.css";
@import "~bootstrap-select/sass/bootstrap-select";
@import '~pretty-checkbox/src/pretty-checkbox.scss';
@import '~jquery-ui/themes/base/all.css';
//@import "scss/index.scss";
//@import "~@fortawesome/fontawesome-free/css/all.css";
//@import '~cropper/dist/cropper.css';
//@import '~flag-icon-css/sass/flag-icon.scss';
//@import "~select2/dist/css/select2.css";
//@import "~bootstrap-daterangepicker/daterangepicker.css";
//@import "~bootstrap-select/sass/bootstrap-select";
//@import '~pretty-checkbox/src/pretty-checkbox.scss';
//@import '~jquery-ui/themes/base/all.css';
@layer components {
.card {
@apply bg-white rounded shadow-lg;
}
.card-body {
//@apply p-2;
}
//ripple
.btn {
//@apply inline-block text-black px-4 py-2 text-xs font-medium leading-6 text-center bg-gray-100 uppercase transition rounded shadow hover:shadow-lg focus:outline-none;
//disabled:cursor-not-allowed
//@apply block px-4 py-2 transition duration-100 ease-in-out focus:border-blue-500 focus:ring-2 focus:ring-blue-500 focus:outline-none focus:ring-opacity-50 disabled:opacity-50 ;
@apply inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500;
@apply h-10 inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500;
}
.btn-primary {
@apply text-white bg-blue-700 hover:bg-blue-800;
}
.btn-danger {
@apply text-white bg-red-700 hover:bg-red-800;
}
.btn > .fa {
@apply -ml-1 mr-1 h-4 w-5 fill-current ;
}
@ -95,10 +133,20 @@
margin: 0;
border: 0;
}
@import "scss/index.scss";
}
a.router-link-exact-active {
//@apply border-b-2 bg-gray-100 border-gray-500 text-gray-500 rounded-t;
}
@import 'primevue-md-light-indigo/theme.css';
@import '~primevue/resources/primevue.min.css';
//@import '~primeflex/primeflex.css';
@import "~primeicons/primeicons.css";
//@import "~jquery-ui-timepicker-addon/dist/jquery-ui-timepicker-addon.css";
//
//@import "~@fancyapps/fancybox/dist/jquery.fancybox.css";
//@import "~jquery-contextmenu/dist/jquery.contextMenu.css";
//@import '~pretty-checkbox/src/pretty-checkbox.scss';

@ -56,4 +56,8 @@
background-color: #ffffff;
outline: 0 none;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(102, 175, 233, 0.6);
}
.question_menu {
@apply p-4 flex flex-row gap-1;
}

@ -6,6 +6,6 @@
//@import 'install';
//@import "forms";
//@import 'announcement';
//@import 'exercise';
@import 'exercise';
//@import 'jqueryui';
//@import 'lp';
@import 'lp';

@ -1,299 +1,185 @@
<template>
<component :is="layout">
<!-- <Breadcrumb :legacy="this.breadcrumb"/>-->
<router-view />
<div id="legacy_content"
v-html="legacyContent"
/>
</component>
<div v-if="false" class="antialiased text-gray-900 bg-white">
<div class="flex h-screen overflow-y-hidden bg-white">
<!-- Sidebar -->
<Sidebar />
<div class="flex flex-col flex-1 h-full overflow-hidden py-70">
<!-- Navbar -->
<header class="flex-shrink-0 border-b">
<Navbar />
</header>
<!-- Main content -->
<main class="flex-1 max-h-full p-5 overflow-hidden overflow-y-scroll">
<router-view />
<div id="legacy_content"
v-html="legacyContent"
<q-layout view="hHh LpR lff" class="bg-grey-1">
<q-header bordered class="bg-white text-grey-8" height-hint="64">
<q-toolbar class="GNL__toolbar">
<q-btn
flat
dense
round
@click="leftDrawerOpen = !leftDrawerOpen"
aria-label="Menu"
icon="menu"
class="q-mr-sm"
/>
<q-toolbar-title v-if="$q.screen.gt.xs" shrink class="row items-center no-wrap">
<img style="width:200px" src="/build/css/themes/chamilo/images/header-logo.png" />
<!-- <span class="q-ml-sm">News</span>-->
</q-toolbar-title>
<q-space />
<div v-if="isAuthenticated" class="GPLAY__toolbar-input-container row no-wrap">
<q-tabs align="center" dense inline-label>
<q-route-tab icon="home" to="/" label="Home" />
<q-route-tab to="/courses" label="My courses" />
<q-route-tab to="/main/calendar/agenda_js.php?type=personal" label="Agenda" />
</q-tabs>
</div>
<q-space />
<div class="q-gutter-sm row items-center no-wrap">
<!-- <q-btn v-if="$q.screen.gt.sm" round dense flat color="text-grey-7" icon="apps">-->
<!-- <q-tooltip>Google Apps</q-tooltip>-->
<!-- </q-btn>-->
<q-btn v-if="isAuthenticated" round dense flat color="grey-8" icon="notifications">
<q-badge color="red" text-color="white" floating>
2
</q-badge>
<q-tooltip>Notifications</q-tooltip>
</q-btn>
<q-btn v-if="!isAuthenticated"
:to="{ name: 'Login'}"
color="primary"
icon="mail"
label="Login"
/>
</main>
<!-- Main footer -->
<footer class="flex items-center justify-between flex-shrink-0 p-4 border-t max-h-14">
<div>Chamilo 2020</div>
<div class="text-sm">
Made by
<a
class="text-blue-400 underline"
href="https://github.com/Kamona-WD"
target="_blank"
rel="noopener noreferrer"
>Ahmed Kamel</a
>
</div>
<div>
<!-- Github svg -->
<a
href="https://github.com/Kamona-WD/starter-dashboard-layout-vue"
target="_blank"
class="flex items-center space-x-1"
>
<svg class="w-6 h-6 text-gray-400" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
<path
fill-rule="evenodd"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"
></path>
</svg>
<span class="hidden text-sm md:block">View on Github</span>
</a>
</div>
</footer>
</div>
<!-- Setting panel button -->
<div class="fixed right-0 transform rotate-90 translate-x-8 top-1/2">
<Button @click="isSettingsPanelOpen = true" class="text-sm font-medium text-white uppercase bg-gray-600">
Settings
</Button>
</div>
<SettingsPanel :show="isSettingsPanelOpen" @close="isSettingsPanelOpen = false" />
<SearchPanel left :show="isSearchPanelOpen" @close="isSearchPanelOpen = false" />
<NotificationsPanel left :show="isNotificationsPanelOpen" @close="isNotificationsPanelOpen = false" />
</div>
</div>
<!-- Component End -->
<!-- <q-layout view="hHh LpR lff" class="bg-grey-1">-->
<!-- <q-header bordered class="bg-white text-grey-8" height-hint="64">-->
<!-- <q-toolbar class="GNL__toolbar">-->
<!-- <q-btn-->
<!-- flat-->
<!-- dense-->
<!-- round-->
<!-- @click="leftDrawerOpen = !leftDrawerOpen"-->
<!-- aria-label="Menu"-->
<!-- icon="menu"-->
<!-- class="q-mr-sm"-->
<!-- />-->
<!-- <q-toolbar-title v-if="$q.screen.gt.xs" shrink class="row items-center no-wrap">-->
<!-- <a href="/">-->
<!-- <img style="width:200px" src="/build/css/themes/chamilo/images/header-logo.png" />-->
<!-- </a>-->
<!-- &lt;!&ndash; <span class="q-ml-sm">News</span>&ndash;&gt;-->
<!-- </q-toolbar-title>-->
<!--&lt;!&ndash; <q-select&ndash;&gt;-->
<!--&lt;!&ndash; v-if="isAuthenticated"&ndash;&gt;-->
<!--&lt;!&ndash; ref="search" dense use-input hide-selected&ndash;&gt;-->
<!--&lt;!&ndash; class="GL__toolbar-select"&ndash;&gt;-->
<!--&lt;!&ndash; color="black"&ndash;&gt;-->
<!--&lt;!&ndash; :stack-label="false"&ndash;&gt;-->
<!--&lt;!&ndash; label="Search or jump to..."&ndash;&gt;-->
<!--&lt;!&ndash; v-model="text"&ndash;&gt;-->
<!--&lt;!&ndash; :options="filteredOptions"&ndash;&gt;-->
<!--&lt;!&ndash; @filter="filter"&ndash;&gt;-->
<!--&lt;!&ndash; style="width: 300px"&ndash;&gt;-->
<!--&lt;!&ndash; >&ndash;&gt;-->
<!--&lt;!&ndash; <template v-slot:append>&ndash;&gt;-->
<!--&lt;!&ndash; <img src="https://cdn.quasar.dev/img/layout-gallery/img-github-search-key-slash.svg">&ndash;&gt;-->
<!--&lt;!&ndash; </template>&ndash;&gt;-->
<!--&lt;!&ndash; <template v-slot:no-option>&ndash;&gt;-->
<!--&lt;!&ndash; <q-item>&ndash;&gt;-->
<!--&lt;!&ndash; <q-item-section>&ndash;&gt;-->
<!--&lt;!&ndash; <div class="text-center">&ndash;&gt;-->
<!--&lt;!&ndash; <q-spinner-pie&ndash;&gt;-->
<!--&lt;!&ndash; color="grey-5"&ndash;&gt;-->
<!--&lt;!&ndash; size="24px"&ndash;&gt;-->
<!--&lt;!&ndash; />&ndash;&gt;-->
<!--&lt;!&ndash; </div>&ndash;&gt;-->
<!--&lt;!&ndash; </q-item-section>&ndash;&gt;-->
<!--&lt;!&ndash; </q-item>&ndash;&gt;-->
<!--&lt;!&ndash; </template>&ndash;&gt;-->
<!--&lt;!&ndash; <template v-slot:option="scope">&ndash;&gt;-->
<!--&lt;!&ndash; <q-item&ndash;&gt;-->
<!--&lt;!&ndash; v-bind="scope.itemProps"&ndash;&gt;-->
<!--&lt;!&ndash; v-on="scope.itemEvents"&ndash;&gt;-->
<!--&lt;!&ndash; class="GL__select-GL__menu-link"&ndash;&gt;-->
<!--&lt;!&ndash; >&ndash;&gt;-->
<!--&lt;!&ndash; <q-item-section side>&ndash;&gt;-->
<!--&lt;!&ndash; <q-icon name="collections_bookmark" />&ndash;&gt;-->
<!--&lt;!&ndash; </q-item-section>&ndash;&gt;-->
<!--&lt;!&ndash; <q-item-section>&ndash;&gt;-->
<!--&lt;!&ndash; <q-item-label v-html="scope.opt.label" />&ndash;&gt;-->
<!--&lt;!&ndash; </q-item-section>&ndash;&gt;-->
<!--&lt;!&ndash; <q-item-section side :class="{ 'default-type': !scope.opt.type }">&ndash;&gt;-->
<!--&lt;!&ndash; <q-btn outline dense no-caps text-color="blue-grey-5" size="12px" class="bg-grey-1 q-px-sm">&ndash;&gt;-->
<!--&lt;!&ndash; {{ scope.opt.type || 'Jump to' }}&ndash;&gt;-->
<!--&lt;!&ndash; <q-icon name="subdirectory_arrow_left" size="14px" />&ndash;&gt;-->
<!--&lt;!&ndash; </q-btn>&ndash;&gt;-->
<!--&lt;!&ndash; </q-item-section>&ndash;&gt;-->
<!--&lt;!&ndash; </q-item>&ndash;&gt;-->
<!--&lt;!&ndash; </template>&ndash;&gt;-->
<!--&lt;!&ndash; </q-select>&ndash;&gt;-->
<!-- <q-space />-->
<!-- <div v-if="isAuthenticated" class="GPLAY__toolbar-input-container row no-wrap">-->
<!-- <q-tabs align="center" dense inline-label>-->
<!-- <q-route-tab icon="home" to="/" label="Home" />-->
<!-- <q-route-tab to="/courses" label="My courses" />-->
<!-- <q-route-tab to="/main/calendar/agenda_js.php?type=personal" label="Agenda" />-->
<!-- </q-tabs>-->
<!-- </div>-->
<!-- <q-space />-->
<!-- <div class="q-gutter-sm row items-center no-wrap">-->
<!-- &lt;!&ndash; <q-btn v-if="$q.screen.gt.sm" round dense flat color="text-grey-7" icon="apps">&ndash;&gt;-->
<!-- &lt;!&ndash; <q-tooltip>Google Apps</q-tooltip>&ndash;&gt;-->
<!-- &lt;!&ndash; </q-btn>&ndash;&gt;-->
<!-- <q-btn v-if="isAuthenticated" round dense flat color="grey-8" icon="notifications">-->
<!-- <q-badge color="red" text-color="white" floating>-->
<!-- 2-->
<!-- </q-badge>-->
<!-- <q-tooltip>Notifications</q-tooltip>-->
<!-- </q-btn>-->
<!-- <q-btn v-if="!isAuthenticated"-->
<!-- :to="{ name: 'Login'}"-->
<!-- color="primary"-->
<!-- icon="mail"-->
<!-- label="Login"-->
<!-- />-->
<!-- &lt;!&ndash; <Button v-if="!isAuthenticated" :to="{ name: 'Login' }" label="Login" class="p-button-sm" />&ndash;&gt;-->
<!-- &lt;!&ndash; <q-btn v-if="isAuthenticated" round flat>&ndash;&gt;-->
<!-- &lt;!&ndash; <q-avatar size="26px">&ndash;&gt;-->
<!-- &lt;!&ndash; <img src="https://cdn.quasar.dev/img/boy-avatar.png">&ndash;&gt;-->
<!-- &lt;!&ndash; </q-avatar>&ndash;&gt;-->
<!-- &lt;!&ndash; <q-tooltip>Account</q-tooltip>&ndash;&gt;-->
<!-- &lt;!&ndash; </q-btn>&ndash;&gt;-->
<!-- <q-btn v-if="isAuthenticated" dense flat no-wrap>-->
<!-- <q-avatar size="26px">-->
<!-- <img :src="userAvatar + '?w=80&h=80&fit=crop'" />-->
<!-- &lt;!&ndash; <q-icon name="person" ></q-icon>&ndash;&gt;-->
<!-- </q-avatar>-->
<!-- <q-icon name="arrow_drop_down" size="16px" />-->
<!-- <q-menu auto-close>-->
<!-- <q-list dense>-->
<!-- <q-item class="GL__menu-link-signed-in">-->
<!-- <q-item-section>-->
<!-- <div>Signed in as <strong>{{ currentUser.username }}</strong></div>-->
<!-- </q-item-section>-->
<!-- </q-item>-->
<!-- &lt;!&ndash; <q-separator />&ndash;&gt;-->
<!-- &lt;!&ndash; <q-item clickable class="GL__menu-link-status">&ndash;&gt;-->
<!-- &lt;!&ndash; <q-item-section>&ndash;&gt;-->
<!-- &lt;!&ndash; <div>&ndash;&gt;-->
<!-- &lt;!&ndash; <q-icon name="tag_faces" color="blue-9" size="18px" />&ndash;&gt;-->
<!-- &lt;!&ndash; Set your status&ndash;&gt;-->
<!-- &lt;!&ndash; </div>&ndash;&gt;-->
<!-- &lt;!&ndash; </q-item-section>&ndash;&gt;-->
<!-- &lt;!&ndash; </q-item>&ndash;&gt;-->
<!-- <q-separator />-->
<!-- <q-item replace :to="'/main/messages/index.php'" clickable class="">-->
<!-- <q-item-section>Inbox</q-item-section>-->
<!-- </q-item>-->
<!-- <q-item href="/account/home" tag="a" class="">-->
<!-- <q-item-section>-->
<!-- Your profile-->
<!-- </q-item-section>-->
<!-- </q-item>-->
<!-- <q-item href="/account/edit" tag="a" class="">-->
<!-- <q-item-section>Settings</q-item-section>-->
<!-- </q-item>-->
<!-- <q-item href="/logout" tag="a" clickable class="">-->
<!-- <q-item-section>-->
<!-- Sign out-->
<!-- </q-item-section>-->
<!-- </q-item>-->
<!-- </q-list>-->
<!-- </q-menu>-->
<!-- </q-btn>-->
<!-- </div>-->
<!-- </q-toolbar>-->
<!-- </q-header>-->
<!-- <q-drawer-->
<!-- v-model="leftDrawerOpen"-->
<!-- show-if-above-->
<!-- bordered-->
<!-- content-class="bg-white"-->
<!-- :width="250"-->
<!-- >-->
<!-- <q-scroll-area class="fit">-->
<!-- <q-list v-if="isAuthenticated" padding class="text-grey-8">-->
<!-- <q-item class="GNL__drawer-item" v-ripple v-for="link in links1" :key="link.text" :to="link.url" clickable>-->
<!-- <q-item-section avatar>-->
<!-- <Button v-if="!isAuthenticated" :to="{ name: 'Login' }" label="Login" class="p-button-sm" />-->
<!-- <q-btn v-if="isAuthenticated" round flat>-->
<!-- <q-avatar size="26px">-->
<!-- <img src="https://cdn.quasar.dev/img/boy-avatar.png">-->
<!-- </q-avatar>-->
<!-- <q-tooltip>Account</q-tooltip>-->
<!-- </q-btn>-->
<q-btn v-if="isAuthenticated" dense flat no-wrap>
<q-avatar size="26px">
<img :src="userAvatar + '?w=80&h=80&fit=crop'" />
<!-- <q-icon name="person" ></q-icon>-->
</q-avatar>
<q-icon name="arrow_drop_down" size="16px" />
<q-menu auto-close>
<q-list dense>
<q-item class="GL__menu-link-signed-in">
<q-item-section>
<div>Signed in as <strong>aaa</strong></div>
</q-item-section>
</q-item>
<!-- <q-separator />-->
<!-- <q-item clickable class="GL__menu-link-status">-->
<!-- <q-item-section>-->
<!-- <div>-->
<!-- <q-icon name="tag_faces" color="blue-9" size="18px" />-->
<!-- Set your status-->
<!-- </div>-->
<!-- </q-item-section>-->
<!-- </q-item>-->
<q-separator />
<q-item replace :to="'/main/messages/index.php'" clickable class="">
<q-item-section>Inbox</q-item-section>
</q-item>
<q-item href="/account/home" tag="a" class="">
<q-item-section>
Your profile
</q-item-section>
</q-item>
<q-item href="/account/edit" tag="a" class="">
<q-item-section>Settings</q-item-section>
</q-item>
<q-item href="/logout" tag="a" clickable class="">
<q-item-section>
Sign out
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</div>
</q-toolbar>
</q-header>
<q-drawer
v-model="leftDrawerOpen"
show-if-above
bordered
content-class="bg-white"
:width="280"
>
<q-scroll-area class="fit">
<q-list v-if="isAuthenticated" padding class="text-grey-8">
<q-item class="GNL__drawer-item" v-ripple v-for="link in links1" :key="link.text" :to="link.url" clickable>
<q-item-section avatar>
<!-- <q-icon :name="link.icon" />-->
<!-- </q-item-section>-->
<!-- <q-item-section>-->
<!-- <q-item-label>{{ link.text }}</q-item-label>-->
<!-- </q-item-section>-->
<!-- </q-item>-->
<!-- <q-separator inset class="q-my-sm" />-->
<!-- <span v-if="isAdmin">-->
<!-- <q-item class="GNL__drawer-item" v-ripple v-for="link in links2" :key="link.text" :to="link.url" clickable>-->
<!-- <q-item-section avatar>-->
<!-- <q-icon :name="link.icon" />-->
<!-- </q-item-section>-->
<!-- <q-item-section>-->
<!-- <q-item-label>{{ link.text }}</q-item-label>-->
<!-- </q-item-section>-->
<!-- </q-item>-->
<!-- </span>-->
<!-- <q-separator inset class="q-my-sm" />-->
<!-- <q-item class="GNL__drawer-item" v-ripple v-for="link in links3" :key="link.text" clickable>-->
<!-- <q-item-section>-->
<!-- <q-item-label>{{ link.text }} <q-icon v-if="link.icon" :name="link.icon" /></q-item-label>-->
<!-- </q-item-section>-->
<!-- </q-item>-->
<!-- <div class="q-mt-md">-->
<!-- <div class="flex flex-center q-gutter-xs">-->
<!-- <a class="GNL__drawer-footer-link" href="javascript:void(0)" aria-label="About">Chamilo</a>-->
<!-- </div>-->
<!-- </div>-->
<!-- </q-list>-->
<!-- <q-list v-else padding class="text-grey-8">-->
<!-- <q-item class="GNL__drawer-item" v-ripple v-for="link in linksAnon" :key="link.text" :to="link.url" clickable>-->
<!-- <q-item-section avatar>-->
<font-awesome-icon :icon="link.icon" size="lg" />
</q-item-section>
<q-item-section>
<q-item-label>{{ link.text }}</q-item-label>
</q-item-section>
</q-item>
<q-separator inset class="q-my-sm" />
<q-item class="GNL__drawer-item" v-ripple v-for="link in links2" :key="link.text" :to="link.url" clickable>
<q-item-section avatar>
<!-- <q-icon :name="link.icon" />-->
<!-- </q-item-section>-->
<!-- <q-item-section>-->
<!-- <q-item-label>{{ link.text }}</q-item-label>-->
<!-- </q-item-section>-->
<!-- </q-item>-->
<!-- </q-list>-->
<!-- </q-scroll-area>-->
<!-- </q-drawer>-->
<!-- <q-page-container>-->
<!-- <q-page-->
<!-- class="q-layout-padding"-->
<!-- >-->
<!-- <router-view />-->
<!-- <div id="legacy_content"-->
<!-- v-html="legacyContent"-->
<!-- />-->
<!-- </q-page>-->
<!-- </q-page-container>-->
<!-- </q-layout>-->
<font-awesome-icon :icon="link.icon" size="lg" />
</q-item-section>
<q-item-section>
<q-item-label>{{ link.text }}</q-item-label>
</q-item-section>
</q-item>
<q-separator inset class="q-my-sm" />
<q-item class="GNL__drawer-item" v-ripple v-for="link in links3" :key="link.text" clickable>
<q-item-section>
<q-item-label>{{ link.text }}
<!-- <q-icon v-if="link.icon" :name="link.icon" />-->
<font-awesome-icon :icon="link.icon" size="lg" />
</q-item-label>
</q-item-section>
</q-item>
<div class="q-mt-md">
<div class="flex flex-center q-gutter-xs">
<a class="GNL__drawer-footer-link" href="javascript:void(0)" aria-label="About">Chamilo</a>
</div>
</div>
</q-list>
<q-list v-else padding class="text-grey-8">
<q-item class="GNL__drawer-item" v-ripple v-for="link in linksAnon" :key="link.text" :to="link.url" clickable>
<q-item-section avatar>
<q-icon :name="link.icon" />
</q-item-section>
<q-item-section>
<q-item-label>{{ link.text }}</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-scroll-area>
</q-drawer>
<!-- <q-drawer show-if-above v-model="rightDrawerOpen" side="right" elevated>-->
<!-- &lt;!&ndash; drawer content &ndash;&gt;-->
<!-- </q-drawer>-->
<q-page-container>
<q-page
class="q-layout-padding"
>
<router-view />
<div id="legacy_content"
v-html="legacyContent"
/>
</q-page>
</q-page-container>
</q-layout>
</template>
<script>

@ -1,10 +1,16 @@
<template>
<div>
<v-breadcrumbs
:items="items"
large
:class="layoutClass"
/>
<div class="q-card p-4">
<q-breadcrumbs
active-color="primary"
large
>
<!-- <q-breadcrumbs-el v-for ="item in items" :label="item.text" :to="item.href" />-->
<q-breadcrumbs-el v-for="item in items" :label="item.text" :to="item.href" />
<!-- <q-item class="GNL__drawer-item" v-ripple v-for="link in links1" :key="link.text" :to="link.url" clickable>-->
</q-breadcrumbs>
</div>
</template>
@ -41,7 +47,7 @@ export default {
}*/
if (this.legacy) {
for (let i = 0, len = this.legacy.length; i < len; i += 1) {
//console.log(this.legacy[i]);
console.log(this.legacy[i]);
items.push({
text: this.legacy[i]['name'],
//disabled: route.path === path || lastItem.path === route.path,
@ -111,7 +117,10 @@ export default {
});
}
}
console.log('BREADCRUMB');
console.log(items);
}
return items;

@ -5,8 +5,7 @@
<!-- @blur="$v.item.title.$touch()"-->
<q-input
outlined
id="item_title"
id="item_title"
v-model="item.title"
:error-messages="titleErrors"
:placeholder="$t('Title')"

@ -6,7 +6,7 @@
<Header />
<main class="flex-1 overflow-x-hidden overflow-y-auto bg-gray-100">
<div class="container mx-auto px-6 py-8">
<div class="container mx-auto px-6 py-4">
<slot />
</div>
</main>

@ -31,7 +31,7 @@ library.add(fas);
//Vue.use(VueApollo);
import Toast from 'vue-toastification';
import 'vue-toastification/dist/index.css';
//import 'vue-toastification/dist/index.css';
const toastOptions = {
transition: 'Vue-Toastification__fade',
maxToasts: 20,
@ -43,7 +43,7 @@ const toastOptions = {
import VueFlatPickr from 'vue-flatpickr-component';
import 'flatpickr/dist/flatpickr.css';
//import 'flatpickr/dist/flatpickr.css';
store.registerModule(
'course',
@ -135,12 +135,10 @@ import Button from 'primevue/button';
import Column from 'primevue/column';
import ColumnGroup from 'primevue/columngroup';
import 'primevue/resources/themes/mdc-light-indigo/theme.css';
//import 'primevue/resources/themes/bootstrap4-light-blue/theme.css';
import 'primevue/resources/primevue.min.css';
import 'primeflex/primeflex.css';
import "primeicons/primeicons.css";
//import './mdb/scss/index.free.scss';
// import 'primevue/resources/themes/mdc-light-indigo/theme.css';
// import 'primevue/resources/primevue.min.css';
// import 'primeflex/primeflex.css';
// import "primeicons/primeicons.css";
app.component('Dialog', Dialog);
app.component('DataView', DataView);
@ -151,9 +149,7 @@ app.component('InputText', InputText);
app.component('Button', Button);
app.component('Column', Column);
app.component('ColumnGroup', ColumnGroup);
app.component('font-awesome-icon', FontAwesomeIcon);
app.component('DashboardLayout', DashboardLayout)
app.component('EmptyLayout', EmptyLayout)

@ -1,7 +1,2 @@
@import 'quasar.variables'
@import '~quasar/dist/quasar.sass'
//@import '~quasar-style'
// @import '~quasar-addon-styl'

@ -40,13 +40,15 @@
<Toolbar class="p-mb-4">
<template #left>
<Button label="New" icon="pi pi-plus" class="p-button-primary p-button-sm p-mr-2" @click="openNew" />
<!-- <Button label="New" icon="pi pi-plus" class="p-button-primary p-button-sm p-mr-2" @click="openNew" />-->
<Button label="New" icon="pi pi-plus" class="btn btn-primary" @click="openNew" />
<!-- <Button label="New folder" icon="pi pi-plus" class="p-button-success p-mr-2" @click="addHandler()" />-->
<Button label="New document" icon="pi pi-plus" class="p-button-sm p-button-primary p-mr-2" @click="addDocumentHandler()" />
<!-- <Button label="New document" icon="pi pi-plus" class="p-button-sm p-button-primary p-mr-2" @click="addDocumentHandler()" />-->
<Button label="New document" icon="pi pi-plus" class="btn btn-primary" @click="addDocumentHandler()" />
<Button label="Upload" icon="pi pi-plus" class="p-button-sm p-button-primary p-mr-2" @click="uploadDocumentHandler()" />
<Button label="Delete" icon="pi pi-trash" class="p-button-sm p-button-danger" @click="confirmDeleteSelected" :disabled="!selectedItems || !selectedItems.length" />
<Button label="Upload" icon="pi pi-plus" class="btn btn-primary" @click="uploadDocumentHandler()" />
<Button label="Delete" icon="pi pi-trash" class="btn btn-danger " @click="confirmDeleteSelected" :disabled="!selectedItems || !selectedItems.length" />
</template>
<!-- <template #right>-->

@ -11,44 +11,38 @@
import CourseCardList from './CourseCardList.vue';
import {ENTRYPOINT} from '../../../config/entrypoint';
import axios from "axios";
import {ref, computed} from "vue";
import { useStore } from 'vuex';
export default {
name: 'CourseList',
components: {
CourseCardList,
},
data() {
setup() {
const courses = ref([]);
const status = ref('Loading');
const store = useStore();
let user = computed(() => store.getters['security/getUser']);
if (user.value) {
let userId = user.value.id;
axios.get(ENTRYPOINT + 'users/' + userId + '/courses.json').then(response => {
if (Array.isArray(response.data)) {
courses.value = response.data;
}
}).catch(function (error) {
console.log(error);
}).finally(() =>
status.value = ''
);
}
return {
status: '',
courses: [],
layout: 'list',
sortKey: null,
sortOrder: null,
sortField: null,
};
},
created: function () {
this.load();
},
mounted: function () {
},
methods: {
load: function () {
this.status = 'Loading';
let user = this.$store.getters['security/getUser'];
if (user) {
axios.get(ENTRYPOINT + 'users/' + user.id + '/courses.json').then(response => {
this.status = '';
if (Array.isArray(response.data)) {
this.courses = response.data;
}
}).catch(function (error) {
console.log(error);
});
} else {
this.status = '';
}
},
courses,
status
}
}
};
</script>

@ -2546,10 +2546,10 @@ class Display
public static function toolbarAction(string $id, array $contentList): string
{
$col = count($contentList);
$html = ' <div id="'.$id.'" class="q-card">';
$html .= ' <div class="flex justify-between mb-3 '.$col.'">';
$html = ' <div id="'.$id.'" class="q-card p-2">';
$html .= ' <div class="flex justify-between '.$col.'">';
foreach ($contentList as $item) {
$html .= '<div class=" flex p-3 gap-2 ">'.$item.'</div>';
$html .= '<div class=" flex p-2 gap-2 ">'.$item.'</div>';
}
$html .= '</div>';
$html .= '</div>';

@ -52,21 +52,21 @@ class FormValidator extends HTML_QuickForm
switch ($layout) {
case self::LAYOUT_HORIZONTAL:
$attributes['class'] = 'w-full ';
$attributes['class'] = 'ch w-full ';
break;
case self::LAYOUT_BOX_SEARCH:
$attributes['class'] = 'w-full flex gap-2';
$attributes['class'] = 'ch w-full flex gap-2';
$formTemplate = $this->getInLineTemplate();
break;
case self::LAYOUT_INLINE:
$attributes['class'] = ' flex gap-1 ';
$attributes['class'] = 'ch flex gap-1 ';
$formTemplate = $this->getInLineTemplate();
break;
case self::LAYOUT_BOX:
$attributes['class'] = 'flex gap-1 ';
$attributes['class'] = 'ch flex gap-1 ';
break;
case self::LAYOUT_GRID:
$attributes['class'] = 'form-grid';
$attributes['class'] = 'ch form-grid';
$formTemplate = $this->getGridFormTemplate();
break;
}

@ -1,18 +1,12 @@
<?php
/**
* HTML class for a checkbox type field.
*
* PHP versions 4 and 5
*
* LICENSE: This source file is subject to version 3.01 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_01.txt If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category HTML
*
* @author Adam Daniel <adaniel1@eesus.jnj.com>
* @author Bertrand Mansion <bmansion@mamasam.com>
* @author Alexey Borzov <avb@php.net>
@ -20,21 +14,7 @@
* @license http://www.php.net/license/3_01.txt PHP License 3.01
*
* @version CVS: $Id: checkbox.php,v 1.23 2009/04/04 21:34:02 avb Exp $
*
* @see http://pear.php.net/package/HTML_QuickForm
*/
/**
* HTML class for a checkbox type field.
*
* @category HTML
*
* @author Adam Daniel <adaniel1@eesus.jnj.com>
* @author Bertrand Mansion <bmansion@mamasam.com>
* @author Alexey Borzov <avb@php.net>
*
* @version Release: 3.2.11
*
* @since 1.0
*/
class HTML_QuickForm_checkbox extends HTML_QuickForm_input
@ -80,6 +60,7 @@ class HTML_QuickForm_checkbox extends HTML_QuickForm_input
unset($attributes['checkbox-class']);
}
$attributes['class'] = ' ';
parent::__construct($elementName, $elementLabel, $attributes);
$this->_persistantFreeze = true;
$this->_text = $text;
@ -141,14 +122,15 @@ class HTML_QuickForm_checkbox extends HTML_QuickForm_input
$labelClass = $this->labelClass;
$checkClass = $this->checkboxClass;
$name = $this->_attributes['name'];
$label = '<div id="'.$name.'" class="'.$checkClass.'">
<label class="'.$labelClass.'">'.
HTML_QuickForm_input::toHtml().' '.$this->_text.
'</label>
</div>
';
$id = $this->getAttribute('id');
return $label;
return '<div id="'.$name.'" class="'.$checkClass.' flex items-center ">
'.HTML_QuickForm_input::toHtml().'
<label for="'.$id.'" class="'.$labelClass.' ml-2 ">
'.$this->_text.
'</label>
</div>
';
}
return HTML_QuickForm_input::toHtml().$label;

@ -103,10 +103,12 @@ class HTML_QuickForm_radio extends HTML_QuickForm_input
$radioClass = $this->radioClass;
$id = $this->getAttribute('id');
return '<div class="'.$radioClass.'">
'.HTML_QuickForm_input::toHtml().'
<label for="'.$id.'" class="form-check-label '.$labelClass.'">'.$this->_text.'</label>
</div>';
return '<div class="'.$radioClass.' flex items-center ">
'.HTML_QuickForm_input::toHtml().'
<label for="'.$id.'" class="form-check-label '.$labelClass.' ml-2 ">
'.$this->_text.'
</label>
</div>';
}
return parent::toHtml().$label;

@ -36,17 +36,15 @@ class HTML_QuickForm_text extends HTML_QuickForm_input
}
if (is_array($attributes) || empty($attributes)) {
$classFromAttributes = $attributes['class'] ?? '';
//focus:outline-none focus:shadow-outline
//w-1/2
//focus:border focus:border-blue-100
$attributes['class'] = $classFromAttributes.'
sm:text-sm
text-gray-600
focus:outline-none
focus:border
focus:border-blue-700
bg-white font-normal
flex items-center pl-3 border-gray-300 rounded-md border shadow';
bg-white
font-normal
flex items-center pl-3 ';
}
$inputSize = $attributes['input-size'] ?? null;
$this->setInputSize($inputSize);

@ -400,7 +400,7 @@ class SortableTable extends HTML_Table
$form = $this->get_page_select_form();
$nav = $this->get_navigation_html();
$html = '<div class="q-card">';
$html .= '<div class="q-pa-md fit row wrap justify-between items-start content-start">';
$html .= '<div class="flex flex-row justify-between">';
$html .= '<div class="col">';
$html .= '<div class="page-select pb-2 pt-2">'.$form.'</div>';
$html .= '</div>';
@ -437,10 +437,10 @@ class SortableTable extends HTML_Table
$html .= '<input type="hidden" name="action">';
$html .= '<div class="q-card">';
$html .= '<div class="flex p-3">';
$html .= '<div class="flex flex-row justify-between">';
if (count($this->form_actions) > 0) {
$html .= '<div class="btn-group" role="group">';
$html .= '<div class="flex flex-row justify-between" role="group">';
$html .= '<a
class="btn btn-primary"
href="?'.$params.'&amp;'.$this->param_prefix.'selectall=1"
@ -467,7 +467,6 @@ class SortableTable extends HTML_Table
onclick="javascript:action_click(this, \''.$table_id.'\');">'.$label.'</a>';
}
$html .= '</div>';
$html .= '</div>'; //btn-group
$html .= '</div>';
} else {
$html .= $form;
@ -482,6 +481,7 @@ class SortableTable extends HTML_Table
$html .= '</div>';
}
$html .= '</div>'; //btn-group
$html .= '</div>';
if (count($this->form_actions) > 0) {
$html .= '</form>';

Loading…
Cancel
Save