issue27, first trial of gallery export for HTML and MoinMoin markup
[phpfspot.git] / phpfspot.js
index 2d7e780c4cf7b4a63400d2dceb7c03a0a75191ae..ce66cf6a35a924ec5f5a5e979575f5c06fb791ac 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,36 @@ function startTagSearch(searchfor)
 
 }
 
+function setViewMode(mode)
+{
+   var exprt = document.getElementById('output');
+   exprt.innerHTML = "Loading...";
+   exprt.innerHTML = HTML_AJAX.grab(encodeURI('rpc.php?action=get_export&mode=' + 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;
+