details: https://code.openbravo.com/erp/devel/pi/rev/0c00996cda5f
changeset: 15633:0c00996cda5f
user: Miguel de Juana <miguel.dejuana <at> openbravo.com>
date: Tue Feb 28 12:43:57 2012 +0100
summary: Fixed issue 16406: Adding modules, modules without URL, 'Visit site'
disappears
diffstat:
src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java | 14 ++++++++------
src/org/openbravo/erpCommon/modules/ModuleBox.srpt | 4 ++--
src/org/openbravo/erpCommon/modules/ModuleBox.xml | 3 ++-
3 files changed, 12 insertions(+), 9 deletions(-)
diffs (76 lines):
diff -r 4e0bf9b7c68e -r 0c00996cda5f
src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java
--- a/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java Tue Feb
28 12:26:47 2012 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java Tue Feb
28 12:43:57 2012 +0100
@@ -11,7 +11,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2008-2011 Openbravo SLU
+ * All portions are Copyright (C) 2008-2012 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -1801,15 +1801,17 @@
icon = (icon == null ? "M" : icon).equals("M") ? "Module" :
icon.equals("T") ? "Template"
: "Pack";
- // If there is no url, we need to hide the 'Visit Site' link and
separator.
- String url = mod.getUrl();
- url = (url == null || url.equals("") ? "HIDDEN" : url);
-
moduleBox.put("name", mod.getName());
moduleBox.put("description", mod.getDescription());
moduleBox.put("type", icon);
moduleBox.put("help", mod.getHelp());
- moduleBox.put("url", getLink(url));
+ // If there is no url, we need to hide the 'Visit Site' link and
separator.
+ if (mod.getUrl() == null || mod.getUrl().equals("")) {
+ moduleBox.put("urlStyle", "none");
+ } else {
+ moduleBox.put("url", getLink(mod.getUrl()));
+ moduleBox.put("urlStyle", "true");
+ }
moduleBox.put("moduleVersionID", mod.getModuleVersionID());
moduleBox.put("commercialStyle", (mod.isIsCommercial() ? "true" :
"none"));
diff -r 4e0bf9b7c68e -r 0c00996cda5f
src/org/openbravo/erpCommon/modules/ModuleBox.srpt
--- a/src/org/openbravo/erpCommon/modules/ModuleBox.srpt Tue Feb 28
12:26:47 2012 +0100
+++ b/src/org/openbravo/erpCommon/modules/ModuleBox.srpt Tue Feb 28
12:43:57 2012 +0100
@@ -12,7 +12,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2008-2011 Openbravo SLU
+ * All portions are Copyright (C) 2008-2012 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -61,7 +61,7 @@
<div class="AddModule_Text_Help" id="help">xxhelp</div>
<div class="AddModule_Options">
<div class="AddModule_Text_Option"><a class="LabelLink_noicon"
id="details" href="#" onclick="viewDetails('xx');return false;">View
Details</a></div>
- <div id="url" class="AddModule_Url_Linkxx">
+ <div id="url" class="AddModule_Url_Linkxx" style="display:xx;">
<div class="AddModule_Text_Option_Separator">|</div>
<div class="AddModule_Text_Option"><a class="LabelLink_noicon"
id="url" href="#" onclick="openLink('xx', '_blank');return false;">Visit
Site</a></div>
</div>
diff -r 4e0bf9b7c68e -r 0c00996cda5f
src/org/openbravo/erpCommon/modules/ModuleBox.xml
--- a/src/org/openbravo/erpCommon/modules/ModuleBox.xml Tue Feb 28 12:26:47
2012 +0100
+++ b/src/org/openbravo/erpCommon/modules/ModuleBox.xml Tue Feb 28 12:43:57
2012 +0100
@@ -12,7 +12,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2008-2010 Openbravo SLU
+ * All portions are Copyright (C) 2008-2012 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -25,6 +25,7 @@
<FIELD id="icon" replace="xx" attribute="class">type</FIELD>
<FIELD id="help">help</FIELD>
<FIELD id="url" attribute="onclick" replace="xx">url</FIELD>
+ <FIELD id="url" attribute="style" replace="xx">urlStyle</FIELD>
<FIELD id="details" attribute="onclick"
replace="xx">moduleVersionID</FIELD>
<FIELD id="buttonInstall" attribute="onclick"
replace="xx">moduleVersionID</FIELD>
<FIELD id="commercial" attribute="style" replace="xx"
default="none">commercialStyle</FIELD>
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits