changeset 271:8a21b92d8985

use package XStatic-jQuery-File-Upload, require it in setup.py, remove it from quickinstall
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 03 Jul 2011 01:20:04 +0200
parents 2c12608c7c38
children b062718d313d
files MoinMoin/apps/frontend/views.py MoinMoin/templates/index2.html quickinstall setup.py wikiconfig.py
diffstat 5 files changed, 9 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py	Sun Jul 03 00:58:13 2011 +0200
+++ b/MoinMoin/apps/frontend/views.py	Sun Jul 03 01:20:04 2011 +0200
@@ -453,7 +453,7 @@
 # XXX this has some functional redundancy with "index", solve that later
 @frontend.route('/+index2/<itemname:item_name>', methods=['GET'])
 def index2(item_name):
-    # flat index using jquery.file-upload (see also jfu_server)
+    # flat index using jquery-file-upload (see also jfu_server)
     return render_template('index2.html',
                            item_name=item_name,
                           )
--- a/MoinMoin/templates/index2.html	Sun Jul 03 00:58:13 2011 +0200
+++ b/MoinMoin/templates/index2.html	Sun Jul 03 01:20:04 2011 +0200
@@ -2,7 +2,7 @@
 
 {% block theme_stylesheets %}
 {{ super() }}
-<link rel="stylesheet" href="{{ url_for('serve.files', name='fileupload', filename='jquery.fileupload-ui.css') }}">
+<link rel="stylesheet" href="{{ url_for('serve.files', name='jquery_file_upload', filename='jquery.fileupload-ui.css') }}">
 {% endblock %}
 
 {% block content %}
@@ -31,7 +31,7 @@
         </tr>
     </table>
 </div>
-<script src="{{ url_for('serve.files', name='fileupload', filename='jquery.fileupload.js') }}"></script>
-<script src="{{ url_for('serve.files', name='fileupload', filename='jquery.fileupload-ui.js') }}"></script>
+<script src="{{ url_for('serve.files', name='jquery_file_upload', filename='jquery.fileupload.js') }}"></script>
+<script src="{{ url_for('serve.files', name='jquery_file_upload', filename='jquery.fileupload-ui.js') }}"></script>
 <script src="{{ url_for('static', filename='js/jfu.js') }}"></script>
 {% endblock %}
--- a/quickinstall	Sun Jul 03 00:58:13 2011 +0200
+++ b/quickinstall	Sun Jul 03 01:20:04 2011 +0200
@@ -38,12 +38,6 @@
 download $DIR/mathjax.tgz http://static.moinmo.in/files/packages/mathjax.tar.gz
 tar xz -C $DIR/ -f $DIR/mathjax.tgz
 
-mkdir $DIR/jquery.fu
-download $DIR/jquery.fu/jquery.fileupload.js https://www.github.com/blueimp/jQuery-File-Upload/raw/master/jquery.fileupload.js
-download $DIR/jquery.fu/jquery.fileupload-ui.js https://www.github.com/blueimp/jQuery-File-Upload/raw/master/jquery.fileupload-ui.js
-download $DIR/jquery.fu/jquery.fileupload-ui.css https://www.github.com/blueimp/jQuery-File-Upload/raw/master/jquery.fileupload-ui.css
-download $DIR/jquery.fu/pbar-ani.gif https://www.github.com/blueimp/jQuery-File-Upload/raw/master/pbar-ani.gif
-
 download $DIR/svgweb.zip http://svgweb.googlecode.com/files/svgweb-2010-08-10-Owlephant-1.zip
 unzip -q -o -d $DIR/ $DIR/svgweb.zip
 
--- a/setup.py	Sun Jul 03 00:58:13 2011 +0200
+++ b/setup.py	Sun Jul 03 01:20:04 2011 +0200
@@ -91,6 +91,7 @@
         'py==1.3.4', # py.test 1.3.4 is needed by unit tests
         'sphinx', # needed to build the docs
         'XStatic-jQuery',
+        'XStatic-jQuery-File-Upload',
     ],
     # optional features and their list of requirements
     extras_require = {
--- a/wikiconfig.py	Sun Jul 03 00:58:13 2011 +0200
+++ b/wikiconfig.py	Sun Jul 03 01:20:04 2011 +0200
@@ -62,7 +62,6 @@
         twikidraw = os.path.join(wikiconfig_dir, env_dir, 'TWikiDrawPlugin'),
         svgedit = os.path.join(wikiconfig_dir, env_dir, 'svg-edit'),
         mathjax = os.path.join(wikiconfig_dir, env_dir, 'MathJax'),
-        fileupload = os.path.join(wikiconfig_dir, env_dir, 'jquery.fu'),
     )
 
     # we slowly migrate all stuff from above (old) method, to xstatic (new) method,
@@ -71,6 +70,10 @@
     j = JQuery(root_url='/static', provider='local', protocol='http')
     serve_files.update([(j.name, j.get_mapping()[1])])
 
+    from xstatic.pkg.jquery_file_upload import JQueryFileUpload
+    jfu = JQueryFileUpload(root_url='/static', provider='local', protocol='http')
+    serve_files.update([(jfu.name, jfu.get_mapping()[1])])
+
     # ^^^ DON'T TOUCH THIS EXCEPT IF YOU KNOW WHAT YOU DO ^^^
 
     #item_root = u'Home' # change to some better value