details: /erp/devel/pi/rev/cd7d55a0f4ce
changeset: 12223:cd7d55a0f4ce
user: Martin Taal <martin.taal <at> openbravo.com>
date: Wed May 18 12:44:11 2011 +0200
summary: Restore formatting change
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form-notes.js
| 515 ++++-----
1 files changed, 254 insertions(+), 261 deletions(-)
diffs (truncated from 603 to 300 lines):
diff -r c14a49dbaf09 -r cd7d55a0f4ce
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form-notes.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form-notes.js
Wed May 18 12:36:32 2011 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form-notes.js
Wed May 18 12:44:11 2011 +0200
@@ -16,6 +16,7 @@
* Contributor(s): Valery Lezhebokov.
************************************************************************
*/
+
// = OBNotesItems =
//
// Represents the notes section shown in the bottom of the form.
@@ -23,337 +24,329 @@
//
isc.ClassFactory.defineClass('OBNoteSectionItem', isc.OBSectionItem);
-isc.OBNoteSectionItem.addProperties( {
- // as the name is always the same there should be at most
- // one note section per form
- name : '_notes_',
+isc.OBNoteSectionItem.addProperties({
+ // as the name is always the same there should be at most
+ // one note section per form
+ name : '_notes_',
- overflow : 'hidden',
+ overflow : 'hidden',
- canFocus : true,
+ canFocus : true,
- prompt : OB.I18N.getLabel('OBUIAPP_NotesPrompt'),
+ prompt : OB.I18N.getLabel('OBUIAPP_NotesPrompt'),
- canvasItem : null,
+ canvasItem : null,
- visible : true,
+ visible : true,
- // note formitems don't have an initWidget but an init method
- init : function() {
- // override the one passed in
- this.defaultValue = OB.I18N.getLabel('OBUIAPP_NotesTitle');
+ // note formitems don't have an initWidget but an init method
+ init : function() {
+ // override the one passed in
+ this.defaultValue = OB.I18N.getLabel('OBUIAPP_NotesTitle');
- /* tell the form who we are */
- this.form.noteSection = this;
+ /* tell the form who we are */
+ this.form.noteSection = this;
- this.Super('init', arguments);
-},
+ this.Super('init', arguments);
+ },
-getNotePart : function() {
- if (!this.canvasItem) {
- this.canvasItem = this.form.getField(this.itemIds[0]);
- }
- return this.canvasItem.canvas;
-},
+ getNotePart : function() {
+ if (!this.canvasItem) {
+ this.canvasItem = this.form.getField(this.itemIds[0]);
+ }
+ return this.canvasItem.canvas;
+ },
-setRecordInfo : function(entity, id) {
- this.getNotePart().setRecordInfo(entity, id);
-},
+ setRecordInfo : function(entity, id) {
+ this.getNotePart().setRecordInfo(entity, id);
+ },
-refresh : function() {
- this.getNotePart().refresh();
-},
+ refresh : function() {
+ this.getNotePart().refresh();
+ },
-expandSection: function() {
- this.Super('expandSection',arguments);
- this.form.noteSection.refresh();
-},
+ expandSection: function() {
+ this.Super('expandSection',arguments);
+ this.form.noteSection.refresh();
+ },
-hide: function(){
- this.Super('hide',arguments);
- if (this.canvasItem) {
- // Solves issue #16663: Forcing call to canvas hide.
- // Shouldn't this be invoked by SmartClient
- this.canvasItem.hide();
- }
-}
+ hide: function() {
+ this.Super('hide',arguments);
+ if (this.canvasItem) {
+ // Solves issue #16663: Forcing call to canvas hide.
+ // Shouldn't this be invoked by SmartClient
+ this.canvasItem.hide();
+ }
+ }
});
isc.ClassFactory.defineClass('OBNoteLayout', isc.VLayout);
-isc.OBNoteLayout.addProperties( {
+isc.OBNoteLayout.addProperties({
- entity : null,
+ entity : null,
- recordId : null,
+ recordId : null,
- layoutMargin : 0,
+ layoutMargin : 0,
- membersMargin : 10,
+ membersMargin : 10,
- noteTextAreaItem : null,
+ noteTextAreaItem : null,
- noteDynamicForm : null,
+ noteDynamicForm : null,
- saveNoteButton : null,
+ saveNoteButton : null,
- noteDSId : '090A37D22E61FE94012E621729090048',
+ noteDSId : '090A37D22E61FE94012E621729090048',
- noteListGrid : null,
+ noteListGrid : null,
- /**
- * Saves the note to the DB.
- */
- saveNote : function() {
- var note =
this.noteDynamicForm.getField('noteOBTextAreaItem').getValue();
-
- if (!note) {
- return;
- }
-
- this.noteDynamicForm.validate();
+ /**
+ * Saves the note to the DB.
+ */
+ saveNote : function() {
+ var note = this.noteDynamicForm.getField('noteOBTextAreaItem').getValue();
- var noteDS = this.getNoteDataSource();
+ if (!note) {
+ return;
+ }
- var currentTime = new Date();
+ this.noteDynamicForm.validate();
- noteDS.addData( {
- 'client' :
OB.User.clientId,
- 'organization' :
OB.User.organizationId,
- 'table' :
this.getForm().view.standardProperties.inpTableId,
- 'record' :
this.getForm().view.viewGrid.getSelectedRecord().id,
- 'note' : note
- });
+ var noteDS = this.getNoteDataSource();
- // clean text area
-
this.noteDynamicForm.getItem('noteOBTextAreaItem').clearValue();
- },
+ var currentTime = new Date();
- /**
- * Deletes the note from the DB.
- */
- deleteNote : function( /* note id to delete */id) {
- var noteDS = this.getNoteDataSource();
- noteDS.removeData( {
- 'id' : id
- });
- },
-
+ noteDS.addData({
+ 'client' : OB.User.clientId,
+ 'organization' : OB.User.organizationId,
+ 'table' : this.getForm().view.standardProperties.inpTableId,
+ 'record' : this.getForm().view.viewGrid.getSelectedRecord().id,
+ 'note' : note
+ });
- /**
- * Returns Notes data source.
- */
- getNoteDataSource : function() {
- return
isc.DataSource.getDataSource(this.noteDSId);
- },
+ // clean text area
+ this.noteDynamicForm.getItem('noteOBTextAreaItem').clearValue();
+ },
- /**
- * Initializes the widget.
- */
- initWidget : function() {
- this.Super('initWidget', arguments);
+ /**
+ * Deletes the note from the DB.
+ */
+ deleteNote : function( /* note id to delete */id) {
+ var noteDS = this.getNoteDataSource();
+ noteDS.removeData({
+ 'id' : id
+ });
+ },
- // register note DS
- OB.Datasource.get(this.noteDSId);
+ /**
+ * Returns Notes data source.
+ */
+ getNoteDataSource : function() {
+ return isc.DataSource.getDataSource(this.noteDSId);
+ },
- var hLayout = isc.HLayout.create( {
- width : '50%',
- height : '100%',
- layoutMargin : 0,
- layoutTopMargin : 10,
- membersMargin : 10
- });
- hLayout.setLayoutMargin();
+ /**
+ * Initializes the widget.
+ */
+ initWidget : function() {
+ this.Super('initWidget', arguments);
- this.noteDynamicForm = isc.DynamicForm.create( {
- numCols : 1,
- width : '100%',
- fields : [ {
- name : 'noteOBTextAreaItem',
- type : 'OBTextAreaItem',
- showTitle : false,
- layout : this,
- width : '*',
- validators : [ {
- type : 'required'
- } ]
- }]
- });
+ // register note DS
+ OB.Datasource.get(this.noteDSId);
- this.saveNoteButton = isc.OBFormButton.create( {
- layout : this,
- title :
OB.I18N.getLabel('OBUIAPP_SaveNoteButtonTitle'),
- click : 'this.layout.saveNote()'
- });
+ var hLayout = isc.HLayout.create({
+ width : '50%',
+ height : '100%',
+ layoutMargin : 0,
+ layoutTopMargin : 10,
+ membersMargin : 10
+ });
+ hLayout.setLayoutMargin();
- hLayout.addMember(this.noteDynamicForm);
- hLayout.addMember(this.saveNoteButton);
- // add the grids to the vertical layout
- this.addMember(hLayout);
+ this.noteDynamicForm = isc.DynamicForm.create({
+ numCols : 1,
+ width : '100%',
+ fields : [ {
+ name : 'noteOBTextAreaItem',
+ type : 'OBTextAreaItem',
+ showTitle : false,
+ layout : this,
+ width : '*',
+ validators : [ {
+ type : 'required'
+ } ]
+ }]
+ });
------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its
next-generation tools to help Windows* and Linux* C/C++ and Fortran
developers boost performance applications - including clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits