BMLT Root Server
Functions | Variables
installer.js File Reference

Go to the source code of this file.

Functions

function BMLTInstaller (in_prefs)
 
function convertFormatLangsToJSON (v)
 
 if (!this.m_installer_state)
 
function reactToEmailCheckbox ()
 A global context callback for the email checkboxes being selected. *. More...
 
function gmScriptLoadCompletion ()
 A global context callback for the script load completion. *. More...
 
function BMLT_Installer_AjaxPostRequest (url, callback, data, extra_data)
 A simple, generic AJAX request function. * *. More...
 
function sprintf ()
 

Variables

this reactToMapClick
 This is the callback for a map click or drag end. *. More...
 
this buttonTestForDatabaseSetup
 
  More...
 
this buttonTestForDatabaseSetupCallback
 
  More...
 
this testForDatabaseSetup
 
  More...
 
this testForDatabaseSetupCallback
 
  More...
 
this initializeRootServer
 
  More...
 
this initializeRootServerCallback
 
  More...
 
this geMinPasswordLength
 Returns the minimum password length *. More...
 
this gatherInstallerState
 This gathers the installer state. *. More...
 
this createFileData
 Creates the text for the file *. More...
 
this testMapsApiKey
 Triggered by the TEST KEY button. When no callback is provided, result is * displayed in an alert box. *. More...
 
this m_installer_wrapper_object = document.getElementById('installer_wrapper')
 

Function Documentation

function BMLT_Installer_AjaxPostRequest (   url,
  callback,
  data,
  extra_data 
)

A simple, generic AJAX request function. * *.

Returns
a new XMLHTTPRequest object. *

Create a generic XMLHTTPObject. *

  • This will account for the various flavors imposed by different browsers. *
  • Returns
    a new XMLHTTPRequest object. *
Parameters
urlThe URI to be called
callbackThe success callback
dataFormData object
extra_dataIf supplied, extra data to be delivered to the callback.

Definition at line 763 of file installer.js.

References e, and i.

768  {
769  /************************************************************************************//**
770  * \brief Create a generic XMLHTTPObject. *
771  * *
772  * This will account for the various flavors imposed by different browsers. *
773  * *
774  * \returns a new XMLHTTPRequest object. *
775  ****************************************************************************************/
776 
777  function createXMLHTTPObject() {
778  var XMLHttpArray = [
779  function () {return new XMLHttpRequest()},
780  function () {return new ActiveXObject("Msxml2.XMLHTTP")},
781  function () {return new ActiveXObject("Msxml2.XMLHTTP")},
782  function () {return new ActiveXObject("Microsoft.XMLHTTP")}
783  ];
784 
785  var xmlhttp = false;
786  for (var i=0; i < XMLHttpArray.length; i++) {
787  try {
788  xmlhttp = XMLHttpArray[i]();
789  } catch (e) {
790  continue;
791  }
792  break;
793  }
794 
795  return xmlhttp;
796  }
797 
798  var req = createXMLHTTPObject();
799  req.finalCallback = callback;
800  if (extra_data != null) {
801  req.extra_data = extra_data;
802  }
803  req.open("POST", url, true);
804  req.onreadystatechange = function () {
805  if (req.readyState !== 4) {
806  return;
807  }
808  if (req.status !== 200) {
809  return;
810  }
811  callback(req, req.extra_data);
812  req = null;
813  }
814  req.send(data);
815 
816  return req;
817 }
function e
var i
function BMLTInstaller (   in_prefs)

Shows Page 1 of the installer wizard. It does this by setting the wrapper * className to the first page, which uses CSS to hide the other two pages. *

Shows Page 2 of the installer wizard. It does this by setting the wrapper * className to the first page, which uses CSS to hide the other two pages. *

Shows Page 3 of the installer wizard. It does this by setting the wrapper * className to the first page, which uses CSS to hide the other two pages. *

Shows Page 4 of the installer wizard. It does this by setting the wrapper * className to the first page, which uses CSS to hide the other two pages. *

When a text input (either <input> or <textarea> is initialized, we can set * up a default text value that is displayed when the item is empty and not in * focus. If we don't send in a specific value, then the current value of the * text item is considered to be the default. *

This just makes sure that the className is correct. *

< This is the text item to check.

< true, if the item is in focus

When a text item receives focus, we clear any default text. *

When a text item loses focus, we restore any default text, if the item was * left empty. *

This creates the map for the location tab. *

Parameters
in_prefsA JSON object with the initial prefs.

Definition at line 17 of file installer.js.

References createFileData, m_installer_wrapper_object, testForDatabaseSetup, and testMapsApiKey.

19 {
21  var m_map_object;
22  var m_map_center;
23  var m_installer_state;
24  var m_ajax_uri;
25  var m_ajax_request_in_progress;
26  var m_google_api_key = "";
27  var m_google_maps_script = null;
28  var m_google_api_key_is_good = false;
29  var m_database_credentials_are_good = false;
30  var m_server_admin_password_is_good = false;
31 
32  // #mark -
33  // #mark Page Selection Handlers
34  // #mark -
35 
36  /************************************************************************************//**
37  * \brief Shows Page 1 of the installer wizard. It does this by setting the wrapper *
38  * className to the first page, which uses CSS to hide the other two pages. *
39  ****************************************************************************************/
40  this.selectPage1 = function () {
41  if ( this.m_installer_wrapper_object.className != 'page_1_wrapper' ) {
42  this.m_installer_wrapper_object.className = 'page_1_wrapper';
43  };
44  };
45 
46  /************************************************************************************//**
47  * \brief Shows Page 2 of the installer wizard. It does this by setting the wrapper *
48  * className to the first page, which uses CSS to hide the other two pages. *
49  ****************************************************************************************/
50  this.selectPage2 = function () {
51  if ( this.m_installer_wrapper_object.className != 'page_2_wrapper' ) {
52  this.m_installer_wrapper_object.className = 'page_2_wrapper';
53  };
54  };
55 
56  /************************************************************************************//**
57  * \brief Shows Page 3 of the installer wizard. It does this by setting the wrapper *
58  * className to the first page, which uses CSS to hide the other two pages. *
59  ****************************************************************************************/
60  this.selectPage3 = function () {
61  if ( this.m_installer_wrapper_object.className != 'page_3_wrapper' ) {
62  this.m_installer_wrapper_object.className = 'page_3_wrapper';
63  this.testForDatabaseSetup();
64  };
65  };
66 
67  /************************************************************************************//**
68  * \brief Shows Page 4 of the installer wizard. It does this by setting the wrapper *
69  * className to the first page, which uses CSS to hide the other two pages. *
70  ****************************************************************************************/
71  this.selectPage4 = function () {
72  if ( this.m_installer_wrapper_object.className != 'page_4_wrapper' ) {
73  this.m_installer_wrapper_object.className = 'page_4_wrapper';
74  document.getElementById('database_install_stuff_div').className = 'item_hidden';
75  document.getElementById('file_text_pre').innerHTML = this.createFileData();
76  var apiKeyWarningDiv = document.getElementById('admin_google_api_key_warning');
78  if (apiKeyWarningDiv) {
79  this.testMapsApiKey(function (message) {
80  if (message) {
81  apiKeyWarningDiv.innerHTML = g_maps_api_key_warning + ' ' + message + '<br><a href="javascript:g_installer_object.selectPage2()">' + g_maps_api_key_click_here + '</a>';
82  this.m_google_api_key_is_good = false;
83  } else {
84  apiKeyWarningDiv.innerHTML = '';
85  this.m_google_api_key_is_good = true;
86  }
87  testForDatabaseSetup.call(g_installer_object);
88  });
89  }
90  }
91  };
92 
93  // #mark -
94  // #mark Text Item Handlers
95  // #mark -
96 
97  /************************************************************************************//**
98  * \brief When a text input (either <input> or <textarea> is initialized, we can set *
99  * up a default text value that is displayed when the item is empty and not in *
100  * focus. If we don't send in a specific value, then the current value of the *
101  * text item is considered to be the default. *
102  ****************************************************************************************/
103  this.handleTextInputLoad = function (
104  in_text_item,
105  in_default_value,
106  in_size
107  ) {
108  if ( in_text_item ) {
109  in_text_item.original_value = in_text_item.value;
110 
111  in_text_item.small = false;
112  in_text_item.med = false;
113  in_text_item.tiny = false;
114 
115  if ( in_size ) {
116  if ( in_size == 'tiny' ) {
117  in_text_item.tiny = true;
118  } else if ( in_size == 'small' ) {
119  in_text_item.small = true;
120  } else if ( in_size == 'med' ) {
121  in_text_item.med = true;
122  };
123  };
124 
125  if ( in_default_value != null ) {
126  in_text_item.defaultValue = in_default_value;
127  } else {
128  in_text_item.defaultValue = in_text_item.value;
129  };
130 
131  in_text_item.value = in_text_item.original_value;
132 
133  if ( !in_text_item.value || (in_text_item.value == in_text_item.defaultValue) ) {
134  in_text_item.value = in_text_item.defaultValue;
135  in_text_item.className = 'bmlt_text_item' + (in_text_item.small ? '_small' : (in_text_item.med ? '_med' : (in_text_item.tiny ? '_tiny' : ''))) + ' bmlt_text_item_dimmed';
136  } else {
137  in_text_item.className = 'bmlt_text_item' + (in_text_item.small ? '_small' : (in_text_item.med ? '_med' : (in_text_item.tiny ? '_tiny' : '')));
138  };
139 
140  in_text_item.onfocus = function () {
141  g_installer_object.handleTextInputFocus(this); };
142  in_text_item.onblur = function () {
143  g_installer_object.handleTextInputBlur(this); };
144  this.setTextItemClass(in_text_item, false);
145  };
146  };
147 
148  /************************************************************************************//**
149  * \brief This just makes sure that the className is correct. *
150  ****************************************************************************************/
151  this.setTextItemClass = function (
152  in_text_item, ///< This is the text item to check.
153  is_focused ///< true, if the item is in focus
154  ) {
155  if ( in_text_item ) {
156  if ( !is_focused && ((in_text_item.value == null) || (in_text_item.value == in_text_item.defaultValue)) ) {
157  in_text_item.className = 'bmlt_text_item' + (in_text_item.small ? '_small' : (in_text_item.med ? '_med' : (in_text_item.tiny ? '_tiny' : ''))) + ' bmlt_text_item_dimmed';
158  } else {
159  in_text_item.className = 'bmlt_text_item' + (in_text_item.small ? '_small' : (in_text_item.med ? '_med' : (in_text_item.tiny ? '_tiny' : '')));
160  };
161  };
162  };
163 
164  /************************************************************************************//**
165  * \brief When a text item receives focus, we clear any default text. *
166  ****************************************************************************************/
167  this.handleTextInputFocus = function ( in_text_item
168  ) {
169  if ( in_text_item ) {
170  if ( in_text_item.value == in_text_item.defaultValue ) {
171  in_text_item.value = '';
172  };
173 
174  this.setTextItemClass(in_text_item, true);
175  };
176  };
177 
178  /************************************************************************************//**
179  * \brief When a text item loses focus, we restore any default text, if the item was *
180  * left empty. *
181  ****************************************************************************************/
182  this.handleTextInputBlur = function ( in_text_item
183  ) {
184  if ( in_text_item ) {
185  if ( !in_text_item.value ) {
186  in_text_item.value = in_text_item.defaultValue;
187  };
188 
189  this.setTextItemClass(in_text_item, false);
190  };
191  };
192 
193  /************************************************************************************//**
194  * \brief This creates the map for the location tab. *
195  ****************************************************************************************/
196  this.createLocationMap = function ( ) {
197  if ( !this.m_map_object ) {
198  var myOptions = {
199  'center': new google.maps.LatLng(this.m_installer_state.search_spec_map_center.latitude, this.m_installer_state.search_spec_map_center.longitude),
200  'zoom': parseInt(this.m_installer_state.search_spec_map_center.zoom),
201  'mapTypeId': google.maps.MapTypeId.ROADMAP,
202  'mapTypeControlOptions': { 'style': google.maps.MapTypeControlStyle.DROPDOWN_MENU },
203  'zoomControl': true,
204  'mapTypeControl': true,
205  'disableDoubleClickZoom' : true,
206  'draggableCursor': "crosshair",
207  'scaleControl' : true,
208  'scrollwheel' : false
209  };
210 
211  myOptions.zoomControlOptions = { 'style': google.maps.ZoomControlStyle.LARGE };
212 
213  parent_div = document.getElementById('installer_map_display_div');
214  parent_div.innerHTML = '';
215  this.m_map_object = new google.maps.Map(parent_div, myOptions);
216 
217  google.maps.event.addListener(this.m_map_object, 'click', g_installer_object.reactToMapClick);
218 
219  this.m_map_object.setOptions(myOptions);
220 
221  m_icon_image = new google.maps.MarkerImage("./local_server/server_admin/style/images/NACenterMarker.png", new google.maps.Size(21, 36), new google.maps.Point(0,0), new google.maps.Point(11, 36));
222  m_icon_shadow = new google.maps.MarkerImage("./local_server/server_admin/style/images/NACenterMarkerS.png", new google.maps.Size(43, 36), new google.maps.Point(0,0), new google.maps.Point(11, 36));
223 
224  this.m_map_object.main_marker = new google.maps.Marker({
225  'position': this.m_map_object.getCenter(),
226  'map': this.m_map_object,
227  'icon': m_icon_image,
228  'shadow': m_icon_shadow,
229  'clickable': false,
230  'cursor': 'pointer',
231  'draggable': true
232  });
233 
234  google.maps.event.addListener(this.m_map_object.main_marker, 'dragend', g_installer_object.reactToMapClick);
235  };
236  };
this createFileData
Creates the text for the file *.
Definition: installer.js:612
this testMapsApiKey
Triggered by the TEST KEY button. When no callback is provided, result is * displayed in an alert box...
Definition: installer.js:675
this testForDatabaseSetup
Definition: installer.js:298
this m_installer_wrapper_object
Definition: installer.js:721
function convertFormatLangsToJSON (   v)

Definition at line 586 of file installer.js.

References g, and v.

586  {
587  var ret = {};
588  var langs = v.match(/\S+/g);
589  if (!Array.isArray(langs)) {
590  return JSON.stringify(ret);
591  }
592  langs.forEach(function(lang) {
593  var parts = lang.split(':');
594  if (parts.length == 2) {
595  parts[0] = parts[0].trim();
596  parts[1] = parts[1].trim();
597  if (parts[0]==="" || parts[1]==="") {
598  alert("Could not parse format languages");
599  }
600  ret[parts[0].trim()] = parts[1];
601  } else {
602  alert("Could not parse format languages");
603  }
604  });
605  return JSON.stringify(ret);
606  };
function g
var v
function gmScriptLoadCompletion ( )

A global context callback for the script load completion. *.

Definition at line 748 of file installer.js.

749 {
750  g_installer_object.createLocationMap();
751 };
if ( !this.  m_installer_state)

Definition at line 717 of file installer.js.

717  {
718  this.m_installer_state = in_prefs;
719  };
function reactToEmailCheckbox ( )

A global context callback for the email checkboxes being selected. *.

Definition at line 727 of file installer.js.

728 {
729  var enableEmailObject = document.getElementById('installer_admin_email_contact_checkbox');
730  var sbAdminEmailObject = document.getElementById('installer_admin_email_sba_contact_checkbox');
731  var allAdminsEmailCheckbox = document.getElementById('installer_admin_email_all_admins_checkbox');
732 
733  if ( !enableEmailObject.checked ) {
734  sbAdminEmailObject.checked = false;
735  };
736 
737  if ( !sbAdminEmailObject.checked ) {
738  allAdminsEmailCheckbox.checked = false;
739  };
740 
741  sbAdminEmailObject.disabled = !enableEmailObject.checked;
742  allAdminsEmailCheckbox.disabled = !sbAdminEmailObject.checked;
743 };
function sprintf ( )

sprintf() for JavaScript 0.6

Copyright (c) Alexandru Marasteanu <alexaholic [at) gmail (dot] com> All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of sprintf() for JavaScript nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Alexandru Marasteanu BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Changelog: 2007.04.03 - 0.1:

  • initial release 2007.09.11 - 0.2:
  • feature: added argument swapping 2007.09.17 - 0.3:
  • bug fix: no longer throws exception on empty paramenters (Hans Pufal) 2007.10.21 - 0.4:
  • unit test and patch (David Baird) 2010.05.09 - 0.5:
  • bug fix: 0 is now preceeded with a + sign
  • bug fix: the sign was not at the right position on padded results (Kamal Abdali)
  • switched from GPL to BSD license 2010.05.22 - 0.6:
  • reverted to 0.4 and fixed the bug regarding the sign of the number 0 Note: Thanks to Raphael Pigulla <raph (at] n3rd [dot) org> (http://www.n3rd.org/) who warned me about a bug in 0.5, I discovered that the last update was a regress. I appologize for that.

Definition at line 873 of file installer.js.

References a, b, c, d(), e, f, i, m, o, s, u, and x.

Referenced by BMLT_FuncNAWSReturnMeetingServiceBodyNAWSID(), NAWSImport::createMeetings(), DB_Connect_and_Upgrade(), bdfProfiler::html_output(), bdfProfiler::output(), and whitespace_warnings().

874 {
875  function str_repeat(i, m)
876  {
877  for (var o = []; m > 0; o[--m] = i) {
878  }
879  return o.join('');
880  };
881 
882  var i = 0, a, f = arguments[i++], o = [], m, p, c, x, s = '';
883 
884  while (f) {
885  if (m = /^[^\x25]+/.exec(f)) {
886  o.push(m[0]);
887  } else if (m = /^\x25{2}/.exec(f)) {
888  o.push('%');
889  } else if (m = /^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(f)) {
890  if (((a = arguments[m[1] || i++]) == null) || (a == undefined)) {
891  throw('Too few arguments.');
892  };
893 
894  if (/[^s]/.test(m[7]) && (typeof(a) != 'number')) {
895  throw('Expecting number but found ' + typeof(a));
896  };
897 
898  switch (m[7]) {
899  case 'b': a = a.toString(2); break;
900  case 'c': a = String.fromCharCode(a); break;
901  case 'd': a = parseInt(a,10); break;
902  case 'e': a = m[6] ? a.toExponential(m[6]) : a.toExponential(); break;
903  case 'f': a = m[6] ? parseFloat(a).toFixed(m[6]) : parseFloat(a); break;
904  case 'o': a = a.toString(8); break;
905  case 's': a = ((a = String(a)) && m[6] ? a.substring(0, m[6]) : a); break;
906  case 'u': a = Math.abs(a); break;
907  case 'x': a = a.toString(16); break;
908  case 'X': a = a.toString(16).toUpperCase(); break;
909  };
910 
911  a = (/[def]/.test(m[7]) && m[2] && a >= 0 ? '+'+ a : a);
912  c = m[3] ? m[3] == '0' ? '0' : m[3].charAt(1) : ' ';
913  x = m[5] - String(a).length - s.length;
914  p = m[5] ? str_repeat(c, x) : '';
915  o.push(s + (m[4] ? a + p : p + a));
916  } else {
917  throw('Huh ?!');
918  };
919 
920  f = f.substring(m[0].length);
921  };
922 
923  return o.join('');
924 };
var f
var x
var s
var a
var u
var o
function d(e)
var m
function e
var i
var b
var c

Variable Documentation

this buttonTestForDatabaseSetup
Initial value:
= function () {
var uri = this.m_ajax_uri;
if ( this.m_ajax_request_in_progress ) {
this.m_ajax_request_in_progress.abort();
this.m_ajax_request_in_progress = null;
};
uri += 'test_comprehensive';
var formData = new FormData();
formData.append('dbType', this.m_installer_state.dbType);
formData.append('dbName', this.m_installer_state.dbName);
formData.append('dbUser', this.m_installer_state.dbUser);
formData.append('dbPassword', this.m_installer_state.dbPassword);
formData.append('dbServer', this.m_installer_state.dbServer);
formData.append('dbPrefix', this.m_installer_state.dbPrefix);
var salt = new Date();
uri += '&salt=' + salt.getTime();
this.m_ajax_request_in_progress = BMLT_Installer_AjaxPostRequest(uri, function (in_req) {
g_installer_object.buttonTestForDatabaseSetupCallback(in_req); }, formData);
}
this gatherInstallerState
This gathers the installer state. *.
Definition: installer.js:484
function BMLT_Installer_AjaxPostRequest(url, callback, data, extra_data)
A simple, generic AJAX request function. * *.
Definition: installer.js:763

 

Definition at line 251 of file installer.js.

this buttonTestForDatabaseSetupCallback
Initial value:
= function ( in_http_request
) {
this.m_ajax_request_in_progress = null;
if ( in_http_request.responseText ) {
eval('var json_object = ' + in_http_request.responseText + ';');
if ( json_object ) {
alert(json_object.message);
};
} else
{
};
}

 

Definition at line 280 of file installer.js.

this createFileData

Creates the text for the file *.

Returns
The PHP code for the auto-config.inc.php file. *

Definition at line 612 of file installer.js.

Referenced by BMLTInstaller().

this gatherInstallerState

This gathers the installer state. *.

Definition at line 484 of file installer.js.

this geMinPasswordLength
Initial value:
= function () {
var pw_length_object = document.getElementById('installer_pw_length_select');
this.m_installer_state.min_pw_len = pw_length_object.options[pw_length_object.selectedIndex].value;
return parseInt(this.m_installer_state.min_pw_len, 10);
}

Returns the minimum password length *.

Returns
an integer, with the password length. *

Definition at line 473 of file installer.js.

this initializeRootServer

 

Definition at line 354 of file installer.js.

this initializeRootServerCallback

 

Definition at line 429 of file installer.js.

this m_installer_wrapper_object = document.getElementById('installer_wrapper')

Definition at line 721 of file installer.js.

Referenced by BMLTInstaller().

this reactToMapClick
Initial value:
= function ( in_gMap_event
) {
var map_center = in_gMap_event.latLng;
g_installer_object.m_map_object.panTo(map_center);
g_installer_object.m_map_object.main_marker.setPosition(map_center);
}

This is the callback for a map click or drag end. *.

Definition at line 241 of file installer.js.

this testForDatabaseSetup
Initial value:
= function () {
var uri = this.m_ajax_uri;
if ( this.m_ajax_request_in_progress ) {
this.m_ajax_request_in_progress.abort();
this.m_ajax_request_in_progress = null;
};
uri += 'test';
var formData = new FormData();
formData.append('dbType', this.m_installer_state.dbType);
formData.append('dbName', this.m_installer_state.dbName);
formData.append('dbUser', this.m_installer_state.dbUser);
formData.append('dbPassword', this.m_installer_state.dbPassword);
formData.append('dbServer', this.m_installer_state.dbServer);
formData.append('dbPrefix', this.m_installer_state.dbPrefix);
var salt = new Date();
uri += '&salt=' + salt.getTime();
this.m_ajax_request_in_progress = BMLT_Installer_AjaxPostRequest(uri, function (in_req) {
g_installer_object.testForDatabaseSetupCallback(in_req); }, formData);
}
this gatherInstallerState
This gathers the installer state. *.
Definition: installer.js:484
function BMLT_Installer_AjaxPostRequest(url, callback, data, extra_data)
A simple, generic AJAX request function. * *.
Definition: installer.js:763

 

Definition at line 298 of file installer.js.

Referenced by BMLTInstaller().

this testForDatabaseSetupCallback
Initial value:
= function ( in_http_request
) {
this.m_ajax_request_in_progress = null;
this.m_database_credentials_are_good = false;
if (in_http_request.responseText) {
eval('var ret_val = parseInt ( ' + in_http_request.responseText + ', 10 );');
document.getElementById('admin_db_items_warning').innerHTML = '';
document.getElementById('admin_pw_warning_div_2').className = 'item_hidden';
if (ret_val == 0) {
document.getElementById('admin_login_stuff_fieldset').className = 'item_hidden';
document.getElementById('admin_pw_warning_div_2').className = 'extra_text_div red_char';
document.getElementById('admin_db_items_warning').innerHTML = g_db_init_db_set_warning_text + '<br><a href="javascript:g_installer_object.selectPage1()">' + g_db_init_db_click_here + '</a>';
} else if (ret_val == -1) {
document.getElementById('admin_login_stuff_fieldset').className = '';
document.getElementById('admin_db_items_warning').innerHTML = g_db_init_db_generic_db_error_text + '<br><a href="javascript:g_installer_object.selectPage1()">' + g_db_init_db_click_here + '</a>';
} else {
document.getElementById('admin_login_stuff_fieldset').className = '';
this.m_database_credentials_are_good = true;
}
}
}
this gatherInstallerState
This gathers the installer state. *.
Definition: installer.js:484

 

Definition at line 327 of file installer.js.

this testMapsApiKey

Triggered by the TEST KEY button. When no callback is provided, result is * displayed in an alert box. *.

Definition at line 675 of file installer.js.

Referenced by BMLTInstaller().