? .DS_Store
? .patch
? incremental_filter_access_control-229193-53.patch
? incremental_filter_access_control-229193-55.patch
Index: modules/user/user.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.admin.inc,v
retrieving revision 1.37
diff -u -p -r1.37 user.admin.inc
--- modules/user/user.admin.inc 3 Feb 2009 18:55:32 -0000 1.37
+++ modules/user/user.admin.inc 17 Feb 2009 01:15:25 -0000
@@ -480,7 +480,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.
@@ -542,7 +542,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');
// Retrieve role names for columns.
$role_names = user_roles();
if (is_numeric($rid)) {
@@ -559,6 +559,7 @@ function user_admin_perm($form_state, $r
// Render role/permission overview:
$options = array();
$hide_descriptions = !system_admin_compact_mode();
+ $index = 0;
foreach (module_implements('perm') as $module) {
if ($permissions = module_invoke($module, 'perm')) {
$info = drupal_parse_info_file(drupal_get_path('module', $module) . "/$module.info");
@@ -571,6 +572,8 @@ function user_admin_perm($form_state, $r
'#type' => 'item',
'#markup' => $perm_item['title'],
'#description' => $hide_descriptions ? $perm_item['description'] : NULL,
+ '#post_render' => array('user_admin_perm_post_render'),
+ '#index' => $index++,
);
foreach ($role_names as $rid => $name) {
// Builds arrays for checked boxes for each role
@@ -593,6 +596,15 @@ function user_admin_perm($form_state, $r
}
/**
+ * Add the JavaScript to the page necessary to make the user permission page work.
+ */
+function user_admin_perm_post_render($html, $form) {
+ $clean = trim(preg_replace('/\s+/', ' ', $html));
+ drupal_add_js(array('userPerm' => array($form['#index'] => array('stripped' => strtolower(strip_tags((string)$clean)), 'pieces' => preg_split('/(<[^>]+>)/', (string)$clean, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE)))), 'setting');
+ return $html;
+}
+
+/**
* Save permissions selected on the administer permissions page.
*
* @see user_admin_perm
@@ -633,6 +645,7 @@ function theme_user_admin_perm($form) {
$row[] = array(
'data' => drupal_render($form['permission'][$key]),
'class' => 'permission',
+ 'id' => 'permission-' . $form['permission'][$key]['#index'],
);
foreach (element_children($form['checkboxes']) as $rid) {
if (is_array($form['checkboxes'][$rid])) {
@@ -643,7 +656,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.css
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.css,v
retrieving revision 1.10
diff -u -p -r1.10 user.css
--- modules/user/user.css 9 Oct 2008 04:19:44 -0000 1.10
+++ modules/user/user.css 17 Feb 2009 01:15:25 -0000
@@ -9,6 +9,9 @@
#permissions tr.odd .form-item, #permissions tr.even .form-item {
white-space: normal;
}
+#permissions td span.highlight {
+ background-color: #ff6;
+}
#user-login-form {
text-align: center;
}
Index: modules/user/user.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.js,v
retrieving revision 1.9
diff -u -p -r1.9 user.js
--- modules/user/user.js 20 Nov 2008 06:56:17 -0000 1.9
+++ modules/user/user.js 17 Feb 2009 01:15:25 -0000
@@ -158,16 +158,3 @@ Drupal.evaluatePasswordStrength = functi
msg = translate.hasWeaknesses + "";
return { strength: strength, message: msg };
};
-
-/**
- * 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 = {
- attach: 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]]();
- });
- }
-};