From 42eaaa0d040818006688fddd80574eb3c176f7af Mon Sep 17 00:00:00 2001 From: vsn4ik Date: Sun, 18 Jan 2015 01:21:05 +0300 Subject: [PATCH] Update badges and some devDeps. --- Gruntfile.js | 16 ++++++---------- README.md | 5 ++--- js/bootstrap-select.js | 10 ++++------ package.json | 15 ++++++--------- 4 files changed, 18 insertions(+), 28 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 1e8b9eed1..c505cf7c6 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -77,10 +77,6 @@ module.exports = function (grunt) { } }, - //qunit: { - // files: ['test/**/*.html'] - //}, - less: { options: { strictMath: true, @@ -98,7 +94,6 @@ module.exports = function (grunt) { usebanner: { css: { options: { - position: 'top', banner: '<%= banner %>' }, src: '<%= less.css.dest %>' @@ -109,7 +104,7 @@ module.exports = function (grunt) { options: { compatibility: 'ie8', keepSpecialComments: '*', - noAdvanced: true + advanced: false }, css: { src: '<%= less.css.dest %>', @@ -146,8 +141,7 @@ module.exports = function (grunt) { sed: { versionNumber: { path: [ - 'less', - 'js', + 'js/<%= pkg.name %>.js', 'bower.json', 'composer.json', 'package.json' @@ -192,7 +186,7 @@ module.exports = function (grunt) { { expand: true, cwd: 'dist/', - src: ['**'], + src: '**', dest: 'bootstrap-select-<%= pkg.version %>/' }, { src: ['bower.json', 'composer.json', 'package.json'], @@ -219,7 +213,9 @@ module.exports = function (grunt) { }); // These plugins provide necessary tasks. - require('load-grunt-tasks')(grunt); + require('load-grunt-tasks')(grunt, { + scope: 'devDependencies' + }); // Version numbering task. // grunt change-version-number --old=A.B.C --new=X.Y.Z diff --git a/README.md b/README.md index 44ceb743e..ec9b59949 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,9 @@ bootstrap-select ================ -[![Latest release](http://img.shields.io/github/release/silviomoreto/bootstrap-select.svg)](https://github.com/silviomoreto/bootstrap-select/releases/latest) +[![Latest release](https://img.shields.io/github/release/silviomoreto/bootstrap-select.svg?style=flat)](https://github.com/silviomoreto/bootstrap-select/releases/latest) +[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE) [![Dependency Status](https://david-dm.org/silviomoreto/bootstrap-select.svg)](https://david-dm.org/silviomoreto/bootstrap-select) -[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE) - [![devDependency Status](https://david-dm.org/silviomoreto/bootstrap-select/dev-status.svg)](https://david-dm.org/silviomoreto/bootstrap-select#info=devDependencies) A custom select / multiselect for Bootstrap using button dropdown, designed to behave like regular Bootstrap selects. diff --git a/js/bootstrap-select.js b/js/bootstrap-select.js index 3d13c72d7..8bc03f2b1 100644 --- a/js/bootstrap-select.js +++ b/js/bootstrap-select.js @@ -113,12 +113,10 @@ return (numSelected == 1) ? "{0} item selected" : "{0} items selected"; }, maxOptionsText: function (numAll, numGroup) { - var arr = []; - - arr[0] = (numAll == 1) ? 'Limit reached ({n} item max)' : 'Limit reached ({n} items max)'; - arr[1] = (numGroup == 1) ? 'Group limit reached ({n} item max)' : 'Group limit reached ({n} items max)'; - - return arr; + return [ + (numAll == 1) ? 'Limit reached ({n} item max)' : 'Limit reached ({n} items max)', + (numGroup == 1) ? 'Group limit reached ({n} item max)' : 'Group limit reached ({n} items max)' + ]; }, selectAllText: 'Select All', deselectAllText: 'Deselect All', diff --git a/package.json b/package.json index 3573f4449..d06cc6fc5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bootstrap-select", "title": "bootstrap-select", - "filename": "bootstrap-select.js", + "main": "dist/js/bootstrap-select.js", "description": "A custom