aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2012-04-13 11:20:05 +0200
committerFabio Comuni <fabrix.xm@gmail.com>2012-04-13 11:20:05 +0200
commit138a0e06b88b0c9163ea0bffff8e3521e6c7ee22 (patch)
tree112248e7cab7dfc9616db24e672d0e593c102e8b /view
parent8be7b5c65b8e43b7128bcd565cd50a710fc66b55 (diff)
downloadvolse-hubzilla-138a0e06b88b0c9163ea0bffff8e3521e6c7ee22.tar.gz
volse-hubzilla-138a0e06b88b0c9163ea0bffff8e3521e6c7ee22.tar.bz2
volse-hubzilla-138a0e06b88b0c9163ea0bffff8e3521e6c7ee22.zip
admin: change global theme settings
Diffstat (limited to 'view')
-rw-r--r--view/admin_plugins_details.tpl2
-rw-r--r--view/admin_site.tpl36
2 files changed, 37 insertions, 1 deletions
diff --git a/view/admin_plugins_details.tpl b/view/admin_plugins_details.tpl
index cbaef2d66..aaa366f65 100644
--- a/view/admin_plugins_details.tpl
+++ b/view/admin_plugins_details.tpl
@@ -17,7 +17,7 @@
</p>
{{ if $screenshot }}
- <a href="$screenshot.0" ><img src="$screenshot.0" width="320" height="240" alt="$screenshot.1" /></a>
+ <a href="$screenshot.0" class='screenshot'><img src="$screenshot.0" alt="$screenshot.1" /></a>
{{ endif }}
{{ if $admin_form }}
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>