Permalink
Browse files

more UI tweaks

  • Loading branch information...
1 parent 0c3ebef commit 354e14fa5905a1ab9e3d42bff60c013056e24d33 @brandonmwest committed Apr 1, 2012
Showing with 20 additions and 6 deletions.
  1. +7 −0 public/js/default.js
  2. +12 −5 views/endpoints.haml
  3. +1 −1 views/start.haml
@@ -8,6 +8,9 @@ $(function() {
//tooltip for add endpoint button
$('#addEndpoint').hover(toggleTooltip, toggleTooltip)
+ //save file button
+ $('.save-file').click(saveFile);
+
//buttons to add new endpoints, methods, parameters
$('#addEndpoint').click(addEndpoint);
$('.addMethod').live('click', addMethod);
@@ -33,6 +36,10 @@ $(function() {
$($('.endpoint')[0]).show();
});
+var saveFile = function(){
+ $('#outputForm').submit();
+}
+
var toggleTooltip = function(e){
$(e.target).tooltip('toggle');
}
View
@@ -1,18 +1,25 @@
.row-fluid
%ul.tabs.nav.nav-tabs
%li.active
- %a{:"data-toggle" => "tab", :href => "#editor"} Editor
+ %a{:"data-toggle" => "tab", :href => "#editor"}
+ %i.icon-edit
+ Editor
%li
- %a.viewOutput{:"data-toggle" => "tab", :href => "#output-container"} Output
+ %a.viewOutput{:"data-toggle" => "tab", :href => "#output-container"}
+ %i.icon-file
+ Output
.tab-content
#output-container.tab-pane
- %form{:method => "post", :action => "/file"}
+ %form#outputForm{:method => "post", :action => "/file"}
%input#json{:type => "hidden", :name => "json", :value => " "}
- %input.btn-success{:type => "submit", :value => "Save File"}
+
+ %a.btn.btn-success.save-file
+ %i.icon-download-alt.icon-white
+ Save File
#output
- #editor.tab-pane.active
+ #editor.tab-pane.active.row
= partial :menu, :locals => {:result => @result}
.content.forms.span8
View
@@ -10,7 +10,7 @@
%p
Create a new I/O Docs configuration...
- %form.form-inline(method="post")
+ %form#new-form.form-inline(method="post")
%input.btn-success.btn-large(type='submit' value='New' name="new")
.span5

0 comments on commit 354e14f

Please sign in to comment.