diff --git a/Gemfile b/Gemfile
index 1aa6c5df..c572899f 100644
--- a/Gemfile
+++ b/Gemfile
@@ -22,7 +22,7 @@ gem 'rake'
gem 'ruby-debug19'
gem 'rubyzip'
gem 'sinatra'
-gem 'sinatra-contrib'
+#gem 'sinatra-contrib'
gem 'sprockets'
gem 'tinymce-rails'
gem 'therubyracer' if RUBY_PLATFORM.downcase.include?("linux")
diff --git a/Gemfile.lock b/Gemfile.lock
index 3585cbc9..339bae0f 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -40,7 +40,6 @@ GEM
multi_json (~> 1.0)
archive-tar-minitar (0.5.2)
arel (2.2.3)
- backports (2.5.3)
bcrypt-ruby (3.0.1)
bcrypt-ruby (3.0.1-x86-mingw32)
brakeman (1.5.1)
@@ -80,7 +79,6 @@ GEM
diff-lcs (1.1.3)
encrypted_strings (0.3.3)
erubis (2.7.0)
- eventmachine (0.12.10)
exception_notification (2.5.2)
actionmailer (>= 3.0.4)
execjs (1.3.0)
@@ -208,13 +206,6 @@ GEM
rack (~> 1.3, >= 1.3.6)
rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
- sinatra-contrib (1.3.1)
- backports (>= 2.0)
- eventmachine
- rack-protection
- rack-test
- sinatra (~> 1.3.0)
- tilt (~> 1.3)
spork (0.9.0)
spork (0.9.0-x86-mingw32)
win32-process
@@ -282,10 +273,8 @@ DEPENDENCIES
shoulda-matchers
simplecov
sinatra
- sinatra-contrib
spork
sprockets
tinymce-rails
uglifier
- warden
watchr
diff --git a/app/assets/javascripts/desktop.js b/app/assets/javascripts/desktop.js
index 8e048175..281a0b3d 100644
--- a/app/assets/javascripts/desktop.js
+++ b/app/assets/javascripts/desktop.js
@@ -11,4 +11,5 @@
//= require jquery.miniColors.min
//= require bootstrap
//= require orbitdesktopAPI
+//= require orbitTimeline
//= require orbitdesktop
\ No newline at end of file
diff --git a/app/assets/javascripts/orbitTimeline.js b/app/assets/javascripts/orbitTimeline.js
new file mode 100644
index 00000000..4a6a7846
--- /dev/null
+++ b/app/assets/javascripts/orbitTimeline.js
@@ -0,0 +1,71 @@
+//for timeline parent library, will be accessable by main library and API library for other people to use.. default inherits orbitDesktopAPI
+// Harry Bomrah
+
+var orbitTimeline = function(dom){
+ t = this;
+ this.dom = $("#"+dom);
+ this.timelineHtml = $("
");
+ //this.marker = t.timelineHtml.find("#timline_marker");
+ this.scale = t.timelineHtml.find("#timeline_scale");
+ //this.container = t.timelineHtml.find("#t_container");
+ this.initialize = function(){
+ t.dom.html(t.timelineHtml);
+ $("div.scrollbar").hide();
+ //var cursor = t.marker.draggable({containment:"parent","option":"cursorAt"});
+ var timelineScale = t.constructTimeScale();
+ $("#timeline_scale").html(timelineScale);
+ t.makeBubble("012012");
+ t.makeBubble("012012");
+ $("#test_bubble").click(function(){
+ t.makeBubble("062012");
+ })
+
+ }
+ this.constructTimeScale = function(){
+ //$.getJSON("test.json",function(){
+ var scale = $("");
+ scale.append($("2013
2012
"));
+ scale.find(".scale_region").each(function(){
+ var verticalchars = "";
+ var txt = $(this).text();
+ var margin = ($(this).width()-20)/2;
+ // for(c in txt){
+ // if($(this).hasClass('month')){
+ // verticalchars+=""+txt.charAt(c)+"";
+ // }else
+ // verticalchars+=""+txt.charAt(c)+"";
+ // }
+ //$(this).html(verticalchars);
+ })
+ return scale;
+ //})
+ }
+ this.makeBubble = function(timestamp){
+ var totalul = $("#scale_wrapper").find("div[data-content="+timestamp+"] ul").length;
+ var targetul = $("#scale_wrapper div[data-content="+timestamp+"] div.bubble_list ul").eq(totalul-1);
+ if(totalul == 0){
+ var ul = $("");
+ $("#scale_wrapper").find("div[data-content="+timestamp+"] div.bubble_list").append(ul);
+ targetul = ul;
+ }else{
+ var totalli = targetul.find("li").length;
+ if(totalli >= 5){
+ var ul = $("");
+ $("#scale_wrapper").find("div[data-content="+timestamp+"] div.bubble_list").append(ul);
+ targetul = ul;
+ }
+ }
+ var bubble = $("This is test bubble.");
+ bubble.css("margin-left","25px");
+ targetul.prepend(bubble);
+ bubble.show("bounce",{},500);
+ bubble.click(function(){
+ o.toolPopup({
+ parent: $(this),
+ html : ""+timestamp+"
",
+ height: "auto",
+ width:"300px"
+ });
+ })//.mouseout(function(){t.oapi.toolPopup("destroy");})
+ }
+}
\ No newline at end of file
diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js
index 3dd51128..ceecc1e2 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":""};
+ this.desktopData = {"home":"","settings":"","work":"","favorite":"","apps_manager":"","sections":"","journal_p":"","appstore":"","orbit":""};
this.tp = "";
this.sectionList;
this.initialize = function(){
@@ -112,6 +112,9 @@ var orbitDesktop = function(dom){
});
$("a#d_appstore").click(function(){
var target = $(this).attr("href");
+ console.log(o.currenthtml);
+ console.log(target);
+ console.log(o.currentface);
if(o.currenthtml!=target){
o.desktopData[o.currentface] = $(o.contentHolder).html();
$("#content").hide("drop",o.transitionTime,function(){
@@ -119,6 +122,15 @@ var orbitDesktop = function(dom){
});
}
});
+ $("a#d_orbit").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.initializeOrbitTimeline(target);
+ });
+ }
+ });
$(window).resize(function(){
var ww = $(window).width();
$("img#thmbackground").attr({"width":ww});
@@ -892,7 +904,24 @@ var orbitDesktop = function(dom){
themes();
});
};
-
+ this.initializeOrbitTimeline = function(target){
+ o.currenthtml = target;
+ o.currentface = "orbit";
+ console.log(o.currentface);
+ var bindHandlers = function(){
+ var timeline = new orbitTimeline("timeline");
+ timeline.initialize();
+ $('.tinycanvas').tinyscrollbar({ axis: 'x'});
+ }
+ if(!o.desktopData[o.currentface]){
+ $(o.contentHolder).empty().load("/desktop_orbit/"+target,function(){
+ bindHandlers();
+ });
+ }else{
+ $(o.contentHolder).html(o.desktopData[o.currentface]);
+ bindHandlers();
+ }
+ };
this.initializeJournalPapers = function(target){ // this init journal papers
o.currenthtml = target;
o.currentface = "journal_p";
diff --git a/app/assets/javascripts/orbitdesktopAPI.js b/app/assets/javascripts/orbitdesktopAPI.js
index 2d91dbbb..8e84cbb7 100644
--- a/app/assets/javascripts/orbitdesktopAPI.js
+++ b/app/assets/javascripts/orbitdesktopAPI.js
@@ -158,6 +158,40 @@ var orbitDesktopAPI = function(){
callbackfn.call(this);
}
};
+ this.toolPopup = function(settings){
+ if(settings == "destroy"){
+ $(".desktop_toolpopup").hide("fold",function(){
+ $(this).remove();
+ $(this).parent().css("position","");
+
+ })
+ return;
+ }
+ if(settings.parent){
+ if(settings.parent.find("div.desktop_toolpopup").length == 0){
+ settings.height = (!settings.height ? "50px" : settings.height);
+ settings.width = (!settings.width ? "150px" : settings.width);
+ settings.html = (!settings.html ? "" : settings.html);
+ var leftpos = settings.parent.width();
+ var toolpopup = $("");
+ settings.parent.css("position","relative");
+ settings.parent.prepend(toolpopup);
+ toolpopup.click(function(event){
+ event.stopPropagation();
+ });
+
+ toolpopup.show("fold",function(){
+ $(document).unbind("click");
+ $(document).one("click",function(e){
+ toolpopup.hide("fold",function(){
+ toolpopup.remove();
+ settings.parent.css("position","");
+ });
+ })
+ });
+ }
+ }
+ }
};
orbitDesktopAPI.prototype.notifyImgPath = "temp";
orbitDesktopAPI.prototype.wallpaperPath = "temp";
diff --git a/app/assets/stylesheets/desktop.css b/app/assets/stylesheets/desktop.css
index 19e9a9e6..4ec8f89d 100644
--- a/app/assets/stylesheets/desktop.css
+++ b/app/assets/stylesheets/desktop.css
@@ -9,4 +9,5 @@
*= require font-awesome
*= require desktopmain
*= require desktopmedia
+ *= require orbitTimeline
*/
\ No newline at end of file
diff --git a/app/assets/stylesheets/desktopmain.css b/app/assets/stylesheets/desktopmain.css
index 72f29096..b4b741eb 100644
--- a/app/assets/stylesheets/desktopmain.css
+++ b/app/assets/stylesheets/desktopmain.css
@@ -715,3 +715,15 @@ a:focus { outline: none; }
font-size: 20px;
cursor: pointer;
}
+/*Tooltip popup */
+.desktop_toolpopup{
+ position: absolute;
+ z-index:10px;
+ display: none;
+ border-width:3px;
+ border-radius:5px;
+ border-color:black;
+ font-size:15px;
+ padding: 5px 0px 10px 0px;
+ cursor: default;
+}
diff --git a/app/assets/stylesheets/orbitTimeline.css b/app/assets/stylesheets/orbitTimeline.css
new file mode 100644
index 00000000..aa06eb82
--- /dev/null
+++ b/app/assets/stylesheets/orbitTimeline.css
@@ -0,0 +1,66 @@
+.t_scale{
+ width:2000px;
+ height:516px;
+ bottom:0;
+}
+#timline_marker{
+ width:100px;
+ height:140px;
+ opacity:0.4;
+ cursor: move;
+ border-style:solid;
+ border-width:5px;
+ border-radius:5px;
+}
+.t_scale{
+ border-style:solid;
+ border-width:2px;
+ border-radius:5px;
+}
+#t_container{
+ height:366px;
+}
+.scale_region{
+ height:516px;
+ border-style:solid;
+ border-width:0 2px 0 2px;
+ float: left;
+ margin-right:1px;
+ font-size:20px;
+ padding:5px;
+}
+.scale_region span{
+ display: block;
+}
+.month{
+
+}
+.year{
+ background-color: #c0bebe;
+ width:30px;
+}
+.bubble{
+ cursor: pointer;
+ width:300px;
+ height:30px;
+ background:lightblue;
+ border-style:solid;
+ border-width:5px;
+ float: left;
+ border-radius:5px;
+ margin-top: 10px;
+ margin-bottom:10px;
+ font-size:20px;
+ padding:5px;
+ text-align:center;
+ display: none;
+}
+.month_heading{
+ text-align: center;
+ margin-bottom: 10px;
+}
+
+.bubble_list ul{
+ width:350px;
+ float:left;
+}
\ No newline at end of file
diff --git a/app/controllers/desktop_orbit_controller.rb b/app/controllers/desktop_orbit_controller.rb
new file mode 100644
index 00000000..4bb57e68
--- /dev/null
+++ b/app/controllers/desktop_orbit_controller.rb
@@ -0,0 +1,7 @@
+class DesktopOrbitController< ApplicationController
+
+ def orbit
+ render "desktop/orbit", :layout => false
+ end
+
+end
\ No newline at end of file
diff --git a/app/views/desktop/index.html.erb b/app/views/desktop/index.html.erb
index 98ac23e3..039ae65f 100755
--- a/app/views/desktop/index.html.erb
+++ b/app/views/desktop/index.html.erb
@@ -48,7 +48,7 @@
-
+
diff --git a/app/views/desktop/orbit.html.erb b/app/views/desktop/orbit.html.erb
new file mode 100644
index 00000000..b1894981
--- /dev/null
+++ b/app/views/desktop/orbit.html.erb
@@ -0,0 +1,25 @@
+
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index 1cabd352..6d68b1c8 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,193 +1,196 @@
-Orbit::Application.routes.draw do
-
- devise_for :users
-
- # routes for sinatra app
- match '/site/set_registered', :to => CentralServerExchangeApp
- match '/site/public_key', :to => CentralServerExchangeApp
- match '/site/update', :to => GithubApp
- match '/purchase/:type', :to => CentralServerExchangeApp
-
- match 'load_orbit_bar' => 'pages#load_orbit_bar'
-
- # routes for admin
- namespace :admin do
- resources :assets
- resources :app_auths
- resources :object_auths do
- collection do
- match 'new/:type/:obj_id',:action => 'new',:via => "get",:as => :init
- end
- member do
- match ':id/create_role',:action => 'create_role',:via => "post",:as => :create_role
- match 'remove/:type/:target_id' ,:action=> 'remove_role',:via => "delete",:as =>:remove
- end
- end
-
-
- resources :ad_banners do
- collection do
- match 'new_ad_image' => 'ad_images#new',:as => :new_ad_image,:via => :get
- match 'new_ad_image' => 'ad_images#create',:as => :create_ad_image,:via => :post
- end
- resources :ad_images ,:except => [:show,:index]
- end
- resources :dashboards
- resources :designs do
- collection do
- get 'upload_package'
- post 'upload_package'
- end
- member do
- post 'edit_file' => 'designs#edit_file'
- end
- end
- resources :infos do
- get 'add_attribute_field'
- end
- resources :items
- resources :links do
- member do
- get 'delete'
- end
- end
- resources :pages do
- member do
- get 'delete'
- get 'reload_themes'
- end
- end
- resources :module_apps do
- resources :app_auths do
- member do
- match 'remove/:type/:target_id' ,:action=> 'remove',:via => "delete",:as =>:remove
- end
- end
-
- member do
- match 'assign_manager' ,:action=> 'assign_manager',:via => "post",:as =>:assign_manager
- match 'assign_sub_manager' ,:action=> 'assign_sub_manager',:via => "post",:as =>:assign_sub_manager
-
- match 'remove_manager/:app_manager_id' ,:action=> 'remove_manager',:via => "delete",:as =>:remove_manager
- match 'remove_sub_manager/:app_sub_manager_id' ,:action=> 'remove_sub_manager',:via => "delete",:as =>:remove_sub_manager
- get 'reload_frontend_pages'
- end
- end
- resources :page_parts do
- member do
- get 'reload_widgets'
- end
- end
- resources :purchases do
- collection do
- get 'install_app'
- end
- member do
- get 'download'
- end
- end
- resources :roles do
- get 'add_sub_role'
- get 'add_attribute_field'
- end
- resources :sites
- resources :snippets
- resources :tags
- resources :translations
- resources :users
- end
- # end admin
-
- namespace :panel do
- resources :users
- end
-
- match '/desktop/'=>'desktop#index'
-
- # Sinatra Routes start
-
- # match '/desktop/desktop', :to => Desktopapp::DesktopApp
- # match '/desktop/app_manager', :to => Desktopapp::DesktopApp
- # match '/desktop/sections', :to => Desktopapp::DesktopApp
- # match '/desktop/settings', :to => Desktopapp::DesktopApp
- # match '/desktop/get_desktop_settings/', :to => Desktopapp::DesktopApp
- # match '/desktop/save_desktop_settings/', :to => Desktopapp::DesktopApp
- # match '/desktop/getgroups/', :to => Desktopapp::DesktopApp
- # match '/desktop/getsectionlist/', :to => Desktopapp::DesktopApp
- # match '/desktop/settingthemes/', :to => Desktopapp::DesktopApp
- # match '/desktop/settingsections/', :to => Desktopapp::DesktopApp
- # match '/desktop/getapplist/', :to => Desktopapp::DesktopApp
- # match '/desktop/newpositions/', :to => Desktopapp::DesktopApp
- # match '/desktop/settingconnection/', :to => Desktopapp::DesktopApp
-
- # match '/desktop/journal_p/', :to => Desktopapp::DesktopAppPublications
- # match '/desktop/journal_p_list/', :to => Desktopapp::DesktopAppPublications
- # match '/desktop/journal_p_add/', :to => Desktopapp::DesktopAppPublications
- # match '/desktop_publications/getjournals', :to => Desktopapp::DesktopAppPublications
-
- # match '/desktop/twitter/', :to => Desktopapp::Otheraccounts
- # match '/desktop/forgmail/', :to => Desktopapp::Otheraccounts
- # match '/desktop/getaccounts', :to => Desktopapp::Otheraccounts
- # match '/desktop/save_account_info/', :to => Desktopapp::Otheraccounts
-
- # match '/desktop_appstore/appstore', :to => Desktopapp::DesktopAppAppstore
- # match '/desktop_appstore/widgets', :to => Desktopapp::DesktopAppAppstore
- # match '/desktop_appstore/getuserwidgets', :to => Desktopapp::DesktopAppAppstore
- # match '/desktop_appstore/widgets_settings', :to => Desktopapp::DesktopAppAppstore
-
- # Sinatra Routes end
-
- match '/desktop/desktop'=>'desktop#desktop'
- match '/desktop/app_manager'=>'desktop#app_manager'
- match '/desktop/sections'=>'desktop#sections'
- match '/desktop/settings'=>'desktop#settings'
- match '/desktop/get_desktop_settings/'=>'desktop#get_desktop_settings'
- match '/desktop/save_desktop_settings/'=>'desktop#save_desktop_settings'
- match '/desktop/getgroups/'=>'desktop#getgroups'
- match '/desktop/getsectionlist/'=>'desktop#getsectionlist'
- match '/desktop/settingthemes/'=>'desktop#settingthemes'
- match '/desktop/settingsections/'=>'desktop#settingsections'
- match '/desktop/getapplist/'=>'desktop#getapplist'
- match '/desktop/newpositions/'=>'desktop#newpositions'
- match '/desktop/settingconnection/'=>'desktop#settingconnection'
-
-
- match '/desktop/journal_p/'=>'desktop_publications#journal_p'
- match '/desktop/journal_p_list/'=>'desktop_publications#journal_p_list'
- match '/desktop/journal_p_add/'=>'desktop_publications#journal_p_add'
- match '/desktop_publications/getjournals' => 'desktop_publications#getjournals'
-
- match '/desktop/twitter/'=>'otheraccounts#twitter'
- match '/desktop/forgmail/'=>'otheraccounts#gmail'
- match '/desktop/getaccounts'=>'otheraccounts#getaccounts'
- match '/desktop/save_account_info/'=>'otheraccounts#saveaccountinfo'
-
- match '/desktop_appstore/appstore'=>'desktop_appstore#appstore'
- match '/desktop_appstore/widgets'=>'desktop_appstore#widgets'
- match '/desktop_appstore/getuserwidgets'=>'desktop_appstore#getuserwidgets'
- match '/desktop_appstore/widgets_settings'=>'desktop_appstore#widgets_settings'
-
-
- match '/desktop/temp_func/'=>'desktop#temp_func'
-
- match '/panel/:app_name/front_end/:app_action/:id' => 'pages#show_from_link', :constraints => lambda { |request|
- !request.query_string.include?("inner=true")
- }
-
- match '/panel/:app_name/front_end/:app_action' => 'pages#index_from_link', :constraints => lambda { |request|
- !request.query_string.include?("inner=true")
- }
-
- # routes for gridfs files
- match "/gridfs/*path" => "gridfs#serve"
- # match "/images/*path" => "gridfs#serve_images"
- # match "/admin/pages/images/*path" => "gridfs#serve_images"
-
- # routes for pages to generate
- match '*page_name' => 'pages#show', :as => :page, :constraints => lambda{|request|
- !request.path.starts_with?("/panel")
- }
-
- root :to => 'pages#index'
-
-end
+Orbit::Application.routes.draw do
+
+ devise_for :users
+
+ # routes for sinatra app
+ match '/site/set_registered', :to => CentralServerExchangeApp
+ match '/site/public_key', :to => CentralServerExchangeApp
+ match '/site/update', :to => GithubApp
+ match '/purchase/:type', :to => CentralServerExchangeApp
+
+ match 'load_orbit_bar' => 'pages#load_orbit_bar'
+
+ # routes for admin
+ namespace :admin do
+ resources :assets
+ resources :app_auths
+ resources :object_auths do
+ collection do
+ match 'new/:type/:obj_id',:action => 'new',:via => "get",:as => :init
+ end
+ member do
+ match ':id/create_role',:action => 'create_role',:via => "post",:as => :create_role
+ match 'remove/:type/:target_id' ,:action=> 'remove_role',:via => "delete",:as =>:remove
+ end
+ end
+
+
+ resources :ad_banners do
+ collection do
+ match 'new_ad_image' => 'ad_images#new',:as => :new_ad_image,:via => :get
+ match 'new_ad_image' => 'ad_images#create',:as => :create_ad_image,:via => :post
+ end
+ resources :ad_images ,:except => [:show,:index]
+ end
+ resources :dashboards
+ resources :designs do
+ collection do
+ get 'upload_package'
+ post 'upload_package'
+ end
+ member do
+ post 'edit_file' => 'designs#edit_file'
+ end
+ end
+ resources :infos do
+ get 'add_attribute_field'
+ end
+ resources :items
+ resources :links do
+ member do
+ get 'delete'
+ end
+ end
+ resources :pages do
+ member do
+ get 'delete'
+ get 'reload_themes'
+ end
+ end
+ resources :module_apps do
+ resources :app_auths do
+ member do
+ match 'remove/:type/:target_id' ,:action=> 'remove',:via => "delete",:as =>:remove
+ end
+ end
+
+ member do
+ match 'assign_manager' ,:action=> 'assign_manager',:via => "post",:as =>:assign_manager
+ match 'assign_sub_manager' ,:action=> 'assign_sub_manager',:via => "post",:as =>:assign_sub_manager
+
+ match 'remove_manager/:app_manager_id' ,:action=> 'remove_manager',:via => "delete",:as =>:remove_manager
+ match 'remove_sub_manager/:app_sub_manager_id' ,:action=> 'remove_sub_manager',:via => "delete",:as =>:remove_sub_manager
+ get 'reload_frontend_pages'
+ end
+ end
+ resources :page_parts do
+ member do
+ get 'reload_widgets'
+ end
+ end
+ resources :purchases do
+ collection do
+ get 'install_app'
+ end
+ member do
+ get 'download'
+ end
+ end
+ resources :roles do
+ get 'add_sub_role'
+ get 'add_attribute_field'
+ end
+ resources :sites
+ resources :snippets
+ resources :tags
+ resources :translations
+ resources :users
+ end
+ # end admin
+
+ namespace :panel do
+ resources :users
+ end
+
+ match '/desktop/'=>'desktop#index'
+
+ # Sinatra Routes start
+
+ # match '/desktop/desktop', :to => Desktopapp::DesktopApp
+ # match '/desktop/app_manager', :to => Desktopapp::DesktopApp
+ # match '/desktop/sections', :to => Desktopapp::DesktopApp
+ # match '/desktop/settings', :to => Desktopapp::DesktopApp
+ # match '/desktop/get_desktop_settings/', :to => Desktopapp::DesktopApp
+ # match '/desktop/save_desktop_settings/', :to => Desktopapp::DesktopApp
+ # match '/desktop/getgroups/', :to => Desktopapp::DesktopApp
+ # match '/desktop/getsectionlist/', :to => Desktopapp::DesktopApp
+ # match '/desktop/settingthemes/', :to => Desktopapp::DesktopApp
+ # match '/desktop/settingsections/', :to => Desktopapp::DesktopApp
+ # match '/desktop/getapplist/', :to => Desktopapp::DesktopApp
+ # match '/desktop/newpositions/', :to => Desktopapp::DesktopApp
+ # match '/desktop/settingconnection/', :to => Desktopapp::DesktopApp
+
+ # match '/desktop/journal_p/', :to => Desktopapp::DesktopAppPublications
+ # match '/desktop/journal_p_list/', :to => Desktopapp::DesktopAppPublications
+ # match '/desktop/journal_p_add/', :to => Desktopapp::DesktopAppPublications
+ # match '/desktop_publications/getjournals', :to => Desktopapp::DesktopAppPublications
+
+ # match '/desktop/twitter/', :to => Desktopapp::Otheraccounts
+ # match '/desktop/forgmail/', :to => Desktopapp::Otheraccounts
+ # match '/desktop/getaccounts', :to => Desktopapp::Otheraccounts
+ # match '/desktop/save_account_info/', :to => Desktopapp::Otheraccounts
+
+ # match '/desktop_appstore/appstore', :to => Desktopapp::DesktopAppAppstore
+ # match '/desktop_appstore/widgets', :to => Desktopapp::DesktopAppAppstore
+ # match '/desktop_appstore/getuserwidgets', :to => Desktopapp::DesktopAppAppstore
+ # match '/desktop_appstore/widgets_settings', :to => Desktopapp::DesktopAppAppstore
+
+ # Sinatra Routes end
+
+ match '/desktop/desktop'=>'desktop#desktop'
+ match '/desktop/app_manager'=>'desktop#app_manager'
+ match '/desktop/sections'=>'desktop#sections'
+ match '/desktop/settings'=>'desktop#settings'
+ match '/desktop/get_desktop_settings/'=>'desktop#get_desktop_settings'
+ match '/desktop/save_desktop_settings/'=>'desktop#save_desktop_settings'
+ match '/desktop/getgroups/'=>'desktop#getgroups'
+ match '/desktop/getsectionlist/'=>'desktop#getsectionlist'
+ match '/desktop/settingthemes/'=>'desktop#settingthemes'
+ match '/desktop/settingsections/'=>'desktop#settingsections'
+ match '/desktop/getapplist/'=>'desktop#getapplist'
+ match '/desktop/newpositions/'=>'desktop#newpositions'
+ match '/desktop/settingconnection/'=>'desktop#settingconnection'
+
+
+ match '/desktop/journal_p/'=>'desktop_publications#journal_p'
+ match '/desktop/journal_p_list/'=>'desktop_publications#journal_p_list'
+ match '/desktop/journal_p_add/'=>'desktop_publications#journal_p_add'
+ match '/desktop_publications/getjournals' => 'desktop_publications#getjournals'
+
+ match '/desktop/twitter/'=>'otheraccounts#twitter'
+ match '/desktop/forgmail/'=>'otheraccounts#gmail'
+ match '/desktop/getaccounts'=>'otheraccounts#getaccounts'
+ match '/desktop/save_account_info/'=>'otheraccounts#saveaccountinfo'
+
+ match '/desktop_appstore/appstore'=>'desktop_appstore#appstore'
+ match '/desktop_appstore/widgets'=>'desktop_appstore#widgets'
+ match '/desktop_appstore/getuserwidgets'=>'desktop_appstore#getuserwidgets'
+ match '/desktop_appstore/widgets_settings'=>'desktop_appstore#widgets_settings'
+
+ match '/desktop_orbit/orbit' => 'desktop_orbit#orbit'
+
+
+ match '/desktop/temp_func/'=>'desktop#temp_func'
+
+ match '/panel/:app_name/front_end/:app_action/:id' => 'pages#show_from_link', :constraints => lambda { |request|
+ !request.query_string.include?("inner=true")
+ }
+
+ match '/panel/:app_name/front_end/:app_action' => 'pages#index_from_link', :constraints => lambda { |request|
+ !request.query_string.include?("inner=true")
+ }
+
+ # routes for gridfs files
+ match "/gridfs/*path" => "gridfs#serve"
+ # match "/images/*path" => "gridfs#serve_images"
+ # match "/admin/pages/images/*path" => "gridfs#serve_images"
+
+ # routes for pages to generate
+ match '*page_name' => 'pages#show', :as => :page, :constraints => lambda{|request|
+ !request.path.starts_with?("/panel")
+ }
+
+ root :to => 'pages#index'
+
+end
+
diff --git a/public/test.json b/public/test.json
new file mode 100644
index 00000000..aebcb6a5
--- /dev/null
+++ b/public/test.json
@@ -0,0 +1,12 @@
+{
+ "timeline":{
+ "heading" : "Title1",
+ "date" : "10012012",
+ "text" : "Think it's just another laptop? Think again. Designed to outperform standard laptops, the W520 PC is actually a mobile workstation — lightning-fast, heroically powerful and surprisingly portable. The work starts with the processor — from 2nd generation Intel® Core™ i5, up to Core™ i7 Quad Core™ Extreme, to keep your heavy-duty applications running flawlessly and boost your multi-tasking by 20 percent. Supplement that with the NVIDIA® Quadro® 1000M or 2000M graphics card with 2GB VRAM, professional-class graphics cards designed for up to 5x faster 3D performance and 8x faster computational simulation. Choose up to 16GB DDR3 RAM and you have one serious workstation — tested and certified by leading ISVs for more than 120 applications, including some of the most stringent in the industry."
+ },
+ {
+ "heading" : "Title2",
+ "date" : "15012012",
+ "text" : "Performance like this should include the most advanced features — and it does. Powerful graphics require a display that lives up to what they have to show; feast your eyes on our 95-percent color gamut LED display in HD, HD+ or FHD. For the most accurate color workflow, opt for the industry's first embedded X-Rite Color Calibrator. Transfer files 10x faster with USB 3.0, depend on the 34mm ExpressCard and MMC slot or optional Smart Card reader, avail yourself of the multiburner combo drive and enjoy our best-in-class, ergonomic keyboard and Ultranav™ with our TrackPoint and touchpad. And when you're ready to talk about all the work you've done, you'll get superior Web conferencing and VoIP, thanks to full-duplex voice transmission support, dual digital microphone modes with advanced noise-cancellation technology, optimized speakers and a light-adaptive, 720p, HD webcam."
+ }
+}
\ No newline at end of file