diff --git a/Gemfile b/Gemfile index 07a50937..1e2a6448 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source 'http://rubygems.org' -gem 'rails' +gem 'rails', "~> 3.2.9" gem "brakeman" gem 'mime-types' @@ -11,7 +11,7 @@ gem "net-ldap", "~> 0.3.1" gem 'devise', '1.5.3' gem 'exception_notification' # Send error trace gem 'execjs' -gem 'jquery-rails' +gem 'jquery-rails', '2.1.4' gem 'jquery-ui-rails' gem 'kaminari', :git => 'git://github.com/amatsuda/kaminari.git' diff --git a/app/assets/javascripts/desktop.js b/app/assets/javascripts/desktop.js index e5e4a05a..d8d67107 100644 --- a/app/assets/javascripts/desktop.js +++ b/app/assets/javascripts/desktop.js @@ -15,4 +15,3 @@ //= require orbitTimeline //= require orbitdesktop //= require desktop/books_pages -//= require desktop/seminar_pages diff --git a/app/assets/javascripts/inc/attribute_onoff.js b/app/assets/javascripts/inc/attribute_onoff.js index f1541a11..0c22901c 100644 --- a/app/assets/javascripts/inc/attribute_onoff.js +++ b/app/assets/javascripts/inc/attribute_onoff.js @@ -1,14 +1,14 @@ function checkSwitch() { - $(".groups").each(function() { - $(this).find('.form-horizontal > .hide').length < $(this).find('.form-horizontal > div').length ? $(this).removeClass("disabled") : $(this).addClass("disabled") - }); + // $(".groups").each(function() { + // $(this).find('.form-horizontal > .hide').length < $(this).find('.form-horizontal > div').length ? $(this).removeClass("disabled") : $(this).addClass("disabled") + // }); // $(".groups").addClass('disabled').has('.groups > .form-horizontal > div:not(.hide)').removeClass('disabled'); } $(document).ready(function(){ - checkSwitch(); + // checkSwitch(); $('.onoff').click(function () { - if($(this).parents("h4").length==1) { + if($(this).parent("h4").length==1) { $(this).parents(".map-block").toggleClass("disabled"); $(this).parents(".map-block").find(".form-horizontal").toggleClass("hide"); if($(this).parents(".map-block").hasClass("disabled")){ @@ -19,17 +19,17 @@ $(document).ready(function(){ $(this).siblings(".subrole_disable_field").val("false"); } } - if($(this).parents("legend").length==1) { + if($(this).parent("legend").length==1) { $(this).toggleClass("disabled"); - $(this).parents("legend").next("div").toggleClass("hide"); - if($(this).parents("legend").next("div").hasClass("hide")){ + $(this).parent("legend").next("div").toggleClass("hide"); + if($(this).parent("legend").next("div").hasClass("hide")){ $(this).text("OFF"); $(this).siblings(".subrole_disable_field").val("true"); }else{ $(this).text("ON"); $(this).siblings(".subrole_disable_field").val("false"); } - checkSwitch(); + // checkSwitch(); } return false; }); diff --git a/app/assets/javascripts/mobile/orbit.mobile.js.erb b/app/assets/javascripts/mobile/orbit.mobile.js.erb index 2a567730..90531899 100644 --- a/app/assets/javascripts/mobile/orbit.mobile.js.erb +++ b/app/assets/javascripts/mobile/orbit.mobile.js.erb @@ -25,8 +25,8 @@ $('#index').live('pageinit',function(){ $(".slideImg").muImageResize({width: $globalW, height: Math.floor($globalW/720*240)}); $(this).find(".newpic img").muImageResize({width: 280, height: 200}); $('.slideshow').cycle({ - fx:'scrollLeft', - timeout: 6000, + fx: $effect, + timeout: $timeout }); $(".newlist").css({ "width" : $(".newitem").outerWidth()*(Math.floor($globalW/$(".newitem").outerWidth()))+30, @@ -40,8 +40,9 @@ $('#index').live('pageinit',function(){ $('#announcement_content').live('pageinit',function(){ $(this).find(".newpic img").muImageResize({width: 320, height: 220}); }); -var mobileDemo = { 'center': '24.987449, 121.576117', 'zoom': 17 }; + $('#map').live('pageinit', function() { + var mobileDemo = { 'center': $map_center, 'zoom': $map_zoom }; var $windowH = $(window).height(); $("#map_canvas").css({ 'height' : $windowH, @@ -50,7 +51,7 @@ $('#map').live('pageinit', function() { $('#map_canvas').gmap({'center': mobileDemo.center, 'zoom': mobileDemo.zoom, 'disableDefaultUI':false, 'callback': function() { var self = this; self.addMarker({'position': this.get('map').getCenter() }).click(function() { - self.openInfoWindow({ 'content': "<%= I18n.t('mobile.location_description') %>" }, this); + self.openInfoWindow({ 'content': $info }, this); }); }}); }).load('basic_map'); diff --git a/app/assets/javascripts/new_admin.js b/app/assets/javascripts/new_admin.js index c5ec022e..965a61b7 100644 --- a/app/assets/javascripts/new_admin.js +++ b/app/assets/javascripts/new_admin.js @@ -9,7 +9,6 @@ //= require jquery.form //= require bootstrap //= require jquery.masonry.min -//= require jquery.isotope.min //= require jquery.tinyscrollbar.min //= require orbit-1.0 //= require tinymce-jquery diff --git a/app/assets/javascripts/orbit-bar-search.js b/app/assets/javascripts/orbit-bar-search.js index cc422b12..265cd92b 100644 --- a/app/assets/javascripts/orbit-bar-search.js +++ b/app/assets/javascripts/orbit-bar-search.js @@ -1,28 +1,42 @@ -$(document).on('click', '.orbit-bar-search', function (){ - if ($(this).parents('.search').hasClass('visible')){ - $(this).parents('.search').stop().animate({ - 'width':'28px', - },500); - $('.navbar-search').stop().animate({ - 'left':'30px', - 'opacity':'0', - },200); - $(this).parents('.search').css({ - 'background-color': 'transparent', - }); - $(this).parents('.search').removeClass('visible'); - } - else{ - $(this).parents('.search').stop().animate({ - 'width':'265px', - },200); - $('.navbar-search').stop().animate({ - 'left':'7px', - 'opacity':'1' - },500); - $(this).parents('.search').css({ - 'background-color': 'rgba(0, 0, 0, 0.5)', - }); - $(this).parents('.search').addClass('visible'); - } -}); \ No newline at end of file + +$(document).ready(function(){ + $('.search').tooltip({ + placement: "bottom" + }); +}); +$(document).on('mouseenter', '.orbit-bar-search', function (){ + $(this).parents('.search').stop().animate({ + 'width':'265px', + },200); + $('.navbar-search').stop().animate({ + 'left':'4px', + 'opacity':'1' + },500); + $(this).parents('.search').css({ + 'background-color': 'rgba(0, 0, 0, 0.5)', + }); + $(this).parents('.search').addClass('visible'); +}); + + +$(document).on('mouseleave', '.search.visible', function (){ + $(this).stop().animate({ + 'width':'28px', + },500); + $('.navbar-search').stop().animate({ + 'left':'30px', + 'opacity':'0', + },200); + $(this).css({ + 'background-color': 'transparent', + }); + $(this).removeClass('visible'); +}); + +$(document).on("mouseenter",".orbit-bar-language, .language-menu",function(){ + $(this).parents('.language').addClass("open") +}) + +$(document).on("mouseleave",".orbit-bar-language, .language-menu",function(){ + $(this).parents('.language').removeClass("open") +}) diff --git a/app/assets/javascripts/site_editor.js b/app/assets/javascripts/site_editor.js index 5d77e701..3c7281bd 100644 --- a/app/assets/javascripts/site_editor.js +++ b/app/assets/javascripts/site_editor.js @@ -10,7 +10,6 @@ //= require jquery.ui.sortable //= require jquery_ujs //= require bootstrap -//= require jquery.isotope.min //= require jquery.tinyscrollbar.min //= require orbit-1.0 //= require orbit-bar-search diff --git a/app/assets/stylesheets/admin/default_widget_setting.css b/app/assets/stylesheets/admin/default_widget_setting.css index 8bbe4a50..6db0cc82 100644 --- a/app/assets/stylesheets/admin/default_widget_setting.css +++ b/app/assets/stylesheets/admin/default_widget_setting.css @@ -29,3 +29,7 @@ label{ margin: 0 0 0 -25px; white-space: normal; } + +label{ + white-space: nowrap !important ; +} diff --git a/app/assets/stylesheets/new_admin.css.erb b/app/assets/stylesheets/new_admin.css.erb index 2cb340da..325e9cb5 100644 --- a/app/assets/stylesheets/new_admin.css.erb +++ b/app/assets/stylesheets/new_admin.css.erb @@ -13,7 +13,6 @@ *= require list *= require widget *= require scroll_style - *= require isotope *= require icons *= require site-map *= require lib/bootstrap-datetimepicker diff --git a/app/controllers/admin/infos_controller.rb b/app/controllers/admin/infos_controller.rb index d6325ef0..c35f2246 100644 --- a/app/controllers/admin/infos_controller.rb +++ b/app/controllers/admin/infos_controller.rb @@ -11,7 +11,10 @@ class Admin::InfosController < ApplicationController @roles = Role.excludes('disabled' => true) - render :template => 'admin/attributes/index' + # render :template => 'admin/attributes/index' + + redirect_to(edit_admin_info_path(Info.first.id.to_s)) + end def show diff --git a/app/controllers/admin/page_parts_controller.rb b/app/controllers/admin/page_parts_controller.rb index 6442d2fc..21050985 100644 --- a/app/controllers/admin/page_parts_controller.rb +++ b/app/controllers/admin/page_parts_controller.rb @@ -56,14 +56,12 @@ class Admin::PagePartsController < ApplicationController def update @part = PagePart.find(params[:id]) - params[:page_part][:widget_field] = params[:page_part][:widget_field].zip( params[:page_part][:widget_field_type] ) if params[:page_part][:widget_field] - params[:page_part][:widget_field_type] = nil - - if params[:page_part][:module_app].blank? - params[:page_part][:module_app] = nil - params[:page_part][:kind] = nil - end + params[:page_part][:widget_field] = params[:page_part][:widget_field].zip( params[:page_part][:widget_field_type] ) if params[:page_part][:widget_field] + params[:page_part][:widget_field_type] = nil + if params[:page_part][:module_app].blank? + params[:page_part][:module_app] = nil + end if @part.update_attributes(params[:page_part]) set_children_sub_menu(@part) if @part.public_r_tag && @part.public_r_tag.eql?('sub_menu') flash.now[:notice] = t('update.success.content') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index b0fc4adb..7f4ea0fa 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -130,7 +130,7 @@ class ApplicationController < ActionController::Base respond_to do |format| format.html { render :text => parse_page_content(@item), :layout => 'page_layout' } format.rss { render_main_rss } - format.mobile { redirect_to mobile_path } + format.mobile { redirect_to mobile_path(:app => params[:app]) } end else render :text => '404 Not Found' diff --git a/app/controllers/desktop_publications_controller.000.rb b/app/controllers/desktop_publications_controller.000.rb deleted file mode 100644 index fc3f36ab..00000000 --- a/app/controllers/desktop_publications_controller.000.rb +++ /dev/null @@ -1,75 +0,0 @@ -class DesktopPublicationsController< ApplicationController - def journal_p - render "desktop/journal_p", :layout => false - end - - def journal_p_list - render "desktop/journal_pages/list", :layout => false - end - - def journal_p_add - debugger - render "desktop/journal_pages/add", :layout => false - end - - def books - render "desktop/books", :layout => false - end - - def books_list - render "desktop/books/list", :layout => false - end - - def books_add - render "desktop/books/add", :layout => false - end - - def seminar_p - render "desktop/seminar_p", :layout => false - end - - def seminar_p_list - render "desktop/seminar_pages/list", :layout => false - end - - def seminar_p_add - render "desktop/seminar_pages/add", :layout => false - end - - def create_journal - Journal.create(user_id: current_user.id, title: "Ice Cream Sandwich") - b = Array.new - b << {"success"=>"true"} - render :json=>b.to_json - end - - def getjournals - @journals = current_user.journals - data = Array.new - @journals.each do |journal| - @papers = journal.papers.all - data << {"title" => journal.title, "papers" => @papers} - end - render :json=>data.to_json - end - - def delete_journal - @journals = Journal.find("") - @journals.delete - b = Array.new - b << {"success"=>"true"} - render :json=>b.to_json - end - - def update_journal - @journal = Journal.find("4ff2d6ebbd98eb02b9000017") - @papers = @journal.papers - @papers.each do |paper| - paper.update_attributes(:user_id => current_user.id) - end - b = Array.new - - b << {"success"=>"true"} - render :json=>b.to_json - end -end diff --git a/app/controllers/desktop_publications_controller.rb b/app/controllers/desktop_publications_controller.rb index ae77ed19..918b99e2 100644 --- a/app/controllers/desktop_publications_controller.rb +++ b/app/controllers/desktop_publications_controller.rb @@ -1,10 +1,6 @@ require 'mime/types' class DesktopPublicationsController< ApplicationController - #def journal_p - # render "desktop/journal_p", :layout => false - #end - def books render "desktop/books", :layout => false end @@ -16,44 +12,4 @@ class DesktopPublicationsController< ApplicationController def books_add render "desktop/books/add", :layout => false end - - def seminar_p - render "desktop/seminar_p", :layout => false - end - - def seminar_p_list - render "desktop/seminar_pages/list", :layout => false - end - - def seminar_p_add - render "desktop/seminar_pages/add", :layout => false - end - -# def create_journal -# Journal.create(user_id: current_user.id, title: "Ice Cream Sandwich") -# b = Array.new -# b << {"success"=>"true"} -# render :json=>b.to_json -# end -# -# -# def delete_journal -# @journals = Journal.find("") -# @journals.delete -# b = Array.new -# b << {"success"=>"true"} -# render :json=>b.to_json -# end -# -# def update_journal -# @journal = Journal.find("4ff2d6ebbd98eb02b9000017") -# @papers = @journal.papers -# @papers.each do |paper| -# paper.update_attributes(:user_id => current_user.id) -# end -# b = Array.new -# -# b << {"success"=>"true"} -# render :json=>b.to_json -# end end diff --git a/app/controllers/mobile_controller.rb b/app/controllers/mobile_controller.rb index d07e9a87..369bfa22 100644 --- a/app/controllers/mobile_controller.rb +++ b/app/controllers/mobile_controller.rb @@ -54,7 +54,7 @@ class MobileController < ApplicationController protected def no_footer_for_app - @no_footer = true if request.path.starts_with?("/app") + @no_footer = true if request.path =~ /app/ end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 980db7bc..655a2090 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -203,7 +203,6 @@ module ApplicationHelper javascripts << "\n" javascripts << "\n" javascripts << "\n" - javascripts << "\n" javascripts << "\n" javascripts << "\n" javascripts << "\n" diff --git a/app/views/admin/attributes/edit.html.erb b/app/views/admin/attributes/edit.html.erb index b3cc2bb8..aa87d73c 100644 --- a/app/views/admin/attributes/edit.html.erb +++ b/app/views/admin/attributes/edit.html.erb @@ -54,7 +54,7 @@
- <%= f.submit t(:save),:class=>"btn btn-primary"%> + <%= f.submit t(:submit),:class=>"btn btn-primary"%> <%= link_to t('cancel'), get_go_back, :class=>"btn" %>
<% end %> diff --git a/app/views/admin/page_parts/_default_widget_style_panel.html.erb b/app/views/admin/page_parts/_default_widget_style_panel.html.erb index 49d40214..bc6fc89c 100644 --- a/app/views/admin/page_parts/_default_widget_style_panel.html.erb +++ b/app/views/admin/page_parts/_default_widget_style_panel.html.erb @@ -26,7 +26,7 @@ <%= radio_button_tag field_name,"typeB_style2",style_checked_value(object,"typeB_style2") %> 2 <%=image_tag 'module/default_widgets/style02.png'%> - <%= t("default_widget.caption.typeA") %> + <%= t("default_widget.caption.typeB_style2") %>
  • diff --git a/app/views/admin/roles/role_field.html.erb b/app/views/admin/roles/role_field.html.erb index 43880fac..31269133 100644 --- a/app/views/admin/roles/role_field.html.erb +++ b/app/views/admin/roles/role_field.html.erb @@ -21,7 +21,7 @@
    <%#= f.hidden_field :id, :value => params[:role_id] if !params[:role_id].blank? %> <%= hidden_field_tag 'id', params[:role_id] if !params[:role_id].blank? %> - <%= f.submit t(:save),:class=>"btn btn-primary"%> + <%= f.submit t(:submit),:class=>"btn btn-primary"%> <%= link_to t('cancel'), get_go_back, :class=>"btn" %>
    diff --git a/app/views/admin/roles/sub_role_field.html.erb b/app/views/admin/roles/sub_role_field.html.erb index de741270..38b1e5e8 100644 --- a/app/views/admin/roles/sub_role_field.html.erb +++ b/app/views/admin/roles/sub_role_field.html.erb @@ -21,7 +21,7 @@
    <%#= f.hidden_field :id, :value => params[:role_id] if !params[:role_id].blank? %> <%= hidden_field_tag 'sub_role[id]', params[:role_id] if !params[:role_id].blank? %> - <%= f.submit t(:save),:class=>"btn btn-primary"%> + <%= f.submit t(:submit),:class=>"btn btn-primary"%> <%= link_to t('cancel'), get_go_back, :class=>"btn" %>
    diff --git a/app/views/admin/users_new_interface/_form.html.erb b/app/views/admin/users_new_interface/_form.html.erb index 76f304fa..d11de282 100644 --- a/app/views/admin/users_new_interface/_form.html.erb +++ b/app/views/admin/users_new_interface/_form.html.erb @@ -11,7 +11,7 @@ diff --git a/app/views/admin/users_new_interface/edit.html.erb b/app/views/admin/users_new_interface/edit.html.erb index 2312f2bb..bec97ce8 100644 --- a/app/views/admin/users_new_interface/edit.html.erb +++ b/app/views/admin/users_new_interface/edit.html.erb @@ -5,7 +5,6 @@ <% content_for :page_specific_css do -%> <%= stylesheet_link_tag "member" %> <%= stylesheet_link_tag "site-map" %> - <%= stylesheet_link_tag "isotope" %> <% end -%> <% content_for :page_specific_javascript do -%> <%= javascript_include_tag "/static/jquery.cycle.all.latest.js" %> diff --git a/app/views/admin/users_new_interface/new.html.erb b/app/views/admin/users_new_interface/new.html.erb index 2d6fc612..a8b6503a 100644 --- a/app/views/admin/users_new_interface/new.html.erb +++ b/app/views/admin/users_new_interface/new.html.erb @@ -5,7 +5,6 @@ <% content_for :page_specific_css do -%> <%= stylesheet_link_tag "member" %> <%= stylesheet_link_tag "site-map" %> - <%= stylesheet_link_tag "isotope" %> <% end -%> <% content_for :page_specific_javascript do -%> <%= javascript_include_tag "/static/jquery.cycle.all.latest.js" %> diff --git a/app/views/admin/users_new_interface/temp_edit.html.erb b/app/views/admin/users_new_interface/temp_edit.html.erb index f9bef61c..2e401296 100644 --- a/app/views/admin/users_new_interface/temp_edit.html.erb +++ b/app/views/admin/users_new_interface/temp_edit.html.erb @@ -5,7 +5,6 @@ <% content_for :page_specific_css do -%> <%= stylesheet_link_tag "member" %> <%= stylesheet_link_tag "site-map" %> - <%= stylesheet_link_tag "isotope" %> <% end -%> <% content_for :page_specific_javascript do -%> <%= javascript_include_tag "/static/jquery.cycle.all.latest.js" %> diff --git a/app/views/desktop/index.html.erb b/app/views/desktop/index.html.erb index 01903447..7446117b 100644 --- a/app/views/desktop/index.html.erb +++ b/app/views/desktop/index.html.erb @@ -13,7 +13,7 @@
  • Journal Papers
  • -
  • Seminar Papers
  • +
  • Conference Papers
  • Books
  • @@ -103,3 +103,4 @@ o.notify("Welcome "+o.currentUsername+"!!","alert",3); <%= javascript_include_tag "personal_journal" %> +<%= javascript_include_tag "personal_conference" %> diff --git a/app/views/desktop/patents/add.html.erb b/app/views/desktop/patents/add.html.erb index 190e8abd..28283456 100644 --- a/app/views/desktop/patents/add.html.erb +++ b/app/views/desktop/patents/add.html.erb @@ -41,10 +41,10 @@
    -
    -
    -
    - -
    -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/app/views/layouts/_orbit_bar.html.erb b/app/views/layouts/_orbit_bar.html.erb index 36638302..7d20daf1 100644 --- a/app/views/layouts/_orbit_bar.html.erb +++ b/app/views/layouts/_orbit_bar.html.erb @@ -10,25 +10,19 @@