aboutsummaryrefslogtreecommitdiff
path: root/mod/embed/views/default
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-06-30 18:31:13 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-06-30 18:31:13 +0000
commit554a8175469fbe7594ec6587335e77e95b2b14e7 (patch)
treec210fa99bc7bd3cc276e953041a44230fc826018 /mod/embed/views/default
parent723644d298bcd212fb19bdfb8e471fcebcb2d814 (diff)
downloadelgg-554a8175469fbe7594ec6587335e77e95b2b14e7.tar.gz
elgg-554a8175469fbe7594ec6587335e77e95b2b14e7.tar.bz2
Was in the wrong path for the previous commit. Now embed correctly support losely coupled insert JS views.
git-svn-id: http://code.elgg.org/elgg/trunk@6597 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/embed/views/default')
-rw-r--r--mod/embed/views/default/embed/addcontentjs.php7
-rw-r--r--mod/embed/views/default/embed/js.php13
2 files changed, 18 insertions, 2 deletions
diff --git a/mod/embed/views/default/embed/addcontentjs.php b/mod/embed/views/default/embed/addcontentjs.php
index f5533c22e..c32d90871 100644
--- a/mod/embed/views/default/embed/addcontentjs.php
+++ b/mod/embed/views/default/embed/addcontentjs.php
@@ -1,2 +1,5 @@
- var entity;
- $('textarea[name=' + textAreaName + ']').val($('textarea[name=' + textAreaName + ']').val() + ' ' + content); \ No newline at end of file
+<?php
+/**
+ * Blank for compatibility.
+ */
+?> \ No newline at end of file
diff --git a/mod/embed/views/default/embed/js.php b/mod/embed/views/default/embed/js.php
index c98fe63da..c8fe3bc53 100644
--- a/mod/embed/views/default/embed/js.php
+++ b/mod/embed/views/default/embed/js.php
@@ -6,14 +6,27 @@
?>
function elggEmbedInsertContent(content, textAreaName) {
content = ' ' + content + ' ';
+
+ // default input.
+ // if this doesn't match anything it won't add anything.
+ $('textarea[name=' + textAreaName + ']').val($('textarea[name=' + textAreaName + ']').val() + ' ' + content);
+
<?php
// This view includes the guts of the function to do the inserting.
// Anything that overrides input/longtext with its own editor
// needs to supply its own function here that inserts
// content into textAreaName.
// See TinyMCE as an example.
+
+ // for compatibility
+ // the old on that was overriden.
echo elgg_view('embed/addcontentjs');
+
+ // the one you should extend.
+ echo elgg_view('embed/custom_insert_js');
?>
+
+
$.facebox.close();
}