aboutsummaryrefslogtreecommitdiff
path: root/mod/messages
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-14 23:54:38 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-14 23:54:38 +0000
commit1e94b4e29b3d4989eff8d5344bf3415b3fb44b94 (patch)
treefe807ae882366a5f20a831c12ec88b6a8131a18b /mod/messages
parentcaf11e94744c49e1b1533b45f0a44d0aa97704df (diff)
downloadelgg-1e94b4e29b3d4989eff8d5344bf3415b3fb44b94.tar.gz
elgg-1e94b4e29b3d4989eff8d5344bf3415b3fb44b94.tar.bz2
Refs #3016: Removes inline javascript from embed, file, groups, messages, profile, thewire
git-svn-id: http://code.elgg.org/elgg/trunk@8711 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/messages')
-rw-r--r--mod/messages/start.php3
-rw-r--r--mod/messages/views/default/forms/messages/process.php10
-rw-r--r--mod/messages/views/default/forms/messages/reply.php11
-rw-r--r--mod/messages/views/default/messages/js.php9
4 files changed, 12 insertions, 21 deletions
diff --git a/mod/messages/start.php b/mod/messages/start.php
index 24787ae03..5c4081a7b 100644
--- a/mod/messages/start.php
+++ b/mod/messages/start.php
@@ -49,7 +49,8 @@ function messages_init() {
// Extend system CSS with our own styles, which are defined in the messages/css view
elgg_extend_view('css/elgg', 'messages/css');
-
+ elgg_extend_view('js/elgg', 'messages/js');
+
// Register a page handler, so we can have nice URLs
elgg_register_page_handler('messages', 'messages_page_handler');
diff --git a/mod/messages/views/default/forms/messages/process.php b/mod/messages/views/default/forms/messages/process.php
index e415a092b..8eab26297 100644
--- a/mod/messages/views/default/forms/messages/process.php
+++ b/mod/messages/views/default/forms/messages/process.php
@@ -31,13 +31,3 @@ echo elgg_view('input/button', array(
));
echo '</div>';
-
-?>
-<?php //@todo JS 1.8: no ?>
-<script type="text/javascript">
-$(document).ready(function() {
- $("#messages-toggle").click(function() {
- $('input[type=checkbox]').click();
- });
-});
-</script>
diff --git a/mod/messages/views/default/forms/messages/reply.php b/mod/messages/views/default/forms/messages/reply.php
index 2288f25f4..e8a27f03e 100644
--- a/mod/messages/views/default/forms/messages/reply.php
+++ b/mod/messages/views/default/forms/messages/reply.php
@@ -35,13 +35,4 @@ echo elgg_view('input/hidden', array(
</div>
<div>
<?php echo elgg_view('input/submit', array('value' => elgg_echo('messages:send'))); ?>
-</div>
-
-<script type="text/javascript">
-$(document).ready(function() {
- $("#messages-show-reply").click(function() {
- $('#messages-reply-form').slideToggle('medium');
- });
-});
-
-</script> \ No newline at end of file
+</div> \ No newline at end of file
diff --git a/mod/messages/views/default/messages/js.php b/mod/messages/views/default/messages/js.php
new file mode 100644
index 000000000..7ae5f8a08
--- /dev/null
+++ b/mod/messages/views/default/messages/js.php
@@ -0,0 +1,9 @@
+$(function() {
+ $("#messages-toggle").click(function() {
+ $('input[type=checkbox]').click();
+ });
+
+ $("#messages-show-reply").click(function() {
+ $('#messages-reply-form').slideToggle('medium');
+ });
+}); \ No newline at end of file