WordPress.org

Plugin Directory

Changeset 631411


Ignore:
Timestamp:
11/28/12 18:11:38 (17 months ago)
Author:
TobiasBg
Message:

Fix JS for "Insert Link" in IE 8, which apparently doesn't like "window" there; Intermediate release without increasing the version number

Location:
tablepress/trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tablepress/trunk/admin/edit.js

    r631388 r631411  
    767767                    $( '#edit-form-body' ).one( 'mousedown', 'textarea', function() { 
    768768                        wpActiveEditor = this.id; 
    769                         $( window ).one( 'mouseup', function() { 
     769                        $( document ).one( 'mouseup', function() { 
    770770                            wpLink.open(); 
    771771                            tp.table.set_table_changed(); 
  • tablepress/trunk/admin/edit.min.js

    r631388 r631411  
    3232tp.cells.$textarea=a(this).blur();b.val(tp.cells.$textarea.val());a("#advanced-editor").wpdialog("open");b.get(0).selectionStart=b.get(0).selectionEnd=b.val().length;b.focus()})},save:function(){var b=a("#advanced-editor-content").blur().val();tp.cells.$textarea.val()!=b&&(tp.cells.$textarea.val(b),tp.cells.$textarea.get(0).selectionStart=tp.cells.$textarea.get(0).selectionEnd=tp.cells.$textarea.val().length,tp.table.set_table_changed());tp.cells.$textarea.focus();tp.cells.advanced_editor.close()}, 
    3333close:function(){a("#advanced-editor").wpdialog("close");return!1},thickbox_size:function(){var b=a("#advanced-editor-content-add_media"),c;c=a(window).width();var d=720<c?720:c,e=a(window).height();b.length&&(c=b.attr("href"),a("body.admin-bar").length&&(e-=28),c=c.replace(/&width=[0-9]+/g,"").replace(/&height=[0-9]+/g,""),b.attr("href",c+("&width="+(d-80)+"&height="+(e-85))))}},checkboxes:{last_clicked:{"#edit-form-body":!1,"#edit-form-foot":!1},multi_select:function(b){if("undefined"==b.shiftKey)return!0; 
    34 if(b.shiftKey){if(!tp.cells.checkboxes.last_clicked[b.data.parent])return!0;var c=a(b.data.parent).find(":checkbox"),d=c.index(tp.cells.checkboxes.last_clicked[b.data.parent]),e=c.index(this);d!=e&&c.slice(Math.min(d,e),Math.max(d,e)).prop("checked",a(this).prop("checked"))}tp.cells.checkboxes.last_clicked[b.data.parent]=this;return!0}}},content:{link:{add:function(){if(confirm(tablepress_strings.link_add))a("#edit-form-body").one("mousedown","textarea",function(){wpActiveEditor=this.id;a(window).one("mouseup", 
     34if(b.shiftKey){if(!tp.cells.checkboxes.last_clicked[b.data.parent])return!0;var c=a(b.data.parent).find(":checkbox"),d=c.index(tp.cells.checkboxes.last_clicked[b.data.parent]),e=c.index(this);d!=e&&c.slice(Math.min(d,e),Math.max(d,e)).prop("checked",a(this).prop("checked"))}tp.cells.checkboxes.last_clicked[b.data.parent]=this;return!0}}},content:{link:{add:function(){if(confirm(tablepress_strings.link_add))a("#edit-form-body").one("mousedown","textarea",function(){wpActiveEditor=this.id;a(document).one("mouseup", 
    3535function(){wpLink.open();tp.table.set_table_changed()})})}},image:{add:function(){if(confirm(tablepress_strings.image_add))a("#edit-form-body").one("click","textarea",function(){wpActiveEditor=this.id;this.selectionStart=this.selectionEnd=this.value.length;var b=a("#image-add"),c=a(window).width(),c=720<c?720:c,d=a(window).height();a("body.admin-bar").length&&(d-=28);tb_show(b.text(),b.attr("href")+"&TB_iframe=true&height="+(d-85)+"&width="+(c-80),!1);a(this).blur()});return!1}},span:{add:function(b){if(confirm("#rowspan#"== 
    3636b?tablepress_strings.rowspan_add:tablepress_strings.colspan_add))a("#edit-form-body").one("click","textarea",function(){var c=a(this),d=c.parent().index(),e=c.closest("tr").index();if("#rowspan#"==b){if(0==e){alert(tablepress_strings.no_rowspan_first_row);return}if(tp.table.head&&1==e){alert(tablepress_strings.no_rowspan_table_head);return}if(tp.table.foot&&tp.table.rows-1==e){alert(tablepress_strings.no_rowspan_table_foot);return}}else if("#colspan#"==b&&tp.table.no_data_columns_pre==d){alert(tablepress_strings.no_colspan_first_col); 
Note: See TracChangeset for help on using the changeset viewer.