svn commit: r1788263 - in /ofbiz/ofbiz-framework/trunk: applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/ applications/order/src/main/java/org/apache/ofbiz/order/order/ applic

2017-03-23 Thread jleroux
Author: jleroux
Date: Thu Mar 23 15:09:23 2017
New Revision: 1788263

URL: http://svn.apache.org/viewvc?rev=1788263=rev
Log:
No functional change, as suggested by Jacopo on dev ML referring to r1788065 

<>

I used this suggestion on all locations it made sense. In few places it was
better to let it as is; separating would rather make the code a bit less 
readable.

Modified:

ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/PaymentGatewayServices.java

ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java

ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppinglist/ShoppingListServices.java

ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductSearchSession.java

ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/shipment/ShipmentServices.java

ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataServices.java

Modified: 
ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/PaymentGatewayServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/PaymentGatewayServices.java?rev=1788263=1788262=1788263=diff
==
--- 
ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/PaymentGatewayServices.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/PaymentGatewayServices.java
 Thu Mar 23 15:09:23 2017
@@ -2687,14 +2687,13 @@ public class PaymentGatewayServices {
 Delegator delegator = dctx.getDelegator();
 LocalDispatcher dispatcher = dctx.getDispatcher();
 GenericValue userLogin = (GenericValue) context.get("userLogin");
-
-try (EntityListIterator eli = EntityQuery.use(delegator)
+EntityQuery eq = EntityQuery.use(delegator)
 .from("OrderPaymentPreference")
 .where(EntityCondition.makeCondition("statusId", 
EntityOperator.EQUALS, "PAYMENT_NOT_AUTH"),
-EntityCondition.makeCondition("processAttempt", 
EntityOperator.GREATER_THAN, Long.valueOf(0)))
-.orderBy("orderId")
-.queryIterator()) {
-
+
EntityCondition.makeCondition("processAttempt",EntityOperator.GREATER_THAN, 
Long.valueOf(0)))
+.orderBy("orderId");
+
+try (EntityListIterator eli = eq.queryIterator()) {
 List processList = new LinkedList();
 if (eli != null) {
 Debug.logInfo("Processing failed order re-auth(s)", module);
@@ -2730,13 +2729,13 @@ public class PaymentGatewayServices {
 calcCal.add(Calendar.WEEK_OF_YEAR, -1);
 Timestamp oneWeekAgo = new Timestamp(calcCal.getTimeInMillis());
 
-
-try (EntityListIterator eli = EntityQuery.use(delegator)
+EntityQuery eq = EntityQuery.use(delegator)
 .from("OrderPaymentPreference")
 .where(EntityCondition.makeCondition("needsNsfRetry", 
EntityOperator.EQUALS, "Y"), 
 EntityCondition.makeCondition(ModelEntity.STAMP_FIELD, 
EntityOperator.LESS_THAN_EQUAL_TO, oneWeekAgo))
-.orderBy("orderId").queryIterator()) {
-
+.orderBy("orderId");
+
+try (EntityListIterator eli = eq.queryIterator()) {
 List processList = new LinkedList();
 if (eli != null) {
 Debug.logInfo("Processing failed order re-auth(s)", module);

Modified: 
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java?rev=1788263=1788262=1788263=diff
==
--- 
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
 Thu Mar 23 15:09:23 2017
@@ -1503,12 +1503,7 @@ public class OrderServices {
 cond = EntityCondition.makeCondition(exprs, EntityOperator.OR);
 }
 
-try (EntityListIterator eli = EntityQuery.use(delegator)
-.select("orderId")
-.from("OrderHeader")
-.where(cond)
-.queryIterator()) {
-
+try (EntityListIterator eli = 

svn commit: r1788256 [1/3] - in /ofbiz/ofbiz-framework/trunk/framework: common/groovyScripts/ common/servicedef/ common/webcommon/WEB-INF/ common/widget/ images/webapp/images/

2017-03-23 Thread jleroux
Author: jleroux
Date: Thu Mar 23 14:37:47 2017
New Revision: 1788256

URL: http://svn.apache.org/viewvc?rev=1788256=rev
Log:
Implemented: Make sure the local date time uses the time zone from the 
local browser.
(OFBIZ-9264)

If a time zone is already set for a user, this new feature won't override it.
The user still can set it's own time zone, but if it isn't set, 
this avoids the time zone set to the default of the server.

jelroux: the momentjs license is MIT

Thanks: Francis Douet

Added:

ofbiz/ofbiz-framework/trunk/framework/common/groovyScripts/SetLocaleFromBrowser.groovy
   (with props)

ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/moment-timezone-with-data.min.js
   (with props)

ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/moment-with-locales.min.js
   (with props)
ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/setUserLocale.js 
  (with props)
Modified:
ofbiz/ofbiz-framework/trunk/framework/common/servicedef/services.xml

ofbiz/ofbiz-framework/trunk/framework/common/webcommon/WEB-INF/common-controller.xml
ofbiz/ofbiz-framework/trunk/framework/common/widget/CommonScreens.xml

Added: 
ofbiz/ofbiz-framework/trunk/framework/common/groovyScripts/SetLocaleFromBrowser.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/groovyScripts/SetLocaleFromBrowser.groovy?rev=1788256=auto
==
--- 
ofbiz/ofbiz-framework/trunk/framework/common/groovyScripts/SetLocaleFromBrowser.groovy
 (added)
+++ 
ofbiz/ofbiz-framework/trunk/framework/common/groovyScripts/SetLocaleFromBrowser.groovy
 Thu Mar 23 14:37:47 2017
@@ -0,0 +1,34 @@
+/***
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ 
***/
+
+import org.apache.ofbiz.entity.util.EntityQuery
+import org.apache.ofbiz.service.GenericServiceException
+import org.apache.ofbiz.service.ServiceUtil
+
+public Map setLocaleFromBrowser() {
+Map results = ServiceUtil.returnSuccess()
+userLogin = 
EntityQuery.use(delegator).from("UserLogin").where("userLoginId", 
parameters.userLogin.userLoginId).queryFirst();
+if (userLogin) {
+if (!userLogin.lastTimeZone || userLogin.lastTimeZone.equals("null")) {
+userLogin.lastTimeZone = parameters.localeName
+userLogin.store()
+}
+}
+return results
+}

Propchange: 
ofbiz/ofbiz-framework/trunk/framework/common/groovyScripts/SetLocaleFromBrowser.groovy
--
svn:eol-style = native

Propchange: 
ofbiz/ofbiz-framework/trunk/framework/common/groovyScripts/SetLocaleFromBrowser.groovy
--
svn:keywords = Date Rev Author URL Id

Propchange: 
ofbiz/ofbiz-framework/trunk/framework/common/groovyScripts/SetLocaleFromBrowser.groovy
--
svn:mime-type = text/plain

Modified: ofbiz/ofbiz-framework/trunk/framework/common/servicedef/services.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/servicedef/services.xml?rev=1788256=1788255=1788256=diff
==
--- ofbiz/ofbiz-framework/trunk/framework/common/servicedef/services.xml 
(original)
+++ ofbiz/ofbiz-framework/trunk/framework/common/servicedef/services.xml Thu 
Mar 23 14:37:47 2017
@@ -940,4 +940,9 @@ under the License.
 Delete Uom Record
 
 
+
+
+Set locale from browser.
+
+
 

Modified: 
ofbiz/ofbiz-framework/trunk/framework/common/webcommon/WEB-INF/common-controller.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/webcommon/WEB-INF/common-controller.xml?rev=1788256=1788255=1788256=diff
==
--- 
ofbiz/ofbiz-framework/trunk/framework/common/webcommon/WEB-INF/common-controller.xml
 

svn commit: r1788256 [3/3] - in /ofbiz/ofbiz-framework/trunk/framework: common/groovyScripts/ common/servicedef/ common/webcommon/WEB-INF/ common/widget/ images/webapp/images/

2017-03-23 Thread jleroux
Propchange: 
ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/moment-with-locales.min.js
--
svn:eol-style = native

Propchange: 
ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/moment-with-locales.min.js
--
svn:keywords = Date Rev Author URL Id

Propchange: 
ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/moment-with-locales.min.js
--
svn:mime-type = text/plain

Added: 
ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/setUserLocale.js
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/setUserLocale.js?rev=1788256=auto
==
--- ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/setUserLocale.js 
(added)
+++ ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/setUserLocale.js 
Thu Mar 23 14:37:47 2017
@@ -0,0 +1,31 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+var timezone = moment.tz.guess();
+$.ajax({
+url: "setLocaleFromBrowser",
+type: "POST",
+async: false,
+data: "localeName=" + timezone,
+error: function(error) {
+if (error != "") {
+alert("Error while setting user locale: " + error);
+}
+}
+});

Propchange: 
ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/setUserLocale.js
--
svn:eol-style = native

Propchange: 
ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/setUserLocale.js
--
svn:keywords = Date Rev Author URL Id

Propchange: 
ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/setUserLocale.js
--
svn:mime-type = text/plain




svn commit: r1788256 [2/3] - in /ofbiz/ofbiz-framework/trunk/framework: common/groovyScripts/ common/servicedef/ common/webcommon/WEB-INF/ common/widget/ images/webapp/images/

2017-03-23 Thread jleroux
Added: 
ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/moment-with-locales.min.js
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/moment-with-locales.min.js?rev=1788256=auto
==
--- 
ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/moment-with-locales.min.js
 (added)
+++ 
ofbiz/ofbiz-framework/trunk/framework/images/webapp/images/moment-with-locales.min.js
 Thu Mar 23 14:37:47 2017
@@ -0,0 +1,1216 @@
+!function(a,b){"object"==typeof exports&&"undefined"!=typeof 
module?module.exports=b():"function"==typeof 
define&?define(b):a.moment=b()}(this,function(){"use 
strict";function a(){return le.apply(null,arguments)}
+// This is done to register the method called with moment()
+// without creating circular dependencies.
+function b(a){le=a}function c(a){return a instanceof Array||"[object 
Array]"===Object.prototype.toString.call(a)}function d(a){
+// IE8 will treat undefined and null as object if it wasn't for
+// input != null
+return null!=a&&"[object Object]"===Object.prototype.toString.call(a)}function 
e(a){var b;for(b in a)
+// even if its not own property I'd still call it non-empty
+return!1;return!0}function f(a){return"number"==typeof a||"[object 
Number]"===Object.prototype.toString.call(a)}function g(a){return a instanceof 
Date||"[object Date]"===Object.prototype.toString.call(a)}function h(a,b){var 
c,d=[];for(c=0;c0)for(c
 in oe)d=oe[c],e=b[d],p(e)||(a[d]=e);return a}
+// Moment prototype object
+function r(b){q(this,b),this._d=new 
Date(null!=b._d?b._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),
+// Prevent infinite loop in case updateOffset creates new moment
+// objects.
+pe===!1&&(pe=!0,a.updateOffset(this),pe=!1)}function s(a){return a instanceof 
r||null!=a&!=a._isAMomentObject}function t(a){return 
a<0?Math.ceil(a)||0:Math.floor(a)}function u(a){var b=+a,c=0;return 
0!==b&(b)&&(c=t(b)),c}
+// compare two arrays, return the number of differences
+function v(a,b,c){var 
d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;d

svn commit: r1788253 - /ofbiz/ofbiz-plugins/trunk/birt/widget/birt/BirtMenus.xml

2017-03-23 Thread jleroux
Author: jleroux
Date: Thu Mar 23 14:16:53 2017
New Revision: 1788253

URL: http://svn.apache.org/viewvc?rev=1788253=rev
Log:
No functional changes, fixes a typo in a comment

Modified:
ofbiz/ofbiz-plugins/trunk/birt/widget/birt/BirtMenus.xml

Modified: ofbiz/ofbiz-plugins/trunk/birt/widget/birt/BirtMenus.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/birt/widget/birt/BirtMenus.xml?rev=1788253=1788252=1788253=diff
==
--- ofbiz/ofbiz-plugins/trunk/birt/widget/birt/BirtMenus.xml (original)
+++ ofbiz/ofbiz-plugins/trunk/birt/widget/birt/BirtMenus.xml Thu Mar 23 
14:16:53 2017
@@ -42,7 +42,7 @@ under the License.
 
 
 
-

svn commit: r1788202 - /ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/content/ContentEvents.java

2017-03-23 Thread jleroux
Author: jleroux
Date: Thu Mar 23 09:16:38 2017
New Revision: 1788202

URL: http://svn.apache.org/viewvc?rev=1788202=rev
Log:
No functional change, removes a TODO I put there for later

Modified:

ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/content/ContentEvents.java

Modified: 
ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/content/ContentEvents.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/content/ContentEvents.java?rev=1788202=1788201=1788202=diff
==
--- 
ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/content/ContentEvents.java
 (original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/content/ContentEvents.java
 Thu Mar 23 09:16:38 2017
@@ -73,7 +73,6 @@ public class ContentEvents {
 int numConts = 0;
 int errConts = 0;
 
-// TODO refactor I don't like much how this is written but it's not 
simple to refactor
 boolean beganTx = false;
 try {
 // begin the transaction




svn commit: r1788192 - in /ofbiz/branches/ofbiz-new-website: images/portfolio/logo_ilscipio.jpg service-providers.html template/page/service-providers.tpl.php

2017-03-23 Thread sharan
Author: sharan
Date: Thu Mar 23 08:26:54 2017
New Revision: 1788192

URL: http://svn.apache.org/viewvc?rev=1788192=rev
Log:
Improved: Added Ilscipio logo to service providers page

Added:
ofbiz/branches/ofbiz-new-website/images/portfolio/logo_ilscipio.jpg   (with 
props)
Modified:
ofbiz/branches/ofbiz-new-website/service-providers.html
ofbiz/branches/ofbiz-new-website/template/page/service-providers.tpl.php

Added: ofbiz/branches/ofbiz-new-website/images/portfolio/logo_ilscipio.jpg
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/images/portfolio/logo_ilscipio.jpg?rev=1788192=auto
==
Binary file - no diff available.

Propchange: ofbiz/branches/ofbiz-new-website/images/portfolio/logo_ilscipio.jpg
--
svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/branches/ofbiz-new-website/images/portfolio/logo_ilscipio.jpg
--
svn:mime-type = image/jpeg

Modified: ofbiz/branches/ofbiz-new-website/service-providers.html
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/service-providers.html?rev=1788192=1788191=1788192=diff
==
--- ofbiz/branches/ofbiz-new-website/service-providers.html (original)
+++ ofbiz/branches/ofbiz-new-website/service-providers.html Thu Mar 23 08:26:54 
2017
@@ -154,13 +154,22 @@
 Lorem ipsum dolor sit amet, 
consectetur adipiscing elit. Morbi vulputate nunc ut tellus sollicitudin 
placerat. Sed ac consectetur leo. Pellentesque habitant morbi tristique 
senectus et netus...  read more
   
 
- 
- 
+ 
+ 
   
   
   
 Lorem ipsum dolor sit amet
-Lorem ipsum dolor sit amet, 
consectetur adipiscing elit. Morbi vulputate nunc ut tellus sollicitudin 
placerat. Sed ac consectetur leo. Pellentesque habitant morbi tristique 
senectus et netus...  read more
+Lorem ipsum dolorsit amet, 
consectetur adipiscing elit. Morbi vulputate nunc ut tellus sollicitudin 
placerat. Sed ac consectetur leo. Pellentesque habitant morbi tristique 
senectus et netus...  read more
+  
+
+ 
+ 
+  
+  
+  
+Lorem ipsum dolor sit amet
+Lorem ipsum dolorsit amet, 
consectetur adipiscing elit. Morbi vulputate nunc ut tellus sollicitudin 
placerat. Sed ac consectetur leo. Pellentesque habitant morbi tristique 
senectus et netus...  read more
   
 
  
@@ -172,26 +181,26 @@
 Lorem ipsum dolor sit amet, 
consectetur adipiscing elit. Morbi vulputate nunc ut tellus sollicitudin 
placerat. Sed ac consectetur leo. Pellentesque habitant morbi tristique 
senectus et netus...  read more
   
 
- 
- 
+ 
+   
   
   
   
 Lorem ipsum dolor sit amet
-Lorem ipsum dolorsit amet, 
consectetur adipiscing elit. Morbi vulputate nunc ut tellus sollicitudin 
placerat. Sed ac consectetur leo. Pellentesque habitant morbi tristique 
senectus et netus...  read more
+ Lorem ipsum dolorsit amet, 
consectetur adipiscing elit. Morbi vulputate nunc ut tellus sollicitudin 
placerat. Sed ac consectetur leo. Pellentesque habitant morbi tristique 
senectus et netus...  read more 
   
 
- 
+ 
  
   
   
   
 Lorem ipsum dolor sit amet
-Lorem ipsum dolorsit amet, 
consectetur adipiscing elit. Morbi vulputate nunc ut tellus sollicitudin 
placerat. Sed ac consectetur leo. Pellentesque habitant morbi tristique 
senectus et netus...  read more
+Lorem ipsum dolor sit amet, 
consectetur adipiscing elit. Morbi vulputate nunc ut tellus sollicitudin 
placerat. Sed ac consectetur leo. Pellentesque habitant morbi tristique 
senectus et netus...  read more
   
 
- 
- 
+ 
+ 
   
   
   
@@ -209,7 +218,7 @@
   
 
  
- 
+ 
   
   
   
@@ -218,7 +227,7 @@
   
 
  
- 
+ 
   
   
   

Modified: 
ofbiz/branches/ofbiz-new-website/template/page/service-providers.tpl.php
URL: