[dev] [commit] r993 - docs phplib phplib/models templates/admin templates/common templates/common/bits wwwbase/img/jcrop wwwbase/styles
automailer at dexonline.ro
automailer at dexonline.ro
Sat Sep 21 00:31:09 EEST 2013
Author: grigoroiualex
Date: Sat Sep 21 00:31:09 2013
New Revision: 993
Log:
Weirdly some changes weren't commited. Also moved an image from styles folder to img folder.
Added:
templates/common/bits/tagsInfo.ihtml
wwwbase/img/jcrop/
wwwbase/img/jcrop/Jcrop.gif
- copied unchanged from r991, wwwbase/styles/Jcrop.gif
Deleted:
wwwbase/styles/Jcrop.gif
Modified:
docs/schema.txt
phplib/SmartyWrap.php
phplib/models/VisualTag.php
templates/admin/index.ihtml
templates/admin/visualTag.ihtml
templates/common/bits/gallery.ihtml
templates/common/search.ihtml
wwwbase/styles/jquery.Jcrop.min.css
Modified: docs/schema.txt
==============================================================================
--- docs/schema.txt Sat Sep 21 00:21:06 2013 (r992)
+++ docs/schema.txt Sat Sep 21 00:31:09 2013 (r993)
@@ -242,3 +242,37 @@
adjectiveModel - The number (not ID!) of the adjective model. An
entry in Model is guaranteed to exist with type A and number
adjectiveModel.
+
+The Visual table
+------------------
+
+Contains information about definition images. Images are stored in
+wwwbase/img/visual folder and every image has a corresponding thumbnail
+that is created in a .thumb folder (e.g. wwwbase/img/visual/flower.jpg
+-> image => wwwbase/img/visual/.thumb/flower.jpg -> thumbnail).
+
+id - Unique numeric ID.
+path - Image path relative to visual folder.
+width - Image width.
+height - Image height.
+lexemeId - The lexeme ID to which the image corresponds.
+userId - The ID of the user that has uploaded the image.
+revised - A boolean value to show whether the image has been tagged.
+ If true, then it is ready for display on the corresponding
+ lexeme definition page.
+
+
+The VisualTag table
+---------------------
+
+Contains information needed to draw a tag on the canvas element.
+This information is automatically stored from the tagging page.
+
+id - Unique numeric ID.
+imageId - The image on which the tags will be drawn.
+lexemeId - The ID of the lexeme that corresponds to this tag.
+label - The name of the tag (the one that will be displayed).
+textXCoord - The X coordinate for the centre of the tag text.
+textYCoord - The Y coordinate for the centre of the tag text.
+imgXCoord - The X coordinate for the spot where the tag indicates.
+imgYCoord - The Y coordinate for the spot where the tag indicates.
Modified: phplib/SmartyWrap.php
==============================================================================
--- phplib/SmartyWrap.php Sat Sep 21 00:21:06 2013 (r992)
+++ phplib/SmartyWrap.php Sat Sep 21 00:31:09 2013 (r993)
@@ -167,7 +167,7 @@
self::$cssFiles[16] = 'easyui/icon.css?v=1';
break;
case 'select2': self::$cssFiles[17] = 'select2/select2.css?v=3'; break;
- case 'gallery': self::$cssFiles[18] = 'lightbox.css'; break;
+ case 'gallery': self::$cssFiles[18] = 'colorbox.css'; break;
default:
FlashMessage::add("Cannot load CSS file {$id}");
util_redirect(util_getWwwRoot());
@@ -204,7 +204,11 @@
case 'select2': self::$jsFiles[21] = 'select2.min.js?v=3'; break;
case 'select2Dev': self::$jsFiles[22] = 'select2Dev.js?v=2'; break;
case 'visualTag': self::$jsFiles[23] = 'visualTag.js'; break;
- case 'gallery': self::$jsFiles[24] = 'lightbox-2.6.min.js'; break;
+ case 'gallery':
+ self::$jsFiles[22] = 'jquery.colorbox-min.js';
+ self::$jsFiles[23] = 'dexGallery.js';
+ self::$jsFiles[24] = 'jcanvas.min.js';
+ break;
default:
FlashMessage::add("Cannot load JS script {$id}");
util_redirect(util_getWwwRoot());
Modified: phplib/models/VisualTag.php
==============================================================================
--- phplib/models/VisualTag.php Sat Sep 21 00:21:06 2013 (r992)
+++ phplib/models/VisualTag.php Sat Sep 21 00:31:09 2013 (r993)
@@ -11,3 +11,5 @@
}
}
}
+
+?>
Modified: templates/admin/index.ihtml
==============================================================================
--- templates/admin/index.ihtml Sat Sep 21 00:21:06 2013 (r992)
+++ templates/admin/index.ihtml Sat Sep 21 00:31:09 2013 (r993)
@@ -212,7 +212,8 @@
<a href="{$wwwRoot}moderatori">Vizualizare / editare moderatori</a><br/>
<a href="{$wwwRoot}surse">Vizualizare / editare surse</a><br/>
<a href="{$wwwRoot}etichete-sensuri">Vizualizare / editare etichete pentru sensuri</a><br/>
- <a href="{$wwwRoot}tipuri-modele">Vizualizare / editare tipuri de modele</a>
+ <a href="{$wwwRoot}tipuri-modele">Vizualizare / editare tipuri de modele</a><br/>
+ <a href="{$wwwRoot}admin/visual.php">Adăugare imagini pentru definiții</a>
{/if}
<script type="text/javascript">
Modified: templates/admin/visualTag.ihtml
==============================================================================
--- templates/admin/visualTag.ihtml Sat Sep 21 00:21:06 2013 (r992)
+++ templates/admin/visualTag.ihtml Sat Sep 21 00:31:09 2013 (r993)
@@ -1,7 +1,7 @@
<br/>
{if $anyUntaggedImages}
{if !$imgLexemeId}
- <div class="visualTagCanvas">
+ <div class="visualTagImg">
<img src="{$imagePath}"/>
</div>
<div>
Modified: templates/common/bits/gallery.ihtml
==============================================================================
--- templates/common/bits/gallery.ihtml Sat Sep 21 00:21:06 2013 (r992)
+++ templates/common/bits/gallery.ihtml Sat Sep 21 00:31:09 2013 (r993)
@@ -1,3 +1,5 @@
-{foreach from=$images item=image}
- <a href="{$image.img}" data-lightbox="{$image.name}"><img src="{$image.tmb}"/></a>
-{/foreach}
+<div id="gallery">
+ {foreach from=$images item=image}
+ <a class="colorbox" href="{$image.img}" title="{$image.name}"><img src="{$image.tmb}"/></a>
+ {/foreach}
+</div>
Added: templates/common/bits/tagsInfo.ihtml
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ templates/common/bits/tagsInfo.ihtml Sat Sep 21 00:31:09 2013 (r993)
@@ -0,0 +1,10 @@
+<div id="tagsInfo">
+{foreach from=$tags item=img}
+ <div id="{$img.lexeme}">
+ <p>{$img.width}, {$img.height}</p>
+ {foreach from=$img.tags item=tag}
+ <p>{$tag.textX}, {$tag.textY}, {$tag.imgX}, {$tag.imgY}, "{$tag.label}"</p>
+ {/foreach}
+ </div>
+{/foreach}
+</div>
\ No newline at end of file
Modified: templates/common/search.ihtml
==============================================================================
--- templates/common/search.ihtml Sat Sep 21 00:21:06 2013 (r992)
+++ templates/common/search.ihtml Sat Sep 21 00:31:09 2013 (r993)
@@ -113,9 +113,10 @@
<div id="resultsWrapper" class="txt">
<div id="paradigmDiv" {if !$showParadigm}style="display: none"{/if}>{include file="common/bits/multiParadigm.ihtml"}</div>
- <div id="gallery" {if !isset($images)}style="display: none"{/if}>
- {if count($images)}{include file="common/bits/gallery.ihtml" images=$images}{/if}
- </div>
+
+ {if count($images)}
+ {include file="common/bits/gallery.ihtml" images=$images}
+ {/if}
{if $stopWords}
<span class="stopWords">
@@ -193,4 +194,8 @@
</script>
{/literal}
{/if}
+
+ {if count($tags)}
+ {include file="common/bits/tagsInfo.ihtml" tags=$tags size=$size}
+ {/if}
</div>
Copied: wwwbase/img/jcrop/Jcrop.gif (from r991, wwwbase/styles/Jcrop.gif)
==============================================================================
Binary file (source and/or target). No diff available.
Deleted: wwwbase/styles/Jcrop.gif
==============================================================================
Binary file. No diff available.
Modified: wwwbase/styles/jquery.Jcrop.min.css
==============================================================================
--- wwwbase/styles/jquery.Jcrop.min.css Sat Sep 21 00:21:06 2013 (r992)
+++ wwwbase/styles/jquery.Jcrop.min.css Sat Sep 21 00:31:09 2013 (r993)
@@ -1,6 +1,6 @@
/* jquery.Jcrop.min.css v0.9.12 (build:20130126) */
.jcrop-holder{direction:ltr;text-align:left;}
-.jcrop-vline,.jcrop-hline{background:#FFF url(Jcrop.gif);font-size:0;position:absolute;}
+.jcrop-vline,.jcrop-hline{background:#FFF url(../img/jcrop/Jcrop.gif);font-size:0;position:absolute;}
.jcrop-vline{height:100%;width:1px!important;}
.jcrop-vline.right{right:0;}
.jcrop-hline{height:1px!important;width:100%;}
More information about the Dev
mailing list