- 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) { _buildPanel:function (model) {
var result = new Element('div'); var result = new Element('div');
result.setStyle("padding-top", "15px");
var form = new Element('form', {'action':'none', 'id':'linkFormId'}); var form = new Element('form', {'action':'none', 'id':'linkFormId'});
// Add combo ... // Add combo ...
@ -84,9 +85,24 @@ mindplot.widget.LinkEditor = new Class({
if (model.getValue() != null) if (model.getValue() != null)
input.value = model.getValue(); input.value = model.getValue();
input.setStyles({'width':'70%'}); input.setStyles({
width:'55%',
margin:"0px 10px"
});
input.inject(form); 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 ... // Register submit event ...
form.addEvent('submit', function (event) { form.addEvent('submit', function (event) {
event.stopPropagation(); event.stopPropagation();

View File

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

View File

@ -55,4 +55,5 @@ WRITE_YOUR_TEXT_HERE=Escribe tu nota aquí ...
REMOVE=Borrar REMOVE=Borrar
ACCEPT=Aceptar ACCEPT=Aceptar
CANCEL=Cancelar CANCEL=Cancelar
LINK=Enlace LINK=Enlace
OPEN_LINK=Abrir Enlace