bug fixes
This commit is contained in:
parent
6d45155b2f
commit
b8dd3e772e
@ -22,6 +22,7 @@ module Admin
|
|||||||
flash_success!
|
flash_success!
|
||||||
redirect_to edit_admin_layout_url(@layout)
|
redirect_to edit_admin_layout_url(@layout)
|
||||||
else
|
else
|
||||||
|
logger.debug "===> #{@layout.errors.inspect}"
|
||||||
flash_error!
|
flash_error!
|
||||||
render :action => 'new'
|
render :action => 'new'
|
||||||
end
|
end
|
||||||
|
@ -50,7 +50,7 @@ class AssetCollection
|
|||||||
self.assets.find(asset_id).position = index
|
self.assets.find(asset_id).position = index
|
||||||
end
|
end
|
||||||
|
|
||||||
self.assets.each do |asset|
|
self.assets.clone.each do |asset|
|
||||||
if !@assets_order.split(',').include?(asset._id)
|
if !@assets_order.split(',').include?(asset._id)
|
||||||
self.assets.delete(asset)
|
self.assets.delete(asset)
|
||||||
asset.send(:delete)
|
asset.send(:delete)
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
= f.input :slug
|
= f.input :slug
|
||||||
= f.input :description
|
= f.input :description
|
||||||
|
|
||||||
= render 'admin/custom_fields/index', :f => f, :collection_name => 'contents'
|
= render 'admin/custom_fields/index', :form => f, :collection_name => 'contents'
|
||||||
|
|
||||||
- unless f.object.new_record?
|
- unless f.object.new_record?
|
||||||
= f.foldable_inputs :name => :presentation, :class => 'switchable' do
|
= f.foldable_inputs :name => :presentation, :class => 'switchable' do
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
|
|
||||||
%p= t('.help')
|
%p= t('.help')
|
||||||
|
|
||||||
= semantic_form_for @content_type, :url => admin_content_type_url(@content_type) do |form|
|
= semantic_form_for @content_type, :url => admin_content_type_url(@content_type) do |f|
|
||||||
|
|
||||||
= render 'form', :f => form
|
= render 'form', :f => f
|
||||||
|
|
||||||
= render 'admin/shared/form_actions', :back_url => admin_contents_url(@content_type.slug), :button_label => :update
|
= render 'admin/shared/form_actions', :back_url => admin_contents_url(@content_type.slug), :button_label => :update
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
= f.input :name
|
= f.input :name
|
||||||
|
|
||||||
= f.inputs :name => :code do
|
= f.inputs :name => :code do
|
||||||
= f.custom_input :value, :css => 'full', :with_label => false do
|
= f.custom_input :value, :css => 'code full', :with_label => false do
|
||||||
%code{ :class => 'html' }
|
%code{ :class => 'html' }
|
||||||
= f.text_area :value
|
= f.text_area :value
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
%ul
|
%ul
|
||||||
- current_site.pages.latest_updated.each do |page|
|
- current_site.pages.latest_updated.each do |page|
|
||||||
%li
|
%li
|
||||||
= link_to truncate(page.title, :length => 30), edit_admin_page_url(page)
|
= link_to truncate(page.title, :length => 25), edit_admin_page_url(page)
|
||||||
%span= time_ago_in_words(page.updated_at)
|
%span= time_ago_in_words(page.updated_at)
|
||||||
|
|
||||||
- current_site.content_types.each do |content_type|
|
- current_site.content_types.each do |content_type|
|
||||||
|
6
doc/TODO
6
doc/TODO
@ -1,5 +1,8 @@
|
|||||||
BOARD:
|
BOARD:
|
||||||
|
|
||||||
|
- asset picker (content instance)
|
||||||
|
- theme asset picker when editing layout
|
||||||
|
|
||||||
- refactoring admin crud (pages + layouts + snippets)
|
- refactoring admin crud (pages + layouts + snippets)
|
||||||
- refactor slugify method (use parameterize + create a module)
|
- refactor slugify method (use parameterize + create a module)
|
||||||
|
|
||||||
@ -40,4 +43,5 @@ x refactor custom field types
|
|||||||
x new custom field types
|
x new custom field types
|
||||||
x boolean
|
x boolean
|
||||||
x enable/disable text formatting
|
x enable/disable text formatting
|
||||||
x custom fields for asset collections
|
x custom fields for asset collections
|
||||||
|
x [BUG] impossible to remove many assets in an asset collection
|
@ -32,6 +32,7 @@ module Locomotive
|
|||||||
|
|
||||||
def each(&block)
|
def each(&block)
|
||||||
@collection ||= @content_type.ordered_contents(@context['with_scope'])
|
@collection ||= @content_type.ordered_contents(@context['with_scope'])
|
||||||
|
@collection.each(&block)
|
||||||
end
|
end
|
||||||
|
|
||||||
def paginate(options = {})
|
def paginate(options = {})
|
||||||
|
@ -3,12 +3,16 @@ module Locomotive
|
|||||||
module Drops
|
module Drops
|
||||||
class Page < Base
|
class Page < Base
|
||||||
|
|
||||||
liquid_attributes << :title << :fullpath
|
liquid_attributes << :title
|
||||||
|
|
||||||
def children
|
def children
|
||||||
@children ||= liquify(*@source.children)
|
@children ||= liquify(*@source.children)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def fullpath
|
||||||
|
@fullpath ||= @source.fullpath
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -49,8 +49,8 @@ var TinyMceDefaultSettings = {
|
|||||||
script_url : '/javascripts/admin/plugins/tiny_mce/tiny_mce.js',
|
script_url : '/javascripts/admin/plugins/tiny_mce/tiny_mce.js',
|
||||||
theme : 'advanced',
|
theme : 'advanced',
|
||||||
skin : 'locomotive',
|
skin : 'locomotive',
|
||||||
theme_advanced_buttons1 : 'code,|,bold,italic,|,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,blockquote,|,link,unlink',
|
theme_advanced_buttons1 : 'code,|,bold,italic,|,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,blockquote,|,link,unlink,|,formatselect,fontselect,fontsizeselect',
|
||||||
theme_advanced_buttons2 : 'formatselect,fontselect,fontsizeselect,|,undo,redo',
|
theme_advanced_buttons2 : '',
|
||||||
theme_advanced_buttons3 : ''
|
theme_advanced_buttons3 : ''
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -72,8 +72,8 @@ $(document).ready(function() {
|
|||||||
$('#submenu > ul > li.' + css).addClass('on');
|
$('#submenu > ul > li.' + css).addClass('on');
|
||||||
|
|
||||||
// form
|
// form
|
||||||
$('.formtastic li input, .formtastic li textarea').focus(function() {
|
$('.formtastic li input, .formtastic li textarea, .formtastic li code').focus(function() {
|
||||||
$('.formtastic li.error p.inline-errors').fadeOut(200);
|
$('.formtastic li.error:not(.code) p.inline-errors').fadeOut(200);
|
||||||
if ($(this).parent().hasClass('error')) {
|
if ($(this).parent().hasClass('error')) {
|
||||||
$(this).nextAll('p.inline-errors').show();
|
$(this).nextAll('p.inline-errors').show();
|
||||||
}
|
}
|
||||||
|
@ -137,6 +137,15 @@ form.formtastic fieldset ol li p.inline-errors {
|
|||||||
font-size: 0.7em !important;
|
font-size: 0.7em !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
form.formtastic fieldset ol li.code p.inline-errors {
|
||||||
|
display: block;
|
||||||
|
float: right;
|
||||||
|
margin: 4px 16px 0 0;
|
||||||
|
position: relative;
|
||||||
|
left: 0px;
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
|
||||||
form.formtastic fieldset ol li.more { text-align: right; width: auto; margin-right: 20px; line-height: 0.6em; }
|
form.formtastic fieldset ol li.more { text-align: right; width: auto; margin-right: 20px; line-height: 0.6em; }
|
||||||
form.formtastic fieldset ol li.more a { text-decoration: none; color: #787A89; font-size: 0.7em; }
|
form.formtastic fieldset ol li.more a { text-decoration: none; color: #787A89; font-size: 0.7em; }
|
||||||
form.formtastic fieldset ol li.more a:hover { text-decoration: underline; }
|
form.formtastic fieldset ol li.more a:hover { text-decoration: underline; }
|
||||||
@ -370,6 +379,12 @@ form.formtastic fieldset.validations ol li.added em.key {
|
|||||||
width: 180px;
|
width: 180px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ___ content instance ___ */
|
||||||
|
|
||||||
|
form.content_instance fieldset ol li.text textarea {
|
||||||
|
width: 75%;
|
||||||
|
}
|
||||||
|
|
||||||
/* ___ my account ___ */
|
/* ___ my account ___ */
|
||||||
|
|
||||||
form.formtastic fieldset.language li.full span {
|
form.formtastic fieldset.language li.full span {
|
||||||
|
Loading…
Reference in New Issue
Block a user