brief added to desktop for all plugins
This commit is contained in:
1 parent
04ff345b94
commit
1d0ea6718f
75 files changed
+1055
-25
No files matched your search
vendor/built_in_modules/personal_book/app/assets/javascripts/personal_book/desktop/personal_books.js
Vendored
+7
-1
@@ -84,7 +84,13 @@ orbitDesktop.prototype.initializePersonalBook = function(target,url,cache){ // t
|
||||
uploadFiles();
|
||||
languageSelect();
|
||||
}
|
||||
|
||||
this.initializePersonalBook.brief = function(){
|
||||
o.enablelanguageSelect();
|
||||
$("textarea.editor").ckeditor({
|
||||
height: 300,
|
||||
width: $(".overview").width() - 20
|
||||
});
|
||||
}
|
||||
|
||||
this.initializePersonalBook.coAuthorformCallback = function(data){
|
||||
if(data.success){
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
class Panel::PersonalBook::Desktop::PluginIntrosController < ApplicationController
|
||||
|
||||
def index
|
||||
@intro = PersonalBookIntro.where(:user_id => current_user.id.to_s).first
|
||||
if @intro.blank?
|
||||
@intro = PersonalBookIntro.new
|
||||
render "new", :layout => false
|
||||
else
|
||||
render "edit", :layout => false
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
@intro = PersonalBookIntro.new(params[:personal_book_intro])
|
||||
@intro.user_id = current_user.id
|
||||
if @intro.save
|
||||
render :json => {"success" => true}.to_json
|
||||
else
|
||||
render :json => {"success" => false}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@intro = PersonalBookIntro.find(params[:id])
|
||||
if @intro.update_attributes(params[:personal_book_intro])
|
||||
render :json => {"success" => true}.to_json
|
||||
else
|
||||
render :json => {"success" => false}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
+1
@@ -17,6 +17,7 @@
|
||||
<ul id='setting_left_nav'>
|
||||
<li><a href="<%= panel_personal_book_desktop_personal_books_path %>" callback-method="list" class="hh1 w2 hp active thmc1 thmtxt" load="true" onclick='return false;'>List</a></li>
|
||||
<li><a href="<%= new_panel_personal_book_desktop_personal_book_path %>" callback-method="addbook" class="admtxt hh1 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||
<li><a href="<%= panel_personal_book_desktop_plugin_intros_path %>" class="admtxt hh1 w2 hp" callback-method="brief" onclick='return false;'>Brief Info</a></li>
|
||||
<!-- <li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Books</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
<div class="toolbar hh1">
|
||||
<div class="fn_g hp">
|
||||
|
||||
<%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1 ">Language</div>
|
||||
<div class="admbg sdm_o language_select">
|
||||
<ul>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<li><a class="hp hh1 admtxt" href="" data-lang="<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" content-layout="simple">
|
||||
<ul class="s_form">
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", "Frontend Page", :class => 's_grid s_grid_4') %>
|
||||
<div class="s_select_g s_grid s_grid_8 s_grid_h_2">
|
||||
<ul>
|
||||
<li>
|
||||
<%= f.check_box :brief_intro,
|
||||
id: "field-0" %>
|
||||
<label for="field-0"> Brief Intro </label>
|
||||
</li>
|
||||
<li>
|
||||
<%= f.check_box :complete_list,
|
||||
id: "field-1" %>
|
||||
<label for="field-1"> Complete List </label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% data = "data-language=" + locale %>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= label_tag("", I18nVariable.from_locale(locale), :class => 's_grid s_grid_4') %>
|
||||
</li>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= f.fields_for :text_translations do |f| %>
|
||||
<%= f.text_area locale, :class=>"editor", rows: 5, :value => (@intro.text_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<%= form_for @intro, html: { multipart: true, "form-type"=>"ajax_form","notification"=>"Brief Intro Updated"}, url: panel_personal_book_desktop_plugin_intro_path(@intro) do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<%= form_for @intro, html: { multipart: true, "form-type"=>"ajax_form", "notification"=>"Brief Intro Saved"}, url: panel_personal_book_desktop_plugin_intros_path do |f| %>
|
||||
<%= render partial: 'form', locals: {f: f} %>
|
||||
<% end %>
|
||||
@@ -5,6 +5,7 @@ Rails.application.routes.draw do
|
||||
namespace :desktop do
|
||||
match 'books_window' => "personal_books#books_window"
|
||||
resources :personal_books
|
||||
resources :plugin_intros
|
||||
end
|
||||
namespace :back_end do
|
||||
|
||||
@@ -29,6 +30,7 @@ Rails.application.routes.draw do
|
||||
resources :book_paper_types
|
||||
resources :book_author_types
|
||||
resources :tags
|
||||
|
||||
end
|
||||
namespace :front_end do
|
||||
resources :writing_books
|
||||
|
||||
+7
@@ -84,6 +84,13 @@ orbitDesktop.prototype.initializeConferencePapers = function(target,url,cache){
|
||||
uploadFiles();
|
||||
languageSelect();
|
||||
}
|
||||
this.initializeConferencePapers.brief = function(){
|
||||
o.enablelanguageSelect();
|
||||
$("textarea.editor").ckeditor({
|
||||
height: 300,
|
||||
width: $(".overview").width() - 20
|
||||
});
|
||||
}
|
||||
|
||||
this.initializeConferencePapers.conference = function(){ // to open add pages in conference papers page
|
||||
var bindHandlers = function(){ // to bind handlers for add page
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
class Panel::PersonalConference::Desktop::PluginIntrosController < ApplicationController
|
||||
|
||||
def index
|
||||
@intro = PersonalConferenceIntro.where(:user_id => current_user.id.to_s).first
|
||||
if @intro.blank?
|
||||
@intro = PersonalConferenceIntro.new
|
||||
render "new", :layout => false
|
||||
else
|
||||
render "edit", :layout => false
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
@intro = PersonalConferenceIntro.new(params[:personal_conference_intro])
|
||||
@intro.user_id = current_user.id
|
||||
if @intro.save
|
||||
render :json => {"success" => true}.to_json
|
||||
else
|
||||
render :json => {"success" => false}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@intro = PersonalConferenceIntro.find(params[:id])
|
||||
if @intro.update_attributes(params[:personal_conference_intro])
|
||||
render :json => {"success" => true}.to_json
|
||||
else
|
||||
render :json => {"success" => false}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
+1
@@ -23,6 +23,7 @@
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Analysis</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Import</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Export</a></li>
|
||||
<li><a href="<%= panel_personal_conference_desktop_plugin_intros_path %>" class="admtxt hh1 w2 hp" callback-method="brief" onclick='return false;'>Brief Info</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
<div class="toolbar hh1">
|
||||
<div class="fn_g hp">
|
||||
|
||||
<%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1 ">Language</div>
|
||||
<div class="admbg sdm_o language_select">
|
||||
<ul>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<li><a class="hp hh1 admtxt" href="" data-lang="<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" content-layout="simple">
|
||||
<ul class="s_form">
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", "Frontend Page", :class => 's_grid s_grid_4') %>
|
||||
<div class="s_select_g s_grid s_grid_8 s_grid_h_2">
|
||||
<ul>
|
||||
<li>
|
||||
<%= f.check_box :brief_intro,
|
||||
id: "field-0" %>
|
||||
<label for="field-0"> Brief Intro </label>
|
||||
</li>
|
||||
<li>
|
||||
<%= f.check_box :complete_list,
|
||||
id: "field-1" %>
|
||||
<label for="field-1"> Complete List </label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% data = "data-language=" + locale %>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= label_tag("", I18nVariable.from_locale(locale), :class => 's_grid s_grid_4') %>
|
||||
</li>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= f.fields_for :text_translations do |f| %>
|
||||
<%= f.text_area locale, :class=>"editor", rows: 5, :value => (@intro.text_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<%= form_for @intro, html: { multipart: true, "form-type"=>"ajax_form","notification"=>"Brief Intro Updated"}, url: panel_personal_conference_desktop_plugin_intro_path(@intro) do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<%= form_for @intro, html: { multipart: true, "form-type"=>"ajax_form", "notification"=>"Brief Intro Saved"}, url: panel_personal_conference_desktop_plugin_intros_path do |f| %>
|
||||
<%= render partial: 'form', locals: {f: f} %>
|
||||
<% end %>
|
||||
@@ -8,6 +8,7 @@ Rails.application.routes.draw do
|
||||
resources :conference_pages, except: :show
|
||||
resources :conference_co_authors, except: :show
|
||||
resources :conference_co_author_relations, except: :show
|
||||
resources :plugin_intros
|
||||
end
|
||||
namespace :back_end do
|
||||
match 'writing_conference_setting' => "writing_conferences#writing_conference_setting" ,:as => :writing_conference_setting
|
||||
|
||||
+7
-1
@@ -84,7 +84,13 @@ orbitDesktop.prototype.initializePersonalDiploma = function(target,url,cache){ /
|
||||
uploadFiles();
|
||||
languageSelect();
|
||||
}
|
||||
|
||||
this.initializePersonalDiploma.brief = function(){
|
||||
o.enablelanguageSelect();
|
||||
$("textarea.editor").ckeditor({
|
||||
height: 300,
|
||||
width: $(".overview").width() - 20
|
||||
});
|
||||
}
|
||||
|
||||
this.initializePersonalDiploma.coAuthorformCallback = function(data){
|
||||
if(data.success){
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
class Panel::PersonalDiploma::Desktop::PluginIntrosController < ApplicationController
|
||||
|
||||
def index
|
||||
@intro = PersonalDiplomaIntro.where(:user_id => current_user.id.to_s).first
|
||||
if @intro.blank?
|
||||
@intro = PersonalDiplomaIntro.new
|
||||
render "new", :layout => false
|
||||
else
|
||||
render "edit", :layout => false
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
@intro = PersonalDiplomaIntro.new(params[:personal_diploma_intro])
|
||||
@intro.user_id = current_user.id
|
||||
if @intro.save
|
||||
render :json => {"success" => true}.to_json
|
||||
else
|
||||
render :json => {"success" => false}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@intro = PersonalDiplomaIntro.find(params[:id])
|
||||
if @intro.update_attributes(params[:personal_diploma_intro])
|
||||
render :json => {"success" => true}.to_json
|
||||
else
|
||||
render :json => {"success" => false}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
+1
@@ -17,6 +17,7 @@
|
||||
<ul id='setting_left_nav'>
|
||||
<li><a href="<%= panel_personal_diploma_desktop_personal_diplomas_path %>" callback-method="list" class="hh1 w2 hp active thmc1 thmtxt" load="true" onclick='return false;'>List</a></li>
|
||||
<li><a href="<%= new_panel_personal_diploma_desktop_personal_diploma_path %>" callback-method="adddiploma" class="admtxt hh1 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||
<li><a href="<%= panel_personal_diploma_desktop_plugin_intros_path %>" class="admtxt hh1 w2 hp" callback-method="brief" onclick='return false;'>Brief Info</a></li>
|
||||
<!-- <li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Books</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
<div class="toolbar hh1">
|
||||
<div class="fn_g hp">
|
||||
|
||||
<%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1 ">Language</div>
|
||||
<div class="admbg sdm_o language_select">
|
||||
<ul>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<li><a class="hp hh1 admtxt" href="" data-lang="<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" content-layout="simple">
|
||||
<ul class="s_form">
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", "Frontend Page", :class => 's_grid s_grid_4') %>
|
||||
<div class="s_select_g s_grid s_grid_8 s_grid_h_2">
|
||||
<ul>
|
||||
<li>
|
||||
<%= f.check_box :brief_intro,
|
||||
id: "field-0" %>
|
||||
<label for="field-0"> Brief Intro </label>
|
||||
</li>
|
||||
<li>
|
||||
<%= f.check_box :complete_list,
|
||||
id: "field-1" %>
|
||||
<label for="field-1"> Complete List </label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% data = "data-language=" + locale %>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= label_tag("", I18nVariable.from_locale(locale), :class => 's_grid s_grid_4') %>
|
||||
</li>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= f.fields_for :text_translations do |f| %>
|
||||
<%= f.text_area locale, :class=>"editor", rows: 5, :value => (@intro.text_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<%= form_for @intro, html: { multipart: true, "form-type"=>"ajax_form","notification"=>"Brief Intro Updated"}, url: panel_personal_diploma_desktop_plugin_intro_path(@intro) do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<%= form_for @intro, html: { multipart: true, "form-type"=>"ajax_form", "notification"=>"Brief Intro Saved"}, url: panel_personal_diploma_desktop_plugin_intros_path do |f| %>
|
||||
<%= render partial: 'form', locals: {f: f} %>
|
||||
<% end %>
|
||||
@@ -5,6 +5,7 @@ Rails.application.routes.draw do
|
||||
namespace :desktop do
|
||||
match "diploma_window" => "personal_diplomas#diploma_window"
|
||||
resources :personal_diplomas
|
||||
resources :plugin_intros
|
||||
end
|
||||
namespace :back_end do
|
||||
|
||||
|
||||
+7
-1
@@ -84,7 +84,13 @@ orbitDesktop.prototype.initializePersonalExperience = function(target,url,cache)
|
||||
uploadFiles();
|
||||
languageSelect();
|
||||
}
|
||||
|
||||
this.initializePersonalExperience.brief = function(){
|
||||
o.enablelanguageSelect();
|
||||
$("textarea.editor").ckeditor({
|
||||
height: 300,
|
||||
width: $(".overview").width() - 20
|
||||
});
|
||||
}
|
||||
|
||||
this.initializePersonalExperience.coAuthorformCallback = function(data){
|
||||
if(data.success){
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
class Panel::PersonalExperience::Desktop::PluginIntrosController < ApplicationController
|
||||
|
||||
def index
|
||||
@intro = PersonalExperienceIntro.where(:user_id => current_user.id.to_s).first
|
||||
if @intro.blank?
|
||||
@intro = PersonalExperienceIntro.new
|
||||
render "new", :layout => false
|
||||
else
|
||||
render "edit", :layout => false
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
@intro = PersonalExperienceIntro.new(params[:personal_experience_intro])
|
||||
@intro.user_id = current_user.id
|
||||
if @intro.save
|
||||
render :json => {"success" => true}.to_json
|
||||
else
|
||||
render :json => {"success" => false}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@intro = PersonalExperienceIntro.find(params[:id])
|
||||
if @intro.update_attributes(params[:personal_experience_intro])
|
||||
render :json => {"success" => true}.to_json
|
||||
else
|
||||
render :json => {"success" => false}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
+1
@@ -17,6 +17,7 @@
|
||||
<ul id='setting_left_nav'>
|
||||
<li><a href="<%= panel_personal_experience_desktop_personal_experiences_path %>" callback-method="list" class="hh1 w2 hp active thmc1 thmtxt" load="true" onclick='return false;'>List</a></li>
|
||||
<li><a href="<%= new_panel_personal_experience_desktop_personal_experience_path %>" callback-method="addexperience" class="admtxt hh1 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||
<li><a href="<%= panel_personal_experience_desktop_plugin_intros_path %>" class="admtxt hh1 w2 hp" callback-method="brief" onclick='return false;'>Brief Info</a></li>
|
||||
<!-- <li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Books</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
<div class="toolbar hh1">
|
||||
<div class="fn_g hp">
|
||||
|
||||
<%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1 ">Language</div>
|
||||
<div class="admbg sdm_o language_select">
|
||||
<ul>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<li><a class="hp hh1 admtxt" href="" data-lang="<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" content-layout="simple">
|
||||
<ul class="s_form">
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", "Frontend Page", :class => 's_grid s_grid_4') %>
|
||||
<div class="s_select_g s_grid s_grid_8 s_grid_h_2">
|
||||
<ul>
|
||||
<li>
|
||||
<%= f.check_box :brief_intro,
|
||||
id: "field-0" %>
|
||||
<label for="field-0"> Brief Intro </label>
|
||||
</li>
|
||||
<li>
|
||||
<%= f.check_box :complete_list,
|
||||
id: "field-1" %>
|
||||
<label for="field-1"> Complete List </label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% data = "data-language=" + locale %>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= label_tag("", I18nVariable.from_locale(locale), :class => 's_grid s_grid_4') %>
|
||||
</li>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= f.fields_for :text_translations do |f| %>
|
||||
<%= f.text_area locale, :class=>"editor", rows: 5, :value => (@intro.text_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<%= form_for @intro, html: { multipart: true, "form-type"=>"ajax_form","notification"=>"Brief Intro Updated"}, url: panel_personal_experience_desktop_plugin_intro_path(@intro) do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<%= form_for @intro, html: { multipart: true, "form-type"=>"ajax_form", "notification"=>"Brief Intro Saved"}, url: panel_personal_experience_desktop_plugin_intros_path do |f| %>
|
||||
<%= render partial: 'form', locals: {f: f} %>
|
||||
<% end %>
|
||||
@@ -5,6 +5,7 @@ Rails.application.routes.draw do
|
||||
namespace :desktop do
|
||||
match "experience_window" => "personal_experiences#experience_window"
|
||||
resources :personal_experiences
|
||||
resources :plugin_intros
|
||||
end
|
||||
namespace :back_end do
|
||||
|
||||
|
||||
+8
-1
@@ -84,7 +84,14 @@ orbitDesktop.prototype.initializePersonalHonor = function(target,url,cache){ //
|
||||
uploadFiles();
|
||||
languageSelect();
|
||||
}
|
||||
|
||||
|
||||
this.initializePersonalHonor.brief = function(){
|
||||
o.enablelanguageSelect();
|
||||
$("textarea.editor").ckeditor({
|
||||
height: 300,
|
||||
width: $(".overview").width() - 20
|
||||
});
|
||||
}
|
||||
|
||||
this.initializePersonalHonor.coAuthorformCallback = function(data){
|
||||
if(data.success){
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
class Panel::PersonalHonor::Desktop::PluginIntrosController < ApplicationController
|
||||
|
||||
def index
|
||||
@intro = PersonalHonorIntro.where(:user_id => current_user.id.to_s).first
|
||||
if @intro.blank?
|
||||
@intro = PersonalHonorIntro.new
|
||||
render "new", :layout => false
|
||||
else
|
||||
render "edit", :layout => false
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
@intro = PersonalHonorIntro.new(params[:personal_honor_intro])
|
||||
@intro.user_id = current_user.id
|
||||
if @intro.save
|
||||
render :json => {"success" => true}.to_json
|
||||
else
|
||||
render :json => {"success" => false}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@intro = PersonalHonorIntro.find(params[:id])
|
||||
if @intro.update_attributes(params[:personal_honor_intro])
|
||||
render :json => {"success" => true}.to_json
|
||||
else
|
||||
render :json => {"success" => false}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
+1
@@ -17,6 +17,7 @@
|
||||
<ul id='setting_left_nav'>
|
||||
<li><a href="<%= panel_personal_honor_desktop_personal_honors_path %>" callback-method="list" class="hh1 w2 hp active thmc1 thmtxt" load="true" onclick='return false;'>List</a></li>
|
||||
<li><a href="<%= new_panel_personal_honor_desktop_personal_honor_path %>" callback-method="addhonor" class="admtxt hh1 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||
<li><a href="<%= panel_personal_honor_desktop_plugin_intros_path %>" class="admtxt hh1 w2 hp" callback-method="brief" onclick='return false;'>Brief Info</a></li>
|
||||
<!-- <li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Books</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
<div class="toolbar hh1">
|
||||
<div class="fn_g hp">
|
||||
|
||||
<%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1 ">Language</div>
|
||||
<div class="admbg sdm_o language_select">
|
||||
<ul>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<li><a class="hp hh1 admtxt" href="" data-lang="<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" content-layout="simple">
|
||||
<ul class="s_form">
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", "Frontend Page", :class => 's_grid s_grid_4') %>
|
||||
<div class="s_select_g s_grid s_grid_8 s_grid_h_2">
|
||||
<ul>
|
||||
<li>
|
||||
<%= f.check_box :brief_intro,
|
||||
id: "field-0" %>
|
||||
<label for="field-0"> Brief Intro </label>
|
||||
</li>
|
||||
<li>
|
||||
<%= f.check_box :complete_list,
|
||||
id: "field-1" %>
|
||||
<label for="field-1"> Complete List </label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% data = "data-language=" + locale %>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= label_tag("", I18nVariable.from_locale(locale), :class => 's_grid s_grid_4') %>
|
||||
</li>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= f.fields_for :text_translations do |f| %>
|
||||
<%= f.text_area locale, :class=>"editor", rows: 5, :value => (@intro.text_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<%= form_for @intro, html: { multipart: true, "form-type"=>"ajax_form","notification"=>"Brief Intro Updated"}, url: panel_personal_honor_desktop_plugin_intro_path(@intro) do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<%= form_for @intro, html: { multipart: true, "form-type"=>"ajax_form", "notification"=>"Brief Intro Saved"}, url: panel_personal_honor_desktop_plugin_intros_path do |f| %>
|
||||
<%= render partial: 'form', locals: {f: f} %>
|
||||
<% end %>
|
||||
@@ -5,6 +5,7 @@ Rails.application.routes.draw do
|
||||
namespace :desktop do
|
||||
match "honor_window" => "personal_honors#honors_window"
|
||||
resources :personal_honors
|
||||
resources :plugin_intros
|
||||
end
|
||||
|
||||
namespace :back_end do
|
||||
|
||||
+11
-9
@@ -66,23 +66,25 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
||||
});
|
||||
}
|
||||
|
||||
var languageSelect = function(){
|
||||
$(".language_select a").click(function(event) {
|
||||
$("*[data-language]").hide();
|
||||
$("*[data-language="+$(this).data("lang")+"]").show();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
this.initializeJournalPapers.editpaper = function(){
|
||||
o.highlight_sub_menu_item(1);
|
||||
uploadFiles();
|
||||
languageSelect();
|
||||
o.enablelanguageSelect();
|
||||
}
|
||||
|
||||
this.initializeJournalPapers.addpaper = function(){ // to open add pages in journal papers page
|
||||
uploadFiles();
|
||||
languageSelect();
|
||||
o.enablelanguageSelect();
|
||||
}
|
||||
|
||||
this.initializeJournalPapers.brief = function(){
|
||||
o.enablelanguageSelect();
|
||||
$("textarea.editor").ckeditor({
|
||||
height: 300,
|
||||
width: $(".overview").width() - 20
|
||||
});
|
||||
}
|
||||
|
||||
this.initializeJournalPapers.journal = function(){ // to open add pages in journal papers page
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
class Panel::PersonalJournal::Desktop::PluginIntrosController < ApplicationController
|
||||
|
||||
def index
|
||||
@intro = PersonalJournalIntro.where(:user_id => current_user.id.to_s).first
|
||||
if @intro.blank?
|
||||
@intro = PersonalJournalIntro.new
|
||||
render "new", :layout => false
|
||||
else
|
||||
render "edit", :layout => false
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
@intro = PersonalJournalIntro.new(params[:personal_journal_intro])
|
||||
@intro.user_id = current_user.id
|
||||
if @intro.save
|
||||
render :json => {"success" => true}.to_json
|
||||
else
|
||||
render :json => {"success" => false}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@intro = PersonalJournalIntro.find(params[:id])
|
||||
if @intro.update_attributes(params[:personal_journal_intro])
|
||||
render :json => {"success" => true}.to_json
|
||||
else
|
||||
render :json => {"success" => false}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
+1
@@ -23,6 +23,7 @@
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Analysis</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Import</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Export</a></li>
|
||||
<li><a href="<%= panel_personal_journal_desktop_plugin_intros_path %>" class="admtxt hh1 w2 hp" callback-method="brief" onclick='return false;'>Brief Info</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
<div class="toolbar hh1">
|
||||
<div class="fn_g hp">
|
||||
|
||||
<%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1 ">Language</div>
|
||||
<div class="admbg sdm_o language_select">
|
||||
<ul>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<li><a class="hp hh1 admtxt" href="" data-lang="<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" content-layout="simple">
|
||||
<ul class="s_form">
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", "Frontend Page", :class => 's_grid s_grid_4') %>
|
||||
<div class="s_select_g s_grid s_grid_8 s_grid_h_2">
|
||||
<ul>
|
||||
<li>
|
||||
<%= f.check_box :brief_intro,
|
||||
id: "field-0" %>
|
||||
<label for="field-0"> Brief Intro </label>
|
||||
</li>
|
||||
<li>
|
||||
<%= f.check_box :complete_list,
|
||||
id: "field-1" %>
|
||||
<label for="field-1"> Complete List </label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% data = "data-language=" + locale %>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= label_tag("", I18nVariable.from_locale(locale), :class => 's_grid s_grid_4') %>
|
||||
</li>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= f.fields_for :text_translations do |f| %>
|
||||
<%= f.text_area locale, :class=>"editor", rows: 5, :value => (@intro.text_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<%= form_for @intro, html: { multipart: true, "form-type"=>"ajax_form","notification"=>"Brief Intro Updated"}, url: panel_personal_journal_desktop_plugin_intro_path(@intro) do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<%= form_for @intro, html: { multipart: true, "form-type"=>"ajax_form", "notification"=>"Brief Intro Saved"}, url: panel_personal_journal_desktop_plugin_intros_path do |f| %>
|
||||
<%= render partial: 'form', locals: {f: f} %>
|
||||
<% end %>
|
||||
@@ -8,6 +8,7 @@ Rails.application.routes.draw do
|
||||
resources :journal_pages, except: :show
|
||||
resources :journal_co_authors, except: :show
|
||||
resources :journal_co_author_relations, except: :show
|
||||
resources :plugin_intros
|
||||
end
|
||||
|
||||
namespace :back_end do
|
||||
|
||||
Vendored
+7
-1
@@ -86,7 +86,13 @@ orbitDesktop.prototype.initializePersonalLab = function(target,url,cache){ // th
|
||||
uploadFiles();
|
||||
languageSelect();
|
||||
}
|
||||
|
||||
this.initializePersonalLab.brief = function(){
|
||||
o.enablelanguageSelect();
|
||||
$("textarea.editor").ckeditor({
|
||||
height: 300,
|
||||
width: $(".overview").width() - 20
|
||||
});
|
||||
}
|
||||
|
||||
this.initializePersonalLab.coAuthorformCallback = function(data){
|
||||
if(data.success){
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
class Panel::PersonalLab::Desktop::PluginIntrosController < ApplicationController
|
||||
|
||||
def index
|
||||
@intro = PersonalLabIntro.where(:user_id => current_user.id.to_s).first
|
||||
if @intro.blank?
|
||||
@intro = PersonalLabIntro.new
|
||||
render "new", :layout => false
|
||||
else
|
||||
render "edit", :layout => false
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
@intro = PersonalLabIntro.new(params[:personal_lab_intro])
|
||||
@intro.user_id = current_user.id
|
||||
if @intro.save
|
||||
render :json => {"success" => true}.to_json
|
||||
else
|
||||
render :json => {"success" => false}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@intro = PersonalLabIntro.find(params[:id])
|
||||
if @intro.update_attributes(params[:personal_lab_intro])
|
||||
render :json => {"success" => true}.to_json
|
||||
else
|
||||
render :json => {"success" => false}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
+1
@@ -17,6 +17,7 @@
|
||||
<ul id='setting_left_nav'>
|
||||
<li><a href="<%= panel_personal_lab_desktop_personal_labs_path %>" callback-method="list" class="hh1 w2 hp active thmc1 thmtxt" load="true" onclick='return false;'>List</a></li>
|
||||
<li><a href="<%= new_panel_personal_lab_desktop_personal_lab_path %>" callback-method="addlab" class="admtxt hh1 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||
<li><a href="<%= panel_personal_lab_desktop_plugin_intros_path %>" class="admtxt hh1 w2 hp" callback-method="brief" onclick='return false;'>Brief Info</a></li>
|
||||
<!-- <li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Books</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
<div class="toolbar hh1">
|
||||
<div class="fn_g hp">
|
||||
|
||||
<%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1 ">Language</div>
|
||||
<div class="admbg sdm_o language_select">
|
||||
<ul>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<li><a class="hp hh1 admtxt" href="" data-lang="<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" content-layout="simple">
|
||||
<ul class="s_form">
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", "Frontend Page", :class => 's_grid s_grid_4') %>
|
||||
<div class="s_select_g s_grid s_grid_8 s_grid_h_2">
|
||||
<ul>
|
||||
<li>
|
||||
<%= f.check_box :brief_intro,
|
||||
id: "field-0" %>
|
||||
<label for="field-0"> Brief Intro </label>
|
||||
</li>
|
||||
<li>
|
||||
<%= f.check_box :complete_list,
|
||||
id: "field-1" %>
|
||||
<label for="field-1"> Complete List </label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% data = "data-language=" + locale %>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= label_tag("", I18nVariable.from_locale(locale), :class => 's_grid s_grid_4') %>
|
||||
</li>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= f.fields_for :text_translations do |f| %>
|
||||
<%= f.text_area locale, :class=>"editor", rows: 5, :value => (@intro.text_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<%= form_for @intro, html: { multipart: true, "form-type"=>"ajax_form","notification"=>"Brief Intro Updated"}, url: panel_personal_lab_desktop_plugin_intro_path(@intro) do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
||||
vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/desktop/plugin_intros/new.html.erb
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
<%= form_for @intro, html: { multipart: true, "form-type"=>"ajax_form", "notification"=>"Brief Intro Saved"}, url: panel_personal_lab_desktop_plugin_intros_path do |f| %>
|
||||
<%= render partial: 'form', locals: {f: f} %>
|
||||
<% end %>
|
||||
@@ -5,6 +5,7 @@ Rails.application.routes.draw do
|
||||
namespace :desktop do
|
||||
match "lab_window" => "personal_labs#lab_window"
|
||||
resources :personal_labs
|
||||
resources :plugin_intros
|
||||
end
|
||||
namespace :back_end do
|
||||
|
||||
|
||||
+8
@@ -85,6 +85,14 @@ orbitDesktop.prototype.initializePersonalPatent = function(target,url,cache){ //
|
||||
languageSelect();
|
||||
}
|
||||
|
||||
this.initializePersonalPatent.brief = function(){
|
||||
o.enablelanguageSelect();
|
||||
$("textarea.editor").ckeditor({
|
||||
height: 300,
|
||||
width: $(".overview").width() - 20
|
||||
});
|
||||
}
|
||||
|
||||
this.initializePersonalPatent.coAuthorformCallback = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
class Panel::PersonalPatent::Desktop::PluginIntrosController < ApplicationController
|
||||
|
||||
def index
|
||||
@intro = PersonalPatentIntro.where(:user_id => current_user.id.to_s).first
|
||||
if @intro.blank?
|
||||
@intro = PersonalPatentIntro.new
|
||||
render "new", :layout => false
|
||||
else
|
||||
render "edit", :layout => false
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
@intro = PersonalPatentIntro.new(params[:personal_patent_intro])
|
||||
@intro.user_id = current_user.id
|
||||
if @intro.save
|
||||
render :json => {"success" => true}.to_json
|
||||
else
|
||||
render :json => {"success" => false}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@intro = PersonalPatentIntro.find(params[:id])
|
||||
if @intro.update_attributes(params[:personal_patent_intro])
|
||||
render :json => {"success" => true}.to_json
|
||||
else
|
||||
render :json => {"success" => false}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
+1
@@ -17,6 +17,7 @@
|
||||
<ul id='setting_left_nav'>
|
||||
<li><a href="<%= panel_personal_patent_desktop_personal_patents_path %>" callback-method="list" class="hh1 w2 hp active thmc1 thmtxt" load="true" onclick='return false;'>List</a></li>
|
||||
<li><a href="<%= new_panel_personal_patent_desktop_personal_patent_path %>" callback-method="addpatent" class="admtxt hh1 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||
<li><a href="<%= panel_personal_patent_desktop_plugin_intros_path %>" class="admtxt hh1 w2 hp" callback-method="brief" onclick='return false;'>Brief Info</a></li>
|
||||
<!-- <li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Books</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
<div class="toolbar hh1">
|
||||
<div class="fn_g hp">
|
||||
|
||||
<%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1 ">Language</div>
|
||||
<div class="admbg sdm_o language_select">
|
||||
<ul>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<li><a class="hp hh1 admtxt" href="" data-lang="<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" content-layout="simple">
|
||||
<ul class="s_form">
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", "Frontend Page", :class => 's_grid s_grid_4') %>
|
||||
<div class="s_select_g s_grid s_grid_8 s_grid_h_2">
|
||||
<ul>
|
||||
<li>
|
||||
<%= f.check_box :brief_intro,
|
||||
id: "field-0" %>
|
||||
<label for="field-0"> Brief Intro </label>
|
||||
</li>
|
||||
<li>
|
||||
<%= f.check_box :complete_list,
|
||||
id: "field-1" %>
|
||||
<label for="field-1"> Complete List </label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% data = "data-language=" + locale %>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= label_tag("", I18nVariable.from_locale(locale), :class => 's_grid s_grid_4') %>
|
||||
</li>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= f.fields_for :text_translations do |f| %>
|
||||
<%= f.text_area locale, :class=>"editor", rows: 5, :value => (@intro.text_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<%= form_for @intro, html: { multipart: true, "form-type"=>"ajax_form","notification"=>"Brief Intro Updated"}, url: panel_personal_patent_desktop_plugin_intro_path(@intro) do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<%= form_for @intro, html: { multipart: true, "form-type"=>"ajax_form", "notification"=>"Brief Intro Saved"}, url: panel_personal_patent_desktop_plugin_intros_path do |f| %>
|
||||
<%= render partial: 'form', locals: {f: f} %>
|
||||
<% end %>
|
||||
@@ -5,6 +5,7 @@ Rails.application.routes.draw do
|
||||
namespace :desktop do
|
||||
match "patent_window" => "personal_patents#patent_window"
|
||||
resources :personal_patents
|
||||
resources :plugin_intros
|
||||
end
|
||||
namespace :back_end do
|
||||
|
||||
|
||||
+7
-1
@@ -84,7 +84,13 @@ orbitDesktop.prototype.initializePersonalProject = function(target,url,cache){ /
|
||||
uploadFiles();
|
||||
languageSelect();
|
||||
}
|
||||
|
||||
this.initializePersonalProject.brief = function(){
|
||||
o.enablelanguageSelect();
|
||||
$("textarea.editor").ckeditor({
|
||||
height: 300,
|
||||
width: $(".overview").width() - 20
|
||||
});
|
||||
}
|
||||
|
||||
this.initializePersonalProject.coAuthorformCallback = function(data){
|
||||
if(data.success){
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
class Panel::PersonalProject::Desktop::PluginIntrosController < ApplicationController
|
||||
|
||||
def index
|
||||
@intro = PersonalProjectIntro.where(:user_id => current_user.id.to_s).first
|
||||
if @intro.blank?
|
||||
@intro = PersonalProjectIntro.new
|
||||
render "new", :layout => false
|
||||
else
|
||||
render "edit", :layout => false
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
@intro = PersonalProjectIntro.new(params[:personal_project_intro])
|
||||
@intro.user_id = current_user.id
|
||||
if @intro.save
|
||||
render :json => {"success" => true}.to_json
|
||||
else
|
||||
render :json => {"success" => false}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@intro = PersonalProjectIntro.find(params[:id])
|
||||
if @intro.update_attributes(params[:personal_project_intro])
|
||||
render :json => {"success" => true}.to_json
|
||||
else
|
||||
render :json => {"success" => false}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
+1
@@ -17,6 +17,7 @@
|
||||
<ul id='setting_left_nav'>
|
||||
<li><a href="<%= panel_personal_project_desktop_personal_projects_path %>" callback-method="list" class="hh1 w2 hp active thmc1 thmtxt" load="true" onclick='return false;'>List</a></li>
|
||||
<li><a href="<%= new_panel_personal_project_desktop_personal_project_path %>" callback-method="addproject" class="admtxt hh1 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||
<li><a href="<%= panel_personal_project_desktop_plugin_intros_path %>" class="admtxt hh1 w2 hp" callback-method="brief" onclick='return false;'>Brief Info</a></li>
|
||||
<!-- <li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Books</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
<div class="toolbar hh1">
|
||||
<div class="fn_g hp">
|
||||
|
||||
<%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1 ">Language</div>
|
||||
<div class="admbg sdm_o language_select">
|
||||
<ul>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<li><a class="hp hh1 admtxt" href="" data-lang="<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" content-layout="simple">
|
||||
<ul class="s_form">
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", "Frontend Page", :class => 's_grid s_grid_4') %>
|
||||
<div class="s_select_g s_grid s_grid_8 s_grid_h_2">
|
||||
<ul>
|
||||
<li>
|
||||
<%= f.check_box :brief_intro,
|
||||
id: "field-0" %>
|
||||
<label for="field-0"> Brief Intro </label>
|
||||
</li>
|
||||
<li>
|
||||
<%= f.check_box :complete_list,
|
||||
id: "field-1" %>
|
||||
<label for="field-1"> Complete List </label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% data = "data-language=" + locale %>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= label_tag("", I18nVariable.from_locale(locale), :class => 's_grid s_grid_4') %>
|
||||
</li>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= f.fields_for :text_translations do |f| %>
|
||||
<%= f.text_area locale, :class=>"editor", rows: 5, :value => (@intro.text_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<%= form_for @intro, html: { multipart: true, "form-type"=>"ajax_form","notification"=>"Brief Intro Updated"}, url: panel_personal_project_desktop_plugin_intro_path(@intro) do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<%= form_for @intro, html: { multipart: true, "form-type"=>"ajax_form", "notification"=>"Brief Intro Saved"}, url: panel_personal_project_desktop_plugin_intros_path do |f| %>
|
||||
<%= render partial: 'form', locals: {f: f} %>
|
||||
<% end %>
|
||||
@@ -5,6 +5,7 @@ Rails.application.routes.draw do
|
||||
namespace :desktop do
|
||||
match "project_window" => "personal_projects#project_window"
|
||||
resources :personal_projects
|
||||
resources :plugin_intros
|
||||
end
|
||||
namespace :back_end do
|
||||
|
||||
|
||||
+8
@@ -85,6 +85,14 @@ orbitDesktop.prototype.initializePersonalResearch = function(target,url,cache){
|
||||
languageSelect();
|
||||
}
|
||||
|
||||
this.initializePersonalResearch.brief = function(){
|
||||
o.enablelanguageSelect();
|
||||
$("textarea.editor").ckeditor({
|
||||
height: 300,
|
||||
width: $(".overview").width() - 20
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
this.initializePersonalResearch.coAuthorformCallback = function(data){
|
||||
if(data.success){
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
class Panel::PersonalResearch::Desktop::PluginIntrosController < ApplicationController
|
||||
|
||||
def index
|
||||
@intro = PersonalResearchIntro.where(:user_id => current_user.id.to_s).first
|
||||
if @intro.blank?
|
||||
@intro = PersonalResearchIntro.new
|
||||
render "new", :layout => false
|
||||
else
|
||||
render "edit", :layout => false
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
@intro = PersonalResearchIntro.new(params[:personal_research_intro])
|
||||
@intro.user_id = current_user.id
|
||||
if @intro.save
|
||||
render :json => {"success" => true}.to_json
|
||||
else
|
||||
render :json => {"success" => false}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@intro = PersonalResearchIntro.find(params[:id])
|
||||
if @intro.update_attributes(params[:personal_research_intro])
|
||||
render :json => {"success" => true}.to_json
|
||||
else
|
||||
render :json => {"success" => false}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
+1
@@ -17,6 +17,7 @@
|
||||
<ul id='setting_left_nav'>
|
||||
<li><a href="<%= panel_personal_research_desktop_personal_researchs_path %>" callback-method="list" class="hh1 w2 hp active thmc1 thmtxt" load="true" onclick='return false;'>List</a></li>
|
||||
<li><a href="<%= new_panel_personal_research_desktop_personal_research_path %>" callback-method="addresearch" class="admtxt hh1 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||
<li><a href="<%= panel_personal_research_desktop_plugin_intros_path %>" class="admtxt hh1 w2 hp" callback-method="brief" onclick='return false;'>Brief Info</a></li>
|
||||
<!-- <li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Books</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
<div class="toolbar hh1">
|
||||
<div class="fn_g hp">
|
||||
|
||||
<%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1 ">Language</div>
|
||||
<div class="admbg sdm_o language_select">
|
||||
<ul>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<li><a class="hp hh1 admtxt" href="" data-lang="<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" content-layout="simple">
|
||||
<ul class="s_form">
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", "Frontend Page", :class => 's_grid s_grid_4') %>
|
||||
<div class="s_select_g s_grid s_grid_8 s_grid_h_2">
|
||||
<ul>
|
||||
<li>
|
||||
<%= f.check_box :brief_intro,
|
||||
id: "field-0" %>
|
||||
<label for="field-0"> Brief Intro </label>
|
||||
</li>
|
||||
<li>
|
||||
<%= f.check_box :complete_list,
|
||||
id: "field-1" %>
|
||||
<label for="field-1"> Complete List </label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% data = "data-language=" + locale %>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= label_tag("", I18nVariable.from_locale(locale), :class => 's_grid s_grid_4') %>
|
||||
</li>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= f.fields_for :text_translations do |f| %>
|
||||
<%= f.text_area locale, :class=>"editor", rows: 5, :value => (@intro.text_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<%= form_for @intro, html: { multipart: true, "form-type"=>"ajax_form","notification"=>"Brief Intro Updated"}, url: panel_personal_research_desktop_plugin_intro_path(@intro) do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<%= form_for @intro, html: { multipart: true, "form-type"=>"ajax_form", "notification"=>"Brief Intro Saved"}, url: panel_personal_research_desktop_plugin_intros_path do |f| %>
|
||||
<%= render partial: 'form', locals: {f: f} %>
|
||||
<% end %>
|
||||
@@ -5,6 +5,7 @@ Rails.application.routes.draw do
|
||||
namespace :desktop do
|
||||
match "research_window" => "personal_researchs#research_window"
|
||||
resources :personal_researchs
|
||||
resources :plugin_intros
|
||||
end
|
||||
namespace :back_end do
|
||||
|
||||
|
||||
Reference in new issue
Block a user