diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js index f3101e49..17b14841 100755 --- a/app/assets/javascripts/orbitdesktop.js +++ b/app/assets/javascripts/orbitdesktop.js @@ -24,7 +24,7 @@ var orbitDesktop = function(dom){ this.transitionTime = 500; this.currenthtml = "desktop.html"; this.currentface = "home"; - this.desktopData = {"home":"","settings":"","work":"","favorite":"","apps_manager":"","sections":"","journal_p":"","appstore":"","orbit":"","books":"","seminar_p":""}; + this.desktopData = {"home":"","settings":"","work":"","favorite":"","apps_manager":"","sections":"","journal_p":"","appstore":"","orbit":"","books":"","seminar_p":"","research_d":"","research_p":""}; this.tp = ""; this.sectionList; this.initialize = function(){ @@ -146,6 +146,24 @@ var orbitDesktop = function(dom){ }); } }); + $("a#d_research_d").click(function(){ + var target = $(this).attr("href"); + if(o.currenthtml!=target){ + o.desktopData[o.currentface] = $(o.contentHolder).html(); + $("#content").hide("drop",o.transitionTime,function(){ + o.initializeResearchDomain(target); + }); + } + }); + $("a#d_research_p").click(function(){ + var target = $(this).attr("href"); + if(o.currenthtml!=target){ + o.desktopData[o.currentface] = $(o.contentHolder).html(); + $("#content").hide("drop",o.transitionTime,function(){ + o.initializeResearchProject(target); + }); + } + }); $(window).resize(function(){ var ww = $(window).width(); $("img#thmbackground").attr({"width":ww}); @@ -1378,6 +1396,142 @@ var orbitDesktop = function(dom){ bindHandlers(); } } + this.initializeResearchDomain = function(target){ + o.currenthtml = target; + o.currentface = "research_d"; + var bindHandlers = function(){ + $('.s_menu a').on({ + click: function(){ + if(!$(this).hasClass('active')){ + var tfunc = $(this).attr('href'); + switch(tfunc){ + case 'list': + list(); + break; + case 'add': + add_this(); + break; + } + $('.s_menu a').removeClass('thmc1 thmtxt active'); + $(this).addClass('thmc1 thmtxt active'); + } + }, + mouseenter: function(){ + if(!$(this).hasClass('active')){ + $(this).switchClass('admtxt','thmc1 thmtxt',0); + } + }, + mouseleave: function(){ + var t = $(this).hasClass('active') ? '' : 'thmc1 thmtxt'; + $(this).switchClass(t,'admtxt',0); + } + }); + } + var list = function(){ + var bindHandlers = function(){ + o.tinyscrollbar_ext({ + main : ".tinycanvas", + fill : ".list_t" + }) + } + + $("div#research_d div#panel_r").load("/desktop/research_d_list",function(){ + bindHandlers(); + }) + } + var add_this = function(){ + var bindHandlers = function(){ + o.simple_drop_down(); + + o.tinyscrollbar_ext({ + main: '.tinycanvas', + fill: '.s_grid_con' + }) + } + + $("div#research_d div#panel_r").load("/desktop/research_d_add",function(){ + bindHandlers(); + }) + } + if(!o.desktopData[o.currentface]){ + $(o.contentHolder).empty().load("/desktop/"+target,function(){ + list(); + bindHandlers(); + }); + }else{ + $(o.contentHolder).html(o.desktopData[o.currentface]); + list(); + bindHandlers(); + } + } + this.initializeResearchProject = function(target){ + o.currenthtml = target; + o.currentface = "research_p"; + var bindHandlers = function(){ + $('.s_menu a').on({ + click: function(){ + if(!$(this).hasClass('active')){ + var tfunc = $(this).attr('href'); + switch(tfunc){ + case 'list': + list(); + break; + case 'add': + add_this(); + break; + } + $('.s_menu a').removeClass('thmc1 thmtxt active'); + $(this).addClass('thmc1 thmtxt active'); + } + }, + mouseenter: function(){ + if(!$(this).hasClass('active')){ + $(this).switchClass('admtxt','thmc1 thmtxt',0); + } + }, + mouseleave: function(){ + var t = $(this).hasClass('active') ? '' : 'thmc1 thmtxt'; + $(this).switchClass(t,'admtxt',0); + } + }); + } + var list = function(){ + var bindHandlers = function(){ + o.tinyscrollbar_ext({ + main : ".tinycanvas", + fill : ".list_t" + }) + } + + $("div#research_p div#panel_r").load("/desktop/research_p_list",function(){ + bindHandlers(); + }) + } + var add_this = function(){ + var bindHandlers = function(){ + o.simple_drop_down(); + + o.tinyscrollbar_ext({ + main: '.tinycanvas', + fill: '.s_grid_con' + }) + } + + $("div#research_p div#panel_r").load("/desktop/research_p_add",function(){ + bindHandlers(); + }) + } + if(!o.desktopData[o.currentface]){ + $(o.contentHolder).empty().load("/desktop/"+target,function(){ + list(); + bindHandlers(); + }); + }else{ + $(o.contentHolder).html(o.desktopData[o.currentface]); + list(); + bindHandlers(); + } + } this.loadWallpaper = function(wallpaper){ // this is to load new wallpaper if(!wallpaper)wallpapernm = o.themesettings.background;else wallpapernm = wallpaper var ww = $(window).width(); diff --git a/app/controllers/desktop_research_controller.rb b/app/controllers/desktop_research_controller.rb new file mode 100644 index 00000000..5e528762 --- /dev/null +++ b/app/controllers/desktop_research_controller.rb @@ -0,0 +1,26 @@ +class DesktopResearchController< ApplicationController + + def research_d + render "desktop/research_d", :layout=>false + end + def research_d_list + render "desktop/research_domain/list", :layout=>false + end + + def research_d_add + render "desktop/research_domain/add", :layout=>false + end + + def research_p + render "desktop/research_p", :layout=>false + end + def research_p_list + render "desktop/research_project/list", :layout=>false + end + + def research_p_add + render "desktop/research_project/add", :layout=>false + end + + +end \ No newline at end of file diff --git a/app/views/desktop/patents/add.html.erb b/app/views/desktop/patents/add.html.erb new file mode 100644 index 00000000..190e8abd --- /dev/null +++ b/app/views/desktop/patents/add.html.erb @@ -0,0 +1,107 @@ +
+
+ + +
+
+
Year
+
+ +
+
+
+
Language
+
+ +
+
+
+
+
+
+
+
+
+
+
+
    +
  • +
  • + OralPoster
  • +
  • + +
  • + + + + + +
  • + +
  • +
  • + +
+
+
+
    +
  • +
  • + + +
  • + +
  • + +
  • +
  • +
  • +
  • +
  • + + +
+
+
+
    +
  • +
  • +
+
+
+
+
\ No newline at end of file diff --git a/app/views/desktop/patents/list.html.erb b/app/views/desktop/patents/list.html.erb new file mode 100644 index 00000000..e32e4d6c --- /dev/null +++ b/app/views/desktop/patents/list.html.erb @@ -0,0 +1,75 @@ +
+
+
+
+ +
+
+
+
More
+
+ +
+
+
+
Tag
+
+ +
+
+
+
Status
+
+ +
+
+
+
View
+
+ +
+
+
+
Share
+
+ +
+
+
+
+
+
+
+
+
+
+ +
+
+
\ No newline at end of file diff --git a/app/views/desktop/research_d.html.erb b/app/views/desktop/research_d.html.erb new file mode 100644 index 00000000..f9b8bf5c --- /dev/null +++ b/app/views/desktop/research_d.html.erb @@ -0,0 +1,33 @@ +
+
+ +
+ +
+
+
+
+
+
+ \ No newline at end of file diff --git a/app/views/desktop/research_domain/add.html.erb b/app/views/desktop/research_domain/add.html.erb new file mode 100644 index 00000000..190e8abd --- /dev/null +++ b/app/views/desktop/research_domain/add.html.erb @@ -0,0 +1,107 @@ +
+
+ + +
+
+
Year
+
+ +
+
+
+
Language
+
+ +
+
+
+
+
+
+
+
+
+
+
+
    +
  • +
  • + OralPoster
  • +
  • + +
  • + + + + + +
  • + +
  • +
  • + +
+
+
+
    +
  • +
  • + + +
  • + +
  • + +
  • +
  • +
  • +
  • +
  • + + +
+
+
+
    +
  • +
  • +
+
+
+
+
\ No newline at end of file diff --git a/app/views/desktop/research_domain/list.html.erb b/app/views/desktop/research_domain/list.html.erb new file mode 100644 index 00000000..e32e4d6c --- /dev/null +++ b/app/views/desktop/research_domain/list.html.erb @@ -0,0 +1,75 @@ +
+
+
+
+ +
+
+
+
More
+
+ +
+
+
+
Tag
+
+ +
+
+
+
Status
+
+ +
+
+
+
View
+
+ +
+
+
+
Share
+
+ +
+
+
+
+
+
+
+
+
+
+ +
+
+
\ No newline at end of file diff --git a/app/views/desktop/research_p.html.erb b/app/views/desktop/research_p.html.erb new file mode 100644 index 00000000..43eab7be --- /dev/null +++ b/app/views/desktop/research_p.html.erb @@ -0,0 +1,33 @@ +
+
+ +
+ +
+
+
+
+
+
+ \ No newline at end of file diff --git a/app/views/desktop/research_project/add.html.erb b/app/views/desktop/research_project/add.html.erb new file mode 100644 index 00000000..190e8abd --- /dev/null +++ b/app/views/desktop/research_project/add.html.erb @@ -0,0 +1,107 @@ +
+
+ + +
+
+
Year
+
+ +
+
+
+
Language
+
+ +
+
+
+
+
+
+
+
+
+
+
+
    +
  • +
  • + OralPoster
  • +
  • + +
  • + + + + + +
  • + +
  • +
  • + +
+
+
+
    +
  • +
  • + + +
  • + +
  • + +
  • +
  • +
  • +
  • +
  • + + +
+
+
+
    +
  • +
  • +
+
+
+
+
\ No newline at end of file diff --git a/app/views/desktop/research_project/list.html.erb b/app/views/desktop/research_project/list.html.erb new file mode 100644 index 00000000..e32e4d6c --- /dev/null +++ b/app/views/desktop/research_project/list.html.erb @@ -0,0 +1,75 @@ +
+
+
+
+ +
+
+
+
More
+
+ +
+
+
+
Tag
+
+ +
+
+
+
Status
+
+ +
+
+
+
View
+
+ +
+
+
+
Share
+
+ +
+
+
+
+
+
+
+
+
+
+ +
+
+
\ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 570ab68a..3b08f7a5 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -193,6 +193,14 @@ Orbit::Application.routes.draw do match '/desktop/seminar_p_list/'=>'desktop_publications#seminar_p_list' match '/desktop/seminar_p_add/'=>'desktop_publications#seminar_p_add' + match '/desktop/research_d' => 'desktop_research#research_d' + match '/desktop/research_d_list/' => 'desktop_research#research_d_list' + match '/desktop/research_d_add' => 'desktop_research#research_d_add' + + match '/desktop/research_p' => 'desktop_research#research_p' + match '/desktop/research_p_list/' => 'desktop_research#research_p_list' + match '/desktop/research_p_add' => 'desktop_research#research_p_add' + match '/desktop/twitter/'=>'otheraccounts#twitter' match '/desktop/forgmail/'=>'otheraccounts#gmail'