This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Drush commands for quickly enabling & disabling modules based on | |
* nothing environment. This only includes modules and features but not themes. | |
* | |
* About the environment variable: | |
* When multiple versions of the site are used each defines its own environment to allow enabling or disabling specific | |
* modules. We define the environments variable in the site's configuration file settings.php (Drupal settings). | |
* It is also useful to have conditionals in your settings based on environment. | |
* Here's an example with development, staging and production environments: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* id is the id tag of <input/> element | |
type is the type you want to change it to. | |
jQuery is required and assumed to be the jQuery variable */ | |
function changeType(id, type) { | |
var x = jQuery("#"+id); | |
if(x.attr('type') == type) | |
return x; //That was easy. | |
try { | |
return x.attr('type', type); //Stupid IE security will not allow this | |
} catch(e) { |