1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-22 13:41:52 +02:00

Load Signup JS code only when needed.

This commit is contained in:
Cameron 2013-03-27 16:20:31 -07:00
parent 737caec05d
commit 75e0344efe
4 changed files with 25 additions and 28 deletions

@ -23,14 +23,9 @@ $sql = e107::getDb();
$sql->db_Mark_Time('(Header Top)');
e107::js('core', 'colorbox/jquery.colorbox-min.js', 'jquery', 2);
e107::css('core', 'colorbox/colorbox.css', 'jquery');
// Used for Signup form elements - could be on any page of the site.
e107::js('core', 'jquery.mailcheck.min.js','jquery',2);
e107::js('core','bootstrap/js/bootstrap-tooltip.js','jquery');
e107::css('core','bootstrap/css/tooltip.css','jquery');

@ -1,5 +1,24 @@
$(document).ready(function()
{
$('.e-typeahead').each(function() {
var id = $(this).attr("id");
var name = '#' + id.replace('-usersearch', '');
var newval = $(this).attr("data-value");
$(this).typeahead({
source: $(this).attr("data-source"),
updater: function(text, type){
if(type == 'value')
{
$(name).val(text);
}
return text;
}
})
});
// run tips on title attribute.
$(".e-tip").each(function() {

@ -1,4 +1,6 @@
// handle secured json string - the Prototype implementation
/
$.ajaxSetup({
dataFilter: function(data, type) {
if(type != 'json' || !data) return data;
@ -13,29 +15,8 @@ $(document).ready(function()
$(".e-expandit").show();
// $(".e-spinner").spinner(); //FIXME breaks tooltips
$('.e-typeahead').each(function() {
var id = $(this).attr("id");
var name = '#' + id.replace('-usersearch', '');
var newval = $(this).attr("data-value");
$(this).typeahead({
source: $(this).attr("data-source"),
updater: function(text, type){
if(type == 'value')
{
$(name).val(text);
}
return text;
}
})
});
//check all
$("#check-all").click(function(event){

@ -30,6 +30,8 @@ e107::coreLan('user'); // Generic user-related language defines
define('SIGNUP_DEBUG', FALSE);
e107::js('core', 'jquery.mailcheck.min.js','jquery',2);
include_once(e_HANDLER.'user_extended_class.php');
$usere = new e107_user_extended;
// require_once(e_HANDLER.'calendar/calendar_class.ph_');