mtoros-mega_menus 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/lib/mega_menus/editor.rb +3 -1
- data/mega_menus.gemspec +2 -2
- data/rails_generators/menu/templates/helpers/menu_helper.rb +1 -1
- metadata +2 -2
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ require 'rake'
|
|
4
4
|
begin
|
5
5
|
require 'echoe'
|
6
6
|
|
7
|
-
Echoe.new('mega_menus', '0.7.
|
7
|
+
Echoe.new('mega_menus', '0.7.2') do |p|
|
8
8
|
p.summary = "Treeview menu Gem for Rails"
|
9
9
|
p.description = "Adds a model, controller to perform the tasks in order to have a treeview menu. To use this gem simply install it and write script/generate menu name_of_the_menu"
|
10
10
|
p.author = ['Marko Toros']
|
data/lib/mega_menus/editor.rb
CHANGED
@@ -120,9 +120,11 @@ module MegaMenus
|
|
120
120
|
|
121
121
|
def position_down(id)
|
122
122
|
menu=self.find(id)
|
123
|
-
if(
|
123
|
+
if(!siblings(id).empty?)
|
124
|
+
if(menu.position< (siblings(id).max {|c1,c2| c1.position <=> c2.position}).position)
|
124
125
|
switch_menu_positions(menu.parent_id, menu.position, menu.position+1)
|
125
126
|
end
|
127
|
+
end
|
126
128
|
end
|
127
129
|
|
128
130
|
def edit(menu_id, new_parent_id, title, link)
|
data/mega_menus.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = %q{mega_menus}
|
3
|
-
s.version = "0.7.
|
3
|
+
s.version = "0.7.2"
|
4
4
|
|
5
5
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
6
6
|
s.authors = ["Marko Toros"]
|
7
|
-
s.date = %q{2008-11-
|
7
|
+
s.date = %q{2008-11-16}
|
8
8
|
s.description = %q{Adds a model, controller to perform the tasks in order to have a treeview menu. To use this gem simply install it and write script/generate menu name_of_the_menu}
|
9
9
|
s.email = %q{mtoros@gmail.com}
|
10
10
|
s.extra_rdoc_files = ["README.rdoc", "lib/mega_menus.rb", "lib/mega_menus/editor.rb", "lib/mega_menus/view_helpers.rb"]
|
@@ -91,7 +91,7 @@ module <%= "#{file_name.capitalize}Helper" %>
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
end
|
94
|
-
if(firstm==TRUE and <%= "#{file_name.capitalize}" %>.exists?(admin_parent) and admin_parent!=1
|
94
|
+
if(firstm==TRUE and <%= "#{file_name.capitalize}" %>.exists?(admin_parent) and admin_parent!=1)
|
95
95
|
concat( "<ul id=\"ul_menu_#{admin_depth.first}\" class=\"ul_menu_depth_#{admin_depth.first} ul_menu\">")
|
96
96
|
if(admin_condition)
|
97
97
|
concat( "<li id=\"root_add_#{admin_parent}\" class=\"root_add\">")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mtoros-mega_menus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marko Toros
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-11-
|
12
|
+
date: 2008-11-16 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|