02-11-2009 08:18 AM
<import resource="classpath:scripts/extension/jquery-1.2.6.pack.js">
<import resource="classpath:scripts/extension/jquery.imgareaselect-0.6.2.min.js">
<%–
<script type="text/javascript" src="scripts/extension/jquery-1.2.6.pack.js"></script>
<script type="text/javascript" src="scripts/extension/jquery.imgareaselect-0.6.2.min.js"></script>
–%>
<script type="text/javascript">
var $x1, $y1, $x2, $y2, $w, $h;
function selectChange(img, selection)
{
$x1.text(selection.x1);
$y1.text(selection.y1);
$x2.text(selection.x2);
$y2.text(selection.y2);
$w.text(selection.width);
$h.text(selection.height);
}
$(document).ready(function () {
$x1 = $('#x1');
$y1 = $('#y1');
$x2 = $('#x2');
$y2 = $('#y2');
$w = $('#w');
$h = $('#h');
});
$(window).load(function () {
$('img#:recorte').imgAreaSelect({ selectionOpacity: 0, onSelectChange: selectChange });
});
</script>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
<f:verbatim>
<table cellpadding="2" cellspacing="2" border="0" width="100%">
<tr>
<td class="mainSubTitle">
</f:verbatim><h:outputText value="#{msg.edit_file_title}" /><f:verbatim>
</td>
</tr>
<tr>
<td style="padding:10px" valign="middle">
</f:verbatim>
<h:graphicImage id="recorte" url="#{WizardManager.bean.browserUrl}"/>
<f:verbatim>
</td>
</tr>
<tr>
<td>
</f:verbatim><h:outputText value="#{msg.edit_download_complete}" /><f:verbatim>
</td>
</tr>
</table>
</f:verbatim>
02-11-2009 09:12 AM
02-11-2009 10:22 AM
02-11-2009 10:42 AM
02-11-2009 01:00 PM
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<f:verbatim>
<script type="text/javascript" src="/scripts/extension/jquery-1.2.6.pack.js"></script>
<script type="text/javascript" src="/scripts/extension/jquery.imgareaselect-0.6.2.js"></script>
<script type="text/javascript" src="/scripts/extension/jquery.imgareaselect-0.6.2.min.js"></script>
<script type="text/javascript">
var $j = jQuery.noConflict();
var $x1, $y1, $x2, $y2, $w, $h;
function selectChange(img, selection)
{
$x1.text(selection.x1);
$y1.text(selection.y1);
$x2.text(selection.x2);
$y2.text(selection.y2);
$w.text(selection.width);
$h.text(selection.height);
}
function preview(img, selection) {
var scaleX = 100 / selection.width;
var scaleY = 100 / selection.height;
$('#thumbnail + div > img').css({
width: Math.round(scaleX * 500) + 'px',
height: Math.round(scaleY * 375) + 'px',
marginLeft: '-' + Math.round(scaleX * selection.x1) + 'px',
marginTop: '-' + Math.round(scaleY * selection.y1) + 'px'
});
$j('#x1').val(selection.x1);
$j('#y1').val(selection.y1);
$j('#x2').val(selection.x2);
$j('#y2').val(selection.y2);
$j('#w').val(selection.width);
$j('#h').val(selection.height);
}
$j(document).ready(function () {
$x1 = $('#x1');
$y1 = $('#y1');
$x2 = $('#x2');
$y2 = $('#y2');
$w = $('#w');
$h = $('#h');
});
$j(window).load(function () {
$j('img#wizard:wizard-body:recorte').imgAreaSelect({ selectionOpacity: 0, onSelectChange: selectChange });
});
</script>
</f:verbatim>
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
<f:verbatim>
<table cellpadding="2" cellspacing="2" border="0" width="100%">
<tr>
<td class="mainSubTitle">
</f:verbatim><hutputText value="#{msg.edit_file_title}" /><f:verbatim>
</td>
</tr>
<tr>
<td style="padding:10px" valign="middle">
</f:verbatim>
<h:graphicImage id="recorte" url="#{WizardManager.bean.browserUrl}"/>
<f:verbatim>
</td>
</tr>
<tr>
<td>
</f:verbatim><hutputText value="#{msg.edit_download_complete}" /><f:verbatim>
</td>
</tr>
</table>
</f:verbatim>
<script type="text/javascript" src="/scripts/extension/jquery-1.2.6.pack.js"></script>
<script type="text/javascript" src="/scripts/extension/jquery.imgareaselect-0.6.2.js"></script>
<script type="text/javascript" src="/scripts/extension/jquery.imgareaselect-0.6.2.min.js"></script>
$j(window).load(function () {
$j('img#wizard:wizard-body:recorte').imgAreaSelect({ selectionOpacity: 0, onSelectChange: selectChange });
});
<h:graphicImage id="recorte" url="#{WizardManager.bean.browserUrl}"/>
02-11-2009 03:30 PM
02-12-2009 11:56 AM
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<f:verbatim>
<script type="text/javascript" src="jquery-1.2.6.pack.js"></script>
<script type="text/javascript" src="jquery.imgareaselect-0.6.2.min.js"></script>
<script type="text/javascript">
var $j = jQuery.noConflict();
var x1, y1, x2, y2, w, h;
function selectChange(img, selection)
{
x1.text(selection.x1);
y1.text(selection.y1);
x2.text(selection.x2);
y2.text(selection.y2);
w.text(selection.width);
h.text(selection.height);
}
$j(document).ready(function () {
x1 = $j('#x1');
y1 = $j('#y1');
x2 = $j('#x2');
y2 = $j('#y2');
w = $j('#w');
h = $j('#h');
});
$j(window).load(function () {
$j('img#wizard:wizard-body:recorte').imgAreaSelect({ selectionOpacity: 0, onSelectChange: selectChange });
});
</script>
</f:verbatim>
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
<f:verbatim>
<table cellpadding="2" cellspacing="2" border="0" width="100%">
<tr>
<td class="mainSubTitle">
</f:verbatim><h:outputText value="#{msg.edit_file_title}" /><f:verbatim>
</td>
</tr>
<tr>
<td style="padding:10px" valign="middle">
</f:verbatim>
<h:graphicImage id="recorte" url="#{WizardManager.bean.browserUrl}"/>
<f:verbatim>
</td>
</tr>
<tr>
<td>
</f:verbatim><h:outputText value="#{msg.edit_download_complete}" /><f:verbatim>
</td>
</tr>
</table>
</f:verbatim>
<HTML>
<HEAD>
<script type="text/javascript" src="jquery-1.2.6.pack.js"></script>
<script type="text/javascript" src="jquery.imgareaselect-0.6.2.min.js"></script>
<script type="text/javascript">
var $j = jQuery.noConflict();
var x1, y1, x2, y2, w, h;
function selectChange(img, selection)
{
x1.text(selection.x1);
y1.text(selection.y1);
x2.text(selection.x2);
y2.text(selection.y2);
w.text(selection.width);
h.text(selection.height);
}
$j(document).ready(function () {
x1 = $j('#x1');
y1 = $j('#y1');
x2 = $j('#x2');
y2 = $j('#y2');
w = $j('#w');
h = $j('#h');
});
$j(window).load(function () {
$j('img#recorte').imgAreaSelect({ selectionOpacity: 0, onSelectChange: selectChange });
});
</script>
</HEAD>
<BODY>
<table cellpadding="2" cellspacing="2" border="0" width="100%">
<tr>
<td style="padding:10px" valign="middle">
<img id="recorte" src="noticia.jpg"/>
</td>
</tr>
</table>
</BODY>
</HTML>
$j(window).load(function () {
$j('img#wizard:wizard-body:recorte').imgAreaSelect({ selectionOpacity: 0, onSelectChange: selectChange });
});
$j('img#recorte').imgAreaSelect({ selectionOpacity: 0, onSelectChange: selectChange });
02-12-2009 02:37 PM
02-12-2009 07:53 PM
02-13-2009 04:32 AM
<h:graphicImage id="recorte" url="#{WizardManager.bean.browserUrl}"/>
$j(window).load(function () {
$j('img#wizard:wizard-body:recorte').imgAreaSelect({ selectionOpacity: 0, onSelectChange: selectChange });
});
<img id="wizard:wizard-body:recorte" src="/alfresco/d/d/workspace/SpacesStore/769aa7a0-7e50-4c21-a41e-42694b4c0edd/noticia.jpg" />
$j(window).load(function () {
$j('img#wizard:wizard-body:recorte').imgAreaSelect({ selectionOpacity: 0, onSelectChange: selectChange });
});
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.