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 {
li {
em {
background-position: left -31px;
cursor: move;
}
&.templatized > strong a {
&.templatized > .inner > a {
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 {
background: transparent image-url("locomotive/list/icons/redirect.png") no-repeat right 2px;
&.redirect > .inner > a {
padding-right: 24px;
background: transparent image-url("locomotive/list/icons/redirect.png") no-repeat right 1px;
}
} // ul.folder li
} // ul.folder

View File

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

View File

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