[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/cmng-psp1-CHANNELMGR-699] CHANNELMGR-699: add more tes

2016-05-30 Thread Mark Lenser
Mark Lenser pushed to branch feature/cmng-psp1-CHANNELMGR-699 at cms-community 
/ hippo-addon-channel-manager


Commits:
174e26e3 by Mark at 2016-05-30T18:09:37+02:00
CHANNELMGR-699: add more tes

- - - - -


1 changed file:

- frontend-ng/src/angularjs/channel/menu/editor.spec.js


Changes:

=
frontend-ng/src/angularjs/channel/menu/editor.spec.js
=
--- a/frontend-ng/src/angularjs/channel/menu/editor.spec.js
+++ b/frontend-ng/src/angularjs/channel/menu/editor.spec.js
@@ -28,13 +28,14 @@ describe('MenuEditor', () => {
   let DialogService;
   let FeedbackService;
   let HippoIframeService;
+  let FormStateService;
   let menu;
   let MenuEditorCtrl;
 
   beforeEach(() => {
 module('hippo-cm');
 
-inject((_$q_, _$rootScope_, _$compile_, _SiteMenuService_, 
_DialogService_, _FeedbackService_, _HippoIframeService_) => {
+inject((_$q_, _$rootScope_, _$compile_, _SiteMenuService_, 
_DialogService_, _FeedbackService_, _HippoIframeService_, _FormStateService_) 
=> {
   $q = _$q_;
   $rootScope = _$rootScope_;
   $compile = _$compile_;
@@ -42,6 +43,7 @@ describe('MenuEditor', () => {
   DialogService = _DialogService_;
   FeedbackService = _FeedbackService_;
   HippoIframeService = _HippoIframeService_;
+  FormStateService = _FormStateService_;
 });
 
 menu = { items: [] };
@@ -82,7 +84,7 @@ describe('MenuEditor', () => {
 expect($scope.onDone).toHaveBeenCalled();
   });
 
-  fdescribe('MenuEditorCtrl', () => {
+  describe('MenuEditorCtrl', () => {
 beforeEach(() => {
   MenuEditorCtrl = compileDirectiveAndGetController();
   MenuEditorCtrl.editingItem = {
@@ -111,6 +113,60 @@ describe('MenuEditor', () => {
   });
 });
 
+describe('addItem', () => {
+  it('should add an item', () => {
+spyOn(SiteMenuService, 'getMenu').and.callFake(() => {
+  const deferred = $q.defer();
+  deferred.resolve();
+  return deferred.promise;
+});
+spyOn(SiteMenuService, 'createEditableMenuItem').and.callFake(() => {
+  const deferred = $q.defer();
+  deferred.resolve({
+id: 15,
+  });
+  return deferred.promise;
+});
+spyOn(FormStateService, 'setValid');
+spyOn(MenuEditorCtrl, '_startEditingItem');
+
+MenuEditorCtrl.menuUuid = 33;
+MenuEditorCtrl.editingItem = {
+  id: 12,
+};
+MenuEditorCtrl.addItem();
+expect(SiteMenuService.getMenu).toHaveBeenCalledWith(33);
+$rootScope.$apply();
+expect(SiteMenuService.createEditableMenuItem).toHaveBeenCalled();
+$rootScope.$apply();
+expect(FormStateService.setValid).toHaveBeenCalledWith(true);
+expect(MenuEditorCtrl.isSaving.newItem).toBe(false);
+expect(MenuEditorCtrl._startEditingItem).toHaveBeenCalledWith({
+  id: 15,
+});
+  });
+  it('should fail when adding an item', () => {
+spyOn(SiteMenuService, 'getMenu').and.callFake(() => {
+  const deferred = $q.defer();
+  deferred.reject({
+data: 'bad!',
+  });
+  return deferred.promise;
+});
+spyOn(MenuEditorCtrl, 'onError');
+
+MenuEditorCtrl.menuUuid = 77;
+
+MenuEditorCtrl.addItem();
+expect(SiteMenuService.getMenu).toHaveBeenCalledWith(77);
+$rootScope.$apply();
+expect(MenuEditorCtrl.onError).toHaveBeenCalledWith({
+  key: 'ERROR_MENU_CREATE_FAILED',
+  params: 'bad!',
+});
+  });
+});
+
 describe('toggleEditState', () => {
   it('calls the appropriate function after checking if an item is already 
being edited', () => {
 spyOn(SiteMenuService, 'getEditableMenuItem').and.callFake(() => {



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/174e26e3f6743206875c46c9d8b628126ac30bbc
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-cms-translations] Pushed new branch feature/chinese-translation

2016-05-30 Thread Oscar Scholten
Oscar Scholten pushed new branch feature/chinese-translation at cms-community / 
hippo-cms-translations
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-site-toolkit] Deleted branch bugfix/HSTTWO-3677

2016-05-30 Thread Ard Schrijvers
Ard Schrijvers deleted branch bugfix/HSTTWO-3677 at cms-community / 
hippo-site-toolkit
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-site-toolkit][release/3.2] HSTTWO-3677 [Backport 3.2] SearchInputParsingUtils should not allow apostrophe ’

2016-05-30 Thread Ard Schrijvers
Ard Schrijvers pushed to branch release/3.2 at cms-community / 
hippo-site-toolkit


Commits:
3a854776 by Ard Schrijvers at 2016-05-30T15:52:01+02:00
HSTTWO-3677 [Backport 3.2] SearchInputParsingUtils should not allow apostrophe ’

Apply fix as suggested by Saimir (great catch!). First foldToASCIIReplacer and 
then invoke
removeInvalidAndEscapeChars, otherwise apostrophe variants are not removed but 
only '

(cherry picked from commit 4411f8a6b29d056aca8fc1f240aca0205f21310a)

- - - - -


2 changed files:

- content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
- 
content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java


Changes:

=
content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
=
--- 
a/content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
+++ 
b/content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
@@ -1,7 +1,7 @@
 package org.hippoecm.hst.util;
 
 /**
- * Copyright 2011-2015 Hippo B.V. (http://www.onehippo.com)
+ * Copyright 2011-2016 Hippo B.V. (http://www.onehippo.com)
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -63,12 +63,12 @@ public final class SearchInputParsingUtils {
 if (input == null) {
 return null;
 }
-String parsed = compressWhitespace(input);
+String parsed = EncodingUtils.foldToASCIIReplacer(input);
+parsed = compressWhitespace(parsed);
 parsed = removeInvalidAndEscapeChars(parsed, 
allowSingleNonLeadingWildCardPerTerm, ignore);
 parsed = removeLeadingOrTrailingOrOperator(parsed);
 parsed = rewriteNotOperatorsToMinus(parsed);
 parsed = 
removeLeadingAndTrailingAndReplaceWithSpaceAndOperators(parsed);
-parsed = EncodingUtils.foldToASCIIReplacer(parsed);
 log.debug("Rewrote input '{}' to '{}'", input, parsed);
 return parsed;
 }


=
content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java
=
--- 
a/content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java
+++ 
b/content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2011-2015 Hippo B.V. (http://www.onehippo.com)
+ *  Copyright 2011-2016 Hippo B.V. (http://www.onehippo.com)
  * 
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -178,4 +178,11 @@ public class TestSearchInputParsingUtils {
 assertEquals("No 
dash",SearchInputParsingUtils.removeInvalidAndEscapeChars("No dash -", false));
 assertEquals("No 
dash",SearchInputParsingUtils.removeInvalidAndEscapeChars("No dash -", true));
 }
+
+@Test
+public void testSearchInputParsingUtils_parse_differentApostrophes() 
throws Exception {
+assertEquals("The quick", SearchInputParsingUtils.parse("The quic'k", 
true));
+assertEquals("The quick", SearchInputParsingUtils.parse("The quic’k", 
true));
+assertEquals("The quick", SearchInputParsingUtils.parse("The quic‘k", 
true));
+}
 }



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/3a854776664514f0a823d96634f7d8a47316773d
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/cmng-psp1-CHANNELMGR-699] CHANNELMGR-699: tests for hasLocalParameters

2016-05-30 Thread Mark Lenser
Mark Lenser pushed to branch feature/cmng-psp1-CHANNELMGR-699 at cms-community 
/ hippo-addon-channel-manager


Commits:
a5cabf32 by Mark at 2016-05-30T17:04:41+02:00
CHANNELMGR-699: tests for hasLocalParameters

- - - - -


1 changed file:

- frontend-ng/src/angularjs/channel/menu/editor.spec.js


Changes:

=
frontend-ng/src/angularjs/channel/menu/editor.spec.js
=
--- a/frontend-ng/src/angularjs/channel/menu/editor.spec.js
+++ b/frontend-ng/src/angularjs/channel/menu/editor.spec.js
@@ -74,5 +74,27 @@ describe('MenuEditor', () => {
 $element.find('.qa-button-back').click();
 expect($scope.onDone).toHaveBeenCalled();
   });
-});
 
+  describe('MenuEditorCtrl', () => {
+describe('hasLocalParameters', () => {
+  it('returns false if there are not local parameters', () => {
+const MenuEditorCtrl = compileDirectiveAndGetController();
+MenuEditorCtrl.editingItem = {
+  id: 1,
+  localParameters: {},
+};
+expect(MenuEditorCtrl.hasLocalParameters()).toBe(false);
+  });
+  it('returns true if there are local parameters', () => {
+const MenuEditorCtrl = compileDirectiveAndGetController();
+MenuEditorCtrl.editingItem = {
+  id: 1,
+  localParameters: {
+test: 1,
+  },
+};
+expect(MenuEditorCtrl.hasLocalParameters()).toBe(true);
+  });
+});
+  });
+});



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/a5cabf32b7e7c36eb90c72923bc31dab9d23aaac
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Pushed new branch feature/cmng-psp1-CHANNELMGR-697

2016-05-30 Thread Mathijs den Burger
Mathijs den Burger pushed new branch feature/cmng-psp1-CHANNELMGR-697 at 
cms-community / hippo-addon-channel-manager
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Pushed new branch feature/cmng-psp1-CHANNELMGR-680

2016-05-30 Thread Joeri de Gooijer
Joeri de Gooijer pushed new branch feature/cmng-psp1-CHANNELMGR-680 at 
cms-community / hippo-addon-channel-manager
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/cmng-psp1-CHANNELMGR-696] 2 commits: CHANNELMGR-696: add tests

2016-05-30 Thread Mark Lenser
Mark Lenser pushed to branch feature/cmng-psp1-CHANNELMGR-696 at cms-community 
/ hippo-addon-channel-manager


Commits:
4d6acc28 by Mark at 2016-05-30T16:35:44+02:00
CHANNELMGR-696: add tests

- - - - -
6000903d by Mark at 2016-05-30T16:43:22+02:00
CHANNELMGR-696: add test

- - - - -


2 changed files:

- frontend-ng/src/angularjs/channel/sidenav/sidenav.spec.js
- + frontend-ng/src/angularjs/channel/subpage/subpage.service.spec.js


Changes:

=
frontend-ng/src/angularjs/channel/sidenav/sidenav.spec.js
=
--- a/frontend-ng/src/angularjs/channel/sidenav/sidenav.spec.js
+++ b/frontend-ng/src/angularjs/channel/sidenav/sidenav.spec.js
@@ -23,6 +23,7 @@ describe('ChannelSidenav', () => {
   let SiteMapService;
   let ChannelService;
   let HippoIframeService;
+  let SubpageService;
   let parentScope;
   const catalogComponents = [
 { label: 'dummy' },
@@ -31,13 +32,14 @@ describe('ChannelSidenav', () => {
   beforeEach(() => {
 module('hippo-cm');
 
-inject((_$rootScope_, _$compile_, _ChannelSidenavService_, 
_ChannelService_, _SiteMapService_, _HippoIframeService_) => {
+inject((_$rootScope_, _$compile_, _ChannelSidenavService_, 
_ChannelService_, _SiteMapService_, _HippoIframeService_, _SubpageService_) => {
   $rootScope = _$rootScope_;
   $compile = _$compile_;
   ChannelSidenavService = _ChannelSidenavService_;
   ChannelService = _ChannelService_;
   SiteMapService = _SiteMapService_;
   HippoIframeService = _HippoIframeService_;
+  SubpageService = _SubpageService_;
 });
 
 spyOn(ChannelService, 'getCatalog').and.returnValue([]);
@@ -46,6 +48,7 @@ describe('ChannelSidenav', () => {
 spyOn(SiteMapService, 'get');
 spyOn(HippoIframeService, 'load');
 spyOn(HippoIframeService, 'getCurrentRenderPathInfo');
+spyOn(SubpageService, 'showSubpage');
   });
 
   function instantiateController(editMode) {
@@ -117,5 +120,11 @@ describe('ChannelSidenav', () => {
 siteMapItem.renderPathInfo = '/other/path';
 expect(ChannelSidenavCtrl.isActiveSiteMapItem(siteMapItem)).toBe(false);
   });
+
+  it('can show a subpage', () => {
+const ChannelSidenavCtrl = instantiateController(false);
+ChannelSidenavCtrl.showSubpage('test');
+expect(SubpageService.showSubpage).toHaveBeenCalledWith('test');
+  });
 });
 


=
frontend-ng/src/angularjs/channel/subpage/subpage.service.spec.js
=
--- /dev/null
+++ b/frontend-ng/src/angularjs/channel/subpage/subpage.service.spec.js
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2016 Hippo B.V. (http://www.onehippo.com)
+ *
+ * Licensed 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.
+ */
+
+/* eslint-disable prefer-const */
+
+describe('SubpageService', () => {
+  'use strict';
+
+  let SubpageService;
+
+  beforeEach(() => {
+module('hippo-cm');
+
+inject((_SubpageService_) => {
+  SubpageService = _SubpageService_;
+});
+
+SubpageService.subpage = {
+  current: 'test',
+};
+  });
+
+  describe('getSubpage', () => {
+beforeEach(() => {
+  spyOn(SubpageService, 'getSubpage').and.callThrough();
+});
+it('should return this.subpage', () => {
+  expect(SubpageService.getSubpage().current).toBe('test');
+});
+  });
+
+  describe('showSubpage', () => {
+it('should show a subpage', () => {
+  SubpageService.showSubpage('new-subpage');
+  expect(SubpageService.subpage.current).toBe('new-subpage');
+});
+  });
+
+  describe('hideSubpage', () => {
+it('should hide a subpage', () => {
+  expect(SubpageService.subpage.current).toBe('test');
+  SubpageService.hideSubpage();
+  expect(SubpageService.subpage.current).toBe(undefined);
+});
+  });
+});



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/compare/885a7a3f7e0d390aaec4c9353deab729c188b16b...6000903ddba5e1c7fb457cbf4f1204b61ca03669
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-site-toolkit][release/3.1] HSTTWO-3678 [Backport 3.1] SearchInputParsingUtils should not allow apostrophe ’

2016-05-30 Thread Ard Schrijvers
Ard Schrijvers pushed to branch release/3.1 at cms-community / 
hippo-site-toolkit


Commits:
f950de4d by Ard Schrijvers at 2016-05-30T16:04:13+02:00
HSTTWO-3678 [Backport 3.1] SearchInputParsingUtils should not allow apostrophe ’

Apply fix as suggested by Saimir (great catch!). First foldToASCIIReplacer and 
then invoke
removeInvalidAndEscapeChars, otherwise apostrophe variants are not removed but 
only '

(cherry picked from commit 4411f8a6b29d056aca8fc1f240aca0205f21310a)

- - - - -


2 changed files:

- content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
- 
content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java


Changes:

=
content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
=
--- 
a/content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
+++ 
b/content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
@@ -1,7 +1,7 @@
 package org.hippoecm.hst.util;
 
 /**
- * Copyright 2011-2015 Hippo B.V. (http://www.onehippo.com)
+ * Copyright 2011-2016 Hippo B.V. (http://www.onehippo.com)
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -63,12 +63,12 @@ public final class SearchInputParsingUtils {
 if (input == null) {
 return null;
 }
-String parsed = compressWhitespace(input);
+String parsed = EncodingUtils.foldToASCIIReplacer(input);
+parsed = compressWhitespace(parsed);
 parsed = removeInvalidAndEscapeChars(parsed, 
allowSingleNonLeadingWildCardPerTerm, ignore);
 parsed = removeLeadingOrTrailingOrOperator(parsed);
 parsed = rewriteNotOperatorsToMinus(parsed);
 parsed = 
removeLeadingAndTrailingAndReplaceWithSpaceAndOperators(parsed);
-parsed = EncodingUtils.foldToASCIIReplacer(parsed);
 log.debug("Rewrote input '{}' to '{}'", input, parsed);
 return parsed;
 }


=
content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java
=
--- 
a/content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java
+++ 
b/content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2011-2015 Hippo B.V. (http://www.onehippo.com)
+ *  Copyright 2011-2016 Hippo B.V. (http://www.onehippo.com)
  * 
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -178,4 +178,11 @@ public class TestSearchInputParsingUtils {
 assertEquals("No 
dash",SearchInputParsingUtils.removeInvalidAndEscapeChars("No dash -", false));
 assertEquals("No 
dash",SearchInputParsingUtils.removeInvalidAndEscapeChars("No dash -", true));
 }
+
+@Test
+public void testSearchInputParsingUtils_parse_differentApostrophes() 
throws Exception {
+assertEquals("The quick", SearchInputParsingUtils.parse("The quic'k", 
true));
+assertEquals("The quick", SearchInputParsingUtils.parse("The quic’k", 
true));
+assertEquals("The quick", SearchInputParsingUtils.parse("The quic‘k", 
true));
+}
 }



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/f950de4d7f20affaf564c377245045c4682ac73a
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-site-toolkit][bugfix/HSTTWO-3677] HSTTWO-3677 [Backport 3.2] SearchInputParsingUtils should not allow apostrophe ’

2016-05-30 Thread Ard Schrijvers
Ard Schrijvers pushed to branch bugfix/HSTTWO-3677 at cms-community / 
hippo-site-toolkit


Commits:
3a854776 by Ard Schrijvers at 2016-05-30T15:52:01+02:00
HSTTWO-3677 [Backport 3.2] SearchInputParsingUtils should not allow apostrophe ’

Apply fix as suggested by Saimir (great catch!). First foldToASCIIReplacer and 
then invoke
removeInvalidAndEscapeChars, otherwise apostrophe variants are not removed but 
only '

(cherry picked from commit 4411f8a6b29d056aca8fc1f240aca0205f21310a)

- - - - -


2 changed files:

- content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
- 
content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java


Changes:

=
content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
=
--- 
a/content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
+++ 
b/content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
@@ -1,7 +1,7 @@
 package org.hippoecm.hst.util;
 
 /**
- * Copyright 2011-2015 Hippo B.V. (http://www.onehippo.com)
+ * Copyright 2011-2016 Hippo B.V. (http://www.onehippo.com)
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -63,12 +63,12 @@ public final class SearchInputParsingUtils {
 if (input == null) {
 return null;
 }
-String parsed = compressWhitespace(input);
+String parsed = EncodingUtils.foldToASCIIReplacer(input);
+parsed = compressWhitespace(parsed);
 parsed = removeInvalidAndEscapeChars(parsed, 
allowSingleNonLeadingWildCardPerTerm, ignore);
 parsed = removeLeadingOrTrailingOrOperator(parsed);
 parsed = rewriteNotOperatorsToMinus(parsed);
 parsed = 
removeLeadingAndTrailingAndReplaceWithSpaceAndOperators(parsed);
-parsed = EncodingUtils.foldToASCIIReplacer(parsed);
 log.debug("Rewrote input '{}' to '{}'", input, parsed);
 return parsed;
 }


=
content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java
=
--- 
a/content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java
+++ 
b/content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2011-2015 Hippo B.V. (http://www.onehippo.com)
+ *  Copyright 2011-2016 Hippo B.V. (http://www.onehippo.com)
  * 
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -178,4 +178,11 @@ public class TestSearchInputParsingUtils {
 assertEquals("No 
dash",SearchInputParsingUtils.removeInvalidAndEscapeChars("No dash -", false));
 assertEquals("No 
dash",SearchInputParsingUtils.removeInvalidAndEscapeChars("No dash -", true));
 }
+
+@Test
+public void testSearchInputParsingUtils_parse_differentApostrophes() 
throws Exception {
+assertEquals("The quick", SearchInputParsingUtils.parse("The quic'k", 
true));
+assertEquals("The quick", SearchInputParsingUtils.parse("The quic’k", 
true));
+assertEquals("The quick", SearchInputParsingUtils.parse("The quic‘k", 
true));
+}
 }



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/3a854776664514f0a823d96634f7d8a47316773d
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-site-toolkit] Pushed new branch bugfix/HSTTWO-3677

2016-05-30 Thread Ard Schrijvers
Ard Schrijvers pushed new branch bugfix/HSTTWO-3677 at cms-community / 
hippo-site-toolkit
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Pushed new branch feature/cmng-psp1-CHANNELMGR-639

2016-05-30 Thread Arthur Bogaart
Arthur Bogaart pushed new branch feature/cmng-psp1-CHANNELMGR-639 at 
cms-community / hippo-addon-channel-manager
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/cmng-psp1] CHANNELMGR-337 prevent parse error in IE

2016-05-30 Thread Mathijs den Burger
Mathijs den Burger pushed to branch feature/cmng-psp1 at cms-community / 
hippo-addon-channel-manager


Commits:
1b2faa03 by Mathijs den Burger at 2016-05-30T14:57:07+02:00
CHANNELMGR-337 prevent parse error in IE

IE only supports node.contains() for elements.

- - - - -


1 changed file:

- frontend-ng/src/angularjs/channel/page/element/pageStructureElement.js


Changes:

=
frontend-ng/src/angularjs/channel/page/element/pageStructureElement.js
=
--- a/frontend-ng/src/angularjs/channel/page/element/pageStructureElement.js
+++ b/frontend-ng/src/angularjs/channel/page/element/pageStructureElement.js
@@ -136,7 +136,8 @@ export class PageStructureElement {
 const endCommentNode = this.getEndComment()[0];
 let node = this.getStartComment()[0].nextSibling;
 while (node && node !== endCommentNode) {
-  if (node.contains(domElement)) {
+  // IE only supports contains() for elements, which have nodeType 1
+  if (node.nodeType === 1 && node.contains(domElement)) {
 return true;
   }
   node = node.nextSibling;



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/1b2faa0309741df99bad36cd3ad01610e7c3a093
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-site-toolkit][release/3.1] HSTTWO-3681 [Backport 3.1] remove trailing - ! when preceded by a space, also re…

2016-05-30 Thread Ard Schrijvers
Ard Schrijvers pushed to branch release/3.1 at cms-community / 
hippo-site-toolkit


Commits:
90990dab by Jasper Floor at 2016-05-30T14:42:49+02:00
HSTTWO-3681 [Backport 3.1] remove trailing - ! when preceded by a space, also 
remove the space and also
remove additional whitespaces between words

(cherry picked from commit 809e804da36571000393ea3105ec6326ed1619d1)
(cherry picked from commit 58b97aa7b27a70ccc1e14e3528df2aec85d2598f)
(cherry picked from commit ef7ca48dd350e703c75ceaf65aa2d711d474fca9)

- - - - -


2 changed files:

- content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
- 
content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java


Changes:

=
content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
=
--- 
a/content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
+++ 
b/content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
@@ -207,7 +207,7 @@ public final class SearchInputParsingUtils {
 }
 } else {
 char prevChar = sb.charAt(sb.length() - 1);
-if (prevChar == ' ') {
+if (prevChar == ' ' && 
containsNextCharAndIsNotSpecial(input, i)) {
 sb.append(c);
 } else if (c == '-') {
 // check next char : only if next char is 
again a non-special char we include the '-'
@@ -243,7 +243,7 @@ public final class SearchInputParsingUtils {
 if (!input.equals(output)) {
 log.debug("Rewrote input '{}' to '{}'", input, output);
 }
-return output;
+return compressWhitespace(output);
 }
 
 private static boolean ignoreChar(final char c, final char[] ignore) {


=
content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java
=
--- 
a/content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java
+++ 
b/content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java
@@ -67,7 +67,7 @@ public class TestSearchInputParsingUtils {
 // allow wildcard false
 assertEquals("The quick brown fox jumps over the lazy dog", 
SearchInputParsingUtils.parse("The ?*qu??ic?k br?ow*?n fo*x jumps over the lazy 
dog", false));
 
-assertEquals("The quick brown fox jumps  over   the lazy dog", 
SearchInputParsingUtils.parse("The (quick brown) (fox jumps) &( over ] ] [the 
lazy dog", true));
+assertEquals("The quick brown fox jumps over the lazy dog", 
SearchInputParsingUtils.parse("The (quick brown) (fox jumps) &( over ] ] [the 
lazy dog", true));
 
 assertEquals("The -quick brown fox jumps over the lazy dog", 
SearchInputParsingUtils.parse("The NOT quick brown fox jumps over the lazy 
dog", true));
 
@@ -162,4 +162,20 @@ public class TestSearchInputParsingUtils {
 assertEquals("The  brown& fox jumps o & l& dog&&", 
SearchInputParsingUtils.parse("The  brown& fox jumps o & l& 
dog&&", true, new char[]{'&'}));
 assertEquals("The  brown& fox jumps o & l& dog&&", 
SearchInputParsingUtils.parse("The  brown& fox jumps o & l& 
dog&&", false, new char[]{'&'}));
 }
+
+@Test
+public void 
testSearchInputParsingUtils_removeInvalidAndEscapeChars_removesTrailingExclamation()
 {
+assertEquals("No 
exclamation",SearchInputParsingUtils.removeInvalidAndEscapeChars("No 
exclamation!", false));
+assertEquals("No 
exclamation",SearchInputParsingUtils.removeInvalidAndEscapeChars("No 
exclamation!", true));
+assertEquals("No 
exclamation",SearchInputParsingUtils.removeInvalidAndEscapeChars("No 
exclamation !", false));
+assertEquals("No 
exclamation",SearchInputParsingUtils.removeInvalidAndEscapeChars("No 
exclamation !", true));
+}
+
+@Test
+public void 
testSearchInputParsingUtils_removeInvalidAndEscapeChars_removesTrailingDash() {
+assertEquals("No 
dash",SearchInputParsingUtils.removeInvalidAndEscapeChars("No dash-", false));
+assertEquals("No 
dash",SearchInputParsingUtils.removeInvalidAndEscapeChars("No dash-", true));
+assertEquals("No 
dash",SearchInputParsingUtils.removeInvalidAndEscapeChars("No dash -", false));
+assertEquals("No 
dash",SearchInputParsingUtils.removeInvalidAndEscapeChars("No dash -", true));
+}
 }



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/90990dab1aa19a2f4d9ddbd2df1bb124bf4294a3
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-site-toolkit][release/3.2] HSTTWO-3680 [Backport 3.2] remove trailing - ! when preceded by a space, also remove the space

2016-05-30 Thread Ard Schrijvers
Ard Schrijvers pushed to branch release/3.2 at cms-community / 
hippo-site-toolkit


Commits:
2f00364f by Jasper Floor at 2016-05-30T14:38:23+02:00
HSTTWO-3680 [Backport 3.2] remove trailing - ! when preceded by a space, also 
remove the space

(cherry picked from commit 809e804da36571000393ea3105ec6326ed1619d1)

HSTTWO-3680 [Backport 3.2] and also the class that does the work remove 
trailing - ! when preceded by a space, also remove the space

(cherry picked from commit 58b97aa7b27a70ccc1e14e3528df2aec85d2598f)

HSTTWO-3680 [Backport 3.2] remove additional whitespaces between words

(cherry picked from commit ef7ca48dd350e703c75ceaf65aa2d711d474fca9)

- - - - -


2 changed files:

- content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
- 
content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java


Changes:

=
content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
=
--- 
a/content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
+++ 
b/content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
@@ -207,7 +207,7 @@ public final class SearchInputParsingUtils {
 }
 } else {
 char prevChar = sb.charAt(sb.length() - 1);
-if (prevChar == ' ') {
+if (prevChar == ' ' && 
containsNextCharAndIsNotSpecial(input, i)) {
 sb.append(c);
 } else if (c == '-') {
 // check next char : only if next char is 
again a non-special char we include the '-'
@@ -243,7 +243,7 @@ public final class SearchInputParsingUtils {
 if (!input.equals(output)) {
 log.debug("Rewrote input '{}' to '{}'", input, output);
 }
-return output;
+return compressWhitespace(output);
 }
 
 private static boolean ignoreChar(final char c, final char[] ignore) {


=
content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java
=
--- 
a/content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java
+++ 
b/content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java
@@ -67,7 +67,7 @@ public class TestSearchInputParsingUtils {
 // allow wildcard false
 assertEquals("The quick brown fox jumps over the lazy dog", 
SearchInputParsingUtils.parse("The ?*qu??ic?k br?ow*?n fo*x jumps over the lazy 
dog", false));
 
-assertEquals("The quick brown fox jumps  over   the lazy dog", 
SearchInputParsingUtils.parse("The (quick brown) (fox jumps) &( over ] ] [the 
lazy dog", true));
+assertEquals("The quick brown fox jumps over the lazy dog", 
SearchInputParsingUtils.parse("The (quick brown) (fox jumps) &( over ] ] [the 
lazy dog", true));
 
 assertEquals("The -quick brown fox jumps over the lazy dog", 
SearchInputParsingUtils.parse("The NOT quick brown fox jumps over the lazy 
dog", true));
 
@@ -162,4 +162,20 @@ public class TestSearchInputParsingUtils {
 assertEquals("The  brown& fox jumps o & l& dog&&", 
SearchInputParsingUtils.parse("The  brown& fox jumps o & l& 
dog&&", true, new char[]{'&'}));
 assertEquals("The  brown& fox jumps o & l& dog&&", 
SearchInputParsingUtils.parse("The  brown& fox jumps o & l& 
dog&&", false, new char[]{'&'}));
 }
+
+@Test
+public void 
testSearchInputParsingUtils_removeInvalidAndEscapeChars_removesTrailingExclamation()
 {
+assertEquals("No 
exclamation",SearchInputParsingUtils.removeInvalidAndEscapeChars("No 
exclamation!", false));
+assertEquals("No 
exclamation",SearchInputParsingUtils.removeInvalidAndEscapeChars("No 
exclamation!", true));
+assertEquals("No 
exclamation",SearchInputParsingUtils.removeInvalidAndEscapeChars("No 
exclamation !", false));
+assertEquals("No 
exclamation",SearchInputParsingUtils.removeInvalidAndEscapeChars("No 
exclamation !", true));
+}
+
+@Test
+public void 
testSearchInputParsingUtils_removeInvalidAndEscapeChars_removesTrailingDash() {
+assertEquals("No 
dash",SearchInputParsingUtils.removeInvalidAndEscapeChars("No dash-", false));
+assertEquals("No 
dash",SearchInputParsingUtils.removeInvalidAndEscapeChars("No dash-", true));
+assertEquals("No 
dash",SearchInputParsingUtils.removeInvalidAndEscapeChars("No dash -", false));
+assertEquals("No 
dash",SearchInputParsingUtils.removeInvalidAndEscapeChars("No dash -", true));
+}
 }



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/2f00364f87325f0f948c8618c22cff4f40bce992
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org

[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Deleted branch feature/cmng-psp1-CHANNELMGR-605

2016-05-30 Thread Mathijs den Burger
Mathijs den Burger deleted branch feature/cmng-psp1-CHANNELMGR-605 at 
cms-community / hippo-addon-channel-manager
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Deleted branch feature/cmng-psp1-CHANNELMGR-666

2016-05-30 Thread Mathijs den Burger
Mathijs den Burger deleted branch feature/cmng-psp1-CHANNELMGR-666 at 
cms-community / hippo-addon-channel-manager
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-cms][feature/chinese-translation] 2 commits: CMS-10127 Adding dummy Chinese translations for calendar widget

2016-05-30 Thread Oscar Scholten
Oscar Scholten pushed to branch feature/chinese-translation at cms-community / 
hippo-cms


Commits:
b7ee0a34 by Oscar Scholten at 2016-05-30T14:28:13+02:00
CMS-10127 Adding dummy Chinese translations for calendar widget

- - - - -
8d266a2a by Oscar Scholten at 2016-05-30T14:29:31+02:00
CMS-10137 Adding dummy Chinese translations for CKEditor styles

- - - - -


2 changed files:

- 
api/src/main/java/org/hippoecm/frontend/plugins/yui/inc/hippo/281/datetime/datetime.js
- richtext/ckeditor/plugins/src/main/resources/ckeditor/hippostyles.js


Changes:

=
api/src/main/java/org/hippoecm/frontend/plugins/yui/inc/hippo/281/datetime/datetime.js
=
--- 
a/api/src/main/java/org/hippoecm/frontend/plugins/yui/inc/hippo/281/datetime/datetime.js
+++ 
b/api/src/main/java/org/hippoecm/frontend/plugins/yui/inc/hippo/281/datetime/datetime.js
@@ -1,5 +1,5 @@
 /*
- * Copyright 2009-2013 Hippo B.V. (http://www.onehippo.com)
+ * Copyright 2009-2016 Hippo B.V. (http://www.onehippo.com)
  *
  * Licensed under the Apache License, Version 2.0 (the  "License");
  * you may not use this file except in compliance with the License.
@@ -280,6 +280,7 @@ if (!YAHOO.hippo.DateTime) {
 },
 
 _localizeCalendar : function(calendar, lang) {
+console.log(lang);
 var locale = {
 en: function(cfg) {
 // defaults to English
@@ -310,6 +311,15 @@ if (!YAHOO.hippo.DateTime) {
 cfg.setProperty("WEEKDAYS_SHORT", ["di", "lu", "ma", 
"me", "je", "ve", "sa"]);
 cfg.setProperty("WEEKDAYS_1CHAR", ["d", "l", "m", "m", 
"j", "v", "s"]);
 cfg.setProperty("START_WEEKDAY",  ["1"]);
+},
+zh: function(cfg) {
+cfg.setProperty("MONTHS_LONG",["ZH", "ZH", "ZH", 
"ZH", "ZH", "ZH", "ZH", "ZH", "ZH", "ZH", "ZH", "ZH"]);
+cfg.setProperty("MONTHS_SHORT",   ["ZH", "ZH", "ZH", 
"ZH", "ZH", "ZH", "ZH", "ZH", "ZH", "ZH", "ZH", "ZH"]);
+cfg.setProperty("WEEKDAYS_LONG",  ["ZH", "ZH", "ZH", 
"ZH", "ZH", "ZH", "ZH"]);
+cfg.setProperty("WEEKDAYS_MEDIUM",["ZH", "ZH", "ZH", 
"ZH", "ZH", "ZH", "ZH"]);
+cfg.setProperty("WEEKDAYS_SHORT", ["ZH", "ZH", "ZH", 
"ZH", "ZH", "ZH", "ZH"]);
+cfg.setProperty("WEEKDAYS_1CHAR", ["Z", "Z", "Z", "Z", 
"Z", "Z", "Z"]);
+cfg.setProperty("START_WEEKDAY",  ["1"]);
 }
 }[lang];
 


=
richtext/ckeditor/plugins/src/main/resources/ckeditor/hippostyles.js
=
--- a/richtext/ckeditor/plugins/src/main/resources/ckeditor/hippostyles.js
+++ b/richtext/ckeditor/plugins/src/main/resources/ckeditor/hippostyles.js
@@ -1,5 +1,5 @@
 /*
- * Copyright 2013 Hippo B.V. (http://www.onehippo.com)
+ * Copyright 2013-2016 Hippo B.V. (http://www.onehippo.com)
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -63,16 +63,16 @@
 p: 'Normaal',
 pre: 'Voorgedefinieerd'
 },
-it: {
-address: 'Indirizzo',
-h1: 'Titolo 1',
-h2: 'Titolo 2',
-h3: 'Titolo 3',
-h4: 'Titolo 4',
-h5: 'Titolo 5',
-h6: 'Titolo 6',
-p: 'Normale',
-pre: 'Preformattato'
+zh: {
+address: 'ZH',
+h1: 'ZH',
+h2: 'ZH',
+h3: 'ZH',
+h4: 'ZH',
+h5: 'ZH',
+h6: 'ZH',
+p: 'ZH',
+pre: 'ZH'
 }
 },
 stylesSet, language, element, i, len;



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/compare/2c0e700dc0b0464c5a35123b5be7b02c83fd0413...8d266a2a9a406ffc2ff9d82b2a16c6abb14f271e
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/cmng-psp1-CHANNELMGR-696] CHANNELMGR-696: move some tests

2016-05-30 Thread Mark Lenser
Mark Lenser pushed to branch feature/cmng-psp1-CHANNELMGR-696 at cms-community 
/ hippo-addon-channel-manager


Commits:
7845ac63 by Mark at 2016-05-30T14:29:29+02:00
CHANNELMGR-696: move some tests

- - - - -


2 changed files:

- frontend-ng/src/angularjs/channel/channel.controller.spec.js
- frontend-ng/src/angularjs/channel/channel.service.spec.js


Changes:

=
frontend-ng/src/angularjs/channel/channel.controller.spec.js
=
--- a/frontend-ng/src/angularjs/channel/channel.controller.spec.js
+++ b/frontend-ng/src/angularjs/channel/channel.controller.spec.js
@@ -53,6 +53,10 @@ describe('ChannelCtrl', () => {
 'discardChanges',
 'getCatalog',
 'getSiteMapId',
+'getEditMode',
+'enterEditMode',
+'leaveEditMode',
+'isEditModeActive',
   ]);
   
ChannelService.createPreviewConfiguration.and.returnValue(resolvedPromise);
 
@@ -122,19 +126,6 @@ describe('ChannelCtrl', () => {
 expect(ChannelCtrl.getRenderVariant()).toBe('variant1');
   });
 
-  it('is not in edit mode by default', () => {
-expect(ChannelCtrl.isEditModeActive()).toEqual(false);
-  });
-
-  it('enables and disables edit mode when toggling it', () => {
-ChannelService.hasPreviewConfiguration.and.returnValue(true);
-
-ChannelCtrl.enterEditMode();
-expect(ChannelCtrl.isEditModeActive()).toEqual(true);
-ChannelCtrl.leaveEditMode();
-expect(ChannelCtrl.isEditModeActive()).toEqual(false);
-  });
-
   it('creates preview configuration when it has not been created yet before 
enabling edit mode', () => {
 const deferCreatePreview = $q.defer();
 const deferReload = $q.defer();
@@ -225,6 +216,6 @@ describe('ChannelCtrl', () => {
 ChannelCtrl.editMenu('testUuid');
 
 expect(ChannelCtrl.menuUuid).toBe('testUuid');
-expect(ChannelCtrl.currentSubpage).toBe('menu-editor');
+expect(ChannelCtrl.subpage.current).toBe('menu-editor');
   });
 });


=
frontend-ng/src/angularjs/channel/channel.service.spec.js
=
--- a/frontend-ng/src/angularjs/channel/channel.service.spec.js
+++ b/frontend-ng/src/angularjs/channel/channel.service.spec.js
@@ -611,4 +611,17 @@ describe('ChannelService', () => {
 $rootScope.$digest();
 
expect(ChannelService.getContentRootPath()).toEqual('/content/documents/testChannel');
   });
+
+  it('is not in edit mode by default', () => {
+expect(ChannelService.isEditModeActive()).toEqual(false);
+  });
+
+  it('enables and disables edit mode when toggling it', () => {
+spyOn(ChannelService, 'hasPreviewConfiguration').and.returnValue(true);
+
+ChannelService.enterEditMode();
+expect(ChannelService.isEditModeActive()).toEqual(true);
+ChannelService.leaveEditMode();
+expect(ChannelService.isEditModeActive()).toEqual(false);
+  });
 });



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/7845ac637fe7809f815d3a716a82c464a2d768e6
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-cms][feature/chinese-translation] 2 commits: CMS-10138 Adding dummy translations for Chinese

2016-05-30 Thread Oscar Scholten
Oscar Scholten pushed to branch feature/chinese-translation at cms-community / 
hippo-cms


Commits:
feb84c73 by Oscar Scholten at 2016-05-30T14:24:36+02:00
CMS-10138 Adding dummy translations for Chinese

- - - - -
2c0e700d by Oscar Scholten at 2016-05-30T14:25:35+02:00
CMS-10138 Removing obsolete Italian translation

- - - - -


2 changed files:

- 
richtext/ckeditor/plugins/src/main/resources/ckeditor/plugins/hippopicker/lang/it.js
 → 
richtext/ckeditor/plugins/src/main/resources/ckeditor/plugins/hippopicker/lang/zh.js
- 
richtext/ckeditor/plugins/src/main/resources/ckeditor/plugins/hippopicker/plugin.js


Changes:

=
richtext/ckeditor/plugins/src/main/resources/ckeditor/plugins/hippopicker/lang/it.js
 → 
richtext/ckeditor/plugins/src/main/resources/ckeditor/plugins/hippopicker/lang/zh.js
=
--- 
a/richtext/ckeditor/plugins/src/main/resources/ckeditor/plugins/hippopicker/lang/it.js
+++ 
b/richtext/ckeditor/plugins/src/main/resources/ckeditor/plugins/hippopicker/lang/zh.js
@@ -1,5 +1,5 @@
 /*
- * Copyright 2013 Hippo B.V. (http://www.onehippo.com)
+ * Copyright 2016 Hippo B.V. (http://www.onehippo.com)
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-CKEDITOR.plugins.setLang( 'hippopicker', 'it', {
-imageTooltip: 'Immagine',
-internalLinkTooltip: 'Collegamento interno'
+CKEDITOR.plugins.setLang( 'hippopicker', 'zh', {
+imageTooltip: 'ZH',
+internalLinkTooltip: 'ZH'
 });


=
richtext/ckeditor/plugins/src/main/resources/ckeditor/plugins/hippopicker/plugin.js
=
--- 
a/richtext/ckeditor/plugins/src/main/resources/ckeditor/plugins/hippopicker/plugin.js
+++ 
b/richtext/ckeditor/plugins/src/main/resources/ckeditor/plugins/hippopicker/plugin.js
@@ -1,5 +1,5 @@
 /*
- * Copyright 2013-2015 Hippo B.V. (http://www.onehippo.com)
+ * Copyright 2013-2016 Hippo B.V. (http://www.onehippo.com)
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -331,7 +331,7 @@
 
 icons: 'pickinternallink,pickimage',
 hidpi: true,
-lang: 'de,en,fr,it,nl',
+lang: 'de,en,fr,nl,zh',
 
 init: function(editor) {
 var config = editor.config.hippopicker;



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/compare/afc288cd4d07717a843558476f615e5f4fd133f9...2c0e700dc0b0464c5a35123b5be7b02c83fd0413
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/cmng-psp1-CHANNELMGR-337] 3 commits: CHANNELMGR-337 wrap multiple changes before digest in one $apply

2016-05-30 Thread Mathijs den Burger
Mathijs den Burger pushed to branch feature/cmng-psp1-CHANNELMGR-337 at 
cms-community / hippo-addon-channel-manager


Commits:
9f3ad01d by Mathijs den Burger at 2016-05-30T13:31:36+02:00
CHANNELMGR-337 wrap multiple changes before digest in one $apply

- - - - -
e3c88f34 by Mathijs den Burger at 2016-05-30T13:41:23+02:00
CHANNELMGR-337 disable or hide toolbar items until page is loaded

Selecting a different viewport before the page has been loaded
will fail because the 'scrollWidth' cannot read.

Going to edit mode before the page has loaded fails because the
page structure has not been analyzed and no CSS can be injected.

- - - - -
433ba04e by Mathijs den Burger at 2016-05-30T13:41:53+02:00
CHANNELMGR-337 show empty toolbar with progress until channel loaded

- - - - -


3 changed files:

- frontend-ng/src/angularjs/channel/channel.controller.js
- frontend-ng/src/angularjs/channel/channel.html
- frontend-ng/src/index.html


Changes:

=
frontend-ng/src/angularjs/channel/channel.controller.js
=
--- a/frontend-ng/src/angularjs/channel/channel.controller.js
+++ b/frontend-ng/src/angularjs/channel/channel.controller.js
@@ -79,10 +79,11 @@ export class ChannelCtrl {
   }
 
   _clear() {
-this.hideSubpage();
-this.leaveEditMode();
-this.ChannelService.clearChannel();
-this.$rootScope.$digest();
+this.$rootScope.$apply(() => {
+  this.hideSubpage();
+  this.leaveEditMode();
+  this.ChannelService.clearChannel();
+});
   }
 
   isChannelLoaded() {


=
frontend-ng/src/angularjs/channel/channel.html
=
--- a/frontend-ng/src/angularjs/channel/channel.html
+++ b/frontend-ng/src/angularjs/channel/channel.html
@@ -23,14 +23,15 @@
 
   
 
-  
+  
 
   
 
   
 {{viewPort.icon}}
@@ -46,7 +47,7 @@
 
   {{ 'TOOLBAR_SWITCH_VIEWER_MODE_EDIT' | translate }}
 
@@ -54,7 +55,7 @@
 
   {{ 'TOOLBAR_SWITCH_VIEWER_MODE_VIEW' | translate }}
 


=
frontend-ng/src/index.html
=
--- a/frontend-ng/src/index.html
+++ b/frontend-ng/src/index.html
@@ -32,7 +32,11 @@
   
 
   
-
+
+  
+
+  
+
 
 
 



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/compare/77c263eea9d7924c1aecb27663a21b7a58746deb...433ba04ed24a929ae52bf1a3b88202a56c6d9536
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-site-toolkit] Deleted branch bugfix/HSTTWO-3658

2016-05-30 Thread Ard Schrijvers
Ard Schrijvers deleted branch bugfix/HSTTWO-3658 at cms-community / 
hippo-site-toolkit
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-site-toolkit][master] HSTTWO-3658 SearchInputParsingUtils should not allow apostrophe ’

2016-05-30 Thread Ard Schrijvers
Ard Schrijvers pushed to branch master at cms-community / hippo-site-toolkit


Commits:
4411f8a6 by Ard Schrijvers at 2016-05-27T13:03:16+02:00
HSTTWO-3658 SearchInputParsingUtils should not allow apostrophe ’

Apply fix as suggested by Saimir (great catch!). First foldToASCIIReplacer and 
then invoke
removeInvalidAndEscapeChars, otherwise apostrophe variants are not removed but 
only '

- - - - -


2 changed files:

- content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
- 
content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java


Changes:

=
content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
=
--- 
a/content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
+++ 
b/content-beans/src/main/java/org/hippoecm/hst/util/SearchInputParsingUtils.java
@@ -1,7 +1,7 @@
 package org.hippoecm.hst.util;
 
 /**
- * Copyright 2011-2015 Hippo B.V. (http://www.onehippo.com)
+ * Copyright 2011-2016 Hippo B.V. (http://www.onehippo.com)
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -63,12 +63,12 @@ public final class SearchInputParsingUtils {
 if (input == null) {
 return null;
 }
-String parsed = compressWhitespace(input);
+String parsed = EncodingUtils.foldToASCIIReplacer(input);
+parsed = compressWhitespace(parsed);
 parsed = removeInvalidAndEscapeChars(parsed, 
allowSingleNonLeadingWildCardPerTerm, ignore);
 parsed = removeLeadingOrTrailingOrOperator(parsed);
 parsed = rewriteNotOperatorsToMinus(parsed);
 parsed = 
removeLeadingAndTrailingAndReplaceWithSpaceAndOperators(parsed);
-parsed = EncodingUtils.foldToASCIIReplacer(parsed);
 log.debug("Rewrote input '{}' to '{}'", input, parsed);
 return parsed;
 }


=
content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java
=
--- 
a/content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java
+++ 
b/content-beans/src/test/java/org/hippoecm/hst/util/TestSearchInputParsingUtils.java
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2011-2015 Hippo B.V. (http://www.onehippo.com)
+ *  Copyright 2011-2016 Hippo B.V. (http://www.onehippo.com)
  * 
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -178,4 +178,11 @@ public class TestSearchInputParsingUtils {
 assertEquals("No 
dash",SearchInputParsingUtils.removeInvalidAndEscapeChars("No dash -", false));
 assertEquals("No 
dash",SearchInputParsingUtils.removeInvalidAndEscapeChars("No dash -", true));
 }
+
+@Test
+public void testSearchInputParsingUtils_parse_differentApostrophes() 
throws Exception {
+assertEquals("The quick", SearchInputParsingUtils.parse("The quic'k", 
true));
+assertEquals("The quick", SearchInputParsingUtils.parse("The quic’k", 
true));
+assertEquals("The quick", SearchInputParsingUtils.parse("The quic‘k", 
true));
+}
 }



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/4411f8a6b29d056aca8fc1f240aca0205f21310a
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Deleted branch feature/cmng-psp1-CHANNELMGR-692

2016-05-30 Thread Canh Ngo
Canh Ngo deleted branch feature/cmng-psp1-CHANNELMGR-692 at cms-community / 
hippo-addon-channel-manager
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/cmng-psp1] 3 commits: CHANNELMGR-692 record changes when changing the menu

2016-05-30 Thread Canh Ngo
Canh Ngo pushed to branch feature/cmng-psp1 at cms-community / 
hippo-addon-channel-manager


Commits:
0bcd75ca by Tobias Jeger at 2016-05-27T11:11:22+02:00
CHANNELMGR-692 record changes when changing the menu

- - - - -
4e0a4a20 by Canh Ngo at 2016-05-30T13:45:30+02:00
CHANNELMGR-692 merged from feature/cmng-psp1

- - - - -
ca2cae49 by Canh Ngo at 2016-05-30T13:51:26+02:00
CHANNELMGR-692 merged to feature mainline

- - - - -


1 changed file:

- frontend-ng/src/angularjs/channel/menu/editor.controller.js


Changes:

=
frontend-ng/src/angularjs/channel/menu/editor.controller.js
=
--- a/frontend-ng/src/angularjs/channel/menu/editor.controller.js
+++ b/frontend-ng/src/angularjs/channel/menu/editor.controller.js
@@ -16,7 +16,7 @@
 
 export class MenuEditorCtrl {
   constructor($q, $filter, $scope, $translate, SiteMenuService, 
FormStateService, HippoIframeService, DialogService,
-  FeedbackService) {
+  FeedbackService, ChannelService) {
 'ngInject';
 
 this.$q = $q;
@@ -27,6 +27,7 @@ export class MenuEditorCtrl {
 this.HippoIframeService = HippoIframeService;
 this.DialogService = DialogService;
 this.FeedbackService = FeedbackService;
+this.ChannelService = ChannelService;
 
 this.isSaving = {};
 
@@ -62,6 +63,7 @@ export class MenuEditorCtrl {
 
 if (source.nodesScope !== destNodesScope || source.index !== 
dest.index) {
   SiteMenuService.moveMenuItem(this.menuUuid, sourceId, destId, 
dest.index)
+.then(() => { this.isMenuModified = true; })
 .catch(() => this.onError({ key: 'ERROR_MENU_MOVE_FAILED' }));
 }
   },
@@ -92,6 +94,7 @@ export class MenuEditorCtrl {
   .then((menu) => this._createBlankMenuItem(menu))
   .then((blankItem) => 
this.SiteMenuService.createEditableMenuItem(this.menuUuid, blankItem))
   .then((editableItem) => {
+this.isMenuModified = true;
 this.FormStateService.setValid(true);
 this.isSaving.newItem = false;
 this._startEditingItem(editableItem);
@@ -105,7 +108,11 @@ export class MenuEditorCtrl {
   }
 
   onBack() {
-this.HippoIframeService.reload().then(this.onDone);
+if (this.isMenuModified) {
+  this.HippoIframeService.reload();
+  this.ChannelService.recordOwnChange();
+}
+this.onDone();
   }
 
   // TODO: Move this logic into the SiteMenuService. Don't make this 
controller worry about the prototypeItem.
@@ -124,7 +131,10 @@ export class MenuEditorCtrl {
 
   saveItem() {
 this.SiteMenuService.saveMenuItem(this.menuUuid, this.editingItem)
-  .then(() => this.stopEditingItem())
+  .then(() => {
+this.isMenuModified = true;
+this.stopEditingItem();
+  })
   .catch((response) => {
 response = response || {};
 
@@ -134,7 +144,10 @@ export class MenuEditorCtrl {
 
   _doDelete() {
 return this.SiteMenuService.deleteMenuItem(this.menuUuid, 
this.editingItem.id)
-  .then(() => this.stopEditingItem())
+  .then(() => {
+this.isMenuModified = true;
+this.stopEditingItem();
+  })
   .catch((response) => {
 response = response || {};
 



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/compare/5e649784a204e914faf700f560c3495b833fbdff...ca2cae499794714a35628b6d4cbefe988b1d3282
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-cms][feature/chinese-translation] CMS-10141 Using wicket-extjs development version

2016-05-30 Thread Oscar Scholten
Oscar Scholten pushed to branch feature/chinese-translation at cms-community / 
hippo-cms


Commits:
afc288cd by Oscar Scholten at 2016-05-30T13:48:35+02:00
CMS-10141 Using wicket-extjs development version

- - - - -


1 changed file:

- pom.xml


Changes:

=
pom.xml
=
--- a/pom.xml
+++ b/pom.xml
@@ -114,7 +114,7 @@
 
 2.8.1
 6.19.0
-0.25.1
+
0.25.2-chinese-translation-SNAPSHOT
 1.9.13
 4.2.2
 



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/commit/afc288cd4d07717a843558476f615e5f4fd133f9
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Pushed new branch feature/cmng-psp1-CHANNELMGR-696

2016-05-30 Thread Mark Lenser
Mark Lenser pushed new branch feature/cmng-psp1-CHANNELMGR-696 at cms-community 
/ hippo-addon-channel-manager
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/cmng-psp1] CHANNELMGR-605 hard-code max width of tooltips

2016-05-30 Thread Mathijs den Burger
Mathijs den Burger pushed to branch feature/cmng-psp1 at cms-community / 
hippo-addon-channel-manager


Commits:
5e649784 by Mathijs den Burger at 2016-05-30T12:55:21+02:00
CHANNELMGR-605 hard-code max width of tooltips

The subpage no longer has a fixed max width, so invent one for the
tooltips.

- - - - -


2 changed files:

- frontend-ng/src/styles/_channel.scss
- frontend-ng/src/styles/_variables.scss


Changes:

=
frontend-ng/src/styles/_channel.scss
=
--- a/frontend-ng/src/styles/_channel.scss
+++ b/frontend-ng/src/styles/_channel.scss
@@ -56,7 +56,7 @@ md-input-container.input-container-picker {
 // avoid that help icon tooltips grow wider than the subpage; wrap text when 
necessary.
 .tooltip-help-icon ._md-content {
   height: auto;
-  max-width: $subpage-max-width;
+  max-width: 500px;
   text-overflow: initial;
   white-space: initial;
 }


=
frontend-ng/src/styles/_variables.scss
=
--- a/frontend-ng/src/styles/_variables.scss
+++ b/frontend-ng/src/styles/_variables.scss
@@ -43,8 +43,5 @@ $tree-active-color:   $white;
 // DragDrop placeholder
 $tree-dd-bg:  $black-shadow;
 
-// Sub-pages
-$subpage-max-width:   570px;
-
 // Do not use transparent tooltips
 $tooltip-bg:  $black;



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/5e649784a204e914faf700f560c3495b833fbdff
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/cmng-psp1-CHANNELMGR-605] CHANNELMGR-605 don't use magic constants :)

2016-05-30 Thread Mathijs den Burger
Mathijs den Burger pushed to branch feature/cmng-psp1-CHANNELMGR-605 at 
cms-community / hippo-addon-channel-manager


Commits:
bcfe488b by Mathijs den Burger at 2016-05-30T12:29:25+02:00
CHANNELMGR-605 don't use magic constants :)

The offset of the tooltip happened to be the same as the help icon
width by coincidence.

- - - - -


1 changed file:

- frontend-ng/src/styles/_channel.scss


Changes:

=
frontend-ng/src/styles/_channel.scss
=
--- a/frontend-ng/src/styles/_channel.scss
+++ b/frontend-ng/src/styles/_channel.scss
@@ -12,8 +12,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-$help-icon-width: 24px;
-
 .mask {
   height: 100%;
   left: 0;
@@ -52,13 +50,13 @@ md-input-container.input-container-picker {
   cursor: default;
   position: absolute;
   top: 10px;
-  right: -$help-icon-width;
+  right: -24px;
 }
 
 // avoid that help icon tooltips grow wider than the subpage; wrap text when 
necessary.
 .tooltip-help-icon ._md-content {
   height: auto;
-  max-width: $subpage-max-width - $help-icon-width;
+  max-width: $subpage-max-width;
   text-overflow: initial;
   white-space: initial;
 }



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/bcfe488ba656ff9b246d99454955189de7fb6b81
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Deleted branch feature/cmng-psp1-CHANNELMGR-694

2016-05-30 Thread Mathijs den Burger
Mathijs den Burger deleted branch feature/cmng-psp1-CHANNELMGR-694 at 
cms-community / hippo-addon-channel-manager
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/cmng-psp1] 2 commits: CHANNELMGR-694: modify FAB items on iframe as discussed yesterday

2016-05-30 Thread Mathijs den Burger
Mathijs den Burger pushed to branch feature/cmng-psp1 at cms-community / 
hippo-addon-channel-manager


Commits:
567c7d2c by Mark at 2016-05-27T11:54:33+02:00
CHANNELMGR-694: modify FAB items on iframe as discussed yesterday

- - - - -
0b095906 by Mathijs den Burger at 2016-05-30T12:15:08+02:00
CHANNELMGR-694 Merge changes into mainline

- - - - -


2 changed files:

- frontend-ng/src/angularjs/channel/hippoIframe/hippoIframe.html
- frontend-ng/src/i18n/en.json


Changes:

=
frontend-ng/src/angularjs/channel/hippoIframe/hippoIframe.html
=
--- a/frontend-ng/src/angularjs/channel/hippoIframe/hippoIframe.html
+++ b/frontend-ng/src/angularjs/channel/hippoIframe/hippoIframe.html
@@ -45,17 +45,25 @@
   
   
 
-  
-description
+description
+
+  {{'IFRAME_OPEN_DOCUMENT' | translate}}
+
   
 
   
   
 
-  
-menu
+edit
+
+  {{'IFRAME_EDIT_MENU' | translate}}
+
   
 
   


=
frontend-ng/src/i18n/en.json
=
--- a/frontend-ng/src/i18n/en.json
+++ b/frontend-ng/src/i18n/en.json
@@ -61,6 +61,8 @@
   "EXPERIMENT_LABEL_COMPLETED": "Experiment completed",
   "EXPERIMENT_LABEL_CREATED": "Experiment created",
   "EXPERIMENT_LABEL_RUNNING": "Experiment running",
+  "IFRAME_EDIT_MENU": "Edit menu",
+  "IFRAME_OPEN_DOCUMENT": "Open document",
   "LINK_REQUIRED": "Link is required",
   "MOVE": "Move",
   "PUBLISH": "Publish",



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/compare/eac6ae4cd5eadb3e95c8e3bae8cf8cda6d3f8e59...0b095906275daf4a90cdd7d136eac1af5bc16492
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Deleted branch feature/cmng-psp1-CHANNELMGR-691

2016-05-30 Thread Mathijs den Burger
Mathijs den Burger deleted branch feature/cmng-psp1-CHANNELMGR-691 at 
cms-community / hippo-addon-channel-manager
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/cmng-psp1] 2 commits: CHANNELMGR-691 only get prototype info when having 'write' permission

2016-05-30 Thread Mathijs den Burger
Mathijs den Burger pushed to branch feature/cmng-psp1 at cms-community / 
hippo-addon-channel-manager


Commits:
b1698a08 by Canh Ngo at 2016-05-27T10:49:51+02:00
CHANNELMGR-691 only get prototype info when having 'write' permission

The backend of /newpagemodel requires 'write' permission, so the
front-end should only call it when having enough permission

- - - - -
eac6ae4c by Mathijs den Burger at 2016-05-30T12:07:43+02:00
CHANNELMGR-691 Merge changes into mainline

- - - - -


2 changed files:

- frontend-ng/src/angularjs/channel/channel.service.js
- frontend-ng/src/angularjs/channel/channel.service.spec.js


Changes:

=
frontend-ng/src/angularjs/channel/channel.service.js
=
--- a/frontend-ng/src/angularjs/channel/channel.service.js
+++ b/frontend-ng/src/angularjs/channel/channel.service.js
@@ -97,7 +97,10 @@ export class ChannelService {
 
 this.CatalogService.load(this.getMountId());
 this.SiteMapService.load(channel.siteMapId);
-this._augmentChannelWithPrototypeInfo();
+
+if (this.SessionService.hasWriteAccess()) {
+  this._augmentChannelWithPrototypeInfo();
+}
   }
 
   getChannel() {


=
frontend-ng/src/angularjs/channel/channel.service.spec.js
=
--- a/frontend-ng/src/angularjs/channel/channel.service.spec.js
+++ b/frontend-ng/src/angularjs/channel/channel.service.spec.js
@@ -42,9 +42,12 @@ describe('ChannelService', () => {
   workspaceExists: true,
 };
 
-SessionServiceMock = {
-  initialize: (channel) => $q.resolve(channel),
-};
+SessionServiceMock = jasmine.createSpyObj('SessionService', [
+  'initialize',
+  'hasWriteAccess',
+]);
+SessionServiceMock.initialize.and.callFake((channel) => $q.when(channel));
+SessionServiceMock.hasWriteAccess.and.returnValue(true);
 
 CatalogServiceMock = jasmine.createSpyObj('CatalogService', [
   'load',
@@ -143,12 +146,19 @@ describe('ChannelService', () => {
   });
 
   it('should not save a reference to the channel when load fails', () => {
-spyOn(SessionServiceMock, 'initialize').and.returnValue($q.reject());
+SessionServiceMock.initialize.and.returnValue($q.reject());
 ChannelService._load(channelMock);
 $rootScope.$digest();
 expect(ChannelService.getChannel()).not.toEqual(channelMock);
   });
 
+  it('should not fetch pagemodel when session does not have write permission', 
() => {
+SessionServiceMock.hasWriteAccess.and.returnValue(false);
+ChannelService._load(channelMock);
+$rootScope.$digest();
+
expect(HstService.doGetWithParams).not.toHaveBeenCalledWith(channelMock.mountId,
 undefined, 'newpagemodel');
+  });
+
   it('should save a reference to the channel when load succeeds', () => {
 HstService.doGetWithParams.and.returnValue($q.when({ data: { prototypes: 
['test'] } }));
 ChannelService._load(channelMock);



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/compare/81be50853aa267d30a6b928ddc3537cceb408909...eac6ae4cd5eadb3e95c8e3bae8cf8cda6d3f8e59
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/cmng-psp1-CHANNELMGR-605] 4 commits: CHANNELMGR-605 change channel settings tooltip direction to 'left'

2016-05-30 Thread Mathijs den Burger
Mathijs den Burger pushed to branch feature/cmng-psp1-CHANNELMGR-605 at 
cms-community / hippo-addon-channel-manager


Commits:
0fa2d077 by Mathijs den Burger at 2016-05-30T09:41:18+02:00
CHANNELMGR-605 change channel settings tooltip direction to 'left'

Otherwise long tooltips may fall outside the right border of the
page.

- - - - -
5fd60263 by Mathijs den Burger at 2016-05-30T11:13:34+02:00
CHANNELMGR-605 limit width of help tooltips and remove transparency

The width of the help icon tooltips is now limited to the sub-page
width (minus the width of the help icon itself, because the
tooltips are shown left of those help icons).

Improve readability of the tooltips by making the background color
black instead of the semi-transparent default color (which caused
the underlying widgets to shine through).

- - - - -
dc8a199e by Mathijs den Burger at 2016-05-30T11:31:38+02:00
CHANNELMGR-605 make boolean fields full-width

- - - - -
7c2de31e by Mathijs den Burger at 2016-05-30T11:32:57+02:00
CHANNELMGR-605 fix multi-line tooltips

- - - - -


7 changed files:

- 
frontend-ng/src/angularjs/channel/actions/settings/property/helpIcon/helpIcon.html
- frontend-ng/src/angularjs/channel/actions/settings/property/property.html
- frontend-ng/src/index.scss
- frontend-ng/src/styles/_channel.scss
- frontend-ng/src/styles/_subpage.scss
- + frontend-ng/src/styles/_tooltips.scss
- frontend-ng/src/styles/_variables.scss


Changes:

=
frontend-ng/src/angularjs/channel/actions/settings/property/helpIcon/helpIcon.html
=
--- 
a/frontend-ng/src/angularjs/channel/actions/settings/property/helpIcon/helpIcon.html
+++ 
b/frontend-ng/src/angularjs/channel/actions/settings/property/helpIcon/helpIcon.html
@@ -15,6 +15,6 @@
   -->
 
 
-  {{ text }}
+  {{ text }}
   info_outline
 


=
frontend-ng/src/angularjs/channel/actions/settings/property/property.html
=
--- a/frontend-ng/src/angularjs/channel/actions/settings/property/property.html
+++ b/frontend-ng/src/angularjs/channel/actions/settings/property/property.html
@@ -15,8 +15,9 @@
   -->
 
 
-  
-
+
   {{ channelProperty.label }}


=
frontend-ng/src/index.scss
=
--- a/frontend-ng/src/index.scss
+++ b/frontend-ng/src/index.scss
@@ -25,3 +25,4 @@
 @import 'styles/channel';
 @import 'styles/subpage';
 @import 'styles/tree';
+@import 'styles/tooltips';


=
frontend-ng/src/styles/_channel.scss
=
--- a/frontend-ng/src/styles/_channel.scss
+++ b/frontend-ng/src/styles/_channel.scss
@@ -12,6 +12,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+$help-icon-width: 24px;
+
 .mask {
   height: 100%;
   left: 0;
@@ -50,10 +52,9 @@ md-input-container.input-container-picker {
   cursor: default;
   position: absolute;
   top: 10px;
-  right: -24px;
+  right: -$help-icon-width;
 }
 
-md-tooltip.tooltip-multiline ._md-content {
-  height: auto;
-  white-space: pre;
+.tooltip-help-icon ._md-content {
+  max-width: $subpage-max-width - $help-icon-width;  // avoid that help icon 
tooltips get wider than the subpage
 }


=
frontend-ng/src/styles/_subpage.scss
=
--- a/frontend-ng/src/styles/_subpage.scss
+++ b/frontend-ng/src/styles/_subpage.scss
@@ -17,5 +17,5 @@
 }
 
 .subpage-form {
-  width: 570px; // avoid that subpage forms get too wide
-}
\ No newline at end of file
+  width: $subpage-max-width; // avoid that subpage forms get too wide
+}


=
frontend-ng/src/styles/_tooltips.scss
=
--- /dev/null
+++ b/frontend-ng/src/styles/_tooltips.scss
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2016 Hippo B.V. (http://www.onehippo.com)
+ *
+ * Licensed 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.
+ */
+md-tooltip {
+  ._md-content {
+background-color: $tooltip-bg !important;
+  }
+
+  &.tooltip-multiline ._md-content {
+height: auto;
+white-space: pre;
+  }
+}
+


=
frontend-ng/src/styles/_variables.scss
=
--- a/frontend-ng/src/styles/_variables.scss
+++ b/frontend-ng/src/styles/_variables.scss
@@ -42,3 +42,9 @@ $tree-active-color: 

[HippoCMS-scm] [Git][cms-community/hippo-repository][master] 2 commits: REPO-1428: to avoid NPE, assume it's string type if type cannot be inferred by t…

2016-05-30 Thread Unico Hommes
Unico Hommes pushed to branch master at cms-community / hippo-repository


Commits:
898ab0c7 by Woonsan Ko at 2016-02-09T14:00:37-05:00
REPO-1428: to avoid NPE, assume it's string type if type cannot be inferred by 
the empty value array.

- - - - -
71fec3e0 by Unico Hommes at 2016-05-30T11:14:53+02:00
Merge branch 'bugfix/REPO-1428' into 'master'

REPO-1428: to avoid NPE, assume it's string type if type cannot be inferred by 
the empty value array.



See merge request !1
- - - - -


2 changed files:

- testutils/src/main/java/org/onehippo/repository/mock/MockNode.java
- testutils/src/test/java/org/onehippo/repository/mock/MockNodeTest.java


Changes:

=
testutils/src/main/java/org/onehippo/repository/mock/MockNode.java
=
--- a/testutils/src/main/java/org/onehippo/repository/mock/MockNode.java
+++ b/testutils/src/main/java/org/onehippo/repository/mock/MockNode.java
@@ -275,9 +275,12 @@ public class MockNode extends MockItem implements 
HippoNode {
 
 @Override
 public Property setProperty(final String name, final Value[] values) 
throws RepositoryException {
-Property p = getPropertyOrAddNew(name, values[0].getType());
-p.setValue(values);
-return p;
+if (values.length > 0) {
+return setProperty(name, values, values[0].getType());
+} else {
+// If type cannot be inferred by the given value, then let's 
assume it as string in mock utils..
+return setProperty(name, values, PropertyType.STRING);
+}
 }
 
 @Override


=
testutils/src/test/java/org/onehippo/repository/mock/MockNodeTest.java
=
--- a/testutils/src/test/java/org/onehippo/repository/mock/MockNodeTest.java
+++ b/testutils/src/test/java/org/onehippo/repository/mock/MockNodeTest.java
@@ -15,6 +15,16 @@
  */
 package org.onehippo.repository.mock;
 
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.math.BigDecimal;
@@ -46,20 +56,9 @@ import javax.jcr.version.VersionManager;
 
 import org.apache.commons.io.IOUtils;
 import org.apache.jackrabbit.util.ISO8601;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.onehippo.repository.util.JcrConstants;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
 public class MockNodeTest {
 
 @Test
@@ -611,6 +610,8 @@ public class MockNodeTest {
 node.setProperty("datearray1", new MockValue[] { new 
MockValue(PropertyType.DATE, "2013-10-30T00:00:00.000Z"), new 
MockValue(PropertyType.DATE, "2013-10-31T00:00:00.000Z") });
 node.setProperty("doublearray1", new MockValue[] { new 
MockValue(PropertyType.DOUBLE, "1.23"), new MockValue(PropertyType.DOUBLE, 
"4.56") });
 node.setProperty("bigdecimalarray1", new MockValue[] { new 
MockValue(PropertyType.DECIMAL, "1.23E3"), new MockValue(PropertyType.DECIMAL, 
"4.56E3") });
+node.setProperty("emtpystringarray1", new MockValue[0], 
PropertyType.STRING);
+node.setProperty("emtpystringarray2", new MockValue[0]);
 
 Value [] values = node.getProperty("stringarray1").getValues();
 assertEquals(2, values.length);
@@ -641,6 +642,11 @@ public class MockNodeTest {
 assertEquals(2, values.length);
 assertEquals(new BigDecimal("1.23E3"), values[0].getDecimal());
 assertEquals(new BigDecimal("4.56E3"), values[1].getDecimal());
+
+values = node.getProperty("emtpystringarray1").getValues();
+assertEquals(0, values.length);
+values = node.getProperty("emtpystringarray2").getValues();
+assertEquals(0, values.length);
 }
 
 @Test



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/compare/a5b8eb2eba2e012feeffeba39bbcf9e4eef6d1c7...71fec3e0aa50b196a66b58d8006f8da0e89d771f
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-repository] Deleted branch bugfix/REPO-1428

2016-05-30 Thread Unico Hommes
Unico Hommes deleted branch bugfix/REPO-1428 at cms-community / hippo-repository
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/cmng-psp1-CHANNELMGR-699] CHANNELMGR-699 Remove duplicate QA class and unwanted layout-padding

2016-05-30 Thread Tobias Jeger
Tobias Jeger pushed to branch feature/cmng-psp1-CHANNELMGR-699 at cms-community 
/ hippo-addon-channel-manager


Commits:
0ce35883 by Tobias Jeger at 2016-05-30T09:59:06+02:00
CHANNELMGR-699 Remove duplicate QA class and unwanted layout-padding

- - - - -


2 changed files:

- frontend-ng/src/angularjs/channel/menu/editor.html
- frontend-ng/src/angularjs/channel/subpage/content/subpageContent.html


Changes:

=
frontend-ng/src/angularjs/channel/menu/editor.html
=
--- a/frontend-ng/src/angularjs/channel/menu/editor.html
+++ b/frontend-ng/src/angularjs/channel/menu/editor.html
@@ -63,7 +63,6 @@
   
   


=
frontend-ng/src/angularjs/channel/subpage/content/subpageContent.html
=
--- a/frontend-ng/src/angularjs/channel/subpage/content/subpageContent.html
+++ b/frontend-ng/src/angularjs/channel/subpage/content/subpageContent.html
@@ -16,8 +16,7 @@
 
 
+flex>
   
   
 



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/0ce3588356dcaf4bb390ee430c2d96b2d2d18a13
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Pushed new branch feature/cmng-psp1-CHANNELMGR-699

2016-05-30 Thread Tobias Jeger
Tobias Jeger pushed new branch feature/cmng-psp1-CHANNELMGR-699 at 
cms-community / hippo-addon-channel-manager
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Deleted branch feature/cmng-psp1-CHANNELMGR-638a

2016-05-30 Thread Tobias Jeger
Tobias Jeger deleted branch feature/cmng-psp1-CHANNELMGR-638a at cms-community 
/ hippo-addon-channel-manager
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-cms][feature/CMS-9884] 44 commits: CMS-10008 Make AbstractFieldPlugin.onAddRenderService() non-final

2016-05-30 Thread Canh Ngo
Canh Ngo pushed to branch feature/CMS-9884 at cms-community / hippo-cms


Commits:
74d0c3c5 by Ard Schrijvers at 2016-04-18T10:54:09+02:00
CMS-10008 Make AbstractFieldPlugin.onAddRenderService() non-final

Given that
1) the instance variable 'mode' is a protected member (and not private)
2) onBeforeRender() is not final
it does not make much sense that onAddRenderService() is final.

- - - - -
c147b6f2 by Unico Hommes at 2016-04-18T14:56:18+02:00
CMS-10054 prevent name clash with other workflow-translations.json file in 
workflow module

- - - - -
09176fb6 by Jasper Floor at 2016-04-19T11:31:52+02:00
CMS-10040 return extension based media type for application/zip detected files 
(to correct type for open document format and other zip derived file types) and 
unit tests for same

- - - - -
022cb62e by Jasper Floor at 2016-04-21T09:19:38+02:00
CMS-10040 fix unit test

- - - - -
1d50d5ec by Saimir Muco at 2016-04-21T11:16:13+02:00
CMS-10040 organize imports

- - - - -
e8b6ffe6 by Jasper Floor at 2016-04-21T15:27:56+02:00
CMS-10040 Merge remote-tracking branch 'remotes/origin/HEAD' into 
bugfix/CMS-10040

- - - - -
fe0222d9 by Oscar Scholten at 2016-04-22T17:16:47+02:00
CMS-10066: Updating page title to 11
- - - - -
b7212704 by Tobias Jeger at 2016-04-26T13:13:51+02:00
CMS-10040 Merge bugfix into master

- - - - -
6bd94213 by Woonsan Ko at 2016-04-26T13:31:03-04:00
CMS-10079: adding more diagnostics logging in EditorPlugin with document path 
and type info attributes

- - - - -
3baa3b7e by Woonsan Ko at 2016-04-26T14:35:04-04:00
CMS-10078: adding unitThresholdTimeMillisec option to filter out subtasks in 
diagnostics report

- - - - -
cd590c69 by Woonsan Ko at 2016-04-26T19:39:36-04:00
CMS-10079: adding current viewing or editing document path and type info in HDC 
logging

- - - - -
f9454172 by Arent-Jan Banck at 2016-04-28T11:57:41+02:00
CMS-10040 Add license header
- - - - -
bdb9ee78 by Oscar Scholten at 2016-04-28T12:39:25+02:00
CMS-10066: Updating page title to 11
- - - - -
bdd8a8f2 by Unico Hommes at 2016-04-28T14:29:25+02:00
CMS-10081
- default locales only includes english
- get included cms locales configuration from global settings

- - - - -
89165923 by Ate Douma at 2016-04-28T14:52:41+02:00
CMS-10082: Remove translations resource bundles which are now managed within 
hippo-cms-translations project

- - - - -
912c02ff by Arthur Bogaart at 2016-04-29T11:12:18+02:00
CMS-10071 Expose cookie methods to subclasses of LoginPanel

- - - - -
3227fc1d by Ate Douma at 2016-05-02T11:26:09+02:00
CMS-10082: restore not-yet-scanned translation resource bundles until CMS-10085 
is fixed
- also cleanup a few more no longer used properties files

- - - - -
de37ccee by Ate Douma at 2016-05-02T15:15:23+02:00
CMS-10082: Remove translations resource bundles which are now managed within 
hippo-cms-translations project

- - - - -
b0a362b4 by Unico Hommes at 2016-05-03T10:38:03+02:00
CMS-10081 reload global cms settings configuration

- - - - -
50473a2e by Arthur Bogaart at 2016-05-03T13:16:13+02:00
CMS-10070 Add DateTimePrinter utility and unit test

- - - - -
43973b3e by Arthur Bogaart at 2016-05-03T13:17:52+02:00
CMS-10070 Expose TimeZone from UserSession

Simpler code and easier mock in unt test

- - - - -
6877911c by Arthur Bogaart at 2016-05-03T13:19:50+02:00
CMS-10070 Use new DateTimePrinter to format date output

- - - - -
426250f5 by Arthur Bogaart at 2016-05-03T13:21:58+02:00
CMS-10070 Fix styling on schedule (de)publication dialog and doc-info dialog

The 'reset' button looks very weird in the date-picker dialog. Removed the 
breaking style and fixed font-size/position.
Also fixed the sizing of the doc-info dialog.

- - - - -
6f7783ef by Arthur Bogaart at 2016-05-03T13:22:40+02:00
CMS-10070 Code format

- - - - -
77671fe5 by Mathijs den Burger at 2016-05-09T10:53:33+02:00
CMS-10070 fallback to default time zone if needed

- - - - -
8da771a1 by Mathijs den Burger at 2016-05-09T10:56:43+02:00
CMS-10070 translate  (DST) suffix

- - - - -
d5387b91 by Mathijs den Burger at 2016-05-09T10:57:23+02:00
CMS-10070 Reintegrate 'bugfix/CMS-10070'

- - - - -
bb8c2b11 by Mathijs den Burger at 2016-05-09T14:14:05+02:00
CMS-10070 fix unit test

Use the ClassResourceModel constructor with a style to avoid that
the test fails on a non-existing Wicket session. Extend PluginTest
to ensure that an Application is available (needed by the
ClassResourceModel).

- - - - -
e8ac8cd5 by Mathijs den Burger at 2016-05-09T14:15:13+02:00
CMS-10070 Reintegrate 'bugfix/CMS-10070'

- - - - -
c1ea4d63 by Mathijs den Burger at 2016-05-10T09:50:42+02:00
CMS-10070 make DateTimeLabel serializable

Otherwise Wicket cannot serialize the session, which causes huge
stack traces in development mode.

- - - - -
bf334469 by Mathijs den Burger at 2016-05-10T09:54:20+02:00
CMS-10096 don't overwrite passed event listeners in constructor

- - - - -
e35b151d by Mathijs den Burger at 2016-05-10T12:45:06+02:00
CMS-10070 move non-English translations to l10n module