mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
N°7331 - Remove unnecessary files from node_modules
This commit is contained in:
26
node_modules/select/demo/contenteditable.html
generated
vendored
26
node_modules/select/demo/contenteditable.html
generated
vendored
@@ -1,26 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>contenteditable</title>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 1. Define some markup -->
|
||||
<button type="button">Select</button>
|
||||
<p contenteditable>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Distinctio totam adipisci, saepe ad vero dignissimos laborum non eum eveniet aperiam, consequuntur repellendus architecto inventore iusto blanditiis quasi commodi voluptatum vitae!</p>
|
||||
|
||||
<!-- 2. Include library -->
|
||||
<script src="../dist/select.js"></script>
|
||||
|
||||
<!-- 3. Select! -->
|
||||
<script>
|
||||
var p = document.querySelector('p');
|
||||
var button = document.querySelector('button');
|
||||
|
||||
button.addEventListener('click', function(e) {
|
||||
var selected = select(p);
|
||||
console.log(selected);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
30
node_modules/select/demo/dropdown.html
generated
vendored
30
node_modules/select/demo/dropdown.html
generated
vendored
@@ -1,30 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>dropdown</title>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 1. Define some markup -->
|
||||
<button type="button">Select</button>
|
||||
<select>
|
||||
<option>Option 1</option>
|
||||
<option selected>Option 2</option>
|
||||
<option>Option 3</option>
|
||||
</select>
|
||||
|
||||
<!-- 2. Include library -->
|
||||
<script src="../dist/select.js"></script>
|
||||
|
||||
<!-- 3. Select! -->
|
||||
<script>
|
||||
var dropdown = document.querySelector('select');
|
||||
var button = document.querySelector('button');
|
||||
|
||||
button.addEventListener('click', function(e) {
|
||||
var selected = select(dropdown);
|
||||
console.log(selected);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
26
node_modules/select/demo/editable.html
generated
vendored
26
node_modules/select/demo/editable.html
generated
vendored
@@ -1,26 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>editable</title>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 1. Define some markup -->
|
||||
<button type="button">Select</button>
|
||||
<input type="text" value="Lorem ipsum">
|
||||
|
||||
<!-- 2. Include library -->
|
||||
<script src="../dist/select.js"></script>
|
||||
|
||||
<!-- 3. Select! -->
|
||||
<script>
|
||||
var input = document.querySelector('input');
|
||||
var button = document.querySelector('button');
|
||||
|
||||
button.addEventListener('click', function(e) {
|
||||
var selected = select(input);
|
||||
console.log(selected);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
28
node_modules/select/demo/multiple.html
generated
vendored
28
node_modules/select/demo/multiple.html
generated
vendored
@@ -1,28 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>multiple</title>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 1. Define some markup -->
|
||||
<button type="button">Select</button>
|
||||
<input type="text" value="Lorem ipsum">
|
||||
<textarea>Lorem ipsum</textarea>
|
||||
|
||||
<!-- 2. Include library -->
|
||||
<script src="../dist/select.js"></script>
|
||||
|
||||
<!-- 3. Select! -->
|
||||
<script>
|
||||
var input = document.querySelector('input');
|
||||
var textarea = document.querySelector('textarea');
|
||||
var button = document.querySelector('button');
|
||||
|
||||
button.addEventListener('click', function(e) {
|
||||
console.log(select(input));
|
||||
console.log(select(textarea));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
34
node_modules/select/demo/nested.html
generated
vendored
34
node_modules/select/demo/nested.html
generated
vendored
@@ -1,34 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>non-editable</title>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 1. Define some markup -->
|
||||
<button type="button">Select</button>
|
||||
<div>
|
||||
<p>Item 1</p>
|
||||
<p>Item 2</p>
|
||||
<ul>
|
||||
<li>Item 3</li>
|
||||
<li>Item 4</li>
|
||||
<li>Item 5</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- 2. Include library -->
|
||||
<script src="../dist/select.js"></script>
|
||||
|
||||
<!-- 3. Select! -->
|
||||
<script>
|
||||
var div = document.querySelector('div');
|
||||
var button = document.querySelector('button');
|
||||
|
||||
button.addEventListener('click', function(e) {
|
||||
var selected = select(div);
|
||||
console.log(selected);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
26
node_modules/select/demo/non-editable.html
generated
vendored
26
node_modules/select/demo/non-editable.html
generated
vendored
@@ -1,26 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>non-editable</title>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 1. Define some markup -->
|
||||
<button type="button">Select</button>
|
||||
<p>Lorem ipsum</p>
|
||||
|
||||
<!-- 2. Include library -->
|
||||
<script src="../dist/select.js"></script>
|
||||
|
||||
<!-- 3. Select! -->
|
||||
<script>
|
||||
var p = document.querySelector('p');
|
||||
var button = document.querySelector('button');
|
||||
|
||||
button.addEventListener('click', function(e) {
|
||||
var selected = select(p);
|
||||
console.log(selected);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
93
node_modules/select/test/select.js
generated
vendored
93
node_modules/select/test/select.js
generated
vendored
@@ -1,93 +0,0 @@
|
||||
var select = require('../src/select');
|
||||
|
||||
describe('select editable elements', function() {
|
||||
before(function() {
|
||||
global.input = document.createElement('input');
|
||||
global.input.value = 'lorem ipsum';
|
||||
|
||||
global.textarea = document.createElement('textarea');
|
||||
global.textarea.value = 'lorem ipsum';
|
||||
|
||||
document.body.appendChild(global.input);
|
||||
document.body.appendChild(global.textarea);
|
||||
});
|
||||
|
||||
after(function() {
|
||||
document.body.innerHTML = '';
|
||||
});
|
||||
|
||||
it('should return the selected text on input', function() {
|
||||
var result = select(global.input);
|
||||
assert.equal(result, global.input.value);
|
||||
});
|
||||
|
||||
it('should return the selected text on textarea', function() {
|
||||
var result = select(global.textarea);
|
||||
assert.equal(result, global.textarea.value);
|
||||
});
|
||||
});
|
||||
|
||||
describe('select non-editable element with no children', function() {
|
||||
before(function() {
|
||||
global.paragraph = document.createElement('p');
|
||||
global.paragraph.textContent = 'lorem ipsum';
|
||||
|
||||
document.body.appendChild(global.paragraph);
|
||||
});
|
||||
|
||||
after(function() {
|
||||
document.body.innerHTML = '';
|
||||
});
|
||||
|
||||
it('should return the selected text', function() {
|
||||
var result = select(global.paragraph);
|
||||
assert.equal(result, global.paragraph.textContent);
|
||||
});
|
||||
});
|
||||
|
||||
describe('select non-editable element with child node', function() {
|
||||
before(function() {
|
||||
global.li = document.createElement('li');
|
||||
global.li.textContent = 'lorem ipsum';
|
||||
|
||||
global.ul = document.createElement('ul');
|
||||
global.ul.appendChild(global.li);
|
||||
|
||||
document.body.appendChild(global.ul);
|
||||
});
|
||||
|
||||
after(function() {
|
||||
document.body.innerHTML = '';
|
||||
});
|
||||
|
||||
it('should return the selected text', function() {
|
||||
var result = select(global.ul);
|
||||
assert.equal(result, global.ul.textContent);
|
||||
});
|
||||
});
|
||||
|
||||
describe('select non-editable svg element w/ multiple text children', function() {
|
||||
before(function() {
|
||||
global.text1 = document.createElement('text');
|
||||
global.text1.textContent = 'lorem ipsum';
|
||||
|
||||
global.text2 = document.createElement('text');
|
||||
global.text2.textContent = 'dolor zet';
|
||||
|
||||
global.svg = document.createElement('svg');
|
||||
global.svg.appendChild(global.text1);
|
||||
global.svg.appendChild(global.text2);
|
||||
|
||||
document.body.appendChild(global.svg);
|
||||
});
|
||||
|
||||
after(function() {
|
||||
document.body.innerHTML = '';
|
||||
});
|
||||
|
||||
it('should return the selected text', function() {
|
||||
var result = select(global.svg);
|
||||
assert.equal(result, global.text1.textContent +
|
||||
global.text2.textContent);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user