Commit c32cdf19 by Manzar Hussain

add new modules

parent b3cdb653
# jQuery UI Touch Punch
Drupal 8 includes jQuery UI in core, however it is no longer actively
maintained and has been marked deprecated. This module provides the
jQuery UI Touch Punch library for any themes and modules that require it.
- jQuery UI [Touch Punch documentation](http://touchpunch.furf.com/)
- jQuery UI [Touch Punch API
documentation](https://github.com/furf/jquery-ui-touch-punch)
**Caution**: jQuery UI was deprecated from core because it is no longer
actively maintained, and has been marked “End of Life” by the OpenJS
Foundation. It is not recommended to depend on jQuery UI in your own
code, and instead to select a replacement solution as soon as possible.
## Instructions
1. Download this module and the jQuery UI module.
2. [Download Jquery Touch Punch](https://github.com/furf/jquery-ui-touch-punch) library and place it in the libraries folder (<drupal root>/libraries). You need the full library which is easily available from the Github repo (the full path to the required js file should be: <drupal root>/libraries/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js).
3. Install module the [usual way](https://www.drupal.org/documentation/install/modules-themes/modules-8).
4. Change any references in your theme or module from
`core/jquery.ui.touch-punch` to `jquery_ui_touch_punch/touch-punch`
### Requirements
- [jQuery UI](https://www.drupal.org/project/jquery_ui)
### Related modules
- [jQuery UI Accordion](https://www.drupal.org/project/jquery_ui_accordion)
- [jQuery UI Button](https://www.drupal.org/project/jquery_ui_button)
- [jQuery UI Checkboxradio](https://www.drupal.org/project/jquery_ui_checkboxradio)
- [jQuery UI Controlgroup](https://www.drupal.org/project/jquery_ui_controlgroup)
- [jQuery UI Draggable](https://www.drupal.org/project/jquery_ui_draggable)
- [jQuery UI Droppable](https://www.drupal.org/project/jquery_ui_droppable)
- [jQuery UI Effects](https://www.drupal.org/project/jquery_ui_effects)
- [jQuery UI Menu](https://www.drupal.org/project/jquery_ui_menu)
- [jQuery UI Progressbar](https://www.drupal.org/project/jquery_ui_progressbar)
- [jQuery UI Selectable](https://www.drupal.org/project/jquery_ui_selectable)
- [jQuery UI Selectmenu](https://www.drupal.org/project/jquery_ui_selectmenu)
- [jQuery UI Slider](https://www.drupal.org/project/jquery_ui_slider)
- [jQuery UI Spinner](https://www.drupal.org/project/jquery_ui_spinner)
- [jQuery UI DatePicker](https://www.drupal.org/project/jquery_ui_datepicker)
{
"name": "drupal/jquery_ui_touch_punch",
"description": "Provides jQuery UI Touch Punch library.",
"type": "drupal-module",
"homepage": "https://www.drupal.org/project/jquery_ui_touch_punch",
"keywords": ["Drupal", "jquery_ui_touch_punch"],
"license": "GPL-2.0+",
"minimum-stability": "dev",
"prefer-stable": true,
"support": {
"issues": "https://www.drupal.org/project/issues/jquery_ui_touch_punch",
"irc": "irc://irc.freenode.org/drupal-contribute",
"source": "https://www.drupal.org/project/jquery_ui_touch_punch"
},
"authors": [
{
"name": "Naveen Valecha",
"homepage": "https://drupal.org/u/naveenvalecha",
"role": "Maintainer"
}
],
"require": {
"drupal/jquery_ui": "^1.0"
},
"suggest": {
"furf/jquery-ui-touch-punch": "Required to use drupal/jquery_ui_touch_punch module."
}
}
name: jQuery UI Touch Punch
type: module
description: 'Provides jQuery UI Touch Punch library.'
package: jQuery UI
core_version_requirement: ^8 || ^9
dependencies:
- jquery_ui:jquery_ui
# Information added by Drupal.org packaging script on 2020-06-11
version: '1.0.0'
project: 'jquery_ui_touch_punch'
datestamp: 1591893294
<?php
/**
* @file
* Install, update and uninstall functions for the jquery_ui_touch_punch module.
*/
/**
* Implements hook_requirements().
*/
function jquery_ui_touch_punch_requirements($phase) {
$requirements = [];
// @todo Remove this conditional structure in favor of using the libraries
// directory file finder service when Drupal 8.9 is the minimum supported
// version of core.
if (\Drupal::hasService('library.libraries_directory_file_finder')) {
/** @var \Drupal\Core\Asset\LibrariesDirectoryFileFinder $library_file_finder */
$library_file_finder = \Drupal::service('library.libraries_directory_file_finder');
$library_found = (bool) $library_file_finder->find('jquery-ui-touch-punch/jquery.ui.touch-punch.min.js');
}
else {
$path = DRUPAL_ROOT . '/libraries/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js';
if (\Drupal::moduleHandler()->moduleExists('libraries')) {
$path = libraries_get_path('jquery-ui-touch-punch') . '/jquery.ui.touch-punch.min.js';
}
// Is the library found in the root libraries path.
$library_found = file_exists($path);
// If library is not found, then look in the current profile libraries path.
if (!$library_found) {
$profile_path = drupal_get_path('profile', \Drupal::installProfile());
$profile_path .= '/libraries/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js';
// Is the library found in the current profile libraries path.
$library_found = file_exists($profile_path);
}
}
if (!$library_found) {
$requirements['jquery_ui_touch_punch_library'] = [
'title' => t('jQuery UI Touch Punch library missing'),
'description' => t('jQuery UI Touch Punch requires the jquery.ui.touch-punch.min.js library.
Download it (https://github.com/furf/jquery-ui-touch-punch) and place it in the
libraries folder (/libraries)'),
'severity' => REQUIREMENT_ERROR,
];
}
return $requirements;
}
touch-punch:
title: 'jQuery Touch Punch'
website: https://github.com/furf/jquery-ui-touch-punch
version: 0.0
js:
/libraries/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js: { minified: true }
dependencies:
- jquery_ui/core
<?php
/**
* @file
* Contains jquery_ui_touch_punch.module.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function jquery_ui_touch_punch_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.jquery_ui_touch_punch':
$output = '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Drupal 8 includes jQuery UI in core, however it is no longer actively maintained and has been marked deprecated. This module provides the jQuery UI Touch Punch library for any themes and modules that require it.') . '</p>';
$output .= '<p>' . t('For more information about the deprecation of jQuery UI, see this <a href=":change-record">change record</a>', [':change-record' => 'https://www.drupal.org/node/3067969']) . '</p>';
$output .= '<p>' . t('Visit the <a href=":project_link">jQuery UI Touch Punch project page</a> on Drupal.org for more information on this module.', [':project_link' => 'https://www.drupal.org/project/jquery_ui_touch_punch']) . '</p>';
return $output;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment