changed some variable names and removed commented code in find.js
This commit is contained in:
parent
28170035b0
commit
a248a866c1
1 changed files with 11 additions and 16 deletions
|
@ -202,22 +202,19 @@ $(document).ready(function() {
|
||||||
$('#topic_by_name_input').typing({
|
$('#topic_by_name_input').typing({
|
||||||
start: function (event, $elem) {
|
start: function (event, $elem) {
|
||||||
// grab the checkboxes to see if the search is on the canvas, in the commons, or both
|
// grab the checkboxes to see if the search is on the canvas, in the commons, or both
|
||||||
firstVal = $("#onCanvas").attr('checked');
|
onCanvasChecked = $("#onCanvas").attr('checked');
|
||||||
secondVal = $("#inCommons").attr('checked');
|
inCommonsChecked = $("#inCommons").attr('checked');
|
||||||
clearFoundData();
|
clearFoundData();
|
||||||
|
|
||||||
// only have the autocomplete enabled if they are searching in the commons
|
// only have the autocomplete enabled if they are searching in the commons
|
||||||
if (firstVal == "checked" && secondVal == "checked"){
|
if (onCanvasChecked == "checked" && inCommonsChecked == "checked"){
|
||||||
//$('#topic_by_name_input').autocomplete( "option", "disabled", false );
|
|
||||||
$('#topic_by_name_input').autocomplete( "option", "disabled", true );
|
$('#topic_by_name_input').autocomplete( "option", "disabled", true );
|
||||||
}
|
}
|
||||||
else if (firstVal == "checked"){
|
else if (onCanvasChecked == "checked"){
|
||||||
setTimeout(function(){showAll();},0);
|
setTimeout(function(){showAll();},0);
|
||||||
$('#topic_by_name_input').autocomplete( "option", "disabled", true );
|
$('#topic_by_name_input').autocomplete( "option", "disabled", true );
|
||||||
}
|
}
|
||||||
else if (secondVal == "checked"){
|
else if (inCommonsChecked == "checked"){
|
||||||
//setTimeout(function(){hideAll();},0);
|
|
||||||
//$('#topic_by_name_input').autocomplete( "option", "disabled", false );
|
|
||||||
$('#topic_by_name_input').autocomplete( "option", "disabled", true );
|
$('#topic_by_name_input').autocomplete( "option", "disabled", true );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -226,22 +223,22 @@ $(document).ready(function() {
|
||||||
},
|
},
|
||||||
stop: function (event, $elem) {
|
stop: function (event, $elem) {
|
||||||
// grab the checkboxes to see if the search is on the canvas, in the commons, or both
|
// grab the checkboxes to see if the search is on the canvas, in the commons, or both
|
||||||
firstVal = $("#onCanvas").attr('checked');
|
onCanvasChecked = $("#onCanvas").attr('checked');
|
||||||
secondVal = $("#inCommons").attr('checked');
|
inCommonsChecked = $("#inCommons").attr('checked');
|
||||||
|
|
||||||
var topicName = $('#topic_by_name_input').val();
|
var topicName = $('#topic_by_name_input').val();
|
||||||
// run a search on the canvas or in the commons or both
|
// run a search on the canvas or in the commons or both
|
||||||
if (firstVal == "checked" && secondVal == "checked") {
|
if (onCanvasChecked == "checked" && inCommonsChecked == "checked") {
|
||||||
setTimeout(function(){onCanvasSearch(topicName,null,null);},0);
|
setTimeout(function() {onCanvasSearch(topicName,null,null);}, 0);
|
||||||
$('#topicsByName').val(topicName);
|
$('#topicsByName').val(topicName);
|
||||||
$('#topicsByUser').val("");
|
$('#topicsByUser').val("");
|
||||||
$('#topicsByMap').val("");
|
$('#topicsByMap').val("");
|
||||||
$('#get_topics_form').submit();
|
$('#get_topics_form').submit();
|
||||||
}
|
}
|
||||||
else if (firstVal == "checked") {
|
else if (onCanvasChecked == "checked") {
|
||||||
setTimeout(function(){onCanvasSearch(topicName,null,null);},0);
|
setTimeout(function(){onCanvasSearch(topicName,null,null);},0);
|
||||||
}
|
}
|
||||||
else if (secondVal == "checked") {
|
else if (inCommonsChecked == "checked") {
|
||||||
$('#topicsByName').val(topicName);
|
$('#topicsByName').val(topicName);
|
||||||
$('#topicsByUser').val("");
|
$('#topicsByUser').val("");
|
||||||
$('#topicsByMap').val("");
|
$('#topicsByMap').val("");
|
||||||
|
@ -386,7 +383,6 @@ $(document).ready(function() {
|
||||||
setTimeout(function(){onCanvasSearch(null,data.item.id,null);},0);
|
setTimeout(function(){onCanvasSearch(null,data.item.id,null);},0);
|
||||||
}
|
}
|
||||||
else if (secondNewVal == "checked"){
|
else if (secondNewVal == "checked"){
|
||||||
//hideAll();
|
|
||||||
$('#topicsByMap').val(data.item.id);
|
$('#topicsByMap').val(data.item.id);
|
||||||
$('#topicsByUser').val("");
|
$('#topicsByUser').val("");
|
||||||
$('#topicsByName').val("");
|
$('#topicsByName').val("");
|
||||||
|
@ -432,7 +428,6 @@ $(document).ready(function() {
|
||||||
setTimeout(function(){onCanvasSearch(null,null,data.item.id.toString());},0);
|
setTimeout(function(){onCanvasSearch(null,null,data.item.id.toString());},0);
|
||||||
}
|
}
|
||||||
else if (secondNewVal == "checked"){
|
else if (secondNewVal == "checked"){
|
||||||
//hideAll();
|
|
||||||
$('#topicsByUser').val(data.item.id);
|
$('#topicsByUser').val(data.item.id);
|
||||||
$('#topicsByMap').val("");
|
$('#topicsByMap').val("");
|
||||||
$('#topicsByName').val("");
|
$('#topicsByName').val("");
|
||||||
|
|
Loading…
Reference in a new issue