From 52c896d8c5fbf6a1b4e7e4827645d1aa1f44cbb0 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Thu, 26 Sep 2013 19:36:54 +0800 Subject: [PATCH] some backend code change for sharing personal plugin module content. Added sharing in desktop for all the modules. --- .../javascripts/desktop/orbitdesktop.js | 32 +++++++++++++++ app/assets/javascripts/lib/list-check.js | 39 ++++++++++--------- .../desktop/desktop-component.scss | 8 ++++ .../stylesheets/desktop/desktop-main.css | 29 +++++++++++++- .../admin/users_new_interface/show.html.erb | 1 - .../personal_book/desktop/personal_books.js | 1 + .../back_end/writing_books_controller.rb | 1 + .../desktop/personal_books_helper.rb | 9 +++-- .../desktop/personal_books/index.html.erb | 21 ++-------- .../desktop/conference_pages.js | 1 + .../writing_conferences_controller.rb | 2 +- .../desktop/conference_pages_helper.rb | 16 +++++--- .../desktop/conference_pages/index.html.erb | 15 ++++--- .../desktop/personal_diploma.js | 1 + .../back_end/diplomas_controller.rb | 2 +- .../desktop/personal_diplomas_helper.rb | 9 +++-- .../desktop/personal_diplomas/index.html.erb | 23 ++--------- .../desktop/personal_experiences.js | 1 + .../back_end/experiences_controller.rb | 2 +- .../desktop/personal_experiences_helper.rb | 9 +++-- .../personal_experiences/index.html.erb | 21 ++-------- .../personal_honor/desktop/personal_honors.js | 1 + .../back_end/honors_controller.rb | 2 +- .../desktop/personal_honors_helper.rb | 9 +++-- .../desktop/personal_honors/index.html.erb | 23 ++--------- .../personal_journal/desktop/journal_pages.js | 1 + .../back_end/writing_journals_controller.rb | 2 +- .../desktop/journal_pages_helper.rb | 17 +++++--- .../desktop/journal_pages/_form.html.erb | 9 +++-- .../desktop/journal_pages/index.html.erb | 21 ++-------- .../personal_lab/desktop/personal_lab.js | 1 + .../personal_lab/back_end/labs_controller.rb | 2 +- .../desktop/personal_labs_helper.rb | 9 +++-- .../desktop/personal_labs/index.html.erb | 23 ++--------- .../desktop/personal_patent.js | 1 + .../back_end/writing_patents_controller.rb | 2 +- .../desktop/personal_patents_helper.rb | 9 +++-- .../desktop/personal_patents/index.html.erb | 23 ++--------- .../desktop/personal_project.js | 1 + .../back_end/projects_controller.rb | 2 +- .../desktop/personal_projects_helper.rb | 10 +++-- .../desktop/personal_projects/index.html.erb | 23 ++--------- .../desktop/personal_research.js | 1 + .../back_end/researchs_controller.rb | 2 +- .../desktop/personal_researchs_helper.rb | 10 +++-- .../desktop/personal_researchs/index.html.erb | 21 ++-------- 46 files changed, 224 insertions(+), 244 deletions(-) diff --git a/app/assets/javascripts/desktop/orbitdesktop.js b/app/assets/javascripts/desktop/orbitdesktop.js index 81579d99..0d6ed59f 100755 --- a/app/assets/javascripts/desktop/orbitdesktop.js +++ b/app/assets/javascripts/desktop/orbitdesktop.js @@ -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 will be binded with language, data-lang = string ex "en"|"zh_tw" will toggle all data-langunage throughout the page +//enableSharing( dom ) children 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"); diff --git a/app/assets/javascripts/lib/list-check.js b/app/assets/javascripts/lib/list-check.js index c21899fd..74f75f9e 100644 --- a/app/assets/javascripts/lib/list-check.js +++ b/app/assets/javascripts/lib/list-check.js @@ -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); + }) + }); \ No newline at end of file diff --git a/app/assets/stylesheets/desktop/desktop-component.scss b/app/assets/stylesheets/desktop/desktop-component.scss index 8dd99e87..e41c424c 100644 --- a/app/assets/stylesheets/desktop/desktop-component.scss +++ b/app/assets/stylesheets/desktop/desktop-component.scss @@ -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 diff --git a/app/assets/stylesheets/desktop/desktop-main.css b/app/assets/stylesheets/desktop/desktop-main.css index e9298769..15a437ac 100644 --- a/app/assets/stylesheets/desktop/desktop-main.css +++ b/app/assets/stylesheets/desktop/desktop-main.css @@ -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 */ diff --git a/app/views/admin/users_new_interface/show.html.erb b/app/views/admin/users_new_interface/show.html.erb index bcdc4be1..07be2bf1 100644 --- a/app/views/admin/users_new_interface/show.html.erb +++ b/app/views/admin/users_new_interface/show.html.erb @@ -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 -%> diff --git a/vendor/built_in_modules/personal_book/app/assets/javascripts/personal_book/desktop/personal_books.js b/vendor/built_in_modules/personal_book/app/assets/javascripts/personal_book/desktop/personal_books.js index 08a63fdb..b744239e 100644 --- a/vendor/built_in_modules/personal_book/app/assets/javascripts/personal_book/desktop/personal_books.js +++ b/vendor/built_in_modules/personal_book/app/assets/javascripts/personal_book/desktop/personal_books.js @@ -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(); diff --git a/vendor/built_in_modules/personal_book/app/controllers/panel/personal_book/back_end/writing_books_controller.rb b/vendor/built_in_modules/personal_book/app/controllers/panel/personal_book/back_end/writing_books_controller.rb index 60ba0c27..a2b13336 100644 --- a/vendor/built_in_modules/personal_book/app/controllers/panel/personal_book/back_end/writing_books_controller.rb +++ b/vendor/built_in_modules/personal_book/app/controllers/panel/personal_book/back_end/writing_books_controller.rb @@ -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 diff --git a/vendor/built_in_modules/personal_book/app/helpers/panel/personal_book/desktop/personal_books_helper.rb b/vendor/built_in_modules/personal_book/app/helpers/panel/personal_book/desktop/personal_books_helper.rb index 186b2d59..3c4b5fcb 100644 --- a/vendor/built_in_modules/personal_book/app/helpers/panel/personal_book/desktop/personal_books_helper.rb +++ b/vendor/built_in_modules/personal_book/app/helpers/panel/personal_book/desktop/personal_books_helper.rb @@ -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 diff --git a/vendor/built_in_modules/personal_book/app/views/panel/personal_book/desktop/personal_books/index.html.erb b/vendor/built_in_modules/personal_book/app/views/panel/personal_book/desktop/personal_books/index.html.erb index f79d1d30..9096e25f 100644 --- a/vendor/built_in_modules/personal_book/app/views/panel/personal_book/desktop/personal_books/index.html.erb +++ b/vendor/built_in_modules/personal_book/app/views/panel/personal_book/desktop/personal_books/index.html.erb @@ -50,25 +50,10 @@
Share
-
-
-
New Share
-
diff --git a/vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference/desktop/conference_pages.js b/vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference/desktop/conference_pages.js index 6955dedb..613a9dd2 100644 --- a/vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference/desktop/conference_pages.js +++ b/vendor/built_in_modules/personal_conference/app/assets/javascripts/personal_conference/desktop/conference_pages.js @@ -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(); diff --git a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/back_end/writing_conferences_controller.rb b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/back_end/writing_conferences_controller.rb index a6ae1f9f..0ef42ba3 100644 --- a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/back_end/writing_conferences_controller.rb +++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/back_end/writing_conferences_controller.rb @@ -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 diff --git a/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/desktop/conference_pages_helper.rb b/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/desktop/conference_pages_helper.rb index d22bfc18..c09f6b2a 100644 --- a/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/desktop/conference_pages_helper.rb +++ b/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/desktop/conference_pages_helper.rb @@ -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 diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb index 79229ec1..d61d3bf3 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb @@ -51,13 +51,10 @@
Share
- @@ -69,13 +66,15 @@
--> <% if @view_by.eql?"abstract" %> -
+
<% else %> -
+
<% end %> +
    <% @writing_conferences.each do |w| %> <%= publication_record w, @view_by%> <% end %> +
diff --git a/vendor/built_in_modules/personal_diploma/app/assets/javascripts/personal_diploma/desktop/personal_diploma.js b/vendor/built_in_modules/personal_diploma/app/assets/javascripts/personal_diploma/desktop/personal_diploma.js index 70ba7d79..756b437e 100644 --- a/vendor/built_in_modules/personal_diploma/app/assets/javascripts/personal_diploma/desktop/personal_diploma.js +++ b/vendor/built_in_modules/personal_diploma/app/assets/javascripts/personal_diploma/desktop/personal_diploma.js @@ -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(); diff --git a/vendor/built_in_modules/personal_diploma/app/controllers/panel/personal_diploma/back_end/diplomas_controller.rb b/vendor/built_in_modules/personal_diploma/app/controllers/panel/personal_diploma/back_end/diplomas_controller.rb index cfbaae98..09541dfb 100644 --- a/vendor/built_in_modules/personal_diploma/app/controllers/panel/personal_diploma/back_end/diplomas_controller.rb +++ b/vendor/built_in_modules/personal_diploma/app/controllers/panel/personal_diploma/back_end/diplomas_controller.rb @@ -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 diff --git a/vendor/built_in_modules/personal_diploma/app/helpers/panel/personal_diploma/desktop/personal_diplomas_helper.rb b/vendor/built_in_modules/personal_diploma/app/helpers/panel/personal_diploma/desktop/personal_diplomas_helper.rb index 6ca26061..b0e3eedf 100644 --- a/vendor/built_in_modules/personal_diploma/app/helpers/panel/personal_diploma/desktop/personal_diplomas_helper.rb +++ b/vendor/built_in_modules/personal_diploma/app/helpers/panel/personal_diploma/desktop/personal_diplomas_helper.rb @@ -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 diff --git a/vendor/built_in_modules/personal_diploma/app/views/panel/personal_diploma/desktop/personal_diplomas/index.html.erb b/vendor/built_in_modules/personal_diploma/app/views/panel/personal_diploma/desktop/personal_diplomas/index.html.erb index a53e048c..b35f9457 100644 --- a/vendor/built_in_modules/personal_diploma/app/views/panel/personal_diploma/desktop/personal_diplomas/index.html.erb +++ b/vendor/built_in_modules/personal_diploma/app/views/panel/personal_diploma/desktop/personal_diplomas/index.html.erb @@ -47,27 +47,12 @@
-
+
Share
-
+ -
-
-
New Share
-
diff --git a/vendor/built_in_modules/personal_experience/app/assets/javascripts/personal_experience/desktop/personal_experiences.js b/vendor/built_in_modules/personal_experience/app/assets/javascripts/personal_experience/desktop/personal_experiences.js index 8a089d90..4ea54b77 100644 --- a/vendor/built_in_modules/personal_experience/app/assets/javascripts/personal_experience/desktop/personal_experiences.js +++ b/vendor/built_in_modules/personal_experience/app/assets/javascripts/personal_experience/desktop/personal_experiences.js @@ -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(); diff --git a/vendor/built_in_modules/personal_experience/app/controllers/panel/personal_experience/back_end/experiences_controller.rb b/vendor/built_in_modules/personal_experience/app/controllers/panel/personal_experience/back_end/experiences_controller.rb index fd2470ac..61584778 100644 --- a/vendor/built_in_modules/personal_experience/app/controllers/panel/personal_experience/back_end/experiences_controller.rb +++ b/vendor/built_in_modules/personal_experience/app/controllers/panel/personal_experience/back_end/experiences_controller.rb @@ -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 diff --git a/vendor/built_in_modules/personal_experience/app/helpers/panel/personal_experience/desktop/personal_experiences_helper.rb b/vendor/built_in_modules/personal_experience/app/helpers/panel/personal_experience/desktop/personal_experiences_helper.rb index f78c6948..b5d91e7e 100644 --- a/vendor/built_in_modules/personal_experience/app/helpers/panel/personal_experience/desktop/personal_experiences_helper.rb +++ b/vendor/built_in_modules/personal_experience/app/helpers/panel/personal_experience/desktop/personal_experiences_helper.rb @@ -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 diff --git a/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/desktop/personal_experiences/index.html.erb b/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/desktop/personal_experiences/index.html.erb index 41921119..bbcaf1f3 100644 --- a/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/desktop/personal_experiences/index.html.erb +++ b/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/desktop/personal_experiences/index.html.erb @@ -50,25 +50,10 @@
Share
-
+ -
-
-
New Share
-
diff --git a/vendor/built_in_modules/personal_honor/app/assets/javascripts/personal_honor/desktop/personal_honors.js b/vendor/built_in_modules/personal_honor/app/assets/javascripts/personal_honor/desktop/personal_honors.js index 608f0a35..18d17acb 100644 --- a/vendor/built_in_modules/personal_honor/app/assets/javascripts/personal_honor/desktop/personal_honors.js +++ b/vendor/built_in_modules/personal_honor/app/assets/javascripts/personal_honor/desktop/personal_honors.js @@ -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(); diff --git a/vendor/built_in_modules/personal_honor/app/controllers/panel/personal_honor/back_end/honors_controller.rb b/vendor/built_in_modules/personal_honor/app/controllers/panel/personal_honor/back_end/honors_controller.rb index 210a2396..02570824 100644 --- a/vendor/built_in_modules/personal_honor/app/controllers/panel/personal_honor/back_end/honors_controller.rb +++ b/vendor/built_in_modules/personal_honor/app/controllers/panel/personal_honor/back_end/honors_controller.rb @@ -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 diff --git a/vendor/built_in_modules/personal_honor/app/helpers/panel/personal_honor/desktop/personal_honors_helper.rb b/vendor/built_in_modules/personal_honor/app/helpers/panel/personal_honor/desktop/personal_honors_helper.rb index 3cdccddc..bee7a81b 100644 --- a/vendor/built_in_modules/personal_honor/app/helpers/panel/personal_honor/desktop/personal_honors_helper.rb +++ b/vendor/built_in_modules/personal_honor/app/helpers/panel/personal_honor/desktop/personal_honors_helper.rb @@ -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 diff --git a/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/desktop/personal_honors/index.html.erb b/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/desktop/personal_honors/index.html.erb index 88502ffb..5c4175df 100644 --- a/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/desktop/personal_honors/index.html.erb +++ b/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/desktop/personal_honors/index.html.erb @@ -46,27 +46,12 @@
-
+
Share
-
+ -
-
-
New Share
-
diff --git a/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/desktop/journal_pages.js b/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/desktop/journal_pages.js index cdbce8cb..5da6a9df 100644 --- a/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/desktop/journal_pages.js +++ b/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/desktop/journal_pages.js @@ -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(); diff --git a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/back_end/writing_journals_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/back_end/writing_journals_controller.rb index da0e7605..1c3998fd 100644 --- a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/back_end/writing_journals_controller.rb +++ b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/back_end/writing_journals_controller.rb @@ -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 diff --git a/vendor/built_in_modules/personal_journal/app/helpers/panel/personal_journal/desktop/journal_pages_helper.rb b/vendor/built_in_modules/personal_journal/app/helpers/panel/personal_journal/desktop/journal_pages_helper.rb index 490d7779..b7915faf 100644 --- a/vendor/built_in_modules/personal_journal/app/helpers/panel/personal_journal/desktop/journal_pages_helper.rb +++ b/vendor/built_in_modules/personal_journal/app/helpers/panel/personal_journal/desktop/journal_pages_helper.rb @@ -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 diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb index 140974fe..3c2f5e7d 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb @@ -32,10 +32,11 @@
-->
    +
  • <% @site_valid_locales.each_with_index do |locale, i| %> <% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %> <% data = "data-language=" + locale %> -
  • <%= data %>> +
    <%= 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 %> -
  • -
  • <%= data %>> +

    <%= 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 %> -
  • +
<% end %> +
  • <%= label_tag("", t("personal_journal.level_type"), :class => 's_grid s_grid_4') %>
    diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/index.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/index.html.erb index 35d7c2d1..07007f47 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/index.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/index.html.erb @@ -51,25 +51,10 @@
    Share
    -
    + -
    -
    -
    New Share
    -
    diff --git a/vendor/built_in_modules/personal_lab/app/assets/javascripts/personal_lab/desktop/personal_lab.js b/vendor/built_in_modules/personal_lab/app/assets/javascripts/personal_lab/desktop/personal_lab.js index 87e7415a..e279f831 100644 --- a/vendor/built_in_modules/personal_lab/app/assets/javascripts/personal_lab/desktop/personal_lab.js +++ b/vendor/built_in_modules/personal_lab/app/assets/javascripts/personal_lab/desktop/personal_lab.js @@ -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(); diff --git a/vendor/built_in_modules/personal_lab/app/controllers/panel/personal_lab/back_end/labs_controller.rb b/vendor/built_in_modules/personal_lab/app/controllers/panel/personal_lab/back_end/labs_controller.rb index e1954e59..e704e718 100644 --- a/vendor/built_in_modules/personal_lab/app/controllers/panel/personal_lab/back_end/labs_controller.rb +++ b/vendor/built_in_modules/personal_lab/app/controllers/panel/personal_lab/back_end/labs_controller.rb @@ -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 diff --git a/vendor/built_in_modules/personal_lab/app/helpers/panel/personal_lab/desktop/personal_labs_helper.rb b/vendor/built_in_modules/personal_lab/app/helpers/panel/personal_lab/desktop/personal_labs_helper.rb index 087d4bcd..7269457f 100644 --- a/vendor/built_in_modules/personal_lab/app/helpers/panel/personal_lab/desktop/personal_labs_helper.rb +++ b/vendor/built_in_modules/personal_lab/app/helpers/panel/personal_lab/desktop/personal_labs_helper.rb @@ -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 diff --git a/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/desktop/personal_labs/index.html.erb b/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/desktop/personal_labs/index.html.erb index 2a2f9a18..46037cd5 100644 --- a/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/desktop/personal_labs/index.html.erb +++ b/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/desktop/personal_labs/index.html.erb @@ -48,27 +48,12 @@
  • -
    +
    Share
    -
    + -
    -
    -
    New Share
    -
    diff --git a/vendor/built_in_modules/personal_patent/app/assets/javascripts/personal_patent/desktop/personal_patent.js b/vendor/built_in_modules/personal_patent/app/assets/javascripts/personal_patent/desktop/personal_patent.js index 4ea27d3d..4313da15 100644 --- a/vendor/built_in_modules/personal_patent/app/assets/javascripts/personal_patent/desktop/personal_patent.js +++ b/vendor/built_in_modules/personal_patent/app/assets/javascripts/personal_patent/desktop/personal_patent.js @@ -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(); diff --git a/vendor/built_in_modules/personal_patent/app/controllers/panel/personal_patent/back_end/writing_patents_controller.rb b/vendor/built_in_modules/personal_patent/app/controllers/panel/personal_patent/back_end/writing_patents_controller.rb index e83e3649..62345312 100644 --- a/vendor/built_in_modules/personal_patent/app/controllers/panel/personal_patent/back_end/writing_patents_controller.rb +++ b/vendor/built_in_modules/personal_patent/app/controllers/panel/personal_patent/back_end/writing_patents_controller.rb @@ -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 diff --git a/vendor/built_in_modules/personal_patent/app/helpers/panel/personal_patent/desktop/personal_patents_helper.rb b/vendor/built_in_modules/personal_patent/app/helpers/panel/personal_patent/desktop/personal_patents_helper.rb index 024b8d64..b77c60c0 100644 --- a/vendor/built_in_modules/personal_patent/app/helpers/panel/personal_patent/desktop/personal_patents_helper.rb +++ b/vendor/built_in_modules/personal_patent/app/helpers/panel/personal_patent/desktop/personal_patents_helper.rb @@ -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 diff --git a/vendor/built_in_modules/personal_patent/app/views/panel/personal_patent/desktop/personal_patents/index.html.erb b/vendor/built_in_modules/personal_patent/app/views/panel/personal_patent/desktop/personal_patents/index.html.erb index ef120266..6c6b0114 100644 --- a/vendor/built_in_modules/personal_patent/app/views/panel/personal_patent/desktop/personal_patents/index.html.erb +++ b/vendor/built_in_modules/personal_patent/app/views/panel/personal_patent/desktop/personal_patents/index.html.erb @@ -47,27 +47,12 @@
    -
    +
    Share
    -
    + -
    -
    -
    New Share
    -
    diff --git a/vendor/built_in_modules/personal_project/app/assets/javascripts/personal_project/desktop/personal_project.js b/vendor/built_in_modules/personal_project/app/assets/javascripts/personal_project/desktop/personal_project.js index 3ae6097f..419e07e0 100644 --- a/vendor/built_in_modules/personal_project/app/assets/javascripts/personal_project/desktop/personal_project.js +++ b/vendor/built_in_modules/personal_project/app/assets/javascripts/personal_project/desktop/personal_project.js @@ -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(); diff --git a/vendor/built_in_modules/personal_project/app/controllers/panel/personal_project/back_end/projects_controller.rb b/vendor/built_in_modules/personal_project/app/controllers/panel/personal_project/back_end/projects_controller.rb index 5042c78d..d5ae12eb 100644 --- a/vendor/built_in_modules/personal_project/app/controllers/panel/personal_project/back_end/projects_controller.rb +++ b/vendor/built_in_modules/personal_project/app/controllers/panel/personal_project/back_end/projects_controller.rb @@ -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 diff --git a/vendor/built_in_modules/personal_project/app/helpers/panel/personal_project/desktop/personal_projects_helper.rb b/vendor/built_in_modules/personal_project/app/helpers/panel/personal_project/desktop/personal_projects_helper.rb index 1b47e9f5..9dce677e 100644 --- a/vendor/built_in_modules/personal_project/app/helpers/panel/personal_project/desktop/personal_projects_helper.rb +++ b/vendor/built_in_modules/personal_project/app/helpers/panel/personal_project/desktop/personal_projects_helper.rb @@ -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 diff --git a/vendor/built_in_modules/personal_project/app/views/panel/personal_project/desktop/personal_projects/index.html.erb b/vendor/built_in_modules/personal_project/app/views/panel/personal_project/desktop/personal_projects/index.html.erb index fcc007af..216ad74e 100644 --- a/vendor/built_in_modules/personal_project/app/views/panel/personal_project/desktop/personal_projects/index.html.erb +++ b/vendor/built_in_modules/personal_project/app/views/panel/personal_project/desktop/personal_projects/index.html.erb @@ -48,27 +48,12 @@
    -
    +
    Share
    -
    + -
    -
    -
    New Share
    -
    diff --git a/vendor/built_in_modules/personal_research/app/assets/javascripts/personal_research/desktop/personal_research.js b/vendor/built_in_modules/personal_research/app/assets/javascripts/personal_research/desktop/personal_research.js index a64bc13f..aba31ba4 100644 --- a/vendor/built_in_modules/personal_research/app/assets/javascripts/personal_research/desktop/personal_research.js +++ b/vendor/built_in_modules/personal_research/app/assets/javascripts/personal_research/desktop/personal_research.js @@ -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(); diff --git a/vendor/built_in_modules/personal_research/app/controllers/panel/personal_research/back_end/researchs_controller.rb b/vendor/built_in_modules/personal_research/app/controllers/panel/personal_research/back_end/researchs_controller.rb index b7c12ae8..0460a072 100644 --- a/vendor/built_in_modules/personal_research/app/controllers/panel/personal_research/back_end/researchs_controller.rb +++ b/vendor/built_in_modules/personal_research/app/controllers/panel/personal_research/back_end/researchs_controller.rb @@ -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 diff --git a/vendor/built_in_modules/personal_research/app/helpers/panel/personal_research/desktop/personal_researchs_helper.rb b/vendor/built_in_modules/personal_research/app/helpers/panel/personal_research/desktop/personal_researchs_helper.rb index 4327faa6..0f86c564 100644 --- a/vendor/built_in_modules/personal_research/app/helpers/panel/personal_research/desktop/personal_researchs_helper.rb +++ b/vendor/built_in_modules/personal_research/app/helpers/panel/personal_research/desktop/personal_researchs_helper.rb @@ -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 diff --git a/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/index.html.erb b/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/index.html.erb index fbd3de4a..3da2fcb6 100644 --- a/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/index.html.erb +++ b/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/index.html.erb @@ -50,25 +50,10 @@
    Share
    -
    + -
    -
    -
    New Share
    -