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 fdf3c389..913011d8 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
@@ -1,58 +1,102 @@
-orbitDesktop.prototype.initializeConference = function(target,url,cache){
-
- this.initializeConference.list = function(){
- var bindHandlers = function(){
- o.tinyscrollbar_ext({
- main : ".tinycanvas",
- fill : ".list_t"
- })
+orbitDesktop.prototype.initializeConferencePapers = function(target,url,cache){ // this init conference papers
+ this.initializeConferencePapers.formCallback = function(data){
+ if(data.success){
+ o.notify(data.msg,"success");
+ o.sub_menu_item($("div[content-type=menu] a").eq(0));
+ }else{
+ o.notify(data.msg,"alert");
}
-
-
- bindHandlers();
-
}
- this.initializeConference.addconference = function(){
- var bindHandlers = function(){
+ this.initializeConferencePapers.list = function(){ // to open list part in conference papers page
+ var conferenceData;
+ var bindHandlers = function(){ // to bind handlers for list page
o.simple_drop_down();
-
- o.tinyscrollbar_ext({
- main: '.tinycanvas',
- fill: '.s_grid_con'
- })
}
- bindHandlers();
-
+ var bindSecondaryHandlers = function(){
+ $("#conference_p div#paper_list a.icon-check-empty").click(function(){
+ if($(this).hasClass("icon-check-empty")){
+ $(this).switchClass("icon-check-empty","icon-check",0);
+ } else if($(this) .hasClass("icon-check")) {
+ $(this).switchClass("icon-check","icon-check-empty",0);
+ } else if($(this).hasClass("icon-star")){
+ $(this).removeClass("icon-star").addClass("icon-star-empty");
+ } else if($(this).hasClass("icon-star-empty")){
+ $(this).removeClass("icon-star-empty").addClass("icon-star");
+ }
+ return false;
+ })
+ }
}
- this.initializeConference.conference = function(){
- var bindHandlers = function(){
+ this.initializeConferencePapers.paperDelete = function(data,dom){
+ var parent = dom.parent().parent();
+ if(data.success){
+ parent.hide("slide",function(){parent.remove();});
+ o.notify(data.msg,"success");
+ }
+ }
+ this.initializeConferencePapers.addpaper = function(){ // to open add pages in conference papers page
+ var bindHandlers = function(){ // to bind handlers for add page
o.simple_drop_down();
+ $('#add_plugin_file a.add').click(function(){
+ var new_id = $(this).prev().attr('value');
+ var old_id = new RegExp("new_writing_conference_files", "g");
+ $(this).prev().attr('value', parseInt(new_id) + 1);
+ var x = get_html(old_id,new_id);
+ var newfield = $(x);
+ $(this).parents('table').append(newfield);
+ newfield.find('.action a.delete').click(function(){
+ newfield.remove();
+ });
+ return false;
+ });
- o.tinyscrollbar_ext({
- main: '.tinycanvas',
- fill: '.s_grid_con'
- })
+ $('.action a.remove_existing_record').click(function(){
+ $(this).next('.should_destroy').attr('value', 1);
+ $("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
+ });
}
-
bindHandlers();
-
}
- this.initializeConference.coauthor = function(){
- var bindHandlers = function(){
+
+ this.initializeConferencePapers.conference = function(){ // to open add pages in conference papers page
+ var bindHandlers = function(){ // to bind handlers for add page
o.simple_drop_down();
-
- o.tinyscrollbar_ext({
- main: '.tinycanvas',
- fill: '.s_grid_con'
- })
+
}
-
bindHandlers();
-
}
-
- this.initializeConference.list();
+ this.initializeConferencePapers.coAuthorformCallback = function(data){
+ if(data.success){
+ o.notify(data.msg,"success");
+ o.sub_menu_item($("div[content-type=menu] a").eq(0));
+ }else{
+ o.notify(data.msg,"alert");
+ }
+ }
+ this.initializeConferencePapers.coauthor = function(){ // to open add pages in coauthor page
+ var bindHandlers = function(){ // to bind handlers for add page
+ o.simple_drop_down();
+ }
+ bindHandlers();
}
+ this.initializeConferencePapers.coauthorRelationForm = function(data){
+ if(data.success){
+ o.notify(data.msg,"success");
+ $("#co_author_relation_table").html(data.newvalue);
+ }else{
+ o.notify(data.msg,"alert");
+ }
+ }
+ this.initializeConferencePapers.coauthorRelationEditForm = function(data){
+ if(data.success){
+ o.notify(data.msg,"success");
+ $("#co_author_relation_table").html(data.newvalue);
+ }else{
+ o.notify(data.msg,"alert");
+ }
+ }
+};
+
diff --git a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_author_relations_controller.rb b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_author_relations_controller.rb
index bfc09055..c55186cb 100644
--- a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_author_relations_controller.rb
+++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_author_relations_controller.rb
@@ -25,7 +25,7 @@ class Panel::PersonalConference::Desktop::ConferenceCoAuthorRelationsController
if @conference_co_author_relation.save
newv = render_to_string partial: "show_form", object: @conference_co_author_relations
- render json: {success: true, msg: "New Relation successfully saved!", newvalue: newv}.to_json
+ render json: {success: true, msg: t("create_success") , newvalue: newv}.to_json
else
error_msg = @conference_co_author_relation.errors.full_messages.join("
")
render json: {success: false, msg: error_msg}.to_json
@@ -37,7 +37,7 @@ class Panel::PersonalConference::Desktop::ConferenceCoAuthorRelationsController
if @conference_co_author_relation.update_attributes(params[:conference_co_author_relation])
@conference_co_author_relations = ConferenceCoAuthorRelation.all
newv = render_to_string partial: "show_form", object: @conference_co_author_relations
- render json: {success: true, msg: "New Relation successfully updated!", newvalue: newv}.to_json
+ render json: {success: true, msg: t("update_success"), newvalue: newv}.to_json
else
error_msg = @conference_co_author.errors.full_messages.join("
")
render json: {success: false, msg: error_msg}.to_json
@@ -49,7 +49,7 @@ class Panel::PersonalConference::Desktop::ConferenceCoAuthorRelationsController
@conference_co_author_relation.destroy
reset_co_author_relation
- render :json => {success: true, msg: "deleted successfully!"}
+ render :json => {success: true, msg: t("delete_success")}
end
private
diff --git a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_authors_controller.rb b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_authors_controller.rb
index f371b7e7..ed8a3dc9 100644
--- a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_authors_controller.rb
+++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_authors_controller.rb
@@ -32,7 +32,7 @@ class Panel::PersonalConference::Desktop::ConferenceCoAuthorsController < Applic
@conference_co_author.name_id= current_user.id
if @conference_co_author.save
- render json: {success:true, msg: t('create.sucess.co_author')}.to_json
+ render json: {success:true, msg: t('create_success')}.to_json
else
error_msg = @conference_co_author.errors.full_messages.join("
")
render json: {success: false, msg: error_msg}.to_json
@@ -42,8 +42,8 @@ class Panel::PersonalConference::Desktop::ConferenceCoAuthorsController < Applic
def update
@conference_co_author = ConferenceCoAuthor.find(params[:id])
- if @conference_co_author.update_attributes(params[:co_author])
- render json: {success:true, msg: t('update.sucess.co_author')}.to_json
+ if @conference_co_author.update_attributes(params[:conference_co_author])
+ render json: {success:true, msg: t('update_success')}.to_json
else
error_msg = @conference_co_author.errors.full_messages.join("
")
render json: {success: false, msg: error_msg}.to_json
@@ -54,6 +54,6 @@ class Panel::PersonalConference::Desktop::ConferenceCoAuthorsController < Applic
@conference_co_author = ConferenceCoAuthor.find(params[:id])
@conference_co_author.destroy
- render :json => {success: true, msg: "Co-author deleted successfully!"}
+ render :json => {success: true, msg: "delete_success"}
end
end
diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/index.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/index.html.erb
index 5cb7cf0d..53fc717f 100644
--- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/index.html.erb
+++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/index.html.erb
@@ -1,14 +1,14 @@