From 86fa29acccfa743646f25f9db4d70c0db2fb7061 Mon Sep 17 00:00:00 2001 From: Julian Seidenberg Date: Thu, 24 Feb 2011 17:12:19 +1300 Subject: [PATCH] API-CHANGE: ssui.core.js rewrite to work with jQuery UI 1.8. Renamed _init => _create and renamed defaults => options. See the following websites for a complete guide to what has changed in jquery UI version 1.8: https://github.com/scottgonzalez/jquery-ui-1.8-widget-factory http://jqueryui.com/docs/Upgrade_Guide --- javascript/ssui.core.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/javascript/ssui.core.js b/javascript/ssui.core.js index cc83b378..fd5e067b 100644 --- a/javascript/ssui.core.js +++ b/javascript/ssui.core.js @@ -1,6 +1,6 @@ (function($) { $.widget("ssui.titlebar", { - _init: function() { + _create: function() { this.originalTitle = this.element.attr('title'); var self = this; @@ -8,7 +8,7 @@ var title = options.title || this.originalTitle || ' '; var titleId = $.ui.dialog.getTitleId(this.element); - + this.element.parent().addClass('ui-dialog'); var uiDialogTitlebar = this.element. @@ -18,8 +18,8 @@ 'ui-corner-all ' + 'ui-helper-clearfix' ); - - // By default, the + + // By default, the if(options.closeButton) { var uiDialogTitlebarClose = $('') @@ -46,7 +46,7 @@ ev.stopPropagation(); }) .appendTo(uiDialogTitlebar); - + var uiDialogTitlebarCloseText = (this.uiDialogTitlebarCloseText = $('')) .addClass( 'ui-icon ' + @@ -55,13 +55,13 @@ .text(options.closeText) .appendTo(uiDialogTitlebarClose); } - + var uiDialogTitle = $('') .addClass('ui-dialog-title') .attr('id', titleId) .html(title) .prependTo(uiDialogTitlebar); - + uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection(); }, @@ -78,7 +78,7 @@ $.extend($.ssui.titlebar, { version: "0.0.1", - defaults: { + options: { title: '', closeButton: false, closeText: 'close'