Remove hacks for fakeapi testing

This commit is contained in:
Vincent Fiduccia 2012-11-28 14:05:30 -07:00
parent 318c9c5bff
commit d82ea4b071
5 changed files with 5 additions and 9 deletions

View File

@ -188,7 +188,7 @@ LI {
UL { UL {
list-style: none; list-style: none;
margin: 0; margin: 0 0 0 2em;
padding: 0; padding: 0;
} }

View File

@ -35,7 +35,7 @@ Explorer.prototype.rootColumn = function()
id: schema.id, id: schema.id,
displayName: schema.displayName || schema.name || schema.id, displayName: schema.displayName || schema.name || schema.id,
links: { links: {
'self': schema.links.collection +'/index.json' // @TODO remove static site hack 'self': schema.links.collection
} }
}); });
} }
@ -166,11 +166,6 @@ Explorer.prototype.followLink = function(event)
var $col = this._findColumnByChild($tgt); var $col = this._findColumnByChild($tgt);
var link = $tgt.data('self'); var link = $tgt.data('self');
if ( link.indexOf('.json') === -1 )
link += '.json';
console.log('followLink:', link);
this.removeColumns($col); this.removeColumns($col);
var $newColumn = this.addPlaceholder(); var $newColumn = this.addPlaceholder();
this._api.ajax('GET', link, function(err,res) { this._api.ajax('GET', link, function(err,res) {

View File

@ -7,7 +7,7 @@
<th width="200">Sort</th> <th width="200">Sort</th>
<th width="150">Pagination</th> <th width="150">Pagination</th>
<th width="120" rowspan="2" style="vertical-align: top; text-align: right; font-weight: normal;"> <th width="120" rowspan="2" style="vertical-align: top; text-align: right; font-weight: normal;">
{{! <a href="#" onclick="explorer.show(); return false">Explorer View</a><br/> }} <a href="#" onclick="Cookie.set('apiview','explorer'); explorer.show(); return false">Explorer View</a><br/>
{{#if docs}} {{#if docs}}
<a href="{{docs}}" target="cloudapidocs">Documentation</a><br/> <a href="{{docs}}" target="cloudapidocs">Documentation</a><br/>
{{/if}} {{/if}}

View File

@ -1,4 +1,5 @@
<div id="header"> <div id="header">
<a href="#" onclick="Cookie.set('apiview','browse'); htmlapi.show(); return false">Explorer View</a><br/>
<form> <form>
<input type="checkbox" id="show_removed"><label for="show_removed">Show removed resources<br/> <input type="checkbox" id="show_removed"><label for="show_removed">Show removed resources<br/>
</form> </form>

View File

@ -2,7 +2,7 @@
<br/> <br/>
<div id="curl"> <div id="curl">
curl curl
-u <i>$GDAPI_AUTH</i> \<br/> -u <i>"${GDAPI_ACCESS_KEY}:${GDAPI_SECRET_KEY}"</i> \<br/>
-X {{method}} \<br/> -X {{method}} \<br/>
-H 'Accept: application/json' \<br/> -H 'Accept: application/json' \<br/>
{{#if rawBody}} {{#if rawBody}}