Merge branch 'publication' into journal_list

* publication: (23 commits)
  adjust update password textfield position
  correct user passwd and sent json to front-end
  correct user passwd and sent json to front-end
  if coauthor not in coauthor db then it will be add in db
  fixed journal update method
  jumping menus updated..
  remove edit page cancel buttom
  delete fixed..
  multiple file fixed
  have done multiple file
  can add multiple file
  Module store
  Joshua's html
  Change icons
  add quick link to change user password, but it's not work
  change template
  add templete
  add templete
  url fixed and edit form fixed for tinyscrollbar
  easy to make fake data
  ...
This commit is contained in:
Rueshyna committed 2012-11-30 21:02:18 +08:00
commit ccacef6d9e
107 files changed
+3638 -1066

No files matched your search

@@ -0,0 +1,11 @@
class Admin::ModuleStoreController < ApplicationController
layout "new_admin"
def index
end
def show
end
end
@@ -3,7 +3,7 @@ class Admin::PurchasesController < ApplicationController
require "uri"
require 'zip/zip'
layout "admin"
layout "new_admin"
def index
@purchases = Purchase.all.entries
@@ -0,0 +1,11 @@
class Admin::TemplateStoreController < ApplicationController
layout "new_admin"
def index
end
def show
end
end
@@ -54,13 +54,12 @@ class Desktop::JournalPagesController < ApplicationController
def update
params[:writing_journal][:update_user_id] = current_user.id
@writing_journal= WritingJournal.find(params[:id])
respond_to do |format|
if @writing_journal.update_attributes(params[:writing_journal])
render json: {success: true, msg: "Paper successfully saved!"}.to_json
else
error_msg = @writing_journal.errors.full_messages.join("<br />")
render json: {success: false, msg: error_msg}.to_json
end
if @writing_journal.update_attributes(params[:writing_journal])
render json: {success: true, msg: "Paper successfully saved!"}.to_json
else
error_msg = @writing_journal.errors.full_messages.join("<br />")
render json: {success: false, msg: error_msg}.to_json
end
end
@@ -0,0 +1,15 @@
class Desktop::RegistrationsController < Devise::RegistrationsController
def update
self.resource = resource_class.to_adapter.get!(send(:"current_#{resource_name}").to_key)
if resource.update_with_password(params[resource_name])
set_flash_message :notice, :updated if is_navigational_format?
sign_in resource_name, resource, :bypass => true
render json: {success:true, msg: "Password successfully update!"}.to_json
else
clean_up_passwords(resource)
error_msg = resource.errors.full_messages.join("<br />")
render :json => {success: false, msg: error_msg}.to_json
end
end
end