Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

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

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

Signed-off-by: Sebastian Skuse <seb@skuse.net>
4253c00
Seb Skuse sebskuse Plugin constructor
Signed-off-by: Sebastian Skuse <seb@skuse.net>
f6a55af
Seb Skuse sebskuse Expose API.$ to onRun and onRender 8f7693e
Commits on Jun 22, 2012
Seb Skuse sebskuse New plugin changes 47ea9e0
Seb Skuse sebskuse RightToLeft support da55828
Seb Skuse sebskuse Add RightToLeft support 46ce92f
Commits on Jul 09, 2012
Seb Skuse sebskuse Fixes for RTL buttons efdf90c
Seb Skuse sebskuse RTL fixes 34b8990
Seb Skuse sebskuse Merge branch 'refs/heads/experimental/pluginsv2' into development
Conflicts:
	AtKit.js
9ff3f55
Seb Skuse sebskuse Merge branch 'refs/heads/development' dd53703
Showing with 113 additions and 41 deletions.
  1. +83 −11 AtKit.js
  2. +18 −18 AtKit.min.js
  3. +1 −1  facebox.js
  4. +11 −11 facebox.min.js
94 AtKit.js
View
@@ -16,8 +16,8 @@
// Internal properties
AtKit.internal = AtKit.prototype = {
- __version: 1.0, // Version.
- __build: 268, // Build.
+ __version: 1.1, // Version.
+ __build: 278, // Build.
__APIVersion: 1.0, // The version of the API.
__baseURL: "http://c.atbar.org/", // Load AtKit assets from here.
__APIURL: "http://a.atbar.org/", // API endpoint
@@ -88,7 +88,7 @@
"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(" + AtKit.internal.__assetURL + "images/background.png) repeat-x #EBEAED;",
+ "#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;",
"#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",
@@ -101,15 +101,49 @@
"#facebox h2": "font-size:18pt;font-weight:bold;color:black"
},
settings: {
- 'noiframe': true, // Don't load if we're in an iframe.
- 'allowclose': true, // Enable the close button
- 'allowreset': true, // Allow the page reset button
+ "noiframe": true, // Don't load if we're in an iframe.
+ "allowclose": true, // Enable the close button
+ "allowreset": true, // Allow the page reset button
+ "isRightToLeft": false, // Switch for changing to right to left orientation
"logoURL": '',
"name": '',
"about": ''
},
version: AtKit.internal.__APIVersion,
- $: '' // Library used for the Toolbar
+ $: '', // Library used for the Toolbar
+ plugin: function(name){ return new plugin(name); }
+ }
+
+ function plugin(name){
+ // Data & settings
+ this.name = name;
+ this.supportedLanguages = [];
+ this.aboutDialog = "";
+ this.settings = {};
+ this.version = 0;
+ var $ = API.$;
+
+ // Events
+ this.onRender = function($){};
+ this.onRun = function($){};
+
+ // Register plugin
+ this.register = function(){
+ AtKit.registerPlugin(this.name, this);
+ };
+
+
+ // Fired by AtKit when we are ready to render plugin.
+ // Don't call this yourself.
+ this.run = function(){
+ this.onRun($);
+ };
+
+ // Fired by AtKit when we actually render.
+ // Don't call this yourself.
+ this.render = function(){
+ this.onRender($);
+ }
}
// Manipulate variables based on environment
@@ -288,9 +322,13 @@
API.$( API.$('<div>', { id: 'sbar' }) ).insertAfter("#sbarGhost");
// Insert the logo.
+
+ // Are we in RTL mode? Work out where we should be positioned.
+ var align = API.settings.isRightToLeft ? "right" : "left";
+
API.$(
API.$("<a>", { id: 'sbarlogo', click: function(){ showAbout() } }).append(
- API.$("<img>", { "src": API.settings.logoURL, "align": "left", "border": "0", "title": API.settings.name + "Logo", "style": "float:left;margin-top:10px;" })
+ API.$("<img>", { "src": API.settings.logoURL, "align": align, "border": "0", "title": API.settings.name + "Logo", "style": "margin-top:10px;float:" + align })
)
).appendTo('#sbar');
@@ -346,8 +384,28 @@
for(c in cssObj){
if(/:active/.test( c ) || API.$( c ).length == 0) continue;
- try {
- API.$( c ).attr('style', cssObj[c]);
+ try {
+ // Get CSS item
+ var property = cssObj[c];
+
+ // Are we running in RTL mode?
+ if(API.settings.isRightToLeft) {
+ var floatRight = "float:right";
+ var floatLeft = "float:left";
+
+ // Does the string contain floatleft?
+ if(property.indexOf(floatLeft) != -1){
+ var match = new RegExp(floatLeft, "gi");
+ property = property.replace(match, floatRight);
+ } else if(property.indexOf(floatRight) != -1){
+ // Does it contain floatright? if so switch.
+ var match = new RegExp(floatRight, "gi");
+ property = property.replace(match, floatLeft);
+ }
+ }
+
+ // Apply the CSS
+ API.$( c ).attr('style', property);
} catch(e){
debug(e.description);
}
@@ -403,7 +461,11 @@
var plugins = API.listPlugins();
if(plugins.length > 0){
- AtKit.internal.__aboutDialog.HTML += "<br /> Registered plugins: " + plugins.join(", ");
+ AtKit.internal.__aboutDialog.HTML += "<br /> Registered plugins: ";
+
+ plugins.map(function(el, index, fullList){
+ AtKit.internal.__aboutDialog.HTML += "<button class='pluginLink'>" + el + "</button>";
+ });
}
AtKit.internal.__aboutDialog.HTML += "</p>";
@@ -531,10 +593,20 @@
API.settings.logoURL = logo;
}
+ // Set whether the toolbar is running in RTL mode.
+ API.setIsRightToLeft = function(isRTL){
+ API.settings.isRightToLeft = isRTL;
+ }
+
// Add a CSS rule. Identifier is a jQuery selector expression, eg #bar. inlineStyle appears in the style attr in the DOM.
API.setCSS = function(identifier, inlineStyle){
API.__CSS[identifier] = inlineStyle;
}
+
+ // Set whether the toolbar is running in RTL mode.
+ API.setIsRightToLeft = function(isRTL){
+ API.settings.isRightToLeft = isRTL;
+ }
// Set the language that this toolbar uses
API.setLanguage = function(language) {
36 AtKit.min.js
View
@@ -6,21 +6,21 @@ e;return a.__env.buttons[h].HTML}function w(){if(!d.internal.__invoked){0==a.$("
"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+
"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)||
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,
-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");
-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"}},
-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",
-"#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>',
-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",
-".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("+
-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=
-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=
-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]?
-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,
-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"),
-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=
-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()};
-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+
-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()};
-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=
-"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);
-m()}}return a};g.AtKit=new d})(window);
+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");
+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"}},
+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;",
+"#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>",
+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;",
+"#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;",
+".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",
+"#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)+"."+
+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]=
+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,
+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"==
+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");
+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,
+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]=
+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)&&
+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=
+{};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=
+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
View
@@ -35,7 +35,7 @@
closeImage : baseURL + '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 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> \
22 facebox.min.js
View
@@ -1,11 +1,11 @@
-(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);
-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]}
-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],
-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",
-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,
-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('+
-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="'+
-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>'},
-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);
-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+)\]?/);
-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);
+(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);
+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;
+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(),
+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),
+!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",
+"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('+
+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="'+
+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>'},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",
+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)},
+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.