Add jquery and jquery-colorbox to Composer

- Fix selector syntax issue with newer version of JQuery
This commit is contained in:
Hypolite Petovan 2018-01-16 23:58:14 -05:00
parent 7eb637c6ea
commit 61238d5e23
3 changed files with 123 additions and 2 deletions

View file

@ -25,7 +25,9 @@
"smarty/smarty": "^3.1",
"michelf/php-markdown": "^1.7",
"fxp/composer-asset-plugin": "~1.3",
"bower-asset/base64": "^1.0"
"bower-asset/base64": "^1.0",
"npm-asset/jquery": "^2.2",
"npm-asset/jquery-colorbox": "^1.6"
},
"repositories": [
{

119
composer.lock generated
View file

@ -5,6 +5,7 @@
"This file is @generated automatically"
],
"content-hash": "fcf1ea05c07796ccf5ef2c437e6acffd",
"content-hash": "eff7188edca155144e5ce162208634df",
"packages": [
{
"name": "bower-asset/base64",
@ -347,6 +348,124 @@
],
"time": "2017-12-18T10:38:51+00:00"
},
{
"name": "npm-asset/jquery",
"version": "2.2.4",
"dist": {
"type": "tar",
"url": "https://registry.npmjs.org/jquery/-/jquery-2.2.4.tgz",
"reference": null,
"shasum": "2c89d6889b5eac522a7eea32c14521559c6cbf02"
},
"require-dev": {
"npm-asset/commitplease": "2.0.0",
"npm-asset/core-js": "0.9.17",
"npm-asset/grunt": "0.4.5",
"npm-asset/grunt-babel": "5.0.1",
"npm-asset/grunt-cli": "0.1.13",
"npm-asset/grunt-compare-size": "0.4.0",
"npm-asset/grunt-contrib-jshint": "0.11.2",
"npm-asset/grunt-contrib-uglify": "0.9.2",
"npm-asset/grunt-contrib-watch": "0.6.1",
"npm-asset/grunt-git-authors": "2.0.1",
"npm-asset/grunt-jscs": "2.1.0",
"npm-asset/grunt-jsonlint": "1.0.4",
"npm-asset/grunt-npmcopy": "0.1.0",
"npm-asset/gzip-js": "0.3.2",
"npm-asset/jsdom": "5.6.1",
"npm-asset/load-grunt-tasks": "1.0.0",
"npm-asset/qunit-assert-step": "1.0.3",
"npm-asset/qunitjs": "1.17.1",
"npm-asset/requirejs": "2.1.17",
"npm-asset/sinon": "1.10.3",
"npm-asset/sizzle": "2.2.1",
"npm-asset/strip-json-comments": "1.0.3",
"npm-asset/testswarm": "1.1.0",
"npm-asset/win-spawn": "2.0.0"
},
"type": "npm-asset-library",
"extra": {
"npm-asset-bugs": {
"url": "https://github.com/jquery/jquery/issues"
},
"npm-asset-main": "dist/jquery.js",
"npm-asset-directories": [],
"npm-asset-repository": {
"type": "git",
"url": "git+https://github.com/jquery/jquery.git"
},
"npm-asset-scripts": {
"build": "npm install && grunt",
"start": "grunt watch",
"test": "grunt && grunt test"
}
},
"license": [
"MIT"
],
"authors": [
{
"name": "jQuery Foundation and other contributors",
"url": "https://github.com/jquery/jquery/blob/2.2.4/AUTHORS.txt"
}
],
"description": "JavaScript library for DOM operations",
"homepage": "http://jquery.com",
"keywords": [
"browser",
"javascript",
"jquery",
"library"
],
"time": "2016-05-20T17:26:07+00:00"
},
{
"name": "npm-asset/jquery-colorbox",
"version": "1.6.4",
"dist": {
"type": "tar",
"url": "https://registry.npmjs.org/jquery-colorbox/-/jquery-colorbox-1.6.4.tgz",
"reference": null,
"shasum": "799452523a6c494839224ef702e807deb9c06cc5"
},
"require": {
"npm-asset/jquery": ">=1.3.2"
},
"type": "npm-asset-library",
"extra": {
"npm-asset-bugs": {
"url": "https://github.com/jackmoore/colorbox/issues"
},
"npm-asset-main": "jquery.colorbox.js",
"npm-asset-directories": [],
"npm-asset-repository": {
"type": "git",
"url": "git+ssh://git@github.com/jackmoore/colorbox.git"
},
"npm-asset-scripts": []
},
"license": [
"MIT"
],
"authors": [
{
"name": "Jack Moore",
"email": "hello@jacklmoore.com",
"url": "http://www.jacklmoore.com"
}
],
"description": "jQuery lightbox and modal window plugin.",
"homepage": "http://www.jacklmoore.com/colorbox",
"keywords": [
"gallery",
"jquery-plugin",
"lightbox",
"modal",
"popup",
"ui"
],
"time": "2016-05-10T22:22:39+00:00"
},
{
"name": "paragonie/random_compat",
"version": "v2.0.11",

View file

@ -133,7 +133,7 @@
last_popup_button = null;
}
}
$('a[rel^=#]').click(function(e){
$('a[rel^="#"]').click(function(e){
e.preventDefault();
var parent = $(this).parent();
var isSelected = (last_popup_button && parent.attr('id') == last_popup_button.attr('id'));