MINOR JavaScript code indentation and formatting

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92656 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-11-21 02:38:31 +00:00
parent bb6f4a9200
commit 4809523bae
3 changed files with 586 additions and 576 deletions

View File

@ -27,7 +27,7 @@ var ss_MainLayout;
ss_MainLayout = this._setupLayout(); ss_MainLayout = this._setupLayout();
this.setMainLayout(ss_MainLayout); this.setMainLayout(ss_MainLayout);
layoutState.options.keys = "west.size,west.isClosed"; layoutState.options.keys = "west.size,west.isClosed";
$(window).unload(function(){ layoutState.save('ss_MainLayout') }); $(window).unload(function(){ layoutState.save('ss_MainLayout');});
// artificially delay the resize event 200ms // artificially delay the resize event 200ms
// to avoid overlapping height changes in different onresize() methods // to avoid overlapping height changes in different onresize() methods
@ -115,7 +115,8 @@ var ss_MainLayout;
return layout; return layout;
} }
}}); };
});
/** /**
* @class CMS-specific form behaviour * @class CMS-specific form behaviour
@ -131,10 +132,9 @@ var ss_MainLayout;
alert('The page type will be updated after the page is saved'); alert('The page type will be updated after the page is saved');
} }
); );
this.find(':input[name=ParentID]')
} }
}}); };
});
/** /**
* @class ParentID field combination - mostly toggling between * @class ParentID field combination - mostly toggling between
@ -168,7 +168,8 @@ var ss_MainLayout;
$('#ParentID').show(); $('#ParentID').show();
} }
} }
}}); };
});
/** /**
* @class Toggle display of group dropdown in "access" tab, * @class Toggle display of group dropdown in "access" tab,
@ -191,7 +192,7 @@ var ss_MainLayout;
var currentVal = this.find('input[name=' + this.attr('id') + ']:checked').val(); var currentVal = this.find('input[name=' + this.attr('id') + ']:checked').val();
dropdown.toggle(currentVal == 'OnlyTheseUsers'); dropdown.toggle(currentVal == 'OnlyTheseUsers');
} }
} };
}); });
/** /**
@ -212,7 +213,8 @@ var ss_MainLayout;
return false; return false;
} }
}}); };
});
/** /**
* @class Open a printable representation of the form in a new window. * @class Open a printable representation of the form in a new window.
@ -231,7 +233,8 @@ var ss_MainLayout;
return false; return false;
} }
}}); };
});
/** /**
* @class A "rollback" to a specific version needs user confirmation. * @class A "rollback" to a specific version needs user confirmation.
@ -243,7 +246,8 @@ var ss_MainLayout;
// @todo i18n // @todo i18n
return confirm("Do you really want to copy the published content to the stage site?"); return confirm("Do you really want to copy the published content to the stage site?");
} }
}}); };
});
/** /**
* @class All forms in the right content panel should have closeable jQuery UI style titles. * @class All forms in the right content panel should have closeable jQuery UI style titles.
@ -263,7 +267,8 @@ var ss_MainLayout;
return false; return false;
}); });
} }
}}); };
});
/** /**
* @class Control the site tree filter. * @class Control the site tree filter.
@ -307,7 +312,7 @@ var ss_MainLayout;
// add default option // add default option
// TODO i18n // TODO i18n
jQuery('<option value="0">Add Criteria</option>').appendTo(self.SelectEl()) jQuery('<option value="0">Add Criteria</option>').appendTo(self.SelectEl());
// populate dropdown values from existing fields // populate dropdown values from existing fields
this.find('.field').each(function() { this.find('.field').each(function() {
@ -394,7 +399,7 @@ var ss_MainLayout;
} }
}); });
} }
}}); };
});
})(jQuery); })(jQuery);

View File

@ -143,7 +143,7 @@
this.find('iframe').each(function() { this.find('iframe').each(function() {
this.contentWindow.location.href = 'about:blank'; this.contentWindow.location.href = 'about:blank';
this.remove(); this.remove();
}) });
this.html(html); this.html(html);
@ -160,7 +160,8 @@
this.trigger('loadnewpage', {response: response}); this.trigger('loadnewpage', {response: response});
} }
}}); };
});
/** /**
* @class All buttons in the right CMS form go through here by default. * @class All buttons in the right CMS form go through here by default.

View File

@ -13,13 +13,14 @@
*/ */
$('.LeftAndMain').concrete('ss', function($){ $('.LeftAndMain').concrete('ss', function($){
return/** @lends ss.EditMemberProfile */ { return/** @lends ss.EditMemberProfile */ {
/** /**
* @type Number Interval in which /Security/ping will be checked for a valid login session. * @type Number Interval in which /Security/ping will be checked for a valid login session.
*/ */
PingIntervalSeconds: 5*60, PingIntervalSeconds: 5*60,
onmatch: function() { onmatch: function() {
var self = this;
this._setupPinging(); this._setupPinging();
this._setupButtons(); this._setupButtons();
this._resizeChildren(); this._resizeChildren();
@ -110,7 +111,8 @@
$('#Form_EditForm fieldset > .ss-tabset > .tab > .ss-tabset', this).fitHeightToParent(); $('#Form_EditForm fieldset > .ss-tabset > .tab > .ss-tabset', this).fitHeightToParent();
$('#Form_EditForm fieldset > .ss-tabset > .tab > .ss-tabset > .tab', this).fitHeightToParent(); $('#Form_EditForm fieldset > .ss-tabset > .tab > .ss-tabset > .tab', this).fitHeightToParent();
} }
}}); };
});
/** /**
* @class Container for tree actions like "create", "search", etc. * @class Container for tree actions like "create", "search", etc.
@ -126,11 +128,12 @@
onmatch: function() { onmatch: function() {
this.tabs({ this.tabs({
collapsible: true, collapsible: true,
selected: parseInt(jQuery.cookie('ui-tabs-TreeActions')) || null, selected: parseInt(jQuery.cookie('ui-tabs-TreeActions'), 10) || null,
cookie: { expires: 30, path: '/', name: 'ui-tabs-TreeActions' } cookie: { expires: 30, path: '/', name: 'ui-tabs-TreeActions' }
}); });
} }
}}); };
});
/** /**
* @class Link for editing the profile for a logged-in member * @class Link for editing the profile for a logged-in member
@ -172,7 +175,7 @@
title: 'Edit Profile' title: 'Edit Profile'
}, cookieVal)).css('overflow', 'hidden'); }, cookieVal)).css('overflow', 'hidden');
$('#ss-ui-dialog-iframe').bind('load', function(e) {self._resize();}) $('#ss-ui-dialog-iframe').bind('load', function(e) {self._resize();});
}, },
_openPopup: function(e) { _openPopup: function(e) {
@ -209,18 +212,19 @@
jQuery.cookie( jQuery.cookie(
'ss-ui-dialog', 'ss-ui-dialog',
JSON.stringify({ JSON.stringify({
width: parseInt(container.width()), width: parseInt(container.width(), 10),
height: parseInt(container.height()), height: parseInt(container.height(), 10),
position: [ position: [
parseInt(container.offset().top), parseInt(container.offset().top, 10),
parseInt(container.offset().left) parseInt(container.offset().left, 10)
] ]
}), }),
{ expires: 30, path: '/'} { expires: 30, path: '/'}
); );
} }
} }
}}); };
});
/** /**
* @class Links for viewing the currently loaded page * @class Links for viewing the currently loaded page
@ -270,7 +274,7 @@
window.open($(e.target).attr('href')); window.open($(e.target).attr('href'));
return false; return false;
} }
} };
}); });
})(jQuery); })(jQuery);