diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2012-04-13 11:20:05 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2012-04-13 11:20:05 +0200 |
commit | 138a0e06b88b0c9163ea0bffff8e3521e6c7ee22 (patch) | |
tree | 112248e7cab7dfc9616db24e672d0e593c102e8b /view/admin_site.tpl | |
parent | 8be7b5c65b8e43b7128bcd565cd50a710fc66b55 (diff) | |
download | volse-hubzilla-138a0e06b88b0c9163ea0bffff8e3521e6c7ee22.tar.gz volse-hubzilla-138a0e06b88b0c9163ea0bffff8e3521e6c7ee22.tar.bz2 volse-hubzilla-138a0e06b88b0c9163ea0bffff8e3521e6c7ee22.zip |
admin: change global theme settings
Diffstat (limited to 'view/admin_site.tpl')
-rw-r--r-- | view/admin_site.tpl | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/view/admin_site.tpl b/view/admin_site.tpl index ec144fbba..9de6bd9c5 100644 --- a/view/admin_site.tpl +++ b/view/admin_site.tpl @@ -1,3 +1,39 @@ +<script> + $(function(){ + + $("#cnftheme").fancybox({ + width: 800, + autoDimensions: false, + onStart: function(){ + var theme = $("#id_theme :selected").val(); + $("#cnftheme").attr('href',"$baseurl/admin/themes/"+theme); + }, + onComplete: function(){ + $("div#fancybox-content form").submit(function(e){ + var url = $(this).attr('action'); + // can't get .serialize() to work... + var data={}; + $(this).find("input").each(function(){ + data[$(this).attr('name')] = $(this).val(); + }); + $(this).find("select").each(function(){ + data[$(this).attr('name')] = $(this).children(":selected").val(); + }); + console.log(":)", url, data); + + $.post(url, data, function(data) { + if(timer) clearTimeout(timer); + NavUpdate(); + $.fancybox.close(); + }) + + return false; + }); + + } + }); + }); +</script> <div id='adminpage'> <h1>$title - $page</h1> |