Skip to content

Commit

Permalink
Created a new version to deploy locally, some comments on todos
Browse files Browse the repository at this point in the history
  • Loading branch information
mliebelt committed Dec 21, 2014
1 parent eba0efa commit 3896952
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
20 changes: 20 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Here are the things that remain todo. If solved, move to the solved section.

## TODO

* Locales are currently not working. The error message in the browser is the following:

XMLHttpRequest cannot load http://mliebelt.github.io/PgnViewerJS/dist/locales/chess-de.json.
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://192.168.0.27' is therefore not allowed access.
* What is the best deployment scheme? Currently I have the following options:
* Use github.io for the distribution of PgnViewerJS and take the files from there. Then I have the problem from
above (as I understand it).
* Distribute all files together with the wordpress plugin. This is 1.5 MB (with all files), and even 0.7 MB
when the Javascript file is compressed. It includes currently a copy of jQuery, which could be removed as well.
But the remaining files will be significant.

* The layout of the board needs too much place. I should find ways for displaying board, moves and navigation elements
so that not such much place is wasted.
* Find alternative ways to scale, so that depending on the wordpress theme, the layout of the board and moves may be different.

## Solved
4 changes: 2 additions & 2 deletions pgnviewerjs.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
function pgnv_js_and_css(){
$loc = get_locale();
wp_enqueue_script("jquery");
wp_enqueue_script('pgnviewerjs', 'http://mliebelt.github.io/PgnViewerJS/docu/dist/js/pgnviewerjs.js');
wp_enqueue_script('pgnviewerjs', 'http://mliebelt.github.io/PgnViewerJS/dist/js/pgnviewerjs.js');
wp_enqueue_style('jqueryui-css', 'http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css');
wp_enqueue_style('pgnviewerjs-css', 'http://mliebelt.github.io/PgnViewerJS/docu/dist/css/pgnvjs.css');
wp_enqueue_style('pgnviewerjs-css', 'http://mliebelt.github.io/PgnViewerJS/dist/css/pgnvjs.css');
}

add_action('wp_enqueue_scripts', 'pgnv_js_and_css');
Expand Down

0 comments on commit 3896952

Please sign in to comment.