first import

This commit is contained in:
Bachir Soussi Chiadmi
2015-04-08 11:40:19 +02:00
commit 1bc61b12ad
8435 changed files with 1582817 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
name = Administration Development tools
description = Administration and debugging functionality for developers and site builders.
package = Administration
core = 7.x
scripts[] = admin_devel.js
; Information added by drupal.org packaging script on 2013-01-31
version = "7.x-3.0-rc4"
core = "7.x"
project = "admin_menu"
datestamp = "1359651687"

View File

@@ -0,0 +1,40 @@
(function($) {
/**
* jQuery debugging helper.
*
* Invented for Dreditor.
*
* @usage
* $.debug(var [, name]);
* $variable.debug( [name] );
*/
jQuery.extend({
debug: function () {
// Setup debug storage in global window. We want to look into it.
window.debug = window.debug || [];
args = jQuery.makeArray(arguments);
// Determine data source; this is an object for $variable.debug().
// Also determine the identifier to store data with.
if (typeof this == 'object') {
var name = (args.length ? args[0] : window.debug.length);
var data = this;
}
else {
var name = (args.length > 1 ? args.pop() : window.debug.length);
var data = args[0];
}
// Store data.
window.debug[name] = data;
// Dump data into Firebug console.
if (typeof console != 'undefined') {
console.log(name, data);
}
return this;
}
});
// @todo Is this the right way?
jQuery.fn.debug = jQuery.debug;
})(jQuery);

View File

@@ -0,0 +1,33 @@
<?php
/**
* @file
* Administration and debugging functionality for developers and site builders.
*/
/**
* Implements hook_form_FORMID_alter().
*/
function admin_devel_form_admin_menu_theme_settings_alter(&$form, &$form_state) {
$form['actions']['wipe_rebuild'] = array(
'#type' => 'submit',
'#value' => t('Rebuild system links'),
'#submit' => array('admin_devel_form_admin_menu_theme_settings_alter_rebuild_submit'),
// @todo Not necessarily ready for mass-consumption yet.
'#access' => FALSE,
);
}
/**
* Form submit handler to wipe and rebuild all 'module' = 'system' menu links.
*/
function admin_devel_form_admin_menu_theme_settings_alter_rebuild_submit($form, &$form_state) {
// Delete all auto-generated menu links derived from menu router items.
db_delete('menu_links')
->condition('module', 'system')
->execute();
// Rebuild menu links from current menu router items.
menu_rebuild();
drupal_set_message(t('System links derived from menu router paths have been rebuilt.'));
}