Changeset 719
- Timestamp:
- 02/01/08 20:06:42 (5 months ago)
- Files:
-
- branches/rails2/RAILS2_TODO (modified) (1 diff)
- branches/rails2/app/helpers/admin/node_helper.rb (modified) (1 diff)
- branches/rails2/app/helpers/application_helper.rb (modified) (1 diff)
- branches/rails2/public/javascripts/sitemap.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/rails2/RAILS2_TODO
r717 r719 3 3 * Something is wrong with the code tracking whether or not nodes are expanded 4 4 in the site map. The tests are passing now, but the expansion is not 5 preserved beyond 2 levels. 5 preserved beyond 2 levels. -- COMPLETED (mislav) 6 6 7 7 * Update boot.rb and environment.rb. Make sure the templates that the radiant 8 8 command uses are updated as well. -- COMPLETED (sean) 9 9 10 * Make sure script/spec works or uses spec.opts by default without -O. 10 * Make sure script/spec works or uses spec.opts by default without -O.>>>>>>> .r718 branches/rails2/app/helpers/admin/node_helper.rb
r694 r719 14 14 unless @expanded_rows 15 15 @expanded_rows = case 16 when rows = cookies[ 'expanded_rows']16 when rows = cookies[:expanded_rows] 17 17 rows.split(',').map { |x| Integer(x) rescue nil }.compact 18 18 else 19 19 [] 20 20 end 21 (@expanded_rows << homepage.id).uniq if homepage 21 22 if homepage and !@expanded_rows.include?(homepage.id) 23 @expanded_rows << homepage.id 24 end 22 25 end 23 26 @expanded_rows branches/rails2/app/helpers/application_helper.rb
r580 r719 77 77 78 78 def nav_link_to(name, options) 79 logger.debug 'options are: ' + options.to_s80 79 if current_url?(options) 81 80 %{<strong>#{ link_to name, options }</strong>} branches/rails2/public/javascripts/sitemap.js
r576 r719 47 47 readExpandedCookie: function() { 48 48 var matches = document.cookie.match(/expanded_rows=(.+?);/); 49 this.expandedRows = matches ? matches[1].split(',') : [];49 this.expandedRows = matches ? decodeURIComponent(matches[1]).split(',') : []; 50 50 }, 51 51 52 52 saveExpandedCookie: function() { 53 document.cookie = "expanded_rows=" + this.expandedRows.uniq().join(",") + "; path=/admin";53 document.cookie = "expanded_rows=" + encodeURIComponent(this.expandedRows.uniq().join(",")) + "; path=/admin"; 54 54 }, 55 55
