Commit 372220d35b344a43352e2176dfb4c377a53f0930

Authored by Valeriy Sizov
1 parent 234eb7a8

WebEditor: Cancel button. Confirm #1705

Showing 1 changed file with 1 additions and 2 deletions   Show diff stats
app/views/tree/edit.html.haml
@@ -5,8 +5,6 @@ @@ -5,8 +5,6 @@
5 %i.icon-file 5 %i.icon-file
6 %span.file_name 6 %span.file_name
7 = "#{@tree.path.force_encoding('utf-8')} (#{@ref})" 7 = "#{@tree.path.force_encoding('utf-8')} (#{@ref})"
8 - %span.options  
9 - = link_to "cancel editing", project_tree_path(@project, @id), class: "btn very_small"  
10 .file_content.code 8 .file_content.code
11 #editor= @tree.data 9 #editor= @tree.data
12 10
@@ -18,6 +16,7 @@ @@ -18,6 +16,7 @@
18 = hidden_field_tag 'last_commit', @last_commit 16 = hidden_field_tag 'last_commit', @last_commit
19 = hidden_field_tag 'content', '', :id => :file_content 17 = hidden_field_tag 'content', '', :id => :file_content
20 = button_tag "Commit", class: 'btn save-btn' 18 = button_tag "Commit", class: 'btn save-btn'
  19 + = link_to "Cancel", project_tree_path(@project, @id), class: "btn cancel-btn", confirm: "Are you sure?"
21 20
22 :javascript 21 :javascript
23 var editor = ace.edit("editor"); 22 var editor = ace.edit("editor");