From 08f6f92e8c26efd5ebe964831c042ad899b2f4f8 Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 10 Jul 2013 10:38:16 +1000 Subject: [PATCH] Fixed JS Build issues - Mixed spaces/tab issues, missing semi-colon. Fixed grunt build to ensure that a self executing function wraps the JS build output. --- src/Umbraco.Web.UI.Client/gruntFile.js | 42 +- .../src/common/services/dialog.service.js | 364 +++++++++--------- .../src/common/services/navigation.service.js | 308 ++++++++------- src/Umbraco.Web.UI.Client/src/common/test.js | 16 +- 4 files changed, 379 insertions(+), 351 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/gruntFile.js b/src/Umbraco.Web.UI.Client/gruntFile.js index d7f0d60e82..c96941ee44 100644 --- a/src/Umbraco.Web.UI.Client/gruntFile.js +++ b/src/Umbraco.Web.UI.Client/gruntFile.js @@ -126,31 +126,59 @@ module.exports = function (grunt) { }, controllers: { src:['src/views/**/*.controller.js'], - dest: '<%= distdir %>/js/umbraco.controllers.js' + dest: '<%= distdir %>/js/umbraco.controllers.js', + options: { + banner: "<%= banner %>\n(function() { \n\n", + footer: "\n\n})();" + } }, services: { src:['src/common/services/*.js'], - dest: '<%= distdir %>/js/umbraco.services.js' + dest: '<%= distdir %>/js/umbraco.services.js', + options: { + banner: "<%= banner %>\n(function() { \n\n", + footer: "\n\n})();" + } }, security: { src:['src/common/security/*.js'], - dest: '<%= distdir %>/js/umbraco.security.js' + dest: '<%= distdir %>/js/umbraco.security.js', + options: { + banner: "<%= banner %>\n(function() { \n\n", + footer: "\n\n})();" + } }, resources: { src:['src/common/resources/*.js'], - dest: '<%= distdir %>/js/umbraco.resources.js' + dest: '<%= distdir %>/js/umbraco.resources.js', + options: { + banner: "<%= banner %>\n(function() { \n\n", + footer: "\n\n})();" + } }, testing: { src:['src/common/mocks/resources/*.js'], - dest: '<%= distdir %>/js/umbraco.testing.js' + dest: '<%= distdir %>/js/umbraco.testing.js', + options: { + banner: "<%= banner %>\n(function() { \n\n", + footer: "\n\n})();" + } }, directives: { src:['src/common/directives/*.js'], - dest: '<%= distdir %>/js/umbraco.directives.js' + dest: '<%= distdir %>/js/umbraco.directives.js', + options: { + banner: "<%= banner %>\n(function() { \n\n", + footer: "\n\n})();" + } }, filters: { src:['src/common/filters/*.js'], - dest: '<%= distdir %>/js/umbraco.filters.js' + dest: '<%= distdir %>/js/umbraco.filters.js', + options: { + banner: "<%= banner %>\n(function() { \n\n", + footer: "\n\n})();" + } } }, diff --git a/src/Umbraco.Web.UI.Client/src/common/services/dialog.service.js b/src/Umbraco.Web.UI.Client/src/common/services/dialog.service.js index 2b1cc344d0..5dfbe2c4e3 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/dialog.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/dialog.service.js @@ -28,216 +28,220 @@ */ angular.module('umbraco.services') -.factory('dialogService', ['$rootScope', '$compile', '$http', '$timeout', '$q', '$templateCache', - function($rootScope, $compile, $http, $timeout, $q, $templateCache) { - var _dialogs = []; - $rootScope.$on("closeDialogs", function () { - for (var i = 0; i < _dialogs.length; i++) { - var dialog = _dialogs[i]; - - dialog.modal("hide"); - dialog.remove(); - $("#" + dialog.attr("id")).remove(); - _dialogs.splice(i,1); - } - }); +.factory('dialogService', ['$rootScope', '$compile', '$http', '$timeout', '$q', '$templateCache', + function ($rootScope, $compile, $http, $timeout, $q, $templateCache) { + var _dialogs = []; + $rootScope.$on("closeDialogs", function () { + for (var i = 0; i < _dialogs.length; i++) { + var dialog = _dialogs[i]; - //internal method that handles opening all dialogs - function _open(options){ - if(!options){ - options = {}; - } - //configation and defaults - var scope = options.scope || $rootScope.$new(), - container = options.container || $("body"), - animationClass = options.animation || "fade", - modalClass = options.modalClass || "umb-modal", - templateUrl = options.template || "views/common/notfound.html"; + dialog.modal("hide"); + dialog.remove(); + $("#" + dialog.attr("id")).remove(); + _dialogs.splice(i, 1); + } + }); - //if a callback is available - var callback = options.callback; + //internal method that handles opening all dialogs + function _open(options) { + if (!options) { + options = {}; + } + //configation and defaults + var scope = options.scope || $rootScope.$new(), + container = options.container || $("body"), + animationClass = options.animation || "fade", + modalClass = options.modalClass || "umb-modal", + templateUrl = options.template || "views/common/notfound.html"; - //Modal dom obj and unique id - var $modal = $(''); - var id = templateUrl.replace('.html', '').replace(/[\/|\.|:]/g, "-") + '-' + scope.$id; + //if a callback is available + var callback = options.callback; - //set the id and add classes - $modal - .attr('id', id) - .addClass(animationClass) - .addClass(modalClass); + //Modal dom obj and unique id + var $modal = $(''); + var id = templateUrl.replace('.html', '').replace(/[\/|\.|:]/g, "-") + '-' + scope.$id; - //push the modal into the global modal collection - _dialogs.push($modal); + //set the id and add classes + $modal + .attr('id', id) + .addClass(animationClass) + .addClass(modalClass); - //if iframe is enabled, inject that instead of a template - if(options.iframe) { - var html = $(""); - - $modal.html(html); - //append to body or whatever element is passed in as options.containerElement - container.append($modal); + //push the modal into the global modal collection + _dialogs.push($modal); - if(width){ - $modal.css("width", width); - } + //if iframe is enabled, inject that instead of a template + if (options.iframe) { + var html = $(""); - //Autoshow - if (options.show) { - $modal.modal('show'); - } + $modal.html(html); + //append to body or whatever element is passed in as options.containerElement + container.append($modal); - return $modal; - } else { - return $q.when($templateCache.get(templateUrl) || $http.get(templateUrl, { cache: true }).then(function (res) { return res.data; })) - .then(function onSuccess(template) { + if (width) { + $modal.css("width", width); + } - // Build modal object - $modal - .html(template); + //Autoshow + if (options.show) { + $modal.modal('show'); + } - //append to body or other container element - container.append($modal); + return $modal; + } else { + return $q.when($templateCache.get(templateUrl) || $http.get(templateUrl, { cache: true }).then(function (res) { return res.data; })) + .then(function onSuccess(template) { - // Compile modal content - $timeout(function () { - $compile($modal)(scope); - }); + // Build modal object + $modal + .html(template); - //Scope to handle data from the modal form - scope.dialogData = {}; - scope.dialogData.selection = []; + //append to body or other container element + container.append($modal); - // Provide scope display functions - //this passes the modal to the current scope - scope.$modal = function (name) { - $modal.modal(name); - }; + // Compile modal content + $timeout(function () { + $compile($modal)(scope); + }); - scope.hide = function () { - $modal.modal('hide'); - - $modal.remove(); - $("#" + $modal.attr("id")).remove(); - }; + //Scope to handle data from the modal form + scope.dialogData = {}; + scope.dialogData.selection = []; - scope.show = function () { - $modal.modal('show'); - }; + // Provide scope display functions + //this passes the modal to the current scope + scope.$modal = function (name) { + $modal.modal(name); + }; - scope.submit = function (data) { - if(callback){ - callback(data); - } + scope.hide = function () { + $modal.modal('hide'); - $modal.modal('hide'); + $modal.remove(); + $("#" + $modal.attr("id")).remove(); + }; - $modal.remove(); - $("#" + $modal.attr("id")).remove(); - }; + scope.show = function () { + $modal.modal('show'); + }; - scope.select = function (item) { - if (scope.dialogData.selection.indexOf(item) < 0) { - scope.dialogData.selection.push(item); - } - }; + scope.submit = function (data) { + if (callback) { + callback(data); + } - scope.dismiss = scope.hide; + $modal.modal('hide'); - // Emit modal events - angular.forEach(['show', 'shown', 'hide', 'hidden'], function (name) { - $modal.on(name, function (ev) { - scope.$emit('modal-' + name, ev); - }); - }); + $modal.remove(); + $("#" + $modal.attr("id")).remove(); + }; - // Support autofocus attribute - $modal.on('shown', function (event) { - $('input[autofocus]', $modal).first().trigger('focus'); - }); + scope.select = function (item) { + if (scope.dialogData.selection.indexOf(item) < 0) { + scope.dialogData.selection.push(item); + } + }; - //Autoshow - if (options.show) { - $modal.modal('show'); - } + scope.dismiss = scope.hide; - //Return the modal object - return $modal; - }); - } + // Emit modal events + angular.forEach(['show', 'shown', 'hide', 'hidden'], function (name) { + $modal.on(name, function (ev) { + scope.$emit('modal-' + name, ev); + }); + }); - -} + // Support autofocus attribute + $modal.on('shown', function (event) { + $('input[autofocus]', $modal).first().trigger('focus'); + }); -return{ - /** - * @ngdoc method - * @name umbraco.services.dialogService#open - * @methodOf umbraco.services.dialogService - * - * @description - * Opens a modal rendering a given template url - * @param {Object} options rendering options - * @param {DomElement} options.container the DOM element to inject the modal into, by default set to body - * @param {Function} options.callback function called when the modal is submitted - * @param {String} options.template the url of the template - * @param {Bool} options.show show the modal instantly - * @param {Object} options.scope scope to attach the modal to, by default rootScope.new() - * @param {Bool} options.iframe load template in an iframe, only needed for serverside templates - * @param {Int} options.width set a width on the modal, only needed for iframes - */ - open: function(options){ - return _open(options); - }, - mediaPicker: function(options){ - return _open({ - scope: options.scope, - callback: options.callback, - template: 'views/common/dialogs/mediaPicker.html', - show: true}); - }, - contentPicker: function(options){ - return _open({ - scope: options.scope, - callback: options.callback, - template: 'views/common/dialogs/contentPicker.html', - show: true}); - }, - macroPicker: function(options){ - return _open({ - scope: options.scope, - callback: options.callback, - template: 'views/common/dialogs/macroPicker.html', - show: true}); - }, - propertyDialog: function(options){ - return _open({ - scope: options.scope, - callback: options.callback, - template: 'views/common/dialogs/property.html', - show: true}); - }, + //Autoshow + if (options.show) { + $modal.modal('show'); + } - //deprecated - append : function(options){ + //Return the modal object + return $modal; + }); + } - return _open(options); - /* - var scope = options.scope || $rootScope.$new(), - templateUrl = options.template; + } - return $q.when($templateCache.get(templateUrl) || $http.get(templateUrl, {cache: true}).then(function(res) { return res.data; })) - .then(function onSuccess(template) { + return { + /** + * @ngdoc method + * @name umbraco.services.dialogService#open + * @methodOf umbraco.services.dialogService + * + * @description + * Opens a modal rendering a given template url + * @param {Object} options rendering options + * @param {DomElement} options.container the DOM element to inject the modal into, by default set to body + * @param {Function} options.callback function called when the modal is submitted + * @param {String} options.template the url of the template + * @param {Bool} options.show show the modal instantly + * @param {Object} options.scope scope to attach the modal to, by default rootScope.new() + * @param {Bool} options.iframe load template in an iframe, only needed for serverside templates + * @param {Int} options.width set a width on the modal, only needed for iframes + */ + open: function (options) { + return _open(options); + }, + mediaPicker: function (options) { + return _open({ + scope: options.scope, + callback: options.callback, + template: 'views/common/dialogs/mediaPicker.html', + show: true + }); + }, + contentPicker: function (options) { + return _open({ + scope: options.scope, + callback: options.callback, + template: 'views/common/dialogs/contentPicker.html', + show: true + }); + }, + macroPicker: function (options) { + return _open({ + scope: options.scope, + callback: options.callback, + template: 'views/common/dialogs/macroPicker.html', + show: true + }); + }, + propertyDialog: function (options) { + return _open({ + scope: options.scope, + callback: options.callback, + template: 'views/common/dialogs/property.html', + show: true + }); + }, - // Compile modal content - $timeout(function() { - options.container.html(template); - $compile(options.container)(scope); - }); + //deprecated + append: function (options) { - return template; - });*/ - } -}; -}]); \ No newline at end of file + return _open(options); + + /* + var scope = options.scope || $rootScope.$new(), + templateUrl = options.template; + + return $q.when($templateCache.get(templateUrl) || $http.get(templateUrl, {cache: true}).then(function(res) { return res.data; })) + .then(function onSuccess(template) { + + // Compile modal content + $timeout(function() { + options.container.html(template); + $compile(options.container)(scope); + }); + + return template; + });*/ + } + }; + }]); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js b/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js index 69d78ea38f..7f5832a152 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js @@ -16,63 +16,62 @@ * */ - angular.module('umbraco.services') - .factory('navigationService', function ($rootScope, $routeParams, $log, $location, dialogService, treeService, sectionResource) { +angular.module('umbraco.services') +.factory('navigationService', function ($rootScope, $routeParams, $log, $location, dialogService, treeService, sectionResource) { - var currentSection = $routeParams.section; - var currentId = $routeParams.id; - var currentNode; - var ui = {}; + var currentSection = $routeParams.section; + var currentId = $routeParams.id; + var currentNode; + var ui = {}; - var _sections = sectionResource.getSections(); + var _sections = sectionResource.getSections(); - function setMode(mode){ - switch(mode) - { - case 'tree': - ui.showNavigation = true; - ui.showContextMenu = false; - ui.showContextMenuDialog = false; - ui.stickyNavigation = false; + function setMode(mode) { + switch (mode) { + case 'tree': + ui.showNavigation = true; + ui.showContextMenu = false; + ui.showContextMenuDialog = false; + ui.stickyNavigation = false; - $("#search-form input").focus(); - break; - case 'menu': - ui.showNavigation = true; - ui.showContextMenu = true; - ui.showContextMenuDialog = false; - ui.stickyNavigation = true; - break; - case 'dialog': - ui.stickyNavigation = true; - ui.showNavigation = true; - ui.showContextMenu = false; - ui.showContextMenuDialog = true; - break; - case 'search': - ui.stickyNavigation = false; - ui.showNavigation = true; - ui.showContextMenu = false; - ui.showSearchResults = true; - ui.showContextMenuDialog = false; - break; - default: - ui.showNavigation = false; - ui.showContextMenu = false; - ui.showContextMenuDialog = false; - ui.showSearchResults = false; - ui.stickyNavigation = false; - break; - } - } + $("#search-form input").focus(); + break; + case 'menu': + ui.showNavigation = true; + ui.showContextMenu = true; + ui.showContextMenuDialog = false; + ui.stickyNavigation = true; + break; + case 'dialog': + ui.stickyNavigation = true; + ui.showNavigation = true; + ui.showContextMenu = false; + ui.showContextMenuDialog = true; + break; + case 'search': + ui.stickyNavigation = false; + ui.showNavigation = true; + ui.showContextMenu = false; + ui.showSearchResults = true; + ui.showContextMenuDialog = false; + break; + default: + ui.showNavigation = false; + ui.showContextMenu = false; + ui.showContextMenuDialog = false; + ui.showSearchResults = false; + ui.stickyNavigation = false; + break; + } + } - return { - currentNode: currentNode, - mode: "default", - ui: ui, - sections: _sections, + return { + currentNode: currentNode, + mode: "default", + ui: ui, + sections: _sections, - /** + /** * @ngdoc method * @name umbraco.services.navigationService#load * @methodOf umbraco.services.navigationService @@ -81,11 +80,11 @@ * Shows the legacy iframe and loads in the content based on the source url * @param {String} source The URL to load into the iframe */ - loadLegacyIFrame: function (source) { - $location.path("/framed/" + encodeURIComponent(source)); - }, + loadLegacyIFrame: function (source) { + $location.path("/framed/" + encodeURIComponent(source)); + }, - /** + /** * @ngdoc method * @name umbraco.services.navigationService#changeSection * @methodOf umbraco.services.navigationService @@ -96,17 +95,17 @@ * and load the dashboard related to the section * @param {string} sectionAlias The alias of the section */ - changeSection: function(sectionAlias){ - if(this.ui.stickyNavigation){ - setMode("default-opensection"); - this.ui.currentSection = selectedSection; - this.showTree(selectedSection); - } + changeSection: function (sectionAlias) { + if (this.ui.stickyNavigation) { + setMode("default-opensection"); + this.ui.currentSection = selectedSection; + this.showTree(selectedSection); + } - $location.path(sectionAlias); - }, + $location.path(sectionAlias); + }, - /** + /** * @ngdoc method * @name umbraco.services.navigationService#showTree * @methodOf umbraco.services.navigationService @@ -116,14 +115,14 @@ * only changes if the section is different from the current one * @param {string} sectionAlias The alias of the section the tree should load data from */ - showTree: function(sectionAlias){ - if(!this.ui.stickyNavigation && sectionAlias !== this.ui.currentTree){ - this.ui.currentTree = sectionAlias; - setMode("tree"); - } - }, + showTree: function (sectionAlias) { + if (!this.ui.stickyNavigation && sectionAlias !== this.ui.currentTree) { + this.ui.currentTree = sectionAlias; + setMode("tree"); + } + }, - /** + /** * @ngdoc method * @name umbraco.services.navigationService#hideTree * @methodOf umbraco.services.navigationService @@ -131,15 +130,15 @@ * @description * Hides the tree by hiding the containing dom element */ - hideTree: function(){ - if(!this.ui.stickyNavigation){ - $log.log("hide tree"); - this.ui.currentTree = ""; - setMode("default-hidesectiontree"); - } - }, + hideTree: function () { + if (!this.ui.stickyNavigation) { + $log.log("hide tree"); + this.ui.currentTree = ""; + setMode("default-hidesectiontree"); + } + }, - /** + /** * @ngdoc method * @name umbraco.services.navigationService#showMenu * @methodOf umbraco.services.navigationService @@ -148,41 +147,41 @@ * Hides the tree by hiding the containing dom element * @param {Event} event the click event triggering the method, passed from the DOM element */ - showMenu: function (event, args) { - if(args.event !== undefined && args.node.defaultAction && !args.event.altKey){ - //hack for now, it needs the complete action object to, so either include in tree item json - //or lookup in service... - var act = { - alias: args.node.defaultAction, - name: args.node.defaultAction - }; + showMenu: function (event, args) { + if (args.event !== undefined && args.node.defaultAction && !args.event.altKey) { + //hack for now, it needs the complete action object to, so either include in tree item json + //or lookup in service... + var act = { + alias: args.node.defaultAction, + name: args.node.defaultAction + }; - this.ui.currentNode = args.node; - this.showDialog({ - scope: args.scope, - node: args.node, - action: act, - section: this.ui.currentTree - }); - } - else { - setMode("menu"); + this.ui.currentNode = args.node; + this.showDialog({ + scope: args.scope, + node: args.node, + action: act, + section: this.ui.currentTree + }); + } + else { + setMode("menu"); - treeService.getActions({ node: args.node, section: this.ui.currentTree }) - .then(function(data) { + treeService.getActions({ node: args.node, section: this.ui.currentTree }) + .then(function (data) { ui.actions = data; }, function (err) { //display the error notificationsService.error(err.errorMsg); }); - - this.ui.currentNode = args.node; - this.ui.dialogTitle = args.node.name; - } - }, - /** + this.ui.currentNode = args.node; + this.ui.dialogTitle = args.node.name; + } + }, + + /** * @ngdoc method * @name umbraco.services.navigationService#hideMenu * @methodOf umbraco.services.navigationService @@ -190,14 +189,14 @@ * @description * Hides the menu by hiding the containing dom element */ - hideMenu: function () { - var selectedId = $routeParams.id; - this.ui.currentNode = undefined; - this.ui.actions = []; - setMode("tree"); - }, + hideMenu: function () { + var selectedId = $routeParams.id; + this.ui.currentNode = undefined; + this.ui.actions = []; + setMode("tree"); + }, - /** + /** * @ngdoc method * @name umbraco.services.navigationService#showUserDialog * @methodOf umbraco.services.navigationService @@ -206,16 +205,15 @@ * Opens the user dialog, next to the sections navigation * template is located in views/common/dialogs/user.html */ - showUserDialog: function(){ - var d = dialogService.open( - { - template: "views/common/dialogs/user.html", - modalClass: "umb-modal-left", - show: true - }); - - }, - /** + showUserDialog: function () { + var d = dialogService.open( + { + template: "views/common/dialogs/user.html", + modalClass: "umb-modal-left", + show: true + }); + }, + /** * @ngdoc method * @name umbraco.services.navigationService#showDialog * @methodOf umbraco.services.navigationService @@ -230,25 +228,25 @@ * @param {Scope} args.scope current scope passed to the dialog * @param {Object} args.action the clicked action containing `name` and `alias` */ - showDialog: function (args) { - setMode("dialog"); + showDialog: function (args) { + setMode("dialog"); - var scope = args.scope || $rootScope.$new(); - scope.currentNode = args.node; + var scope = args.scope || $rootScope.$new(); + scope.currentNode = args.node; - //this.currentNode = item; - this.ui.dialogTitle = args.action.name; + //this.currentNode = item; + this.ui.dialogTitle = args.action.name; - var templateUrl = "views/" + this.ui.currentTree + "/" + args.action.alias + ".html"; - var d = dialogService.open( + var templateUrl = "views/" + this.ui.currentTree + "/" + args.action.alias + ".html"; + var d = dialogService.open( { - container: $("#dialog div.umb-panel-body"), - scope: scope, - template: templateUrl + container: $("#dialog div.umb-panel-body"), + scope: scope, + template: templateUrl }); - }, + }, - /** + /** * @ngdoc method * @name umbraco.services.navigationService#hideDialog * @methodOf umbraco.services.navigationService @@ -256,10 +254,10 @@ * @description * hides the currently open dialog */ - hideDialog: function() { - this.showMenu(undefined, {node: this.ui.currentNode}); - }, - /** + hideDialog: function () { + this.showMenu(undefined, { node: this.ui.currentNode }); + }, + /** * @ngdoc method * @name umbraco.services.navigationService#showSearch * @methodOf umbraco.services.navigationService @@ -267,10 +265,10 @@ * @description * shows the search pane */ - showSearch: function() { - setMode("search"); - }, - /** + showSearch: function () { + setMode("search"); + }, + /** * @ngdoc method * @name umbraco.services.navigationService#hideSearch * @methodOf umbraco.services.navigationService @@ -278,10 +276,10 @@ * @description * hides the search pane */ - hideSearch: function() { - setMode("default-hidesearch"); - }, - /** + hideSearch: function () { + setMode("default-hidesearch"); + }, + /** * @ngdoc method * @name umbraco.services.navigationService#hideNavigation * @methodOf umbraco.services.navigationService @@ -289,13 +287,13 @@ * @description * hides any open navigation panes and resets the tree, actions and the currently selected node */ - hideNavigation: function(){ - this.ui.currentTree = ""; - this.ui.actions = []; - this.ui.currentNode = undefined; + hideNavigation: function () { + this.ui.currentTree = ""; + this.ui.actions = []; + this.ui.currentNode = undefined; - setMode("default"); - } - }; + setMode("default"); + } + }; - }); +}); diff --git a/src/Umbraco.Web.UI.Client/src/common/test.js b/src/Umbraco.Web.UI.Client/src/common/test.js index 20ddebdb4f..f05f957963 100644 --- a/src/Umbraco.Web.UI.Client/src/common/test.js +++ b/src/Umbraco.Web.UI.Client/src/common/test.js @@ -5,10 +5,9 @@ * Wat */ angular.module('app.common') -.factory('mongoProvider', function($rootScope){ - return{ - - /** + .factory('mongoProvider', function($rootScope) { + return { + /** * @ngdoc method * @name app.common.mongoProvider#someMethod * @methodOf app.common.mongoProvider @@ -17,9 +16,8 @@ angular.module('app.common') * Shows the legacy iframe and loads in the content based on the source url * @param {String} source The URL to load into the iframe */ - someMethod: function(source){ - - } - }; -}) + someMethod: function(source) { + } + }; + }); \ No newline at end of file