Commits

Rich Manalang [Atlassian]  committed ce98292

Cosmetic changes

* Made sidebar smaller and main container larger
* Section headers are now hidden when not active
* URLs inside the response output are clickable and get copied to the
target URL input

  • Participants
  • Parent commits 02c59f6

Comments (0)

Files changed (4)

 build
+.DS_Store

File src/css/style.css

     position: fixed;
     left: 0px;
 
-    width: 270px;
+    width:180px;
     height: 100%;
 
     background-color: #eaeef3;
 }
 
 section[role="main"] {
-    margin-left: 270px;
+    margin-left: 180px;
     min-width: 800px;
     padding: 10px 15px;
 
     height:30px;
     overflow:hidden;
 
-    margin-bottom:10px;
-
-    -webkit-transition: all 0.3s ease-out;
-    -khtml-transition: all 0.3s ease-out;
-    -moz-transition: all 0.3s ease-out;
-    -ms-transition: all 0.3s ease-out;
-    -o-transition: all 0.3s ease-out;
-    transition: all 0.3s ease-out;
+    margin-bottom:0px;
 }
 
 section.main section {
     display:none;
 }
 
-section.main h2:before {
-    content:'\25B8';
-    padding-right:5px;
-    text-align:left;
-}
 
-section.main.expand h2:before {
-}
 
 section#options ul li {
     display:inline-block;
 
     height: 31px;
     margin: 0;
-    padding:5px 0px 0px 275px;
+    padding:5px 0px 0px 190px;
 
     vertical-align: middle;
     width:100%;
 
 section#controls input[type="submit"] {
     float:right;
-    margin-right: 285px;
+    margin-right: 197px;
 }
 section#controls input[type="reset"] {
     float:right;
 }
 
 h1 {
-    background: url('/icon/32.png') no-repeat 10px center;
     padding-right:15px;
     -webkit-user-select: none;
     color: #53637d;
     border: 1px solid #CCC;
 
     overflow:auto;
-    height:350px;
+    height:500px;
+    width:99%;
     padding:5px;
     margin:10px 0px 0px 0px;
 
 #message.visible {
     top:0px;
 }
+pre.prettyprint {
+  height:450px;
+}
+pre span.str {
+  cursor:pointer;
+}
+pre span.str:hover {
+  text-decoration:underline;
+}
+#toggle-response-headers {
+  color:#999;
+  margin-top:2px;
+  position:absolute;
+  right:20px;
+}

File src/index.html

                 <section id="response" class="main">
                     <h2>Response</h2>
 
-                    <section>
+                    <a id="toggle-response-headers" href="#">Toggle Headers</a>
+                    <section id="response-headers" class="hidden">
                         <div>
                             <h3>Sent Request</h3>
                             <pre id="requestText">No Request Initiated</pre>

File src/js/rest-console.js

 };
 
 window.addEvent('domready', function() {
+
+    // RLM Custom:
+    document.addEvent('click:relay(pre.prettyprint span.str)', function(){
+      document.getElement('input[name=target[url]]').setProperty('value',this.get('text').replace(/"/g,''));
+      document.getElement('nav ul li a[href="#target"]').fireEvent('click')
+    });
+    $('toggle-response-headers').addEvent('click',function(){
+      var sec = $('response-headers');
+      if(sec.hasClass('hidden')) sec.removeClass('hidden');
+      else sec.addClass('hidden');
+      return false;
+    });
+
     new Keyboard({
         'defaultEventType': 'keyup',
         'events': {
         var name = this.get('href').split('#')[1];
         var target = document.id(name);
 
-        document.getElements('section.main').setStyle('height', '30px');
+        document.getElements('section.main').setStyle('height', '0px');
         this.getParent('ul').getElements('.active').removeClass('active');
 
         this.addClass('active');