Skip to content

Commit

Permalink
Merge pull request #9687 from jdalsem/notifications_checkbox
Browse files Browse the repository at this point in the history
Notifications checkbox
  • Loading branch information
hypeJunction committed Apr 14, 2016
2 parents c804e32 + a95ecc6 commit 93250e5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<script>
function setCollection(members, method, id) {
for ( var i in members ) {
var checked = $('#' + method + 'collections' + id).children("INPUT[type='checkbox']").attr('checked');
if ($("#"+method+members[i]).children("INPUT[type='checkbox']").attr('checked') != checked) {
$("#"+method+members[i]).children("INPUT[type='checkbox']").attr('checked', checked);
var checked = $('#' + method + 'collections' + id).children("INPUT[type='checkbox']").prop('checked');
if ($("#"+method+members[i]).children("INPUT[type='checkbox']").prop('checked') != checked) {
$("#"+method+members[i]).children("INPUT[type='checkbox']").prop('checked', checked);
functioncall = 'adjust' + method + '_alt("'+method+members[i]+'");';
eval(functioncall);
}
Expand All @@ -32,7 +32,7 @@ functioncall = 'adjust' + method + '_alt("'+method+members[i]+'");';
<tr>
<td>&nbsp;</td>
<?php
$i = 0;
$i = 0;
$NOTIFICATION_HANDLERS = _elgg_services()->notifications->getMethodsAsDeprecatedGlobal();
foreach($NOTIFICATION_HANDLERS as $method => $foo) {
if ($i > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

$NOTIFICATION_HANDLERS = _elgg_services()->notifications->getMethodsAsDeprecatedGlobal();

?>
?>
<?php //@todo JS 1.8: no ?>
<script>
require(['jquery'], function($) {
Expand All @@ -19,7 +19,7 @@
?>
});
});
<?php
<?php
foreach($NOTIFICATION_HANDLERS as $method => $foo) {
?>
function adjust<?php echo $method; ?>(linkId) {
Expand All @@ -37,10 +37,10 @@ function adjust<?php echo $method; ?>_alt(linkId) {

if (obj.className == "<?php echo $method; ?>toggleOff") {
obj.className = "<?php echo $method; ?>toggleOn";
$('#' + linkId).children("input[type='checkbox']").attr('checked', true);
$('#' + linkId).children("input[type='checkbox']").prop('checked', true);
} else {
obj.className = "<?php echo $method; ?>toggleOff";
$('#' + linkId).children("input[type='checkbox']").attr('checked', false);
$('#' + linkId).children("input[type='checkbox']").prop('checked', false);
}
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions mod/thewire/views/default/thewire.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ elgg.thewire.textCounter = function(textarea, status, limit) {

if (remaining_chars < 0) {
status.parent().addClass("thewire-characters-remaining-warning");
$("#thewire-submit-button").attr('disabled', 'disabled');
$("#thewire-submit-button").prop('disabled', true);
$("#thewire-submit-button").addClass('elgg-state-disabled');
} else {
status.parent().removeClass("thewire-characters-remaining-warning");
$("#thewire-submit-button").removeAttr('disabled', 'disabled');
$("#thewire-submit-button").prop('disabled', false);
$("#thewire-submit-button").removeClass('elgg-state-disabled');
}
};
Expand Down
2 changes: 1 addition & 1 deletion views/default/elgg/UserPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ define(['jquery', 'elgg', 'jquery.ui.autocomplete.html'], function ($, elgg) {
elgg.get(self.handler, {
data: {
term: this.term,
"match_on[]": ($('[name=match_on]', self.$wrapper).attr('checked') ? 'friends' : 'users'),
"match_on[]": ($('[name=match_on]', self.$wrapper).prop('checked') ? 'friends' : 'users'),
name: self.name
},
dataType: 'json',
Expand Down

0 comments on commit 93250e5

Please sign in to comment.