Bugzilla – Attachment 9504 Details for
Bug 7977
Add a "Quote-of-the-day" feature to the OPAC homepage
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Followup patch addressing items pointed out by Jonathan Druart
Followup-patch-addressing-items-pointed-out-by-Jon.patch (text/plain), 5.55 KB, created by
Chris Nighswonger
on 2012-05-11 01:46:15 UTC
(
hide
)
Description:
Followup patch addressing items pointed out by Jonathan Druart
Filename:
MIME Type:
Creator:
Chris Nighswonger
Created:
2012-05-11 01:46:15 UTC
Size:
5.55 KB
patch
obsolete
>From 2c0c15755adf77c93a6d8cf64e2cd5dd8e9311ab Mon Sep 17 00:00:00 2001 >From: Chris Nighswonger <cnighswonger@foundations.edu> >Date: Thu, 10 May 2012 20:57:33 -0400 >Subject: [PATCH] Followup patch addressing items pointed out by Jonathan Druart >Content-Type: text/plain; charset="utf-8" > >http://bugs.koha-community.org/show_bug.cgi?id=7977 >--- > .../prog/en/modules/tools/quotes-upload.tt | 12 ++++++------ > .../intranet-tmpl/prog/en/modules/tools/quotes.tt | 5 ++--- > tools/quotes/quotes_ajax.pl | 5 +++-- > 3 files changed, 11 insertions(+), 11 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt >index 1518290..996a1b2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt >@@ -1,14 +1,14 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Tools › Quote uploader</title> > [% INCLUDE 'doc-head-close.inc' %] >- <link rel="stylesheet" type="text/css" href="/intranet-tmpl/prog/en/css/uploader.css" /> >- <link rel="stylesheet" type="text/css" href="/intranet-tmpl/prog/en/css/datatables.css" /> >- <link rel="stylesheet" type="text/css" href="/intranet-tmpl/prog/en/css/quotes.css" /> >- <script type="text/javascript" src="/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js"></script> >+ <link rel="stylesheet" type="text/css" href="[% themelang %]/css/uploader.css" /> >+ <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> >+ <link rel="stylesheet" type="text/css" href="[% themelang %]/css/quotes.css" /> >+ <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script> > [% INCLUDE 'datatables-strings.inc' %] > </script> >- <script type="text/javascript" src="/intranet-tmpl/prog/en/js/datatables.js"></script> >- <script type="text/javascript" src="/intranet-tmpl/prog/en/js/jquery.jeditable.mini.js"></script> >+ <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script> >+ <script type="text/javascript" src="[% themelang %]/js/jquery.jeditable.mini.js"></script> > <script type="text/javascript"> > //<![CDATA[ > var oTable; //DataTable object >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt >index 51e11b6..269a099 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt >@@ -12,7 +12,7 @@ > <script type="text/javascript"> > //<![CDATA[ > var oTable; /* oTable needs to be global */ >- var sEmptyTable = _('No quotes available. Please use the \"Add Quote\" button to add a quote.'); /* override the default message in datatables-strings.inc */ >+ var sEmptyTable = _('No quotes available. Please use the "Add Quote" button to add a quote.'); /* override the default message in datatables-strings.inc */ > $(document).ready(function() { > /* NOTE: This is an ajax-source datatable and *not* a server-side sourced datatable. */ > /* See the datatable docs if you don't understand this difference. */ >@@ -41,6 +41,7 @@ > $(nRow).attr("id", quoteID); /* set row ids to quote id */ > $('td:eq(0)', nRow).click(function() {$(this.parentNode).toggleClass('selected',this.clicked);}); /* add row selectors */ > $('td:eq(0)', nRow).attr("title", _("Click ID to select/deselect quote")); >+ $('td', nRow).attr("id",quoteID); /* FIXME: this is a bit of a hack */ > if (isNaN(quoteID)) { > noEditFields = [0,1,2,3]; /* all fields when adding a quote */ > } >@@ -194,7 +195,6 @@ > <th>Source</th> > <th>Text</th> > <th>Last Displayed</th> >-<!-- <th>Actions</th>--> > </tr> > </thead> > <tbody> >@@ -204,7 +204,6 @@ > <td></td> > <td>Loading data...</td> > <td></td> >-<!-- <td></td>--> > </tr> > </tbody> > </table> >diff --git a/tools/quotes/quotes_ajax.pl b/tools/quotes/quotes_ajax.pl >index eb54550..bcc4f2e 100755 >--- a/tools/quotes/quotes_ajax.pl >+++ b/tools/quotes/quotes_ajax.pl >@@ -69,6 +69,8 @@ elsif ($params->{'action'} eq 'edit') { > warn sprintf('Database returned the following error: %s', $sth->errstr); > exit 0; > } >+ $sth = $dbh->prepare("SELECT $editable_columns->[$params->{'column'}-1] FROM quotes WHERE id = ?;"); >+ $sth->execute($params->{'id'}); > print $sth->fetchrow_array(); > exit 1; > } >@@ -88,8 +90,7 @@ else { > > if (my $filter = $params->{'sSearch'}) { > # This seems a bit brute force and ungraceful, but it provides a very general, simple search on all fields >- my $like = " id LIKE \"%$filter%\" OR source LIKE \"%$filter%\" OR text LIKE \"%$filter%\" OR timestamp LIKE \"%$filter%\""; >- $iTotalRecords = $dbh->selectrow_array("SELECT count(*) FROM quotes WHERE $like;"); >+ $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)); > $sth = $dbh->prepare("SELECT * FROM quotes;"); > } > else { >-- >1.7.0.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7977
:
9310
|
9321
|
9323
|
9324
|
9325
|
9326
|
9327
|
9328
|
9338
|
9343
|
9373
|
9376
|
9377
|
9378
|
9392
|
9405
|
9406
|
9407
|
9408
|
9409
|
9433
|
9434
|
9435
|
9441
|
9442
|
9443
|
9447
|
9473
|
9474
|
9475
|
9476
|
9477
|
9478
|
9479
|
9480
|
9481
|
9482
|
9483
|
9484
|
9485
|
9486
|
9503
|
9504
|
9505
|
9510
|
9517
|
9521
|
9529
|
9530
|
9531
|
9682
|
9683
|
9711
|
9712
|
9713
|
9714
|
9715
|
9716
|
9717
|
9718
|
9719
|
9720
|
9721
|
9722
|
9723
|
9724
|
9725
|
9726
|
9727
|
9728
|
9729
|
9730
|
9731
|
9732