]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #3294. Erased php code in thewire javascript file and moved character couner...
authorSem <sembrestels@riseup.net>
Sat, 28 Jul 2012 00:46:09 +0000 (02:46 +0200)
committerSem <sembrestels@riseup.net>
Sat, 28 Jul 2012 00:46:09 +0000 (02:46 +0200)
mod/thewire/views/default/js/thewire.php
mod/thewire/views/default/thewire/css.php

index 0a6eba134a4eb90e5b2aeb376da5c51ce49f7f08..ba8f3505030024dd9e35067f52e82b9e1dea6867 100644 (file)
@@ -34,11 +34,11 @@ elgg.thewire.textCounter = function(textarea, status, limit) {
        status.html(remaining_chars);
 
        if (remaining_chars < 0) {
-               status.parent().css("color", "#D40D12");
+               status.parent().addClass("thewire-characters-remaining-warning");
                $("#thewire-submit-button").attr('disabled', 'disabled');
                $("#thewire-submit-button").addClass('elgg-state-disabled');
        } else {
-               status.parent().css("color", "");
+               status.parent().removeClass("thewire-characters-remaining-warning");
                $("#thewire-submit-button").removeAttr('disabled', 'disabled');
                $("#thewire-submit-button").removeClass('elgg-state-disabled');
        }
@@ -57,16 +57,16 @@ elgg.thewire.viewPrevious = function(event) {
        var postGuid = $link.attr("href").split("/").pop();
        var $previousDiv = $("#thewire-previous-" + postGuid);
 
-       if ($link.html() == "<?php echo elgg_echo('thewire:hide'); ?>") {
-               $link.html("<?php echo elgg_echo('thewire:previous'); ?>");
-               $link.attr("title", "<?php echo elgg_echo('thewire:previous:help'); ?>");
+       if ($link.html() == elgg.echo('thewire:hide')) {
+               $link.html(elgg.echo('thewire:previous'));
+               $link.attr("title", elgg.echo('thewire:previous:help'));
                $previousDiv.slideUp(400);
        } else {
-               $link.html("<?php echo elgg_echo('thewire:hide'); ?>");
-               $link.attr("title", "<?php echo elgg_echo('thewire:hide:help'); ?>");
+               $link.html(elgg.echo('thewire:hide'));
+               $link.attr("title", elgg.echo('thewire:hide:help'));
                
                $.ajax({type: "GET",
-                       url: "<?php echo $site_url . "ajax/view/thewire/previous"; ?>",
+                       url: elgg.config.wwwroot + "ajax/view/thewire/previous",
                        dataType: "html",
                        cache: false,
                        data: {guid: postGuid},
index d1ef31993168054b0d88359b28039e9d344210f0..d11cce74ae18c95567fe6add7ce6450056ea07ad 100644 (file)
@@ -27,6 +27,9 @@ The Wire
        text-align: right;
        background: white;
 }
+.thewire-characters-remaining-warning {
+       color: #D40D12 !important;
+}
 .thewire-parent {
        margin-left: 40px;
 }