From beb4630a990202380b6a1561d5a20e1c0b516714 Mon Sep 17 00:00:00 2001 From: Nathan Maves Date: Thu, 5 Feb 2015 09:28:21 -0700 Subject: [PATCH 1/5] Adding a git ignore file --- .gitignore | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..500e2aa --- /dev/null +++ b/.gitignore @@ -0,0 +1,83 @@ +# Created by .ignore support plugin (hsz.mobi) +### Eclipse template +*.pydevproject +.metadata +.gradle +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + +# sbteclipse plugin +.target + +# TeXlipse plugin +.texlipse + + +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm + +*.iml + +## Directory-based project format: +.idea/ +# if you remove the above rule, at least ignore the following: + +# User-specific stuff: +# .idea/workspace.xml +# .idea/tasks.xml +# .idea/dictionaries + +# Sensitive or high-churn files: +# .idea/dataSources.ids +# .idea/dataSources.xml +# .idea/sqlDataSources.xml +# .idea/dynamic.xml +# .idea/uiDesigner.xml + +# Gradle: +# .idea/gradle.xml +# .idea/libraries + +# Mongo Explorer plugin: +# .idea/mongoSettings.xml + +## File-based project format: +*.ipr +*.iws + +## Plugin-specific files: + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties + + From 11eea0c54d8e5017ec602f07c3d90419828b7a1b Mon Sep 17 00:00:00 2001 From: Nathan Maves Date: Thu, 5 Feb 2015 09:28:53 -0700 Subject: [PATCH 2/5] Modifying the click handlers to allow for dynamically added content to the menu. --- js/jquery.dlmenu.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/jquery.dlmenu.js b/js/jquery.dlmenu.js index 6f26cec..dc020a3 100755 --- a/js/jquery.dlmenu.js +++ b/js/jquery.dlmenu.js @@ -111,12 +111,12 @@ $body.off( 'click' ).children().on( 'click.dlmenu', function() { self._closeMenu() ; } ); - + } return false; } ); - this.$menuitems.on( 'click.dlmenu', function( event ) { + this.$menu.on( 'click.dlmenu', 'li:not(.dl-back)', function( event ) { event.stopPropagation(); @@ -156,7 +156,7 @@ } ); - this.$back.on( 'click.dlmenu', function( event ) { + this.$menu.on( 'click.dlmenu', 'li.dl-back', function( event ) { var $this = $( this ), $submenu = $this.parents( 'ul.dl-submenu:first' ), From 6690e1f6a7e2ed282f3cac2e0167dbf68bce8359 Mon Sep 17 00:00:00 2001 From: Nathan Maves Date: Thu, 5 Feb 2015 09:38:30 -0700 Subject: [PATCH 3/5] I bit more cleanup of unused global vars and make sure the reset works for dynamically added content. --- js/jquery.dlmenu.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/js/jquery.dlmenu.js b/js/jquery.dlmenu.js index dc020a3..bd71aff 100755 --- a/js/jquery.dlmenu.js +++ b/js/jquery.dlmenu.js @@ -74,13 +74,11 @@ this.open = false; this.$trigger = this.$el.children( '.dl-trigger' ); this.$menu = this.$el.children( 'ul.dl-menu' ); - this.$menuitems = this.$menu.find( 'li:not(.dl-back)' ); this.$el.find( 'ul.dl-submenu' ).prepend( '
  • ' + this.options.backLabel + '
  • ' ); - this.$back = this.$menu.find( 'li.dl-back' ); // Set the label text for the back link. if (this.options.useActiveItemAsBackLabel) { - this.$back.each(function() { + this.$menu.find( 'li.dl-back' ).each(function() { var $this = $(this), parentLabel = $this.parents('li:first').find('a:first').text(); @@ -238,7 +236,7 @@ // resets the menu to its original state (first level of options) _resetMenu : function() { this.$menu.removeClass( 'dl-subview' ); - this.$menuitems.removeClass( 'dl-subview dl-subviewopen' ); + this.$menu.find( 'li:not(.dl-back)' ).removeClass( 'dl-subview dl-subviewopen' ); } }; From cb001bf78e62e329e1d51225b6a19aa28939b7d8 Mon Sep 17 00:00:00 2001 From: Nathan Maves Date: Wed, 11 Feb 2015 12:21:29 -0700 Subject: [PATCH 4/5] Added z index to the menu to fix issues where the menu would appear behind other elements on the page. The menu will now hide/show (display:hidden) When activated. This corrected issues with IE10 where the menu would be invisible yet you could still click the menu elements. --- js/jquery.dlmenu.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/jquery.dlmenu.js b/js/jquery.dlmenu.js index bd71aff..4e00c96 100755 --- a/js/jquery.dlmenu.js +++ b/js/jquery.dlmenu.js @@ -74,6 +74,7 @@ this.open = false; this.$trigger = this.$el.children( '.dl-trigger' ); this.$menu = this.$el.children( 'ul.dl-menu' ); + this.$el.css('z-index', '9999') this.$el.find( 'ul.dl-submenu' ).prepend( '
  • ' + this.options.backLabel + '
  • ' ); // Set the label text for the back link. @@ -214,6 +215,8 @@ onTransitionEndFn.call(); } + this.$menu.hide(); + this.open = false; }, openMenu : function() { @@ -223,6 +226,9 @@ }, _openMenu : function() { var self = this; + + this.$menu.show(); + // clicking somewhere else makes the menu close $body.off( 'click' ).on( 'click.dlmenu', function() { self._closeMenu() ; From 0c88fafd7097db721e42fd7e7af0172ec455ca15 Mon Sep 17 00:00:00 2001 From: Nathan Maves Date: Wed, 18 Feb 2015 14:48:21 -0700 Subject: [PATCH 5/5] Another fix for IE. We need to hide the menu when we initialize the plugin. --- js/jquery.dlmenu.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/jquery.dlmenu.js b/js/jquery.dlmenu.js index 4e00c96..dc1493f 100755 --- a/js/jquery.dlmenu.js +++ b/js/jquery.dlmenu.js @@ -74,6 +74,7 @@ this.open = false; this.$trigger = this.$el.children( '.dl-trigger' ); this.$menu = this.$el.children( 'ul.dl-menu' ); + this.$menu.hide(); this.$el.css('z-index', '9999') this.$el.find( 'ul.dl-submenu' ).prepend( '
  • ' + this.options.backLabel + '
  • ' );