Skip to content

Instantly share code, notes, and snippets.

View junaidpv's full-sized avatar

Junaid P V junaidpv

View GitHub Profile
@junaidpv
junaidpv / set-ui-dialog-top-to-pm-add-content-dialog.patch
Created September 5, 2016 15:02
Set jQyery UI dialog to show above to page manager add content dialog.
diff --git a/css/panopoly-jquery-ui-theme.css b/css/panopoly-jquery-ui-theme.css
index ffcfc73..f57befb 100644
--- a/css/panopoly-jquery-ui-theme.css
+++ b/css/panopoly-jquery-ui-theme.css
@@ -52,7 +52,7 @@
}
.ui-front {
- z-index: 100;
+ z-index: 1010;
@junaidpv
junaidpv / panopoly-1.40-make-patch.patch
Created December 6, 2016 19:13
Patch panopoly profile to get patch from panopoly_search module.
diff --git a/drupal-org.make b/drupal-org.make
index 2606965..ba57a88 100644
--- a/drupal-org.make
+++ b/drupal-org.make
@@ -34,6 +34,7 @@ projects[panopoly_wysiwyg][subdir] = panopoly
projects[panopoly_search][version] = 1.40
projects[panopoly_search][subdir] = panopoly
+projects[panopoly_search][patch][] = "https://www.drupal.org/files/issues/solrphpclient_cannot_be-2790595-10.patch"
@junaidpv
junaidpv / panopoly-1.40-make-patch-for-panopoly-core.patch
Created December 7, 2016 07:23
Patch panopoly make file to apply patch on panopoly core
diff --git a/drupal-org.make b/drupal-org.make
index 2606965..7c28130 100644
--- a/drupal-org.make
+++ b/drupal-org.make
@@ -5,6 +5,9 @@ core = 7.x
projects[panopoly_core][version] = 1.40
projects[panopoly_core][subdir] = panopoly
+; Patch panopoly_core module to bring Media Browser popup on top of Page Manager
+; Add Content dialog.
@junaidpv
junaidpv / media-widget-conflict-fix.patch
Created January 10, 2017 13:36
Patch to allow media item widget to be used with these templates.
diff --git a/plugins/widgetbootstrap/plugin.js b/plugins/widgetbootstrap/plugin.js
index e670302..bffe1d5 100755
--- a/plugins/widgetbootstrap/plugin.js
+++ b/plugins/widgetbootstrap/plugin.js
@@ -49,12 +49,10 @@ CKEDITOR.plugins.add( 'widgetbootstrap', {
editables: {
col1: {
- selector: '.col-sidebar',
- allowedContent: allowedWidget
@junaidpv
junaidpv / file-entity-not-print-h2-tag.patch
Created January 17, 2017 15:32
Patch for file_entity module to remove printing h2 tag. We hope this patch can be removed once https://www.drupal.org/node/1245266 is completely resolved.
diff --git a/file_entity.tpl.php b/file_entity.tpl.php
index cc12db7..6a308f8 100644
--- a/file_entity.tpl.php
+++ b/file_entity.tpl.php
@@ -69,13 +69,6 @@
*/
?>
<div id="<?php print $id; ?>" class="<?php print $classes ?>"<?php print $attributes; ?>>
-
- <?php print render($title_prefix); ?>
@junaidpv
junaidpv / rpp-slishows.patch
Created March 14, 2018 19:39
Patch for views_slideshow module to support slideshows within RPP enabled panes.
diff --git a/contrib/views_slideshow_cycle/js/rpp-slideshows.js b/contrib/views_slideshow_cycle/js/rpp-slideshows.js
new file mode 100644
index 0000000..513a816
--- /dev/null
+++ b/contrib/views_slideshow_cycle/js/rpp-slideshows.js
@@ -0,0 +1,20 @@
+(function ($) {
+ // Update the window dimensions on each resize.
+ $(window).on("resize", function () {
+ Drupal.behaviors.views_slideshow_test.onResize();
@junaidpv
junaidpv / custom_breadcrumbs-translated-breadcrumb-with-tokens.patch
Last active August 31, 2018 01:37
Custom patch/hack for custom_breadcrumbs module, so that configuration from "Custom breadcrumb for Panel Page" will copy to panel variant configuration while the page being rendered. It helps to translate breadcrumbs in panel pages.
diff --git a/custom_breadcrumbs_panels/custom_breadcrumbs_panels.module b/custom_breadcrumbs_panels/custom_breadcrumbs_panels.module
index d1e4465..c3a677e 100644
--- a/custom_breadcrumbs_panels/custom_breadcrumbs_panels.module
+++ b/custom_breadcrumbs_panels/custom_breadcrumbs_panels.module
@@ -98,10 +98,24 @@ function custom_breadcrumbs_panels_node_view($node, $build_mode) {
}
}
+/**
+ * Implements hook_module_implements_alter().
@junaidpv
junaidpv / font-awesome.css.patch
Last active September 5, 2018 19:18
Patch for fontawesome library to fix "Text is invisible while webfonts are loading" issue in Lighthouse report.
diff --git a/css/font-awesome.css b/css/font-awesome.css
index ee906a8..6f4596b 100644
--- a/css/font-awesome.css
+++ b/css/font-awesome.css
@@ -10,6 +10,7 @@
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
+ font-display: swap;
}
@junaidpv
junaidpv / advagg-relocate-add_font-display_swap.patch
Created September 5, 2018 08:48
Patch for advagg_reocate module to fix "Text is invisible while webfonts are loading" issue in Lighthouse report for Google webfonts.
diff --git a/advagg_relocate/advagg_relocate.advagg.inc b/advagg_relocate/advagg_relocate.advagg.inc
index 37ee2b7..c80c34a 100644
--- a/advagg_relocate/advagg_relocate.advagg.inc
+++ b/advagg_relocate/advagg_relocate.advagg.inc
@@ -315,6 +315,7 @@ function advagg_relocate_font_face_parser(array $font_faces) {
foreach ($font_faces as $values => $src) {
$output = '';
$output .= str_replace('; ', ";\n", $values);
+ $output .= "font-display: swap;\n";
if (isset($src['eot'])) {
@junaidpv
junaidpv / lazyloader-fire_event_on_loading.patch
Last active September 19, 2018 05:23
Patch for lazyloader module. To fire event when images are loaded by echo. It will help other modules and themes to act as needed.
diff --git a/lazyloader.js b/lazyloader.js
index f9dfaec..cebc553 100644
--- a/lazyloader.js
+++ b/lazyloader.js
@@ -38,6 +38,7 @@
callback: function (element, op) {
// Remove the loader icon when the image is loaded.
$(element).next('.lazyloader-icon').remove();
+ $( document ).trigger( 'lazyloader-echo-callback', [element, op] );
}