some cleanup and refactoring...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-02-05 20:59:15 +04:00
parent 8420219976
commit e649f0c384
3 changed files with 27 additions and 15 deletions

View File

@ -6,20 +6,17 @@
[_] BUG: no drag threshold on excludedElements (TouchSwipe) [_] BUG: no drag threshold on excludedElements (TouchSwipe)
| stalled... | stalled...
[_] 67% general todo [_] 67% general todo
[_] add separate history manager...
| might be a virtual history rather than browser history which
| tends to slow things down -- just a simple stack...
[_] move some of the current configuration options to the magazine... [_] move some of the current configuration options to the magazine...
| same idea as .no-resize class... | same idea as .no-resize class...
[_] add option to align page to right or left screen border [_] add option to align page to right or left screen border
| now only centering is possible... | now only centering is possible...
[_] add transition-duration editors to config page (a-la PAGES_IN_RIBBON)... [_] add transition-duration editors to config page (a-la PAGES_IN_RIBBON)...
| will help tuning the system,,, | will help tuning the system,,,
[_] add toggleEditiorMode to all editable in all versions... [_] Editor: add toggleEditiorMode to all editables in all versions...
| text areas, inputs, ... | text areas, inputs, ...
[_] Try using scroll instead of left of .magazine.... [_] EXPERIMENT: Try using scroll instead of left of .magazine....
| this might improve speed... | this might improve speed...
[_] BUG: as on android before, on loading from json view does not reach cur page... [_] BUG: as on android, on loading from json view does not reach cur page...
| likely due to animation/transition stopping for some reason.... | likely due to animation/transition stopping for some reason....
[_] 0% add two main page themes (global/local applicable): [_] 0% add two main page themes (global/local applicable):
[_] light [_] light
@ -64,15 +61,18 @@
[_] template photo page [_] template photo page
[_] template 3x3 grid [_] template 3x3 grid
[_] template two column text [_] template two column text
[_] add separate history manager...
| might be a virtual history rather than browser history which
| tends to slow things down -- just a simple stack...
[_] make layer default state configurable... [_] make layer default state configurable...
| e.g. setting "shown"/"hidden" classes in HTML and adding | e.g. setting "shown"/"hidden" classes in HTML and adding
| something like a page reset that will restore the default state, | something like a page reset that will restore the default state,
| rather than the current "hideLayers" | rather than the current "hideLayers"
[_] BUG: when #URL updates are off layer toggling breaks...
| will show but not hide layers...
[_] BUG: href to existing anchors will mess up layout... [_] BUG: href to existing anchors will mess up layout...
| need to find out how can we disable anchor links from actually | need to find out how can we disable anchor links from actually
| going to the anchor... | going to the anchor...
[_] BUG: when #URL updates are off layer toggling breaks...
| will show but not hide layers...
[X] make #URL updates optional... [X] make #URL updates optional...
[X] add click current page to full page view... [X] add click current page to full page view...
[X] 100% templates [X] 100% templates

View File

@ -7,18 +7,24 @@
<link rel="stylesheet" href="magazine.css"> <link rel="stylesheet" href="magazine.css">
<link rel="stylesheet" href="magazine-custom.css"> <link rel="stylesheet" href="magazine-custom.css">
<script src="jquery.js"></script> <script src="ext-lib/jquery.js"></script>
<script src="jquery.touchSwipe.js"></script> <script src="ext-lib/jquery.touchSwipe.js"></script>
<script src="jstorage.js"></script> <script src="ext-lib/jstorage.js"></script>
<!-- XXX make this optional... --> <!-- EXPERIMENTAL -->
<script src="ckeditor/ckeditor.js"></script> <!--
XXX scrollTo is a cool and a powerfull tool but it needs a sustantial code reorganization
this might be a good idea/exersize sometime in the future...
-->
<!--script src="ext-lib/jquery.scrollto.js"></script-->
<script src="lib/jli.js"></script>
<script src="jli.js"></script>
<script src="magazine.js"></script> <script src="magazine.js"></script>
<script src="navigator.js"></script> <script src="navigator.js"></script>
<script src="editor.js"></script> <script src="editor.js"></script>
<!-- configuration, keep this last... --> <!-- configuration, keep this last... -->
<script src="platform.js"></script>
<script src="keybindings.js"></script> <script src="keybindings.js"></script>
<script src="config.js"></script> <script src="config.js"></script>

View File

@ -38,7 +38,7 @@ var UPDATE_HASH_URL_POSITION = false
// of weather UPDATE_HASH_URL_POSITION state. // of weather UPDATE_HASH_URL_POSITION state.
// NOTE: UPDATE_HASH_URL_POSITION implicitly enables full browser history // NOTE: UPDATE_HASH_URL_POSITION implicitly enables full browser history
// based navigation. // based navigation.
// NOTE: this can slow down navigation... // NOTE: this, if enabled, can slow down navigation...
// NOTE: partial history navigation over links will still work. // NOTE: partial history navigation over links will still work.
var FULL_HISTORY_ENABLED = false var FULL_HISTORY_ENABLED = false
@ -723,6 +723,12 @@ function saveURLState(){
} else if(FULL_HISTORY_ENABLED){ } else if(FULL_HISTORY_ENABLED){
// XXX add option to disable history altogether... // XXX add option to disable history altogether...
window.history.pushState(null, null, '#' + n) window.history.pushState(null, null, '#' + n)
} else {
// clear the url if it does not match the current page...
// XXX should this be here?
if(n != parseInt(anchor)){
window.location.hash = ''
}
} }
return n return n
} }