1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 14:17:49 +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

View File

@@ -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() {

View File

@@ -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){