Commit graph

153 commits

Author SHA1 Message Date
Sébastien Lucas 0cf1383db0 Begin the templating 2014-02-06 21:26:20 +01:00
Sébastien Lucas 8fc7479a33 Move the last piece of javascript in util.js 2014-02-06 21:05:35 +01:00
Sébastien Lucas 1880407cf4 Remove trailing whitespace 2014-02-06 21:04:30 +01:00
Sébastien Lucas e96eaf86e5 Add a test for function creation. I can't manage to make it fail when needed. Still I'll commit anyway ! 2014-01-06 21:24:11 +01:00
Sébastien Lucas cd626b25ef Factorize a little more the DB handling. re #127 2013-12-14 18:25:32 +01:00
Sébastien Lucas a1cb83eea9 Refactor the detection of the case when no database has been selected. re #127 2013-12-14 11:30:42 +01:00
Sébastien Lucas ccd022cba4 All external resources are now in the right place. re #127
--HG--
rename : js/jquery.sortElements.js => resources/jquery-sortelements/jquery.sortElements.js
2013-12-14 10:02:59 +01:00
Sébastien Lucas da5ec2583a Add an additionnal protection for Sony PRS-T2 / Aldiko. fix #120 2013-12-10 21:34:19 +01:00
Sébastien Lucas 0f09ef5f8c Remove trailing spaces 2013-12-05 10:52:51 +01:00
At-Libitum f87963ea8a Merge git://github.com/seblucas/cops
Conflicts:
	test/pageTest.php - RESOLVED
2013-12-02 14:53:10 +01:00
Sébastien Lucas 13d0b4c471 Fix a problem with PHP embedded server. $_SERVER['QUERY_STRING'] is not set if it's empty. 2013-11-29 09:34:32 +01:00
Sébastien Lucas fa0eb798d0 Revert 2013-11-28 22:02:44 +01:00
Sébastien Lucas d45381e7a7 ... 2013-11-28 21:51:01 +01:00
Sébastien Lucas 7497e6d004 Last test before a full revert 2013-11-28 21:41:16 +01:00
Sébastien Lucas c0a4a892ed Add a desesperate test 2013-11-28 21:19:06 +01:00
Sébastien Lucas 8a027b5e48 Let's try that. 2013-11-28 20:59:07 +01:00
Sébastien Lucas 990976986e Fix the redirect in case of multiple databases and if the failing database is not the first. re #116 2013-11-25 21:35:02 +01:00
Sébastien Lucas 1051af4a61 COPS now also work if Pushstate / ReplaceState is not available (IE9). Thanks to At Libitum. should fix #117 2013-11-25 21:18:38 +01:00
Sébastien Lucas 4d9b3a4925 Fix the redirect in case the database is not found. I also handle better the case were no file are actually found. Thanks to At Libitum. fix #116 2013-11-25 17:10:43 +01:00
At-Libitum 9efcd661a0 **2012-11-22**
**Added global support for publishers**

Files modified:

*base.php*

-   changed class Entry,

	-   adding a constant ```cops:publishers``` to the icon array for the feed.

-   changed class Page

	-   added branches to the page selector switch

-   changed Page->public function InitializeContent

	-   added call to pull publisher count from database

-   changed class PageAllBooks

	-   changed it so ```getCurrentOption``` is actually used...

-   added page descendant class ```PageAllPublishers```

	-   handles pulling the publishers category from database

-   added page descendant class ```PagePublisherDetail```

	-   handles pulling the books per publisher data from database

-   changed class PageQueryResult

	-   added constant and switches for publisher search scope

-   abstract class Base

	-   added constants for the publisher pages

*book.php*

-   added require statement for publisher.php
-   added ```SQL_BOOKS_BY_PUBLISHER``` query to retrieve books by publisher.

-   changed class Book

	-   added query constant
	-   added publisher item
	-   added test in case no known publisher
	-   added publishername and url array elements for the JSON output
	-   added public function ```getPublisher```
	-   added public static function ```getBooksByPublisher``` to fire the query

-   changed function getJson

	-   added publisher category to search
	-   added publishername (single) and publishertitle(plural) localization entries to i18n translation array

*index.php*

-   added require statement for publisher.php

*lang/Localization_en.json

-   added new localization entries for publisher labels (see below)
```
"publisher.alphabetical.many":"Alphabetical index of the {0} publishers",
"publisher.alphabetical.none":"Alphabetical index of absolutely no publisher",
"publisher.alphabetical.one":"Alphabetical index of the single publisher",
"publisher.name":"Publisher",
"publisher.title":"Publishers",
"publisherword.many":"{0} publishers",
"publisherword.none":"No publisher",
"publisherword.one":"1 publisher",

"search.result.publisher":"Search result for *{0}* in publishers",
```

*templates\bookdetail.html*

-   added publisher label and item to bookdetail popup

*test\bookTest.php*

-   added indices and names of publishers added to testdatabase as comment
-   added test function ```testGetBooksByPublisher```
-   changed test function testGetBookById to add assertion for publisher name
-   changed test function testTypeaheadSearch to add search on partial publisher name.

*test\pageTest.php*

-   changed test function testPageIndex to insert publisher category and adjust page indices
-   changed test function testPageIndexWithCustomColum to adjust for the changed page indices
-   added test function testPageAllPublishers
-   added test function testPagePublishersDetail
-   added test function testPageSearchScopePublishers

*test\BaseWithSomeBooks\metadata.db*

-   added 5 publishers spread across all 14 books, replacing the original publisher Feedbooks

Files added:

*publisher.php*
2013-11-22 22:08:09 +01:00
Sébastien Lucas 0f63050f70 Add a new template for the suggestion item. re #34 2013-10-13 22:20:08 +02:00
Sébastien Lucas 7f1f072450 Add typeahead as a dep. re #34
Note that it's a modified version of release 0.9.3 see https://github.com/twitter/typeahead.js/issues/442
I had to keep duplicates.
2013-10-13 22:18:46 +02:00
Sébastien Lucas b99550b88d Fix display of Cyrillic characters. 2013-09-18 20:40:04 +02:00
Sébastien Lucas a74214dca2 Fixzed a mixed content error when using https. fix #92 2013-09-08 08:28:11 +02:00
Sébastien Lucas 2a10167d9b Fix problem with nas4free (should be safer too). fix #88 2013-09-05 14:45:42 +02:00
Sébastien Lucas 9d117220c4 Handle better when server side rendering is enabled. re #82 2013-09-05 08:41:40 +02:00
Tyler J. Wagner b82bf8c19f Fix favicon. fix #84 2013-08-26 10:49:23 +02:00
Sébastien Lucas e5b01934d5 Merge pull request #83 from sbdomo/master
Improve the compatibility with IOS
2013-08-24 05:14:49 -07:00
Sébastien Lucas 9c8ec7fb8a Add (again) server side rendering ! the list of user agent need to be completed but it should work. 2013-08-22 15:20:30 +02:00
sb domo 1dd252e974 Improve the compatibility with IOS
- icons for dashboard
- standalone mode
2013-08-11 19:32:07 +02:00
Sébastien Lucas 3ca1d1d3df Cleanly fix the problems with line feed 2013-07-22 14:29:32 +02:00
Sébastien Lucas 2a5d405a91 Upgrade jquery to latest version 2013-07-21 22:14:24 +02:00
Sébastien Lucas a1d350297d Replace all images by font awesome. re #73 2013-07-19 17:59:13 +02:00
Sébastien Lucas fb51523b33 Handle links better. re #73 2013-07-16 21:56:55 +02:00
Sébastien Lucas 3bdc692411 Reset Normalize.css and reorder the CSS load.
No more dotted line and correct top margin for book title.
2013-07-11 21:12:28 +02:00
Sébastien Lucas 0d50ccc6e5 Upgrade jquery to 1.10.1 2013-06-25 17:43:44 +02:00
Sébastien Lucas e547899584 Migrate from Fancybox to Magnific Popup. re #73
--HG--
rename : about.xml => about.html
2013-06-25 08:53:04 +02:00
Sébastien Lucas d3ce31c6be Move from Xhtml to Html. re #73 2013-06-25 08:40:08 +02:00
Sébastien Lucas b2d670a05d Also use the cache event if not using back with browser. re #73 2013-06-20 21:21:43 +02:00
Sébastien Lucas 44c3a10487 Due to a bug in Firefox which forbid state of size greater that 320k. The cache is not outside. re #73 2013-06-20 21:08:50 +02:00
Sébastien Lucas 065a7dac8e Move jquery-cookie to resources. re #73
--HG--
rename : js/jquery.cookies.js => resources/jquery-cookie/jquery.cookies.js
2013-06-18 12:33:33 +02:00
Sébastien Lucas d656f4692c Move jquery to resources. re #73
--HG--
rename : js/jquery-1.9.1.min.js => resources/jQuery/jquery-1.9.1.min.js
2013-06-18 12:26:08 +02:00
Sébastien Lucas 074a2b8a0f See last commit. re #73 2013-06-16 22:44:49 +02:00
Sébastien Lucas 10ed3f7944 Almost everything is in javascript now ... index.php could be an HTML page. re #73 2013-06-16 22:01:13 +02:00
Sébastien Lucas fccb7a9820 little optimization : i18n is only transfered one time. re #73 2013-06-16 15:21:21 +02:00
Sébastien Lucas b49432e3e1 Save current JSON data instead of generated HTML. Reenabled tool click. re #73 2013-06-16 15:08:47 +02:00
Sébastien Lucas bf54e6a7b9 Template are now cleanly split. Properly handle synchronization with jquery. re #73
--HG--
rename : templates/default/frontpage.html => templates/default/header.html
rename : templates/default/frontpage.html => templates/default/main.html
2013-06-16 08:46:41 +02:00
Sébastien Lucas c8595a567b Factorize a little all fancybox stuff. re #73 2013-06-16 07:50:14 +02:00
Sébastien Lucas a0cb911ce9 Bookdetail is handled with ajax. Template is not complete though. re #73
Fixes some small bugs with the other template.
2013-06-15 16:09:37 +02:00
Sébastien Lucas e9065b9c29 Little code refactoring and handle the case of going back to the first page visited. re #73 2013-06-15 08:36:45 +02:00