Repository: Products.CMFPlone
Branch: refs/heads/master
Date: 2014-12-27T07:45:40+01:00
Author: Timo Stollenwerk (tisto) <tisto@plone.org>
Commit: https://github.com/plone/Products.CMFPlone/commit/3c57208e3cb63af389eb46b0f5de417b64e6e3e8

Revert "Cleaning js and jquery as default on production"

This commit broke eight Plone 5 robot tests:

http://jenkins.plone.org/job/plone-5.0-python-2.7-robot/

This reverts commit 9ca5867997be7b4c9984e66501b7eb3a0ee0de2c.

Files changed:
A Products/CMFPlone/profiles/dependencies/jsregistry.xml
M Products/CMFPlone/profiles/dependencies/registry.xml
M Products/CMFPlone/resources/browser/scripts.py
M Products/CMFPlone/static/plone.less
M Products/CMFPlone/tests/testCSSandJSRegistry.py

diff --git a/Products/CMFPlone/profiles/dependencies/jsregistry.xml b/Products/CMFPlone/profiles/dependencies/jsregistry.xml
new file mode 100644
index 0000000..be011d4
--- /dev/null
+++ b/Products/CMFPlone/profiles/dependencies/jsregistry.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<object name="portal_javascripts" meta_type="JavaScripts Registry">
+
+
+
+ <!-- Libraries -->
+
+
+
+ <!-- Old needs to be moved -->
+
+
+ <!-- Plone main js -->
+
+
+ <!-- BBB Plone main js -->
+
+ <!-- Only for logged-in users -->
+ <javascript id="table_sorter.js" authenticated="True" />
+ <javascript id="unlockOnFormUnload.js" authenticated="True" />
+</object>
diff --git a/Products/CMFPlone/profiles/dependencies/registry.xml b/Products/CMFPlone/profiles/dependencies/registry.xml
index 15c81ef..771e113 100644
--- a/Products/CMFPlone/profiles/dependencies/registry.xml
+++ b/Products/CMFPlone/profiles/dependencies/registry.xml
@@ -628,7 +628,7 @@
 
   <records prefix="plone.resources/translate"
             interface='Products.CMFPlone.interfaces.IResourceRegistry'>
-      <value key="js">++resource++mockupjs/i18n-wrapper.js</value>
+      <value key="js">++resource++mockupjs/i18n-wrapper</value>
   </records>
 
  <!-- Patterns -->
@@ -841,6 +841,14 @@
             interface='Products.CMFPlone.interfaces.IResourceRegistry'>
       <value key="js">jquery.highlightsearchterms.js</value>
   </records>
+  <records prefix="plone.resources/table_sorter"
+            interface='Products.CMFPlone.interfaces.IResourceRegistry'>
+      <value key="js">table_sorter.js</value>
+  </records>
+  <records prefix="plone.resources/unlockOnFormUnload"
+            interface='Products.CMFPlone.interfaces.IResourceRegistry'>
+      <value key="js">unlockOnFormUnload.js</value>
+  </records>
 
   <!-- disabled -->
   <records prefix="plone.resources/mark_special_links"
diff --git a/Products/CMFPlone/resources/browser/scripts.py b/Products/CMFPlone/resources/browser/scripts.py
index 8ebda22..6a5ea59 100644
--- a/Products/CMFPlone/resources/browser/scripts.py
+++ b/Products/CMFPlone/resources/browser/scripts.py
@@ -48,18 +48,18 @@ def scripts(self):
         """
         result = []
         # We always add jquery resource
-        result.append({
-            'src': '%s/%s' % (
-                self.portal_url,
-                self.registry.records['plone.resources/jquery.js'].value),
-            'conditionalcomment': None,
-            'bundle': 'basic'
-        })
         if self.development:
             # We need to add require.js and config.js
             result.append({
                 'src': '%s/%s' % (
                     self.portal_url,
+                    self.registry.records['plone.resources/jquery.js'].value),
+                'conditionalcomment': None,
+                'bundle': 'basic'
+            })
+            result.append({
+                'src': '%s/%s' % (
+                    self.portal_url,
                     self.registry.records['plone.resources.less-variables'].value),  # noqa
                 'conditionalcomment': None,
                 'bundle': 'basic'
diff --git a/Products/CMFPlone/static/plone.less b/Products/CMFPlone/static/plone.less
index 091f64b..0eba0b2 100644
--- a/Products/CMFPlone/static/plone.less
+++ b/Products/CMFPlone/static/plone.less
@@ -1,16 +1,4 @@
 @fontsPrefix: './fonts/';
-@bowerPath: './components/';
-@mockup-patterns-select2: '.';
-@mockup-patterns-pickadate: '.';
-@mockup-patterns-relateditems: '.';
-@mockup-patterns-querystring: '.';
-@mockup-patterns-autotoc: '.';
-@mockup-patterns-modal: '.';
-@mockup-patterns-structure: '.';
-@mockup-patterns-upload: '.';
-@plone-patterns-toolbar: '.';
-@mockup-patterns-tinymce: '.';
-
 
 @import url("@{mockup-patterns-select2}");
 @import url("@{mockup-patterns-pickadate}");
diff --git a/Products/CMFPlone/tests/testCSSandJSRegistry.py b/Products/CMFPlone/tests/testCSSandJSRegistry.py
index 9984aea..f7c5386 100644
--- a/Products/CMFPlone/tests/testCSSandJSRegistry.py
+++ b/Products/CMFPlone/tests/testCSSandJSRegistry.py
@@ -55,6 +55,7 @@ def testDefaultJSIsInstalled(self):
             '++resource++plone.js',
             'jquery.highlightsearchterms.js',
             'mark_special_links.js',
+            'table_sorter.js',
             'plone_javascript_variables.js',
             ]
         js_files = [x.js for x in installedResources.values()]