icons for redirect and templatized pages were not displayed in the back-office + fix the random issue when getting an API token in development (very weird behaviour) + remove the default mongoid scope for pages + force the depth

This commit is contained in:
Didier Lafforgue 2012-02-20 17:21:32 +01:00
parent 61281db943
commit fa2cd996ce
3 changed files with 12 additions and 6 deletions

View File

@ -262,19 +262,21 @@ ul.list {
} }
&.folder { &.folder {
li { li {
em { em {
background-position: left -31px; background-position: left -31px;
cursor: move; cursor: move;
} }
&.templatized > strong a { &.templatized > .inner > a {
padding-right: 24px; padding-right: 24px;
background: transparent image-url("locomotive/list/icons/template.png") no-repeat right 3px; background: transparent image-url("locomotive/list/icons/template.png") no-repeat right 2px;
} }
&.redirect > strong a { &.redirect > .inner > a {
background: transparent image-url("locomotive/list/icons/redirect.png") no-repeat right 2px; padding-right: 24px;
background: transparent image-url("locomotive/list/icons/redirect.png") no-repeat right 1px;
} }
} // ul.folder li } // ul.folder li
} // ul.folder } // ul.folder

View File

@ -1,6 +1,6 @@
module Locomotive module Locomotive
module Api module Api
class TokensController < BaseController class TokensController < Locomotive::Api::BaseController
skip_before_filter :require_account skip_before_filter :require_account

View File

@ -19,6 +19,9 @@ module Locomotive
## indexes ## ## indexes ##
index :position index :position
index [:depth.asc, :position.asc] index [:depth.asc, :position.asc]
## scopes ##
default_scope :where => {} # disable the default_scope from the Mongoid::Tree gem
end end
module ClassMethods module ClassMethods
@ -102,7 +105,8 @@ module Locomotive
protected protected
def persist_depth def persist_depth
self.attributes[:depth] = self.depth self.attributes['depth'] = self.depth
self.depth_will_change!
end end
end end