aboutsummaryrefslogtreecommitdiff
path: root/mod/thewire/views/default/forms
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/thewire/views/default/forms
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/thewire/views/default/forms')
-rw-r--r--mod/thewire/views/default/forms/thewire/add.php36
1 files changed, 3 insertions, 33 deletions
diff --git a/mod/thewire/views/default/forms/thewire/add.php b/mod/thewire/views/default/forms/thewire/add.php
index 956ec7c27..67585b0df 100644
--- a/mod/thewire/views/default/forms/thewire/add.php
+++ b/mod/thewire/views/default/forms/thewire/add.php
@@ -5,6 +5,8 @@
* @uses $vars['post']
*/
+elgg_load_js('elgg.thewire');
+
$post = elgg_extract('post', $vars);
$text = elgg_echo('post');
@@ -30,37 +32,5 @@ echo elgg_view('input/submit', array(
'value' => $text,
'id' => 'thewire-submit-button',
));
-
?>
-</div>
-<script type="text/javascript">
-
-$(document).ready(function() {
- $("#thewire-textarea").bind('keydown', function() {
- textCounter(this, $("#thewire-characters-remaining span"), 140);
- });
- $("#thewire-textarea").bind('keyup', function() {
- textCounter(this, $("#thewire-characters-remaining span"), 140);
- });
-});
-
-function textCounter(textarea, status, limit) {
-
- var remaining_chars = limit - textarea.value.length;
- status.html(remaining_chars);
-
- if (remaining_chars < 0) {
- status.parent().css("color", "#D40D12");
- $("#thewire-submit-button").attr('disabled', 'disabled');
- $("#thewire-submit-button").css('background', '#999999');
- $("#thewire-submit-button").css('border-color', '#999999');
- $("#thewire-submit-button").css('cursor', 'default');
- } else {
- status.parent().css("color", "");
- $("#thewire-submit-button").removeAttr('disabled', 'disabled');
- $("#thewire-submit-button").css('background', '#4690d6');
- $("#thewire-submit-button").css('border-color', '#4690d6');
- $("#thewire-submit-button").css('cursor', 'pointer');
- }
-}
-</script>
+</div> \ No newline at end of file