Permalink
Browse files

MINOR Fixed javascript syntax in CMSMain.js and LeftAndMain.js

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92637 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
chillu committed Nov 21, 2009
1 parent ccb7e89 commit d5d4d731410470dbace88c3a35ddfe034c8ff0f8
Showing with 26 additions and 39 deletions.
  1. +16 −24 javascript/CMSMain.js
  2. +10 −15 javascript/LeftAndMain.js
View
@@ -11,9 +11,8 @@ var ss_MainLayout;
* with tree on left and main edit form on the right.
* @name ss.CMSMain
*/
- $('body.CMSMain').concrete('ss', function($){return
- /** @lends ss.CMSMain */
- {
+ $('body.CMSMain').concrete('ss', function($){
+ return/** @lends ss.CMSMain */{
/**
* Reference to jQuery.layout element
@@ -119,9 +118,8 @@ var ss_MainLayout;
* @class CMS-specific form behaviour
* @name ss.EditForm
*/
- $('#Form_EditForm').concrete('ss', function($){return
- /** @lends ss.EditForm */
- {
+ $('#Form_EditForm').concrete('ss', function($){
+ return/** @lends ss.EditForm */{
onmatch: function() {
// Alert the user on change of page-type - this might have implications
// on the available form fields etc.
@@ -140,9 +138,8 @@ var ss_MainLayout;
* the two radiobuttons and setting the hidden "ParentID" field
* @name ss.EditForm.ParentType
*/
- $('#Form_EditForm_ParentType').concrete('ss', function($){return
- /** @lends ss.EditForm.ParentType */
- {
+ $('#Form_EditForm_ParentType').concrete('ss', function($){
+ return/** @lends ss.EditForm.ParentType */{
onmatch : function() {
var parentTypeRootEl = $('#Form_EditForm_ParentType_root');
var parentTypeSubpageEl = $('#Form_EditForm_ParentType_subpage');
@@ -175,9 +172,8 @@ var ss_MainLayout;
* Visible on readonly older versions of a specific page at the moment.
* @name ss.Form_EditForm_action_email
*/
- $('#Form_EditForm .Actions #Form_EditForm_action_email').concrete('ss', function($){return
- /** @lends ss.Form_EditForm_action_email */
- {
+ $('#Form_EditForm .Actions #Form_EditForm_action_email').concrete('ss', function($){
+ return/** @lends ss.Form_EditForm_action_email */{
onclick: function(e) {
window.open(
'mailto:?subject='
@@ -196,9 +192,8 @@ var ss_MainLayout;
* Used for readonly older versions of a specific page.
* @name ss.Form_EditForm_action_print
*/
- $('#Form_EditForm .Actions #Form_EditForm_action_print').concrete('ss', function($){return
- /** @lends ss.Form_EditForm_action_print */
- {
+ $('#Form_EditForm .Actions #Form_EditForm_action_print').concrete('ss', function($){
+ return/** @lends ss.Form_EditForm_action_print */{
onclick: function(e) {
var printURL = $(this[0].form).attr('action').replace(/\?.*$/,'')
+ '/printable/'
@@ -215,9 +210,8 @@ var ss_MainLayout;
* @class A "rollback" to a specific version needs user confirmation.
* @name ss.Form_EditForm_action_rollback
*/
- $('#Form_EditForm .Actions #Form_EditForm_action_rollback').concrete('ss', function($){return
- /** @lends ss.Form_EditForm_action_rollback */
- {
+ $('#Form_EditForm .Actions #Form_EditForm_action_rollback').concrete('ss', function($){
+ return/** @lends ss.Form_EditForm_action_rollback */{
onclick: function(e) {
// @todo i18n
return confirm("Do you really want to copy the published content to the stage site?");
@@ -228,9 +222,8 @@ var ss_MainLayout;
* @class All forms in the right content panel should have closeable jQuery UI style titles.
* @name ss.contentPanel.form
*/
- $('#contentPanel form').concrete('ss', function($){return
- /** @lends ss.contentPanel.form */
- {
+ $('#contentPanel form').concrete('ss', function($){
+ return/** @lends ss.contentPanel.form */{
onmatch: function() {
// Style as title bar
this.find(':header:first').titlebar({
@@ -251,9 +244,8 @@ var ss_MainLayout;
* similar to "Smart Search" criteria in iTunes.
* @name ss.Form_SeachTreeForm
*/
- $('#Form_SearchTreeForm').concrete('ss', function($) {return
- /** @lends ss.Form_SeachTreeForm */
- {
+ $('#Form_SearchTreeForm').concrete('ss', function($) {
+ return/** @lends ss.Form_SeachTreeForm */{
/**
* @type DOMElement
View
@@ -11,9 +11,8 @@
* panel and an edit form.
* @name ss.LeftAndMain
*/
- $('.LeftAndMain').concrete('ss', function($){return
- /** @lends ss.EditMemberProfile */
- {
+ $('.LeftAndMain').concrete('ss', function($){
+ return/** @lends ss.EditMemberProfile */ {
/**
* @type Number
@@ -98,9 +97,8 @@
* Takes care of resizing tabsets within the layout container.
* @name ss.Form_EditForm
*/
- $('#Form_EditForm').concrete('ss',function($){return
- /** @lends ss.Form_EditForm */
- {
+ $('#Form_EditForm').concrete('ss',function($){
+ return/** @lends ss.Form_EditForm */{
/**
* @type String HTML text to show when the form has been deleted.
@@ -249,9 +247,8 @@
* clicked button from a form.onsubmit event.
* @name ss.Form_EditForm.Actions.submit
*/
- $('#Form_EditForm .Actions :submit').concrete('ss', function($){return
- /** @lends ss.Form_EditForm.Actions.submit */
- {
+ $('#Form_EditForm .Actions :submit').concrete('ss', function($){
+ return/** @lends ss.Form_EditForm.Actions.submit */{
onclick: function(e) {
$(this[0].form).ajaxSubmit(this);
return false;
@@ -262,9 +259,8 @@
* @class Container for tree actions like "create", "search", etc.
* @name ss.TreeActions
*/
- $('#TreeActions').concrete('ss', function($){return
- /** @lends ss.TreeActions */
- {
+ $('#TreeActions').concrete('ss', function($){
+ return/** @lends ss.TreeActions */{
/**
* Setup "create", "search", "batch actions" layers above tree.
@@ -284,9 +280,8 @@
* through a modal dialog.
* @name ss.EditMemberProfile
*/
- $('a#EditMemberProfile').concrete('ss', function($){return
- /** @lends ss.EditMemberProfile */
- {
+ $('a#EditMemberProfile').concrete('ss', function($){
+ return/** @lends ss.EditMemberProfile */{
onmatch: function() {
var self = this;

0 comments on commit d5d4d73

Please sign in to comment.