some backend code change for sharing personal plugin module content. Added sharing in desktop for all the modules.

This commit is contained in:
Harry Bomrah 2013-09-26 19:36:54 +08:00 committed by saurabhbhatia
parent 028c689739
commit 52c896d8c5
46 changed files with 224 additions and 244 deletions

View File

@ -29,6 +29,9 @@
//column="true" this option is only for column layout... the columns will be formed on this column=true attribute and it should be a div
//item=true this attribute should be present in the li tag. li with this attribute are considered as a separate item.
//enableLanguageSelect( dom ) children <a> will be binded with language, data-lang = string ex "en"|"zh_tw" will toggle all data-langunage throughout the page
//enableSharing( dom ) children <a> will be binded with share, data-mode = string ex "public"|"private" will change the mode for all the selected items. the dom with class should have data-link = url data-var = vaiable_name, default will be mode
$.extend($.expr[':'], {
'containsi': function (elem, i, match, array) {
@ -1881,6 +1884,35 @@ var orbitDesktop = function(dom){
return false;
});
}
this.enableSharing = function( dom ){
var el = $( dom ),
variable = ( el.data( 'var' ) ? el.data( "var" ) : "mode"),
_url = el.data( 'link' ) + "?" + variable + "=",
classes = [];
el.find( "a" ).each( function(){
classes.push( $( this ).attr( "item-class" ) ? $( this ).attr( "item-class" ) : $( this ).data( 'mode' ) );
})
el.find( "a" ).click( function(){
var ids = [],
mode = $( this ).data( 'mode' ),
inject_class = $( this ).attr( 'item-class' ) ? $( this ).attr( 'item-class' ) : mode;
$( ".overview li[item=true] a.icon-check" ).each( function(){
ids.push( $( this ).data( 'id' ) );
$( "li[data-id="+ $( this ).data( 'id' ) +"]").removeClass( classes.join( " " ) ).addClass( inject_class );
})
$.ajax({
url : _url + mode,
data : {"ids" : ids},
datatype : "json",
})
return false;
})
}
this.minimizeBarManager = function(){
var minimizedApps = [],
minimizeBar = $("#minimizebar");

View File

@ -81,25 +81,26 @@ $(function() {
e.preventDefault();
});
$("#dialog").on('show', function (e) {
$(this).find('.delete-item').on(clickEvent, function() {
var _v = [];
$("tbody .list-check").each(function() {
this.checked && _v.push("ids[]="+this.value)
});
var _t = $t.attr("rel");
if(_t.indexOf("?") > -1) {
$.ajax(_t + "&" + _v.join("&")).done(function() {
actionSuccess(_data.checkAction)
});
} else {
$.ajax(_t + "?" + _v.join("&")).done(function() {
actionSuccess(_data.checkAction)
});
$("#dialog").on(clickEvent, '.delete-item', function() {
var _v = [],
_t = $t.attr("rel");
$("tbody .list-check:checked").each(function() {
_v.push(this.value);
});
$.ajax({
url : _t,
type:"get",
data : {"ids":_v},
dataType : "json",
success : function(){
actionSuccess(_data.checkAction);
}
$('#dialog').modal('hide');
$('.list-active-btn').addClass('disabled').data('actionable', false);
e.preventDefault();
})
});
$('#dialog').modal('hide');
$('.list-active-btn').addClass('disabled').data('actionable', false);
})
});

View File

@ -19,6 +19,14 @@
margin-left: 0;
}
}
.form_fix {
textarea {
margin-bottom: 12px;
}
input {
margin-left: 0;
}
}
// fixed width column with 12px gutter
// 276px width for 8 columns
// 420px width for 12 columns

View File

@ -323,6 +323,29 @@ a.admtxt.admbg2:hover {
float: left; }
.docklist .d_cate:hover .dock_child {
display: block; }
.disable {
opacity: .3;
}
.disable a {
cursor: not-allowed;
}
.private {
position: relative;
padding-right: 10px;
width: 300px;
opacity: .3 !important;
}
.private:after {
content: "\e073";
display: inline-block;
font-family: 'entypo';
font-size: 1.5em;
position: absolute;
right: 0;
text-align: center;
text-decoration: inherit;
top: 5px;
}
.fn_des.admtxt {
line-height: 60px;
@ -714,7 +737,8 @@ a.admtxt.admbg2:hover {
/* list item */
.list_t_item {
overflow: hidden; }
overflow: hidden;
height: 100px; }
.list_t_title {
padding-bottom: 6px;
@ -748,7 +772,8 @@ a.admtxt.admbg2:hover {
-webkit-text-size-adjust: none; }
.list_item_function a :first-child {
margin-left: 0; }
.datalist_item:hover .list_item_function {
.datalist_item:hover .list_item_function,
.list_t_item:hover .list_item_function {
bottom: 0; }
/* App */

View File

@ -5,7 +5,6 @@
<%= render :partial => "js_and_css"%>
<% content_for :page_specific_javascript do -%>
<%= javascript_include_tag "lib/jquery.lite.image.resize.js" %>
<%= javascript_include_tag "lib/member/member.js" %>
<%= javascript_include_tag "lib/footable-0.1.js" %>
<% end -%>

View File

@ -29,6 +29,7 @@ orbitDesktop.prototype.initializePersonalBook = function(target,url,cache){ // t
return false;
})
}
o.enableSharing("div.share_mode");
}
this.initializePersonalBook.bookDelete = function(data,dom){
var parent = dom.parent().parent().parent();

View File

@ -282,6 +282,7 @@ class Panel::PersonalBook::BackEnd::WritingBooksController < OrbitBackendControl
respond_to do |format|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"WritingBook")) }
format.json { render json: {"success"=>true}.to_json}
end

View File

@ -2,23 +2,26 @@ module Panel::PersonalBook::Desktop::PersonalBooksHelper
def publication_record publication, view
content_tag :li,
"item" => "true",
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
marker + \
"data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
marker(publication.id) + \
content(publication, view) + \
edit_or_delete(publication)
end
end
def marker
def marker id
content_tag :div,
:class => "list_item_action" do
content_tag(:a, "",:href=>"",
:class => "icon-check-empty",
"toggle-onclick"=>"icon-check-empty icon-check",
"data-id" => id.to_s,
"ajax-remote"=>"false") + \
content_tag(:a, "",:href=>"",
:class => "icon-star-empty",
"toggle-onclick"=>"icon-star-empty icon-star",
"data-id" => id.to_s,
"ajax-remote"=>"false")
end
end

View File

@ -50,25 +50,10 @@
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1">Share</div>
<div class="admbg sdm_o">
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_book_back_end_writing_books_path %>" data-var="disable" >
<ul>
<li><a class="hp hh1 admtxt" href="">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1" id='ns'>New Share</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_book_desktop_personal_books_path %>">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
</ul>
</div>
</div>

View File

@ -29,6 +29,7 @@ orbitDesktop.prototype.initializeConferencePapers = function(target,url,cache){
return false;
})
}
o.enableSharing("div.share_mode");
}
this.initializeConferencePapers.paperDelete = function(data,dom){
var parent = dom.parent().parent().parent();

View File

@ -277,7 +277,7 @@ class Panel::PersonalConference::BackEnd::WritingConferencesController < OrbitBa
respond_to do |format|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"WritingConference")) }
format.json { render json: {"success"=>true}.to_json}
end
end

View File

@ -2,23 +2,29 @@ module Panel::PersonalConference::Desktop::ConferencePagesHelper
def publication_record publication, view
content_tag :li,
"item" => "true",
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
marker + \
content(publication, view) + \
edit_or_delete(publication)
"data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
content_tag :div,
:class => "inner" do
marker(publication.id) + \
content(publication, view) + \
edit_or_delete(publication)
end
end
end
def marker
def marker id
content_tag :div,
:class => "list_item_action" do
content_tag(:a, "",:href=>"",
:class => "icon-check-empty",
"toggle-onclick"=>"icon-check-empty icon-check",
"data-id" => id.to_s,
"ajax-remote"=>"false") + \
content_tag(:a, "",:href=>"",
:class => "icon-star-empty",
"toggle-onclick"=>"icon-star-empty icon-star",
"data-id" => id.to_s,
"ajax-remote"=>"false")
end
end

View File

@ -51,13 +51,10 @@
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1">Share</div>
<div class="admbg sdm_o">
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_conference_back_end_writing_conferences_path %>" data-var="disable" >
<ul>
<li><a class="hp hh1 admtxt" href="">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
</ul>
</div>
</div>
@ -69,13 +66,15 @@
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
<div class="viewport"> -->
<% if @view_by.eql?"abstract" %>
<div class="overview" page-name="conference_p_list" content-layout="datalist" per-column="1" base-width="300" pagination-var="page">
<div class="overview" page-name="conference_p_list" content-layout="simple" per-column="1" base-width="300" pagination-var="page">
<% else %>
<div class="overview" page-name="conference_p_list" content-layout="datalist" per-column="5" base-width="300" pagination-var="page">
<div class="overview" page-name="conference_p_list" content-layout="simple" per-column="5" base-width="300" pagination-var="page">
<% end %>
<ul isotope="true">
<% @writing_conferences.each do |w| %>
<%= publication_record w, @view_by%>
<% end %>
</ul>
</div>
<!-- </div>
</div> -->

View File

@ -29,6 +29,7 @@ orbitDesktop.prototype.initializePersonalDiploma = function(target,url,cache){ /
return false;
})
}
o.enableSharing("div.share_mode");
}
this.initializePersonalDiploma.diplomaDelete = function(data,dom){
var parent = dom.parent().parent().parent();

View File

@ -159,7 +159,7 @@ class Panel::PersonalDiploma::BackEnd::DiplomasController < OrbitBackendControll
respond_to do |format|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"Diploma")) }
format.json { render json: {"success"=>true}.to_json}
end
end

View File

@ -2,23 +2,26 @@ module Panel::PersonalDiploma::Desktop::PersonalDiplomasHelper
def publication_record publication, view
content_tag :li,
"item" => "true",
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
marker + \
"data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
marker(publication.id) + \
content(publication, view) + \
edit_or_delete(publication)
end
end
def marker
def marker id
content_tag :div,
:class => "list_item_action" do
content_tag(:a, "",:href=>"",
:class => "icon-check-empty",
"toggle-onclick"=>"icon-check-empty icon-check",
"data-id" => id.to_s,
"ajax-remote"=>"false") + \
content_tag(:a, "",:href=>"",
:class => "icon-star-empty",
"toggle-onclick"=>"icon-star-empty icon-star",
"data-id" => id.to_s,
"ajax-remote"=>"false")
end
end

View File

@ -47,27 +47,12 @@
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="hh1 hp sdm">
<div class="sdm_t hh1">Share</div>
<div class="admbg sdm_o">
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_diploma_back_end_diplomas_path %>" data-var="disable" >
<ul>
<li><a class="hp hh1 admtxt" href="">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1" id='ns'>New Share</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_diploma_desktop_personal_diplomas_path %>">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
</ul>
</div>
</div>

View File

@ -29,6 +29,7 @@ orbitDesktop.prototype.initializePersonalExperience = function(target,url,cache)
return false;
})
}
o.enableSharing("div.share_mode");
}
this.initializePersonalExperience.experienceDelete = function(data,dom){
var parent = dom.parent().parent().parent();

View File

@ -225,7 +225,7 @@ class Panel::PersonalExperience::BackEnd::ExperiencesController < OrbitBackendCo
respond_to do |format|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"Experience")) }
format.json { render json: {"success"=>true}.to_json}
end
end

View File

@ -2,22 +2,25 @@ module Panel::PersonalExperience::Desktop::PersonalExperiencesHelper
def publication_record publication, view
content_tag :li,
"item" => "true",
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
marker + \
"data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
marker(publication.id) + \
content(publication, view) + \
edit_or_delete(publication)
end
end
def marker
def marker id
content_tag :div,
:class => "list_item_action" do
content_tag(:a, "",:href=>"",
:class => "icon-check-empty",
"data-id" => id.to_s,
"toggle-onclick"=>"icon-check-empty icon-check",
"ajax-remote"=>"false") + \
content_tag(:a, "",:href=>"",
:class => "icon-star-empty",
"data-id" => id.to_s,
"toggle-onclick"=>"icon-star-empty icon-star",
"ajax-remote"=>"false")
end

View File

@ -50,25 +50,10 @@
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1">Share</div>
<div class="admbg sdm_o">
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_experience_back_end_experiences_path %>" data-var="disable" >
<ul>
<li><a class="hp hh1 admtxt" href="">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1" id='ns'>New Share</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_experience_desktop_personal_experiences_path %>">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
</ul>
</div>
</div>

View File

@ -29,6 +29,7 @@ orbitDesktop.prototype.initializePersonalHonor = function(target,url,cache){ //
return false;
})
}
o.enableSharing("div.share_mode");
}
this.initializePersonalHonor.honorDelete = function(data,dom){
var parent = dom.parent().parent().parent();

View File

@ -226,7 +226,7 @@ class Panel::PersonalHonor::BackEnd::HonorsController < OrbitBackendController
respond_to do |format|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"Honor")) }
format.json { render json: {"success"=>true}.to_json}
end
end

View File

@ -2,23 +2,26 @@ module Panel::PersonalHonor::Desktop::PersonalHonorsHelper
def publication_record publication, view
content_tag :li,
"item" => "true",
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
marker + \
"data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
marker(publication.id) + \
content(publication, view) + \
edit_or_delete(publication)
end
end
def marker
def marker id
content_tag :div,
:class => "list_item_action" do
content_tag(:a, "",:href=>"",
:class => "icon-check-empty",
"toggle-onclick"=>"icon-check-empty icon-check",
"data-id" => id.to_s,
"ajax-remote"=>"false") + \
content_tag(:a, "",:href=>"",
:class => "icon-star-empty",
"toggle-onclick"=>"icon-star-empty icon-star",
"data-id" => id.to_s,
"ajax-remote"=>"false")
end
end

View File

@ -46,27 +46,12 @@
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="hh1 hp sdm">
<div class="sdm_t hh1">Share</div>
<div class="admbg sdm_o">
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_honor_back_end_honors_path %>" data-var="disable" >
<ul>
<li><a class="hp hh1 admtxt" href="">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1" id='ns'>New Share</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_honor_desktop_personal_honors_path %>">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
</ul>
</div>
</div>

View File

@ -29,6 +29,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
return false;
})
}
o.enableSharing("div.share_mode");
}
this.initializeJournalPapers.paperDelete = function(data,dom){
var parent = dom.parent().parent().parent();

View File

@ -327,7 +327,7 @@ class Panel::PersonalJournal::BackEnd::WritingJournalsController < OrbitBackendC
respond_to do |format|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"WritingJournal")) }
format.json { render json: {"success"=>true}.to_json}
end
end

View File

@ -2,10 +2,15 @@ module Panel::PersonalJournal::Desktop::JournalPagesHelper
def publication_record publication, view
content_tag :li,
"item" => "true",
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
marker + \
content(publication, view) + \
edit_or_delete(publication)
"data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
content_tag :div,
:class => "inner" do
marker(publication.id) + \
content(publication, view) + \
edit_or_delete(publication)
end
end
end
@ -25,16 +30,18 @@ module Panel::PersonalJournal::Desktop::JournalPagesHelper
height
end
def marker
def marker id
content_tag :div,
:class => "list_item_action" do
content_tag(:a, "",:href=>"",
:class => "icon-check-empty",
"toggle-onclick"=>"icon-check-empty icon-check",
"data-id" => id.to_s,
"ajax-remote"=>"false") + \
content_tag(:a, "",:href=>"",
:class => "icon-star-empty",
"toggle-onclick"=>"icon-star-empty icon-star",
"data-id" => id.to_s,
"ajax-remote"=>"false")
end
end

View File

@ -32,10 +32,11 @@
<div class="viewport"> -->
<div class="overview" content-layout="simple" base-width="420">
<ul class="s_form" isotope="true">
<li class="s_grid_row" >
<% @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 %>>
<div class="form_fix" <%= style %> <%= data %>>
<%= f.fields_for :paper_title_translations do |f| %>
<%= f.text_area locale,
class: "s_grid_12 s_grid s_grid_h_3",
@ -43,8 +44,7 @@
placeholder: t("personal_journal.paper_title")+ "("+I18nVariable.from_locale(locale)+")",
value: (@writing_journal.paper_title_translations[locale.to_s] rescue nil) %>
<% end %>
</li>
<li class="s_grid_row" <%= style %> <%= data %>>
<p></p>
<%= f.fields_for :journal_title_translations do |f| %>
<%= f.text_field locale,
size: "20",
@ -53,8 +53,9 @@
value: (@writing_journal.journal_title_translations[locale.to_s] rescue nil) %>
<% end %>
</li>
</div>
<% end %>
</li>
<li class="s_grid_row">
<%= label_tag("", t("personal_journal.level_type"), :class => 's_grid s_grid_4') %>
<div class="s_select_g s_grid s_grid_8 s_grid_h_2">

View File

@ -51,25 +51,10 @@
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1">Share</div>
<div class="admbg sdm_o">
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_journal_back_end_writing_journals_path %>" data-var="disable" >
<ul>
<li><a class="hp hh1 admtxt" href="">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1" id='ns'>New Share</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_journal_plugin_writing_journals_path %>">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
</ul>
</div>
</div>

View File

@ -29,6 +29,7 @@ orbitDesktop.prototype.initializePersonalLab = function(target,url,cache){ // th
return false;
})
}
o.enableSharing("div.share_mode");
}
this.initializePersonalLab.labDelete = function(data,dom){
var parent = dom.parent().parent().parent();

View File

@ -161,7 +161,7 @@ class Panel::PersonalLab::BackEnd::LabsController < OrbitBackendController
respond_to do |format|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"Lab")) }
format.json { render json: {"success"=>true}.to_json}
end
end

View File

@ -2,23 +2,26 @@ module Panel::PersonalLab::Desktop::PersonalLabsHelper
def publication_record publication, view
content_tag :li,
"item" => "true",
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
marker + \
"data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
marker(publication.id) + \
content(publication, view) + \
edit_or_delete(publication)
end
end
def marker
def marker id
content_tag :div,
:class => "list_item_action" do
content_tag(:a, "",:href=>"",
:class => "icon-check-empty",
"toggle-onclick"=>"icon-check-empty icon-check",
"data-id" => id.to_s,
"ajax-remote"=>"false") + \
content_tag(:a, "",:href=>"",
:class => "icon-star-empty",
"toggle-onclick"=>"icon-star-empty icon-star",
"data-id" => id.to_s,
"ajax-remote"=>"false")
end
end

View File

@ -48,27 +48,12 @@
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="hh1 hp sdm">
<div class="sdm_t hh1">Share</div>
<div class="admbg sdm_o">
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_lab_back_end_labs_path %>" data-var="disable" >
<ul>
<li><a class="hp hh1 admtxt" href="">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1" id='ns'>New Share</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_lab_desktop_personal_labs_path %>">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
</ul>
</div>
</div>

View File

@ -29,6 +29,7 @@ orbitDesktop.prototype.initializePersonalPatent = function(target,url,cache){ //
return false;
})
}
o.enableSharing("div.share_mode");
}
this.initializePersonalPatent.patentDelete = function(data,dom){
var parent = dom.parent().parent().parent();

View File

@ -226,7 +226,7 @@ class Panel::PersonalPatent::BackEnd::WritingPatentsController < OrbitBackendCon
respond_to do |format|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"WritingPatent")) }
format.json { render json: {"success"=>true}.to_json}
end
end

View File

@ -2,23 +2,26 @@ module Panel::PersonalPatent::Desktop::PersonalPatentsHelper
def publication_record publication, view
content_tag :li,
"item" => "true",
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
marker + \
"data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
marker(publication.id) + \
content(publication, view) + \
edit_or_delete(publication)
end
end
def marker
def marker id
content_tag :div,
:class => "list_item_action" do
content_tag(:a, "",:href=>"",
:class => "icon-check-empty",
"toggle-onclick"=>"icon-check-empty icon-check",
"data-id" => id.to_s,
"ajax-remote"=>"false") + \
content_tag(:a, "",:href=>"",
:class => "icon-star-empty",
"toggle-onclick"=>"icon-star-empty icon-star",
"data-id" => id.to_s,
"ajax-remote"=>"false")
end
end

View File

@ -47,27 +47,12 @@
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="hh1 hp sdm">
<div class="sdm_t hh1">Share</div>
<div class="admbg sdm_o">
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_patent_back_end_writing_patents_path %>" data-var="disable" >
<ul>
<li><a class="hp hh1 admtxt" href="">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1" id='ns'>New Share</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_patent_desktop_personal_patents_path %>">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
</ul>
</div>
</div>

View File

@ -29,6 +29,7 @@ orbitDesktop.prototype.initializePersonalProject = function(target,url,cache){ /
return false;
})
}
o.enableSharing("div.share_mode");
}
this.initializePersonalProject.projectDelete = function(data,dom){
var parent = dom.parent().parent().parent();

View File

@ -224,7 +224,7 @@ class Panel::PersonalProject::BackEnd::ProjectsController < OrbitBackendControll
respond_to do |format|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"Project")) }
format.json { render json: {"success"=>true}.to_json}
end
end

View File

@ -2,23 +2,27 @@ module Panel::PersonalProject::Desktop::PersonalProjectsHelper
def publication_record publication, view
content_tag :li,
"item" => "true",
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
marker + \
"item" => "true",
"data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
marker(publication.id) + \
content(publication, view) + \
edit_or_delete(publication)
end
end
def marker
def marker id
content_tag :div,
:class => "list_item_action" do
content_tag(:a, "",:href=>"",
:class => "icon-check-empty",
"toggle-onclick"=>"icon-check-empty icon-check",
"data-id" => id.to_s,
"ajax-remote"=>"false") + \
content_tag(:a, "",:href=>"",
:class => "icon-star-empty",
"toggle-onclick"=>"icon-star-empty icon-star",
"data-id" => id.to_s,
"ajax-remote"=>"false")
end
end

View File

@ -48,27 +48,12 @@
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="hh1 hp sdm">
<div class="sdm_t hh1">Share</div>
<div class="admbg sdm_o">
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_project_back_end_projects_path %>" data-var="disable" >
<ul>
<li><a class="hp hh1 admtxt" href="">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1" id='ns'>New Share</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_project_desktop_personal_projects_path %>">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
</ul>
</div>
</div>

View File

@ -29,6 +29,7 @@ orbitDesktop.prototype.initializePersonalResearch = function(target,url,cache){
return false;
})
}
o.enableSharing("div.share_mode");
}
this.initializePersonalResearch.researchDelete = function(data,dom){
var parent = dom.parent().parent().parent();

View File

@ -150,7 +150,7 @@ class Panel::PersonalResearch::BackEnd::ResearchsController < OrbitBackendContro
respond_to do |format|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"Research")) }
format.json { render json: {"success"=>true}.to_json}
end
end

View File

@ -2,23 +2,27 @@ module Panel::PersonalResearch::Desktop::PersonalResearchsHelper
def publication_record publication, view
content_tag :li,
"item" => "true",
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
marker + \
"item" => "true",
"data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
marker(publication.id) + \
content(publication, view) + \
edit_or_delete(publication)
end
end
def marker
def marker id
content_tag :div,
:class => "list_item_action" do
content_tag(:a, "",:href=>"",
:class => "icon-check-empty",
"toggle-onclick"=>"icon-check-empty icon-check",
"data-id" => id.to_s,
"ajax-remote"=>"false") + \
content_tag(:a, "",:href=>"",
:class => "icon-star-empty",
"toggle-onclick"=>"icon-star-empty icon-star",
"data-id" => id.to_s,
"ajax-remote"=>"false")
end
end

View File

@ -50,25 +50,10 @@
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1">Share</div>
<div class="admbg sdm_o">
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_research_back_end_researchs_path %>" data-var="disable" >
<ul>
<li><a class="hp hh1 admtxt" href="">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1" id='ns'>New Share</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_research_desktop_personal_researchs_path %>">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
</ul>
</div>
</div>