Elgg  Version 5.1
install.js
Go to the documentation of this file.
1 $(function() {
2  // prevent double-submission of forms
3  $('form').submit(function() {
4  if ($(this).data('submitted')) {
5  return false;
6  }
7 
8  $(this).data('submitted', true);
9  return true;
10  });
11 
12  // toggle the disable attribute of text box based on checkbox
13  $('.elgg-combo-checkbox').click(function() {
14  if ($(this).is(':checked')) {
15  $(this).prev().attr('disabled', true);
16  $(this).prev().val('');
17  } else {
18  $(this).prev().attr('disabled', false);
19  }
20  });
21 
22  $('.elgg-install-language').change(function(index, elem) {
23  location.href = $(this).val();
24  });
25 });
26 
27 elgg = {
28  installer: {}
29 };
30 
34 elgg.installer.rewriteTest = function(url, success_msg, nextURL) {
35  $.ajax(url, {
36  success: function(data, status, xhr) {
37  if (data == 'success') {
38  $('.elgg-require-rewrite li').attr('class', 'pass elgg-message elgg-message-success')
39  .html('<p>' + success_msg + '</p>');
40  $('.elgg-install-nav a.elgg-state-disabled')
41  .removeClass('elgg-state-disabled')
42  .attr('href', nextURL);
43  }
44  }
45  });
46 };
elgg
Definition: install.js:27
function elgg combo checkbox click(function(){if($(this).is(':checked')){$(this).prev().attr('disabled', true);$(this).prev().val('');}else{$(this).prev().attr('disabled', false);}})
elgg install language change(function(index, elem){location.href=$(this).val();})