View | Details | Raw Unified | Return to bug 7977
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt (-6 / +6 lines)
Lines 1-14 Link Here
1
    [% INCLUDE 'doc-head-open.inc' %]
1
    [% INCLUDE 'doc-head-open.inc' %]
2
    <title>Koha &rsaquo; Tools &rsaquo; Quote uploader</title>
2
    <title>Koha &rsaquo; Tools &rsaquo; Quote uploader</title>
3
    [% INCLUDE 'doc-head-close.inc' %]
3
    [% INCLUDE 'doc-head-close.inc' %]
4
    <link rel="stylesheet" type="text/css" href="/intranet-tmpl/prog/en/css/uploader.css" />
4
    <link rel="stylesheet" type="text/css" href="[% themelang %]/css/uploader.css" />
5
    <link rel="stylesheet" type="text/css" href="/intranet-tmpl/prog/en/css/datatables.css" />
5
    <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
6
    <link rel="stylesheet" type="text/css" href="/intranet-tmpl/prog/en/css/quotes.css" />
6
    <link rel="stylesheet" type="text/css" href="[% themelang %]/css/quotes.css" />
7
    <script type="text/javascript" src="/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js"></script>
7
    <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
8
    [% INCLUDE 'datatables-strings.inc' %]
8
    [% INCLUDE 'datatables-strings.inc' %]
9
    </script>
9
    </script>
10
    <script type="text/javascript" src="/intranet-tmpl/prog/en/js/datatables.js"></script>
10
    <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
11
    <script type="text/javascript" src="/intranet-tmpl/prog/en/js/jquery.jeditable.mini.js"></script>
11
    <script type="text/javascript" src="[% themelang %]/js/jquery.jeditable.mini.js"></script>
12
    <script type="text/javascript">
12
    <script type="text/javascript">
13
    //<![CDATA[
13
    //<![CDATA[
14
    var oTable; //DataTable object
14
    var oTable; //DataTable object
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt (-3 / +2 lines)
Lines 12-18 Link Here
12
    <script type="text/javascript">
12
    <script type="text/javascript">
13
    //<![CDATA[
13
    //<![CDATA[
14
    var oTable; /* oTable needs to be global */
14
    var oTable; /* oTable needs to be global */
15
    var sEmptyTable = _('No quotes available. Please use the \"Add Quote\" button to add a quote.'); /* override the default message in datatables-strings.inc */
15
    var sEmptyTable = _('No quotes available. Please use the "Add Quote" button to add a quote.'); /* override the default message in datatables-strings.inc */
16
    $(document).ready(function() {
16
    $(document).ready(function() {
17
        /* NOTE: This is an ajax-source datatable and *not* a server-side sourced datatable. */
17
        /* NOTE: This is an ajax-source datatable and *not* a server-side sourced datatable. */
18
        /* See the datatable docs if you don't understand this difference. */
18
        /* See the datatable docs if you don't understand this difference. */
Lines 41-46 Link Here
41
                        $(nRow).attr("id", quoteID); /* set row ids to quote id */
41
                        $(nRow).attr("id", quoteID); /* set row ids to quote id */
42
                        $('td:eq(0)', nRow).click(function() {$(this.parentNode).toggleClass('selected',this.clicked);}); /* add row selectors */
42
                        $('td:eq(0)', nRow).click(function() {$(this.parentNode).toggleClass('selected',this.clicked);}); /* add row selectors */
43
                        $('td:eq(0)', nRow).attr("title", _("Click ID to select/deselect quote"));
43
                        $('td:eq(0)', nRow).attr("title", _("Click ID to select/deselect quote"));
44
                        $('td', nRow).attr("id",quoteID); /* FIXME: this is a bit of a hack */
44
                        if (isNaN(quoteID)) {
45
                        if (isNaN(quoteID)) {
45
                            noEditFields = [0,1,2,3]; /* all fields when adding a quote */
46
                            noEditFields = [0,1,2,3]; /* all fields when adding a quote */
46
                        }
47
                        }
Lines 194-200 Link Here
194
                        <th>Source</th>
195
                        <th>Source</th>
195
                        <th>Text</th>
196
                        <th>Text</th>
196
                        <th>Last Displayed</th>
197
                        <th>Last Displayed</th>
197
<!--                        <th>Actions</th>-->
198
                    </tr>
198
                    </tr>
199
                </thead>
199
                </thead>
200
                <tbody>
200
                <tbody>
Lines 204-210 Link Here
204
                        <td></td>
204
                        <td></td>
205
                        <td>Loading data...</td>
205
                        <td>Loading data...</td>
206
                        <td></td>
206
                        <td></td>
207
<!--                        <td></td>-->
208
                    </tr>
207
                    </tr>
209
                </tbody>
208
                </tbody>
210
                </table>
209
                </table>
(-)a/koha-tmpl/opac-tmpl/prog/en/css/opac.css (-1 lines)
Lines 2414-2420 span.sep { Link Here
2414
    margin-right: 2px;
2414
    margin-right: 2px;
2415
    width: 300px;
2415
    width: 300px;
2416
    text-align: center;
2416
    text-align: center;
2417
    font-family: "Georgia","Palatino","Times New Roman",sans-serif;
2418
}
2417
}
2419
2418
2420
#daily-quote h1 {
2419
#daily-quote h1 {
(-)a/tools/quotes/quotes_ajax.pl (-3 / +3 lines)
Lines 69-74 elsif ($params->{'action'} eq 'edit') { Link Here
69
        warn sprintf('Database returned the following error: %s', $sth->errstr);
69
        warn sprintf('Database returned the following error: %s', $sth->errstr);
70
        exit 0;
70
        exit 0;
71
    }
71
    }
72
    $sth = $dbh->prepare("SELECT $editable_columns->[$params->{'column'}-1] FROM quotes WHERE id = ?;");
73
    $sth->execute($params->{'id'});
72
    print $sth->fetchrow_array();
74
    print $sth->fetchrow_array();
73
    exit 1;
75
    exit 1;
74
}
76
}
Lines 88-95 else { Link Here
88
90
89
    if (my $filter = $params->{'sSearch'}) {
91
    if (my $filter = $params->{'sSearch'}) {
90
        # This seems a bit brute force and ungraceful, but it provides a very general, simple search on all fields
92
        # This seems a bit brute force and ungraceful, but it provides a very general, simple search on all fields
91
        my $like = " id LIKE \"%$filter%\" OR source LIKE \"%$filter%\" OR text LIKE \"%$filter%\" OR timestamp LIKE \"%$filter%\"";
93
        $iTotalRecords = $dbh->selectrow_array("SELECT count(*) FROM quotes WHERE id LIKE %?% OR source LIKE %?% OR text LIKE %?% OR timestamp LIKE %?%;",undef,($filter, $filter, $filter, $filter));
92
        $iTotalRecords = $dbh->selectrow_array("SELECT count(*) FROM quotes WHERE $like;");
93
        $sth = $dbh->prepare("SELECT * FROM quotes;");
94
        $sth = $dbh->prepare("SELECT * FROM quotes;");
94
    }
95
    }
95
    else {
96
    else {
96
- 

Return to bug 7977