From 8e179d59f60a593203667c092119779dc36f5171 Mon Sep 17 00:00:00 2001 From: Osman Nuri Okumus Date: Sat, 1 Nov 2014 17:13:13 +0200 Subject: [PATCH] 1.1.3 --- .gitignore | 3 +- Gruntfile.js | 124 ++++++------ README.md | 15 +- bower.json | 7 +- dist/jquery.metisMenu.css | 56 ------ dist/jquery.metisMenu.js | 72 ------- dist/jquery.metisMenu.min.js | 9 - dist/metisMenu.css | 2 +- dist/metisMenu.js | 4 +- dist/metisMenu.min.css | 2 +- dist/metisMenu.min.js | 2 +- package.json | 6 +- test/demo.css | 8 +- test/hover.html | 27 +-- test/index.html | 10 +- test/metisFolder.html | 362 +++++++++++++++++------------------ 16 files changed, 292 insertions(+), 417 deletions(-) delete mode 100644 dist/jquery.metisMenu.css delete mode 100644 dist/jquery.metisMenu.js delete mode 100644 dist/jquery.metisMenu.min.js diff --git a/.gitignore b/.gitignore index 897d6a7..a79abb3 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ lib-cov .tmproj .directory nbproject +backup Thumbs.db # Komodo @@ -51,4 +52,4 @@ vendor _gh_pages tmp temp -TODO.md \ No newline at end of file +TODO.md diff --git a/Gruntfile.js b/Gruntfile.js index bffba85..eccbc2d 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,65 +1,65 @@ "use strict"; module.exports = function(grunt) { - grunt.initConfig({ - pkg: grunt.file.readJSON("package.json"), - - banner: "/*\n" + - " * <%= pkg.title || pkg.name %> - v<%= pkg.version %>\n" + - " * <%= pkg.description %>\n" + - " * <%= pkg.homepage %>\n" + - " *\n" + - " * Made by <%= pkg.author.name %>\n" + - " * Under <%= pkg.license %> License\n" + - " */\n", - - jshint: { - options: { - jshintrc: ".jshintrc" - }, - all: [ - "Gruntfile.js", - "src/metisMenu.js" - ] - }, - concat: { - plugin: { - src: ["src/metisMenu.js"], - dest: "dist/metisMenu.js" - }, - css: { - src: ["src/metisMenu.css"], - dest: "dist/metisMenu.css" - }, - options: { - banner: "<%= banner %>" - } - }, - uglify: { - plugin: { - src: ["dist/metisMenu.js"], - dest: "dist/metisMenu.min.js" - }, - options: { - banner: "<%= banner %>" - } - }, - cssmin: { - options: { - banner: "<%= banner %>" - }, - menucss: { - src: ["src/metisMenu.css"], - dest: "dist/metisMenu.min.css" - } - } - }); - - grunt.loadNpmTasks("grunt-contrib-jshint"); - grunt.loadNpmTasks("grunt-contrib-concat"); - grunt.loadNpmTasks("grunt-contrib-uglify"); - grunt.loadNpmTasks("grunt-contrib-cssmin"); - - grunt.registerTask("travis", ["jshint"]); - grunt.registerTask("default", ["jshint", "concat", "uglify", "cssmin"]); -}; \ No newline at end of file + grunt.initConfig({ + pkg: grunt.file.readJSON("package.json"), + + banner: "/*\n" + + " * <%= pkg.title || pkg.name %> - v<%= pkg.version %>\n" + + " * <%= pkg.description %>\n" + + " * <%= pkg.homepage %>\n" + + " *\n" + + " * Made by <%= pkg.author.name %>\n" + + " * Under <%= pkg.license %> License\n" + + " */\n", + + jshint: { + options: { + jshintrc: ".jshintrc" + }, + all: [ + "Gruntfile.js", + "src/metisMenu.js" + ] + }, + concat: { + plugin: { + src: ["src/metisMenu.js"], + dest: "dist/metisMenu.js" + }, + css: { + src: ["src/metisMenu.css"], + dest: "dist/metisMenu.css" + }, + options: { + banner: "<%= banner %>" + } + }, + uglify: { + plugin: { + src: ["dist/metisMenu.js"], + dest: "dist/metisMenu.min.js" + }, + options: { + banner: "<%= banner %>" + } + }, + cssmin: { + options: { + banner: "<%= banner %>" + }, + menucss: { + src: ["src/metisMenu.css"], + dest: "dist/metisMenu.min.css" + } + } + }); + + grunt.loadNpmTasks("grunt-contrib-jshint"); + grunt.loadNpmTasks("grunt-contrib-concat"); + grunt.loadNpmTasks("grunt-contrib-uglify"); + grunt.loadNpmTasks("grunt-contrib-cssmin"); + + grunt.registerTask("travis", ["jshint"]); + grunt.registerTask("default", ["jshint", "concat", "uglify", "cssmin"]); +}; diff --git a/README.md b/README.md index baee2c2..cd88ef1 100644 --- a/README.md +++ b/README.md @@ -26,13 +26,13 @@ bower install metisMenu 1. Include Twitter Bootstrap StyleSheet ```html - + ``` 2. Include metisMenu StyleSheet ```html - + ``` 3. Include jQuery @@ -44,13 +44,13 @@ bower install metisMenu 4. Include Twitter Bootstrap Script ```html - + ``` 5. Include metisMenu plugin's code ```html - + ``` 6. Call the plugin: @@ -92,8 +92,9 @@ Contains a simple HTML file to demonstrate metisMenu plugin. ### Release History **DATE** **VERSION** **CHANGES** -* 2014-07-07 v1.1.0 Add double tap functionality -* 2014-06-24 v1.0.3 cdnjs support & rename plugin +* 2014-11-01 v1.1.3 Bootstrap 3.3.0 +* 2014-07-07 v1.1.0 Add double tap functionality +* 2014-06-24 v1.0.3 cdnjs support & rename plugin * 2014-06-18 v1.0.3 Create grunt task * 2014-06-10 v1.0.2 Fixed for IE8 & IE9 @@ -109,4 +110,4 @@ metisMenu was made with love by these guys and a bunch of awesome [contributors] ## License -[MIT License](https://github.com/onokumus/metisMenu/blob/master/LICENSE) \ No newline at end of file +[MIT License](https://github.com/onokumus/metisMenu/blob/master/LICENSE) diff --git a/bower.json b/bower.json index 2d82246..c655d52 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "metisMenu", - "version": "1.1.1", + "version": "1.1.3", "homepage": "https://github.com/onokumus/metisMenu", "authors": [ "onokumus " @@ -28,5 +28,8 @@ "bower_components", "test", "tests" - ] + ], + "dependencies": { + "bootstrap": "~3.3.0" + } } diff --git a/dist/jquery.metisMenu.css b/dist/jquery.metisMenu.css deleted file mode 100644 index a6f0481..0000000 --- a/dist/jquery.metisMenu.css +++ /dev/null @@ -1,56 +0,0 @@ -/* - * metismenu - v1.0.3 - * Easy menu jQuery plugin for Twitter Bootstrap 3 - * https://github.com/onokumus/metisMenu - * - * Made by Osman Nuri Okumuş - * Under MIT License - */ -.arrow { - float: right; -} - -.glyphicon.arrow:before { - content: "\e079"; -} - -.active > a > .glyphicon.arrow:before { - content: "\e114"; -} - -.fa.arrow:before { - content: "\f104"; -} - -.active > a > .fa.arrow:before { - content: "\f107"; -} - -.plus-times { - float: right; -} - -.fa.plus-times:before { - content: "\f067"; -} - -.active > a > .fa.plus-times { - filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); - -webkit-transform: rotate(45deg); - -moz-transform: rotate(45deg); - -ms-transform: rotate(45deg); - -o-transform: rotate(45deg); - transform: rotate(45deg); -} - -.plus-minus { - float: right; -} - -.fa.plus-minus:before { - content: "\f067"; -} - -.active > a > .fa.plus-minus:before { - content: "\f068"; -} \ No newline at end of file diff --git a/dist/jquery.metisMenu.js b/dist/jquery.metisMenu.js deleted file mode 100644 index 9f8d627..0000000 --- a/dist/jquery.metisMenu.js +++ /dev/null @@ -1,72 +0,0 @@ -/* - * metismenu - v1.0.3 - * Easy menu jQuery plugin for Twitter Bootstrap 3 - * https://github.com/onokumus/metisMenu - * - * Made by Osman Nuri Okumuş - * Under MIT License - */ -;(function ($, window, document, undefined) { - - var pluginName = "metisMenu", - defaults = { - toggle: true - }; - - function Plugin(element, options) { - this.element = element; - this.settings = $.extend({}, defaults, options); - this._defaults = defaults; - this._name = pluginName; - this.init(); - } - - Plugin.prototype = { - init: function () { - - var $this = $(this.element), - $toggle = this.settings.toggle; - - if (this.isIE() <= 9) { - $this.find("li.active").has("ul").children("ul").collapse("show"); - $this.find("li").not(".active").has("ul").children("ul").collapse("hide"); - } else { - $this.find("li.active").has("ul").children("ul").addClass("collapse in"); - $this.find("li").not(".active").has("ul").children("ul").addClass("collapse"); - } - - $this.find("li").has("ul").children("a").on("click", function (e) { - e.preventDefault(); - - $(this).parent("li").toggleClass("active").children("ul").collapse("toggle"); - - if ($toggle) { - $(this).parent("li").siblings().removeClass("active").children("ul.in").collapse("hide"); - } - }); - }, - - isIE: function() {//https://gist.github.com/padolsey/527683 - var undef, - v = 3, - div = document.createElement("div"), - all = div.getElementsByTagName("i"); - - while ( - div.innerHTML = "", - all[0] - ) { - return v > 4 ? v : undef; - } - } - }; - - $.fn[ pluginName ] = function (options) { - return this.each(function () { - if (!$.data(this, "plugin_" + pluginName)) { - $.data(this, "plugin_" + pluginName, new Plugin(this, options)); - } - }); - }; - -})(jQuery, window, document); diff --git a/dist/jquery.metisMenu.min.js b/dist/jquery.metisMenu.min.js deleted file mode 100644 index 03ac02b..0000000 --- a/dist/jquery.metisMenu.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/* - * metismenu - v1.0.3 - * Easy menu jQuery plugin for Twitter Bootstrap 3 - * https://github.com/onokumus/metisMenu - * - * Made by Osman Nuri Okumuş - * Under MIT License - */ -!function(a,b,c){function d(b,c){this.element=b,this.settings=a.extend({},f,c),this._defaults=f,this._name=e,this.init()}var e="metisMenu",f={toggle:!0};d.prototype={init:function(){var b=a(this.element),c=this.settings.toggle;this.isIE()<=9?(b.find("li.active").has("ul").children("ul").collapse("show"),b.find("li").not(".active").has("ul").children("ul").collapse("hide")):(b.find("li.active").has("ul").children("ul").addClass("collapse in"),b.find("li").not(".active").has("ul").children("ul").addClass("collapse")),b.find("li").has("ul").children("a").on("click",function(b){b.preventDefault(),a(this).parent("li").toggleClass("active").children("ul").collapse("toggle"),c&&a(this).parent("li").siblings().removeClass("active").children("ul.in").collapse("hide")})},isIE:function(){for(var a,b=3,d=c.createElement("div"),e=d.getElementsByTagName("i");d.innerHTML="",e[0];)return b>4?b:a}},a.fn[e]=function(b){return this.each(function(){a.data(this,"plugin_"+e)||a.data(this,"plugin_"+e,new d(this,b))})}}(jQuery,window,document); \ No newline at end of file diff --git a/dist/metisMenu.css b/dist/metisMenu.css index ae40032..76376c3 100644 --- a/dist/metisMenu.css +++ b/dist/metisMenu.css @@ -1,5 +1,5 @@ /* - * metismenu - v1.1.1 + * metismenu - v1.1.3 * Easy menu jQuery plugin for Twitter Bootstrap 3 * https://github.com/onokumus/metisMenu * diff --git a/dist/metisMenu.js b/dist/metisMenu.js index 10c5b05..3785904 100644 --- a/dist/metisMenu.js +++ b/dist/metisMenu.js @@ -1,5 +1,5 @@ /* - * metismenu - v1.1.1 + * metismenu - v1.1.3 * Easy menu jQuery plugin for Twitter Bootstrap 3 * https://github.com/onokumus/metisMenu * @@ -100,7 +100,7 @@ }, remove: function() { - this.element.find('a').off("." + pluginName); + this.element.off("." + pluginName); this.element.removeData(pluginName); } diff --git a/dist/metisMenu.min.css b/dist/metisMenu.min.css index 880f034..a1d0ef3 100644 --- a/dist/metisMenu.min.css +++ b/dist/metisMenu.min.css @@ -1,5 +1,5 @@ /* - * metismenu - v1.1.1 + * metismenu - v1.1.3 * Easy menu jQuery plugin for Twitter Bootstrap 3 * https://github.com/onokumus/metisMenu * diff --git a/dist/metisMenu.min.js b/dist/metisMenu.min.js index d3fc644..8a590e7 100644 --- a/dist/metisMenu.min.js +++ b/dist/metisMenu.min.js @@ -1,5 +1,5 @@ /* - * metismenu - v1.1.1 + * metismenu - v1.1.3 * Easy menu jQuery plugin for Twitter Bootstrap 3 * https://github.com/onokumus/metisMenu * diff --git a/package.json b/package.json index eecc2b9..c16940c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metismenu", - "version": "1.1.1", + "version": "1.1.3", "description": "Easy menu jQuery plugin for Twitter Bootstrap 3", "main": "./dist/metisMenu.js", "scripts": { @@ -33,9 +33,9 @@ "homepage": "https://github.com/onokumus/metisMenu", "devDependencies": { "grunt": "^0.4.5", - "grunt-contrib-concat": "^0.4.0", + "grunt-contrib-concat": "^0.5.0", "grunt-contrib-cssmin": "^0.10.0", "grunt-contrib-jshint": "^0.10.0", - "grunt-contrib-uglify": "^0.5.0" + "grunt-contrib-uglify": "^0.6.0" } } diff --git a/test/demo.css b/test/demo.css index 5891494..738cdbf 100644 --- a/test/demo.css +++ b/test/demo.css @@ -22,6 +22,12 @@ margin: 0; list-style: none; } +.sidebar-nav a, +.sidebar-nav a:hover, +.sidebar-nav a:focus, +.sidebar-nav a:active { + outline: none; +} .sidebar-nav ul li, .sidebar-nav ul a { display: block; @@ -53,4 +59,4 @@ } .sidebar-nav-item-icon { padding-right: 5px; -} \ No newline at end of file +} diff --git a/test/hover.html b/test/hover.html index 02df966..3ef4887 100644 --- a/test/hover.html +++ b/test/hover.html @@ -6,12 +6,12 @@ metisMenu - - - + + + - +