Permalink
Browse files

MINOR JS formatting

  • Loading branch information...
1 parent abfa16f commit 3cad19a97ee9def78d0480bc7a6923571634c073 @chillu chillu committed Feb 21, 2012
@@ -60,7 +60,7 @@
// Catch navigation events before they reach handleStateChange(),
// in order to avoid changing the menu state if the action is cancelled by the user
- $('.cms-menu')
+ // $('.cms-menu')
// focus input on first form element
this.find(':input:visible:not(:submit):first').focus();
@@ -68,7 +68,7 @@
//show all the flyout-indicators
var par = $('.cms-menu-list ul.collapsed-flyout').parent();
- if (par.children('.child-flyout-indicator').length == 0) par.append('<span class="child-flyout-indicator"></span>').fadeIn();
+ if (par.children('.child-flyout-indicator').length === 0) par.append('<span class="child-flyout-indicator"></span>').fadeIn();
par.children('.child-flyout-indicator').fadeIn();
}
}
@@ -242,12 +242,12 @@
// Only applies to edit forms relating to page elements
if(!$('.cms-content').is('.CMSMain')) return;
- var link = this.find('a:first'), href = link.attr("href").split('/')
+ var link = this.find('a:first'), href = link.attr("href").split('/');
// Assumes that current ID will always be the last URL segment (and not a query parameter)
href[href.length -1] = id;
link.attr('href', href.join('/'));
}
- })
+ });
$('.cms-menu-list #Menu-CMSPageAddController').entwine({
setRecordID: function(id) {
@@ -264,5 +264,5 @@
// Internal Helper
$.expr[':'].internal = function(obj){return obj.href.match(/^mailto\:/) || (obj.hostname == location.hostname);};
- $.expr[':'].external = function(obj){return !$(obj).is(':internal')};
+ $.expr[':'].external = function(obj){return !$(obj).is(':internal');};
}(jQuery));
@@ -16,7 +16,7 @@ jQuery.noConflict();
var top = ($(window).height() - spinner.height()) / 2;
spinner.css('top', top + offset);
spinner.show();
- }
+ };
$(window).bind('resize', positionLoadingSpinner).trigger('resize');
@@ -77,7 +77,7 @@ jQuery.noConflict();
if(url) window.history.replaceState({}, '', url);
}
- self.redraw()
+ self.redraw();
});
// Remove loading screen
@@ -123,9 +123,8 @@ jQuery.noConflict();
* - {Object} data Any additional data passed through to History.pushState()
*/
loadPanel: function(url, title, data) {
- var data = data || {};
- var selector = data.selector || '.cms-content'
- var contentEl = $(selector);
+ if(!data) data = {};
+ var selector = data.selector || '.cms-content', contentEl = $(selector);
// Check change tracking (can't use events as we need a way to cancel the current state change)
var trackedEls = contentEl.find(':data(changetracker)').add(contentEl.filter(':data(changetracker)'));
@@ -217,7 +216,7 @@ jQuery.noConflict();
newContentEl
.removeClass(layoutClasses.join(' '))
.addClass(origLayoutClasses.join(' '));
- if(origStyle) newContentEl.attr('style', origStyle)
+ if(origStyle) newContentEl.attr('style', origStyle);
newContentEl.css('visibility', 'hidden');
// Allow injection of inline styles, as they're not allowed in the document body.
@@ -328,9 +327,6 @@ jQuery.noConflict();
// Mark up buttonsets
this.find('.ss-ui-buttonset').buttonset();
- // .children().removeClass('ui-corner-all').addClass('buttonset')
- // .first().addClass('ui-corner-left').end()
- // .last().addClass('ui-corner-right');;
}
});

0 comments on commit 3cad19a

Please sign in to comment.