12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- (function ($) {
-
- function devel_node_access_user_ajax(context, settings) {
-
- var cell = $('td.dna-permission', context)
- .not('.ajax-processed', context)
- .attr('id');
- if (cell !== undefined) {
-
-
- var url = settings.basePath
- + "?q="
- + 'devel/node_access/by_user/json/'
- + cell
- + '/'
- + Math.floor((1000000000 * Math.random())).toString(16);
-
- $.getJSON(url, function(data) {
- $('#' + cell, context).html(data).addClass('ajax-processed');
-
- devel_node_access_user_ajax(context, settings);
- });
-
-
- setTimeout(
- function() {
- if ($('#' + cell, context).hasClass('ajax-processed') == false) {
- $('#' + cell, context)
- .html(
- '<span class="error">'
- + '<a href="' + url.replace('/json/', '/html/') + '">'
- + Drupal.t('Error: could not explain access')
- + '</a>'
- + '</span>'
- )
- .addClass('ajax-processed');
-
- devel_node_access_user_ajax(context, settings);
- }
- },
- 3000
- );
- }
- }
-
- Drupal.behaviors.develNodeAccessUserAjax = {
- attach: function(context, settings) {
-
- devel_node_access_user_ajax(context, settings);
- }
- };
- })(jQuery);
|