Fix these bugs:
1.結構部份 a.原選單,點選編輯,無動作反應 b.新增選單後,左邊灰色架構部份不會更新 2.檔案室 a.無法編輯分類
This commit is contained in:
parent
9095713769
commit
9b1ada0af9
|
@ -1,10 +1,4 @@
|
|||
class Admin::LinksController < ApplicationController
|
||||
|
||||
layout "site_editor"
|
||||
|
||||
before_filter :authenticate_user!
|
||||
before_filter :find_parent_item
|
||||
before_filter :is_admin?
|
||||
class Admin::LinksController < Admin::ItemsController
|
||||
|
||||
def show
|
||||
@item ||= Link.find(params[:id])
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
class Admin::PagesController < ApplicationController
|
||||
|
||||
layout "site_editor"
|
||||
|
||||
before_filter :authenticate_user!
|
||||
before_filter :find_parent_item
|
||||
before_filter :is_admin?
|
||||
before_filter :set_current_item
|
||||
class Admin::PagesController < Admin::ItemsController
|
||||
|
||||
def show
|
||||
@item = Page.find(params[:id])
|
||||
|
@ -40,7 +33,7 @@ class Admin::PagesController < ApplicationController
|
|||
|
||||
@frontend_path = @item.app_frontend_url ? @item.app_frontend_url : @module_app.widgets.keys[0]
|
||||
|
||||
if @module_app.widgets.any?{|b| b.class == Array}
|
||||
if @module_app && @module_app.widgets && @module_app.widgets.any?{|b| b.class == Array}
|
||||
@frontend_style = @module_app.widgets[@frontend_path] if !@frontend_path.blank? && !@module_app.widgets.blank?
|
||||
end
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= flash_messages %>
|
||||
<%#= flash_messages %>
|
||||
<div id="poststuff">
|
||||
<h1><%= t('editing.page') %></h1>
|
||||
<%= form_for @item, :url => admin_page_path(@item), :html => { :class => 'form-horizontal edit_page' } do |f| %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= flash_messages %>
|
||||
<%#= flash_messages %>
|
||||
<div id="poststuff">
|
||||
<h1><%= t('new.page') %></h1>
|
||||
<%= form_for @item, :url => admin_pages_path, :html => { :class => 'form-horizontal edit_page' } do |f| %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= flash_messages %>
|
||||
<%#= flash_messages %>
|
||||
|
||||
|
||||
<%= page_stylesheets(@item, true).html_safe %>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
$('#back_sidebar').html("<%= escape_javascript(render(:partial => 'admin/items/site_map_left_bar')) %>");
|
||||
$('#back_main').html("<%= escape_javascript(render(:partial => 'admin/pages/show')) %>");
|
||||
$('#back_sidebar').html("<%= escape_javascript(render(:partial => 'admin/items/site_map_left_bar')) %>");
|
||||
history.pushState(null, document.title, "<%= escape_javascript(admin_page_url(@item)) %>");
|
|
@ -1,2 +1,3 @@
|
|||
$('#back_main').html("<%= escape_javascript(render(:partial => 'admin/pages/show')) %>");
|
||||
$('#back_sidebar').html("<%= escape_javascript(render(:partial => 'admin/items/site_map_left_bar')) %>");
|
||||
history.pushState(null, document.title, "<%= escape_javascript(admin_page_url(@item)) %>");
|
|
@ -15,7 +15,7 @@
|
|||
<div class="control-group">
|
||||
<%= label_tag "name-#{locale}", "Name-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.text_field locale, :class =>' input-xxlarge', :value => (@archive_file_category.title[locale] rescue nil) %>
|
||||
<%= f.text_field locale, :class =>' input-xxlarge', :value => (@archive_file_category.title_translations[locale] rescue nil) %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$("#<%= dom_id @archive_file_category %>").replaceWith("<%= j render :partial => 'link_category', :collection => [@archive_file_category] %>");
|
||||
<% @archive_file_category = WebLinkCategory.new(:display => 'List') # reset for new form %>
|
||||
$("#<%= dom_id @archive_file_category %>").replaceWith("<%= j render :partial => 'archive_file_category', :collection => [@archive_file_category] %>");
|
||||
<% @archive_file_category = ArchiveFileCategory.new(:display => 'List') # reset for new form %>
|
||||
$(".edit_archive_file_category").replaceWith("<%= j render "form" %>")
|
||||
$(".new_archive_file_category")[0].reset();
|
Loading…
Reference in New Issue