- Add open button to the link editor.

This commit is contained in:
Paulo Gustavo Veiga 2012-09-24 21:36:11 -03:00
parent 8320ae0abf
commit 63d4de6da1
3 changed files with 20 additions and 2 deletions

View File

@ -65,6 +65,7 @@ mindplot.widget.LinkEditor = new Class({
_buildPanel:function (model) {
var result = new Element('div');
result.setStyle("padding-top", "15px");
var form = new Element('form', {'action':'none', 'id':'linkFormId'});
// Add combo ...
@ -84,9 +85,24 @@ mindplot.widget.LinkEditor = new Class({
if (model.getValue() != null)
input.value = model.getValue();
input.setStyles({'width':'70%'});
input.setStyles({
width:'55%',
margin:"0px 10px"
});
input.inject(form);
// Open Button
var openButton = new Element('input', {
type:"button",
value:$msg('OPEN_LINK')
});
openButton.inject(form);
openButton.addEvent('click',function(){
window.open(input.value,"_blank", "status=1,width=700,height=450,resize=1");
});
// Register submit event ...
form.addEvent('submit', function (event) {
event.stopPropagation();

View File

@ -55,4 +55,5 @@ REMOVE=Remove
ACCEPT=Accept
CANCEL=Cancel
LINK=Link
OPEN_LINK=Open URL

View File

@ -56,3 +56,4 @@ REMOVE=Borrar
ACCEPT=Aceptar
CANCEL=Cancelar
LINK=Enlace
OPEN_LINK=Abrir Enlace