Fix #1218 & 1219 Enhance sharing window

This commit is contained in:
Nicolas Le Goff
2013-06-28 17:15:48 +02:00
parent fbedd58a73
commit ac6b3e439a
6 changed files with 42 additions and 101 deletions

View File

@@ -10,68 +10,49 @@
{% set pageurl = preview.get_permalink().get_page() %}
{% if url is not empty %}
<div id="tabs">
<ul>
<li>
<a href="#share">{% trans 'reponses:: partager' %}</a>
</li>
</ul>
<div id="share">
<div id="tweet">
<div style="margin-left:20px;padding:10px 0 5px;"><a href="http://www.twitter.com/home/?status={{ pageurl }}" target="_blank"><img src="/skins/icons/twitter.ico" title="share this on twitter" style="vertical-align:middle;padding:0 5px;"/> Send to Twitter</a></div>
<div style="margin-left:20px;padding:5px 0 10px;"><a href="http://www.facebook.com/sharer.php?u={{ pageurl }}" target="_blank"><img src="/skins/icons/facebook.ico" title="share on facebook" style="vertical-align:middle;padding:0 5px;"/> Send to Facebook</a></div>
<div id="share">
<div id="tweet" class="well-large">
<div>
<a href="http://www.twitter.com/home/?status={{ pageurl }}" target="_blank">
<img src="/skins/icons/twitter.ico" title="share this on twitter" style="vertical-align:middle;padding:0 5px;"/>
{% trans %}Send to Twitter{% endtrans %}
</a>
</div>
<div id="embed" style="text-align:center;padding:10px 0;">
<div style="text-align:left;margin-left:20px;padding:10px 0;">URL : </div>
<input style="width:90%;" readonly="true" type="text" value="{{ pageurl }}" onfocus="this.focus();this.select();" onclick="this.focus();this.select();" />
<div style="text-align:left;margin-left:20px;padding:10px 0;">Embed :</div>
<textarea onfocus="this.focus();this.select();" onclick="this.focus();this.select();" style="width:90%;height:50px;" readonly="true" >
{% if type == 'video' %}
<object width="100%" height="100%" type="application/x-shockwave-flash" data="{{ app['phraseanet.registry'].get('GV_ServerName')}}include/jslibs/flowplayer/flowplayer-3.2.12.swf">
<param value="true" name="allowfullscreen">
<param value="always" name="allowscriptaccess">
<param value="high" name="quality">
<param value="false" name="cachebusting">
<param value="#000000" name="bgcolor">
<param value="config={&quot;clip&quot;:{&quot;url&quot;:&quot;{{ url|url_encode }}&quot;},&quot;playlist&quot;:[{&quot;url&quot;:&quot;{{ url|url_encode }}&quot;}]}" name="flashvars">
</object>
{% elseif type == 'document' %}
<object width="600" height="500" type="application/x-shockwave-flash" data="{{app['phraseanet.registry'].get('GV_ServerName')}}include/FlexPaper_flash/FlexPaperViewer.swf" style="visibility: visible; width: 600px; height: 500px; top: 0px;">
<param name="menu" value="false">
<param name="flashvars" value="SwfFile={{ url|url_encode }}&amp;Scale=0.6&amp;ZoomTransition=easeOut&amp;ZoomTime=0.5&amp;ZoomInterval=0.1&amp;FitPageOnLoad=true&amp;FitWidthOnLoad=true&amp;PrintEnabled=false&amp;FullScreenAsMaxWindow=false&amp;localeChain={{ app['locale'] }}">
<param name="allowFullScreen" value="true">
<param name="wmode" value="transparent">
</object>
{% elseif type == 'audio' %}
<object width="290" height="24" data="{{ app['phraseanet.registry'].get('GV_ServerName') }}include/jslibs/audio-player/player.swf" type="application/x-shockwave-flash">
<param value="{{ app['phraseanet.registry'].get('GV_ServerName') }}include/jslibs/audio-player/player.swf" name="movie"/>
<param value="playerID=1&amp;autostart=yes&amp;soundFile={{ url|url_encode }}" name="FlashVars"/>
<param value="high" name="quality"/>
<param value="false" name="menu"/>
</object>
{% else %}
<a href="{{ pageurl }}"><img src="{{ url|url_encode }}" title="" /></a>
{% endif %}
<div>
<a href="http://www.facebook.com/sharer.php?u={{ pageurl }}" target="_blank">
<img src="/skins/icons/facebook.ico" title="share on facebook" style="vertical-align:middle;padding:0 5px;"/>
{% trans %}Send to Facebook{% endtrans %}
</a>
</div>
</div>
<div id="embed" class="well-large">
<form action="#">
<label>{% trans %}Resource URL{% endtrans %}</label>
<input class="input-block-level" readonly="readonly" type="text" value="{{ url }}" />
<label>{% trans %}Detailed view URL{% endtrans %}</label>
<input class="input-block-level" readonly="readonly" type="text" value="{{ pageurl }}" />
{% if type == 'image' %}
<label>{% trans %}Embed code{% endtrans %}</label>
{% spaceless %}
<textarea class="input-block-level" rows="4" readonly="true">
<a href="{{ pageurl }}"><img src="{{ url|url_encode }}" title="" /></a>
</textarea>
</div>
<div style="text-align:center;padding:20px 0;">
<input class="input-button" type="button" value="{% trans 'boutton::fermer' %}" />
</div>
{% endspaceless %}
{% endif %}
</form>
</div>
</div>
<script language="javascript">
$(document).ready(function(){
$('#tabs').tabs();
$('input.ui-state-default').hover(
function(){$(this).addClass('ui-state-hover')},
function(){$(this).removeClass('ui-state-hover')}
function(){$(this).addClass('ui-state-hover');},
function(){$(this).removeClass('ui-state-hover');}
);
});
</script>
{% else %}
<div><{% trans 'Aucune URL disponible' %}</div>
<div><{% trans 'No URL available' %}</div>
{% endif %}
{% endif %}

View File

@@ -161,11 +161,11 @@
<table style='position:relative; top:5px; table-layout:fixed; width:240px'>
<tr>
<td style='width:30px; text-align:right'>
<input type='button' value='&#9668;' class='input-button' onclick="edit_chgFld(event, -1);return(false);" />
<input type='button' value='&#9668;' class='btn btn-inverse' onclick="edit_chgFld(event, -1);return(false);" />
</td>
<td id="idFieldNameEdit"></td>
<td style='width:30px; text-align:left'>
<input type='button' value='&#9658;' class='input-button' onclick="edit_chgFld(event, 1);return(false);" />
<input type='button' value='&#9658;' class='btn btn-inverse' onclick="edit_chgFld(event, 1);return(false);" />
</td>
</tr>
</table>
@@ -223,9 +223,9 @@
</div>
</div>
<div id="idDivButtons" class="PNB">
<input id="ok" type="button" value="{% trans 'boutton::remplacer' %}" class="input-button" onclick="edit_validField(event, 'ok');return(false);">
<input id="fusion" type="button" value="{% trans 'boutton::ajouter' %}" class="input-button" onclick="edit_validField(event, 'fusion');return(false);">
<input id="cancel" type="button" value="{% trans 'boutton::annuler' %}" class="input-button" onclick="edit_validField(event, 'cancel');return(false);">
<input id="ok" type="button" value="{% trans 'boutton::remplacer' %}" class="btn btn-inverse" onclick="edit_validField(event, 'ok');return(false);">
<input id="fusion" type="button" value="{% trans 'boutton::ajouter' %}" class="btn btn-inverse" onclick="edit_validField(event, 'fusion');return(false);">
<input id="cancel" type="button" value="{% trans 'boutton::annuler' %}" class="btn btn-inverse" onclick="edit_validField(event, 'cancel');return(false);">
</div>
<div id="idExplain" class="PNB"></div>
</div>
@@ -360,7 +360,7 @@
<br/>
<br/>
<input type="hidden" name="edit-lst" id="edit_lst" value="{{ recordsRequest.serializedList() }}" />
<input type='button' class='input-button'
<input type='button' class='btn btn-inverse'
value="{% trans 'boutton::fermer' %}"
onClick="$('#EDITWINDOW').fadeOut();hideOverlay(2);return(false);" />
</center>

View File

@@ -1436,21 +1436,6 @@ form.phrasea_query input.query {
}
/******* INPUTS ***************************************************************/
input.input-button {
background-image: url('../../icons/input_back.png');
background-repeat: repeat-x;
height: 18px;
border: 1px solid #b1b1b1;
font-size: 0.8em;
font-weight: bold;
color: #bfbfbf;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
cursor: pointer;
}
input.input-button.hover {
color: #FEFEFE;
}

View File

@@ -1487,24 +1487,6 @@ form.phrasea_query input.query {
/******* INPUTS ***************************************************************/
input.input-button {
background-image: url('../../icons/input_back.png');
background-repeat: repeat-x;
height: 18px;
border: 1px solid #b1b1b1;
font-size: 0.8em;
font-weight: bold;
color: #bfbfbf;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
cursor: pointer;
}
input.input-button.hover {
color: #FEFEFE;
}
input.search {
padding-left: 25px;
background-image: url('/skins/icons/search.png');

View File

@@ -2102,15 +2102,6 @@ function startThisEditing(sbas_id,what,regbasprid,ssel)
}
});
$('input.input-button').hover(
function(){
$(this).addClass('hover');
},
function(){
$(this).removeClass('hover');
}
);
ETHSeeker = new EditThesaurusSeeker(p4.edit.sbas_id);
hsplit1();

View File

@@ -2345,9 +2345,7 @@ function checkDeleteThis(type, el)
var buttons = {};
buttons[language.valider]= function(e)
{
deleteBasket(el);
};
$('#DIALOG').empty().append(language.confirmDel).attr('title','Attention !').dialog({
@@ -2366,9 +2364,13 @@ function checkDeleteThis(type, el)
}
}
function shareThis(bas,rec)
{
var dialog = p4.Dialog.Create({title: language['share'], size:'Small'});
var dialog = p4.Dialog.Create({
title: language['share']
});
dialog.load("/prod/share/record/"+bas+"/"+rec+ "/","GET");
}