Skip to content
This repository was archived by the owner on May 5, 2022. It is now read-only.

Code cleanup #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions jquery.dialogOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ $.ui.dialog.prototype.options.showCloseButton = true;
// extend _init
var _init = $.ui.dialog.prototype._init;
$.ui.dialog.prototype._init = function () {
var self = this;

// apply original arguments
_init.apply(this, arguments);

Expand Down Expand Up @@ -72,15 +70,12 @@ $.ui.dialog.prototype.open = function () {

// responsive width & height
var resize = function () {

var elem = self.element;
// check if responsive
// dependent on modernizr for device detection / html.touch
if (self.options.responsive === true || (self.options.responsive === "touch" && isTouch)) {
var elem = self.element,
wHeight = $(window).height(),
var wHeight = $(window).height(),
wWidth = $(window).width(),
dHeight = elem.parent().outerHeight(),
dWidth = elem.parent().outerWidth(),
setHeight = Math.min(wHeight * self.options.scaleH, oHeight),
setWidth = Math.min(wWidth * self.options.scaleW, oWidth);

Expand Down