212 Commits

Author SHA1 Message Date
mossroy
5f7d32d1f8 On small screens, a click on a navbar item collapses the menu.
Fixes #41
2013-08-02 09:39:09 +02:00
mossroy
b5fe7fc242 Use a Web Worker to encapsulate bzip2 decoding.
It keeps the user interface responsive,  and gives a better feedback to the user :
Withour a Web Worker, the spinner was blocked during decompression, which was misleading for : did my application hang?
Now the spinner keeps turning.
Anyway, the way Web Workers are designed forces us to pass the in/out parameters by copy. So the input byte array and the output string are cloned, which gives an overhead measured around 14% on my computer
Fixes #5
For the unit tests to keep working, I had to move tests.html at the same level as index.html (because the webworker is created in archive.js, by giving the path to its js file. So this path cannot be different between these html files)
2013-07-28 17:28:33 +02:00
mossroy
8273226aec Move/rename javascript files to ease the introduction of web workers
Upgrade jQuery library, and use its development version to ease debugging
2013-07-28 14:06:19 +02:00
mossroy
bd6059043f Delete unused CSS files (deprecated since Bootstrap 3) 2013-07-28 11:38:56 +02:00
mossroy
8b21d52b92 No automatic search when the prefix is empty 2013-07-28 10:56:53 +02:00
mossroy
1509769e9f Small modifications in the about and configuration sections 2013-07-28 10:44:45 +02:00
mossroy
9eb5ec5d48 Small modifications in the about section 2013-07-28 09:54:22 +02:00
mossroy
29520d0727 Remove focus on prefix field (buggy on device) 2013-07-27 20:40:27 +02:00
mossroy
b9b90a3832 Fixes in the navigation bar behavior 2013-07-27 20:24:57 +02:00
mossroy
21155995bc Samll fixes in the layout 2013-07-27 20:00:45 +02:00
mossroy
a4edea562e Upgrade to bootstrap 3.0.0 RC1. Fixes #31
I had to switch to JQuery instead of Zepto, because they seem to be incompatible for now (see https://github.com/madrobby/zepto/issues/791 )
I also simplified the require.js, so that it will be easier to swith between jQuery and Zepto in the future, and to change the version of jQuery
I use the "responsive navbar" feature of bootstrap to hide the buttons "Configure" and "About" when on a small screen
2013-07-27 19:57:36 +02:00
mossroy
a8f4a8d964 Small update of the About section
Small modification of the style of the title list
2013-07-27 16:37:08 +02:00
mossroy
edd97188ee Refactor javascript files, so that to externalize utility functions, and split the evopedia.js file into 2 files implementing the 2 classes Title and LocalArchive 2013-07-27 15:37:59 +02:00
mossroy
e3ef342e2e Fix a few warnings from the IDE 2013-07-27 14:57:36 +02:00
mossroy
86c2fe532d Fix on autofocus of prefix field.
We don't want it to be focused on page load, but each time the archive is selected (either through DeviceStorage or manual file selection)
2013-07-27 12:14:41 +02:00
mossroy
21a97278b2 When DeviceStorage is not available, display only one "input type=file multiple", in which the use must select all the archive files. It's quicker and easier than selecting each type of file individually. Fixes #28
Also implemented reading all the kind of files of an archive : titles_search.idx and coordinate files (both unused for now)
2013-07-27 11:51:12 +02:00
mossroy
96e4e6bbdf Add autofocus in prefix field, so that it gets the focus on page load 2013-07-27 10:42:36 +02:00
mossroy
5ff703a7bf Update bootstrap.min.js for require.js compatibility, as for bootstrap.js 2013-07-26 20:57:09 +02:00
mossroy
af6e12a8f6 Remove unused file 2013-07-26 20:55:21 +02:00
mossroy
354f89fe0a Changes in the layout. Add a few CSS styles to give a better look
Slight modifications in the behavior, so that the configuration zone appears when necessary (on desktop), and can be toggled by a button.
Tha about section is now bound to the corresponding button
+ small fix on the back/forward buttons behavior
2013-07-26 20:18:57 +02:00
mossroy
b1e0a43e70 Replace the drop-down list of articles by an HTML unordered list (ul/li)
Make back/forward buttons work again
Implement "search as you type" feature. Fixes #27
2013-07-26 17:39:13 +02:00
mossroy
c5f345bd5c Add Twitter Bootstrap (CSS and JS) and upgrade Zepto
Start using the new CSS styles
2013-07-26 15:58:55 +02:00
mossroy
f118d09473 Minor update of the text in the "about" section 2013-07-22 13:02:53 +02:00
mossroy
9c470ea779 Implement reading the metadata.txt file, to find its language and date
Use this language to redirect the links to images (File:xxx.jpg for example) to the online version. Fixes #23
2013-07-15 13:36:27 +02:00
mossroy
05014e469b Revert font size with rem in CSS : it fixes the text size on the Peak device, but hides some parts on smaller screens 2013-07-12 13:34:21 +02:00
mossroy
8200762f74 Add a simple CSS to use "rem" sizes. Fixes #8
Prefix all the rules in the mediawiki CSS, so that they only apply inside the "articleContent" div
Add back/forward buttons. Fixes #1
2013-07-11 22:40:27 +02:00
mossroy
da03c7c309 Remove appcache from manifest, as it is not supported by packaged apps 2013-07-11 21:31:56 +02:00
mossroy
646a245658 Small fix for links to articles prefixed by ./ , such as links to special pages of Wikipedia (categories etc). 2013-07-10 22:52:24 +02:00
mossroy
ff2c085bc6 Handle links to articles prefixed by ./ , such as links to special pages of Wikipedia (categories etc). Fixes #16
Handle missing articles by displaying a message to the user
2013-07-10 22:30:46 +02:00
mossroy
3f97d298a9 Re-implement the normalization function exactly as the original application, so that it really matches the title order in titles.idx.
Fixes #20
2013-07-10 18:21:31 +02:00
mossroy
cfb5495532 Convert the character ° to _ when normalizing the titles.
Fixes #7
2013-07-09 13:44:48 +02:00
mossroy
a1f8a3a5fc Externalize utf8 encoding/decoding functions
Revert to a String comparison in the Title search instead of comparing the byte arrays : it gives the same result and probably uses more CPU
2013-07-09 13:24:25 +02:00
mossroy
63aec21065 If we find the exact title when doing the binary search, it's no use searching more.
It's a small optimization.
2013-07-08 13:59:27 +02:00
mossroy
7eeafe4d84 Change the comparison algorithm of titles when searching through the index.
We use a comparison of byte arrays instead of String comparison.
2013-07-08 13:56:58 +02:00
mossroy
8cedce59aa Code reformat with Netbeans 2013-07-01 15:57:16 +02:00
mossroy
a920c0deb4 Remove unnecessary global variables 2013-06-28 23:27:37 +02:00
mossroy
2aea085dcc Replace "const" with "var" because it does not seem to be standard enough for Netbeans 2013-06-28 23:17:57 +02:00
mossroy
cb801bafa4 Add link to the github bugtracker in the About section 2013-06-19 12:00:37 +02:00
mossroy
76e6fdcd6e Redirect links to other languages of the article to the online version of wikipedia
Fixes #15
2013-06-18 09:58:53 +02:00
mossroy
97dadfdd76 Add commented lines to monitor the time spent in bzip2 decompression 2013-06-18 09:33:28 +02:00
mossroy
49a12b8faf Add MediaWiki CSS 2013-06-09 23:29:43 +02:00
mossroy
5953bcc316 Implement math images loaded from dump, contributed by
christian@evopedia.info
2013-06-09 22:34:15 +02:00
mossroy
82dec4d423 Patch contributed by christian@evopedia.info, to improve performance of
title searching in the dump
So far, we were reading the title file till its end. In fact, we only
need a very small part of it. This should really reduce I/O and memory
consumption while searching for titles
2013-06-08 13:21:13 +02:00
mossroy
fd38c7edc0 Slightly improve waiting messages 2013-06-08 13:06:11 +02:00
mossroy
0216003660 Merge branch 'master' of ssh://github.com/mossroy/evopedia-html5
Conflicts:
	index.html
	js/app.js
2013-06-08 13:00:46 +02:00
mossroy
ec5e4cd2f0 Display spinner icon when asynchronous tasks are done 2013-06-06 22:05:58 +02:00
mossroy
a537d0da21 Display spinner icon when asynchronous tasks are done 2013-06-06 14:09:04 +02:00
mossroy
ff6072bb26 Minor modifications in the About section of the main page 2013-06-04 13:08:38 +02:00
mossroy
a684fec345 Trim the search string before using it to find matching titles
Firefox OS autocompletion adds a space after each word it autocompletes,
so the title search was failing when using that feature (or simply if
you type a space at the end of your search string)
2013-06-04 12:23:25 +02:00
mossroy
8b752aed89 Fix in the algorithm, by handling the escape bits of the Title file 2013-06-04 12:16:33 +02:00