diff --git a/vendor/built_in_modules/news/app/assets/javascripts/module_widget.js b/app/assets/javascripts/module.js.erb
similarity index 95%
rename from vendor/built_in_modules/news/app/assets/javascripts/module_widget.js
rename to app/assets/javascripts/module.js.erb
index aea46d72..fc19b8e6 100644
--- a/vendor/built_in_modules/news/app/assets/javascripts/module_widget.js
+++ b/app/assets/javascripts/module.js.erb
@@ -6,4 +6,3 @@
//
//= require jquery
//= require jquery_ujs
-//= require news_link
\ No newline at end of file
diff --git a/app/controllers/orbit_frontend_component_controller.rb b/app/controllers/orbit_frontend_component_controller.rb
index 185dbce6..09621e5f 100644
--- a/app/controllers/orbit_frontend_component_controller.rb
+++ b/app/controllers/orbit_frontend_component_controller.rb
@@ -1,7 +1,7 @@
class OrbitFrontendComponentController< ApplicationController
before_filter :setup_vars
before_filter {|c| c.front_end_available(@app_title)}
- layout :false
+ layout "module_widget"
def setup_vars
@app_title = request.fullpath.split('/')[2]
diff --git a/app/views/admin/page_parts/_text.html.erb b/app/views/admin/page_parts/_text.html.erb
index 4193cf50..529773e3 100644
--- a/app/views/admin/page_parts/_text.html.erb
+++ b/app/views/admin/page_parts/_text.html.erb
@@ -8,5 +8,7 @@
<% end %>
diff --git a/app/views/layouts/module_widget.html.erb b/app/views/layouts/module_widget.html.erb
index 44a2be85..793f7370 100644
--- a/app/views/layouts/module_widget.html.erb
+++ b/app/views/layouts/module_widget.html.erb
@@ -5,7 +5,9 @@
<%= javascript_include_tag "html5" %>
<%#= stylesheet_link_tag "module_widget" %>
- <%= javascript_include_tag "module_widget" %>
+ <%= javascript_include_tag "module" %>
+ <%#= javascript_include_tag "#{@app_title}/module_widget" %>
+ <%= yield :page_specific_javascript %>
<%= csrf_meta_tag %>
diff --git a/vendor/built_in_modules/announcement/app/assets/javascripts/module_widget.js b/vendor/built_in_modules/announcement/app/assets/javascripts/module_widget.js
deleted file mode 100644
index 9c429aac..00000000
--- a/vendor/built_in_modules/announcement/app/assets/javascripts/module_widget.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// This is a manifest file that'll be compiled into including all the files listed below.
-// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
-// be included in the compiled file accessible from http://example.com/assets/application.js
-// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
-// the compiled file.
-//
-//= require jquery
-//= require jquery_ujs
-//= require announcement_link
\ No newline at end of file
diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb
index 57295cc7..ad3eec72 100644
--- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb
+++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb
@@ -31,7 +31,6 @@ class Panel::Announcement::Widget::BulletinsController < OrbitWidgetController
@selected_tag = AnnouncementTag.find(params[:id]) rescue @tags[0]
@bulletins = @selected_tag.get_visible_bulletins.can_display.page(params[:page]).per(5) rescue nil
@web_links = WebResourceTag.first(:conditions => {:en => @selected_tag[:en]}).get_visible_links.page(params[:page]).per(5) rescue nil
- render :layout => 'module_widget'
end
def reload_bulletins
diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/_index.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/_index.html.erb
new file mode 100644
index 00000000..4213ed29
--- /dev/null
+++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/_index.html.erb
@@ -0,0 +1,29 @@
+<% if @current_category %>
+ <%= @current_category.i18n_variable[I18n.locale] + t('announcement.bulletin.list_lower') %>
+<% elsif @tag %>
+ <%= @tag[I18n.locale] + t('announcement.bulletin.list_lower') %>
+<% else %>
+ <%= t('announcement.list_announcement') %>
+<% end %>
+
+
+
+
+ <%= t('announcement.bulletin.category') %> |
+ <%= t('announcement.bulletin.title') %> |
+ <%= t('announcement.bulletin.postdate') %> |
+
+
+<% @bulletins.each do |post| %>
+
+ <%= post.bulletin_category.i18n_variable[I18n.locale] %> |
+ <%= link_to post.title[I18n.locale], panel_announcement_front_end_bulletin_path(post, :category_id => post.bulletin_category_id) %>
+ |
+ <%= post.postdate %> |
+
+
+<% end %>
+
+
+
+<%= paginate @bulletins, :params => {:inner => 'true'}, :remote => true %>
\ No newline at end of file
diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/bulletins_and_web_links.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/bulletins_and_web_links.html.erb
index 3e628120..50ae0674 100644
--- a/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/bulletins_and_web_links.html.erb
+++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/bulletins_and_web_links.html.erb
@@ -16,4 +16,8 @@
<%= render 'web_links' if @web_links %>
-
\ No newline at end of file
+
+
+<% content_for :page_specific_javascript do %>
+ <%= javascript_include_tag "news_link" %>
+<% end %>
\ No newline at end of file
diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/index.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/index.html.erb
index c885488f..dacb9eaf 100644
--- a/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/index.html.erb
+++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/index.html.erb
@@ -1,29 +1,3 @@
-<% if @current_category %>
- <%= @current_category.i18n_variable[I18n.locale] + t('announcement.bulletin.list_lower') %>
-<% elsif @tag %>
- <%= @tag[I18n.locale] + t('announcement.bulletin.list_lower') %>
-<% else %>
- <%= t('announcement.list_announcement') %>
-<% end %>
-
-
-
-
- <%= t('announcement.bulletin.category') %> |
- <%= t('announcement.bulletin.title') %> |
- <%= t('announcement.bulletin.postdate') %> |
-
-
-<% @bulletins.each do |post| %>
-
- <%= post.bulletin_category.i18n_variable[I18n.locale] %> |
- <%= link_to post.title[I18n.locale], panel_announcement_front_end_bulletin_path(post, :category_id => post.bulletin_category_id) %>
- |
- <%= post.postdate %> |
-
-
-<% end %>
-
-
-
-<%= paginate @bulletins, :params => {:inner => 'false'} %>
\ No newline at end of file
+
+ <%= render 'index' %>
+
\ No newline at end of file
diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/index.js.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/index.js.erb
new file mode 100644
index 00000000..e1be79eb
--- /dev/null
+++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/index.js.erb
@@ -0,0 +1 @@
+$('#bulletin_widget').html("<%= j render 'index' %>")
\ No newline at end of file
diff --git a/vendor/built_in_modules/news/app/controllers/panel/news/widget/news_bulletins_controller.rb b/vendor/built_in_modules/news/app/controllers/panel/news/widget/news_bulletins_controller.rb
index a6d20ca7..27e83c00 100644
--- a/vendor/built_in_modules/news/app/controllers/panel/news/widget/news_bulletins_controller.rb
+++ b/vendor/built_in_modules/news/app/controllers/panel/news/widget/news_bulletins_controller.rb
@@ -11,14 +11,14 @@ class Panel::News::Widget::NewsBulletinsController < OrbitWidgetController
def index
date_now = Time.now
if !params[:category_id].blank?
- @news_bulletins = NewsBulletin.can_display.where(:news_bulletin_category_id => params[:category_id]).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(10)
+ @news_bulletins = NewsBulletin.can_display.where(:news_bulletin_category_id => params[:category_id]).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(5)
@current_category = NewsBulletinCategory.from_id(params[:category_id]) rescue nil
elsif !params[:tag_id].blank?
@tag = NewsTag.find(params[:tag_id]) rescue nil
@tag = NewsTag.where(key: params[:tag_id])[0] unless @tag
- @news_bulletins = @tag.news_bulletins.can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(10) rescue nil
+ @news_bulletins = @tag.news_bulletins.can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(5) rescue nil
else
- @news_bulletins = NewsBulletin.can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(10)
+ @news_bulletins = NewsBulletin.can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(5)
end
end
@@ -28,7 +28,6 @@ class Panel::News::Widget::NewsBulletinsController < OrbitWidgetController
@selected_tag = NewsTag.find(params[:id]) rescue @tags[0]
@news_bulletins = @selected_tag.get_visible_news_bulletins.can_display.page(params[:page]).per(5) rescue nil
@web_links = WebResourceTag.first(:conditions => {:en => @selected_tag[:en]}).get_visible_links.page(params[:page]).per(5) rescue nil
- render :layout => 'module_widget'
end
def reload_news_bulletins
diff --git a/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/_index.html.erb b/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/_index.html.erb
new file mode 100644
index 00000000..fd3d477a
--- /dev/null
+++ b/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/_index.html.erb
@@ -0,0 +1,33 @@
+<% # encoding: utf-8 %>
+
+<%= flash_messages %>
+
+<% if @current_category %>
+ <%= @current_category.i18n_variable[I18n.locale] + t('news.news_bulletin.list_lower') %>
+<% elsif @tag %>
+ <%= @tag[I18n.locale] + t('news.news_bulletin.list_lower') %>
+<% else %>
+ <%= t('news.list_news') %>
+<% end %>
+
+
+
+
+ <%= t('news.news_bulletin.image') %> |
+ <%= t('news.news_bulletin.title') %> |
+
+
+ <% @news_bulletins.each do |post| %>
+
+ <%= image_tag post.image %> |
+
+ <%= link_to post.title[I18n.locale], panel_news_front_end_news_bulletin_path(post), :class => 'news_title' %>
+ <%= post.subtitle[I18n.locale].html_safe %>
+ |
+ <%= post.postdate %> |
+
+ <% end %>
+
+
+
+<%= paginate @news_bulletins, :params => {:inner => 'true'}, :remote => true %>
diff --git a/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/index.html.erb b/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/index.html.erb
index bb2ff639..1b59c3f9 100644
--- a/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/index.html.erb
+++ b/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/index.html.erb
@@ -1,33 +1,3 @@
-<% # encoding: utf-8 %>
-
-<%= flash_messages %>
-
-<% if @current_category %>
- <%= @current_category.i18n_variable[I18n.locale] + t('news.news_bulletin.list_lower') %>
-<% elsif @tag %>
- <%= @tag[I18n.locale] + t('news.news_bulletin.list_lower') %>
-<% else %>
- <%= t('news.list_news') %>
-<% end %>
-
-
-
-
- <%= t('news.news_bulletin.image') %> |
- <%= t('news.news_bulletin.title') %> |
-
-
- <% @news_bulletins.each do |post| %>
-
- <%= image_tag post.image %> |
-
- <%= link_to post.title[I18n.locale], panel_news_front_end_news_bulletin_path(post), :class => 'news_title' %>
- <%= post.subtitle[I18n.locale].html_safe %>
- |
- <%= post.postdate %> |
-
- <% end %>
-
-
-
-<%= paginate @news_bulletins, :params => {:inner => 'false'} %>
+
+ <%= render 'index' %>
+
\ No newline at end of file
diff --git a/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/index.js.erb b/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/index.js.erb
new file mode 100644
index 00000000..d4862b87
--- /dev/null
+++ b/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/index.js.erb
@@ -0,0 +1 @@
+$('#news_bulletin_widget').html("<%= j render 'index' %>")
\ No newline at end of file
diff --git a/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/news_bulletins_and_web_links.html.erb b/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/news_bulletins_and_web_links.html.erb
index 9e8ae742..b71f26f9 100644
--- a/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/news_bulletins_and_web_links.html.erb
+++ b/vendor/built_in_modules/news/app/views/panel/news/widget/news_bulletins/news_bulletins_and_web_links.html.erb
@@ -16,4 +16,8 @@
<%= render 'web_links' if @web_links %>
-
\ No newline at end of file
+
+
+<% content_for :page_specific_javascript do %>
+ <%= javascript_include_tag "announcement_link" %>
+<% end %>
\ No newline at end of file
diff --git a/vendor/built_in_modules/news/news.json b/vendor/built_in_modules/news/news.json
index 74b2bfcc..e1b5c95e 100644
--- a/vendor/built_in_modules/news/news.json
+++ b/vendor/built_in_modules/news/news.json
@@ -7,6 +7,6 @@
"update_info": "Some info",
"create_date": "11-11-2011",
"app_pages": ["news_bulletins"],
- "widgets": ["news_bulletins", "news_bulletins_and_web_links", "home_banner"],
+ "widgets": ["news_bulletins", "home_banner"],
"enable_frontend": true
}
diff --git a/vendor/built_in_modules/web_resource/app/assets/javascripts/web_resource/.gitkeep b/vendor/built_in_modules/web_resource/app/assets/javascripts/web_resource/.gitkeep
deleted file mode 100644
index e69de29b..00000000
diff --git a/vendor/built_in_modules/web_resource/app/controllers/panel/web_resource/front_end/web_links_controller.rb b/vendor/built_in_modules/web_resource/app/controllers/panel/web_resource/front_end/web_links_controller.rb
index 82804979..e605c768 100644
--- a/vendor/built_in_modules/web_resource/app/controllers/panel/web_resource/front_end/web_links_controller.rb
+++ b/vendor/built_in_modules/web_resource/app/controllers/panel/web_resource/front_end/web_links_controller.rb
@@ -12,7 +12,7 @@ class Panel::WebResource::FrontEnd::WebLinksController < OrbitWidgetController
date_now = Time.now
- @web_links = WebLink.where( :is_hidden => false ).desc(:is_top, :name).page( params[:page]).per(20)
+ @web_links = WebLink.where( :is_hidden => false ).desc(:is_top, :name).page(params[:page]).per(10)
get_categorys
end
diff --git a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/front_end/web_links/index.html.erb b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/front_end/web_links/index.html.erb
index 2c30da53..2c32f800 100644
--- a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/front_end/web_links/index.html.erb
+++ b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/front_end/web_links/index.html.erb
@@ -2,7 +2,7 @@
<%= flash_messages %>
-<%= paginate @web_links %>
+<%= paginate @web_links, :params => {:inner => false}%>
<%= t('web_link.list_web_resource') %>
diff --git a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/front_end/web_links/index.js.erb b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/front_end/web_links/index.js.erb
new file mode 100644
index 00000000..c5efda63
--- /dev/null
+++ b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/front_end/web_links/index.js.erb
@@ -0,0 +1 @@
+alert('bob');
\ No newline at end of file
diff --git a/vendor/built_in_modules/web_resource/config/routes.rb b/vendor/built_in_modules/web_resource/config/routes.rb
index fed85983..02c81a82 100644
--- a/vendor/built_in_modules/web_resource/config/routes.rb
+++ b/vendor/built_in_modules/web_resource/config/routes.rb
@@ -13,7 +13,6 @@ Rails.application.routes.draw do
resources :tags
end
namespace :front_end do
- root :to => "web_links#index"
resources :web_links
end
namespace :widget do
diff --git a/vendor/built_in_modules/web_resource/web_resource.json b/vendor/built_in_modules/web_resource/web_resource.json
index c27bf731..f87f06a2 100644
--- a/vendor/built_in_modules/web_resource/web_resource.json
+++ b/vendor/built_in_modules/web_resource/web_resource.json
@@ -7,6 +7,6 @@
"update_info": "Some info",
"create_date": "11-11-2011",
"app_pages": ["web_links"],
- "widgets": ["web_links", "home_list"],
+ "widgets": ["home_list"],
"enable_frontend": true
}