mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-11 01:33:24 +01:00
update editor's events
This commit is contained in:
parent
356ccfe115
commit
1416ff2d11
@ -52,7 +52,8 @@ mindplot.widget.LinkEditor = new Class({
|
|||||||
input.css('width','70%').css('margin','0px 20px');
|
input.css('width','70%').css('margin','0px 20px');
|
||||||
|
|
||||||
if (model.getValue() != null){
|
if (model.getValue() != null){
|
||||||
input.value = model.getValue();}
|
input.val(model.getValue());
|
||||||
|
}
|
||||||
// type:Browser.ie ? 'text' : 'url', // IE workaround
|
// type:Browser.ie ? 'text' : 'url', // IE workaround
|
||||||
|
|
||||||
// Open Button
|
// Open Button
|
||||||
@ -69,18 +70,17 @@ mindplot.widget.LinkEditor = new Class({
|
|||||||
form.append(open);
|
form.append(open);
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$(document).on('submit','#linkFormId',function () {
|
var me = this;
|
||||||
|
$(document).on('submit','#linkFormId',function (event) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (input.value != null && input.value.trim() != "") {
|
var inputValue = input.val();
|
||||||
model.setValue(input.value);
|
if (inputValue != null && inputValue.trim() != "") {
|
||||||
|
model.setValue(inputValue);
|
||||||
}
|
}
|
||||||
this.close();
|
me.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click','#acceptBtn',function () {
|
|
||||||
$("#linkFormId").submit();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// result.addEvent('keydown', function (event) {
|
// result.addEvent('keydown', function (event) {
|
||||||
@ -89,5 +89,13 @@ mindplot.widget.LinkEditor = new Class({
|
|||||||
//
|
//
|
||||||
result.append(form);
|
result.append(form);
|
||||||
return result;
|
return result;
|
||||||
|
},
|
||||||
|
|
||||||
|
onAcceptClick: function() {
|
||||||
|
$("#linkFormId").submit();
|
||||||
|
},
|
||||||
|
|
||||||
|
close:function () {
|
||||||
|
this.parent();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -38,26 +38,26 @@ _buildPanel:function (model) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
result.append(form);
|
result.append(form);
|
||||||
|
var me = this;
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$(document).on('submit','#noteFormId',function () {
|
$(document).on('submit','#noteFormId',function (event) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (textArea.val()) {
|
if (textArea.val()) {
|
||||||
model.setValue(textArea.val());
|
model.setValue(textArea.val());
|
||||||
}
|
}
|
||||||
this.close();
|
me.close();
|
||||||
});
|
|
||||||
|
|
||||||
$(document).on('click','#acceptBtn',function () {
|
|
||||||
$("#noteFormId").submit();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onAcceptClick: function() {
|
||||||
|
$("#noteFormId").submit();
|
||||||
|
},
|
||||||
|
|
||||||
close:function () {
|
close:function () {
|
||||||
this.close();
|
this.parent();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user