Make WordPress Core

Ticket #30222: 30222.diff

File 30222.diff, 2.8 KB (added by ericlewis, 12 years ago)
  • src/wp-admin/js/revisions.js

    diff --git src/wp-admin/js/revisions.js src/wp-admin/js/revisions.js
    index 521e55c..33b980c 100644
     
    1 /* global _wpRevisionsSettings, isRtl */
     1/**
     2 * @file Revisions interface functions, Backbone classes and
     3 * the revisions.php document.ready bootstrap.
     4 *
     5 * global _wpRevisionsSettings, isRtl
     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
    917        // Link settings.
    window.wp = window.wp || {}; 
    1220        // For debugging
    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 ) {
    1731                        window.console.log.apply( window.console, arguments );
    window.wp = window.wp || {}; 
    179193
    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,
    184203
    window.wp = window.wp || {}; 
    352371        });
    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: {
    357387                        loading: false,
    window.wp = window.wp || {}; 
    499529         * ========================================================================
    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',
    505542                template: wp.template('revisions-frame'),
    window.wp = window.wp || {}; 
    546583                }
    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',
    553595