Take tinymce out of layout
This commit is contained in:
parent
dc1dd07720
commit
01dac4d173
4 changed files with 15 additions and 3 deletions
|
|
@ -21,6 +21,7 @@ class PhotosController < ApplicationController
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@photo = Photo.new
|
@photo = Photo.new
|
||||||
|
render :partial => "new_photo"
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,9 @@ class User
|
||||||
options.delete(:group_id)
|
options.delete(:group_id)
|
||||||
|
|
||||||
model_class = class_name.to_s.camelize.constantize
|
model_class = class_name.to_s.camelize.constantize
|
||||||
|
|
||||||
|
pp options
|
||||||
|
|
||||||
post = model_class.instantiate(options)
|
post = model_class.instantiate(options)
|
||||||
post.creator_signature = post.sign_with_key(encryption_key)
|
post.creator_signature = post.sign_with_key(encryption_key)
|
||||||
post.save
|
post.save
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
/= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"
|
/= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"
|
||||||
= javascript_include_tag 'jquery142', 'rails', 'google'
|
= javascript_include_tag 'jquery142', 'rails', 'google'
|
||||||
= javascript_include_tag 'tiny_mce/tiny_mce'
|
|
||||||
= javascript_include_tag 'jquery.infieldlabel', 'jquery.cycle/jquery.cycle.min.js'
|
= javascript_include_tag 'jquery.infieldlabel', 'jquery.cycle/jquery.cycle.min.js'
|
||||||
|
|
||||||
= javascript_include_tag 'fancybox/jquery.fancybox-1.3.1.pack'
|
= javascript_include_tag 'fancybox/jquery.fancybox-1.3.1.pack'
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,9 @@
|
||||||
$("#add_photo_loader").fadeOut(400);
|
$("#add_photo_loader").fadeOut(400);
|
||||||
|
|
||||||
$("#photo_title_status").text("Done!");
|
$("#photo_title_status").text("Done!");
|
||||||
$("#progress_report").html("Great job!");
|
$("#progress_report").html("");
|
||||||
},
|
resetPhotoButton
|
||||||
|
},
|
||||||
onStart: function(event, total){
|
onStart: function(event, total){
|
||||||
$("#add_photo_button").html( "Uploading Photos" );
|
$("#add_photo_button").html( "Uploading Photos" );
|
||||||
$("#add_photo_loader").fadeIn(400);
|
$("#add_photo_loader").fadeIn(400);
|
||||||
|
|
@ -26,6 +27,14 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function resetPhotoButton{
|
||||||
|
$("#add_photo_button").click(function (evt){
|
||||||
|
$("#new_photo_pane").html($.get("photos/ajax_new"));
|
||||||
|
$("#add_photo_button").unbind();
|
||||||
|
$("#add_photo_button").fancybox();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
%h1
|
%h1
|
||||||
%span{:id=>"photo_title_status"}
|
%span{:id=>"photo_title_status"}
|
||||||
Add photos to
|
Add photos to
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue