Skip to content
This repository
  • 18 commits
  • 4 files changed
  • 0 comments
  • 1 contributor
May 15, 2012
Seb Skuse Version bump for merge
Signed-off-by: Sebastian Skuse <seb@skuse.net>
a8362d2
Seb Skuse Provide API.version to get the current version of provided API
Signed-off-by: Sebastian Skuse <seb@skuse.net>
52ae2de
Seb Skuse Start work standardising plugins
Signed-off-by: Sebastian Skuse <seb@skuse.net>
8eb8baf
Seb Skuse Plugin defaults
Signed-off-by: Sebastian Skuse <seb@skuse.net>
c82c50b
Seb Skuse Button events not relevant to a plugin container.
Signed-off-by: Sebastian Skuse <seb@skuse.net>
eda4432
May 16, 2012
Seb Skuse Add closeFn back in
Signed-off-by: Sebastian Skuse <seb@skuse.net>
4d2007f
Seb Skuse Updated minified code
Signed-off-by: Sebastian Skuse <seb@skuse.net>
76a943a
Seb Skuse Firebug… what does your element inspector say about its z-index? ITS …
…OVER9000!

Signed-off-by: Sebastian Skuse <seb@skuse.net>
f377e40
Seb Skuse Firebug… what does your element inspector say about its z-index? ITS …
…OVER9000!

Signed-off-by: Sebastian Skuse <seb@skuse.net>
4253c00
Seb Skuse Plugin constructor
Signed-off-by: Sebastian Skuse <seb@skuse.net>
f6a55af
Seb Skuse Expose API.$ to onRun and onRender 8f7693e
Jun 22, 2012
Seb Skuse New plugin changes 47ea9e0
Seb Skuse RightToLeft support da55828
Seb Skuse Add RightToLeft support 46ce92f
Jul 09, 2012
Seb Skuse Fixes for RTL buttons efdf90c
Seb Skuse RTL fixes 34b8990
Seb Skuse Merge branch 'refs/heads/experimental/pluginsv2' into development
Conflicts:
	AtKit.js
9ff3f55
Seb Skuse Merge branch 'refs/heads/development' dd53703
94  AtKit.js
@@ -16,8 +16,8 @@
16 16
 	
17 17
 		// Internal properties
18 18
 		AtKit.internal = AtKit.prototype = {
19  
-			__version: 1.0, // Version.
20  
-			__build: 268, // Build.
  19
+			__version: 1.1, // Version.
  20
+			__build: 278, // Build.
21 21
 			__APIVersion: 1.0, // The version of the API.
22 22
 			__baseURL: "http://c.atbar.org/", // Load AtKit assets from here.
23 23
 			__APIURL: "http://a.atbar.org/", // API endpoint
@@ -88,7 +88,7 @@
88 88
 				"separator": '<div class="at-separator"></div>'
89 89
 			},
90 90
 			__CSS: {
91  
-				"#sbar": "height:40px;left:0;line-height:40px;margin-left:auto;margin-right:auto;margin-top:0;position:fixed;top:0;width:100%;z-index:9999998;padding:0 5px;background:url(" + AtKit.internal.__assetURL + "images/background.png) repeat-x #EBEAED;",
  91
+				"#sbar": "height:40px;left:0;line-height:40px;margin-left:auto;margin-right:auto;margin-top:0;position:fixed;top:0;width:100%;z-index:2147483646;padding:0 5px;background:url(" + AtKit.internal.__assetURL + "images/background.png) repeat-x #EBEAED;",
92 92
 				"#sbarGhost": "height:40px;width:100%;",
93 93
 				".at-spacer": "display:block;height:40px;width:40px;float:left",
94 94
 				".at-separator": "display:block;height:25px;float:left;border-left:2px solid #a9a9a9;margin:7px 1px 4px 7px",
@@ -101,15 +101,49 @@
101 101
 				"#facebox h2": "font-size:18pt;font-weight:bold;color:black"
102 102
 			},
103 103
 			settings: {
104  
-				'noiframe': true, // Don't load if we're in an iframe.
105  
-				'allowclose': true, // Enable the close button
106  
-				'allowreset': true, // Allow the page reset button
  104
+				"noiframe": true, // Don't load if we're in an iframe.
  105
+				"allowclose": true, // Enable the close button
  106
+				"allowreset": true, // Allow the page reset button
  107
+				"isRightToLeft": false, // Switch for changing to right to left orientation
107 108
 				"logoURL": '', 
108 109
 				"name": '',
109 110
 				"about": ''
110 111
 			},
111 112
 			version: AtKit.internal.__APIVersion,
112  
-			$: '' // Library used for the Toolbar
  113
+			$: '', // Library used for the Toolbar
  114
+			plugin: function(name){ return new plugin(name); }
  115
+		}
  116
+
  117
+		function plugin(name){
  118
+			// Data & settings
  119
+			this.name = name;
  120
+			this.supportedLanguages = [];
  121
+			this.aboutDialog = "";
  122
+			this.settings = {};
  123
+			this.version = 0;
  124
+			var $ = API.$;
  125
+			
  126
+			// Events
  127
+			this.onRender = function($){};
  128
+			this.onRun = function($){};
  129
+			
  130
+			// Register plugin
  131
+			this.register = function(){
  132
+				AtKit.registerPlugin(this.name, this);
  133
+			};
  134
+			
  135
+			
  136
+			// Fired by AtKit when we are ready to render plugin.
  137
+			// Don't call this yourself.
  138
+			this.run = function(){
  139
+				this.onRun($);
  140
+			};
  141
+			
  142
+			// Fired by AtKit when we actually render.
  143
+			// Don't call this yourself.
  144
+			this.render = function(){
  145
+				this.onRender($);
  146
+			}
113 147
 		}
114 148
 
115 149
 		// Manipulate variables based on environment
@@ -288,9 +322,13 @@
288 322
 			API.$( API.$('<div>', { id: 'sbar' }) ).insertAfter("#sbarGhost");
289 323
 			
290 324
 			// Insert the logo.
  325
+			
  326
+			// Are we in RTL mode? Work out where we should be positioned.
  327
+			var align = API.settings.isRightToLeft ? "right" : "left";
  328
+			
291 329
 			API.$(
292 330
 				API.$("<a>", { id: 'sbarlogo', click: function(){ showAbout() } }).append(
293  
-					API.$("<img>", { "src": API.settings.logoURL, "align": "left", "border": "0", "title": API.settings.name + "Logo", "style": "float:left;margin-top:10px;" }) 
  331
+					API.$("<img>", { "src": API.settings.logoURL, "align": align, "border": "0", "title": API.settings.name + "Logo", "style": "margin-top:10px;float:" + align }) 
294 332
 				)
295 333
 			).appendTo('#sbar');
296 334
 			
@@ -346,8 +384,28 @@
346 384
 
347 385
 			for(c in cssObj){
348 386
 				if(/:active/.test( c ) || API.$( c ).length == 0) continue;
349  
-				try {
350  
-					API.$( c ).attr('style', cssObj[c]);
  387
+				try {		
  388
+					// Get CSS item
  389
+					var property = cssObj[c];
  390
+
  391
+					// Are we running in RTL mode?
  392
+					if(API.settings.isRightToLeft) {
  393
+						var floatRight = "float:right";
  394
+						var floatLeft = "float:left";
  395
+
  396
+						// Does the string contain floatleft?
  397
+						if(property.indexOf(floatLeft) != -1){
  398
+							var match = new RegExp(floatLeft, "gi");
  399
+							property = property.replace(match, floatRight);
  400
+						} else if(property.indexOf(floatRight) != -1){
  401
+							// Does it contain floatright? if so switch.
  402
+							var match = new RegExp(floatRight, "gi");
  403
+							property = property.replace(match, floatLeft);
  404
+						}
  405
+					}
  406
+					
  407
+					// Apply the CSS
  408
+					API.$( c ).attr('style', property);
351 409
 				} catch(e){
352 410
 					debug(e.description);	
353 411
 				}
@@ -403,7 +461,11 @@
403 461
 			var plugins = API.listPlugins();
404 462
 			
405 463
 			if(plugins.length > 0){
406  
-				AtKit.internal.__aboutDialog.HTML += "<br /> Registered plugins: " + plugins.join(", ");
  464
+				AtKit.internal.__aboutDialog.HTML += "<br /> Registered plugins: ";
  465
+
  466
+				plugins.map(function(el, index, fullList){
  467
+					AtKit.internal.__aboutDialog.HTML += "<button class='pluginLink'>" + el + "</button>";
  468
+				});
407 469
 			}
408 470
 			
409 471
 			AtKit.internal.__aboutDialog.HTML += "</p>";
@@ -531,10 +593,20 @@
531 593
 			API.settings.logoURL = logo;
532 594
 		}
533 595
 		
  596
+		// Set whether the toolbar is running in RTL mode.
  597
+		API.setIsRightToLeft = function(isRTL){
  598
+			API.settings.isRightToLeft = isRTL;
  599
+		}
  600
+		
534 601
 		// Add a CSS rule. Identifier is a jQuery selector expression, eg #bar. inlineStyle appears in the style attr in the DOM.
535 602
 		API.setCSS = function(identifier, inlineStyle){
536 603
 			API.__CSS[identifier] = inlineStyle;
537 604
 		}
  605
+
  606
+		// Set whether the toolbar is running in RTL mode.
  607
+		API.setIsRightToLeft = function(isRTL){
  608
+			API.settings.isRightToLeft = isRTL;
  609
+		}
538 610
 		
539 611
 		// Set the language that this toolbar uses
540 612
 		API.setLanguage = function(language) {
36  AtKit.min.js
@@ -6,21 +6,21 @@ e;return a.__env.buttons[h].HTML}function w(){if(!d.internal.__invoked){0==a.$("
6 6
 "Logo",style:"float:left;margin-top:10px;"}))).appendTo("#sbar");a.$("<img>",{src:d.internal.__APIURL+"stat.php?channel="+d.internal.__channel+"-"+a.settings.name+"&version="+d.internal.__version.toFixed(1)+"."+d.internal.__build}).appendTo("#sbar");a.settings.allowclose&&a.addButton("atkit-unload",a.localisation("exit"),d.internal.__assetURL+"images/close.png",function(){a.close()},null,null,{cssClass:"fright"});a.settings.allowreset&&a.addButton("atkit-reset",a.localisation("reset"),d.internal.__assetURL+
7 7
 "images/reset.png",function(){a.reset()},null,null,{cssClass:"fright"});for(b in a.__env.buttons)a.$(o(b)).appendTo("#sbar");k();v();"msie"==a.$.browser&&6==a.$.browser.version?a.$("#sbarGhost").remove():a.$("#sbarGhost").html("&nbsp;");d.internal.__invoked=!0;a.__env.global.unloadFn["default"]=function(){a.$("#sbarGhost, #sbar").remove()};a.__env.global.resetFn["default"]=function(){location.reload(!0)};a.$("body").trigger("AtKitRenderComplete")}}function k(h){h="undefined"==typeof h?a.__CSS:h;for(c in h)if(!(/:active/.test(c)||
8 8
 0==a.$(c).length))try{a.$(c).attr("style",h[c])}catch(d){j(d.description)}}function r(){if(null!=d.internal.__protocol)return d.internal.__protocol;d.internal.__protocol=g.location.protocol;return d.internal.__protocol}function j(a){d.internal.__debug&&(null!=d.internal.debugCallback?d.internal.debugCallback(a):"undefined"!=typeof console&&console.log(a))}function q(){barGhost=document.createElement("div");barGhost.id="sbarGhost";barGhost.innerHTML=a.__templates.barGhost;if(null!=document.body)document.body.insertBefore(barGhost,
9  
-document.body.firstChild);else var h=setInterval(function(){null!=document.body&&(document.body.insertBefore(barGhost,document.body.firstChild),clearInterval(h))},100)}function t(a,d){var g=document.createElement("script");g.src=d;g.type="text/javascript";g.id=a;document.getElementsByTagName("head")[0].appendChild(g)}function u(){bar=document.getElementById("sbarGhost");bar.innerHTML=a.__templates.barFailed;setTimeout(function(){body=document.getElementsByTagName("body");bar=document.getElementById("sbarGhost");
10  
-body[0].removeChild(bar)},d.internal.__errorMessageTimeout)}d.internal=d.prototype={__version:1,__build:251,__baseURL:"http://c.atbar.org/",__APIURL:"http://a.atbar.org/",__pluginURL:"http://plugins.atbar.org/",__libURL:"http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js",__channel:"atkit",__invoked:!1,__debug:!1,__loadAttempts:0,__maxLoadAttempts:30,__errorMessageTimeout:2E3,__localStorageNamespace:"AtKit_",__protocol:null,plugins:{},localisations:{GB:{exit:"Exit",reset:"Reset webpage"}},
11  
-debugCallback:null,language:"GB",defaultLanguage:"GB"};d.internal.__resourceURL=d.internal.__baseURL;d.internal.__resourceURL+=d.internal.__channel;d.internal.__assetURL=d.internal.__resourceURL+"/presentation/";d.internal.versionString="v"+d.internal.__version.toFixed(1)+"."+d.internal.__build+" ("+d.internal.__channel+" release channel)";d.internal.__aboutDialog={CSS:{"#ATKFBAbout":"font-family:Helvetica, Verdana, Arial, sans-serif;font-size:12px;color:#364365;","#ATKFBAbout h2":"border-bottom:1px solid #DDD;font-size:16px;margin-bottom:5px;margin-top:10px;padding-bottom:5px",
12  
-"#ATKFBAbout p#ATKFBAboutFooter":"border-top:1px solid #DDD;padding-top:10px;margin-top:25px;"}};d.external=d.prototype={transport:"JSONP",window:g,global:{buttons:{},dialogs:{},storage:{},fn:{},unloadFn:{},resetFn:{}},buttons:{},languageMap:{},siteFixes:[]};var a={__env:d.external,__templates:{barGhost:'<center><img src="'+d.internal.__assetURL+'images/loading.gif" style="margin-top:10px;" /></center>',barFailed:"<center>library loading failed</center>",button:'<div id="at-btn-(ID)" title="(TITLE)" class="at-btn"><a title="(TITLE)" id="at-lnk-(ID)" href="#ATBarLink"><img src="(SRC)" alt="(TITLE)" height="16" width="16" border="0" /></a></div>',
13  
-spacer:'<div class="at-spacer"></div>',separator:'<div class="at-separator"></div>'},__CSS:{"#sbar":"height:40px;left:0;line-height:40px;margin-left:auto;margin-right:auto;margin-top:0;position:fixed;top:0;width:100%;z-index:9999998;padding:0 5px;background:url("+d.internal.__assetURL+"images/background.png) repeat-x #EBEAED;","#sbarGhost":"height:40px;width:100%;",".at-spacer":"display:block;height:40px;width:40px;float:left",".at-separator":"display:block;height:25px;float:left;border-left:2px solid #a9a9a9;margin:7px 1px 4px 7px",
14  
-".at-btn":"height:28px;width:28px;float:left;line-height:14px;text-align:center;color:#FFF;clear:none;margin:5px 0 0 5px;background:url("+d.internal.__assetURL+"images/button_background.png) no-repeat",".at-btn a":"display:block;height:28px;width:28px;background:transparent;position:inherit;",".at-btn a:active":"border:yellow solid 2px;",".at-btn img":"margin:0;padding:6px;border:none;background:none;","#at-btn-atkit-reset, #at-btn-atkit-unload":"height:28px;width:28px;line-height:14px;text-align:center;color:#FFF;clear:none;float:right;margin:5px 10px 0 0;background:url("+
15  
-d.internal.__assetURL+"images/button_background.png) no-repeat;","#facebox button":"height:26px;margin:10px;padding:5px;color:white;background-color:#0064CD;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);border-radius:4px","#facebox h2":"font-size:18pt;font-weight:bold;color:black"},settings:{noiframe:!0,allowclose:!0,allowreset:!0,logoURL:"",name:"",about:""},$:""};(function(){var a=
16  
-r();/https:/.test(a)&&(d.internal.__libURL=d.internal.__libURL.replace("http:",a),d.internal.__baseURL="https://ssl.atbar.org/c/",d.internal.__APIURL="https://ssl.atbar.org/a/",d.internal.__pluginURL="https://ssl.atbar.org/plugins/")})();a.getVersion=function(){return d.internal.__version.toFixed(1)+"."+d.internal.__build};a.isRendered=function(){return d.internal.__invoked};a.getResourceURL=function(){return d.internal.__resourceURL};a.getPluginURL=function(){return d.internal.__pluginURL};a.setName=
17  
-function(d){a.settings.name=d};a.setAbout=function(d){a.settings.about=d};a.setLogo=function(d){a.settings.logoURL=d};a.setCSS=function(d,e){a.__CSS[d]=e};a.setLanguage=function(a){d.internal.language=a};a.getLanguage=function(){return d.internal.language};a.addLocalisation=function(a,e,g){d.internal.localisations[a][e]=g};a.addLocalisationMap=function(h,e){d.internal.localisations[h]=a.$.extend(!0,d.internal.localisations[h],e)};a.localisation=function(a){return"undefined"==typeof d.internal.localisations[d.internal.language]?
18  
-d.internal.localisations[d.internal.defaultLanguage][a]:"undefined"==typeof d.internal.localisations[d.internal.language][a]?"{no value set for key "+a+" in language "+d.internal.language+"}":d.internal.localisations[d.internal.language][a]};a.addFix=function(d,e){a.__env.siteFixes.push({regex:d,f:e})};a.addScript=function(d,e){"undefined"!=typeof a.$?0<a.$('script[src="'+d+'"]').length||a.$.getScript(d,e):t("",d)};a.addStylesheet=function(d,e){a.$("head").append(a.$("<link>",{rel:"stylesheet",href:d,
19  
-type:"text/css",id:e}))};a.addFn=function(d,e){a.__env.global.fn[d]=e};a.addCloseFn=function(d,e){a.__env.global.closeFn[d]=e};a.addResetFn=function(d,e){a.__env.global.resetFn[d]=e};a.addDialog=function(d,e,g){a.__env.global.dialogs[d]={title:e,body:g}};a.addButton=function(h,e,g,j,m,n,l){"undefined"==typeof a.__env.buttons[h]&&(a.__env.buttons[h]={icon:g,tooltip:e,action:j,dialogs:m,functions:n},null!=l&&(a.__env.buttons[h]=a.$.extend(!0,a.__env.buttons[h],l)),d.internal.__invoked&&(a.$(o(h)).appendTo("#sbar"),
20  
-k()))};a.removeButton=function(h){delete a.__env.buttons[h];d.internal.__invoked&&(j("remove button "+h),a.$("#at-btn-"+h).remove())};a.addSpacer=function(d){"undefined"==typeof d&&a.$(a.__templates.spacer).appendTo("#sbar");if(!isNaN(d))for(i=0;i<d;i++)a.$(a.__templates.spacer).appendTo("#sbar");k()};a.addSeparator=function(){a.$(a.__templates.separator).appendTo("#sbar");k()};a.importPlugins=function(h,e){var g=h instanceof Array?h.join(","):h;a.addScript(d.internal.__pluginURL+g+".js",e)};a.addPlugin=
21  
-function(a){d.internal.plugins[a].payload()};a.registerPlugin=function(a,e,g){d.internal.plugins[a]={payload:e,metadata:g}};a.listPlugins=function(){var a=[];for(p in d.internal.plugins)a.push(p);return a};a.getPluginMetadata=function(a){return d.internal.plugins[a].metadata};a.show=function(d,e){d=a.$("<div>",{"class":"userDialog"}).append(a.$("<h2>",{html:d.title}),a.$("<p>",{html:d.body}));a.$("body").find(".facebox_hide").remove();a.$.facebox(d);k();"null"!=typeof e&&"undefined"!=typeof e&&e()};
22  
-a.message=function(d,e){a.$("body").find(".facebox_hide").remove();a.$.facebox(d);k();"null"!=typeof e&&"undefined"!=typeof e&&e()};a.hideDialog=function(){a.$(g.document).trigger("close.facebox")};a.call=function(d,e){return a.__env.global.fn[d](e)};a.set=function(d,e){a.__env.global.storage[d]=e};a.get=function(d){return a.__env.global.storage[d]};a.storageAvailable=function(){return typeof g.localStorage?!0:!1};a.storage=function(h,e){if(!a.storageAvailable())return!1;var j=d.internal.__localStorageNamespace+
23  
-a.settings.name+"_"+h;if("undefined"==typeof e)return g.localStorage.getItem(j);g.localStorage.setItem(j,e);return!0};a.clearStorage=function(){if(a.storageAvailable()){var h=RegExp("^"+(d.internal.__localStorageNamespace+a.settings.name)+".*");for(s in g.localStorage)s.match(h)&&g.localStorage.removeItem(s)}};a.setDebugger=function(a){d.internal.debugCallback=a};a.lib=function(){return"function"==typeof a.$?a.$:"string"==typeof a.$&&"function"==typeof g.jQuery?g.jQuery:!1};a.render=function(){w()};
24  
-a.close=function(){for(f in a.__env.global.unloadFn)a.__env.global.unloadFn[f]();d.internal.__invoked=!1};a.reset=function(){for(f in a.__env.global.resetFn)a.__env.global.resetFn[f]();d.internal.__invoked=!1};j("bootstrapping AtKit "+d.internal.versionString+"...");if(null==document.getElementById("sbar")&&!d.internal.__invoked&&!(a.settings.noiframe&&g!=g.top)){"undefined"!=typeof g.AtKitLoaded&&q();"undefined"==typeof unsafeWindow?d.external.window=g:(d.external.window=unsafeWindow,d.external.transport=
25  
-"GM-XHR");b:{j("loadLibrary called");if("undefined"!=typeof g.jQuery)try{jQversion=parseFloat(g.jQuery().jquery.match(/\d\.\d/));j("jQuery already loaded, v"+jQversion);if(1.5<jQversion){j("loaded version acceptable, using.");a.$=g.jQuery;n();l();break b}g._jQuery=g.jQuery;g.jQuery=null}catch(x){}else"undefined"!=typeof g.$&&(g._$=g.$);d.internal.__debug&&(newVersion=parseFloat(d.internal.__libURL.match(/\d\.\d/)),j("jQuery not loaded, loading "+newVersion));t("atkit-jquery",d.internal.__libURL);
26  
-m()}}return a};g.AtKit=new d})(window);
  9
+document.body.firstChild);else var d=setInterval(function(){null!=document.body&&(document.body.insertBefore(barGhost,document.body.firstChild),clearInterval(d))},100)}function t(a,d){var g=document.createElement("script");g.src=d;g.type="text/javascript";g.id=a;document.getElementsByTagName("head")[0].appendChild(g)}function u(){bar=document.getElementById("sbarGhost");bar.innerHTML=a.__templates.barFailed;setTimeout(function(){body=document.getElementsByTagName("body");bar=document.getElementById("sbarGhost");
  10
+body[0].removeChild(bar)},d.internal.__errorMessageTimeout)}d.internal=d.prototype={__version:1,__build:268,__APIVersion:1,__baseURL:"http://c.atbar.org/",__APIURL:"http://a.atbar.org/",__pluginURL:"http://plugins.atbar.org/",__libURL:"http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js",__channel:"atkit",__invoked:!1,__debug:!1,__loadAttempts:0,__maxLoadAttempts:30,__errorMessageTimeout:2E3,__localStorageNamespace:"AtKit_",__protocol:null,plugins:{},localisations:{GB:{exit:"Exit",reset:"Reset webpage"}},
  11
+templates:{global:{buttons:{},dialogs:{},storage:{},fn:{},unloadFn:{},resetFn:{},closeFn:{}}},debugCallback:null,language:"GB",defaultLanguage:"GB"};d.internal.__resourceURL=d.internal.__baseURL;d.internal.__resourceURL+=d.internal.__channel;d.internal.__assetURL=d.internal.__resourceURL+"/presentation/";d.internal.versionString="v"+d.internal.__version.toFixed(1)+"."+d.internal.__build+" ("+d.internal.__channel+" release channel)";d.internal.__aboutDialog={CSS:{"#ATKFBAbout":"font-family:Helvetica, Verdana, Arial, sans-serif;font-size:12px;color:#364365;",
  12
+"#ATKFBAbout h2":"border-bottom:1px solid #DDD;font-size:16px;margin-bottom:5px;margin-top:10px;padding-bottom:5px","#ATKFBAbout p#ATKFBAboutFooter":"border-top:1px solid #DDD;padding-top:10px;margin-top:25px;"}};d.external=d.prototype={transport:"JSONP",window:g,global:d.internal.templates.global,buttons:{},languageMap:{},siteFixes:[]};var a={__env:d.external,__templates:{barGhost:'<center><img src="'+d.internal.__assetURL+'images/loading.gif" style="margin-top:10px;" /></center>',barFailed:"<center>library loading failed</center>",
  13
+button:'<div id="at-btn-(ID)" title="(TITLE)" class="at-btn"><a title="(TITLE)" id="at-lnk-(ID)" href="#ATBarLink"><img src="(SRC)" alt="(TITLE)" height="16" width="16" border="0" /></a></div>',spacer:'<div class="at-spacer"></div>',separator:'<div class="at-separator"></div>'},__CSS:{"#sbar":"height:40px;left:0;line-height:40px;margin-left:auto;margin-right:auto;margin-top:0;position:fixed;top:0;width:100%;z-index:9999998;padding:0 5px;background:url("+d.internal.__assetURL+"images/background.png) repeat-x #EBEAED;",
  14
+"#sbarGhost":"height:40px;width:100%;",".at-spacer":"display:block;height:40px;width:40px;float:left",".at-separator":"display:block;height:25px;float:left;border-left:2px solid #a9a9a9;margin:7px 1px 4px 7px",".at-btn":"height:28px;width:28px;float:left;line-height:14px;text-align:center;color:#FFF;clear:none;margin:5px 0 0 5px;background:url("+d.internal.__assetURL+"images/button_background.png) no-repeat",".at-btn a":"display:block;height:28px;width:28px;background:transparent;position:inherit;",
  15
+".at-btn a:active":"border:yellow solid 2px;",".at-btn img":"margin:0;padding:6px;border:none;background:none;","#at-btn-atkit-reset, #at-btn-atkit-unload":"height:28px;width:28px;line-height:14px;text-align:center;color:#FFF;clear:none;float:right;margin:5px 10px 0 0;background:url("+d.internal.__assetURL+"images/button_background.png) no-repeat;","#facebox button":"height:26px;margin:10px;padding:5px;color:white;background-color:#0064CD;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);border-radius:4px",
  16
+"#facebox h2":"font-size:18pt;font-weight:bold;color:black"},settings:{noiframe:!0,allowclose:!0,allowreset:!0,logoURL:"",name:"",about:""},version:d.internal.__APIVersion,$:""};(function(){var a=r();/https:/.test(a)&&(d.internal.__libURL=d.internal.__libURL.replace("http:",a),d.internal.__baseURL="https://ssl.atbar.org/c/",d.internal.__APIURL="https://ssl.atbar.org/a/",d.internal.__pluginURL="https://ssl.atbar.org/plugins/")})();a.getVersion=function(){return d.internal.__version.toFixed(1)+"."+
  17
+d.internal.__build};a.isRendered=function(){return d.internal.__invoked};a.getResourceURL=function(){return d.internal.__resourceURL};a.getPluginURL=function(){return d.internal.__pluginURL};a.setName=function(d){a.settings.name=d};a.setAbout=function(d){a.settings.about=d};a.setLogo=function(d){a.settings.logoURL=d};a.setCSS=function(d,e){a.__CSS[d]=e};a.setLanguage=function(a){d.internal.language=a};a.getLanguage=function(){return d.internal.language};a.addLocalisation=function(a,e,g){d.internal.localisations[a][e]=
  18
+g};a.addLocalisationMap=function(h,e){d.internal.localisations[h]=a.$.extend(!0,d.internal.localisations[h],e)};a.localisation=function(a){return"undefined"==typeof d.internal.localisations[d.internal.language]?d.internal.localisations[d.internal.defaultLanguage][a]:"undefined"==typeof d.internal.localisations[d.internal.language][a]?"{no value set for key "+a+" in language "+d.internal.language+"}":d.internal.localisations[d.internal.language][a]};a.addFix=function(d,e){a.__env.siteFixes.push({regex:d,
  19
+f:e})};a.addScript=function(d,e){"undefined"!=typeof a.$?0<a.$('script[src="'+d+'"]').length||a.$.getScript(d,e):t("",d)};a.addStylesheet=function(d,e){a.$("head").append(a.$("<link>",{rel:"stylesheet",href:d,type:"text/css",id:e}))};a.addFn=function(d,e){a.__env.global.fn[d]=e};a.addCloseFn=function(d,e){a.__env.global.closeFn[d]=e};a.addResetFn=function(d,e){a.__env.global.resetFn[d]=e};a.addDialog=function(d,e,g){a.__env.global.dialogs[d]={title:e,body:g}};a.addButton=function(h,e,g,j,m,n,l){"undefined"==
  20
+typeof a.__env.buttons[h]&&(a.__env.buttons[h]={icon:g,tooltip:e,action:j,dialogs:m,functions:n},null!=l&&(a.__env.buttons[h]=a.$.extend(!0,a.__env.buttons[h],l)),d.internal.__invoked&&(a.$(o(h)).appendTo("#sbar"),k()))};a.removeButton=function(h){delete a.__env.buttons[h];d.internal.__invoked&&(j("remove button "+h),a.$("#at-btn-"+h).remove())};a.addSpacer=function(d){"undefined"==typeof d&&a.$(a.__templates.spacer).appendTo("#sbar");if(!isNaN(d))for(i=0;i<d;i++)a.$(a.__templates.spacer).appendTo("#sbar");
  21
+k()};a.addSeparator=function(){a.$(a.__templates.separator).appendTo("#sbar");k()};a.importPlugins=function(h,e){var g=h instanceof Array?h.join(","):h;a.addScript(d.internal.__pluginURL+g+".js",e)};a.addPlugin=function(a){d.internal.plugins[a].payload()};a.registerPlugin=function(a,e,g){d.internal.plugins[a]={payload:e,metadata:g}};a.listPlugins=function(){var a=[];for(p in d.internal.plugins)a.push(p);return a};a.getPluginMetadata=function(a){return d.internal.plugins[a].metadata};a.show=function(d,
  22
+e){d=a.$("<div>",{"class":"userDialog"}).append(a.$("<h2>",{html:d.title}),a.$("<p>",{html:d.body}));a.$("body").find(".facebox_hide").remove();a.$.facebox(d);k();"null"!=typeof e&&"undefined"!=typeof e&&e()};a.message=function(d,e){a.$("body").find(".facebox_hide").remove();a.$.facebox(d);k();"null"!=typeof e&&"undefined"!=typeof e&&e()};a.hideDialog=function(){a.$(g.document).trigger("close.facebox")};a.call=function(d,e){return a.__env.global.fn[d](e)};a.set=function(d,e){a.__env.global.storage[d]=
  23
+e};a.get=function(d){return a.__env.global.storage[d]};a.storageAvailable=function(){return typeof g.localStorage?!0:!1};a.storage=function(h,e){if(!a.storageAvailable())return!1;var j=d.internal.__localStorageNamespace+a.settings.name+"_"+h;if("undefined"==typeof e)return g.localStorage.getItem(j);g.localStorage.setItem(j,e);return!0};a.clearStorage=function(){if(a.storageAvailable()){var h=RegExp("^"+(d.internal.__localStorageNamespace+a.settings.name)+".*");for(s in g.localStorage)s.match(h)&&
  24
+g.localStorage.removeItem(s)}};a.setDebugger=function(a){d.internal.debugCallback=a};a.lib=function(){return"function"==typeof a.$?a.$:"string"==typeof a.$&&"function"==typeof g.jQuery?g.jQuery:!1};a.render=function(){w()};a.close=function(){for(f in a.__env.global.unloadFn)a.__env.global.unloadFn[f]();d.internal.language=d.internal.defaultLanguage;d.internal.debugCallback=null;a.__env.global=d.internal.templates.global;a.__env.buttons={};a.__env.languageMap={};a.__env.siteFixes=[];d.internal.plugins=
  25
+{};d.internal.__invoked=!1};a.reset=function(){for(f in a.__env.global.resetFn)a.__env.global.resetFn[f]();d.internal.__invoked=!1};j("bootstrapping AtKit "+d.internal.versionString+"...");if(null==document.getElementById("sbar")&&!d.internal.__invoked&&!(a.settings.noiframe&&g!=g.top)){"undefined"!=typeof g.AtKitLoaded&&q();"undefined"==typeof unsafeWindow?d.external.window=g:(d.external.window=unsafeWindow,d.external.transport="GM-XHR");b:{j("loadLibrary called");if("undefined"!=typeof g.jQuery)try{jQversion=
  26
+parseFloat(g.jQuery().jquery.match(/\d\.\d/));j("jQuery already loaded, v"+jQversion);if(1.5<jQversion){j("loaded version acceptable, using.");a.$=g.jQuery;n();l();break b}g._jQuery=g.jQuery;g.jQuery=null}catch(x){}else"undefined"!=typeof g.$&&(g._$=g.$);d.internal.__debug&&(newVersion=parseFloat(d.internal.__libURL.match(/\d\.\d/)),j("jQuery not loaded, loading "+newVersion));t("atkit-jquery",d.internal.__libURL);m()}}return a};g.AtKit=new d})(window);
2  facebox.js
@@ -35,7 +35,7 @@
35 35
       closeImage   : baseURL + 'closelabel.gif',
36 36
       imageTypes   : [ 'png', 'jpg', 'jpeg', 'gif' ],
37 37
       faceboxHtml  : '\
38  
-    <div id="facebox" style="display:none;position: absolute;top:0;left: 0;z-index: 100;text-align: left;width:410px"> \
  38
+    <div id="facebox" style="display:none;position: absolute;top:0;left: 0;z-index:2147483647;text-align: left;width:410px"> \
39 39
       <div class="popup" style="position: relative;"> \
40 40
         <table style="border-collapse: collapse;border:none"> \
41 41
           <tbody> \
22  facebox.min.js
... ...
@@ -1,11 +1,11 @@
1  
-(function(c){function e(b){if(a.facebox.settings.inited)return true;else a.facebox.settings.inited=true;a(document).trigger("init.facebox");h();var d=a.facebox.settings.imageTypes.join("|");a.facebox.settings.imageTypesRegexp=RegExp("."+d+"$","i");b&&a.extend(a.facebox.settings,b);a("#sbar").after(a.facebox.settings.faceboxHtml);var c=[new Image,new Image];c[0].src=a.facebox.settings.closeImage;c[1].src=a.facebox.settings.loadingImage;a("#facebox").find(".b:first, .bl, .br, .tl, .tr").each(function(){c.push(new Image);
2  
-c.slice(-1).src=a(this).css("background-image").replace(/url\((.+)\)/,"$1")});a("#facebox .close").click(a.facebox.close);a("#facebox .close_image").attr("src",a.facebox.settings.closeImage)}function i(){var a,d;if(self.pageYOffset)d=self.pageYOffset,a=self.pageXOffset;else if(document.documentElement&&document.documentElement.scrollTop)d=document.documentElement.scrollTop,a=document.documentElement.scrollLeft;else if(document.body)d=document.body.scrollTop,a=document.body.scrollLeft;return[a,d]}
3  
-function j(){var a;if(self.innerHeight)a=self.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)a=document.documentElement.clientHeight;else if(document.body)a=document.body.clientHeight;return a}function h(){var b=a.facebox.settings;b.loadingImage=b.loading_image||b.loadingImage;b.closeImage=b.close_image||b.closeImage;b.imageTypes=b.image_types||b.imageTypes;b.faceboxHtml=b.facebox_html||b.faceboxHtml}function f(b,d){if(b.match(/#/)){var c=window.location.href.split("#")[0],
4  
-c=b.replace(c,"");a.facebox.reveal(a(c).clone().show(),d)}else b.match(a.facebox.settings.imageTypesRegexp)?fillFaceboxFromImage(b,d):fillFaceboxFromAjax(b,d)}function g(){return a.facebox.settings.overlay==false||a.facebox.settings.opacity===null}function k(){if(!g())return a("facebox_overlay").length==0&&a("body").append('<div id="facebox_overlay" class="facebox_hide" style="position: fixed;top: 0px;left: 0px;height:100%;width:100%;"></div>'),a("#facebox_overlay").hide().addClass("facebox_overlayBG").css("opacity",
5  
-a.facebox.settings.opacity).click(function(){a(document).trigger("close.facebox")}).fadeIn(200),false}function l(){if(!g())return a("#facebox_overlay").fadeOut(200,function(){a("#facebox_overlay").removeClass("facebox_overlayBG");a("#facebox_overlay").css("z-index","-100");a("#facebox_overlay").remove()}),false}var a=c.lib(),c=c.getResourceURL()+"/presentation/images/";a.facebox=function(b,c){a.facebox.loading();b.div?f(b.div):a.isFunction(b)?b.call(a):a.facebox.reveal(b,c)};a.extend(a.facebox,{settings:{opacity:0,
6  
-overlay:true,loadingImage:c+"loading.gif",closeImage:c+"closelabel.gif",imageTypes:["png","jpg","jpeg","gif"],faceboxHtml:'<div id="facebox" style="display:none;position: absolute;top:0;left: 0;z-index: 100;text-align: left;width:410px"> <div class="popup" style="position: relative;"> <table style="border-collapse: collapse;border:none"> <tbody> <tr> <td class="tl" style="background:url('+c+'/tl.png); border: 0 none; border-bottom: 0;padding: 0;height: 10px;width: 10px;overflow: hidden;padding: 0;" /><td class="b" style="background:url('+
7  
-c+'/b.png); border: 0 none; border-bottom: 0;padding: 0;" /><td class="tr" style="background:url('+c+'/tr.png); border: 0 none;height: 10px;width: 10px;overflow: hidden;padding: 0;" /> </tr> <tr> <td class="b" style="background:url('+c+'/b.png); border: 0 none; border-bottom: 0;padding: 0;" /> <td class="body" style="border-bottom: 0;padding: 10px;background: #fff;width: 370px;"> <div class="content"> </div> <div class="footer" style="border-top: 1px solid #DDDDDD;padding-top: 5px;margin-top: 10px;text-align: right;"> <a href="#" class="close"> <img src="'+
8  
-c+'/closelabel.gif" title="close" class="close_image" /> </a> </div> </td> <td class="b" style="background:url('+c+'/b.png); border: 0 none; border-bottom: 0;padding: 0;" /> </tr> <tr> <td class="bl" style="background:url('+c+'/bl.png); border: 0 none; border-bottom: 0;padding: 0;height: 10px;width: 10px;overflow: hidden;padding: 0;" /><td class="b" style="background:url('+c+'/b.png); border: 0 none; border-bottom: 0;padding: 0;" /><td class="br" style="background:url('+c+'/br.png); border: 0 none; border-bottom: 0;padding: 0;height: 10px;width: 10px;overflow: hidden;padding: 0;" /> </tr> </tbody> </table> </div> </div>'},
9  
-loading:function(){e();if(a("#facebox .loading").length==1)return true;k();a("#facebox .content").empty();a("#facebox .body").children().hide().end().append('<div class="loading"><img src="'+a.facebox.settings.loadingImage+'"/></div>');a("#facebox").css({top:i()[1]+j()/10,left:385.5}).show();a(document).bind("keydown.facebox",function(b){b.keyCode==27&&a.facebox.close();return true});a(document).trigger("loading.facebox")},reveal:function(b,c){a(document).trigger("beforeReveal.facebox");c&&a("#facebox .content").addClass(c);
10  
-a("#facebox .content").append(b);a("#facebox .loading").remove();a("#facebox .body").children().fadeIn("normal");a("#facebox").css("left",a(window).width()/2-a("#facebox table").width()/2);a(document).trigger("reveal.facebox").trigger("afterReveal.facebox")},changeFaceboxContent:function(b){a("#facebox .content").html(b)},close:function(){a(document).trigger("close.facebox");return false}});a.fn.facebox=function(b){e(b);return this.click(function(){a.facebox.loading(true);var b=this.rel.match(/facebox\[?\.(\w+)\]?/);
11  
-b&&(b=b[1]);f(this.href,b);return false})};a(document).bind("close.facebox",function(){a(document).unbind("keydown.facebox");a("#facebox").fadeOut(function(){a("#facebox .content").removeClass().addClass("content");l();a("#facebox .loading").remove()})})})(AtKit);
  1
+(function(c){function e(b){if(a.facebox.settings.inited)return!0;a.facebox.settings.inited=!0;a(document).trigger("init.facebox");h();var d=a.facebox.settings.imageTypes.join("|");a.facebox.settings.imageTypesRegexp=RegExp("."+d+"$","i");b&&a.extend(a.facebox.settings,b);a("#sbar").after(a.facebox.settings.faceboxHtml);var c=[new Image,new Image];c[0].src=a.facebox.settings.closeImage;c[1].src=a.facebox.settings.loadingImage;a("#facebox").find(".b:first, .bl, .br, .tl, .tr").each(function(){c.push(new Image);
  2
+c.slice(-1).src=a(this).css("background-image").replace(/url\((.+)\)/,"$1")});a("#facebox .close").click(a.facebox.close);a("#facebox .close_image").attr("src",a.facebox.settings.closeImage)}function i(){var a,d;self.pageYOffset?(d=self.pageYOffset,a=self.pageXOffset):document.documentElement&&document.documentElement.scrollTop?(d=document.documentElement.scrollTop,a=document.documentElement.scrollLeft):document.body&&(d=document.body.scrollTop,a=document.body.scrollLeft);return[a,d]}function j(){var a;
  3
+self.innerHeight?a=self.innerHeight:document.documentElement&&document.documentElement.clientHeight?a=document.documentElement.clientHeight:document.body&&(a=document.body.clientHeight);return a}function h(){var b=a.facebox.settings;b.loadingImage=b.loading_image||b.loadingImage;b.closeImage=b.close_image||b.closeImage;b.imageTypes=b.image_types||b.imageTypes;b.faceboxHtml=b.facebox_html||b.faceboxHtml}function f(b,d){if(b.match(/#/)){var c=window.location.href.split("#")[0],c=b.replace(c,"");a.facebox.reveal(a(c).clone().show(),
  4
+d)}else b.match(a.facebox.settings.imageTypesRegexp)?fillFaceboxFromImage(b,d):fillFaceboxFromAjax(b,d)}function g(){return!1==a.facebox.settings.overlay||null===a.facebox.settings.opacity}function k(){if(!g())return 0==a("facebox_overlay").length&&a("body").append('<div id="facebox_overlay" class="facebox_hide" style="position: fixed;top: 0px;left: 0px;height:100%;width:100%;"></div>'),a("#facebox_overlay").hide().addClass("facebox_overlayBG").css("opacity",a.facebox.settings.opacity).click(function(){a(document).trigger("close.facebox")}).fadeIn(200),
  5
+!1}function l(){if(!g())return a("#facebox_overlay").fadeOut(200,function(){a("#facebox_overlay").removeClass("facebox_overlayBG");a("#facebox_overlay").css("z-index","-100");a("#facebox_overlay").remove()}),!1}var a=c.lib(),c=c.getResourceURL()+"/presentation/images/";a.facebox=function(b,c){a.facebox.loading();b.div?f(b.div):a.isFunction(b)?b.call(a):a.facebox.reveal(b,c)};a.extend(a.facebox,{settings:{opacity:0,overlay:!0,loadingImage:c+"loading.gif",closeImage:c+"closelabel.gif",imageTypes:["png",
  6
+"jpg","jpeg","gif"],faceboxHtml:'    <div id="facebox" style="display:none;position: absolute;top:0;left: 0;z-index:2147483647;text-align: left;width:410px"><div class="popup" style="position: relative;"><table style="border-collapse: collapse;border:none"><tbody><tr><td class="tl" style="background:url('+c+'/tl.png); border: 0 none; border-bottom: 0;padding: 0;height: 10px;width: 10px;overflow: hidden;padding: 0;" /><td class="b" style="background:url('+
  7
+c+'/b.png); border: 0 none; border-bottom: 0;padding: 0;" /><td class="tr" style="background:url('+c+'/tr.png); border: 0 none;height: 10px;width: 10px;overflow: hidden;padding: 0;" /></tr><tr><td class="b" style="background:url('+c+'/b.png); border: 0 none; border-bottom: 0;padding: 0;" /><td class="body" style="border-bottom: 0;padding: 10px;background: #fff;width: 370px;"><div class="content"></div><div class="footer" style="border-top: 1px solid #DDDDDD;padding-top: 5px;margin-top: 10px;text-align: right;"><a href="#" class="close"><img src="'+
  8
+c+'/closelabel.gif" title="close" class="close_image" /></a></div></td><td class="b" style="background:url('+c+'/b.png); border: 0 none; border-bottom: 0;padding: 0;" /></tr><tr><td class="bl" style="background:url('+c+'/bl.png); border: 0 none; border-bottom: 0;padding: 0;height: 10px;width: 10px;overflow: hidden;padding: 0;" /><td class="b" style="background:url('+c+'/b.png); border: 0 none; border-bottom: 0;padding: 0;" /><td class="br" style="background:url('+
  9
+c+'/br.png); border: 0 none; border-bottom: 0;padding: 0;height: 10px;width: 10px;overflow: hidden;padding: 0;" /></tr></tbody></table></div></div>'},loading:function(){e();if(1==a("#facebox .loading").length)return!0;k();a("#facebox .content").empty();a("#facebox .body").children().hide().end().append('<div class="loading"><img src="'+a.facebox.settings.loadingImage+'"/></div>');a("#facebox").css({top:i()[1]+j()/10,left:385.5}).show();a(document).bind("keydown.facebox",
  10
+function(b){27==b.keyCode&&a.facebox.close();return!0});a(document).trigger("loading.facebox")},reveal:function(b,c){a(document).trigger("beforeReveal.facebox");c&&a("#facebox .content").addClass(c);a("#facebox .content").append(b);a("#facebox .loading").remove();a("#facebox .body").children().fadeIn("normal");a("#facebox").css("left",a(window).width()/2-a("#facebox table").width()/2);a(document).trigger("reveal.facebox").trigger("afterReveal.facebox")},changeFaceboxContent:function(b){a("#facebox .content").html(b)},
  11
+close:function(){a(document).trigger("close.facebox");return!1}});a.fn.facebox=function(b){e(b);return this.click(function(){a.facebox.loading(!0);var b=this.rel.match(/facebox\[?\.(\w+)\]?/);b&&(b=b[1]);f(this.href,b);return!1})};a(document).bind("close.facebox",function(){a(document).unbind("keydown.facebox");a("#facebox").fadeOut(function(){a("#facebox .content").removeClass().addClass("content");l();a("#facebox .loading").remove()})})})(AtKit);

No commit comments for this range

Something went wrong with that request. Please try again.