Overview
Comment:Merge avec trunk
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA1: 0e42b2b443945294d695f013880ef3e65d668d45
User & Date: bohwaz on 2017-05-08 00:13:39
Other Links: manifest | tags
Context
2017-05-08
07:29
Ajout d'une contrainte sur les champs date pour empêcher d'y mettre des trucs qui ne sont pas des dates check-in: 51a82e5421 user: bohwaz tags: dev
00:13
Merge avec trunk check-in: 0e42b2b443 user: bohwaz tags: dev
00:12
possibilité de créer des comptes directement à la racine d'une classe check-in: 73da92d6c9 user: bohwaz tags: trunk
2017-05-05
07:35
Amélioration de la vérification de hash pour l'import de DB check-in: 42d8fe5ab5 user: bohwaz tags: dev
Changes

Modified src/include/lib/Garradin/Compta/Comptes.php from [0994e5238c] to [5e4270a61a].

265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284



285
286
287
288
289
290
291
292

    public function getListAll($parent = 0)
    {
        $db = DB::getInstance();
        return $db->queryFetchAssoc('SELECT id, libelle FROM compta_comptes ORDER BY id;');
    }

    public function listTree($parent = 0, $include_children = true)
    {
        $db = DB::getInstance();

        if ($include_children)
        {
            $parent = $parent ? 'WHERE parent LIKE \''.$db->escapeString($parent).'%\' ' : '';
        }
        else
        {
            $parent = $parent ? 'WHERE parent = \''.$db->escapeString($parent).'\' ' : 'WHERE parent = 0';
        }




        return $db->simpleStatementFetch('SELECT * FROM compta_comptes '.$parent.' ORDER BY id;');
    }

    protected function _checkFields(&$data, $force_parent_check = false)
    {
        $db = DB::getInstance();

        if (empty($data['libelle']) || !trim($data['libelle']))







|





|



|


>
>
>
|







265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295

    public function getListAll($parent = 0)
    {
        $db = DB::getInstance();
        return $db->queryFetchAssoc('SELECT id, libelle FROM compta_comptes ORDER BY id;');
    }

    public function listTree($parent_id = 0, $include_children = true)
    {
        $db = DB::getInstance();

        if ($include_children)
        {
            $parent_where = $parent_id ? 'parent LIKE \''.$db->escapeString($parent_id).'%\' ' : '1';
        }
        else
        {
            $parent_where = $parent_id ? 'parent = \''.$db->escapeString($parent_id).'\' ' : 'parent = 0';
        }

        $query = 'SELECT * FROM compta_comptes WHERE id = \'%s\' OR %s ORDER BY id;';
        $query = sprintf($query, $db->escapeString($parent_id), $parent_where);

        return $db->simpleStatementFetch($query);
    }

    protected function _checkFields(&$data, $force_parent_check = false)
    {
        $db = DB::getInstance();

        if (empty($data['libelle']) || !trim($data['libelle']))

Modified src/include/lib/Garradin/Template.php from [e30b12e055] to [ad4149b96e].

336
337
338
339
340
341
342
343
344
345
346
347
348
349
350

    foreach ($comptes as $compte)
    {
        // Ne pas montrer les comptes désactivés
        if (!empty($compte['desactive']))
            continue;

        if (!isset($compte['id'][1]))
        {
            $out.= '<optgroup label="'.htmlspecialchars($compte['libelle'], ENT_QUOTES, 'UTF-8', false).'" class="niveau_1"></optgroup>';
        }
        elseif (!isset($compte['id'][2]) && empty($params['create']))
        {
            if ($compte['id'] > 10)
                $out.= '</optgroup>';







|







336
337
338
339
340
341
342
343
344
345
346
347
348
349
350

    foreach ($comptes as $compte)
    {
        // Ne pas montrer les comptes désactivés
        if (!empty($compte['desactive']))
            continue;

        if (!isset($compte['id'][1]) && empty($params['create']))
        {
            $out.= '<optgroup label="'.htmlspecialchars($compte['libelle'], ENT_QUOTES, 'UTF-8', false).'" class="niveau_1"></optgroup>';
        }
        elseif (!isset($compte['id'][2]) && empty($params['create']))
        {
            if ($compte['id'] > 10)
                $out.= '</optgroup>';

Modified src/www/admin/static/admin.css from [f57930187e] to [b2e904a922].

284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
    z-index: 2;
}

select.large {
    width: 95%;
}

select.large optgroup.niveau_1 {
    background: #333;
    color: #fff;
    font-style: normal;
    font-size: 1.2em;
}

select.large optgroup.niveau_2 {







|







284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
    z-index: 2;
}

select.large {
    width: 95%;
}

select.large .niveau_1 {
    background: #333;
    color: #fff;
    font-style: normal;
    font-size: 1.2em;
}

select.large optgroup.niveau_2 {