Cleanup and a few fixes
authorAlexander Ebert <ebert@woltlab.com>
Sun, 14 Sep 2014 17:49:01 +0000 (19:49 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 14 Sep 2014 17:49:01 +0000 (19:49 +0200)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js
wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js

index 58c2de31633822afcdcf8fe9f23a52ef6a624228..42b006b2ae61bc7670b61117fdcf7070a16e6566 100644 (file)
@@ -1031,7 +1031,7 @@ RedactorPlugins.wbbcode = {
                                        $('#redactorQuoteAuthor').val(quote.data('author'));
                                        
                                        // do not use prop() here, an empty cite attribute would yield the page URL instead
-                                       $('#redactorQuoteLink').val(quote.attr('cite'));
+                                       $('#redactorQuoteLink').val(WCF.String.unescapeHTML(quote.attr('cite')));
                                }
                                
                                $('#redactorEditQuote').click($.proxy(function() {
@@ -1084,25 +1084,6 @@ RedactorPlugins.wbbcode = {
                $bbcode += '[/quote]';
                
                if (this.inWysiwygMode()) {
-                       /*var $html = '<blockquote class="quoteBox" cite="' + link + '" data-author="' + author + '" id="redactorInsertedQuote">'
-                                       + '<div class="container containerPadding">'
-                                               + '<header>'
-                                                       + '<h3>'
-                                                               + this._buildQuoteHeader(author, link)
-                                                       + '</h3>'
-                                                       + '<a class="redactorQuoteEdit"></a>'
-                                               + '</header>'
-                                       + '</div>'
-                               + '</blockquote>';
-                       
-                       this.insertHtml($html);
-                       
-                       var $quote = $('#redactorInsertedQuote');
-                       var $container = $('<div>' + (html ? html : this.opts.invisibleSpace) + '</div>').insertAfter($quote.find('> div > header'));
-                       $quote.removeAttr('id');
-                       
-                       this.selectionStart($container[0]);*/
-                       
                        $bbcode = this.convertToHtml($bbcode);
                        this.insertHtml($bbcode);
                        
index f72b91d6df38da7f901624e9c36c4363248a4ed9..5e095788340268872430d64e201e731824505d7b 100644 (file)
@@ -382,11 +382,13 @@ RedactorPlugins.wmonkeypatch = {
                }
                
                // fix position
-               var $dimensions = this.$modal.getDimensions('outer');
-               this.$modal.css({
-                       marginLeft: -1 * Math.round($dimensions.width / 2) + 'px',
-                       marginTop: -1 * Math.round($dimensions.height / 2) + 'px'
-               });
+               if (!this.isMobile()) {
+                       var $dimensions = this.$modal.getDimensions('outer');
+                       this.$modal.css({
+                               marginLeft: -1 * Math.round($dimensions.width / 2) + 'px',
+                               marginTop: -1 * Math.round($dimensions.height / 2) + 'px'
+                       });
+               }
        },
        
        dropdownShowCallback: function(data) {