[issue #133] Editor JS moved to separate file
This commit is contained in:
parent
2160f3aa66
commit
a4baf8b670
|
@ -15,25 +15,12 @@
|
|||
= link_to t("layout.cancel"), blob_file_path, :class => 'minibutton', :id => 'gollum-editor-preview'
|
||||
|
||||
:javascript
|
||||
(function($) {
|
||||
$.Editor = function() {
|
||||
$.Editor.Placeholder.add($('#gollum-editor-edit-summary input'));
|
||||
$('#gollum-editor form[name="blob-editor"]').submit(function( e ) {
|
||||
e.preventDefault();
|
||||
$.Editor.Placeholder.clearAll();
|
||||
//debug('submitting');
|
||||
$(this).unbind('submit');
|
||||
$(this).submit();
|
||||
});
|
||||
};
|
||||
|
||||
$.Editor.Placeholder = $.GollumPlaceholder;
|
||||
|
||||
$.Editor();
|
||||
})(jQuery);
|
||||
$(function() {
|
||||
$.BlobEditor();
|
||||
});
|
||||
|
||||
- content_for :javascripts do
|
||||
= javascript_include_tag 'gollum/gollum.placeholder.js'
|
||||
= javascript_include_tag 'gollum/gollum.placeholder.js', 'blob.editor.js'
|
||||
|
||||
- content_for :stylesheets do
|
||||
= stylesheet_link_tag 'gollum/editor.css'
|
||||
|
|
15
db/schema.rb
15
db/schema.rb
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20120131124517) do
|
||||
ActiveRecord::Schema.define(:version => 20120131141651) do
|
||||
|
||||
create_table "arches", :force => true do |t|
|
||||
t.string "name", :null => false
|
||||
|
@ -253,11 +253,11 @@ ActiveRecord::Schema.define(:version => 20120131124517) do
|
|||
t.text "description"
|
||||
t.string "ancestry"
|
||||
t.boolean "has_issues", :default => true
|
||||
t.boolean "has_wiki", :default => false
|
||||
t.string "srpm_file_name"
|
||||
t.string "srpm_content_type"
|
||||
t.integer "srpm_file_size"
|
||||
t.datetime "srpm_updated_at"
|
||||
t.boolean "has_wiki", :default => false
|
||||
end
|
||||
|
||||
add_index "projects", ["category_id"], :name => "index_projects_on_category_id"
|
||||
|
@ -320,19 +320,18 @@ ActiveRecord::Schema.define(:version => 20120131124517) do
|
|||
|
||||
create_table "users", :force => true do |t|
|
||||
t.string "name"
|
||||
t.string "email", :default => "", :null => false
|
||||
t.string "encrypted_password", :limit => 128, :default => "", :null => false
|
||||
t.string "password_salt", :default => "", :null => false
|
||||
t.string "email", :default => "", :null => false
|
||||
t.string "encrypted_password", :limit => 128, :default => "", :null => false
|
||||
t.string "reset_password_token"
|
||||
t.string "remember_token"
|
||||
t.datetime "reset_password_sent_at"
|
||||
t.datetime "remember_created_at"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.text "ssh_key"
|
||||
t.string "uname"
|
||||
t.string "role"
|
||||
t.string "language", :default => "en"
|
||||
t.integer "own_projects_count", :default => 0, :null => false
|
||||
t.string "language", :default => "en"
|
||||
t.integer "own_projects_count", :default => 0, :null => false
|
||||
end
|
||||
|
||||
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
(function($) {
|
||||
$.BlobEditor = function() {
|
||||
$.BlobEditor.Placeholder.add($('#gollum-editor-edit-summary input'));
|
||||
$('#gollum-editor form[name="blob-editor"]').submit(function( e ) {
|
||||
e.preventDefault();
|
||||
$.BlobEditor.Placeholder.clearAll();
|
||||
//debug('submitting');
|
||||
$(this).unbind('submit');
|
||||
$(this).submit();
|
||||
});
|
||||
};
|
||||
|
||||
$.BlobEditor.Placeholder = $.GollumPlaceholder;
|
||||
})(jQuery);
|
Loading…
Reference in New Issue