details: https://code.openbravo.com/erp/devel/pi/rev/2c4a045dc11d changeset: 25305:2c4a045dc11d user: Naroa Iriarte <naroa.iriarte <at> openbravo.com> date: Fri Nov 21 10:53:05 2014 +0100 summary: Fixed issue 27882:Image in "Welcome to Openbravo3" widget is not shown.
When the Production instance is chosen you cannot see the "Production Banner Image" in the "Welcome to Openbravo 3" widget. The problem was that the relative URL to get that image was wrong. The issue has been fixed by changing it in the ob-widget-styles.css. The URL has been changed making it less deeper, from six levels to two levels deep. This has been fixed as this way, instead of changing the URL as the other instance types url(images/purpose/banner-<instance type>.png), because in this way, the system administrator can change the "Production Banner Image" himself. details: https://code.openbravo.com/erp/devel/pi/rev/46e4ef62c015 changeset: 25306:46e4ef62c015 user: Naroa Iriarte <naroa.iriarte <at> openbravo.com> date: Mon Nov 24 08:56:16 2014 +0100 summary: Fixed issue 28169: readOnly and readOnly logic fails in images. In image fields it did not work readOnly property nor readOnly logic. When readOnly was chosen in the image field, it was possible to delete or upload it. When readOnly logic was active it was possible to do both things too. The problem was in the ob-formitem-image.js. For fixing the first problem I have changed the word "readOnly" for "disabled" in a condition, because the logic was not taken well before. Now, when the checkbox readOnly is chosen, it is not possible to delete nor upload an image, as expected. For fixing the second problem I have overwritten the "setDisbaled" function in this subclass. Now, when an obect is set as disabled, the delete and upload buttons will be hidden, so, when an image is set as readOnly whit a readOnly logic condition, now those buttons are not visible. diffstat: modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-image.js | 18 ++++++++- modules/org.openbravo.client.myob/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.myob/ob-widget-styles.css | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diffs (47 lines): diff -r 2bfc159d026f -r 46e4ef62c015 modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-image.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-image.js Fri Nov 21 09:54:43 2014 -0500 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-image.js Mon Nov 24 08:56:16 2014 +0100 @@ -269,8 +269,8 @@ }); } //Buttons will not be shown if the form is readonly - this.canvas.deleteButton.updateState(newValue && (this.form && !this.form.readOnly) && !this.readOnly); - this.canvas.selectorButton.updateState((this.form && !this.form.readOnly) && !this.readOnly); + this.canvas.deleteButton.updateState(newValue && (this.form && !this.form.readOnly) && !this.disabled); + this.canvas.selectorButton.updateState((this.form && !this.form.readOnly) && !this.disabled); return this.Super('setValue', arguments); }, refreshImage: function (imageId) { @@ -281,6 +281,20 @@ } this.setValue(imageId); this.form.itemChangeActions(); + }, + //This function has been overwritten because this class needs to do specific things if the object is + //disabled. It is necessary to hide the delete and selector buttons when the status is disabled + //and to show them when enabled. + + setDisabled: function (disabled) { + if (disabled) { + this.canvas.deleteButton.hide(); + this.canvas.selectorButton.hide(); + } else { + this.canvas.deleteButton.show(); + this.canvas.selectorButton.show(); + } + this.Super('setDisabled', arguments); } }); diff -r 2bfc159d026f -r 46e4ef62c015 modules/org.openbravo.client.myob/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.myob/ob-widget-styles.css --- a/modules/org.openbravo.client.myob/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.myob/ob-widget-styles.css Fri Nov 21 09:54:43 2014 -0500 +++ b/modules/org.openbravo.client.myob/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.myob/ob-widget-styles.css Mon Nov 24 08:56:16 2014 +0100 @@ -235,7 +235,7 @@ font-size: 16px; background-repeat: no-repeat; background-position: center 6px; - background-image: url(../../../../../../utility/ShowImageLogo?logo=banner-production); + background-image: url(../../utility/ShowImageLogo?logo=banner-production); } .OBWidgetAboutLabels { ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk _______________________________________________ Openbravo-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbravo-commits
