backboneUtils.js

From disqus.com, 8 Months ago, written in JavaScript, viewed 3 times. This paste is a reply to confirmBlacklistUser.js from disqus.com - go back
URL https://pastebin.freepbx.org/view/0291fa72/diff Embed
Viewing differences between confirmBlacklistUser.js and backboneUtils.js
define('home/templates/confirmBlacklistUser',['handlebars', 'handlebars.partials', 'core/extensions/handlebars.helpers'], function(Handlebars) {

define('home/utils/backboneUtils',[
    'jquery',
], function (
    $
) {
    'use strict';

    
return Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
    var alias1=depth0 != null ? depth0 : {}, alias2=container.escapeExpression;

  
{
        memoizedFetch: function () {
            if (this.fetchPromise)
                
return "<div class=\"modal-header\">\n<h4 class=\"modal-title\">"
    + alias2(helpers.gettext.call(alias1,"Ban %(username)s?",{"name":"gettext","hash":{"username":helpers.tag.call(alias1,"b",{"name":"tag","hash":{"text":(depth0 != null ? depth0.username : depth0)},"data":data})},"data":data}))
    + "</h4>\n</div>\n<div class=\"modal-body\">\n<p>"
    + alias2(helpers.gettext.call(alias1,"Click Confirm to ban 
this.fetchPromise;

            var self = this;
            this.fetchPromise = this.constructor.__super__.fetch.apply(this, arguments).then(function () {
                self.fetchPromise = null;
                self.fetched = true;
                return arguments;
            }, function (err) {
                self.fetchPromise = null;
                // Leave self.fetched as its current value, true if at least 1 successful fetch, undefined otherwise
                return err;
            });

            return this.fetchPromise;
        },

        getPromiseFor: function (model, attributeName) {
            var attributeValue = $.Deferred();

            // Model.has() returns true if the value is non-null/undefined. Because "", false, {}, 
and remove this user's recent comments and discussions. This user will no longer be able to post comments.",{"name":"gettext","hash":{},"data":data}))
    
0 are
            // valid values for many attributes, we should resolve the attribute here because they will
            // likely never change.
            if (model.has(attributeName)) {
                attributeValue.resolve(model.get(attributeName));
            } else {
                model.once('change:' 
"</p>\n</div>\n";
},"useData":true})

});
attributeName, function (_model, value) {
                    attributeValue.resolve(value);
                });
            }

            return attributeValue.promise();
        },
    };
});

// https://c.disquscdn.com/next/82c6de3/home/js/templates/confirmBlacklistUser.com/next/82c6de3/home/js/utils/backboneUtils.js

Replies to backboneUtils.js rss

Title Name Language When
UserProfile.js disqus.com javascript 8 Months ago.

Reply to "backboneUtils.js"

Here you can reply to the paste above