1
$(document).ready(function() {
2
if($('div.form.login').length) { // in login page
3
$('input#LoginForm_password').focus();
6
$('table.preview input[name="checkAll"]').click(function() {
7
$('table.preview .confirm input').attr('checked', this.checked);
10
$('table.preview td.confirm input').click(function() {
11
$('table.preview input[name="checkAll"]').attr('checked', !$('table.preview td.confirm input:not(:checked)').length);
13
$('table.preview input[name="checkAll"]').attr('checked', !$('table.preview td.confirm input:not(:checked)').length);
15
$('.form .row.sticky input:not(.error), .form .row.sticky select:not(.error), .form .row.sticky textarea:not(.error)').each(function(){
17
if(this.tagName=='SELECT')
18
value=this.options[this.selectedIndex].text;
19
else if(this.tagName=='TEXTAREA')
25
$(this).before('<div class="value">'+value+'</div>').hide();
28
$('.form.gii .row.sticky .value').live('click', function(){
30
$(this).next().show().get(0).focus();
34
$('.form.gii .row input, .form.gii .row textarea, .form.gii .row select, .with-tooltip').not('.no-tooltip, .no-tooltip *').tooltip({
35
position: "center right",
39
$('.form.gii .row input').change(function(){
40
$('.form.gii .feedback').hide();
41
$('.form.gii input[name="generate"]').hide();
44
$('.form.gii .view-code').click(function(){
45
var title=$(this).attr('rel');
46
$.fancybox.showActivity();
50
url: $(this).attr('href'),
51
data: $('.form.gii form').serializeArray(),
52
success: function(data){
55
'titlePosition': 'inside',
56
'titleFormat': function(title, currentArray, currentIndex, currentOpts) {
57
return '<div id="tip7-title"><span><a href="javascript:;" onclick="$.fancybox.close();">close</a></span>' + (title && title.length ? '<b>' + title + '</b>' : '' ) + '</div>';
59
'showCloseButton': false,
60
'autoDimensions': false,
63
'onComplete':function(){
64
$('#fancybox-inner').scrollTop(0);
68
error: function(XMLHttpRequest, textStatus, errorThrown) {
69
$.fancybox('<div class="error">'+XMLHttpRequest.responseText+'</div>');
75
$('#fancybox-inner .close-code').live('click', function(){
b'\\ No newline at end of file'