details:   https://code.openbravo.com/erp/devel/pi/rev/90c4dc228ce9
changeset: 21085:90c4dc228ce9
user:      David Baz Fayos <david.baz <at> openbravo.com>
date:      Thu Sep 05 11:16:43 2013 +0200
summary:   Related to issue 19728: Do more JS code formatting

diffstat:

 
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/test/DataSource.js
      |   42 +-
 
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/test/ob_grid_widgets.js
 |  218 +++---
 
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/test/ob_widgets.js
      |  333 ++++-----
 3 files changed, 289 insertions(+), 304 deletions(-)

diffs (truncated from 1071 to 300 lines):

diff -r e22dd1199630 -r 90c4dc228ce9 
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/test/DataSource.js
--- 
a/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/test/DataSource.js
    Thu Sep 05 12:28:10 2013 +0530
+++ 
b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/test/DataSource.js
    Thu Sep 05 11:16:43 2013 +0200
@@ -4,15 +4,15 @@
  * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
  * Version 1.1  with a permitted attribution clause; you may not  use this
  * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
+ * the License at http://www.openbravo.com/legal/license.html
  * Software distributed under the License  is  distributed  on  an "AS IS"
  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2009-2010 Openbravo SLU 
- * All Rights Reserved. 
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2009-2010 Openbravo SLU
+ * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
  */
@@ -20,9 +20,9 @@
 isc.DataSource.addClassMethods({
 
   // locating dataSources
-  dataSourceBaseURL : "../../datasources/",
+  dataSourceBaseURL: "../../datasources/",
 
-  get : function (name, callback, context, schemaType) {
+  get: function (name, callback, context, schemaType) {
     var ds = this.getDataSource(name, callback, context, schemaType);
     if (!ds) {
       this.logWarn("DS IS NOT SET");
@@ -33,26 +33,26 @@
 
   // loadSchema - attempt to load a remote dataSource schema from the server.
   // This is supported as part of the SmartClient server functionality
-  loadSchema : function (name, callback, context) {
+  loadSchema: function (name, callback, context) {
     this.logWarn("CALLING SERVER '" + name + "' from " + 
this.dataSourceBaseURL + name);
 
     isc.RPCManager.sendRequest({
-      evalResult : true,
-      useSimpleHttp : true,
-      httpMethod : "GET",
-      actionURL : this.dataSourceBaseURL + name,
-      callback : this._loadSchemaComplete,
-      clientContext : {
-        dataSource : name,
-        callback : callback,
-        context : context
+      evalResult: true,
+      useSimpleHttp: true,
+      httpMethod: "GET",
+      actionURL: this.dataSourceBaseURL + name,
+      callback: this._loadSchemaComplete,
+      clientContext: {
+        dataSource: name,
+        callback: callback,
+        context: context
       }
     });
 
     return null;
   },
 
-  _loadSchemaComplete : function (rpcResponse, data, rpcRequest) {
+  _loadSchemaComplete: function (rpcResponse, data, rpcRequest) {
     this.logWarn("LOAD SCHEMA COMPLETE");
     var clientContext = rpcResponse.clientContext;
     var name = clientContext.dataSource;
@@ -60,9 +60,9 @@
     var context = clientContext.context;
     // Now that the dataSource is loaded, we can leverage the
     // DataSource.getDataSource()
-      // method to make the callback.
+    // method to make the callback.
     if (callback) {
-      context.fireCallback(callback, "ds", [ data ], context);
+      context.fireCallback(callback, "ds", [data], context);
     }
   }
 });
\ No newline at end of file
diff -r e22dd1199630 -r 90c4dc228ce9 
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/test/ob_grid_widgets.js
--- 
a/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/test/ob_grid_widgets.js
       Thu Sep 05 12:28:10 2013 +0530
+++ 
b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/test/ob_grid_widgets.js
       Thu Sep 05 11:16:43 2013 +0200
@@ -4,18 +4,18 @@
  * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
  * Version 1.1  with a permitted attribution clause; you may not  use this
  * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
+ * the License at http://www.openbravo.com/legal/license.html
  * Software distributed under the License  is  distributed  on  an "AS IS"
  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2010 Openbravo SLU 
- * All Rights Reserved. 
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2010 Openbravo SLU
+ * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
-*/
+ */
 
 /**
  * Contains widgets related to Grids
@@ -28,146 +28,137 @@
 isc.OBListGrid.addProperties({
 
   // Override initWidget to populate the editor with a resizeable ListGrid and 
editor pane
-  initWidget : function () {
+  initWidget: function () {
 
     // Always call the superclass implementation when overriding initWidget
     this.Super("initWidget", arguments);
 
 
     this.newButton = isc.IButton.create({
-      icon : "Main/ToolBar/iconNew.png",
-      autoDraw : false,
-      layoutAlign : "left",
-      title : 'New',
-      widget : this,
-      click : function () {
+      icon: "Main/ToolBar/iconNew.png",
+      autoDraw: false,
+      layoutAlign: "left",
+      title: 'New',
+      widget: this,
+      click: function () {
         this.widget.newButtonAction();
       }
     });
 
     this.saveButton = isc.IButton.create({
       // have the saveButton be initially disabled - enable when a record is 
selected
-      icon : "Main/ToolBar/iconSave.png",
-      disabled : false,
-      autoDraw : false,
-      layoutAlign : "left",
-      title : "Save",
-      widget : this,
-      click : function () {
+      icon: "Main/ToolBar/iconSave.png",
+      disabled: false,
+      autoDraw: false,
+      layoutAlign: "left",
+      title: "Save",
+      widget: this,
+      click: function () {
         this.widget.saveButtonAction();
       }
     });
 
     this.copyButton = isc.IButton.create({
-      icon : "Main/ToolBar/iconOrganzieMenu.png",
-      autoDraw : false,
-      layoutAlign : "left",
-      title : 'Copy',
-      grid : this.grid,
-      widget : this,
-      click : function () {
+      icon: "Main/ToolBar/iconOrganzieMenu.png",
+      autoDraw: false,
+      layoutAlign: "left",
+      title: 'Copy',
+      grid: this.grid,
+      widget: this,
+      click: function () {
         this.widget.copyButtonAction();
       }
     });
 
     this.deleteButton = isc.IButton.create({
-      icon : "Main/ToolBar/iconErase.png",
-      autoDraw : false,
-      layoutAlign : "left",
-      title : 'Delete',
-      grid : this.grid,
-      widget : this,
-      click : function () {
+      icon: "Main/ToolBar/iconErase.png",
+      autoDraw: false,
+      layoutAlign: "left",
+      title: 'Delete',
+      grid: this.grid,
+      widget: this,
+      click: function () {
         this.widget.deleteButtonAction();
       }
     });
 
     this.previousButton = isc.IButton.create({
-      icon : "Main/ToolBar/iconPrevious.png",
-      autoDraw : false,
-      layoutAlign : "left",
-      title : 'Previous',
-      grid : this.grid,
-      widget : this,
-      click : function () {
+      icon: "Main/ToolBar/iconPrevious.png",
+      autoDraw: false,
+      layoutAlign: "left",
+      title: 'Previous',
+      grid: this.grid,
+      widget: this,
+      click: function () {
         this.widget.previousButtonAction();
       }
     });
 
     this.nextButton = isc.IButton.create({
-      icon : "Main/ToolBar/iconNext.png",
-      autoDraw : false,
-      layoutAlign : "left",
-      title : 'Next',
-      grid : this.grid,
-      widget : this,
-      click : function () {
+      icon: "Main/ToolBar/iconNext.png",
+      autoDraw: false,
+      layoutAlign: "left",
+      title: 'Next',
+      grid: this.grid,
+      widget: this,
+      click: function () {
         this.widget.nextButtonAction();
       }
     });
 
 
     this.grid = isc.ListGrid.create({
-      advancedListGrid : this,
-      form : this.form,
-      saveButton : this.saveButton,
-      autoDraw : false,
-      showResizeBar : true,
-      showFilterEditor : this.showFilterEditor,
-      filterOnKeypress : true,
-      dataSource : this.dataSource,
-      data : this.data,
-      fields : this.fields,
-      //autoFetchData : true,
-      canEdit : true,
+      advancedListGrid: this,
+      form: this.form,
+      saveButton: this.saveButton,
+      autoDraw: false,
+      showResizeBar: true,
+      showFilterEditor: this.showFilterEditor,
+      filterOnKeypress: true,
+      dataSource: this.dataSource,
+      data: this.data,
+      fields: this.fields,
+      //autoFetchData: true,
+      canEdit: true,
 
       canRemoveRecords: this.canRemoveRecords,
-      // canEdit : this.canEdit, FIXME:  JSLInt Duplicate member 'canEdit'
-      confirmDiscardEdits : this.confirmDiscardEdits,
-      modalEditing : this.modalEditing,
-      minFieldWidth : this.minFieldWidth,
-      wrapCells : this.wrapCells,
+      // canEdit: this.canEdit, FIXME:  JSLInt Duplicate member 'canEdit'
+      confirmDiscardEdits: this.confirmDiscardEdits,
+      modalEditing: this.modalEditing,
+      minFieldWidth: this.minFieldWidth,
+      wrapCells: this.wrapCells,
 
-      dataPageSize : this.dataPageSize,
-      // showResizeBar : this.showResizeBar, FIXME: JSLint Duplicate member 
'showResizeBar'
-      recordClick : this.recordClick,
-      canFreezeFields : this.canFreezeFields,
-      canAddFormulaFields : this.canAddFormulaFields,
-      canAddSummaryFields : this.canAddSummaryFields,
-      autoFetchData : this.autoFetchGridData, //With different param name to 
avoid unexpected crash
-      alternateRecordStyles : this.alternateRecordStyles/*,
-
-      recordClick: function (viewer, record, rowNum, field, fieldNum, value, 
rawValue) {
-        //alert(rowNum);
-        this.saveButton.enable();
-      },
-      rowClick : function (record, recordNum, fieldNum) {
-
-      }*/
+      dataPageSize: this.dataPageSize,
+      // showResizeBar: this.showResizeBar, FIXME: JSLint Duplicate member 
'showResizeBar'
+      recordClick: this.recordClick,
+      canFreezeFields: this.canFreezeFields,

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to