summaryrefslogtreecommitdiff
path: root/modules/g2_import
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2012-05-19 11:28:46 -0700
committerBharat Mediratta <bharat@menalto.com>2012-05-19 11:31:25 -0700
commita9be0691d9efd84cbf5a9f05236caf4df23bcfdb (patch)
tree2b5bcf6ecefb5e93d1f00cb450dd8625fcabfe23 /modules/g2_import
parent74fa9422db01fbc017ddbc847333cc7847f185ab (diff)
Create an ajax response framework that inserts <meta> tags to guard
against UTF-7, and create a $.gallery_autocomplete variant of jQuery's autocomplete that expects the first line to be a <meta> tag and discards it. More complete fix for #1871.
Diffstat (limited to 'modules/g2_import')
-rw-r--r--modules/g2_import/controllers/admin_g2_import.php2
-rw-r--r--modules/g2_import/views/admin_g2_import.html.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/g2_import/controllers/admin_g2_import.php b/modules/g2_import/controllers/admin_g2_import.php
index b07082c9..5edd2a1b 100644
--- a/modules/g2_import/controllers/admin_g2_import.php
+++ b/modules/g2_import/controllers/admin_g2_import.php
@@ -113,7 +113,7 @@ class Admin_g2_import_Controller extends Admin_Controller {
}
}
- print implode("\n", $directories);
+ ajax::response(implode("\n", $directories));
}
private function _get_import_form() {
diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php
index 9c4eb840..22e19f5b 100644
--- a/modules/g2_import/views/admin_g2_import.html.php
+++ b/modules/g2_import/views/admin_g2_import.html.php
@@ -3,7 +3,7 @@
<?= $theme->script("jquery.autocomplete.js") ?>
<script type="text/javascript">
$("document").ready(function() {
- $("form input[name=embed_path]").autocomplete(
+ $("form input[name=embed_path]").gallery_autocomplete(
"<?= url::site("__ARGS__") ?>".replace("__ARGS__", "admin/g2_import/autocomplete"),
{
max: 256,