Index: plugins/aboutConfig/index.php
===================================================================
--- plugins/aboutConfig/index.php	(revision 3421)
+++ plugins/aboutConfig/index.php	(revision 3709)
@@ -10,94 +10,88 @@
 #
 # -- END LICENSE BLOCK -----------------------------------------
-if (!defined('DC_CONTEXT_ADMIN')) { return; }
+if (!defined('DC_CONTEXT_ADMIN')) {return;}
 
 # Local navigation
 if (!empty($_POST['gs_nav'])) {
-	http::redirect($p_url.$_POST['gs_nav']);
-	exit;
+    http::redirect($p_url . $_POST['gs_nav']);
+    exit;
 }
 if (!empty($_POST['ls_nav'])) {
-	http::redirect($p_url.$_POST['ls_nav']);
-	exit;
+    http::redirect($p_url . $_POST['ls_nav']);
+    exit;
 }
 
 # Local settings update
-if (!empty($_POST['s']) && is_array($_POST['s']))
+if (!empty($_POST['s']) && is_array($_POST['s'])) {
+    try
+    {
+        foreach ($_POST['s'] as $ns => $s) {
+            $core->blog->settings->addNamespace($ns);
+            foreach ($s as $k => $v) {
+                if ($_POST['s_type'][$ns][$k] == 'array') {
+                    $v = json_decode($v, true);
+                }
+                $core->blog->settings->$ns->put($k, $v);
+            }
+            $core->blog->triggerBlog();
+        }
+
+        dcPage::addSuccessNotice(__('Configuration successfully updated'));
+        http::redirect($p_url);
+    } catch (Exception $e) {
+        $core->error->add($e->getMessage());
+    }
+}
+
+# Global settings update
+if (!empty($_POST['gs']) && is_array($_POST['gs'])) {
+    try
+    {
+        foreach ($_POST['gs'] as $ns => $s) {
+            $core->blog->settings->addNamespace($ns);
+            foreach ($s as $k => $v) {
+                if ($_POST['gs_type'][$ns][$k] == 'array') {
+                    $v = json_decode($v, true);
+                }
+                $core->blog->settings->$ns->put($k, $v, null, null, true, true);
+            }
+            $core->blog->triggerBlog();
+        }
+
+        dcPage::addSuccessNotice(__('Configuration successfully updated'));
+        http::redirect($p_url . '&part=global');
+    } catch (Exception $e) {
+        $core->error->add($e->getMessage());
+    }
+}
+
+$part = !empty($_GET['part']) && $_GET['part'] == 'global' ? 'global' : 'local';
+
+function settingLine($id, $s, $ns, $field_name, $strong_label)
 {
-	try
-	{
-		foreach ($_POST['s'] as $ns => $s) {
-			$core->blog->settings->addNamespace($ns);
-			foreach ($s as $k => $v) {
-				if ($_POST['s_type'][$ns][$k] == 'array') {
-					$v = json_decode($v,true);
-				}
-				$core->blog->settings->$ns->put($k,$v);
-			}
-			$core->blog->triggerBlog();
-		}
-
-		dcPage::addSuccessNotice(__('Configuration successfully updated'));
-		http::redirect($p_url);
-	}
-	catch (Exception $e)
-	{
-		$core->error->add($e->getMessage());
-	}
-}
-
-# Global settings update
-if (!empty($_POST['gs']) && is_array($_POST['gs']))
-{
-	try
-	{
-		foreach ($_POST['gs'] as $ns => $s) {
-			$core->blog->settings->addNamespace($ns);
-			foreach ($s as $k => $v) {
-				if ($_POST['gs_type'][$ns][$k] == 'array') {
-					$v = json_decode($v,true);
-				}
-				$core->blog->settings->$ns->put($k,$v,null,null,true,true);
-			}
-			$core->blog->triggerBlog();
-		}
-
-		dcPage::addSuccessNotice(__('Configuration successfully updated'));
-		http::redirect($p_url.'&part=global');
-	}
-	catch (Exception $e)
-	{
-		$core->error->add($e->getMessage());
-	}
-}
-
-$part = !empty($_GET['part']) && $_GET['part'] == 'global' ? 'global' : 'local';
-
-function settingLine($id,$s,$ns,$field_name,$strong_label)
-{
-	if ($s['type'] == 'boolean') {
-		$field = form::combo(array($field_name.'['.$ns.']['.$id.']',$field_name.'_'.$ns.'_'.$id),
-		array(__('yes') => 1, __('no') => 0),$s['value'] ? 1 : 0);
-	} else {
-		if ($s['type'] == 'array') {
-			$field = form::field(array($field_name.'['.$ns.']['.$id.']',$field_name.'_'.$ns.'_'.$id),40,null,
-			html::escapeHTML(json_encode($s['value'])));
-		} else {
-			$field = form::field(array($field_name.'['.$ns.']['.$id.']',$field_name.'_'.$ns.'_'.$id),40,null,
-			html::escapeHTML($s['value']));
-		}
-	}
-	$type = form::hidden(array($field_name.'_type'.'['.$ns.']['.$id.']',$field_name.'_'.$ns.'_'.$id.'_type'),
-		html::escapeHTML($s['type']));
-
-	$slabel = $strong_label ? '<strong>%s</strong>' : '%s';
-
-	return
-	'<tr class="line">'.
-	'<td scope="row"><label for="'.$field_name.'_'.$ns.'_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></td>'.
-	'<td>'.$field.'</td>'.
-	'<td>'.$s['type'].$type.'</td>'.
-	'<td>'.html::escapeHTML($s['label']).'</td>'.
-	'</tr>';
+    if ($s['type'] == 'boolean') {
+        $field = form::combo(array($field_name . '[' . $ns . '][' . $id . ']', $field_name . '_' . $ns . '_' . $id),
+            array(__('yes') => 1, __('no') => 0), $s['value'] ? 1 : 0);
+    } else {
+        if ($s['type'] == 'array') {
+            $field = form::field(array($field_name . '[' . $ns . '][' . $id . ']', $field_name . '_' . $ns . '_' . $id), 40, null,
+                html::escapeHTML(json_encode($s['value'])));
+        } else {
+            $field = form::field(array($field_name . '[' . $ns . '][' . $id . ']', $field_name . '_' . $ns . '_' . $id), 40, null,
+                html::escapeHTML($s['value']));
+        }
+    }
+    $type = form::hidden(array($field_name . '_type' . '[' . $ns . '][' . $id . ']', $field_name . '_' . $ns . '_' . $id . '_type'),
+        html::escapeHTML($s['type']));
+
+    $slabel = $strong_label ? '<strong>%s</strong>' : '%s';
+
+    return
+    '<tr class="line">' .
+    '<td scope="row"><label for="' . $field_name . '_' . $ns . '_' . $id . '">' . sprintf($slabel, html::escapeHTML($id)) . '</label></td>' .
+    '<td>' . $field . '</td>' .
+    '<td>' . $s['type'] . $type . '</td>' .
+    '<td>' . html::escapeHTML($s['label']) . '</td>' .
+        '</tr>';
 }
 ?>
@@ -105,17 +99,5 @@
 <head>
   <title>about:config</title>
-  <?php echo dcPage::jsPageTabs($part); ?>
-  <script type="text/javascript">
-	$(function() {
-		$("#gs_submit").hide();
-		$("#ls_submit").hide();
-		$("#gs_nav").change(function() {
-			window.location = $("#gs_nav option:selected").val();
-		})
-		$("#ls_nav").change(function() {
-			window.location = $("#ls_nav option:selected").val();
-		})
-	});
-	</script>
+  <?php echo dcPage::jsPageTabs($part) . dcPage::jsLoad(dcPage::getPF('aboutConfig/js/index.js')); ?>
 </head>
 
@@ -123,47 +105,47 @@
 <?php
 echo dcPage::breadcrumb(
-	array(
-		__('System') => '',
-		html::escapeHTML($core->blog->name) => '',
-		__('about:config') => ''
-	)).
-	dcPage::notices();
-?>
-
-<div id="local" class="multi-part" title="<?php echo sprintf(__('Settings for %s'),html::escapeHTML($core->blog->name)); ?>">
-<h3 class="out-of-screen-if-js"><?php echo sprintf(__('Settings for %s'),html::escapeHTML($core->blog->name)); ?></h3>
-
-<?php
-$table_header = '<div class="table-outer"><table class="settings" id="%s"><caption class="as_h3">%s</caption>'.
-'<thead>'.
-'<tr>'."\n".
-'  <th class="nowrap">'.__('Setting ID').'</th>'."\n".
-'  <th>'.__('Value').'</th>'."\n".
-'  <th>'.__('Type').'</th>'."\n".
-'  <th class="maximalx">'.__('Description').'</th>'."\n".
-'</tr>'."\n".
-'</thead>'."\n".
-'<tbody>';
+    array(
+        __('System')                        => '',
+        html::escapeHTML($core->blog->name) => '',
+        __('about:config')                  => ''
+    )) .
+dcPage::notices();
+?>
+
+<div id="local" class="multi-part" title="<?php echo sprintf(__('Settings for %s'), html::escapeHTML($core->blog->name)); ?>">
+<h3 class="out-of-screen-if-js"><?php echo sprintf(__('Settings for %s'), html::escapeHTML($core->blog->name)); ?></h3>
+
+<?php
+$table_header = '<div class="table-outer"><table class="settings" id="%s"><caption class="as_h3">%s</caption>' .
+'<thead>' .
+'<tr>' . "\n" .
+'  <th class="nowrap">' . __('Setting ID') . '</th>' . "\n" .
+'  <th>' . __('Value') . '</th>' . "\n" .
+'  <th>' . __('Type') . '</th>' . "\n" .
+'  <th class="maximalx">' . __('Description') . '</th>' . "\n" .
+    '</tr>' . "\n" .
+    '</thead>' . "\n" .
+    '<tbody>';
 $table_footer = '</tbody></table></div>';
 
 $settings = array();
 foreach ($core->blog->settings->dumpNamespaces() as $ns => $namespace) {
-	foreach ($namespace->dumpSettings() as $k => $v) {
-		$settings[$ns][$k] = $v;
-	}
+    foreach ($namespace->dumpSettings() as $k => $v) {
+        $settings[$ns][$k] = $v;
+    }
 }
 ksort($settings);
 if (count($settings) > 0) {
-	$ns_combo = array();
-	foreach ($settings as $ns => $s) {
-		$ns_combo[$ns] = '#l_'.$ns;
-	}
-	echo
-		'<form action="'.$core->adminurl->get('admin.plugin').'" method="post">'.
-		'<p class="anchor-nav">'.
-		'<label for="ls_nav" class="classic">'.__('Goto:').'</label> '.form::combo('ls_nav',$ns_combo).
-		' <input type="submit" value="'.__('Ok').'" id="ls_submit" />'.
-		'<input type="hidden" name="p" value="aboutConfig" />'.
-		$core->formNonce().'</p></form>';
+    $ns_combo = array();
+    foreach ($settings as $ns => $s) {
+        $ns_combo[$ns] = '#l_' . $ns;
+    }
+    echo
+    '<form action="' . $core->adminurl->get('admin.plugin') . '" method="post">' .
+    '<p class="anchor-nav">' .
+    '<label for="ls_nav" class="classic">' . __('Goto:') . '</label> ' . form::combo('ls_nav', $ns_combo) .
+    ' <input type="submit" value="' . __('Ok') . '" id="ls_submit" />' .
+    '<input type="hidden" name="p" value="aboutConfig" />' .
+    $core->formNonce() . '</p></form>';
 }
 ?>
@@ -172,13 +154,11 @@
 
 <?php
-foreach ($settings as $ns => $s)
-{
-	ksort($s);
-	echo sprintf($table_header,'l_'.$ns,$ns);
-	foreach ($s as $k => $v)
-	{
-		echo settingLine($k,$v,$ns,'s',!$v['global']);
-	}
-	echo $table_footer;
+foreach ($settings as $ns => $s) {
+    ksort($s);
+    echo sprintf($table_header, 'l_' . $ns, $ns);
+    foreach ($s as $k => $v) {
+        echo settingLine($k, $v, $ns, 's', !$v['global']);
+    }
+    echo $table_footer;
 }
 ?>
@@ -197,7 +177,7 @@
 
 foreach ($core->blog->settings->dumpNamespaces() as $ns => $namespace) {
-	foreach ($namespace->dumpGlobalSettings() as $k => $v) {
-		$settings[$ns][$k] = $v;
-	}
+    foreach ($namespace->dumpGlobalSettings() as $k => $v) {
+        $settings[$ns][$k] = $v;
+    }
 }
 
@@ -205,15 +185,15 @@
 
 if (count($settings) > 0) {
-	$ns_combo = array();
-	foreach ($settings as $ns => $s) {
-		$ns_combo[$ns] = '#g_'.$ns;
-	}
-	echo
-		'<form action="'.$core->adminurl->get('admin.plugin').'" method="post">'.
-		'<p class="anchor-nav">'.
-		'<label for="gs_nav" class="classic">'.__('Goto:').'</label> '.form::combo('gs_nav',$ns_combo).' '.
-		'<input type="submit" value="'.__('Ok').'" id="gs_submit" />'.
-		'<input type="hidden" name="p" value="aboutConfig" />'.
-		$core->formNonce().'</p></form>';
+    $ns_combo = array();
+    foreach ($settings as $ns => $s) {
+        $ns_combo[$ns] = '#g_' . $ns;
+    }
+    echo
+    '<form action="' . $core->adminurl->get('admin.plugin') . '" method="post">' .
+    '<p class="anchor-nav">' .
+    '<label for="gs_nav" class="classic">' . __('Goto:') . '</label> ' . form::combo('gs_nav', $ns_combo) . ' ' .
+    '<input type="submit" value="' . __('Ok') . '" id="gs_submit" />' .
+    '<input type="hidden" name="p" value="aboutConfig" />' .
+    $core->formNonce() . '</p></form>';
 }
 ?>
@@ -222,13 +202,11 @@
 
 <?php
-foreach ($settings as $ns => $s)
-{
-	ksort($s);
-	echo sprintf($table_header,'g_'.$ns,$ns);
-	foreach ($s as $k => $v)
-	{
-		echo settingLine($k,$v,$ns,'gs',false);
-	}
-	echo $table_footer;
+foreach ($settings as $ns => $s) {
+    ksort($s);
+    echo sprintf($table_header, 'g_' . $ns, $ns);
+    foreach ($s as $k => $v) {
+        echo settingLine($k, $v, $ns, 'gs', false);
+    }
+    echo $table_footer;
 }
 ?>
@@ -240,5 +218,5 @@
 </div>
 
-<?php dcPage::helpBlock('aboutConfig'); ?>
+<?php dcPage::helpBlock('aboutConfig');?>
 
 </body>
Index: plugins/aboutConfig/js/index.js
===================================================================
--- plugins/aboutConfig/js/index.js	(revision 3709)
+++ plugins/aboutConfig/js/index.js	(revision 3709)
@@ -0,0 +1,13 @@
+/*global $ */
+'use strict';
+
+$(function() {
+  $('#gs_submit').hide();
+  $('#ls_submit').hide();
+  $('#gs_nav').change(function() {
+    window.location = $('#gs_nav option:selected').val();
+  });
+  $('#ls_nav').change(function() {
+    window.location = $('#ls_nav option:selected').val();
+  });
+});
