added reset button...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-01-30 03:35:34 +04:00
parent 9ab468a906
commit aa2d9666d6
2 changed files with 22 additions and 1 deletions

View File

@ -453,7 +453,7 @@ $(document).ready(function(){
}
.settings button, .settings input {
background: white;
height: 20px;
height: 25px;
}
.settings input {
border: solid silver 1px;
@ -466,6 +466,11 @@ $(document).ready(function(){
padding-left: 15px;
padding-right: 15px;
}
#RESET {
background: red;
color: white;
font-weight: bold;
}
</style>
<table class="settings" width="100%">
@ -519,6 +524,14 @@ $(document).ready(function(){
<button id="USE_REAL_PAGE_SIZES" onclick="toggleSetting(this)"></button>
</td>
</tr>
<tr>
<td>
Reset stored data:
</td>
<td>
<button id="RESET" onclick="confirm('You really want to reset?')&&resetState()">Reset</button>
</td>
</tr>
<table/>
<hr noshade color="silver">

View File

@ -779,6 +779,9 @@ function saveStorageState(){
$.jStorage.set('current_page', getPageNumber())
$.jStorage.set('bookmarks', buildBookmarkList())
}
function resetStorageState(){
$.jStorage.flush()
}
// JSON format state managers...
@ -809,6 +812,11 @@ function saveState(){
saveStorageState()
}
function resetState(){
resetStorageState()
loadState()
}
/********************************************************** editor ***/