WordPress.org

Make WordPress Core

Changeset 30127


Ignore:
Timestamp:
10/31/2014 11:54:50 PM (6 years ago)
Author:
wonderboymusic
Message:

Add some JSDoc blocks to revisions.js.

Props ericlewis.
See #30222.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/revisions.js

    r29052 r30127  
    11/* global _wpRevisionsSettings, isRtl */
     2/**
     3 * @file Revisions interface functions, Backbone classes and
     4 * the revisions.php document.ready bootstrap.
     5 *
     6 */
     7
    28window.wp = window.wp || {};
    39
    410(function($) {
    511    var revisions;
    6 
     12    /**
     13     * Expose the module in window.wp.revisions.
     14     */
    715    revisions = wp.revisions = { model: {}, view: {}, controller: {} };
    816
     
    1321    revisions.debug = false;
    1422
     23    /**
     24     * wp.revisions.log
     25     *
     26     * A debugging utility for revisions. Works only when a
     27     * debug flag is on and the browser supports it.
     28     */
    1529    revisions.log = function() {
    1630        if ( window.console && revisions.debug ) {
     
    180194    revisions.model.Revision = Backbone.Model.extend({});
    181195
     196    /**
     197     * wp.revisions.model.Revisions
     198     *
     199     * A collection of post revisions.
     200     */
    182201    revisions.model.Revisions = Backbone.Collection.extend({
    183202        model: revisions.model.Revision,
     
    353372
    354373
     374    /**
     375     * wp.revisions.model.FrameState
     376     *
     377     * The frame state.
     378     *
     379     * @see wp.revisions.view.Frame
     380     *
     381     * @param {object}                    attributes        Model attributes - none are required.
     382     * @param {object}                    options           Options for the model.
     383     * @param {revisions.model.Revisions} options.revisions A collection of revisions.
     384     */
    355385    revisions.model.FrameState = Backbone.Model.extend({
    356386        defaults: {
     
    500530     */
    501531
    502     // The frame view. This contains the entire page.
     532    /**
     533     * wp.revisions.view.Frame
     534     *
     535     * Top level frame that orchestrates the revisions experience.
     536     *
     537     * @param {object}                     options       The options hash for the view.
     538     * @param {revisions.model.FrameState} options.model The frame state model.
     539     */
    503540    revisions.view.Frame = wp.Backbone.View.extend({
    504541        className: 'revisions',
     
    547584    });
    548585
    549     // The control view.
    550     // This contains the revision slider, previous/next buttons, the meta info and the compare checkbox.
     586    /**
     587     * wp.revisions.view.Controls
     588     *
     589     * The controls view.
     590     *
     591     * Contains the revision slider, previous/next buttons, the meta info and the compare checkbox.
     592     */
    551593    revisions.view.Controls = wp.Backbone.View.extend({
    552594        className: 'revisions-controls',
Note: See TracChangeset for help on using the changeset viewer.