[Linpha-cvs] SF.net SVN: linpha: [4933] trunk/linpha2
Status: Inactive
Brought to you by:
bzrudi
|
From: <fan...@us...> - 2008-05-05 22:01:05
|
Revision: 4933
http://linpha.svn.sourceforge.net/linpha/?rev=4933&view=rev
Author: fangehrn
Date: 2008-05-05 15:00:41 -0700 (Mon, 05 May 2008)
Log Message:
-----------
2008-05-05 flo
* Viewer
- show initial loading icon
* Basket
- fixed bugs
Modified Paths:
--------------
trunk/linpha2/ChangeLog
trunk/linpha2/docs/dev/TODO.txt
trunk/linpha2/lib/classes/linpha.view.album.class.php
trunk/linpha2/lib/classes/linpha.view.image.class.php
trunk/linpha2/lib/js/LinYUIAlbum.js
trunk/linpha2/lib/modules/module.basket.php
trunk/linpha2/templates/default/basket.html.php
trunk/linpha2/templates/default/global.head.php
trunk/linpha2/templates/default/themes/default/css/viewer.css
trunk/linpha2/templates/default/viewer.html.php
Removed Paths:
-------------
trunk/linpha2/templates/default/view_img.head.php
trunk/linpha2/templates/default/view_img.html.php
trunk/linpha2/templates/default/view_meta.html.php
trunk/linpha2/templates/default/view_thumb.head.php
trunk/linpha2/templates/default/view_thumb.html.php
Modified: trunk/linpha2/ChangeLog
===================================================================
--- trunk/linpha2/ChangeLog 2008-04-27 21:51:22 UTC (rev 4932)
+++ trunk/linpha2/ChangeLog 2008-05-05 22:00:41 UTC (rev 4933)
@@ -1,4 +1,11 @@
+2008-05-05 flo
+ * Viewer
+ - show initial loading icon
+
+ * Basket
+ - fixed bugs
+
2008-04-27 flo
* GPS Tab
- implemented mini google map and reverse geocoding
Modified: trunk/linpha2/docs/dev/TODO.txt
===================================================================
--- trunk/linpha2/docs/dev/TODO.txt 2008-04-27 21:51:22 UTC (rev 4932)
+++ trunk/linpha2/docs/dev/TODO.txt 2008-05-05 22:00:41 UTC (rev 4933)
@@ -7,7 +7,6 @@
- add common interface for thumb order (ORDER by..) to prevent
"LinPHA New_images.PHP SQL Injection Vulnerability" etc.
-- escape exif data (see Common Tasks UTF8)
- optimize DB querys (index)
- if GDLib is not installed, the rounded corner stuff does not work
@@ -19,14 +18,14 @@
- should enable browsers cache for the thumbnails and maybe also for the images
-- compress javascripts (prototype and scriptaculous)
- they are now nearly 200KB big
-
- re-add getId3 as fallback if exiftool is not available
(video thumbnail and video playback)
## Big Todos
+- Thumb view
+ - details view (is this really needed)
+ - basket
- Installer
- OSX testing
@@ -79,6 +78,11 @@
DONE
############################################################################
+- compress javascripts (prototype and scriptaculous)
+ they are now nearly 200KB big
+
+- escape exif data (see Common Tasks UTF8)
+
- since the admin pages uses the template system, there is no update of the status during the import
thats not very user friendly
-> solution: start import etc. directly from the template file, and not buffer the output with ob_start()
Modified: trunk/linpha2/lib/classes/linpha.view.album.class.php
===================================================================
--- trunk/linpha2/lib/classes/linpha.view.album.class.php 2008-04-27 21:51:22 UTC (rev 4932)
+++ trunk/linpha2/lib/classes/linpha.view.album.class.php 2008-05-05 22:00:41 UTC (rev 4933)
@@ -1,4 +1,4 @@
-<?php
+<?php
/*
* Copyright (c) 2005 Heiko Rutenbeck <bz...@tu...>
* Florian Angehrn
@@ -321,9 +321,9 @@
array(
'name' => i18n("Basket"),
'link' => array(
- array('name' => i18n("Add All To Basket"), 'link' => 'javascript:location.href="'.$GLOBALS['linpha']->template->URL_base.'&admin_cmd=basket_add_all&linId="+linIdCurrent'),
- array('name' => i18n("Add To Basket"), 'link' => 'javascript:location.href="'.$GLOBALS['linpha']->template->URL_base.'&admin_cmd=basket_add_this&linId="+linIdCurrent'),
- array('name' => i18n("Switch To Basket View"), 'link' => 'javascript:location.href="'.$GLOBALS['linpha']->template->URL_base.'&view=basket&linId="+linIdCurrent'),
+ //array('name' => i18n("Add All To Basket"), 'link' => 'javascript:location.href="'.$GLOBALS['linpha']->template->URL_base.'&admin_cmd=basket_add_all&linId="+linIdCurrent'),
+ array('name' => i18n("Add To Basket"), 'link' => 'javascript:myLinAlbum.addToBasket("no_checkout")'),
+ //array('name' => i18n("Switch To Basket View"), 'link' => 'javascript:location.href="'.$GLOBALS['linpha']->template->URL_base.'&view=basket&linId="+linIdCurrent'),
array('name' => i18n("Open Basket"), 'link' => LINPHA_LINK.'&linCat=basket')
)
);
@@ -415,18 +415,15 @@
*/
if( $GLOBALS['linpha']->sql->checkPermission('basket_download'))
{
- $GLOBALS['linpha']->template->menu['icon_download'] = 'javascript:location.href="'.$GLOBALS['linpha']->template->URL_base.
- '&admin_cmd=basket_add_all_with_checkout&checkout_as=download&linId="+linIdCurrent';
+ $GLOBALS['linpha']->template->menu['icon_download'] = 'javascript:myLinAlbum.basketDownload()';
}
if( $GLOBALS['linpha']->sql->checkPermission('basket_print'))
{
- $GLOBALS['linpha']->template->menu['icon_print'] = 'javascript:location.href="'.$GLOBALS['linpha']->template->URL_base.
- '&admin_cmd=basket_add_all_with_checkout&checkout_as=print&linId="+linIdCurrent';
+ $GLOBALS['linpha']->template->menu['icon_print'] = 'javascript:myLinAlbum.basketPrint()';
}
if( $GLOBALS['linpha']->sql->checkPermission('basket_mail'))
{
- $GLOBALS['linpha']->template->menu['icon_mail'] = 'javascript:location.href="'.$GLOBALS['linpha']->template->URL_base.
- '&admin_cmd=basket_add_all_with_checkout&checkout_as=mail&linId="+linIdCurrent';
+ $GLOBALS['linpha']->template->menu['icon_mail'] = 'javascript:myLinAlbum.basketMail()';
}
/**
Modified: trunk/linpha2/lib/classes/linpha.view.image.class.php
===================================================================
--- trunk/linpha2/lib/classes/linpha.view.image.class.php 2008-04-27 21:51:22 UTC (rev 4932)
+++ trunk/linpha2/lib/classes/linpha.view.image.class.php 2008-05-05 22:00:41 UTC (rev 4933)
@@ -43,14 +43,22 @@
return;
}
- if ( !isset($_GET['linTab']) || empty($_GET['linTab']) )
- {
- return;
+ if (!LinSql::photoIsAllowed($GLOBALS['linpha']->template->idCurrent)) {
+ die(LIN_STR_ACCESSDENIED);
}
$this->imgData = $GLOBALS['linpha']->db->GetRow("SELECT * FROM ".LIN_PREFIX."photos " .
"WHERE id = '".LinSql::linAddslashes($GLOBALS['linpha']->template->idCurrent)."'");
+ if(isset($_REQUEST['linCmd'])) {
+ $this->imageCommands();
+ }
+
+ if ( !isset($_GET['linTab']) || empty($_GET['linTab']) )
+ {
+ return;
+ }
+
$this->indexFile(); // normally at least one tab per image is called
switch($_GET['linTab'])
@@ -327,19 +335,15 @@
return false;
}
-
-
-
-
/**
* method for special admin commands, like rotating images, import stuff etc.
* @uses LinImgview::buildImgView()
*/
-function adminCommands()
+function imageCommands()
{
- switch($_GET['admin_cmd'])
+ switch($_REQUEST['linCmd'])
{
- case 'recreate':
+ case 'Recreate':
if($GLOBALS['linpha']->sql->isAdmin())
{
$thumbnail = new LinImage();
@@ -347,83 +351,74 @@
$thumbnail->createThumbnail($GLOBALS['linpha']->template->idCurrent);
}
break;
- case 'force_import': // called in viewImg
- LinImport::updateEntry( $GLOBALS['linpha']->template->idCurrent , dirname($this->src_file) , $this->filename );
+ case 'ForceImport': // called in viewImg
+ if($GLOBALS['linpha']->sql->isAdmin()) {
+ if (!isset($this->src_file)) {
+ $this->src_file = LinSql::getFullImagePath( $GLOBALS['linpha']->template->idCurrent );
+ }
+ LinImport::updateEntry( $GLOBALS['linpha']->template->idCurrent , dirname($this->src_file) , $this->imgData['name'] );
+ }
break;
- case 'rotate_left':
- if($GLOBALS['linpha']->sql->isAdmin())
- {
+
+ case 'RotateLeft':
+ if($GLOBALS['linpha']->sql->checkPermission('metadata_edit')) {
LinImage::rotateImageByMenuCall('-90', $GLOBALS['linpha']->template->idCurrent);
}
break;
- case 'rotate_right':
- if($GLOBALS['linpha']->sql->isAdmin())
- {
+ case 'RotateRight':
+ if($GLOBALS['linpha']->sql->checkPermission('metadata_edit')) {
LinImage::rotateImageByMenuCall('90', $GLOBALS['linpha']->template->idCurrent);
}
break;
- case 'basket_add_all':
- case 'basket_add_all_with_checkout':
- /**
- * coming from imgview, mode=viewThumb
- * the permission check with photoIsAllowed() is done while checking out
- */
- foreach($this->photos_filtered AS $value)
- {
- if($value['img_type']!=0)
- {
- $_SESSION['basket_ids'][] = $value['id'];
- }
- }
-
- if($_GET['admin_cmd'] == 'basket_add_all_with_checkout')
- {
- header("Location: ".LINPHA_LINK."&linCat=basket&checkout_as=".$_GET['checkout_as']);
- exit();
- }
- break;
- case 'basket_add_this':
- case 'basket_add_this_with_checkout':
- /**
- * coming from imgview, mode=viewImg
- */
- $_SESSION['basket_ids'][] = $GLOBALS['linpha']->template->idCurrent;
- if($_GET['admin_cmd'] == 'basket_add_this_with_checkout')
- {
- header("Location: ".LINPHA_LINK."&linCat=basket&checkout_as=".$_GET['checkout_as']);
- exit();
- }
- break;
+ case 'AddToBasket':
+ LinViewImage::addToBasket();
+ break;
}
-
-
- /**
- * doing some special commands
- *
- * should be done after viewImg(), because adminCommands() (force_import) uses some image informations
- */
- if(isset($_GET['admin_cmd'])) {
- $this->adminCommands();
- }
+}
+
+static function addToBasket()
+{
+ foreach ($_POST['linImgIds'] as $imgId)
+ {
+ $query = $GLOBALS['linpha']->db->Execute("SELECT img_type FROM ".LIN_PREFIX."photos " .
+ "WHERE id = '".LinSql::linAddslashes($imgId)."'");
- if(isset($_GET['linMsg']))
+ if (!$query->EOF)
{
- switch($_GET['linMsg'])
+ $data = $query->FetchRow();
+
+ if ($data['img_type'] != '0' && $data['img_type'] != '9999999')
{
- case 'basket_added': linSysLog(i18n("Images Added To Basket.")); break;
+ if (LinSql::photoIsAllowed($imgId)) {
+ $_SESSION['basket_ids'][] = $imgId;
+ }
}
}
+ }
+
+ /*$fileType = $GLOBALS['linpha']->db->GetOne("SELECT img_type FROM ".LIN_PREFIX."photos " .
+ "WHERE id = '".LinSql::linAddslashes($GLOBALS['linpha']->template->idCurrent)."'");
+
+ switch ($fileType)
+ {
+ case '0':
+ $query = $GLOBALS['linpha']->db->Execute("SELECT id FROM ".LIN_PREFIX."photos " .
+ "WHERE parent_id = '".LinSql::linAddslashes($GLOBALS['linpha']->template->idCurrent)."' " .
+ "AND img_type != '0' AND img_type != '9999999'");
+ while($data = $query->FetchRow()) {
+ if (LinSql::photoIsAllowed($data['id'])) {
+ $_SESSION['basket_ids'][] = $data['id'];
+ }
+ }
+ break;
+ case '9999999':
+ break;
+ default:
+ $_SESSION['basket_ids'][] = $GLOBALS['linpha']->template->idCurrent;
+ break;
+ }*/
}
-
-
-
-
-
-
-
-
-
} // end class LinViewImage
-?>
+?>
\ No newline at end of file
Modified: trunk/linpha2/lib/js/LinYUIAlbum.js
===================================================================
--- trunk/linpha2/lib/js/LinYUIAlbum.js 2008-04-27 21:51:22 UTC (rev 4932)
+++ trunk/linpha2/lib/js/LinYUIAlbum.js 2008-05-05 22:00:41 UTC (rev 4933)
@@ -180,9 +180,10 @@
if (this.mode == 'image') {
(new YAHOO.util.Element('linDivThumbs')).removeClass("linDivThumbsSmall"); // would give an warning if the class does not exist
}
- this.mode = 'thumb';
+ this.mode = "thumb";
- YAHOO.util.Dom.setStyle('linDivThumbs', "display", "block");
+ YAHOO.util.Dom.setStyle("linDivLoadingAlbum", "display", "none");
+ YAHOO.util.Dom.setStyle("linDivThumbs", "display", "block");
};
// openImage()
@@ -694,6 +695,68 @@
myLinAlbum.panelViewAt.render( /*document.body*/ "linPanelContainer" );
};
+// basketDownload()
+YAHOO.linpha.Album.prototype.basketDownload = function() {
+ this.addToBasket('download');
+}
+// basketMail()
+YAHOO.linpha.Album.prototype.basketMail = function() {
+ this.addToBasket('mail');
+}
+// basketPrint()
+YAHOO.linpha.Album.prototype.basketPrint = function() {
+ this.addToBasket('print');
+}
+// addToBasket()
+YAHOO.linpha.Album.prototype.addToBasket = function(checkout) {
+ YAHOO.util.Dom.setStyle("linDivLoadingAlbum", "display", "block");
+
+ if (this.mode == "image") {
+ postdata = "linImgIds[]="+linIdCurrent;
+ } else if (this.mode == "thumb") {
+ postdata = "";
+ for(imgId in this.ThumbIds) {
+ postdata += "linImgIds[]="+imgId+"&";
+ }
+ } else {
+ return;
+ }
+
+ switch (checkout)
+ {
+ case "no_checkout":
+ myLinGlobal.asyncRequest('POST', LINPHA_LINK+'&linCat=image&linCmd=AddToBasket&linId='+linIdCurrent, this.addToBasketFinish, this, postdata);
+ break;
+ case "download":
+ myLinGlobal.asyncRequest('POST', LINPHA_LINK+'&linCat=image&linCmd=AddToBasket&linId='+linIdCurrent, this.basketDownloadFinish, this, postdata);
+ break;
+ case "mail":
+ myLinGlobal.asyncRequest('POST', LINPHA_LINK+'&linCat=image&linCmd=AddToBasket&linId='+linIdCurrent, this.basketMailFinish, this, postdata);
+ break;
+ case "print":
+ myLinGlobal.asyncRequest('POST', LINPHA_LINK+'&linCat=image&linCmd=AddToBasket&linId='+linIdCurrent, this.basketPrintFinish, this, postdata);
+ break;
+ }
+}
+// addToBasketFinish()
+YAHOO.linpha.Album.prototype.addToBasketFinish = function(t) {
+ YAHOO.util.Dom.setStyle("linDivLoadingAlbum", "display", "none");
+}
+// basketDownloadFinish()
+YAHOO.linpha.Album.prototype.basketDownloadFinish = function(t) {
+ YAHOO.util.Dom.setStyle("linDivLoadingAlbum", "display", "none");
+ location.href = LINPHA_LINK+"&linCat=basket&checkout_as=download";
+}
+// basketMailFinish()
+YAHOO.linpha.Album.prototype.basketMailFinish = function(t) {
+ YAHOO.util.Dom.setStyle("linDivLoadingAlbum", "display", "none");
+ location.href = LINPHA_LINK+"&linCat=basket&checkout_as=mail";
+}
+// basketPrintFinish()
+YAHOO.linpha.Album.prototype.basketPrintFinish = function(t) {
+ YAHOO.util.Dom.setStyle("linDivLoadingAlbum", "display", "none");
+ location.href = LINPHA_LINK+"&linCat=basket&checkout_as=print";
+}
myLinPage.enableOnResize('thumb');
Modified: trunk/linpha2/lib/modules/module.basket.php
===================================================================
--- trunk/linpha2/lib/modules/module.basket.php 2008-04-27 21:51:22 UTC (rev 4932)
+++ trunk/linpha2/lib/modules/module.basket.php 2008-05-05 22:00:41 UTC (rev 4933)
@@ -54,7 +54,6 @@
/**
* do the final checkout
*/
-
try
{
/**
@@ -62,7 +61,7 @@
*/
if(! $GLOBALS['linpha']->sql->checkPermission('basket_'.$_REQUEST['checkout_as']))
{
- throw new Exception(i18n("No Access"));
+ throw new Exception(LIN_STR_ACCESSDENIED);
}
/**
@@ -80,7 +79,7 @@
{
if(! $GLOBALS['linpha']->sql->photoIsAllowed($value))
{
- throw new Exception(i18n("No Access"));
+ throw new Exception(LIN_STR_ACCESSDENIED);
}
}
@@ -110,12 +109,12 @@
break;
- case 'add_selected':
- /**
+ /*case 'add_selected':
+
* add ids to session
* coming from imgview, mode=viewBasket
* the permission check with photoIsAllowed() is done while checking out
- */
+
if( isset( $_POST['img_id'] ) )
{
@@ -126,7 +125,7 @@
}
Header("Location: ".linConvertAmp($_SESSION['ref_url_full'])."&linMsg=basket_added");
- exit();
+ exit();*/
case 'remove_all':
/**
Modified: trunk/linpha2/templates/default/basket.html.php
===================================================================
--- trunk/linpha2/templates/default/basket.html.php 2008-04-27 21:51:22 UTC (rev 4932)
+++ trunk/linpha2/templates/default/basket.html.php 2008-05-05 22:00:41 UTC (rev 4933)
@@ -83,19 +83,19 @@
<table>
<tr>
<td width="170"><?php echo i18n("Recipient"); ?>:</td>
- <td><input type="text" name="mail_address" value="<?php echo $mail_address; ?>" style="width: 175px;" /></td>
+ <td><input type="text" name="mail_address" value="<?php echo $mail_address; ?>" style="width: 235px;" /></td>
</tr>
<tr>
<td><?php echo i18n("Sender"); ?>:</td>
- <td><input type="text" name="sender_address" value="<?php echo $sender_address; ?>" style="width: 175px;" /></td>
+ <td><input type="text" name="sender_address" value="<?php echo $sender_address; ?>" style="width: 235px;" /></td>
</tr>
<tr>
<td><?php echo i18n("Subject"); ?>:</td>
- <td><input type="text" name="subject" value="<?php echo $subject; ?>" style="width: 175px;" /></td>
+ <td><input type="text" name="subject" value="<?php echo $subject; ?>" style="width: 235px;" /></td>
</tr>
<tr>
<td><?php echo i18n("Message"); ?>:</td>
- <td><textarea name="text_message" style="width: 175px;" rows="5" cols="40"><?php echo $text_message; ?></textarea></td>
+ <td><textarea name="text_message" style="width: 235px;" rows="5" cols="40"><?php echo $text_message; ?></textarea></td>
</tr>
<tr>
<td><?php echo i18n("Mail Format"); ?>:</td>
Modified: trunk/linpha2/templates/default/global.head.php
===================================================================
--- trunk/linpha2/templates/default/global.head.php 2008-04-27 21:51:22 UTC (rev 4932)
+++ trunk/linpha2/templates/default/global.head.php 2008-05-05 22:00:41 UTC (rev 4933)
@@ -72,8 +72,8 @@
<?php if (linUseAjax()) { ?>
<!-- Load the YUI Loader script: -->
-<!--<script src="http://yui.yahooapis.com/2.5.0/build/yuiloader/yuiloader-beta-min.js"></script> -->
-<script src="http://yui.yahooapis.com/2.5.1/build/yuiloader/yuiloader-beta-debug.js"></script>
+<script src="http://yui.yahooapis.com/2.5.0/build/yuiloader/yuiloader-beta-min.js"></script>
+<!--<script src="http://yui.yahooapis.com/2.5.1/build/yuiloader/yuiloader-beta-debug.js"></script>-->
<script type="text/javascript" language="Javascript">
var linYUILoader = new YAHOO.util.YUILoader({
require: ["logger"], // , "menu"
Modified: trunk/linpha2/templates/default/themes/default/css/viewer.css
===================================================================
--- trunk/linpha2/templates/default/themes/default/css/viewer.css 2008-04-27 21:51:22 UTC (rev 4932)
+++ trunk/linpha2/templates/default/themes/default/css/viewer.css 2008-05-05 22:00:41 UTC (rev 4933)
@@ -32,6 +32,10 @@
text-align: left;
}
+#linDivLoadingAlbum {
+ padding-left: 45%;
+ padding-top: 30px;
+}
#linDivLoading {
/*position: absolute;
left: 50%;
Deleted: trunk/linpha2/templates/default/view_img.head.php
===================================================================
--- trunk/linpha2/templates/default/view_img.head.php 2008-04-27 21:51:22 UTC (rev 4932)
+++ trunk/linpha2/templates/default/view_img.head.php 2008-05-05 22:00:41 UTC (rev 4933)
@@ -1,39 +0,0 @@
-
-<script language="JavaScript" type="text/javascript">
-var imageSrc = '<?php echo LINPHA_CLIENT.'/get_image.php?linId='; ?>';
-var thumbSrc = '<?php echo LINPHA_CLIENT.'/get_thumb.php?linId='; ?>';
-var maxImageWidth = <?php echo $GLOBALS['linpha']->sql->config->value['sys_style_image_width']; ?>;
-var maxImageHeight = <?php echo $GLOBALS['linpha']->sql->config->value['sys_style_image_height']; ?>;
-var startImgHeight = <?php echo $GLOBALS['linpha']->imgview->img_height; ?>;
-var firstImgId = <?php echo $GLOBALS['linpha']->imgview->photos_filtered[0]['id']; /* @todo needs updating on change of sort order */ ?>;
-var lastImgId = <?php echo $GLOBALS['linpha']->imgview->photos_filtered[ count($GLOBALS['linpha']->imgview->photos_filtered)-1 ]['id']; /* @todo needs updating on change of sort order */ ?>;
-var useEffects = <?php echo $GLOBALS['linpha']->sql->config->value['sys_style_image_useeffects']; ?>;
-var linSlideshowHtml = '<?php
-/**
- * @todo is it somehow possible to cache the slideshow divs?
- * for example in external .js file? (that would have to be generated from a php file...)
- */
-$fragment = 'slideshow'; ob_start();
-include(LINPHA_DIR.'/templates/'.$this->template_name.'/fragments.php');
-$string = ob_get_clean(); $string = str_replace("\n","",$string); $string = str_replace("\r","",$string); $string = str_replace("\t","",$string);
-echo $string;
-?>';
-</script>
-
-<script type="text/javascript" language="javascript" src="<?php echo LINPHA_CLIENT; ?>/lib/js/scriptaculous.js?load=effects,builder"></script>
-<script type="text/javascript" language="javascript" src="<?php echo LINPHA_CLIENT; ?>/lib/js/LinImage.js"> </script>
-
-
-<!-- YUI Dependencies -->
-<!-- Sam Skin CSS for TabView -->
-<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.0/build/tabview/assets/skins/sam/tabview.css">
-
-<!-- JavaScript Dependencies for Tabview: -->
-<script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
-<script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/element/element-beta-min.js"></script>
-
-<!-- OPTIONAL: Connection (required for dynamic loading of data) -->
-<script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/connection/connection-min.js"></script>
-
-<!-- Source file for TabView -->
-<script type="text/javascript" src="http://yui.yahooapis.com/2.5.0/build/tabview/tabview-min.js"></script>
Deleted: trunk/linpha2/templates/default/view_img.html.php
===================================================================
--- trunk/linpha2/templates/default/view_img.html.php 2008-04-27 21:51:22 UTC (rev 4932)
+++ trunk/linpha2/templates/default/view_img.html.php 2008-05-05 22:00:41 UTC (rev 4933)
@@ -1,193 +0,0 @@
-
-<!-- navigation -->
-<?php if(isset($linTpl->output['navigation']) && !empty($linTpl->output['navigation'])) { ?>
- <?php echo $linTpl->divRoundCorners('top','main'); ?>
-
- <div id="linDivNavigation">
- <?php echo $linTpl->output['navigation']; ?>
- </div>
-
- <?php echo $linTpl->divRoundCorners('bottom','main'); ?>
-<?php } ?>
-
-<!-- thumbnails -->
-<?php echo $linTpl->divRoundCorners('top','main'); ?>
-
- <div id="linDivThumbnavi">
- <div id="linDivThumbnavi_Prev"></div>
- <div id="linDivThumbnavi_Current"></div>
- <div id="linDivThumbnavi_Next"></div>
- </div>
-
-<?php echo $linTpl->divRoundCorners('bottom','main'); ?>
-
-<!-- main -->
-<?php echo $linTpl->divRoundCorners('top','main'); ?>
- <div id="linDivMain" class="yui-skin-sam">
- <div id="linDivloading">
- <img src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/loading.gif">
- </div>
-
- <noscript><h1 class="linStyle"><?php echo i18n("If you have just disabled Javascript, you will need to restart your browser."); ?></h1></noscript>
-
- <!-- show image -->
- <div id="linDivMainimage">
- <img id="linImgMainimage" style="display: none;">
- </div>
-
- <div id="linDivInfoLink" style="display: none; color: grey;">
- <a id="linHrefPanoLink" href="<?php echo LINPHA_LINK.'linCat=panorama&linId='.$linTpl->idCurrent; ?>" onclick="javascript:myLinImage.updateLinId(this)" target="_blank" style="color: black;"><?php echo i18n("Panorama"); ?></a>
- <div id="linDivVideoLink">
- <a href="<?php echo LINPHA_LINK.'linCat=video&linId='.$linTpl->idCurrent; ?>" onclick="javascript:myLinImage.updateLinId(this)" target="_blank"><?php echo i18n("Play Video"); ?></a>
- <a href="<?php echo LINPHA_LINK.'linCat=download&linId='.$linTpl->idCurrent; ?>&isDownload=true" onclick="javascript:myLinImage.updateLinId(this)"><?php echo i18n("Download Video"); ?></a>
- </div>
- <?php /*<a id="linHrefInfoLink" href="javascript:myLinImage.showImgInfo()" style="color: black;">Info</a>*/ ?>
- </div>
-
-
- <br /><br />
-
- <div id="linDivTabs" class="yui-navset">
- <ul class="yui-nav">
- <li class="selected"><a href=""><em><?php echo i18n("Comments"); ?></em></a></li>
- </ul>
- <div class="yui-content" style="height: 200px; overflow: auto;">
- <div><p>
- <!-- comments -->
- <?php if($GLOBALS['linpha']->sql->checkPermission('metadata_comments')) { ?>
- <!-- show add comment form -->
- <div id="linDivAddComment">
- <form action="" method="POST" onsubmit="myLinGlobal.AjaxPost(linUrlBase + '&linId=' + IdCurrent + '&xml', Form.serialize(this),myLinImage.saveComment); return false;">
- <?php echo i18n("Add Comment"); ?>:<br />
- <div id="linDivAddCommentText">
- <input type="text" id="linInputAddCommentText" class="linForms" name="inputAddCommentText" value="" tabindex="1" style="width: 300px" />
- <a href="javascript:myLinImage.openTextarea()">(+)</a>
- </div>
- <div id="linDivAddCommentTextarea" style="display: none;">
- <textarea id="linInputAddCommentTextarea" class="linForms" name="inputAddCommentTextarea" tabindex="1" rows="10" style="width: 300px"></textarea>
- </div>
-
- <?php echo i18n("Name"); ?>: <input type="text" class="linForms" name="inputAddCommentAuthor" value="" tabindex="2" size="10" style="width: 100px" maxlength="255" />
-
- <input type="hidden" name="cmd" value="add_comment" />
- <input type="submit" name="submit" class="linButton" value="<?php echo i18n("Submit"); ?>" tabindex="2" />
- </form>
- </div>
-
- <br />
- <?php } /* end if checkPermission('metadata_comments') */ ?>
-
- <!-- show image comments -->
- <div id="linDivComments"></div>
- </p></div>
-
-
- </div>
- </div>
-
-
- <script type="text/javascript">
- var myTabs = new YAHOO.widget.TabView("linDivTabs");
-
- myTabs.addTab( new YAHOO.widget.Tab({
- label: '<?php echo i18n("Image Info"); ?>',
- content: '<div id="linDivMeta"></div>'
- }));
- myTabs.addTab( new YAHOO.widget.Tab({
- label: '<?php echo i18n("GPS Info"); ?>',
- content: 'GPS'
- }));
- myTabs.addTab( new YAHOO.widget.Tab({
- label: '<?php echo i18n("EXIF"); ?>',
- content: 'EXIF'
- }));
- myTabs.addTab( new YAHOO.widget.Tab({
- label: '<?php echo i18n("ITPC/XMP"); ?>',
- content: 'ITPC/XMP'
- }));
-
-
- myTabs.addTab( new YAHOO.widget.Tab({
- label: '<?php echo i18n("Edit Meta Data"); ?>',
- content: 'edit'
- }));
- myTabs.addTab( new YAHOO.widget.Tab({
- label: '<?php echo i18n("Edit ITPC/XMP"); ?>',
- content: 'edit'
- }));
-
-
- myTabs.addTab( new YAHOO.widget.Tab({
- label: '<?php echo i18n("Video Info"); ?>',
- content: '<div id="linDivMeta"></div>'
- }));
-
- /*
- <li><a href=""><em><?php echo i18n("Rating"); ?></em></a></li>
- <li><a href=""><em><?php echo i18n("Fileinfo"); ?></em></a></li>
- <li><a href=""><em><?php echo i18n("GPS Info"); ?></em></a></li>
- <li><a href=""><em><?php echo i18n("EXIF"); ?></em></a></li>
- <li><a href=""><em><?php echo i18n("IPTC/XMP"); ?></em></a></li>
-
- <div><p><?php echo i18n("Rating"); ?></p></div>
-
- <div><p>
- <?php echo i18n("Fileinfo"); ?>
- <div id="linDivMeta"></div>
-
-
- </p></div>
-
- <div><p><?php echo i18n("GPS Info"); ?></p></div>
-
- <div><p>
- <?php echo i18n("EXIF"); ?>
- <div id="linDivExifLink" class="linDivMetaLinks"><a href="<?php echo LINPHA_LINK.'linCat=metadata&linId='.$linTpl->idCurrent; ?>" onclick="javascript:myLinImage.updateLinId(this)" target="_blank"><?php echo i18n("Show All Metadata"); ?></a></div>
- </p></div>
-
- <div><p><?php echo i18n("IPTC/XMP"); ?></p></div>
-
- */
- /*alert( myTabs );
- alert( myTabs.get(0) );
- alert( myTabs.get(0).set('content','hiho') );*/
- //var tab0 = myTabs.get(0);
- //alert(tab0);
- //tabView.removeTab(tabView.get('activeTab'));
- </script>
-
-
- <div id="container"></div>
-
- <script type="text/javascript">
- /*var tabView = new YAHOO.widget.TabView();
-
- tabView.addTab( new YAHOO.widget.Tab({
- label: 'lorem',
- content: '<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat.</p>',
- active: true
- }));
-
- tabView.addTab( new YAHOO.widget.Tab({
- label: 'ipsum',
- content: '<ul><li><a href="#">Lorem ipsum dolor sit amet.</a></li><li><a href="#">Lorem ipsum dolor sit amet.</a></li><li><a href="#">Lorem ipsum dolor sit amet.</a></li><li><a href="#">Lorem ipsum dolor sit amet.</a></li></ul>'
-
- }));
-
- tabView.addTab( new YAHOO.widget.Tab({
- label: 'dolor',
- content: '<form action="#"><fieldset><legend>Lorem Ipsum</legend><label for="foo"> <input id="foo" name="foo"></label><input type="submit" value="submit"></fieldset></form>'
- }));
-
- tabView.appendTo('container');*/
-
- //tabView.removeTab(tabView.get('activeTab'));
- //tabView.getTab(0).set('content','hiho');
- //tabView.getTab(0).set('disabled',true);
- //tabView.getTab(0).set('contentVisible',false);
-
- </script>
-
- </div>
-
-<?php echo $linTpl->divRoundCorners('bottom','main'); ?>
\ No newline at end of file
Deleted: trunk/linpha2/templates/default/view_meta.html.php
===================================================================
Deleted: trunk/linpha2/templates/default/view_thumb.head.php
===================================================================
--- trunk/linpha2/templates/default/view_thumb.head.php 2008-04-27 21:51:22 UTC (rev 4932)
+++ trunk/linpha2/templates/default/view_thumb.head.php 2008-05-05 22:00:41 UTC (rev 4933)
@@ -1,13 +0,0 @@
-<script language="JavaScript" type="text/javascript">
-var linTotPhotos = <?php echo $GLOBALS['linpha']->imgview->tot_photos; ?>;
-var linStartupPage = 1;
-var linTnSize = <?php echo $GLOBALS['linpha']->sql->config->value['sys_style_thumb_size_display']; ?>;
-var linPhotosPerPage = 'auto';
-var linViewMode = '<?php echo $_SESSION['mode_thumbview']; ?>';
-var linNrTextLines = <?php echo $GLOBALS['linpha']->imgview->nr_text_lines; ?>;
-<?php echo $linTpl->output['files_db']."\n"; ?>
-</script>
-
-<script type="text/javascript" language="javascript" src="<?php echo LINPHA_CLIENT; ?>/lib/js/scriptaculous.js?load=builder"></script>
-<script type="text/javascript" language="javascript" src="<?php echo $linTpl->themeFile('DefsThumbView.js'); ?>"></script>
-<script type="text/javascript" language="javascript" src="<?php echo LINPHA_CLIENT; ?>/lib/js/LinThumbnails.js"></script>
Deleted: trunk/linpha2/templates/default/view_thumb.html.php
===================================================================
--- trunk/linpha2/templates/default/view_thumb.html.php 2008-04-27 21:51:22 UTC (rev 4932)
+++ trunk/linpha2/templates/default/view_thumb.html.php 2008-05-05 22:00:41 UTC (rev 4933)
@@ -1,29 +0,0 @@
-
-<!-- navigation -->
-<?php if(isset($linTpl->output['navigation']) && !empty($linTpl->output['navigation'])) { ?>
- <?php echo $linTpl->divRoundCorners('top','main'); ?>
-
- <div id="linDivNavigation">
- <?php echo $linTpl->output['navigation']; ?>
- </div>
-
- <?php echo $linTpl->divRoundCorners('bottom','main'); ?>
-<?php } ?>
-
-<!-- main -->
-<?php echo $linTpl->divRoundCorners('top','main'); ?>
-
- <div id="linDivPagenrOuter">
- <div id="linDivPagenr">
- <div id="linDivPagenrLeft" class="linDivPagenrAll"><?php echo $linTpl->output['page_nr_left']; ?></div>
- <div id="linDivPagenrMiddle" class="linDivPagenrAll linDivPagenrMiddle"><?php echo $linTpl->output['page_nr']; ?></div>
- <div id="linDivPagenrRight" class="linDivPagenrAll"><?php echo $linTpl->output['page_nr_right']; ?></div>
- </div>
- </div>
-
- <div id="linDivMain">
- <noscript><h1 class="linStyle"><?php echo i18n("If you have just disabled Javascript, you will have to restart your browser."); ?></h1></noscript>
- </div>
- <div style="clear: both;"></div>
-
-<?php echo $linTpl->divRoundCorners('bottom','main'); ?>
Modified: trunk/linpha2/templates/default/viewer.html.php
===================================================================
--- trunk/linpha2/templates/default/viewer.html.php 2008-04-27 21:51:22 UTC (rev 4932)
+++ trunk/linpha2/templates/default/viewer.html.php 2008-05-05 22:00:41 UTC (rev 4933)
@@ -19,6 +19,7 @@
<div id="linDivNav" style="display: none;">nav</div>
<div><?php /* Internet Explorer requires this extra div */ ?>
+ <div id="linDivLoadingAlbum"><img src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/loading.gif"></div>
<div id="linDivImage" style="display: none;">
<div id="linDivMainImage" ondblclick="myLinNavigation.fullscreenStart()">
@@ -34,7 +35,7 @@
<div id="linDivOtherInfo" style="display: none;">
</div>
</div>
- <div id="linDivThumbs" style="display: none;">thumb</div>
+ <div id="linDivThumbs" style="display: none;"></div>
</div>
<div style="clear: both"></div>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|