mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
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
This commit is contained in:
parent
f380d88c80
commit
86fa29accc
@ -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 = $('<a href="#"/>')
|
||||
@ -46,7 +46,7 @@
|
||||
ev.stopPropagation();
|
||||
})
|
||||
.appendTo(uiDialogTitlebar);
|
||||
|
||||
|
||||
var uiDialogTitlebarCloseText = (this.uiDialogTitlebarCloseText = $('<span/>'))
|
||||
.addClass(
|
||||
'ui-icon ' +
|
||||
@ -55,13 +55,13 @@
|
||||
.text(options.closeText)
|
||||
.appendTo(uiDialogTitlebarClose);
|
||||
}
|
||||
|
||||
|
||||
var uiDialogTitle = $('<span/>')
|
||||
.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'
|
||||
|
Loading…
Reference in New Issue
Block a user