diff options
Diffstat (limited to 'data/script.js')
-rw-r--r-- | data/script.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/data/script.js b/data/script.js index 7d976644..abec85f9 100644 --- a/data/script.js +++ b/data/script.js @@ -1787,6 +1787,7 @@ function filLoad() { tag('b', {'class':'ruler'}, null), c, tag('b', {'class':'ruler'}, null), + PREF_CODE != '' ? tag('input', {type:'button', 'class':'submit', value: mt('_rbrowse_filsave'), onclick:filSaveDefault }) : null, tag('input', {type:'button', 'class':'submit', value: mt('_rbrowse_apply'), onclick:function () { var f = byId('fil'); while(f.nodeName.toLowerCase() != 'form') @@ -1800,6 +1801,17 @@ function filLoad() { filDeSerialize(); } +function filSaveDefault() { + var but = this; + but.value = mt('_js_loading'); + but.enabled = false; + var type = byId('filselect').href.match(/#r$/) ? 'release' : 'vn'; + ajax('/xml/prefs.xml?formcode='+PREF_CODE+';key=filter_'+type+';value='+byId('fil').value, function (hr) { + but.value = mt('_rbrowse_filsave'); + but.enable = true; + }); +} + function filSelectCat(n) { n = this.fil_num ? this.fil_num : n; for(var i=1; i<fil_cats.length; i++) { |