1/*
2 * DokuWiki Bootstrap3 Template: Plugins Hacks!
3 *
4 * Home     http://dokuwiki.org/template:bootstrap3
5 * Author   Giuseppe Di Terlizzi <giuseppe.diterlizzi@gmail.com>
6 * License  GPL 2 (http://www.gnu.org/licenses/gpl.html)
7 */
8
9// Data Plugin
10
11var $dataplugin_entry = jQuery('.dataplugin_entry'),
12    $dataplugin_table = jQuery('.dataplugin_table');
13
14// Data Plugin: Entry
15if ($dataplugin_entry.length) {
16    $dataplugin_entry.find('dl').addClass('panel panel-default');
17}
18
19
20// Data Plugin: Table
21if ($dataplugin_table.length) {
22
23    $dataplugin_table.find('input').addClass('input-sm');
24
25    var $header = $dataplugin_table.find('th[style]'),
26        $inputs = $dataplugin_table.find('th input'),
27        header_width = [],
28        i = 0;
29
30    $header.each(function () {
31        header_width.push(this.style.width);
32    });
33
34    $inputs.each(function () {
35        this.style.width = header_width[i];
36        i++;
37    });
38
39}
40