? .DS_Store
? incremental_filter_access_control.patch
? modules/.DS_Store
? modules/user/.DS_Store
Index: modules/user/user.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.admin.inc,v
retrieving revision 1.19
diff -u -p -r1.19 user.admin.inc
--- modules/user/user.admin.inc 20 Feb 2008 13:46:43 -0000 1.19
+++ modules/user/user.admin.inc 2 Mar 2008 22:57:16 -0000
@@ -431,7 +431,7 @@ function user_admin_settings() {
'#prefix' => '
',
'#suffix' => '
',
);
- drupal_add_js(drupal_get_path('module', 'user') .'/user.js');
+ drupal_add_js(drupal_get_path('module', 'user') .'/user.admin.js');
// If JS is enabled, and the radio is defaulting to off, hide all
// the settings on page load via .css using the js-hide class so
// that there's no flicker.
@@ -493,6 +493,7 @@ function user_admin_settings() {
* @see theme_user_admin_perm()
*/
function user_admin_perm($form_state, $rid = NULL) {
+ drupal_add_js(drupal_get_path('module', 'user') .'/user.admin.js');
if (is_numeric($rid)) {
$result = db_query('SELECT r.rid, p.perm FROM {role} r LEFT JOIN {permission} p ON r.rid = p.rid WHERE r.rid = %d', $rid);
}
@@ -543,8 +544,7 @@ function user_admin_perm($form_state, $r
}
}
}
- }
-
+ }
// Have to build checkboxes here after checkbox arrays are built
foreach ($role_names as $rid => $name) {
$form['checkboxes'][$rid] = array('#type' => 'checkboxes', '#options' => $options, '#default_value' => isset($status[$rid]) ? $status[$rid] : array());
@@ -606,7 +606,7 @@ function theme_user_admin_perm($form) {
$rows[] = $row;
}
}
- $header[] = (t('Permission'));
+ $header[] = array('data' => t('Permission'), 'class' => 'permission-header');
foreach (element_children($form['role_names']) as $rid) {
if (is_array($form['role_names'][$rid])) {
$header[] = array('data' => drupal_render($form['role_names'][$rid]), 'class' => 'checkbox');
Index: modules/user/user.admin.js
===================================================================
RCS file: modules/user/user.admin.js
diff -N modules/user/user.admin.js
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ modules/user/user.admin.js 2 Mar 2008 22:57:16 -0000
@@ -0,0 +1,49 @@
+// $Id: user.js,v 1.6 2007/09/12 18:29:32 goba Exp $
+
+/**
+ * On the admin/user/settings page, conditionally show all of the
+ * picture-related form elements depending on the current value of the
+ * "Picture support" radio buttons.
+ */
+Drupal.behaviors.userSettings = function(context) {
+ $('div.user-admin-picture-radios input[type=radio]:not(.userSettings-processed)', context).addClass('userSettings-processed').click(function () {
+ $('div.user-admin-picture-settings', context)[['hide', 'show'][this.value]]();
+ });
+};
+
+Drupal.behaviors.userPermissions = function(context) {
+ $('.permission-header:not(.userPermissions-processed)', context).addClass('.userPermissions-processed').append(' ').append(
+ $('').keyup(function() {
+ value = $(this).val();
+ if (value) {
+ previousModule = false;
+ zebra = true;
+ $('#permissions > tbody > tr').each(function() {
+ td = $(this).find('td:first');
+ if (td.is('.permission')) {
+ if (td.text().match(value)) {
+ previousModule = false;
+ $(this).show().removeClass('even').removeClass('odd').addClass(zebra == false? 'odd' : 'even');
+ zebra = !zebra;
+ }
+ else {
+ $(this).hide();
+ }
+ }
+ else {
+ if (previousModule != false) {
+ previousModule.hide();
+ }
+ previousModule = $(this);
+ }
+ });
+ if (previousModule != false) {
+ previousModule.hide();
+ }
+ }
+ else {
+ $('#permissions > tbody > tr').show();
+ }
+ })
+ );
+};
Index: modules/user/user.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.js,v
retrieving revision 1.6
diff -u -p -r1.6 user.js
--- modules/user/user.js 12 Sep 2007 18:29:32 -0000 1.6
+++ modules/user/user.js 2 Mar 2008 22:57:17 -0000
@@ -174,15 +174,3 @@ Drupal.setDefaultTimezone = function() {
var offset = new Date().getTimezoneOffset() * -60;
$("#edit-date-default-timezone, #edit-user-register-timezone").val(offset);
};
-
-/**
- * On the admin/user/settings page, conditionally show all of the
- * picture-related form elements depending on the current value of the
- * "Picture support" radio buttons.
- */
-Drupal.behaviors.userSettings = function (context) {
- $('div.user-admin-picture-radios input[type=radio]:not(.userSettings-processed)', context).addClass('userSettings-processed').click(function () {
- $('div.user-admin-picture-settings', context)[['hide', 'show'][this.value]]();
- });
-};
-