From 339479089e15cb451f8d1431fc1f31e9b90b35b6 Mon Sep 17 00:00:00 2001 From: tobes Date: Wed, 19 Sep 2012 10:19:16 +0100 Subject: [PATCH 01/37] Fanstatic fixes for resource upload --- ckan/public/base/javascript/resource.config | 2 ++ ckan/public/base/vendor/resource.config | 7 +++++++ ckan/templates/package/new_resource.html | 6 +----- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ckan/public/base/javascript/resource.config b/ckan/public/base/javascript/resource.config index 3af45427c83..776a2d922c8 100644 --- a/ckan/public/base/javascript/resource.config +++ b/ckan/public/base/javascript/resource.config @@ -41,3 +41,5 @@ main = modules/autocomplete.js modules/custom-fields.js modules/related-item.js + modules/resource-form.js + modules/resource-upload-field.js diff --git a/ckan/public/base/vendor/resource.config b/ckan/public/base/vendor/resource.config index 9e711134c9f..363eb10fcb4 100644 --- a/ckan/public/base/vendor/resource.config +++ b/ckan/public/base/vendor/resource.config @@ -23,6 +23,7 @@ block_html5_shim = [depends] vendor = jquery.js +fileupload = jquery.js [groups] @@ -38,3 +39,9 @@ vendor = bootstrap/js/bootstrap-tab.js bootstrap/js/bootstrap-button.js font-awesome/css/font-awesome-ie7.css + + +fileupload = + jquery.ui.widget.js + jquery-fileupload/jquery.iframe-transport.js + jquery-fileupload/jquery.fileupload.js diff --git a/ckan/templates/package/new_resource.html b/ckan/templates/package/new_resource.html index faa93ee9ea7..52a114e39a9 100644 --- a/ckan/templates/package/new_resource.html +++ b/ckan/templates/package/new_resource.html @@ -23,11 +23,7 @@

{{ _('What {% block scripts %} {{ super() }} - - - - - + {% resource 'vendor/fileupload' %} {% endblock %} {% block breadcrumb_content %} From febac8ae7bcc7659a1f191b4bfae9666211d01d6 Mon Sep 17 00:00:00 2001 From: tobes Date: Wed, 19 Sep 2012 10:33:51 +0100 Subject: [PATCH 02/37] Fanstatic fixes remove commented out scripts --- ckan/templates/package/resource_read.html | 29 ------------ .../snippets/recline-extra-footer.html | 19 -------- .../snippets/recline-extra-header.html | 46 ------------------- 3 files changed, 94 deletions(-) delete mode 100644 ckan/templates/snippets/recline-extra-footer.html delete mode 100644 ckan/templates/snippets/recline-extra-header.html diff --git a/ckan/templates/package/resource_read.html b/ckan/templates/package/resource_read.html index ecc077a4688..1436871a2d6 100644 --- a/ckan/templates/package/resource_read.html +++ b/ckan/templates/package/resource_read.html @@ -116,38 +116,9 @@

Resource I {% endblock %} {% endblock %} -{% block styles %} - {{ super() }} - {# - - - - - - #} -{% endblock %} {% block scripts %} {{ super() }} - {# - - - - - - - - - - - - - - - - #} {% resource 'datapreview/datapreview' %} - - - - - - - - - - - diff --git a/ckan/templates/snippets/recline-extra-header.html b/ckan/templates/snippets/recline-extra-header.html deleted file mode 100644 index 0bd8333a666..00000000000 --- a/ckan/templates/snippets/recline-extra-header.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - From a5683cb48c12c3103d979dd4fdb5125f2f2c4a8f Mon Sep 17 00:00:00 2001 From: tobes Date: Wed, 19 Sep 2012 10:34:10 +0100 Subject: [PATCH 03/37] Fanstatic fixes add extra comment re script tag abuse --- ckan/templates/base.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ckan/templates/base.html b/ckan/templates/base.html index 9073de45052..87e7a8efe13 100644 --- a/ckan/templates/base.html +++ b/ckan/templates/base.html @@ -103,6 +103,8 @@ {# The scripts block allows you to add additonal scripts to the page. Use the super() function to load the default scripts before/after your own. + NOTE: Scripts should be loaded by the {% resource %} tag except + in very special circumstances DO NOT USE THIS mETHOD FOR ADDING SCRIPTS. Example: From c973d36f8a920d3de5f3c568e90524bdc57e39e0 Mon Sep 17 00:00:00 2001 From: tobes Date: Wed, 19 Sep 2012 10:36:00 +0100 Subject: [PATCH 04/37] Fanstatic fixes fix case in comment --- ckan/templates/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckan/templates/base.html b/ckan/templates/base.html index 87e7a8efe13..cfc63b5fc67 100644 --- a/ckan/templates/base.html +++ b/ckan/templates/base.html @@ -104,7 +104,7 @@ The scripts block allows you to add additonal scripts to the page. Use the super() function to load the default scripts before/after your own. NOTE: Scripts should be loaded by the {% resource %} tag except - in very special circumstances DO NOT USE THIS mETHOD FOR ADDING SCRIPTS. + in very special circumstances DO NOT USE THIS METHOD FOR ADDING SCRIPTS. Example: From 122cf345101e25ac660b724788d40a27b1c02ced Mon Sep 17 00:00:00 2001 From: tobes Date: Mon, 17 Sep 2012 18:05:10 +0100 Subject: [PATCH 05/37] Fix html for internal tracking --- ckan/templates_legacy/snippets/internal-tracking.html | 1 + 1 file changed, 1 insertion(+) diff --git a/ckan/templates_legacy/snippets/internal-tracking.html b/ckan/templates_legacy/snippets/internal-tracking.html index 1239850854f..6979935caa4 100644 --- a/ckan/templates_legacy/snippets/internal-tracking.html +++ b/ckan/templates_legacy/snippets/internal-tracking.html @@ -3,6 +3,7 @@ xmlns:i18n="http://genshi.edgewall.org/i18n" xmlns:py="http://genshi.edgewall.org/" xmlns:xi="http://www.w3.org/2001/XInclude" + py:strip="True" >