diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..b512c09d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/contextmenu.js b/bootstrap-contextmenu.js similarity index 97% rename from contextmenu.js rename to bootstrap-contextmenu.js index 6a2a6d6f..2ad70e7a 100644 --- a/contextmenu.js +++ b/bootstrap-contextmenu.js @@ -1,6 +1,6 @@ /*! * Bootstrap Context Menu - * Version: 2.0 + * Version: 0.2.0 * Author: @sydcanem * https://github.com/sydcanem/bootstrap-contextmenu * @@ -57,7 +57,7 @@ $menu.attr('style', '') .css(tp) .addClass('open') - .on('click.context.data-api', items, this.onItem.bind(this, $(e.currentTarget))) + .on('click.context.data-api', items, $.proxy(this.onItem, this, $(e.currentTarget))) .trigger('shown.bs.context', relatedTarget); // Delegating the `closemenu` only on the currently opened menu. diff --git a/bower.json b/bower.json index f101dfa4..a0d7cfc0 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "bootstrap-contextmenu", "main": "bootstrap-contextmenu.js", - "version": "1.0.0", + "version": "0.2.0", "homepage": "https://github.com/sydcanem/bootstrap-contextmenu", "authors": [ "sydcanem " diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 00000000..fd6c2249 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,7 @@ +var gulp = require('gulp'), + qunit = require('gulp-qunit'); + +gulp.task('test', function () { + return gulp.src('./test/qunit.html') + .pipe(qunit()); +}); \ No newline at end of file diff --git a/index.html b/index.html index 49e283f5..cdf4a6bc 100644 --- a/index.html +++ b/index.html @@ -106,7 +106,7 @@

Via Javascript

================================================== --> - + - + - + diff --git a/test/unit/contextmenu.js b/test/unit/bootstrap-contextmenu.js similarity index 100% rename from test/unit/contextmenu.js rename to test/unit/bootstrap-contextmenu.js