Getting closer to working in-place editing. TODO: Fix the way the links work, fix click-dragging on text, run callbacks on change of the metacode or link, and organize the metacode list

This commit is contained in:
Devin Howard 2013-01-02 21:49:00 -05:00
parent 0384c3f866
commit 7e6294a705
2 changed files with 34 additions and 19 deletions

View file

@ -535,20 +535,26 @@ function onCreateLabelHandler(domElement, node) {
data-collection=$_metacode_choices_$ \ data-collection=$_metacode_choices_$ \
data-attribute="metacode" \ data-attribute="metacode" \
data-type="select">$_metacode_$</p> \ data-type="select">$_metacode_$</p> \
<a href="/topics/$_id_$"> \ <img alt="$_metacode_$" \
<img alt="$_metacode_$" \ class="icon" \
class="icon" \ height="50" \
height="50" \ width="50" \
width="50" \
src="$_imgsrc_$" /> \ src="$_imgsrc_$" /> \
</a> \
<div class="scroll"> \ <div class="scroll"> \
<span class="title best_in_place" \ <span class="title"> \
id="best_in_place_name" \ <span class="best_in_place" \
data-url="/topics/$_id_$" \ id="best_in_place_name" \
data-object="topic" \ data-url="/topics/$_id_$" \
data-attribute="name" \ data-object="topic" \
data-type="input">$_name_$</span> \ data-attribute="name" \
data-type="input"> \
$_name_$</span> \
<a href="/topics/$_id_$"> \
<img class="topic-go-arrow" \
title="Go to the topic page" \
src="/assets/go-arrow.png" /> \
</a> \
</span> \
<div class="contributor"> \ <div class="contributor"> \
Added by: <a href="/users/$_userid_$">$_username_$</a> \ Added by: <a href="/users/$_userid_$">$_username_$</a> \
</div> \ </div> \
@ -561,13 +567,16 @@ function onCreateLabelHandler(domElement, node) {
data-type="textarea">$_desc_$</span> \ data-type="textarea">$_desc_$</span> \
</div> \ </div> \
</div> \ </div> \
<span class="best_in_place" \
id="best_in_place_link" \
data-url="/topics/$_id_$" \
data-object="topic" \
data-attribute="link" \
data-type="input">$_link_$</span> \
<a href="$_link_$" class="link" target="_blank"> \ <a href="$_link_$" class="link" target="_blank"> \
<span class="best_in_place" \ <img class="topic-go-arrow link" \
id="best_in_place_link" \ title="Visit $_link_$" \
data-url="/topics/$_id_$" \ src="/assets/go-arrow.png" /> \
data-object="topic" \
data-attribute="link" \
data-type="input">$_link_$</span> \
</a> \ </a> \
</div>'; </div>';

View file

@ -34,4 +34,10 @@ line-height: 24px;}
.topic .desc { font-size:15px; font-family:Arial, Helvetica, sans-serif; } .topic .desc { font-size:15px; font-family:Arial, Helvetica, sans-serif; }
.topic .desc h3 { font-style:normal; margin-top:5px; } .topic .desc h3 { font-style:normal; margin-top:5px; }
.topic .link { position:absolute; width:170px; top:295px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .topic .link { position:absolute; width:170px; top:295px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topic-go-arrow {
width: 1em;
height: 1em;
float: right;
}