From 328277394dc2bf592edc7c59cb7459231659c59f Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Mon, 12 Jan 2015 11:53:29 +0530 Subject: [PATCH 01/14] fix for rake... --- lib/tasks/register_with_store.rake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tasks/register_with_store.rake b/lib/tasks/register_with_store.rake index 9e76058..0abddda 100644 --- a/lib/tasks/register_with_store.rake +++ b/lib/tasks/register_with_store.rake @@ -2,10 +2,10 @@ namespace :register_with_store do task :register,[:arg] => :environment do |task,args| modules = ModuleApp.all ids = modules.collect{|ma| ma.key} - store_token = Site.first.store_token - module_apps = ModuleApp.all - exceptions = OrbitStore::MODULE_EXCEPTIONS + store_token = Site.first.store_token rescue nil if !store_token.nil? + module_apps = ModuleApp.all + exceptions = OrbitStore::MODULE_EXCEPTIONS params_to_send = {'store_token' => store_token, "apps" => ids} uri = URI.parse(OrbitStore::URL) http = Net::HTTP.new(uri.host,uri.port) From 3532ec67a965bbfedd2b481f1fbaf1a49327e826 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Mon, 12 Jan 2015 12:19:52 +0530 Subject: [PATCH 02/14] some error fixed for checking permissions --- lib/orbit_app/register_module.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/orbit_app/register_module.rb b/lib/orbit_app/register_module.rb index ad9b2da..58c0ece 100644 --- a/lib/orbit_app/register_module.rb +++ b/lib/orbit_app/register_module.rb @@ -22,10 +22,10 @@ module OrbitApp end def check_module_permissions - store_token = Site.first.store_token - module_apps = ModuleApp.all - exceptions = OrbitStore::MODULE_EXCEPTIONS + store_token = Site.first.store_token rescue nil if !store_token.nil? + module_apps = ModuleApp.all + exceptions = OrbitStore::MODULE_EXCEPTIONS ids = [] module_index = {} module_apps.each do |ma| From 35e203c476eaa51bd348b478b993ed065cbe5029 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Mon, 12 Jan 2015 12:24:28 +0530 Subject: [PATCH 03/14] fix --- lib/orbit_app/register_module.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/orbit_app/register_module.rb b/lib/orbit_app/register_module.rb index 58c0ece..7c62298 100644 --- a/lib/orbit_app/register_module.rb +++ b/lib/orbit_app/register_module.rb @@ -23,9 +23,9 @@ module OrbitApp def check_module_permissions store_token = Site.first.store_token rescue nil + module_apps = ModuleApp.all + exceptions = OrbitStore::MODULE_EXCEPTIONS if !store_token.nil? - module_apps = ModuleApp.all - exceptions = OrbitStore::MODULE_EXCEPTIONS ids = [] module_index = {} module_apps.each do |ma| From e616c4b947b9f8718991af67c3c6279a0050c916 Mon Sep 17 00:00:00 2001 From: spen Date: Tue, 20 Jan 2015 15:27:43 +0800 Subject: [PATCH 04/14] fix member pic name --- app/controllers/members_controller.rb | 2 +- app/views/admin/member_selects/select_emails.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb index 317bc7a..7ea2111 100644 --- a/app/controllers/members_controller.rb +++ b/app/controllers/members_controller.rb @@ -158,7 +158,7 @@ class MembersController < ApplicationController plugin_datas = plugin_data.where(:is_hidden=>false).desc(:year).collect do |p| { - "pd_datas" => [{ "data_title" => "#{p.create_link}" }] + "pd_datas" => [{ "data_title" => "#{p.create_link}" }] } end diff --git a/app/views/admin/member_selects/select_emails.html.erb b/app/views/admin/member_selects/select_emails.html.erb index 69cdeb3..5cc4413 100644 --- a/app/views/admin/member_selects/select_emails.html.erb +++ b/app/views/admin/member_selects/select_emails.html.erb @@ -39,7 +39,7 @@ <% next if profile.email.nil? %>
  • <%= check_box_tag 'email_user_ids[]', profile.id , false %> From 0c62c4b994eea5e65bd0957055096d810ab547db Mon Sep 17 00:00:00 2001 From: manson Date: Fri, 6 Feb 2015 17:36:37 +0800 Subject: [PATCH 05/14] fix development mode not using precompiled aseets --- config/environments/development.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/config/environments/development.rb b/config/environments/development.rb index ae34a24..2ddb972 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -24,6 +24,7 @@ Orbit::Application.configure do # This option may cause significant delays in view rendering with a large # number of complex assets. config.assets.debug = true + config.assets.digest = true config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { :address => "localhost", :port => 1025 } config.action_mailer.default_url_options = { host: "localhost:3000", protocol: "http" } From 1aa5739380d6ec277b3a2bb111946546b6247728 Mon Sep 17 00:00:00 2001 From: manson Date: Fri, 6 Feb 2015 18:05:05 +0800 Subject: [PATCH 06/14] add all JS and CSS to precompile --- config/environments/production.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 214bbef..23a78fc 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -60,7 +60,8 @@ Orbit::Application.configure do # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. # config.assets.precompile += %w( search.js ) - config.assets.precompile += %w( ckeditor/* ) + # config.assets.precompile += %w( ckeditor/* ) + config.assets.precompile += %w( *.js *.css *.js.* *.css.* ckeditor/* ) # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. From 98627222523ad85a879e14b08d6d8650ff6f7aa0 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Mon, 9 Feb 2015 15:09:16 +0530 Subject: [PATCH 07/14] url fixed for license --- app/views/store_api/render_license_denied.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/store_api/render_license_denied.html.erb b/app/views/store_api/render_license_denied.html.erb index 1f3535a..35caaee 100644 --- a/app/views/store_api/render_license_denied.html.erb +++ b/app/views/store_api/render_license_denied.html.erb @@ -15,5 +15,5 @@ \ No newline at end of file From 17213fb41f745faba28f8ae9dc57866450cb6f95 Mon Sep 17 00:00:00 2001 From: JiangRu Date: Wed, 25 Feb 2015 11:06:58 +0800 Subject: [PATCH 08/14] if no data , hide title&table --- .../orbit_bootstrap/modules/announcement/annc_index1.html.erb | 2 +- .../orbit_bootstrap/modules/announcement/annc_index2.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/orbit_bootstrap/modules/announcement/annc_index1.html.erb b/app/templates/orbit_bootstrap/modules/announcement/annc_index1.html.erb index d9a8168..1291f72 100644 --- a/app/templates/orbit_bootstrap/modules/announcement/annc_index1.html.erb +++ b/app/templates/orbit_bootstrap/modules/announcement/annc_index1.html.erb @@ -1,4 +1,4 @@ -
    +

    {{page-title}}

    diff --git a/app/templates/orbit_bootstrap/modules/announcement/annc_index2.html.erb b/app/templates/orbit_bootstrap/modules/announcement/annc_index2.html.erb index e4338f2..6758b88 100644 --- a/app/templates/orbit_bootstrap/modules/announcement/annc_index2.html.erb +++ b/app/templates/orbit_bootstrap/modules/announcement/annc_index2.html.erb @@ -1,4 +1,4 @@ -
    +

    {{page-title}}

    • From f3e9679e546939b5e1c880e4bd2de2817cc37648 Mon Sep 17 00:00:00 2001 From: Ray Date: Thu, 26 Feb 2015 15:01:06 +0800 Subject: [PATCH 09/14] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8F=B3=E4=B8=8A?= =?UTF-8?q?=E8=A7=92=E7=9A=84=E6=96=B0=E5=A2=9E=E6=8C=89=E9=88=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 使用方式是當 render filter 在最後放個 true 範例:<%= render_filter @filter_fields, "index_table", true %> --- app/helpers/orbit_backend_helper.rb | 4 ++-- app/views/shared/_filter.html.erb | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/helpers/orbit_backend_helper.rb b/app/helpers/orbit_backend_helper.rb index 25eb17a..ebfd762 100644 --- a/app/helpers/orbit_backend_helper.rb +++ b/app/helpers/orbit_backend_helper.rb @@ -95,8 +95,8 @@ module OrbitBackendHelper render :partial => '/admin/tags/tag_form', :locals => {:f=> f, :module_app=>module_app, :tags=>module_app.tags } end - def render_filter(fields, search_dom_id=nil) - render :partial => "shared/filter", :locals =>{:fields => fields, :search_dom_id=>search_dom_id} + def render_filter(fields, search_dom_id=nil, quick_new=false) + render :partial => "shared/filter", :locals =>{:fields => fields, :search_dom_id=>search_dom_id, :quick_new=>quick_new} end def display_visitors(options={}) diff --git a/app/views/shared/_filter.html.erb b/app/views/shared/_filter.html.erb index d476c05..a19ebaa 100644 --- a/app/views/shared/_filter.html.erb +++ b/app/views/shared/_filter.html.erb @@ -1,13 +1,15 @@ <% content_for :right_nav do %> <% if !search_dom_id.nil?%> -
      + <% if quick_new %> + <%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), request.original_fullpath + '/new', class: "btn btn-primary pull-left", style: "clear: left;"%> + <% end %> +
      style="clear: left;"<% end %>>
      <% end %> -
    - - - + + + - <%= render :partial => 'design', :collection => @designs %> \ No newline at end of file diff --git a/app/views/admin/designs/index.html.erb b/app/views/admin/designs/index.html.erb index 7ab5ccc..70a47c1 100644 --- a/app/views/admin/designs/index.html.erb +++ b/app/views/admin/designs/index.html.erb @@ -1,122 +1,14 @@ - <%= stylesheet_link_tag "lib/wrap-nav"%> - <%= stylesheet_link_tag "lib/main-list"%> - <%= stylesheet_link_tag "lib/mt-list"%> - <%= stylesheet_link_tag "lib/filter"%> - <%= stylesheet_link_tag "lib/togglebox"%> + <%= stylesheet_link_tag "lib/wrap-nav"%> + <%= stylesheet_link_tag "lib/main-list"%> + <%= stylesheet_link_tag "lib/mt-list"%> + <%= stylesheet_link_tag "lib/filter"%> + <%= stylesheet_link_tag "lib/togglebox"%> + <%= stylesheet_link_tag "admin/store"%> - <%= javascript_include_tag 'lib/footable-0.1' %> - <%= javascript_include_tag 'lib/all-list' %> - <%= javascript_include_tag 'lib/retina' %> - + <%= javascript_include_tag 'lib/footable-0.1' %> + <%= javascript_include_tag 'lib/all-list' %> + <%= javascript_include_tag 'lib/retina' %> @@ -129,53 +21,56 @@ <%= image_tag("preloader.gif", size: "50") %> - -
    - -
    -
    -
    <%= t(:installed_templates) %>
    -
    -
    <%= design['title'] %>
    + <%= design['title'] %>
    -

    <%= design['author'] %>

    + <%= design['author'] %>
    <%= radio_button_tag 'design_default', design['key'], (current_site.template && current_site.template.eql?(design['key']) ? true : false), :class => 'design_default toggle-check', :rel => admin_site_change_design_path(:site_id=>current_site.id, :design_key=>design['key']) %> diff --git a/app/views/admin/designs/_designs.html.erb b/app/views/admin/designs/_designs.html.erb index 16ff916..7a2c2b3 100644 --- a/app/views/admin/designs/_designs.html.erb +++ b/app/views/admin/designs/_designs.html.erb @@ -1,11 +1,10 @@
    Templates TitleDesignerStatusTemplates TitleDesignerStatus
    - - <%= render 'designs' %> - -
    -
    - +
    - - -
    -
    -
    <%= t(:template_store) %>
    -
    - <%= render :partial => "admin/store/store", :locals => {:section => "templates"} %> -
    - +
    + -
    -
    - - - -
    - <%#= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t(:upload), upload_package_admin_designs_path, :class => 'btn btn-primary pull-right' %> + <%= render :partial => "admin/store/store", :locals => {:section => "templates"} %> +
    +
    + + + + + <%#= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t(:upload), upload_package_admin_designs_path, :class => 'btn btn-primary pull-right' %> + \ No newline at end of file diff --git a/app/views/admin/module_store/index.html.erb b/app/views/admin/module_store/index.html.erb index 1b1614f..a053f70 100644 --- a/app/views/admin/module_store/index.html.erb +++ b/app/views/admin/module_store/index.html.erb @@ -1,139 +1,14 @@ - <%= stylesheet_link_tag "lib/wrap-nav"%> - <%= stylesheet_link_tag "lib/main-list"%> - <%= stylesheet_link_tag "lib/mt-list"%> - <%= stylesheet_link_tag "lib/filter"%> - <%= stylesheet_link_tag "lib/togglebox"%> + <%= stylesheet_link_tag "lib/wrap-nav"%> + <%= stylesheet_link_tag "lib/main-list"%> + <%= stylesheet_link_tag "lib/mt-list"%> + <%= stylesheet_link_tag "lib/filter"%> + <%= stylesheet_link_tag "lib/togglebox"%> + <%= stylesheet_link_tag "admin/store"%> - <%= javascript_include_tag 'lib/footable-0.1' %> - <%= javascript_include_tag 'lib/all-list' %> - <%= javascript_include_tag 'lib/retina' %> - + <%= javascript_include_tag 'lib/footable-0.1' %> + <%= javascript_include_tag 'lib/all-list' %> + <%= javascript_include_tag 'lib/retina' %> <%= flash[:notice] rescue nil%> @@ -159,34 +34,32 @@ -
    - -
    -
    -
    <%= t(:installed_modules) %>
    -
    - - - -
    -
    - +
    + +
    +
    +
    +
    -
    - -
    -
    -
    <%= t(:module_store) %>
    -
    - <%= render :partial => "admin/store/store", :locals => {:section => "apps"} %> -
    - -
    -
    - +
    + <%= render :partial => "admin/store/store", :locals => {:section => "apps"} %> +
    +
    +
    +