Skip to content

Commit

Permalink
Merge 42ab5f9 into 563bc1d
Browse files Browse the repository at this point in the history
  • Loading branch information
JostCrow authored Sep 5, 2017
2 parents 563bc1d + 42ab5f9 commit fa78e0c
Show file tree
Hide file tree
Showing 14 changed files with 274 additions and 78 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Jorik Kraaikamp (https://github.com/JostCrow)
Piotr Gawron (https://github.com/piotr-gawron)
Sven van de Scheur (https://github.com/svenvandescheur)
1 change: 1 addition & 0 deletions build/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ module.exports = {
sassSource: appRoot + '**/*.scss',
tests: 'test/**/*.spec.js',
packageName: pkg.name,
doc: 'doc/',
output: distDir
};
2 changes: 1 addition & 1 deletion build/tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ gulp.task('build-sass', function() {
// Compiles sass to css
.pipe(sass({
// Allow importing from node_modules in .scss files
includePaths: 'node_modules/',
includePaths: 'node_modules/'
}).on('error', sass.logError))

// Auto prefixes css
Expand Down
2 changes: 1 addition & 1 deletion build/tasks/default.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var gulp = require('gulp');
var Server = require('karma').Server,Server = require('karma').Server;
var Server = require('karma').Server;
var paths = require('../paths');


Expand Down
22 changes: 22 additions & 0 deletions build/tasks/jsdoc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
var gulp = require('gulp');
var gulpJsdoc2md = require('gulp-jsdoc-to-markdown')
var rename = require('gulp-rename')
var paths = require('../paths');


/**
* doc task
* Run using "gulp jsdoc"
* Generates documentation files
*/
gulp.task('jsdoc', function() {
return gulp.src([paths.source])
.pipe(gulpJsdoc2md())

// Add .md extension
.pipe(rename(function (path) {
path.extname = '.md';
}))

.pipe(gulp.dest(paths.doc))
});
2 changes: 1 addition & 1 deletion dist/dual-listbox.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/dual-listbox.js

Large diffs are not rendered by default.

155 changes: 155 additions & 0 deletions doc/dual-listbox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
<a name="DualListbox"></a>

## DualListbox
Dual select interface allowing the user to select items from a list of provided options.

**Kind**: global class

* [DualListbox](#DualListbox)
* [.setDefaults()](#DualListbox+setDefaults)
* [.addSelected(listItem)](#DualListbox+addSelected)
* [.redraw()](#DualListbox+redraw)
* [.removeSelected(listItem)](#DualListbox+removeSelected)
* [.searchLists(searchString)](#DualListbox+searchLists)
* [.updateAvailableListbox()](#DualListbox+updateAvailableListbox)
* [.updateSelectedListbox()](#DualListbox+updateSelectedListbox)
* [._actionAllSelected()](#DualListbox+_actionAllSelected)
* [._updateListbox()](#DualListbox+_updateListbox)
* [._actionItemSelected()](#DualListbox+_actionItemSelected)
* [._actionAllDeselected()](#DualListbox+_actionAllDeselected)
* [._actionItemDeselected()](#DualListbox+_actionItemDeselected)
* [._actionItemDoubleClick()](#DualListbox+_actionItemDoubleClick)
* [._actionItemClick()](#DualListbox+_actionItemClick)
* [._addButtonActions()](#DualListbox+_addButtonActions)
* [._addClickActions(listItem)](#DualListbox+_addClickActions)
* [._createList()](#DualListbox+_createList)
* [._createButtons()](#DualListbox+_createButtons)

<a name="DualListbox+setDefaults"></a>

### dualListbox.setDefaults()
Sets the default values that can be overwritten.

**Kind**: instance method of <code>[DualListbox](#DualListbox)</code>
<a name="DualListbox+addSelected"></a>

### dualListbox.addSelected(listItem)
Add the listItem to the selected list.

**Kind**: instance method of <code>[DualListbox](#DualListbox)</code>

| Param | Type |
| --- | --- |
| listItem | <code>NodeElement</code> |

<a name="DualListbox+redraw"></a>

### dualListbox.redraw()
Redraws the Dual listbox content

**Kind**: instance method of <code>[DualListbox](#DualListbox)</code>
<a name="DualListbox+removeSelected"></a>

### dualListbox.removeSelected(listItem)
Removes the listItem from the selected list.

**Kind**: instance method of <code>[DualListbox](#DualListbox)</code>

| Param | Type |
| --- | --- |
| listItem | <code>NodeElement</code> |

<a name="DualListbox+searchLists"></a>

### dualListbox.searchLists(searchString)
Filters the listboxes with the given searchString.

**Kind**: instance method of <code>[DualListbox](#DualListbox)</code>

| Param | Type |
| --- | --- |
| searchString | <code>Object</code> |

<a name="DualListbox+updateAvailableListbox"></a>

### dualListbox.updateAvailableListbox()
Update the elements in the available listbox;

**Kind**: instance method of <code>[DualListbox](#DualListbox)</code>
<a name="DualListbox+updateSelectedListbox"></a>

### dualListbox.updateSelectedListbox()
Update the elements in the selected listbox;

**Kind**: instance method of <code>[DualListbox](#DualListbox)</code>
<a name="DualListbox+_actionAllSelected"></a>

### dualListbox._actionAllSelected()
Action to set all listItems to selected.

**Kind**: instance method of <code>[DualListbox](#DualListbox)</code>
<a name="DualListbox+_updateListbox"></a>

### dualListbox._updateListbox()
Update the elements in the listbox;

**Kind**: instance method of <code>[DualListbox](#DualListbox)</code>
<a name="DualListbox+_actionItemSelected"></a>

### dualListbox._actionItemSelected()
Action to set one listItem to selected.

**Kind**: instance method of <code>[DualListbox](#DualListbox)</code>
<a name="DualListbox+_actionAllDeselected"></a>

### dualListbox._actionAllDeselected()
Action to set all listItems to available.

**Kind**: instance method of <code>[DualListbox](#DualListbox)</code>
<a name="DualListbox+_actionItemDeselected"></a>

### dualListbox._actionItemDeselected()
Action to set one listItem to available.

**Kind**: instance method of <code>[DualListbox](#DualListbox)</code>
<a name="DualListbox+_actionItemDoubleClick"></a>

### dualListbox._actionItemDoubleClick()
Action when double clicked on a listItem.

**Kind**: instance method of <code>[DualListbox](#DualListbox)</code>
<a name="DualListbox+_actionItemClick"></a>

### dualListbox._actionItemClick()
Action when single clicked on a listItem.

**Kind**: instance method of <code>[DualListbox](#DualListbox)</code>
<a name="DualListbox+_addButtonActions"></a>

### dualListbox._addButtonActions()
Adds the actions to the buttons that are created.

**Kind**: instance method of <code>[DualListbox](#DualListbox)</code>
<a name="DualListbox+_addClickActions"></a>

### dualListbox._addClickActions(listItem)
Adds the click items to the listItem.

**Kind**: instance method of <code>[DualListbox](#DualListbox)</code>

| Param | Type |
| --- | --- |
| listItem | <code>Object</code> |

<a name="DualListbox+_createList"></a>

### dualListbox._createList()
Creates list with the header.

**Kind**: instance method of <code>[DualListbox](#DualListbox)</code>
<a name="DualListbox+_createButtons"></a>

### dualListbox._createButtons()
Creates the buttons to add/remove the selected item.

**Kind**: instance method of <code>[DualListbox](#DualListbox)</code>
9 changes: 5 additions & 4 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var clone= require('clone');
var clone = require('clone');
var paths = require('./build/paths');
var webpackConfig = clone(require('./webpack.config.js'));

Expand Down Expand Up @@ -118,15 +118,16 @@ module.exports = function(config) {
},
colors: true,
recordScreenshots: false,
reporters: (process.env.TRAVIS) ? ['spec', 'coverage', 'coveralls', 'saucelabs'] : ['spec', 'coverage', 'saucelabs'],

sauceLabs: {
testName: 'Dual listbox browser testing',
public: 'public'
},
customLaunchers: customLaunchers,
captureTimeout: 120000,
browsers: Object.keys(customLaunchers),
singleRun: true
singleRun: true,

browsers: (process.env.TRAVIS) ? Object.keys(customLaunchers) : ['Chrome', 'Firefox'],
reporters: (process.env.TRAVIS) ? ['spec', 'coverage', 'coveralls', 'saucelabs'] : ['spec', 'coverage', 'saucelabs']
});
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
"gulp-autoprefixer": "^3.1.0",
"gulp-babel": "^6.1.2",
"gulp-css-purge": "^1.0.27",
"gulp-jsdoc-to-markdown": "^1.2.2",
"gulp-jshint": "^2.0.0",
"gulp-minify-css": "^1.2.4",
"gulp-rename": "^1.2.2",
"gulp-sass": "^2.2.0",
"jasmine-core": "^2.4.1",
"jshint": "^2.9.2",
Expand Down
Loading

0 comments on commit fa78e0c

Please sign in to comment.