lolita-menu 0.2.1 → 0.2.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/README.rdoc CHANGED
@@ -9,7 +9,25 @@ And run
9
9
  Like with other Lolita gems call
10
10
  rails g lolita:menu:install
11
11
  Since this gem comes with migrations
12
- rake db:migrate
12
+ rake db:migrate
13
+
14
+ === Creating menu
15
+ To create Menu it's a good practise to do in your `db/seeds.rb`
16
+
17
+ menu = Menu.find_or_initialize_by_system_name('main_menu')
18
+ if menu.new_record?
19
+ categories_menu.name = 'Main menu'
20
+ categories_menu.save!
21
+ [
22
+ ['News', '/news'],
23
+ ['Galleries', '/galleries'],
24
+ ['About', '/about']
25
+ ].each do |item|
26
+ menu.append MenuItem.create!(:name => item.first, :url => item.last)
27
+ end
28
+ puts "=> Main menu created"
29
+ end
30
+
13
31
  === Using autocomplete
14
32
  Before that you must follow Install instruction.
15
33
  To use autocomplete you need to add all possible url's in <b>config/lolita-menu-urls.rb</b>
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -1,4 +1,3 @@
1
- - rand_id = rand(10**10)
2
1
  - given_options = {:"data-autocomplete" => autocomplete_menu_item_url_menu_items_path(:tree_class => resource_class.to_s), |
3
2
  :"data-delimiter" => " ", |
4
3
  :class=>"url-input ui-autocomplete-input", :autocomplete=>"off", :role=>"textbox", :"aria-autocomplete"=>"list", |
@@ -4,14 +4,6 @@ module LolitaMenu
4
4
  end
5
5
  end
6
6
 
7
- # Lolita::Hooks.component(:"/lolita/configuration/list/display").around do
8
- # list = self.component_locals[:list]
9
- # page = self.component_locals[:page]
10
- # self.extend(Lolita::MenuHelper)
11
-
12
- # if Lolita::Menu::NestedTree.is_tree?(list.dbi.klass)
13
- # self.send(:render_component, "lolita/menu/nested_tree", :display, :list => list, :page => page)
14
- # else
15
- # let_content
16
- # end
17
- # end
7
+ Lolita::Hooks.component(:"/lolita/configuration/tabs/display").before do
8
+ javascript_include_tag "lolita/menu/application.js"
9
+ end
data/lolita-menu.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "lolita-menu"
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["ITHouse", "Arturs Meisters"]
12
- s.date = "2012-09-05"
12
+ s.date = "2012-09-13"
13
13
  s.description = "Manage public menus for each project inside Lolita."
14
14
  s.email = "support@ithouse.lv"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lolita-menu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-09-05 00:00:00.000000000 Z
13
+ date: 2012-09-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: lolita
@@ -232,7 +232,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
232
232
  version: '0'
233
233
  segments:
234
234
  - 0
235
- hash: 2169488497453838535
235
+ hash: 2593373707565424638
236
236
  required_rubygems_version: !ruby/object:Gem::Requirement
237
237
  none: false
238
238
  requirements: