changeset 105:7728b586a421

Get rid of certain "obsolete" navigation features, as they are no longer in the scope of this program's goals.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 21 Sep 2016 10:25:47 +0300
parents d7cc5c0ca1b5
children a3b8cd4183e6
files basic.css mgallery.inc.php mgallery.php
diffstat 3 files changed, 4 insertions(+), 66 deletions(-) [+]
line wrap: on
line diff
--- a/basic.css	Wed Sep 21 10:17:40 2016 +0300
+++ b/basic.css	Wed Sep 21 10:25:47 2016 +0300
@@ -266,13 +266,6 @@
 /*
  * Navigation controls
  */
-div.naviControls {
-	display: none;
-	font-size: 1.5em;
-	text-align: center;
-	margin: 0.5em;
-}
-
 .naviBreadCrumbItem {
 }
 
--- a/mgallery.inc.php	Wed Sep 21 10:17:40 2016 +0300
+++ b/mgallery.inc.php	Wed Sep 21 10:25:47 2016 +0300
@@ -28,13 +28,9 @@
 //
 // Navigation control defines
 //
-define("GNAV_TOP"        , 0x01);
-define("GNAV_BOTTOM"     , 0x02);
-define("GNAV_IMG"        , 0x04);
-define("GNAV_TEXT"       , 0x08);
-define("GNAV_SIDE_IMG"   , 0x10);
-define("GNAV_JAVASCRIPT" , 0x20);
-define("GNAV_BREADCRUMBS", 0x40);
+define("GNAV_SIDE_IMG"   , 0x01);
+define("GNAV_JAVASCRIPT" , 0x02);
+define("GNAV_BREADCRUMBS", 0x04);
 
 
 function mgPathName($path)
@@ -71,7 +67,7 @@
   "css"              => array(MG_STR, NULL),
   "album_icon"       => array(MG_STR, "album_sm.png"),
 
-  "image_navigation" => array(MG_INT, GNAV_TOP | GNAV_BOTTOM | GNAV_SIDE_IMG | GNAV_TEXT | GNAV_JAVASCRIPT | GNAV_BREADCRUMBS),
+  "image_navigation" => array(MG_INT, GNAV_SIDE_IMG | GNAV_JAVASCRIPT | GNAV_BREADCRUMBS),
   "album_navigation" => array(MG_INT, GNAV_BREADCRUMBS),
 
   "navi_ctrl_up"     => array(MG_STR, "^^"),
--- a/mgallery.php	Wed Sep 21 10:17:40 2016 +0300
+++ b/mgallery.php	Wed Sep 21 10:25:47 2016 +0300
@@ -264,51 +264,6 @@
 }
 
 
-function mgGetControlText($id, $active, $url, $naviFlags)
-{
-  if ($naviFlags & GNAV_TEXT)
-  {
-    $str = chentities(mgGetSetting("navi_ctrl_".$id));
-    return
-      "<span class=\"naviControl ".$id."\">[".
-      ($active ? "<a href=\"".$url."\">".$str."</a>" : $str).
-      "]</span>";
-  }
-  else
-    return "";
-}
-
-
-function mgGetControl($id, &$galIndex, $index, $delta, $naviFlags)
-{
-  $active = mgGetNaviActive($galIndex, $index, $delta, $res, $url, TRUE);
-  if ($active && ($naviFlags & GNAV_IMG))
-    $img = mgGetNaviControlImage($galIndex, $res, $id, $url);
-  else
-    $img = "";
-
-  $text = mgGetControlText($id, $active, $url, $naviFlags);
-
-  if ($delta < 0)
-    return $img.$text;
-  else
-    return $text.$img;
-}
-
-
-function mgGetNaviControls(&$galIndex, $index, $naviFlags)
-{
-  global $galPath;
-
-  return
-    "<div class=\"naviControls\">".
-    mgGetControl("prev", $galIndex, $index, -1, $naviFlags).
-    mgGetControlText("up", TRUE, mgGetURL($galPath, FALSE), $naviFlags).
-    mgGetControl("next", $galIndex, $index,  1, $naviFlags).
-    "</div>\n";
-}
-
-
 function mgPrintTable($class, &$galEntries, &$galIndex, $start, $limit)
 {
   global $galAlbumIcon, $galPath, $galTNPath, $galImageURL, $galUseCoverImages, $galUseTables;
@@ -636,9 +591,6 @@
   if ($naviFlags & GNAV_BREADCRUMBS)
     mgPrintBreadCrumbs($galData);
 
-  if ($naviFlags & GNAV_TOP)
-    echo mgGetNaviControls($galImagesIndex, $index, $naviFlags);
-
   echo
     mgGetPageInfoHeaderEnd().
     "<div id=\"imageCBox\">\n".
@@ -658,9 +610,6 @@
     "</div>".
     "</div>\n";
 
-  if ($naviFlags & GNAV_BOTTOM)
-    echo mgGetNaviControls($galImagesIndex, $index, $naviFlags);
-
   // Javascript navigation
   if ($naviFlags & GNAV_JAVASCRIPT)
   {