From b8ee2fd5592d2942fd2b82e7c26d3f7cfd03c56a Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Tue, 12 Mar 2013 15:23:38 +0800 Subject: [PATCH] compatibility page added and tinyscrollbar drag event fixed.. --- app/assets/javascripts/jquery.tinyscrollbar.js | 1 + app/assets/javascripts/orbitdesktop.js | 7 ++++--- app/controllers/desktop_controller.rb | 4 ++++ app/views/desktop/compatibility.html.erb | 1 + app/views/layouts/compatibility.html.erb | 15 +++++++++++++++ app/views/layouts/desktop.html.erb | 7 +++++++ config/routes.rb | 1 + 7 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 app/views/desktop/compatibility.html.erb create mode 100644 app/views/layouts/compatibility.html.erb diff --git a/app/assets/javascripts/jquery.tinyscrollbar.js b/app/assets/javascripts/jquery.tinyscrollbar.js index d0e843c6..125c89d4 100644 --- a/app/assets/javascripts/jquery.tinyscrollbar.js +++ b/app/assets/javascripts/jquery.tinyscrollbar.js @@ -217,6 +217,7 @@ oContent.obj.css( sDirection, -iScroll ); oThumb.obj.css( sDirection, iPosition.now ); } + options.onMove.call(this,get_destance_from_end()); } function end() diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js index 3bf5f91e..33217d25 100755 --- a/app/assets/javascripts/orbitdesktop.js +++ b/app/assets/javascripts/orbitdesktop.js @@ -604,12 +604,12 @@ var orbitDesktop = function(dom){ // } // } // }); - + o.simple_drop_down(); o.tinyscrollbar_ext({ main: '.tinycanvas' }) - o.simple_drop_down(); + // $("div#group_wrapper ul li[data-category=app]").click(function(){ // o.appWindow({ // title : $(this).find("a").attr("href"), @@ -1441,7 +1441,8 @@ var orbitDesktop = function(dom){ } var settings = {"axis":"x"}; - $.map(tinysettings,function(val,i){ settings[i] = val }) + if(typeof tinysettings != "undefined") + $.map(tinysettings,function(val,i){ settings[i] = val }) var count,baseWidth,fillArray,pxs; if( typeof target.fill == 'string' ){ diff --git a/app/controllers/desktop_controller.rb b/app/controllers/desktop_controller.rb index cf732c5a..c995689d 100644 --- a/app/controllers/desktop_controller.rb +++ b/app/controllers/desktop_controller.rb @@ -10,6 +10,10 @@ class DesktopController< ApplicationController @title = "Desktop - " + @currentusername @section = @desktop.sections.first end + + def compatibility + render :layout => "compatibility" + end def desktop render :layout => false diff --git a/app/views/desktop/compatibility.html.erb b/app/views/desktop/compatibility.html.erb new file mode 100644 index 00000000..94f6d7ee --- /dev/null +++ b/app/views/desktop/compatibility.html.erb @@ -0,0 +1 @@ +You have a bad browser ...!!! \ No newline at end of file diff --git a/app/views/layouts/compatibility.html.erb b/app/views/layouts/compatibility.html.erb new file mode 100644 index 00000000..a8c0f9ec --- /dev/null +++ b/app/views/layouts/compatibility.html.erb @@ -0,0 +1,15 @@ + + + + + Error + <%= stylesheet_link_tag "desktop" %> + <%= yield :page_specific_css %> + + <%= csrf_meta_tag %> + + + <%= render 'layouts/orbit_bar' %> + <%= yield %> + + diff --git a/app/views/layouts/desktop.html.erb b/app/views/layouts/desktop.html.erb index 628c0b3f..2d14d511 100644 --- a/app/views/layouts/desktop.html.erb +++ b/app/views/layouts/desktop.html.erb @@ -1,6 +1,13 @@ + + + <%= @title || APP_CONFIG['orbit'] %>