diff --git a/app/assets/javascripts/desktop/orbitdesktop.js b/app/assets/javascripts/desktop/orbitdesktop.js index 09512bef2..c9c0452d2 100755 --- a/app/assets/javascripts/desktop/orbitdesktop.js +++ b/app/assets/javascripts/desktop/orbitdesktop.js @@ -262,7 +262,7 @@ var orbitDesktop = function(dom){ window.o[o.data_method][callback_method](responseText,statusText,xhr,$form); } } - if(notification != "") + if(typeof notification == "string") o.notify(notification,"success"); }, error:function(){ 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 86b313285..c220269e4 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 @@ -31,7 +31,7 @@ orbitDesktop.prototype.initializePersonalBook = function(target,url,cache){ // t } } this.initializePersonalBook.bookDelete = function(data,dom){ - var parent = dom.parent().parent(); + var parent = dom.parent().parent().parent(); if(data.success){ parent.hide("slide",function(){parent.remove();}); o.notify(data.msg,"success"); diff --git a/vendor/built_in_modules/personal_book/app/controllers/panel/personal_book/desktop/personal_books_controller.rb b/vendor/built_in_modules/personal_book/app/controllers/panel/personal_book/desktop/personal_books_controller.rb index c81eda799..803634845 100644 --- a/vendor/built_in_modules/personal_book/app/controllers/panel/personal_book/desktop/personal_books_controller.rb +++ b/vendor/built_in_modules/personal_book/app/controllers/panel/personal_book/desktop/personal_books_controller.rb @@ -52,7 +52,7 @@ class Panel::PersonalBook::Desktop::PersonalBooksController < ApplicationControl def update params[:writing_book][:create_user_id] = current_user.id - @personal_book = WritingBook.new(params[:writing_book]) + @personal_book = WritingBook.find(params[:id]) if @personal_book.update_attributes(params[:writing_book]) render json: {success: true, msg: t('create_success')}.to_json else diff --git a/vendor/built_in_modules/personal_book/app/views/panel/personal_book/desktop/personal_books/edit.html.erb b/vendor/built_in_modules/personal_book/app/views/panel/personal_book/desktop/personal_books/edit.html.erb index c574a4dce..78c1c3acd 100644 --- a/vendor/built_in_modules/personal_book/app/views/panel/personal_book/desktop/personal_books/edit.html.erb +++ b/vendor/built_in_modules/personal_book/app/views/panel/personal_book/desktop/personal_books/edit.html.erb @@ -1,3 +1,3 @@ -<%= form_for @personal_book, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_book_desktop_personal_books_path(@personal_book) do |f| %> +<%= form_for @personal_book, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_book_desktop_personal_book_path(@personal_book) do |f| %> <%= render partial: 'form', locals: {:f => f} %> <%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 c60e3743b..f79d1d30c 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 @@ -76,7 +76,7 @@