Follow-up to feature #13878: htmlArea RTE: Extjize the default non-TYPO3 link dialogue
authorStanislas Rolland <typo3@sjbr.ca>
Wed, 24 Mar 2010 20:36:07 +0000 (20:36 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Wed, 24 Mar 2010 20:36:07 +0000 (20:36 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7152 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultLink/default-link.js

index 8c57916..f1ed38e 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2010-03-24  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Added feature #13909: htmlArea RTE: Extjize the default non-TYPO3 image dialogue
+       * Follow-up to feature #13878: htmlArea RTE: Extjize the default non-TYPO3 link dialogue
 
 2010-03-23  Steffen Kamper  <info@sk-typo3.de>
 
index c5c0d61..ce46094 100644 (file)
@@ -1,6 +1,7 @@
 2010-03-24  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Added feature #13909: htmlArea RTE: Extjize the default non-TYPO3 image dialogue
+       * Follow-up to feature #13878: htmlArea RTE: Extjize the default non-TYPO3 link dialogue
 
 2010-03-22  Stanislas Rolland  <typo3@sjbr.ca>
 
index dcd9a65..b6113eb 100644 (file)
@@ -289,19 +289,19 @@ DefaultLink = HTMLArea.Plugin.extend({
         * Handler invoked when the OK button is clicked
         */
        onOK: function () {
-               var href = this.dialog.find('itemId', 'href')[0].getValue().trim();
-               if (!href) {
-                       Ext.MessageBox.alert('', this.localize('link_url_required'));
-                       this.dialog.find('itemId', 'href').focus();
-                       return false;
-               }
-               var title = this.dialog.find('itemId', 'title')[0].getValue();
-               var target = this.dialog.find('itemId', 'target')[0].getValue();
-               if (target == '_other') {
-                       target = this.dialog.find('itemId', 'frame')[0].getValue().trim();
+               var hrefField = this.dialog.find('itemId', 'href')[0];
+               var href = hrefField.getValue().trim();
+               if (href) {
+                       var title = this.dialog.find('itemId', 'title')[0].getValue();
+                       var target = this.dialog.find('itemId', 'target')[0].getValue();
+                       if (target == '_other') {
+                               target = this.dialog.find('itemId', 'frame')[0].getValue().trim();
+                       }
+                       this.createLink(href, title, target);
+                       this.close();
+               } else {
+                       Ext.MessageBox.alert('', this.localize('link_url_required'), function () { hrefField.focus(); });
                }
-               this.createLink(href, title, target);
-               this.close();
                return false;
        },
        /*