Skip to content

Commit

Permalink
Formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuell1 committed Aug 30, 2019
1 parent 103a569 commit f37990a
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions assets/contenteditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var editor = ContentTools.EditorApp.get();
editor.init(
'[data-editable], [data-fixture]',
'data-file',
function (domElement) {
function (domElement) {
return domElement.hasAttribute('data-fixture');
}
);
Expand All @@ -23,9 +23,7 @@ editor.addEventListener('saved', function (ev) {
regions = ev.detail().regions;

for (name in regions) {

if (regions.hasOwnProperty(name))
{
if (regions.hasOwnProperty(name)) {
var component = $('*[data-file="' + name + '"]').data('component'); // check for component name
$.request(component, {
data: {
Expand All @@ -37,7 +35,7 @@ editor.addEventListener('saved', function (ev) {
}

new ContentTools.FlashUI('ok');
setTimeout(function(){
setTimeout(function () {
editor.busy(false);
}, 600);

Expand All @@ -46,7 +44,7 @@ editor.addEventListener('saved', function (ev) {
/*
* Fixture focus
*/
ContentEdit.Root.get().bind('focus', function(element) {
ContentEdit.Root.get().bind('focus', function (element) {
var dataTools = element._parent._domElement.dataset.tools
var tools;
switch (dataTools) {
Expand All @@ -67,7 +65,7 @@ ContentEdit.Root.get().bind('focus', function(element) {
* Predefined tools
*/
var __hasProp = {}.hasOwnProperty;
var __extends = function(child, parent) {
var __extends = function (child, parent) {
for (var key in parent) {
if (__hasProp.call(parent, key))
child[key] = parent[key];
Expand All @@ -85,11 +83,11 @@ var __extends = function(child, parent) {
return child;
};

ContentTools.Tools.Subheading3 = (function(_super) {
ContentTools.Tools.Subheading3 = (function (_super) {
__extends(Subheading3, _super);

function Subheading3() {
return Subheading3.__super__.constructor.apply(this, arguments);
return Subheading3.__super__.constructor.apply(this, arguments);
}

ContentTools.ToolShelf.stow(Subheading3, 'subheading3');
Expand All @@ -101,11 +99,11 @@ ContentTools.Tools.Subheading3 = (function(_super) {

})(ContentTools.Tools.Heading);

ContentTools.Tools.Subheading4 = (function(_super) {
ContentTools.Tools.Subheading4 = (function (_super) {
__extends(Subheading4, _super);

function Subheading4() {
return Subheading4.__super__.constructor.apply(this, arguments);
return Subheading4.__super__.constructor.apply(this, arguments);
}

ContentTools.ToolShelf.stow(Subheading4, 'subheading4');
Expand All @@ -117,11 +115,11 @@ ContentTools.Tools.Subheading4 = (function(_super) {

})(ContentTools.Tools.Heading);

ContentTools.Tools.Subheading5 = (function(_super) {
ContentTools.Tools.Subheading5 = (function (_super) {
__extends(Subheading5, _super);

function Subheading5() {
return Subheading5.__super__.constructor.apply(this, arguments);
return Subheading5.__super__.constructor.apply(this, arguments);
}

ContentTools.ToolShelf.stow(Subheading5, 'subheading5');
Expand Down Expand Up @@ -267,7 +265,7 @@ function imageUploader(dialog) {
xhr = new XMLHttpRequest();
xhr.upload.addEventListener('progress', xhrProgress);
xhr.addEventListener('readystatechange', xhrComplete);
xhr.open('POST', siteUrl+'/contenteditor/image/upload', true);
xhr.open('POST', siteUrl + '/contenteditor/image/upload', true);
xhr.send(formData);
});

Expand Down Expand Up @@ -329,7 +327,7 @@ function imageUploader(dialog) {
// Make the request
xhr = new XMLHttpRequest();
xhr.addEventListener('readystatechange', xhrComplete);
xhr.open('POST', siteUrl+'/contenteditor/image/save', true);
xhr.open('POST', siteUrl + '/contenteditor/image/save', true);
xhr.send(formData);
});

Expand Down

0 comments on commit f37990a

Please sign in to comment.