Skip to content

Instantly share code, notes, and snippets.

View piyuesh23's full-sized avatar

Piyuesh Kumar piyuesh23

View GitHub Profile
@piyuesh23
piyuesh23 / fetch_list_modules.js
Last active April 24, 2020 05:15
Fetch list of enabled modules with version number from module list page
var modules=[];
jQuery('fieldset').each(function() {
var package = jQuery(this).find('legend').text().replace('Hide ', '');
jQuery(this).find('tr').each(function() {
module_machine_identifier = jQuery(this).find('input[type="checkbox"]').attr('id');
if (module_machine_identifier) {
module_machine_name = module_machine_identifier.replace('edit-modules-' , '').replace(package.toLowerCase() + '-', '').replace('-enable', '').replace('-disable', '');
module_status = 'disabled';
if (jQuery(this).find('td.checkbox input').prop('checked') == true) {
module_status = 'enabled';
@piyuesh23
piyuesh23 / fetch_fied_details.js
Created April 16, 2020 07:24
Fetch list of all fields on a node/edit form
var fields = [];
jQuery('div[class^="field-type"]').each(function() {
var type = jQuery(this).attr('class').split(' ')[0].replace('field-type-', '');
if (jQuery(this).find('legend').text()) {
fields.push(jQuery(this).find('legend').text() + ',' + type);
}
else {
fields.push(jQuery(this).find('label').text() + ',' + type);
}
});
{
"name":"layout_onecol",
"id":"dummy-layout-demo",
"type":"layout",
"orientation":"vertical",
"children":[
{
"data":{
"images":[
{
diff -uprb a/wysiwyg.module b/wysiwyg.module
--- wysiwyg.module 2012-09-29 06:22:42.000000000 +0530
+++ wysiwyg.module 2015-01-14 12:46:30.000000000 +0530
@@ -348,7 +348,7 @@ function wysiwyg_load_editor($profile) {
drupal_add_js($init, array('type' => 'inline') + $default_library_options);
}
else {
- drupal_add_js(file_create_url($uri), $default_library_options);
+ drupal_add_js($uri, $default_library_options);
}
diff -uprb a/plugins/tasks/pm_existing_pages.inc b/plugins/tasks/pm_existing_pages.inc
--- plugins/tasks/pm_existing_pages.inc 2012-05-19 21:33:36.000000000 +0530
+++ plugins/tasks/pm_existing_pages.inc 2015-01-14 12:38:38.000000000 +0530
@@ -238,7 +238,6 @@ function _pm_existing_pages_get_context(
* A collection of arguments we need for CTools.
*/
function _pm_existing_pages_get_context_arguments($menu_args, $pm_args, $task_id) {
-
// If no menu arguments, we can skip.
if (empty($menu_args)) {
diff -uprb a/node_revision_restrict.install b/node_revision_restrict.install
--- node_revision_restrict.install 2014-04-16 12:15:18.000000000 +0530
+++ node_revision_restrict.install 2015-01-22 14:45:48.000000000 +0530
@@ -10,8 +10,8 @@
* Implements hook_install().
*/
function node_revision_restrict_uninstall() {
- $content_types = node_type_get_types();
- foreach ($content_types as $content_type_name) {
- variable_del('restrict_node_revision_number_for_' . $content_type_name->type);
diff -uprb a/hybridauth.pages.inc b/hybridauth.pages.inc
--- hybridauth.pages.inc 2013-10-25 00:59:12.000000000 +0530
+++ hybridauth.pages.inc 2015-01-14 12:46:44.000000000 +0530
@@ -6,7 +6,7 @@
function hybridauth_endpoint() {
// Make sure the session is started, HybridAuth library needs it.
- drupal_session_start();
+ hybridauth_session_start();
diff -uprb a/global_filter.module b/global_filter.module
--- global_filter.module 2013-06-06 10:08:20.000000000 +0530
+++ global_filter.module 2015-01-14 12:37:28.000000000 +0530
@@ -49,6 +49,14 @@ function global_filter_init() {
global_filter_clear_filters($filter_names);
return;
}
+
+ //patched by alin .. this is related to field collection, field_collection_remove_js
+ if($_GET['q'] == 'field_collection/ajax') {
diff -uprb a/entityreference.module b/entityreference.module
--- entityreference.module 2012-11-18 14:54:22.000000000 +0530
+++ entityreference.module 2015-01-14 12:42:16.000000000 +0530
@@ -773,6 +773,11 @@ function entityreference_options_list($f
$return = array();
foreach ($options as $bundle => $entity_ids) {
$bundle_label = check_plain($entity_info['bundles'][$bundle]['label']);
+ // We need to return unsanitized labels but getReferencableEntities()
+ // has already encoded them, so we decode them again.
+ foreach ($entity_ids as $id => $label) {
Only in /Users/piyuesh23/htdocs/acquia/opera/sites/all/modules/user/entity_email/: entity_email.admin.inc.patch
Only in /Users/piyuesh23/htdocs/acquia/opera/sites/all/modules/user/entity_email/: entity_email.entity_email_type.inc.patch
diff -uprb a/entity_email.info b/entity_email.info
--- entity_email.info 2013-11-04 17:21:33.000000000 +0530
+++ entity_email.info 2015-01-14 12:46:34.000000000 +0530
@@ -2,6 +2,8 @@ name = Entity Email
description = Entity Email.
dependencies[] = entity_token
dependencies[] = entity
+dependencies[] = entity_translation