issue35, if too many tags are selected and AND condition is used, this will show...
[phpfspot.git] / phpfspot.js
index 2d7e780c4cf7b4a63400d2dceb7c03a0a75191ae..4b6a640eaf2d86bb45e73a4be199d1c8a8c05e73 100644 (file)
@@ -49,6 +49,13 @@ function refreshSelectedTags()
    var selected_tags = document.getElementById("selected_tags");
    selected_tags.innerHTML = "Loading...";
    selected_tags.innerHTML = HTML_AJAX.grab(encodeURI('rpc.php?action=show_selected_tags'));
+
+   // if no tags are currently selected, return false from here
+   if(selected_tags.innerHTML == "")
+      return false;
+   
+   return true;
+
 }
 
 function showPhotoIndex(begin_with)
@@ -108,9 +115,34 @@ function startTagSearch(searchfor)
 
 }
 
+function setViewMode(mode)
+{
+   window.alert(mode);
+}
+
 function clearSearch()
 {
    document.getElementsByName('searchfor')[0].value = '';
 }
 
+function init_phpfspot()
+{
+   refreshAvailableTags();
+
+   if(refreshSelectedTags()) {
+      showPhotoIndex();
+   }
+}
+
+function setBackGrdColor(item, color)
+{
+   if(color == 'mouseover')
+      item.style.backgroundColor='#c6e9ff';
+   if(color == 'mouseout')
+      item.style.backgroundColor='#eeeeee';
+   if(color == 'mouseclick')
+      item.style.backgroundColor='#93A8CA';
+}
+
 var startup = 1;
+