-changed some references from campcaster to airtime in the documentation / comments
This commit is contained in:
parent
f6a56c01a9
commit
20c392343b
45 changed files with 91 additions and 88 deletions
38
public/js/airtime/library/advancedsearch.js
Normal file
38
public/js/airtime/library/advancedsearch.js
Normal file
|
@ -0,0 +1,38 @@
|
|||
function addRemove(el) {
|
||||
var id, span;
|
||||
|
||||
id = $(el).attr("id").split("_").pop();
|
||||
|
||||
span = $('<span id="search_remove_'+id+'">Remove</span>').click(function(){
|
||||
$(this).parent().parent().remove();
|
||||
});
|
||||
|
||||
$(el).find("dl input").after(span);
|
||||
}
|
||||
|
||||
function ajaxAddField() {
|
||||
|
||||
var id = $("#search_next_id").val();
|
||||
|
||||
var url = '/Search/newfield';
|
||||
url = url + '/format/html';
|
||||
url = url + '/id/' + id;
|
||||
|
||||
$.post(url, function(newElement) {
|
||||
|
||||
var el = $(newElement);
|
||||
addRemove(el);
|
||||
|
||||
$(".zend_form").append(el);
|
||||
$("#search_next_id").val(++id);
|
||||
});
|
||||
}
|
||||
|
||||
function setUpSearch() {
|
||||
|
||||
$("#search_add").click(ajaxAddField);
|
||||
|
||||
$('[id^="fieldset-row_"]').each(function(i, el){
|
||||
addRemove(el);
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue