Skip to content

Commit

Permalink
Upgrade handlebars to 2.0.0
Browse files Browse the repository at this point in the history
Summary:
webapp's handlebars was upgrade to 2.0.0 in D41371.  live-editor needs
to use the same version of handlebars since it's a shared dependency.
This diff upgrade's live-editor's version of handlebars.

demo page
{F1089119}

in webapp
{F1089120}

Test Plan:
- run python -m SimpleHTTPServer 1234
- load http://localhost:1234/demos/simple/ without errors
- load http://localhost:8080/computer-programming/new/pjs without errors

Reviewers: john, jeff, riley

Reviewed By: john

Subscribers: csilvers

Differential Revision: https://phabricator.khanacademy.org/D41571
  • Loading branch information
kevinbarabash committed Jan 4, 2018
1 parent 978bf3a commit 7c05909
Show file tree
Hide file tree
Showing 16 changed files with 7,009 additions and 3,074 deletions.
161 changes: 42 additions & 119 deletions build/js/live-editor.audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -6406,132 +6406,55 @@ if (typeof module === 'object' && module && typeof module.exports === 'object')

this["Handlebars"] = this["Handlebars"] || {};
this["Handlebars"]["templates"] = this["Handlebars"]["templates"] || {};
this["Handlebars"]["templates"]["dev-record"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
helpers = helpers || Handlebars.helpers;
var buffer = "", stack1, foundHelper, tmp1, self=this, functionType="function", blockHelperMissing=helpers.blockHelperMissing;

function program1(depth0,data) {


return "Start New Chunk";}

function program3(depth0,data) {


return "Discard Recorded Chunk";}

function program5(depth0,data) {


return "Save Recorded Chunk";}

function program7(depth0,data) {


return "Refresh Editor State";}

function program9(depth0,data) {


return "Last audio chunk recorded: ";}

function program11(depth0,data) {


return "Empty";}

function program13(depth0,data) {


return "All saved audio chunks: ";}

function program15(depth0,data) {


return "Empty";}

buffer += "<div class=\"scratchpad-dev-record\">\n <div class=\"scratchpad-dev-record-buttons\">\n <button class=\"scratchpad-dev-new-chunk simple-button\">";
foundHelper = helpers['_'];
stack1 = foundHelper || depth0['_'];
tmp1 = self.program(1, program1, data);
tmp1.hash = {};
tmp1.fn = tmp1;
tmp1.inverse = self.noop;
if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
if(stack1 || stack1 === 0) { buffer += stack1; }
this["Handlebars"]["templates"]["dev-record"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
return "Start New Chunk";
},"3":function(depth0,helpers,partials,data) {
return "Discard Recorded Chunk";
},"5":function(depth0,helpers,partials,data) {
return "Save Recorded Chunk";
},"7":function(depth0,helpers,partials,data) {
return "Refresh Editor State";
},"9":function(depth0,helpers,partials,data) {
return "Last audio chunk recorded: ";
},"11":function(depth0,helpers,partials,data) {
return "Empty";
},"13":function(depth0,helpers,partials,data) {
return "All saved audio chunks: ";
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, blockHelperMissing=helpers.blockHelperMissing, buffer = "<div class=\"scratchpad-dev-record\">\n <div class=\"scratchpad-dev-record-buttons\">\n <button class=\"scratchpad-dev-new-chunk simple-button\">";
stack1 = ((helper = (helper = helpers._ || (depth0 != null ? depth0._ : depth0)) != null ? helper : helperMissing),(options={"name":"_","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper));
if (!helpers._) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if (stack1 != null) { buffer += stack1; }
buffer += "</button>\n <button class=\"scratchpad-dev-discard-chunk simple-button\">";
foundHelper = helpers['_'];
stack1 = foundHelper || depth0['_'];
tmp1 = self.program(3, program3, data);
tmp1.hash = {};
tmp1.fn = tmp1;
tmp1.inverse = self.noop;
if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
if(stack1 || stack1 === 0) { buffer += stack1; }
stack1 = ((helper = (helper = helpers._ || (depth0 != null ? depth0._ : depth0)) != null ? helper : helperMissing),(options={"name":"_","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper));
if (!helpers._) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if (stack1 != null) { buffer += stack1; }
buffer += "</button>\n <button class=\"scratchpad-dev-save-chunk simple-button\">";
foundHelper = helpers['_'];
stack1 = foundHelper || depth0['_'];
tmp1 = self.program(5, program5, data);
tmp1.hash = {};
tmp1.fn = tmp1;
tmp1.inverse = self.noop;
if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
if(stack1 || stack1 === 0) { buffer += stack1; }
stack1 = ((helper = (helper = helpers._ || (depth0 != null ? depth0._ : depth0)) != null ? helper : helperMissing),(options={"name":"_","hash":{},"fn":this.program(5, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper));
if (!helpers._) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if (stack1 != null) { buffer += stack1; }
buffer += "</button>\n <button class=\"scratchpad-dev-refresh-editor-state simple-button\">";
foundHelper = helpers['_'];
stack1 = foundHelper || depth0['_'];
tmp1 = self.program(7, program7, data);
tmp1.hash = {};
tmp1.fn = tmp1;
tmp1.inverse = self.noop;
if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
if(stack1 || stack1 === 0) { buffer += stack1; }
stack1 = ((helper = (helper = helpers._ || (depth0 != null ? depth0._ : depth0)) != null ? helper : helperMissing),(options={"name":"_","hash":{},"fn":this.program(7, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper));
if (!helpers._) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if (stack1 != null) { buffer += stack1; }
buffer += "</button>\n </div>\n <div class=\"show-audio-chunks-wrapper\">\n <p>";
foundHelper = helpers['_'];
stack1 = foundHelper || depth0['_'];
tmp1 = self.program(9, program9, data);
tmp1.hash = {};
tmp1.fn = tmp1;
tmp1.inverse = self.noop;
if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
if(stack1 || stack1 === 0) { buffer += stack1; }
stack1 = ((helper = (helper = helpers._ || (depth0 != null ? depth0._ : depth0)) != null ? helper : helperMissing),(options={"name":"_","hash":{},"fn":this.program(9, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper));
if (!helpers._) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if (stack1 != null) { buffer += stack1; }
buffer += "<span class=\"last-audio-chunk\">";
foundHelper = helpers['_'];
stack1 = foundHelper || depth0['_'];
tmp1 = self.program(11, program11, data);
tmp1.hash = {};
tmp1.fn = tmp1;
tmp1.inverse = self.noop;
if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
if(stack1 || stack1 === 0) { buffer += stack1; }
stack1 = ((helper = (helper = helpers._ || (depth0 != null ? depth0._ : depth0)) != null ? helper : helperMissing),(options={"name":"_","hash":{},"fn":this.program(11, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper));
if (!helpers._) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if (stack1 != null) { buffer += stack1; }
buffer += "</span></p>\n <p>";
foundHelper = helpers['_'];
stack1 = foundHelper || depth0['_'];
tmp1 = self.program(13, program13, data);
tmp1.hash = {};
tmp1.fn = tmp1;
tmp1.inverse = self.noop;
if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
if(stack1 || stack1 === 0) { buffer += stack1; }
stack1 = ((helper = (helper = helpers._ || (depth0 != null ? depth0._ : depth0)) != null ? helper : helperMissing),(options={"name":"_","hash":{},"fn":this.program(13, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper));
if (!helpers._) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if (stack1 != null) { buffer += stack1; }
buffer += "<span class=\"saved-audio-chunks\">";
foundHelper = helpers['_'];
stack1 = foundHelper || depth0['_'];
tmp1 = self.program(15, program15, data);
tmp1.hash = {};
tmp1.fn = tmp1;
tmp1.inverse = self.noop;
if(foundHelper && typeof stack1 === functionType) { stack1 = stack1.call(depth0, tmp1); }
else { stack1 = blockHelperMissing.call(depth0, stack1, tmp1); }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "</span></p>\n </div>\n</div>";
return buffer;});;
stack1 = ((helper = (helper = helpers._ || (depth0 != null ? depth0._ : depth0)) != null ? helper : helperMissing),(options={"name":"_","hash":{},"fn":this.program(11, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper));
if (!helpers._) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if (stack1 != null) { buffer += stack1; }
return buffer + "</span></p>\n </div>\n</div>";
},"useData":true});;
$(document).delegate("a.ui-button", {
mouseenter: function mouseenter() {
if (!$(this).hasClass("ui-state-disabled")) {
Expand Down
Loading

1 comment on commit 7c05909

@SharkFinPro
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:D

Please sign in to comment.