Revert ff82391b7d0d17c17568ed21176b8b0112a34e31^..HEAD

This commit is contained in:
Matthew Kaito Juyuan Fu committed 2011-10-20 10:06:06 +08:00
1 parent ff82391b7d
commit cb07a35cc9
97 files changed
+1037 -79

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
$(function (){
$(".engine_loading").load($(this).attr("widget_path"));
});
+1 -1
View File
@@ -3,5 +3,5 @@
*and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
*the top of the compiled file, but it's generally better to create a new file per style scope.
*= require_self
*
*/
@@ -28,6 +28,7 @@ class Admin::PagePartsController < ApplicationController
@partial = 'edit_text'
@part_locale = params[:part_locale] || I18n.locale.to_s
when 'module'
@plugins=[{:module=>"Blog",:widgets=>[{:name=>"Blog",:path=>"panel/blog/widget_latest_post"},{:name=>"Blog",:path=>"panel/blog/widget_index"}]}]
when 'snippet'
end
end
+21
View File
@@ -6,6 +6,25 @@ class ApplicationController < ActionController::Base
helper :all
before_filter :set_locale, :set_site
def get_all_app_engines
ary = ["vender/plugins/NewBlog"]
app_engines = ary.collect{|t|
Rails::Engine.find t
}
app_engines.each{ |t|
# t.
}
end
def flaten_controller
ary=[]
Find.find(File.join(Rails.root , 'vendor/plugins/')) { |name|
require_dependency(name) if /_controller\.rb$/ =~ name
ary << name
}
ary
end
# Find the parent for the given item
def find_parent_item
@parent_item = Item.first(:conditions => { :id => BSON::ObjectId(params[:parent_id]) }) rescue nil
@@ -78,4 +97,6 @@ class ApplicationController < ActionController::Base
Item.first(:conditions => {:parent_id => nil})
end
end
+2 -2
View File
@@ -3,9 +3,9 @@
<%= t('admin.registered') %>
</div>
<% else %>
<div class="buy_btn">
<div class="buy_btn">
<%= link_to 'register', "http://#{APP_CONFIG['store_ip']}/user/sites/register?" +
{:site => {:school => @site.school, :department => @site.department}}.to_query,
:target => '_blank' %>
</div>
<% end %>
<% end %>