forked from vanilla/vanilla
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/2.0.18'
- Loading branch information
Showing
12 changed files
with
97 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ | |
</div> | ||
</div> | ||
<?php | ||
$this->Form->Close(); | ||
echo $this->Form->Close(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,55 @@ | ||
/************************************************************** | ||
jQuery / Garden CheckColumn Plugin v1 | ||
**************************************************************/ | ||
/* | ||
* Garden CheckColumn Plugin (1.1) | ||
* by Mark O'Sullivan (mark@vanillaforums.com) | ||
* by Tim Gunter (tim@vanillaforums.com) | ||
* | ||
* Copyright (c) 2008 Vanilla Forums, Inc | ||
* Licensed under the GPL (GPL-LICENSE.txt) license. | ||
* | ||
* NOTE: This script requires jQuery to work. | ||
* Download jQuery at www.jquery.com | ||
*/ | ||
|
||
(function($) { | ||
$.fn.checkColumn = function(opt) { | ||
opt = $.extend({ | ||
noOptionsYet: 0 | ||
}, opt); | ||
|
||
// Remove the cellpadding on anchor cells | ||
$(this).find('thead td').css('padding', '0px'); | ||
jQuery(document).ready(function($){ | ||
$.fn.checkColumn = function(opt) { | ||
opt = $.extend({ | ||
noOptionsYet: 0 | ||
}, opt); | ||
|
||
// Remove the cellpadding on anchor cells | ||
$(this).find('thead td').css('padding', '0px'); | ||
|
||
// Handle column heading clicks | ||
$(this).find('thead td').each(function(i,el) { | ||
el = $(el); | ||
var columnIndex = el.prop('cellIndex'); | ||
var text = el.html(); | ||
el.html(''); | ||
|
||
var anchor = $('<a></a>'); | ||
anchor.click(function(event) { | ||
var rows = $(el).parents('table').find('tbody tr'); | ||
var checkbox = false; | ||
rows.each(function(j,row){ | ||
checkbox = $(row).find('td:eq(' + (columnIndex) + ')').find(":checkbox"); | ||
if (checkbox) { | ||
if (checkbox.prop('checked')) { | ||
checkbox.removeAttr('checked'); | ||
} else { | ||
checkbox.prop('checked', 'checked'); | ||
} | ||
} | ||
}) | ||
return false; | ||
}); | ||
anchor.html(text); | ||
anchor.prop('href', '#'); | ||
el.append(anchor); | ||
}); | ||
|
||
// Handle column heading clicks | ||
$(this).find('thead td').each(function() { | ||
var columnIndex = $(this).attr('cellIndex'); | ||
var text = $(this).html(); | ||
var anchor = document.createElement('a'); | ||
anchor.onclick = function(sender) { | ||
var rows = $(this).parents('table').find('tbody tr'); | ||
var checkbox = false; | ||
for (i = 0; i < rows.length; i++) { | ||
checkbox = $(rows[i]).find('td:eq(' + (columnIndex) + ')').find(":checkbox"); | ||
if (checkbox) { | ||
if ($(checkbox).attr('checked')) { | ||
checkbox.removeAttr('checked'); | ||
} else { | ||
checkbox.attr('checked', 'checked'); | ||
} | ||
} | ||
} | ||
return false; | ||
} | ||
anchor.innerHTML = text; | ||
anchor.href = '#'; | ||
$(this).html(anchor); | ||
}); | ||
|
||
// Return the object for chaining | ||
return $(this); | ||
} | ||
|
||
// Return the object for chaining | ||
return $(this); | ||
} | ||
})(jQuery); | ||
|
||
$(function() { | ||
$('table.CheckColumn').checkColumn(); | ||
$('table.CheckColumn').checkColumn(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters