menage
This commit is contained in:
parent
682f333ee0
commit
fccbe9273c
16 changed files with 3 additions and 20917 deletions
File diff suppressed because one or more lines are too long
|
@ -1,236 +0,0 @@
|
|||
// ----------------------------
|
||||
// Surcharge de vue-next-select
|
||||
// ----------------------------
|
||||
.gamutable__input--rechercher {
|
||||
padding: 0.25rem 1rem;
|
||||
}
|
||||
.vue-tags .vue-tag.selected {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
div.vue-input > input {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
.tag--ub {
|
||||
display: inline-block;
|
||||
}
|
||||
.gamutable__input--filtrer {
|
||||
font-size: 1.2rem;
|
||||
//box-shadow: 0 0 0 1px rgb(153, 153, 153) inset;
|
||||
padding: 5px 5px !important;
|
||||
&:valid {
|
||||
font-size: 1.2rem;
|
||||
background-color: rgb(153, 153, 153);
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
.gamutable__input--filtrer:placeholder-shown {
|
||||
background-color: transparent;
|
||||
color: inherit;
|
||||
}
|
||||
th .vue-select {
|
||||
width: 100%;
|
||||
}
|
||||
// ----------------------------
|
||||
// Fin de la surcharge de vue-next-select
|
||||
// ----------------------------
|
||||
.gamutable--surTable {
|
||||
select,
|
||||
input {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.gamutable-nbrMax {
|
||||
margin-left: 2rem;
|
||||
}
|
||||
.includespip {
|
||||
margin-left: 2rem;
|
||||
}
|
||||
}
|
||||
.gamutable--sousTable {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.gamutable--pagination {
|
||||
display: flex;
|
||||
.page-item {
|
||||
display: flex;
|
||||
}
|
||||
.page-link {
|
||||
margin: 0 0.2rem;
|
||||
background-color: #eee;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.h2-like.titregamutable,
|
||||
.h2-like.titregamutable_deux {
|
||||
font-weight: bold;
|
||||
}
|
||||
.gamutable table {
|
||||
// patch provisoire
|
||||
// .vue-dropdown-item > span {
|
||||
// display: inline-block;
|
||||
// min-height: 1rem;
|
||||
// }
|
||||
|
||||
font-size: 1rem;
|
||||
table-layout: auto;
|
||||
thead {
|
||||
border: 1px solid rgb(119, 119, 119);
|
||||
}
|
||||
.gt_labels {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
th > div {
|
||||
display: flex;
|
||||
}
|
||||
.label_tete_colonne {
|
||||
flex-grow: 1;
|
||||
}
|
||||
.iconeTri {
|
||||
float: right;
|
||||
width: calc(1rem + 4px);
|
||||
//position: relative;
|
||||
.fa {
|
||||
padding: 2px 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.tri_col {
|
||||
cursor: pointer;
|
||||
fill: #cecece;
|
||||
}
|
||||
.iconeTri > .active {
|
||||
fill: rgb(220, 53, 69);
|
||||
color: rgb(220, 53, 69);
|
||||
}
|
||||
tbody tr:hover {
|
||||
background-color: rgba(179, 209, 67, 0.27);
|
||||
}
|
||||
}
|
||||
#app .select {
|
||||
background-color: rgba(179, 209, 67, 0.47);
|
||||
}
|
||||
|
||||
td.id {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
th.icone {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
tr.filtreColonne th {
|
||||
padding: 0;
|
||||
select {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
td.icone > * {
|
||||
width: 100%;
|
||||
display: block;
|
||||
padding: 0.5rem;
|
||||
text-align: center;
|
||||
}
|
||||
.gamutable .url_action {
|
||||
padding: 0.2rem;
|
||||
display: inline-flex;
|
||||
background-color: #f5f5f5;
|
||||
border: 1px solid #cecece;
|
||||
border-radius: 5px;
|
||||
&:hover {
|
||||
background-color: #cecece;
|
||||
}
|
||||
}
|
||||
|
||||
td.icone i {
|
||||
font-size: 1.8rem;
|
||||
}
|
||||
|
||||
.vueBlocs {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.vueBlocs-unbloc {
|
||||
width: 23%;
|
||||
border: 1px solid #cecece;
|
||||
margin-bottom: 1rem;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.viderInputSearch {
|
||||
color: #ff0000;
|
||||
}
|
||||
|
||||
/* blocks widths (percentage and pixels) */
|
||||
$i: 100;
|
||||
@while $i > 0 {
|
||||
.w#{$i} {
|
||||
width: $i * 1%;
|
||||
}
|
||||
$i: $i - 5;
|
||||
}
|
||||
|
||||
$i: 1000;
|
||||
@while $i > 200 {
|
||||
.w#{$i}p {
|
||||
width: $i * 1px;
|
||||
}
|
||||
.minw#{$i}p {
|
||||
min-width: $i * 1px;
|
||||
}
|
||||
.maxw#{$i}p {
|
||||
max-width: $i * 1px;
|
||||
}
|
||||
.w#{$i}p input {
|
||||
width: $i * 1px;
|
||||
}
|
||||
$i: $i - 50;
|
||||
}
|
||||
$i: 200;
|
||||
@while $i > 0 {
|
||||
.w#{$i}p {
|
||||
width: $i * 1px;
|
||||
}
|
||||
.minw#{$i}p {
|
||||
min-width: $i * 1px;
|
||||
}
|
||||
.maxw#{$i}p {
|
||||
max-width: $i * 1px;
|
||||
}
|
||||
.w#{$i}p input {
|
||||
width: $i * 1px;
|
||||
}
|
||||
$i: $i - 10;
|
||||
}
|
||||
|
||||
.w66 {
|
||||
width: calc(100% / 3 * 2);
|
||||
}
|
||||
.w33 {
|
||||
width: calc(100% / 3);
|
||||
}
|
||||
.wauto {
|
||||
width: auto;
|
||||
}
|
||||
.w960p {
|
||||
width: 960px;
|
||||
}
|
||||
.minw960p {
|
||||
min-width: 960px;
|
||||
}
|
||||
.maxw960p {
|
||||
max-width: 960px;
|
||||
}
|
||||
.w1140p {
|
||||
width: 1140px;
|
||||
}
|
||||
.minw1140p {
|
||||
min-width: 1140px;
|
||||
}
|
||||
.maxw1140p {
|
||||
max-width: 1140px;
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
/* ----------------------------- */
|
||||
/* ==Tables */
|
||||
/* ----------------------------- */
|
||||
table,
|
||||
.table {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
table-layout: fixed;
|
||||
border-collapse: collapse;
|
||||
vertical-align: top;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.table {
|
||||
display: table;
|
||||
border: 1px solid #acb3c2;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.table--zebra tbody tr:nth-child(odd) {
|
||||
background: #e7e9ed;
|
||||
}
|
||||
|
||||
.table caption {
|
||||
caption-side: bottom;
|
||||
padding: 1rem;
|
||||
color: #333;
|
||||
font-style: italic;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.table td,
|
||||
.table th {
|
||||
padding: 0.3rem 0.6rem;
|
||||
min-width: 2rem;
|
||||
vertical-align: top;
|
||||
border: 1px #acb3c2 dotted;
|
||||
text-align: left;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.table thead {
|
||||
color: #212529;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.table--auto {
|
||||
table-layout: auto;
|
||||
}
|
142
gulpfile.js
142
gulpfile.js
|
@ -1,142 +0,0 @@
|
|||
const { src, dest, series, parallel, watch } = require('gulp');
|
||||
const gulpSass = require('gulp-sass')(require('sass'));
|
||||
const sourcemaps = require('gulp-sourcemaps');
|
||||
const postcss = require('gulp-postcss');
|
||||
const autoprefixer = require('autoprefixer');
|
||||
const CombineMQ = require('postcss-combine-media-query');
|
||||
const notify = require('gulp-notify');
|
||||
const concat = require('gulp-concat');
|
||||
const uglify = require('gulp-uglify');
|
||||
const babel = require('gulp-babel');
|
||||
const rename = require('gulp-regex-rename');
|
||||
|
||||
const CSSnano = require('cssnano');
|
||||
|
||||
// const unuse = require('postcss-uncss'); //https://github.com/uncss/postcss-uncss
|
||||
|
||||
/*
|
||||
* SASS$
|
||||
*/
|
||||
function sass() {
|
||||
return src(['css/**/*.scss'])
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(
|
||||
gulpSass({
|
||||
outputStyle: 'expanded',
|
||||
})
|
||||
)
|
||||
.on('error', (err) => notify().write(err))
|
||||
.pipe(
|
||||
postcss([
|
||||
CombineMQ, // rassemble les Media Queries (parfait pour les classes utilitaires)
|
||||
autoprefixer, // ajoute les préfixes vendeurs
|
||||
// CSSnano, // minification
|
||||
])
|
||||
)
|
||||
.pipe(sourcemaps.write('.')) // initialize sourcemaps first
|
||||
.pipe(dest('css'));
|
||||
}
|
||||
|
||||
/*
|
||||
* JS -> concat + babel
|
||||
*/
|
||||
function jsConcatMinif() {
|
||||
console.log('ok');
|
||||
return (
|
||||
src(['./js/a_compresser/*.js'])
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(
|
||||
babel({
|
||||
presets: ['@babel/preset-env'],
|
||||
})
|
||||
)
|
||||
.pipe(concat('mon_site.min.js', { newLine: ';' }))
|
||||
// SPECIFIQUE DEV: ne pas compacter le JS
|
||||
// .pipe(uglify())
|
||||
.pipe(sourcemaps.write('.'))
|
||||
.pipe(dest('./js'))
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
* JS -> babel
|
||||
*/
|
||||
function jsBabel() {
|
||||
return src(['js/**/*.es6.js'])
|
||||
.pipe(
|
||||
babel({
|
||||
presets: ['@babel/preset-env'],
|
||||
})
|
||||
)
|
||||
.pipe(rename(/\.es6/, ''))
|
||||
.pipe(dest('./js'));
|
||||
}
|
||||
|
||||
/*
|
||||
* Les Watchers
|
||||
*/
|
||||
function watcherSass() {
|
||||
watch('css/**/*.scss', { ignoreInitial: false }, sass).on('change', function () {
|
||||
notify('CSS -> SCSS ==> OK').write('');
|
||||
});
|
||||
}
|
||||
|
||||
function watcherJsConcatMinif() {
|
||||
watch('./js/a_compresser/*.js', { ignoreInitial: false }, jsConcatMinif).on('change', function () {
|
||||
notify('JS (concat) ==> OK').write('');
|
||||
});
|
||||
}
|
||||
|
||||
function watcherJsBabel() {
|
||||
watch('./js/**/*.es6.js', { ignoreInitial: false }, jsBabel).on('change', function () {
|
||||
notify('JS (babel) ==> OK').write('');
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* SVG sprite
|
||||
*/
|
||||
// const gulpSvgSprite = require('gulp-svg-sprite');
|
||||
// const config = {
|
||||
// shape: {
|
||||
// spacing: {
|
||||
// box: 'icon',
|
||||
// },
|
||||
// },
|
||||
// mode: {
|
||||
// symbol: {
|
||||
// dest: '.',
|
||||
// sprite: 'sprite_symbol_picto.svg',
|
||||
// },
|
||||
// },
|
||||
// };
|
||||
//
|
||||
// function svgSprite() {
|
||||
// return (
|
||||
// src('svg/**/*.svg')
|
||||
// .pipe(gulpSvgSprite(config))
|
||||
// .on('error', function (error) {
|
||||
// console.log(error);
|
||||
// })
|
||||
// .pipe(dest('img'))
|
||||
// );
|
||||
// }
|
||||
|
||||
/*
|
||||
* SVG minifier
|
||||
*/
|
||||
// var svgmin = require('gulp-svgmin');
|
||||
// function svgMin() {
|
||||
// return src('svg/*.svg').pipe(svgmin()).pipe(dest('./svgmin'));
|
||||
// }
|
||||
|
||||
/*
|
||||
* Exports des fonctions
|
||||
*/
|
||||
module.exports = {
|
||||
default: parallel(sass, jsConcatMinif, jsBabel),
|
||||
sass: sass,
|
||||
watch: parallel(watcherSass, watcherJsConcatMinif, watcherJsBabel),
|
||||
// sprite: svgSprite,
|
||||
// svgmin: svgMin,
|
||||
};
|
|
@ -1,4 +1,5 @@
|
|||
[(#REM) chargement de vue ] [(#VAL{gamutable.js}|vite)] [(#REM) ]
|
||||
[(#VAL{gamutable.js}|vite)]
|
||||
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="[(#CHEMIN{css/gamutable.css}|compacte|timestamp)]"
|
||||
|
@ -89,10 +90,7 @@
|
|||
</BOUCLE_deux>
|
||||
</div>
|
||||
|
||||
[(#REM) si dans l'env il y a un parametre _id=xxx, il sera récupéré pour
|
||||
selectionner cette ligne dans le gamutable ajout de la classe: select sur le tr
|
||||
]
|
||||
<script type="text/javascript">
|
||||
var nomBlocAjaxReload = "";
|
||||
</script>
|
||||
<script src="[(#CHEMIN{js/localforage.js}|timestamp)]" type="text/javascript"></script>
|
||||
<script src="[(#CHEMIN{js/localforage.min.js}|timestamp)]" type="text/javascript"></script>
|
||||
|
|
996
js/gamutable.js
996
js/gamutable.js
File diff suppressed because one or more lines are too long
1924
js/papaparse.js
1924
js/papaparse.js
File diff suppressed because it is too large
Load diff
7
js/papaparse.min.js
vendored
7
js/papaparse.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
1
js/vue-next-select.min.js
vendored
1
js/vue-next-select.min.js
vendored
File diff suppressed because one or more lines are too long
1
js/vue.min.js
vendored
1
js/vue.min.js
vendored
File diff suppressed because one or more lines are too long
7
localforage.min.js
vendored
7
localforage.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,37 +0,0 @@
|
|||
<template>
|
||||
<img alt="Vue logo" src="../assets/logo.png" height="40" />
|
||||
|
||||
<h1>Vue {{ msg }}</h1>
|
||||
|
||||
<p>
|
||||
<a href="https://vitejs.dev/guide/features.html" target="_blank">
|
||||
Vite Documentation
|
||||
</a>
|
||||
|
|
||||
<a href="https://v3.vuejs.org/" target="_blank">Vue 3 Documentation</a>
|
||||
</p>
|
||||
|
||||
<button type="button" @click="state.count++">
|
||||
count is: {{ state.count }}
|
||||
</button>
|
||||
<p>
|
||||
Edit
|
||||
<code>components/HelloWorld.vue</code> to test hot module replacement.
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive } from "vue";
|
||||
|
||||
defineProps({
|
||||
msg: String,
|
||||
});
|
||||
|
||||
const state = reactive({ count: 0 });
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
</style>
|
|
@ -1,192 +0,0 @@
|
|||
import { onMounted, reactive, toRefs } from "vue";
|
||||
const store = reactive({
|
||||
table: [],
|
||||
chargement: false,
|
||||
header: [],
|
||||
checkbox: [],
|
||||
crayons: [],
|
||||
classes: [],
|
||||
ordreCol: [],
|
||||
Tcheckbox: {},
|
||||
filtreColType: [],
|
||||
filtreCol: [],
|
||||
filtreColVal: [],
|
||||
filtreColSelected: [],
|
||||
});
|
||||
|
||||
export default function useChargerDonnees(props) {
|
||||
onMounted(() => {});
|
||||
console.log("props = ", props);
|
||||
const loadJson = new chargerJson(props);
|
||||
loadJson.toto();
|
||||
// loadJson.chargement = true;
|
||||
// store.table = loadJson.chargerJson(id);
|
||||
|
||||
return { ...toRefs(store) };
|
||||
}
|
||||
|
||||
class chargerJson {
|
||||
constructor(props) {
|
||||
console.log("props = ", props);
|
||||
// this.url = props.apiuri;
|
||||
// this.champ_search = props.champ_search;
|
||||
// this.nameLocalStorage = calculer_nameLocalStorage(props.url);
|
||||
}
|
||||
toto() {
|
||||
console.log("coucou toto");
|
||||
}
|
||||
//
|
||||
// chargerJson(id) {
|
||||
// fetch(this.url)
|
||||
// .then((response) => response.json())
|
||||
// .then((data) => {
|
||||
// let config = data.shift();
|
||||
// store.header = config.header;
|
||||
// if (config.crayons !== undefined) {
|
||||
// store.crayons = config.crayons;
|
||||
// } else {
|
||||
// store.crayons = [];
|
||||
// }
|
||||
// if (config.classes !== undefined) {
|
||||
// store.classes = config.classes;
|
||||
// } else {
|
||||
// store.classes = [];
|
||||
// }
|
||||
// if (config.checkbox !== undefined) {
|
||||
// store.checkbox = config.checkbox;
|
||||
// Object.keys(store.checkbox).forEach((head) => {
|
||||
// store.Tcheckbox[head] = [];
|
||||
// });
|
||||
// }
|
||||
// if (config.ordreCol !== undefined) {
|
||||
// store.ordreCol = config.ordreCol;
|
||||
// } else {
|
||||
// store.ordreCol = [];
|
||||
// }
|
||||
// if (parseInt(id) > 0) {
|
||||
// if (data.length > 0) {
|
||||
// let i = trouver_index(store.trouver_index(store.table, id);
|
||||
// store.table.splice(i, 1);
|
||||
// }
|
||||
// localforage.setItem(
|
||||
// this.nameLocalStorage,
|
||||
// JSON.stringify(store.table, id);
|
||||
// store.table[i] = data[0];
|
||||
// } else {
|
||||
// let i = trouver_index(store.table, id);
|
||||
// store.table.splice(i, 1);
|
||||
// }
|
||||
// localforage.setItem(
|
||||
// this.nameLocalStorage,
|
||||
// JSON.stringify(store.table)
|
||||
// );
|
||||
// } else {
|
||||
// store.table = data;
|
||||
// if (data[0] && data[0].search) {
|
||||
// champ_search = "search";
|
||||
// }
|
||||
// }
|
||||
// if (config.filtreCol !== undefined) {
|
||||
// store.filtreColType = config.filtreCol;
|
||||
// state.filtreCol = [];
|
||||
// Object.keys(store.filtreColType).forEach((col) => {
|
||||
// let Tval = [];
|
||||
// store.table.forEach((t) => {
|
||||
// let valCol = t[this.champ_search][col];
|
||||
// if (valCol) {
|
||||
// if (Tval.indexOf(valCol) === -1) {
|
||||
// Tval.push(valCol);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// state.filtreCol.push(col);
|
||||
// state.filtreColVal[col] = Tval.sort();
|
||||
// state.filtreColSelected[col] = [];
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// Vue.nextTick(() => {
|
||||
// this.chargement = false;
|
||||
// let filtreselect = localStorage.getItem(
|
||||
// "filtreselect_" + this.nameLocalStorage
|
||||
// );
|
||||
// let Tfiltres = [];
|
||||
// // if (filtreselect) {
|
||||
// // Tfiltres = JSON.parse(filtreselect);
|
||||
// // } else if (this.filtreselect) {
|
||||
// // Tfiltres = recupJson(decodeURIComponent(this.filtreselect));
|
||||
// // localStorage.setItem('filtreselect_' + this.nameLocalStorage, JSON.stringify(Tfiltres));
|
||||
// // }
|
||||
// if (this.filtreselect) {
|
||||
// Tfiltres = recupJson(
|
||||
// decodeURIComponent(this.filtreselect)
|
||||
// );
|
||||
// localStorage.setItem(
|
||||
// "filtreselect_" + this.nameLocalStorage,
|
||||
// JSON.stringify(Tfiltres)
|
||||
// );
|
||||
// } else if (filtreselect) {
|
||||
// Tfiltres = JSON.parse(filtreselect);
|
||||
// }
|
||||
//
|
||||
// Tfiltres.forEach((col) => {
|
||||
// state.filtreColSelected[col.champ] = [
|
||||
// statehis.filtreColSelected[col.champ],
|
||||
// ...col.valeurs,
|
||||
// ];
|
||||
// });
|
||||
// state.filtreColModif++;
|
||||
// this.ajaxCrayons = false;
|
||||
//
|
||||
// if (parseInt(this._id) > 0) {
|
||||
// let _id = parseInt(this._id);
|
||||
// let parPage = parseInt(this.parPage);
|
||||
// if (parseInt(parPage)) {
|
||||
// let ordre = 0;
|
||||
// Object.values(store.table).forEach((d, i) => {
|
||||
// if (_id === d.html.id) {
|
||||
// ordre = i + 1;
|
||||
// }
|
||||
// });
|
||||
// if (ordre > parPage) {
|
||||
// let numPage = parseInt(ordre / parPage) + 1;
|
||||
// this.page = numPage;
|
||||
// }
|
||||
// }
|
||||
// this.selectLigne(_id, "id");
|
||||
// // let url = new URL(window.location);
|
||||
// // url = url.href.replace('&_id=' + _id, '');
|
||||
// // history.pushState({}, null, url);
|
||||
// }
|
||||
//
|
||||
// if (this.nomblocajaxreload) {
|
||||
// ajaxReload(this.nomblocajaxreload);
|
||||
// }
|
||||
// if (store.ordreCol) {
|
||||
// Object.entries(store.ordreCol).forEach(
|
||||
// ([col, sens]) => {
|
||||
// this.tri(col, sens);
|
||||
// }
|
||||
// );
|
||||
// }
|
||||
// $("td.crayon-init").removeClass("crayon-init");
|
||||
// console.timeEnd("Chargement de VueJs APRES Ajax");
|
||||
// });
|
||||
// })
|
||||
// .catch((error) => console.log(error));
|
||||
// }
|
||||
}
|
||||
function recupJson(d) {
|
||||
try {
|
||||
return JSON.parse(d);
|
||||
} catch (e) {
|
||||
console.log("erreur recupJson ", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function calculer_nameLocalStorage(url) {
|
||||
if (url) {
|
||||
return url.match(/.*page=(.*)/)[1];
|
||||
}
|
||||
return "";
|
||||
}
|
Loading…
Add table
Reference in a new issue