<commit_before>/* z.popupwindow.js
----------------------------------------------------------

@author <NAME>
@author <NAME> <<EMAIL>>

http://code.google.com/p/jquery-swip/

Copyright 2009 <NAME>
Copyright 2011 <NAME>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
 
http://www.apache.org/licenses/LICENSE-2.0
 
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

---------------------------------------------------------- */

$.widget("ui.popupwindow", {
	_init: function() {
		var self = this;
		$(this.element).click(function() {
			if (self.options.full) {
				self.options.toolbar = 1;
				self.options.scrollbars = 1;
				self.options.location = 1;
				self.options.menubar = 1;
				self.options.centerScreen = 1;
				self.options.centerBrowser = 0;
				if ($.browser.msie) {
					self.options.width = document.documentElement.clientWidth;
					self.options.height = document.documentElement.clientHeight;
				} else {
					self.options.width = window.innerWidth;
					self.options.height = window.innerHeight;
				}
			}
			var windowFeatures =    'height=' + self.options.height +
									',width=' + self.options.width +
									',toolbar=' + (self.options.toolbar?'yes':'no') +
									',scrollbars=' + (self.options.scrollbars?'yes':'no') +
									',status=' + (self.options.status?'yes':'no') + 
									',resizable=' + (self.options.resizable?'yes':'no') +
									',location=' + (self.options.location?'yes':'no') +
									',menubar=' + (self.options.menubar?'yes':'no');

			var windowName = self.options.windowName;
			var windowURL = this.href || self.options.windowURL;
			var top, left;

			if (self.options.centerBrowser && !self.options.centerScreen) {
				if ($.browser.msie) {
					top = (window.screenTop - 120) + ((((document.documentElement.clientHeight + 120)/2) - (self.options.height/2)));
					left = window.screenLeft + ((((document.documentElement.clientWidth + 20)/2) - (self.options.width/2)));
				} else {
					top = window.screenY + (((window.outerHeight/2) - (self.options.height/2)));
					left = window.screenX + (((window.outerWidth/2) - (self.options.width/2)));
				}
			} else if (self.options.centerScreen) {
				top = (screen.height - self.options.height)/2;
				left = (screen.width - self.options.width)/2;
			} else {<commit_msg>Fix for opening a window in 'full screen' size.<commit_after>/* z.popupwindow.js
----------------------------------------------------------

@author <NAME>
@author <NAME> <<EMAIL>>

http://code.google.com/p/jquery-swip/

Copyright 2009 <NAME>
Copyright 2011 <NAME>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
 
http://www.apache.org/licenses/LICENSE-2.0
 
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

---------------------------------------------------------- */

$.widget("ui.popupwindow", {
	_init: function() {
		var self = this;
		$(this.element).click(function() {
			if (self.options.full) {
				self.options.toolbar = 1;
				self.options.scrollbars = 1;
				self.options.location = 1;
				self.options.menubar = 1;
				self.options.centerScreen = 1;
				self.options.centerBrowser = 0;
				self.options.width = screen.width-100;
				self.options.height = screen.height-100;
			}
			var windowFeatures =    'height=' + self.options.height +
									',width=' + self.options.width +
									',toolbar=' + (self.options.toolbar?'yes':'no') +
									',scrollbars=' + (self.options.scrollbars?'yes':'no') +
									',status=' + (self.options.status?'yes':'no') + 
									',resizable=' + (self.options.resizable?'yes':'no') +
									',location=' + (self.options.location?'yes':'no') +
									',menubar=' + (self.options.menubar?'yes':'no');

			var windowName = self.options.windowName;
			var windowURL = this.href || self.options.windowURL;
			var top, left;

			if (self.options.centerBrowser && !self.options.centerScreen) {
				if ($.browser.msie) {
					top = (window.screenTop - 120) + ((((document.documentElement.clientHeight + 120)/2) - (self.options.height/2)));
					left = window.screenLeft + ((((document.documentElement.clientWidth + 20)/2) - (self.options.width/2)));
				} else {
					top = window.screenY + (((window.outerHeight/2) - (self.options.height/2)));
					left = window.screenX + (((window.outerWidth/2) - (self.options.width/2)));
				}
			} else if (self.options.centerScreen) {
				top = (screen.height - self.options.height)/2;
				left = (screen.width - self.options.width)/2;
			} else {
{'fraction_non_alphanumeric': 0.19317524580682474, 'fraction_numerical': 0.015037593984962405, 'mean_word_length': 2.756698044895004, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3427225', 'n_tokens_mistral': 1883, 'n_tokens_neox': 1523, 'n_words': 375}