Books section added
This commit is contained in:
parent
32d1f8840c
commit
3f42a22094
6
Gemfile
6
Gemfile
|
@ -11,7 +11,7 @@ gem 'exception_notification' # Send error trace
|
|||
gem 'execjs'
|
||||
gem 'jquery-rails'
|
||||
|
||||
gem 'kaminari', :git => 'git://github.com/amatsuda/kaminari.git'
|
||||
gem 'kaminari'
|
||||
|
||||
gem 'mini_magick'
|
||||
gem 'mongoid'
|
||||
|
@ -39,7 +39,7 @@ end
|
|||
|
||||
|
||||
group :test, :development do
|
||||
gem 'spork'
|
||||
#gem 'spork'
|
||||
gem 'database_cleaner' #Strategies for cleaning databases. Can be used to ensure a clean state for testing.
|
||||
gem "rspec", "~> 2.0"
|
||||
gem "rspec-rails", "~> 2.0"
|
||||
|
@ -48,7 +48,7 @@ group :test, :development do
|
|||
gem "simplecov"
|
||||
gem "delorean"
|
||||
gem "watchr"
|
||||
gem "spork"
|
||||
#gem "spork"
|
||||
# gem "capybara"
|
||||
# gem 'yard'
|
||||
# gem "bluecloth"
|
||||
|
|
31
Gemfile.lock
31
Gemfile.lock
|
@ -1,12 +1,3 @@
|
|||
GIT
|
||||
remote: git://github.com/amatsuda/kaminari.git
|
||||
revision: 118927a42e57d6608c10d85b8a62acfc7c175974
|
||||
specs:
|
||||
kaminari (0.13.0)
|
||||
actionpack (>= 3.0.0)
|
||||
activesupport (>= 3.0.0)
|
||||
railties (>= 3.0.0)
|
||||
|
||||
GEM
|
||||
remote: http://rubygems.org/
|
||||
specs:
|
||||
|
@ -98,6 +89,11 @@ GEM
|
|||
railties (~> 3.0)
|
||||
thor (~> 0.14)
|
||||
json (1.6.5)
|
||||
kaminari (0.13.0)
|
||||
actionpack (>= 3.0.0)
|
||||
activesupport (>= 3.0.0)
|
||||
railties (>= 3.0.0)
|
||||
libv8 (3.3.10.4)
|
||||
linecache19 (0.5.12)
|
||||
ruby_core_source (>= 0.1.4)
|
||||
mail (2.3.3)
|
||||
|
@ -206,14 +202,13 @@ GEM
|
|||
rack (~> 1.3, >= 1.3.6)
|
||||
rack-protection (~> 1.2)
|
||||
tilt (~> 1.3, >= 1.3.3)
|
||||
spork (0.9.0)
|
||||
spork (0.9.0-x86-mingw32)
|
||||
win32-process
|
||||
sprockets (2.0.3)
|
||||
hike (~> 1.2)
|
||||
rack (~> 1.0)
|
||||
tilt (~> 1.1, != 1.3.0)
|
||||
subexec (0.2.1)
|
||||
therubyracer (0.10.1)
|
||||
libv8 (~> 3.3.10)
|
||||
thor (0.14.6)
|
||||
tilt (1.3.3)
|
||||
tinymce-rails (3.4.8)
|
||||
|
@ -230,14 +225,6 @@ GEM
|
|||
warden (1.1.1)
|
||||
rack (>= 1.0)
|
||||
watchr (0.7)
|
||||
win32-api (1.4.8-x86-mingw32)
|
||||
win32-process (0.6.5)
|
||||
windows-pr (>= 1.1.2)
|
||||
windows-api (0.4.1)
|
||||
win32-api (>= 1.4.5)
|
||||
windows-pr (1.2.1)
|
||||
win32-api (>= 1.4.5)
|
||||
windows-api (>= 0.3.0)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
@ -256,7 +243,7 @@ DEPENDENCIES
|
|||
execjs
|
||||
factory_girl_rails
|
||||
jquery-rails
|
||||
kaminari!
|
||||
kaminari
|
||||
mini_magick
|
||||
mongo_session_store-rails3
|
||||
mongoid
|
||||
|
@ -273,8 +260,8 @@ DEPENDENCIES
|
|||
shoulda-matchers
|
||||
simplecov
|
||||
sinatra
|
||||
spork
|
||||
sprockets
|
||||
therubyracer
|
||||
tinymce-rails
|
||||
uglifier
|
||||
watchr
|
||||
|
|
|
@ -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":""};
|
||||
this.desktopData = {"home":"","settings":"","work":"","favorite":"","apps_manager":"","sections":"","journal_p":"","appstore":"","orbit":"","books":""};
|
||||
this.tp = "";
|
||||
this.sectionList;
|
||||
this.initialize = function(){
|
||||
|
@ -128,6 +128,15 @@ var orbitDesktop = function(dom){
|
|||
});
|
||||
}
|
||||
});
|
||||
$("a#d_books").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.initializeBooks(target);
|
||||
});
|
||||
}
|
||||
});
|
||||
$(window).resize(function(){
|
||||
var ww = $(window).width();
|
||||
$("img#thmbackground").attr({"width":ww});
|
||||
|
@ -1300,6 +1309,68 @@ var orbitDesktop = function(dom){
|
|||
bindHandlers();
|
||||
}
|
||||
}
|
||||
this.initializeBooks = function(target){
|
||||
o.currenthtml = target;
|
||||
o.currentface = "books";
|
||||
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 'addbook':
|
||||
addbook();
|
||||
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(){
|
||||
|
||||
}
|
||||
|
||||
$("div#books div#panel_r").load("/desktop/books_list",function(){
|
||||
bindHandlers();
|
||||
})
|
||||
}
|
||||
|
||||
var addbook = function(){
|
||||
var bindHandlers = function(){
|
||||
|
||||
}
|
||||
|
||||
$("div#books div#panel_r").load("/desktop/books_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();
|
||||
|
|
|
@ -11,6 +11,18 @@ class DesktopPublicationsController< ApplicationController
|
|||
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 create_journal
|
||||
Journal.create(user_id: current_user.id, title: "2012, Javascript")
|
||||
b = Array.new
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
<div id="books">
|
||||
<div id="content">
|
||||
<div id="header" class="hh3">
|
||||
<div class="dtitle w2 hh3 hp">
|
||||
<span class="thmtxth">Books</span>
|
||||
</div>
|
||||
<div id="search_app" class="hfn w2 hh2 hp thmc3">
|
||||
<input type="text" class="ini_input form" value="Search" id="searchbox" />
|
||||
<input type="submit" class="ini_input submit thmc1" value="Submit"/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="holder">
|
||||
<div id="panel_l" class="ph">
|
||||
<div class="s_menu sm_v">
|
||||
<ul id='setting_left_nav'>
|
||||
<li><a href="list" class="hh2 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li>
|
||||
<li><a href="addbook" class="admtxt hh2 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Books</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Analysis</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Import</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Export</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="panel_r" class="ph pw admbg hp">
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,87 @@
|
|||
<div class="toolbar hh2">
|
||||
<div class="fn_g hp">
|
||||
<button class="fn_btn hh2 thmc2 thmtxt">Save</button>
|
||||
<button class="fn_btn hh2 admbg2">Cancel</button>
|
||||
</div>
|
||||
<div class="hh2 hp sdm">
|
||||
<div class="sdm_t hh2">Year</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh2 admtxt" href="">2012</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">2011</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">2010</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">2009</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">2008</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">2007</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">2006</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">2005</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">2004</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">2003</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">2002</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">2001</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh2 hp sdm">
|
||||
<div class="sdm_t hh2">Language</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh2 admtxt" href="">English</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Chinese</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh2 hp sdm">
|
||||
<div class="sdm_t hh2"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="paper_add" class="tinycanvas vp">
|
||||
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
<div class="s_grid_con s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row"><input type="radio" name="" value="Books" />Books
|
||||
<input type="radio" name="" value="Chapter" /> Chapter</li>
|
||||
<li class="s_grid_row"><textarea class="s_grid_6 s_grid" name="" id="">Book Title</textarea></li>
|
||||
<li class="s_grid_row"><textarea class="s_grid_6 s_grid" name="" id="" rows="10">Chapters and sections</textarea></li>
|
||||
<li class="s_grid_row"><input class="s_grid s_grid_1" type="text" value="page"> ~ <input class="s_grid s_grid_1" type="text" value="page"><input class="s_grid s_grid_2" type="text" value="Publisher"></li>
|
||||
<li class="s_grid_row"><input class="s_grid s_grid_2" type="text" value="Location"><input class="s_grid s_grid_2" type="text" value="Chief editor"></li>
|
||||
<li class="s_grid_row"><input class="s_grid s_grid_3" type="text" value="ISSN"></li> <li class="s_grid_row"><label class="s_grid_2 s_grid" for="">Reference URL</label><input class="s_grid_4 s_grid" type="text" value="www.sample.com"></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="s_grid_con s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row"><textarea class="s_grid s_grid_6" name="" id="">Author</textarea><span class="icon-plus input_append"></span></li>
|
||||
<li class="s_grid_row">
|
||||
<select name="" id="" class="s_grid s_grid_4">
|
||||
<option value="">Author Type</option>
|
||||
<option value="">First Author</option>
|
||||
<option value="">Corresponding Author</option>
|
||||
<option value="">Second Author</option>
|
||||
<option value="">Third Author</option>
|
||||
<option value="">Fourth Author</option>
|
||||
</select>
|
||||
<select name="" id="" class="s_grid s_grid_2">
|
||||
<option value="">Status</option>
|
||||
<option value="">Published</option>
|
||||
<option value="">Pending</option>
|
||||
<option value="">Writing</option>
|
||||
</select>
|
||||
</li>
|
||||
<li class="s_grid_row"><label class="s_grid s_grid_2" for="">Date of Publication</label><input class="s_grid s_grid_4" type="text" value="2012 / 05 / 01"></li>
|
||||
<li class="s_grid_row"><input class="s_grid s_grid_6" type="text" value="Tags"><span class="icon-plus input_append"></li>
|
||||
<li class="s_grid_row"><input class="s_grid s_grid_6" type="text" value="Associated Project"><span class="icon-plus input_append"></span></li>
|
||||
<li class="s_grid_row"><label class="s_grid s_grid_2" for="">Abstract</label><input type="file"></li>
|
||||
<li class="s_grid_row"><label class="s_grid s_grid_2" for="">Full Text</label><input type="file"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="s_grid_con s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row"><textarea name="" id="" rows="26" class="s_grid s_grid_6">Abstract</textarea></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,75 @@
|
|||
<div class="toolbar hh2">
|
||||
<div class="hh2 hp sdm">
|
||||
<div class="sdm_t hh2"><span class="icon-check"></span></div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_selection_options">
|
||||
<li><a class="hp hh2 admtxt" href="all">All</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="none">None</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh2 hp sdm">
|
||||
<div class="sdm_t hh2">More</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh2 admtxt" href="">Delete</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Tag</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh2 hp sdm">
|
||||
<div class="sdm_t hh2">Tag</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh2 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Starred</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">MIT</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh2 hp sdm">
|
||||
<div class="sdm_t hh2">Status</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh2 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Published</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Pending</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh2 hp sdm">
|
||||
<div class="sdm_t hh2">View</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_view_selection">
|
||||
<li><a class="hp hh2 admtxt" href="journal">Journal</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="title">Title</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="file">File</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="keywords">Keywords</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="abstract">Abstract</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh2 hp sdm">
|
||||
<div class="sdm_t hh2">Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh2 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh2 hp sdm">
|
||||
<div class="sdm_t hh2"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="paper_list" class="tinycanvas vp">
|
||||
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1 @@
|
|||
this is seminar page.
|
|
@ -156,6 +156,10 @@ Orbit::Application.routes.draw do
|
|||
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/books' => 'desktop_publications#books'
|
||||
match '/desktop/books_list/'=>'desktop_publications#books_list'
|
||||
match '/desktop/books_add/'=>'desktop_publications#books_add'
|
||||
|
||||
|
||||
match '/desktop/twitter/'=>'otheraccounts#twitter'
|
||||
match '/desktop/forgmail/'=>'otheraccounts#gmail'
|
||||
|
|
Reference in New Issue