aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
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>