Adrian Lang has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/201163

Change subject: Move jquery.ui from repo/ to view/
......................................................................

Move jquery.ui from repo/ to view/

jQuery.ui.TemplatedWidget depends on wikibase.templates, which currently is in
repo but will be moved, too.

Change-Id: Iafe73684975a9641692bc09ac169e9b40900df29
---
M repo/resources/Resources.php
M repo/tests/qunit/resources.php
R view/resources/jquery/ui/jquery.ui.EditableTemplatedWidget.js
R view/resources/jquery/ui/jquery.ui.TemplatedWidget.js
R view/resources/jquery/ui/jquery.ui.closeable.css
R view/resources/jquery/ui/jquery.ui.closeable.js
R view/resources/jquery/ui/jquery.ui.tagadata.LICENSE
R view/resources/jquery/ui/jquery.ui.tagadata.css
R view/resources/jquery/ui/jquery.ui.tagadata.js
A view/resources/jquery/ui/resources.php
M view/resources/resources.php
R view/tests/qunit/jquery/ui/jquery.ui.EditableTemplatedWidget.tests.js
R view/tests/qunit/jquery/ui/jquery.ui.TemplatedWidget.tests.js
R view/tests/qunit/jquery/ui/jquery.ui.closeable.tests.js
R view/tests/qunit/jquery/ui/jquery.ui.tagadata.tests.js
A view/tests/qunit/jquery/ui/resources.php
M view/tests/qunit/resources.php
17 files changed, 133 insertions(+), 87 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/63/201163/1

diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php
index 817754d..0193c91 100644
--- a/repo/resources/Resources.php
+++ b/repo/resources/Resources.php
@@ -25,55 +25,6 @@
 
        $modules = array(
 
-               'jquery.ui.closeable' => $moduleTemplate + array(
-                       'scripts' => array(
-                               'jquery.ui/jquery.ui.closeable.js',
-                       ),
-                       'styles' => array(
-                               'jquery.ui/jquery.ui.closeable.css',
-                       ),
-                       'dependencies' => array(
-                               'jquery.ui.TemplatedWidget',
-                       ),
-               ),
-
-               'jquery.ui.tagadata' => $moduleTemplate + array(
-                       'scripts' => array(
-                               'jquery.ui/jquery.ui.tagadata.js',
-                       ),
-                       'styles' => array(
-                               'jquery.ui/jquery.ui.tagadata.css',
-                       ),
-                       'dependencies' => array(
-                               'jquery.event.special.eachchange',
-                               'jquery.effects.blind',
-                               'jquery.inputautoexpand',
-                               'jquery.ui.widget',
-                       ),
-               ),
-
-               'jquery.ui.EditableTemplatedWidget' => $moduleTemplate + array(
-                       'scripts' => array(
-                               
'jquery.ui/jquery.ui.EditableTemplatedWidget.js',
-                       ),
-                       'dependencies' => array(
-                               'jquery.ui.closeable',
-                               'jquery.ui.TemplatedWidget',
-                               'util.inherit',
-                       ),
-               ),
-
-               'jquery.ui.TemplatedWidget' => $moduleTemplate + array(
-                       'scripts' => array(
-                               'jquery.ui/jquery.ui.TemplatedWidget.js',
-                       ),
-                       'dependencies' => array(
-                               'wikibase.templates',
-                               'jquery.ui.widget',
-                               'util.inherit',
-                       ),
-               ),
-
                'jquery.wikibase.entitysearch' => $moduleTemplate + array(
                        'scripts' => array(
                                
'jquery.wikibase/jquery.wikibase.entitysearch.js',
diff --git a/repo/tests/qunit/resources.php b/repo/tests/qunit/resources.php
index aa60b8b..f1f47dc 100644
--- a/repo/tests/qunit/resources.php
+++ b/repo/tests/qunit/resources.php
@@ -17,44 +17,6 @@
 
        $modules = array(
 
-               'jquery.ui.closeable.tests' => $moduleBase + array(
-                       'scripts' => array(
-                               'jquery.ui/jquery.ui.closeable.tests.js',
-                       ),
-                       'dependencies' => array(
-                               'jquery.ui.closeable',
-                       ),
-               ),
-
-               'jquery.ui.tagadata.tests' => $moduleBase + array(
-                       'scripts' => array(
-                               'jquery.ui/jquery.ui.tagadata.tests.js',
-                       ),
-                       'dependencies' => array(
-                               'jquery.ui.tagadata',
-                       ),
-               ),
-
-               'jquery.ui.EditableTemplatedWidget.tests' => $moduleBase + 
array(
-                       'scripts' => array(
-                               
'jquery.ui/jquery.ui.EditableTemplatedWidget.tests.js',
-                       ),
-                       'dependencies' => array(
-                               'jquery.ui.EditableTemplatedWidget',
-                               'wikibase.templates',
-                       ),
-               ),
-
-               'jquery.ui.TemplatedWidget.tests' => $moduleBase + array(
-                       'scripts' => array(
-                               'jquery.ui/jquery.ui.TemplatedWidget.tests.js',
-                       ),
-                       'dependencies' => array(
-                               'jquery.ui.TemplatedWidget',
-                               'wikibase.templates',
-                       ),
-               ),
-
                'jquery.wikibase.entitysearch.tests' => $moduleBase + array(
                        'scripts' => array(
                                
'jquery.wikibase/jquery.wikibase.entitysearch.tests.js',
diff --git a/repo/resources/jquery.ui/jquery.ui.EditableTemplatedWidget.js 
b/view/resources/jquery/ui/jquery.ui.EditableTemplatedWidget.js
similarity index 100%
rename from repo/resources/jquery.ui/jquery.ui.EditableTemplatedWidget.js
rename to view/resources/jquery/ui/jquery.ui.EditableTemplatedWidget.js
diff --git a/repo/resources/jquery.ui/jquery.ui.TemplatedWidget.js 
b/view/resources/jquery/ui/jquery.ui.TemplatedWidget.js
similarity index 100%
rename from repo/resources/jquery.ui/jquery.ui.TemplatedWidget.js
rename to view/resources/jquery/ui/jquery.ui.TemplatedWidget.js
diff --git a/repo/resources/jquery.ui/jquery.ui.closeable.css 
b/view/resources/jquery/ui/jquery.ui.closeable.css
similarity index 100%
rename from repo/resources/jquery.ui/jquery.ui.closeable.css
rename to view/resources/jquery/ui/jquery.ui.closeable.css
diff --git a/repo/resources/jquery.ui/jquery.ui.closeable.js 
b/view/resources/jquery/ui/jquery.ui.closeable.js
similarity index 100%
rename from repo/resources/jquery.ui/jquery.ui.closeable.js
rename to view/resources/jquery/ui/jquery.ui.closeable.js
diff --git a/repo/resources/jquery.ui/jquery.ui.tagadata.LICENSE 
b/view/resources/jquery/ui/jquery.ui.tagadata.LICENSE
similarity index 100%
rename from repo/resources/jquery.ui/jquery.ui.tagadata.LICENSE
rename to view/resources/jquery/ui/jquery.ui.tagadata.LICENSE
diff --git a/repo/resources/jquery.ui/jquery.ui.tagadata.css 
b/view/resources/jquery/ui/jquery.ui.tagadata.css
similarity index 100%
rename from repo/resources/jquery.ui/jquery.ui.tagadata.css
rename to view/resources/jquery/ui/jquery.ui.tagadata.css
diff --git a/repo/resources/jquery.ui/jquery.ui.tagadata.js 
b/view/resources/jquery/ui/jquery.ui.tagadata.js
similarity index 100%
rename from repo/resources/jquery.ui/jquery.ui.tagadata.js
rename to view/resources/jquery/ui/jquery.ui.tagadata.js
diff --git a/view/resources/jquery/ui/resources.php 
b/view/resources/jquery/ui/resources.php
new file mode 100644
index 0000000..4a2ec54
--- /dev/null
+++ b/view/resources/jquery/ui/resources.php
@@ -0,0 +1,71 @@
+<?php
+
+/**
+ * @licence GNU GPL v2+
+ * @author Daniel Werner
+ * @author H. Snater < mediaw...@snater.com >
+ */
+return call_user_func( function() {
+       preg_match( '+' . preg_quote( DIRECTORY_SEPARATOR ) . 
'(?:vendor|extensions)'
+               . preg_quote( DIRECTORY_SEPARATOR ) . '.*+', __DIR__, 
$remoteExtPath );
+
+       $moduleTemplate = array(
+               'localBasePath' => __DIR__,
+               'remoteExtPath' => '..' . $remoteExtPath[0],
+       );
+
+       $modules = array(
+
+               'jquery.ui.closeable' => $moduleTemplate + array(
+                       'scripts' => array(
+                               'jquery.ui.closeable.js',
+                       ),
+                       'styles' => array(
+                               'jquery.ui.closeable.css',
+                       ),
+                       'dependencies' => array(
+                               'jquery.ui.TemplatedWidget',
+                       ),
+               ),
+
+               'jquery.ui.tagadata' => $moduleTemplate + array(
+                       'scripts' => array(
+                               'jquery.ui.tagadata.js',
+                       ),
+                       'styles' => array(
+                               'jquery.ui.tagadata.css',
+                       ),
+                       'dependencies' => array(
+                               'jquery.event.special.eachchange',
+                               'jquery.effects.blind',
+                               'jquery.inputautoexpand',
+                               'jquery.ui.widget',
+                       ),
+               ),
+
+               'jquery.ui.EditableTemplatedWidget' => $moduleTemplate + array(
+                       'scripts' => array(
+                               'jquery.ui.EditableTemplatedWidget.js',
+                       ),
+                       'dependencies' => array(
+                               'jquery.ui.closeable',
+                               'jquery.ui.TemplatedWidget',
+                               'util.inherit',
+                       ),
+               ),
+
+               'jquery.ui.TemplatedWidget' => $moduleTemplate + array(
+                       'scripts' => array(
+                               'jquery.ui.TemplatedWidget.js',
+                       ),
+                       'dependencies' => array(
+                               'wikibase.templates',
+                               'jquery.ui.widget',
+                               'util.inherit',
+                       ),
+               ),
+
+       );
+
+       return $modules;
+} );
diff --git a/view/resources/resources.php b/view/resources/resources.php
index ae40f73..89e3234 100644
--- a/view/resources/resources.php
+++ b/view/resources/resources.php
@@ -7,6 +7,7 @@
 return call_user_func( function() {
        return array_merge(
                include( __DIR__ . '/jquery/resources.php' ),
+               include( __DIR__ . '/jquery/ui/resources.php' ),
                include( __DIR__ . '/wikibase/entityChangers/resources.php' ),
                include( __DIR__ . '/wikibase/view/resources.php' )
        );
diff --git 
a/repo/tests/qunit/jquery.ui/jquery.ui.EditableTemplatedWidget.tests.js 
b/view/tests/qunit/jquery/ui/jquery.ui.EditableTemplatedWidget.tests.js
similarity index 100%
rename from 
repo/tests/qunit/jquery.ui/jquery.ui.EditableTemplatedWidget.tests.js
rename to view/tests/qunit/jquery/ui/jquery.ui.EditableTemplatedWidget.tests.js
diff --git a/repo/tests/qunit/jquery.ui/jquery.ui.TemplatedWidget.tests.js 
b/view/tests/qunit/jquery/ui/jquery.ui.TemplatedWidget.tests.js
similarity index 100%
rename from repo/tests/qunit/jquery.ui/jquery.ui.TemplatedWidget.tests.js
rename to view/tests/qunit/jquery/ui/jquery.ui.TemplatedWidget.tests.js
diff --git a/repo/tests/qunit/jquery.ui/jquery.ui.closeable.tests.js 
b/view/tests/qunit/jquery/ui/jquery.ui.closeable.tests.js
similarity index 100%
rename from repo/tests/qunit/jquery.ui/jquery.ui.closeable.tests.js
rename to view/tests/qunit/jquery/ui/jquery.ui.closeable.tests.js
diff --git a/repo/tests/qunit/jquery.ui/jquery.ui.tagadata.tests.js 
b/view/tests/qunit/jquery/ui/jquery.ui.tagadata.tests.js
similarity index 100%
rename from repo/tests/qunit/jquery.ui/jquery.ui.tagadata.tests.js
rename to view/tests/qunit/jquery/ui/jquery.ui.tagadata.tests.js
diff --git a/view/tests/qunit/jquery/ui/resources.php 
b/view/tests/qunit/jquery/ui/resources.php
new file mode 100644
index 0000000..5ad8710
--- /dev/null
+++ b/view/tests/qunit/jquery/ui/resources.php
@@ -0,0 +1,60 @@
+<?php
+
+/**
+ * @licence GNU GPL v2+
+ * @author H. Snater < mediaw...@snater.com >
+ */
+return call_user_func( function() {
+       $remoteExtPathParts = explode(
+               DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR, 
__DIR__, 2
+       );
+       $moduleBase = array(
+               'localBasePath' => __DIR__,
+               'remoteExtPath' => $remoteExtPathParts[1],
+       );
+
+       $modules = array(
+
+               'jquery.ui.closeable.tests' => $moduleBase + array(
+                       'scripts' => array(
+                               'jquery.ui.closeable.tests.js',
+                       ),
+                       'dependencies' => array(
+                               'jquery.ui.closeable',
+                       ),
+               ),
+
+               'jquery.ui.tagadata.tests' => $moduleBase + array(
+                       'scripts' => array(
+                               'jquery.ui.tagadata.tests.js',
+                       ),
+                       'dependencies' => array(
+                               'jquery.ui.tagadata',
+                       ),
+               ),
+
+               'jquery.ui.EditableTemplatedWidget.tests' => $moduleBase + 
array(
+                       'scripts' => array(
+                               'jquery.ui.EditableTemplatedWidget.tests.js',
+                       ),
+                       'dependencies' => array(
+                               'jquery.ui.EditableTemplatedWidget',
+                               'wikibase.templates',
+                       ),
+               ),
+
+               'jquery.ui.TemplatedWidget.tests' => $moduleBase + array(
+                       'scripts' => array(
+                               'jquery.ui.TemplatedWidget.tests.js',
+                       ),
+                       'dependencies' => array(
+                               'jquery.ui.TemplatedWidget',
+                               'wikibase.templates',
+                       ),
+               ),
+
+       );
+
+       return $modules;
+
+} );
diff --git a/view/tests/qunit/resources.php b/view/tests/qunit/resources.php
index 91449a7..ed48c91 100644
--- a/view/tests/qunit/resources.php
+++ b/view/tests/qunit/resources.php
@@ -6,6 +6,7 @@
  */
 return array_merge(
        include( __DIR__ . '/jquery/resources.php' ),
+       include( __DIR__ . '/jquery/ui/resources.php' ),
        include( __DIR__ . '/wikibase/entityChangers/resources.php' ),
        include( __DIR__ . '/wikibase/view/resources.php' )
 );

-- 
To view, visit https://gerrit.wikimedia.org/r/201163
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iafe73684975a9641692bc09ac169e9b40900df29
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang <adrian.he...@wikimedia.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to