Permalink
Browse files

Bug 658043 - Change docs to redirect to jetpack.mozillalabs documenta…

…tion

- Removed "api" app, since we no longer want to host the documentation ourselves.
- Changed all references to the "api" views to links to /docs instead.
- Needs a rewrite in our vhosts file
  • Loading branch information...
1 parent 19462d3 commit b8069c16a02de80dfe0f8f2044fa86d09b61941d @seanmonstar seanmonstar committed May 31, 2011
View
No changes.
View
@@ -1,18 +0,0 @@
-import os
-import subprocess
-
-from django.conf import settings
-
-
-def export_docs(sdk_dir):
- # export docs
- os.chdir(sdk_dir)
- cfx = [settings.PYTHON_EXEC, '%s/bin/cfx' % sdk_dir,
- '--binary=/usr/bin/xulrunner', 'sdocs']
- env = dict(PATH='%s/bin:%s' % (sdk_dir, os.environ['PATH']),
- VIRTUAL_ENV=sdk_dir,
- CUDDLEFISH_ROOT=sdk_dir,
- PYTHONPATH='%s/python-lib' % sdk_dir)
- process = subprocess.Popen(cfx, shell=False, stdout=subprocess.PIPE,
- stderr=subprocess.PIPE, env=env)
- return process.communicate()
View
@@ -1,15 +0,0 @@
-from django.db import models # , IntegrityError
-
-from jetpack.models import SDK
-#from utils.exceptions import SimpleException
-
-
-class DocPage(models.Model):
- sdk = models.ForeignKey(SDK)
- path = models.CharField(max_length=255)
- html = models.TextField()
- json = models.TextField()
-
- class Meta:
- unique_together = ('sdk', 'path')
- ordering = ('sdk', 'path')
@@ -1,10 +0,0 @@
-{% load markup %}
-
-<p class="api-element-name" id="{{ entity.name }}_{{property.name }}">
- <a title={{ property.name }} href="#{{ entity.name }}_{{property.name }}" class="api-name">{{ entity.name }}.{{ property.name }} : {{ property.property_type }}</a>
-</p>
-
-{% if property.description %}
- <p>{{ property.description|markdown}}</p>
-{% endif %}
-
@@ -1,23 +0,0 @@
-{% load markup %}
-
-<p class="api-element-name" id="{{ entity.name }}_{{method.name }}">
-<a title={{ method.name }} href="#{{ entity.name }}_{{method.name }}" class="api-name">{{ entity.name }}.{{ method.signature }}</a>
-</p>
-
-{% if method.description %}
- <p>{{ method.description|markdown }}</p>
-{% endif %}
-
-{% if method.returns.description %}
- returns {{ method.returns.type }}
- <p>{{ method.returns.description|markdown }}</p>
-{% endif %}
-
-<div class="class-parameter-list">
-{% for param in method.params %}
- {% if forloop.first %}
- <p class="api-element-header">Parameters</p>
- {% endif %}
- {% include "_entity_parameter.html" %}
-{% endfor %}
-</div>
@@ -1,35 +0,0 @@
-
-{% load markup %}
-
-<div class="parameter">
-<p class="parameter-name">
- {{ param.name }} : <span class="data-type">{{ param.type }}</span>
-</p>
-
-<p>
-{% if param.description %}
- <p>{{ param.description|markdown}}</p>
-{% endif %}
-
-{% if param.props %}
-<div class="property-list">
- {% for property in param.props %}
- {% if forloop.first %}
- <p class="api-element-header">Properties</p>
- {% endif %}
- <dl>
- <dt>
- {{ property.name }} : <span class="data-type">{{ property.type }}</span>
- </dt>
-
- <dd>
- {% if property.description %}
- <p>{{ property.description|markdown}}</p>
- {% endif %}
- </dd>
- </dl>
- {% endfor %}
-</div>
-{% endif %}
-</p>
-</div>
@@ -1,42 +0,0 @@
-{% load markup %}
-
-<dt>
- {{ class_doc.name }}.{{ property.name }} : {{ property.property_type }}
-</dt>
-
-<dd>
-{% if property.description %}
- <p>{{ property.description|markdown}}</p>
-{% endif %}
-
-<div class="object-contents">
-{% if property.constructors %}
- {% for method in property.constructors %}
- {% if forloop.first %}
- <p class="api-header">
- Constructors</p>
- {% endif %}
- {% include "_entity_method.html" %}
- {% endfor %}
-{% endif %}
-
-{% if property.methods %}
- {% for method in property.methods %}
- {% if forloop.first %}
- <p class="api-header">Methods</p>
- {% endif %}
- {% include "_entity_method.html" %}
- {% endfor %}
-{% endif %}
-
-{% if property.properties %}
- {% for property in property.properties %}
- {% if forloop.first %}
- <p class="api-header">Properties</p>
- {% endif %}
- {% include "_entity_class_property.html" %}
- {% endfor %}
-{% endif %}
-</div>
-
-</dd>
@@ -1,8 +0,0 @@
-<ul class="UI_Action_List">
-{% for module in package.modules %}
- <li{% if module.name == module_name %} class='selected'{% endif %}>
- <a title="{{ module.name }}" href="{% url api_module package_name module.name %}">{{ module.name }}</a>
- </li>
-{% endfor %}
-</ul>
-
@@ -1,29 +0,0 @@
-<div class="object-contents">
-{% if entity.constructors %}
- {% for method in entity.constructors %}
- {% if forloop.first %}
- <p class="api-header">
- Constructors</p>
- {% endif %}
- {% include "_entity_method.html" %}
- {% endfor %}
-{% endif %}
-
-{% if entity.methods %}
- {% for method in entity.methods %}
- {% if forloop.first %}
- <p class="api-header">Methods</p>
- {% endif %}
- {% include "_entity_method.html" %}
- {% endfor %}
-{% endif %}
-
-{% if entity.properties %}
- {% for property in entity.properties %}
- {% if forloop.first %}
- <p class="api-header">Properties</p>
- {% endif %}
- {% include "_entity_class_property.html" %}
- {% endfor %}
-{% endif %}
-</div>
@@ -1,32 +0,0 @@
-{% extends "base.html" %}
-
-{% block title %}Documentation - {% endblock %}
-
-{% block head %}
- <script src="/media/api/js/API.Browser.js"></script>
- <script src="/media/lib/lighter/Fuel.js"></script>
- <script src="/media/lib/lighter/Lighter.js"></script>
- <script src="/media/lib/lighter/Highlight.js"></script>
- <script src="/media/lib/tree.js"></script>
- <script src="/media/jetpack/js/FileTree.js"></script>
- <script src="/media/api/js/API.Tree.js"></script>
-
- <link href="/media/api/css/API.Browser.css" rel="stylesheet" type="text/css" />
- <link href="/media/jetpack/css/tree.css" rel="stylesheet" type="text/css" />
- <link href="/media/jetpack/css/collapse.css" rel="stylesheet" type="text/css" />
-{% endblock %}
-
-{% block head_jstop %}
- var doc_list = {{ doc_list|safe }};
-{% endblock %}
-
-{% block app_sidebar %}
- <div class="trees-container">
- <section id="packages">
- <ul id="PackTree" class="tree collapse">
-
- </ul>
- </section>
- </div>
-{% endblock %}
-
@@ -1,37 +0,0 @@
-{% extends "api.html" %}
-{% load base_helpers markup %}
-
-{% block app_content %}
- <h2 class="UI_Heading">Documentation</h2>
-
- <div id="api-body">
- <p>Add-ons Builder is a website for quickly and easily building Firefox add-ons
- using common web technologies. {# If you aren't familiar with the site, <a href="/tutorial/">start by reading the tutorial</a>, which gives you step-by-step guide to building an add-on.#}
- </p>
-
- <p>The add-ons you build can make changes to the browser via libraries of modules
- that provide APIs for accessing Firefox functionality. The core library is
- available by default to all add-ons and provides the most commonly-requested
- APIs, including APIs for accessing tabs, storing data, displaying a widget, and
- making network requests. Add-ons can also use libraries contributed by other
- users of the site.</p>
-
- <p>For documentation of the core library, see the links to the left. Sorry, we
- don't yet have a way to provide similar documentation for contributed
- libraries, but you can <a href="{% url jp_browser_libraries %}">browse libraries</a> and view
- their source to learn about the functionality they provide.</p>
-
- <p>If you are comfortable with a command line and prefer working locally, the
- Add-ons Builder SDK gives you a development environment on your own computer.
- <a href="https://jetpack.mozillalabs.com/sdk/latest/docs/">Read the SDK
- documentation</a> for help with it.</p>
-
- <p>If you have questions about Add-ons Builder that aren't addressed by this
- documentation, feel free to ask them in the <a
- href="http://groups.google.com/group/mozilla-labs-jetpack">project discussion
- group</a>. That's also the appropriate place to provide feedback about how the
- site works for you and what additional features you'd like it to provide.</p>
-
- </div>
-{% endblock %}
-
@@ -1,10 +0,0 @@
-{% extends "api.html" %}
-{% load base_helpers %}
-
-{% block title %}API {{ path }} - {% endblock %}
-
-{% block app_content %}
- <div id="api-body">
- {{ doc_page.html|safe }}
- </div>
-{% endblock %}
@@ -1,11 +0,0 @@
-{% load markup %}
-
-<h3 class="UI_Heading" id="{{entity.name}}">
-<a title={{ entity.name }} href="#{{ entity.name }}" class="api-name">{{ entity.name }} object</a>
-</h3>
-
-{% if entity.description %}
- <p>{{ entity.description|markdown}}</p>
-{% endif %}
-
-{% include "_object_contents.html" %}
@@ -1,31 +0,0 @@
-{% load markup %}
-
-{% if entity.signature %}
-<h3 class="UI_Heading" id="{{entity.name}}">
-<a title={{ entity.name }} href="#{{ entity.name }}" class="api-name">{{ entity.signature }}</a>
-</h3>
-{% else %}
-<h3 class="UI_Heading" id="{{entity.name}}">
-<a title={{ entity.name }} href="#{{ entity.name }}" class="api-name">{{ entity.name }}</a>
-</h3>
-{% endif %}
-
-{% if entity.description %}
- <p>{{ entity.description|markdown}}</p>
-{% endif %}
-
-{% if entity.returns.description %}
- returns {{ entity.returns.type }}
- <p>{{ entity.returns.description|markdown }}</p>
-{% endif %}
-
-<div class="function-parameter-list">
-{% for param in entity.params %}
- {% if forloop.first %}
- <p class="api-element-header">Parameters</p>
- {% endif %}
- <dl>
- {% include "_entity_parameter.html" %}
- </dl>
-{% endfor %}
-</div>
@@ -1,11 +0,0 @@
-{% load markup %}
-
-<h3 class="UI_Heading" id="{{entity.name}}">
-<a title={{ entity.name }} href="#{{ entity.name }}" class="api-name">{{ entity.name }} : <span class="data-type">{{ entity.property_type }}</span></a>
-</h3>
-
-{% if entity.description %}
- <p>{{ entity.description|markdown}}</p>
-{% endif %}
-
-{% include "_object_contents.html" %}
@@ -1,45 +0,0 @@
-{% extends "api.html" %}
-{% load base_helpers markup %}
-
-{% block title %}Module "{{ module.name }}" ({{ package.name }}) - Documentation - {% endblock %}
-
-{% block app_content %}
- <h1 class="UI_Heading">{{ module.name }}</h1>
- <div id="api-body">
-
-{% for entity in module.entities %}
-
- {% if entity.json_type == "api" %}
- {% if entity.type == "class" %}
- {% include "entity_class_doc.html" %}
- {% endif %}
-
- {% if entity.type == "constructor" %}
- {% include "entity_function_doc.html" %}
- {% endif %}
-
- {% if entity.type == "function" %}
- {% include "entity_function_doc.html" %}
- {% endif %}
-
- {% if entity.type == "method" %}
- {% include "entity_function_doc.html" %}
- {% endif %}
-
- {% if entity.type == "property" %}
- {% include "entity_property_doc.html" %}
- {% endif %}
-
- {% else %}
-
- <div class="UI_ModuleInfo markdown">
- {{ entity|markdown }}
- </div>
-
- {% endif %}
-
-{% endfor %}
-
- </div>
-
-{% endblock %}
@@ -1,20 +0,0 @@
-{% extends "api.html" %}
-{% load base_helpers markup %}
-
-{% block title %}Package "{{ package.name }}" - Documentation - {% endblock %}
-
-{% block app_content %}
- <h2 class="UI_Heading">Modules</h2>
-
- <div id="api-body">
- {% for module in package.modules %}
- <dl id="{{ module.name }}">
- <dt class="ModuleInfo_"><a title="{{ module.name }}" href="#{{ module.name }}">{{ module.name }}</a></dt>
- <dd>
- {{ module.info|markdown }}
- <a title="Go to {{ module.name }}" href="{% url api_module package_name module.name %}">Go to {{ module.name }}</a>
- </dd>
- </dl>
- {% endfor %}
- </div>
-{% endblock %}
Oops, something went wrong.

0 comments on commit b8069c1

Please sign in to comment.