[ 
https://issues.apache.org/jira/browse/COUCHDB-2474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14221546#comment-14221546
 ] 

Ben Keen commented on COUCHDB-2474:
-----------------------------------

N.B. might be a nice idea to do a bit of house cleaning while we're on this 
ticket and start grouping the constants, e.g.

{quote}
  var constants = {
    MISC: {
      TRAY_TOGGLE_SPEED: 250,
      DEFAULT_PAGE_SIZE: 20
    },

    // events
    EVENTS: {
      EVENT_TRAY_CLOSED: 'tray:closed',
      EVENT_TRAY_OPENED: 'tray:opened',
      EVENT_BURGER_CLICKED: 'burger:clicked'
    },

    // documentation URLs 
    DOC_URLS: {
      GENERAL: "/_utils/docs/intro/api.html#documents", // docs
      ALL_DBS: 
"/_utils/docs/api/server/common.html?highlight=all_dbs#get--_all_dbs", // 
all_dbs
      REPLICATION: "/_utils/docs/replication/replicator.html#basics", // 
"replication_doc"
      DESIGN_DOCS: "/_utils/docs/couchapp/ddocs.html#design-docs", // 
"design_doc"
      DESIGN_DOC_METADATA: 
"/_utils/docs/api/ddoc/common.html#api-ddoc-view-index-info", // 
"design_doc_metadata"
      VIEW_FUNCS: "/_utils/docs/couchapp/ddocs.html#view-functions", // 
"view_functions"
      MAP_FUNCS: "/_utils/docs/couchapp/ddocs.html#map-functions", // 
"map_functions"
      REDUCE_FUNCS: 
"/_utils/docs/couchapp/ddocs.html#reduce-and-rereduce-functions", // 
"reduce_functions"
      API_REF: "/_utils/docs/http-api.html", // "api_reference"
      DB_PERMISSION: "/_utils/docs/api/database/security.html#db-security", // 
"database_permission"
      STATS: "/_utils/docs/api/server/common.html?highlight=stats#get--_stats", 
// "stats"
      ACTIVE_TASKS: 
"/_utils/docs/api/server/common.html?highlight=stats#active-tasks", // 
"_active_tasks"
      LOG: "/_utils/docs/api/server/common.html?highlight=stats#log", // "log"
      CONFIG: "/_utils/docs/config/index.html", // "config"
      VIEWS: "/_utils/docs/intro/overview.html#views", // "views"
      CHANGES: 
"/_utils/docs/api/database/changes.html?highlight=changes#post--db-_changes" // 
"changes"
    }
  };
{quote}




> Deprecate Helpers.docs in favour of constants
> ---------------------------------------------
>
>                 Key: COUCHDB-2474
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2474
>             Project: CouchDB
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Fauxton
>            Reporter: Ben Keen
>            Assignee: Ben Keen
>
> Right now we're using `Helpers.docs` to store a map of key-value pairs for 
> documentation URLs. Now we have a central constants file that does exactly 
> the same thing.
> Once this is done we should remove `Helpers.getDocUrl()` as well and just 
> pass the URL (stored in constants) right to the API Url tray template.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to