+
+ var linkFound = [wlxmlNode].concat(wlxmlNode.parents()).some(function(node) {
+ if(node.getClass() === 'link') {
+ var dialog = Dialog.create({
+ title: gettext('Edit link'),
+ executeButtonText: gettext('Apply'),
+ cancelButtonText: gettext('Cancel'),
+ fields: [
+ {label: gettext('Link'), name: 'href', type: 'input', initialValue: node.getAttr('href')},
+ ]
+ });
+ dialog.on('execute', function(event) {
+ canvas.wlxmlDocument.startTransaction();
+ node.setAttr('href', event.formData.href);
+ event.success();
+ canvas.wlxmlDocument.endTransaction();
+ });
+ dialog.show();
+ return true;
+ }
+ });
+ if(linkFound) {
+ return;
+ }
+