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:
@@ -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){
|
||||
|
Reference in New Issue
Block a user