This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adds support for data-i18n and data-i18n-options to jQuery UI Dialog's title: | |
if( $.fn.dialog ) { // Checks the presence of the dialog component of jQuery UI | |
var rTitleKey = /\[title\]([^;]*);?/, | |
// Keep a reference to the original _create function: | |
dialog_create_orig = $.ui.dialog.prototype._create; | |
$.ui.dialog.prototype._create = function( ) { | |
var data_i18n, | |
i18n_options; | |
if(!this.options.title) { // Because as defined in Dialog, the options.title should override the title attribute | |
var old_data_i18n = this.element.attr( "data-i18n" ); |