gunnertechnology 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Gemfile +4 -0
- data/README +0 -0
- data/Rakefile +2 -0
- data/gunnertechnology.gemspec +28 -0
- data/lib/generators/project/USAGE +8 -0
- data/lib/generators/project/project_generator.rb +61 -0
- data/lib/generators/project/templates/app/controllers/authentications_controller.rb +85 -0
- data/lib/generators/project/templates/app/models/authentication.rb +17 -0
- data/lib/generators/project/templates/app/views/layouts/application.html.erb +77 -0
- data/lib/generators/project/templates/app/views/shared/_facebook_init.html.erb +12 -0
- data/lib/generators/project/templates/app/views/shared/_flash_messages.html.erb +7 -0
- data/lib/generators/project/templates/app/views/shared/_footer.html.erb +15 -0
- data/lib/generators/project/templates/app/views/shared/_google_analytics.html.erb +11 -0
- data/lib/generators/project/templates/app/views/shared/_header.html.erb +23 -0
- data/lib/generators/project/templates/config/facebook_config.yml +29 -0
- data/lib/generators/project/templates/config/google_analytics_config.yml +8 -0
- data/lib/generators/project/templates/config/initializers/load_facebook_config.rb +2 -0
- data/lib/generators/project/templates/config/initializers/load_google_analytics_config.rb +2 -0
- data/lib/generators/project/templates/config/initializers/load_seo_config.rb +2 -0
- data/lib/generators/project/templates/config/initializers/omniauth.rb +91 -0
- data/lib/generators/project/templates/config/providers.yml +27 -0
- data/lib/generators/project/templates/config/seo_config.yml +8 -0
- data/lib/generators/project/templates/db/create_authentications.rb +21 -0
- data/lib/generators/project/templates/public/javascripts/libs/PIE.htc +73 -0
- data/lib/generators/project/templates/public/javascripts/libs/colorpicker.js +484 -0
- data/lib/generators/project/templates/public/javascripts/libs/dd_belatedpng.js +13 -0
- data/lib/generators/project/templates/public/javascripts/libs/eye.js +34 -0
- data/lib/generators/project/templates/public/javascripts/libs/head.js +8 -0
- data/lib/generators/project/templates/public/javascripts/libs/jquery.validationEngine-en.js +130 -0
- data/lib/generators/project/templates/public/javascripts/libs/jquery.validationEngine-es.js +124 -0
- data/lib/generators/project/templates/public/javascripts/libs/jquery.validationEngine-fr.js +119 -0
- data/lib/generators/project/templates/public/javascripts/libs/jquery.validationEngine-it.js +103 -0
- data/lib/generators/project/templates/public/javascripts/libs/jquery.validationEngine-pt.js +125 -0
- data/lib/generators/project/templates/public/javascripts/libs/jquery.validationEngine-ro.js +126 -0
- data/lib/generators/project/templates/public/javascripts/libs/jquery.validationEngine.js +1137 -0
- data/lib/generators/project/templates/public/javascripts/libs/layout.js +67 -0
- data/lib/generators/project/templates/public/javascripts/libs/modernizr-1.6.min.js +30 -0
- data/lib/generators/project/templates/public/javascripts/libs/utils.js +252 -0
- data/lib/generators/project/templates/public/javascripts/mylibs/.gitignore +3 -0
- data/lib/generators/project/templates/public/javascripts/plugins.js +38 -0
- data/lib/generators/project/templates/public/javascripts/profiling/config.js +59 -0
- data/lib/generators/project/templates/public/javascripts/profiling/yahoo-profiling.min.js +39 -0
- data/lib/generators/project/templates/public/javascripts/script.js +46 -0
- data/lib/generators/project/templates/public/stylesheets/grids/1008_24_10_10.css +201 -0
- data/lib/generators/project/templates/public/stylesheets/grids/fluid.css +320 -0
- data/lib/generators/project/templates/public/stylesheets/handheld.css +8 -0
- data/lib/generators/project/templates/public/stylesheets/profiling/yahoo-profiling.css +7 -0
- data/lib/generators/project/templates/public/stylesheets/reset.css +53 -0
- data/lib/generators/project/templates/public/stylesheets/text.css +84 -0
- data/lib/generators/project/templates/public/stylesheets/validationEngine.jquery.css +142 -0
- data/lib/generators/project/templates/public/swfs/charts.swf +0 -0
- data/lib/gunnertechnology/version.rb +3 -0
- data/lib/gunnertechnology.rb +47 -0
- metadata +206 -0
@@ -0,0 +1,67 @@
|
|
1
|
+
(function($){
|
2
|
+
var initLayout = function() {
|
3
|
+
var hash = window.location.hash.replace('#', '');
|
4
|
+
var currentTab = $('ul.navigationTabs a')
|
5
|
+
.bind('click', showTab)
|
6
|
+
.filter('a[rel=' + hash + ']');
|
7
|
+
if (currentTab.size() == 0) {
|
8
|
+
currentTab = $('ul.navigationTabs a:first');
|
9
|
+
}
|
10
|
+
showTab.apply(currentTab.get(0));
|
11
|
+
$('#colorpickerHolder').ColorPicker({flat: true});
|
12
|
+
$('#colorpickerHolder2').ColorPicker({
|
13
|
+
flat: true,
|
14
|
+
color: '#00ff00',
|
15
|
+
onSubmit: function(hsb, hex, rgb) {
|
16
|
+
$('#colorSelector2 div').css('backgroundColor', '#' + hex);
|
17
|
+
}
|
18
|
+
});
|
19
|
+
$('#colorpickerHolder2>div').css('position', 'absolute');
|
20
|
+
var widt = false;
|
21
|
+
$('#colorSelector2').bind('click', function() {
|
22
|
+
$('#colorpickerHolder2').stop().animate({height: widt ? 0 : 173}, 500);
|
23
|
+
widt = !widt;
|
24
|
+
});
|
25
|
+
$('#colorpickerField1, #colorpickerField2, #colorpickerField3').ColorPicker({
|
26
|
+
onSubmit: function(hsb, hex, rgb, el) {
|
27
|
+
$(el).val(hex);
|
28
|
+
$(el).ColorPickerHide();
|
29
|
+
},
|
30
|
+
onBeforeShow: function () {
|
31
|
+
$(this).ColorPickerSetColor(this.value);
|
32
|
+
}
|
33
|
+
})
|
34
|
+
.bind('keyup', function(){
|
35
|
+
$(this).ColorPickerSetColor(this.value);
|
36
|
+
});
|
37
|
+
$('#colorSelector').ColorPicker({
|
38
|
+
color: '#0000ff',
|
39
|
+
onShow: function (colpkr) {
|
40
|
+
$(colpkr).fadeIn(500);
|
41
|
+
return false;
|
42
|
+
},
|
43
|
+
onHide: function (colpkr) {
|
44
|
+
$(colpkr).fadeOut(500);
|
45
|
+
return false;
|
46
|
+
},
|
47
|
+
onChange: function (hsb, hex, rgb) {
|
48
|
+
$('#colorSelector div').css('backgroundColor', '#' + hex);
|
49
|
+
}
|
50
|
+
});
|
51
|
+
};
|
52
|
+
|
53
|
+
var showTab = function(e) {
|
54
|
+
var tabIndex = $('ul.navigationTabs a')
|
55
|
+
.removeClass('active')
|
56
|
+
.index(this);
|
57
|
+
$(this)
|
58
|
+
.addClass('active')
|
59
|
+
.blur();
|
60
|
+
$('div.tab')
|
61
|
+
.hide()
|
62
|
+
.eq(tabIndex)
|
63
|
+
.show();
|
64
|
+
};
|
65
|
+
|
66
|
+
EYE.register(initLayout, 'init');
|
67
|
+
})(jQuery)
|
@@ -0,0 +1,30 @@
|
|
1
|
+
/*
|
2
|
+
* Modernizr v1.6
|
3
|
+
* http://www.modernizr.com
|
4
|
+
*
|
5
|
+
* Developed by:
|
6
|
+
* - Faruk Ates http://farukat.es/
|
7
|
+
* - Paul Irish http://paulirish.com/
|
8
|
+
*
|
9
|
+
* Copyright (c) 2009-2010
|
10
|
+
* Dual-licensed under the BSD or MIT licenses.
|
11
|
+
* http://www.modernizr.com/license/
|
12
|
+
*/
|
13
|
+
window.Modernizr=function(i,e,u){function s(a,b){return(""+a).indexOf(b)!==-1}function D(a,b){for(var c in a)if(j[a[c]]!==u&&(!b||b(a[c],E)))return true}function n(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1);c=(a+" "+F.join(c+" ")+c).split(" ");return!!D(c,b)}function S(){f.input=function(a){for(var b=0,c=a.length;b<c;b++)L[a[b]]=!!(a[b]in h);return L}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));f.inputtypes=function(a){for(var b=0,c,k=a.length;b<
|
14
|
+
k;b++){h.setAttribute("type",a[b]);if(c=h.type!=="text"){h.value=M;if(/^range$/.test(h.type)&&h.style.WebkitAppearance!==u){l.appendChild(h);c=e.defaultView;c=c.getComputedStyle&&c.getComputedStyle(h,null).WebkitAppearance!=="textfield"&&h.offsetHeight!==0;l.removeChild(h)}else/^(search|tel)$/.test(h.type)||(c=/^(url|email)$/.test(h.type)?h.checkValidity&&h.checkValidity()===false:h.value!=M)}N[a[b]]=!!c}return N}("search tel url email datetime date month week time datetime-local number range color".split(" "))}
|
15
|
+
var f={},l=e.documentElement,E=e.createElement("modernizr"),j=E.style,h=e.createElement("input"),M=":)",O=Object.prototype.toString,q=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),F="Webkit Moz O ms Khtml".split(" "),v={svg:"http://www.w3.org/2000/svg"},d={},N={},L={},P=[],w,Q=function(a){var b=document.createElement("style"),c=e.createElement("div");b.textContent=a+"{#modernizr{height:3px}}";(e.head||e.getElementsByTagName("head")[0]).appendChild(b);c.id="modernizr";l.appendChild(c);a=c.offsetHeight===
|
16
|
+
3;b.parentNode.removeChild(b);c.parentNode.removeChild(c);return!!a},o=function(){var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return function(b,c){c=c||document.createElement(a[b]||"div");b="on"+b;var k=b in c;if(!k){c.setAttribute||(c=document.createElement("div"));if(c.setAttribute&&c.removeAttribute){c.setAttribute(b,"");k=typeof c[b]=="function";if(typeof c[b]!="undefined")c[b]=u;c.removeAttribute(b)}}return k}}(),G={}.hasOwnProperty,R;R=
|
17
|
+
typeof G!=="undefined"&&typeof G.call!=="undefined"?function(a,b){return G.call(a,b)}:function(a,b){return b in a&&typeof a.constructor.prototype[b]==="undefined"};d.flexbox=function(){var a=e.createElement("div"),b=e.createElement("div");(function(k,g,r,x){g+=":";k.style.cssText=(g+q.join(r+";"+g)).slice(0,-g.length)+(x||"")})(a,"display","box","width:42px;padding:0;");b.style.cssText=q.join("box-flex:1;")+"width:10px;";a.appendChild(b);l.appendChild(a);var c=b.offsetWidth===42;a.removeChild(b);
|
18
|
+
l.removeChild(a);return c};d.canvas=function(){var a=e.createElement("canvas");return!!(a.getContext&&a.getContext("2d"))};d.canvastext=function(){return!!(f.canvas&&typeof e.createElement("canvas").getContext("2d").fillText=="function")};d.webgl=function(){var a=e.createElement("canvas");try{if(a.getContext("webgl"))return true}catch(b){}try{if(a.getContext("experimental-webgl"))return true}catch(c){}return false};d.touch=function(){return"ontouchstart"in i||Q("@media ("+q.join("touch-enabled),(")+
|
19
|
+
"modernizr)")};d.geolocation=function(){return!!navigator.geolocation};d.postmessage=function(){return!!i.postMessage};d.websqldatabase=function(){return!!i.openDatabase};d.indexedDB=function(){for(var a=-1,b=F.length;++a<b;){var c=F[a].toLowerCase();if(i[c+"_indexedDB"]||i[c+"IndexedDB"])return true}return false};d.hashchange=function(){return o("hashchange",i)&&(document.documentMode===u||document.documentMode>7)};d.history=function(){return!!(i.history&&history.pushState)};d.draganddrop=function(){return o("drag")&&
|
20
|
+
o("dragstart")&&o("dragenter")&&o("dragover")&&o("dragleave")&&o("dragend")&&o("drop")};d.websockets=function(){return"WebSocket"in i};d.rgba=function(){j.cssText="background-color:rgba(150,255,150,.5)";return s(j.backgroundColor,"rgba")};d.hsla=function(){j.cssText="background-color:hsla(120,40%,100%,.5)";return s(j.backgroundColor,"rgba")||s(j.backgroundColor,"hsla")};d.multiplebgs=function(){j.cssText="background:url(//:),url(//:),red url(//:)";return/(url\s*\(.*?){3}/.test(j.background)};d.backgroundsize=
|
21
|
+
function(){return n("backgroundSize")};d.borderimage=function(){return n("borderImage")};d.borderradius=function(){return n("borderRadius","",function(a){return s(a,"orderRadius")})};d.boxshadow=function(){return n("boxShadow")};d.textshadow=function(){return e.createElement("div").style.textShadow===""};d.opacity=function(){var a=q.join("opacity:.5;")+"";j.cssText=a;return s(j.opacity,"0.5")};d.cssanimations=function(){return n("animationName")};d.csscolumns=function(){return n("columnCount")};d.cssgradients=
|
22
|
+
function(){var a=("background-image:"+q.join("gradient(linear,left top,right bottom,from(#9f9),to(white));background-image:")+q.join("linear-gradient(left top,#9f9, white);background-image:")).slice(0,-17);j.cssText=a;return s(j.backgroundImage,"gradient")};d.cssreflections=function(){return n("boxReflect")};d.csstransforms=function(){return!!D(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])};d.csstransforms3d=function(){var a=!!D(["perspectiveProperty","WebkitPerspective",
|
23
|
+
"MozPerspective","OPerspective","msPerspective"]);if(a)a=Q("@media ("+q.join("transform-3d),(")+"modernizr)");return a};d.csstransitions=function(){return n("transitionProperty")};d.fontface=function(){var a,b=e.head||e.getElementsByTagName("head")[0]||l,c=e.createElement("style"),k=e.implementation||{hasFeature:function(){return false}};c.type="text/css";b.insertBefore(c,b.firstChild);a=c.sheet||c.styleSheet;b=k.hasFeature("CSS2","")?function(g){if(!(a&&g))return false;var r=false;try{a.insertRule(g,
|
24
|
+
0);r=!/unknown/i.test(a.cssRules[0].cssText);a.deleteRule(a.cssRules.length-1)}catch(x){}return r}:function(g){if(!(a&&g))return false;a.cssText=g;return a.cssText.length!==0&&!/unknown/i.test(a.cssText)&&a.cssText.replace(/\r+|\n+/g,"").indexOf(g.split(" ")[0])===0};f._fontfaceready=function(g){g(f.fontface)};return b('@font-face { font-family: "font"; src: "font.ttf"; }')};d.video=function(){var a=e.createElement("video"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('video/ogg; codecs="theora"');
|
25
|
+
b.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"')||a.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');b.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return b};d.audio=function(){var a=e.createElement("audio"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('audio/ogg; codecs="vorbis"');b.mp3=a.canPlayType("audio/mpeg;");b.wav=a.canPlayType('audio/wav; codecs="1"');b.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}return b};d.localstorage=function(){try{return"localStorage"in
|
26
|
+
i&&i.localStorage!==null}catch(a){return false}};d.sessionstorage=function(){try{return"sessionStorage"in i&&i.sessionStorage!==null}catch(a){return false}};d.webWorkers=function(){return!!i.Worker};d.applicationcache=function(){return!!i.applicationCache};d.svg=function(){return!!e.createElementNS&&!!e.createElementNS(v.svg,"svg").createSVGRect};d.inlinesvg=function(){var a=document.createElement("div");a.innerHTML="<svg/>";return(a.firstChild&&a.firstChild.namespaceURI)==v.svg};d.smil=function(){return!!e.createElementNS&&
|
27
|
+
/SVG/.test(O.call(e.createElementNS(v.svg,"animate")))};d.svgclippaths=function(){return!!e.createElementNS&&/SVG/.test(O.call(e.createElementNS(v.svg,"clipPath")))};for(var H in d)if(R(d,H)){w=H.toLowerCase();f[w]=d[H]();P.push((f[w]?"":"no-")+w)}f.input||S();f.crosswindowmessaging=f.postmessage;f.historymanagement=f.history;f.addTest=function(a,b){a=a.toLowerCase();if(!f[a]){b=!!b();l.className+=" "+(b?"":"no-")+a;f[a]=b;return f}};j.cssText="";E=h=null;i.attachEvent&&function(){var a=e.createElement("div");
|
28
|
+
a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function c(p){for(var m=-1;++m<r;)p.createElement(g[m])}function k(p,m){for(var I=p.length,t=-1,y,J=[];++t<I;){y=p[t];m=y.media||m;J.push(k(y.imports,m));J.push(y.cssText)}return J.join("")}var g="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video".split("|"),r=g.length,x=RegExp("<(/*)(abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)",
|
29
|
+
"gi"),T=RegExp("\\b(abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)\\b(?!.*[;}])","gi"),z=b.createDocumentFragment(),A=b.documentElement,K=A.firstChild,B=b.createElement("style"),C=b.createElement("body");B.media="all";c(b);c(z);a.attachEvent("onbeforeprint",function(){for(var p=-1;++p<r;)for(var m=b.getElementsByTagName(g[p]),I=m.length,t=-1;++t<I;)if(m[t].className.indexOf("iepp_")<0)m[t].className+=" iepp_"+
|
30
|
+
g[p];K.insertBefore(B,K.firstChild);B.styleSheet.cssText=k(b.styleSheets,"all").replace(T,".iepp_$1");z.appendChild(b.body);A.appendChild(C);C.innerHTML=z.firstChild.innerHTML.replace(x,"<$1bdo")});a.attachEvent("onafterprint",function(){C.innerHTML="";A.removeChild(C);K.removeChild(B);A.appendChild(z.firstChild)})}(this,document);f._enableHTML5=true;f._version="1.6";l.className=l.className.replace(/\bno-js\b/,"")+" js";l.className+=" "+P.join(" ");return f}(this,this.document);
|
@@ -0,0 +1,252 @@
|
|
1
|
+
/**
|
2
|
+
*
|
3
|
+
* Utilities
|
4
|
+
* Author: Stefan Petre www.eyecon.ro
|
5
|
+
*
|
6
|
+
*/
|
7
|
+
(function($) {
|
8
|
+
EYE.extend({
|
9
|
+
getPosition : function(e, forceIt)
|
10
|
+
{
|
11
|
+
var x = 0;
|
12
|
+
var y = 0;
|
13
|
+
var es = e.style;
|
14
|
+
var restoreStyles = false;
|
15
|
+
if (forceIt && jQuery.curCSS(e,'display') == 'none') {
|
16
|
+
var oldVisibility = es.visibility;
|
17
|
+
var oldPosition = es.position;
|
18
|
+
restoreStyles = true;
|
19
|
+
es.visibility = 'hidden';
|
20
|
+
es.display = 'block';
|
21
|
+
es.position = 'absolute';
|
22
|
+
}
|
23
|
+
var el = e;
|
24
|
+
if (el.getBoundingClientRect) { // IE
|
25
|
+
var box = el.getBoundingClientRect();
|
26
|
+
x = box.left + Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) - 2;
|
27
|
+
y = box.top + Math.max(document.documentElement.scrollTop, document.body.scrollTop) - 2;
|
28
|
+
} else {
|
29
|
+
x = el.offsetLeft;
|
30
|
+
y = el.offsetTop;
|
31
|
+
el = el.offsetParent;
|
32
|
+
if (e != el) {
|
33
|
+
while (el) {
|
34
|
+
x += el.offsetLeft;
|
35
|
+
y += el.offsetTop;
|
36
|
+
el = el.offsetParent;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
if (jQuery.browser.safari && jQuery.curCSS(e, 'position') == 'absolute' ) {
|
40
|
+
x -= document.body.offsetLeft;
|
41
|
+
y -= document.body.offsetTop;
|
42
|
+
}
|
43
|
+
el = e.parentNode;
|
44
|
+
while (el && el.tagName.toUpperCase() != 'BODY' && el.tagName.toUpperCase() != 'HTML')
|
45
|
+
{
|
46
|
+
if (jQuery.curCSS(el, 'display') != 'inline') {
|
47
|
+
x -= el.scrollLeft;
|
48
|
+
y -= el.scrollTop;
|
49
|
+
}
|
50
|
+
el = el.parentNode;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
if (restoreStyles == true) {
|
54
|
+
es.display = 'none';
|
55
|
+
es.position = oldPosition;
|
56
|
+
es.visibility = oldVisibility;
|
57
|
+
}
|
58
|
+
return {x:x, y:y};
|
59
|
+
},
|
60
|
+
getSize : function(e)
|
61
|
+
{
|
62
|
+
var w = parseInt(jQuery.curCSS(e,'width'), 10);
|
63
|
+
var h = parseInt(jQuery.curCSS(e,'height'), 10);
|
64
|
+
var wb = 0;
|
65
|
+
var hb = 0;
|
66
|
+
if (jQuery.curCSS(e, 'display') != 'none') {
|
67
|
+
wb = e.offsetWidth;
|
68
|
+
hb = e.offsetHeight;
|
69
|
+
} else {
|
70
|
+
var es = e.style;
|
71
|
+
var oldVisibility = es.visibility;
|
72
|
+
var oldPosition = es.position;
|
73
|
+
es.visibility = 'hidden';
|
74
|
+
es.display = 'block';
|
75
|
+
es.position = 'absolute';
|
76
|
+
wb = e.offsetWidth;
|
77
|
+
hb = e.offsetHeight;
|
78
|
+
es.display = 'none';
|
79
|
+
es.position = oldPosition;
|
80
|
+
es.visibility = oldVisibility;
|
81
|
+
}
|
82
|
+
return {w:w, h:h, wb:wb, hb:hb};
|
83
|
+
},
|
84
|
+
getClient : function(e)
|
85
|
+
{
|
86
|
+
var h, w;
|
87
|
+
if (e) {
|
88
|
+
w = e.clientWidth;
|
89
|
+
h = e.clientHeight;
|
90
|
+
} else {
|
91
|
+
var de = document.documentElement;
|
92
|
+
w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
|
93
|
+
h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
|
94
|
+
}
|
95
|
+
return {w:w,h:h};
|
96
|
+
},
|
97
|
+
getScroll : function (e)
|
98
|
+
{
|
99
|
+
var t=0, l=0, w=0, h=0, iw=0, ih=0;
|
100
|
+
if (e && e.nodeName.toLowerCase() != 'body') {
|
101
|
+
t = e.scrollTop;
|
102
|
+
l = e.scrollLeft;
|
103
|
+
w = e.scrollWidth;
|
104
|
+
h = e.scrollHeight;
|
105
|
+
} else {
|
106
|
+
if (document.documentElement) {
|
107
|
+
t = document.documentElement.scrollTop;
|
108
|
+
l = document.documentElement.scrollLeft;
|
109
|
+
w = document.documentElement.scrollWidth;
|
110
|
+
h = document.documentElement.scrollHeight;
|
111
|
+
} else if (document.body) {
|
112
|
+
t = document.body.scrollTop;
|
113
|
+
l = document.body.scrollLeft;
|
114
|
+
w = document.body.scrollWidth;
|
115
|
+
h = document.body.scrollHeight;
|
116
|
+
}
|
117
|
+
if (typeof pageYOffset != 'undefined') {
|
118
|
+
t = pageYOffset;
|
119
|
+
l = pageXOffset;
|
120
|
+
}
|
121
|
+
iw = self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;
|
122
|
+
ih = self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0;
|
123
|
+
}
|
124
|
+
return { t: t, l: l, w: w, h: h, iw: iw, ih: ih };
|
125
|
+
},
|
126
|
+
getMargins : function(e, toInteger)
|
127
|
+
{
|
128
|
+
var t = jQuery.curCSS(e,'marginTop') || '';
|
129
|
+
var r = jQuery.curCSS(e,'marginRight') || '';
|
130
|
+
var b = jQuery.curCSS(e,'marginBottom') || '';
|
131
|
+
var l = jQuery.curCSS(e,'marginLeft') || '';
|
132
|
+
if (toInteger)
|
133
|
+
return {
|
134
|
+
t: parseInt(t, 10)||0,
|
135
|
+
r: parseInt(r, 10)||0,
|
136
|
+
b: parseInt(b, 10)||0,
|
137
|
+
l: parseInt(l, 10)
|
138
|
+
};
|
139
|
+
else
|
140
|
+
return {t: t, r: r, b: b, l: l};
|
141
|
+
},
|
142
|
+
getPadding : function(e, toInteger)
|
143
|
+
{
|
144
|
+
var t = jQuery.curCSS(e,'paddingTop') || '';
|
145
|
+
var r = jQuery.curCSS(e,'paddingRight') || '';
|
146
|
+
var b = jQuery.curCSS(e,'paddingBottom') || '';
|
147
|
+
var l = jQuery.curCSS(e,'paddingLeft') || '';
|
148
|
+
if (toInteger)
|
149
|
+
return {
|
150
|
+
t: parseInt(t, 10)||0,
|
151
|
+
r: parseInt(r, 10)||0,
|
152
|
+
b: parseInt(b, 10)||0,
|
153
|
+
l: parseInt(l, 10)
|
154
|
+
};
|
155
|
+
else
|
156
|
+
return {t: t, r: r, b: b, l: l};
|
157
|
+
},
|
158
|
+
getBorder : function(e, toInteger)
|
159
|
+
{
|
160
|
+
var t = jQuery.curCSS(e,'borderTopWidth') || '';
|
161
|
+
var r = jQuery.curCSS(e,'borderRightWidth') || '';
|
162
|
+
var b = jQuery.curCSS(e,'borderBottomWidth') || '';
|
163
|
+
var l = jQuery.curCSS(e,'borderLeftWidth') || '';
|
164
|
+
if (toInteger)
|
165
|
+
return {
|
166
|
+
t: parseInt(t, 10)||0,
|
167
|
+
r: parseInt(r, 10)||0,
|
168
|
+
b: parseInt(b, 10)||0,
|
169
|
+
l: parseInt(l, 10)||0
|
170
|
+
};
|
171
|
+
else
|
172
|
+
return {t: t, r: r, b: b, l: l};
|
173
|
+
},
|
174
|
+
traverseDOM : function(nodeEl, func)
|
175
|
+
{
|
176
|
+
func(nodeEl);
|
177
|
+
nodeEl = nodeEl.firstChild;
|
178
|
+
while(nodeEl){
|
179
|
+
EYE.traverseDOM(nodeEl, func);
|
180
|
+
nodeEl = nodeEl.nextSibling;
|
181
|
+
}
|
182
|
+
},
|
183
|
+
getInnerWidth : function(el, scroll) {
|
184
|
+
var offsetW = el.offsetWidth;
|
185
|
+
return scroll ? Math.max(el.scrollWidth,offsetW) - offsetW + el.clientWidth:el.clientWidth;
|
186
|
+
},
|
187
|
+
getInnerHeight : function(el, scroll) {
|
188
|
+
var offsetH = el.offsetHeight;
|
189
|
+
return scroll ? Math.max(el.scrollHeight,offsetH) - offsetH + el.clientHeight:el.clientHeight;
|
190
|
+
},
|
191
|
+
getExtraWidth : function(el) {
|
192
|
+
if($.boxModel)
|
193
|
+
return (parseInt($.curCSS(el, 'paddingLeft'))||0)
|
194
|
+
+ (parseInt($.curCSS(el, 'paddingRight'))||0)
|
195
|
+
+ (parseInt($.curCSS(el, 'borderLeftWidth'))||0)
|
196
|
+
+ (parseInt($.curCSS(el, 'borderRightWidth'))||0);
|
197
|
+
return 0;
|
198
|
+
},
|
199
|
+
getExtraHeight : function(el) {
|
200
|
+
if($.boxModel)
|
201
|
+
return (parseInt($.curCSS(el, 'paddingTop'))||0)
|
202
|
+
+ (parseInt($.curCSS(el, 'paddingBottom'))||0)
|
203
|
+
+ (parseInt($.curCSS(el, 'borderTopWidth'))||0)
|
204
|
+
+ (parseInt($.curCSS(el, 'borderBottomWidth'))||0);
|
205
|
+
return 0;
|
206
|
+
},
|
207
|
+
isChildOf: function(parentEl, el, container) {
|
208
|
+
if (parentEl == el) {
|
209
|
+
return true;
|
210
|
+
}
|
211
|
+
if (!el || !el.nodeType || el.nodeType != 1) {
|
212
|
+
return false;
|
213
|
+
}
|
214
|
+
if (parentEl.contains && !$.browser.safari) {
|
215
|
+
return parentEl.contains(el);
|
216
|
+
}
|
217
|
+
if ( parentEl.compareDocumentPosition ) {
|
218
|
+
return !!(parentEl.compareDocumentPosition(el) & 16);
|
219
|
+
}
|
220
|
+
var prEl = el.parentNode;
|
221
|
+
while(prEl && prEl != container) {
|
222
|
+
if (prEl == parentEl)
|
223
|
+
return true;
|
224
|
+
prEl = prEl.parentNode;
|
225
|
+
}
|
226
|
+
return false;
|
227
|
+
},
|
228
|
+
centerEl : function(el, axis)
|
229
|
+
{
|
230
|
+
var clientScroll = EYE.getScroll();
|
231
|
+
var size = EYE.getSize(el);
|
232
|
+
if (!axis || axis == 'vertically')
|
233
|
+
$(el).css(
|
234
|
+
{
|
235
|
+
top: clientScroll.t + ((Math.min(clientScroll.h,clientScroll.ih) - size.hb)/2) + 'px'
|
236
|
+
}
|
237
|
+
);
|
238
|
+
if (!axis || axis == 'horizontally')
|
239
|
+
$(el).css(
|
240
|
+
{
|
241
|
+
left: clientScroll.l + ((Math.min(clientScroll.w,clientScroll.iw) - size.wb)/2) + 'px'
|
242
|
+
}
|
243
|
+
);
|
244
|
+
}
|
245
|
+
});
|
246
|
+
if (!$.easing.easeout) {
|
247
|
+
$.easing.easeout = function(p, n, firstNum, delta, duration) {
|
248
|
+
return -delta * ((n=n/duration-1)*n*n*n - 1) + firstNum;
|
249
|
+
};
|
250
|
+
}
|
251
|
+
|
252
|
+
})(jQuery);
|
@@ -0,0 +1,38 @@
|
|
1
|
+
|
2
|
+
(function($){
|
3
|
+
|
4
|
+
|
5
|
+
// ColorBox v1.3.15 - a full featured, light-weight, customizable lightbox based on jQuery 1.3+
|
6
|
+
// Copyright (c) 2010 Jack Moore - jack@colorpowered.com
|
7
|
+
// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
|
8
|
+
(function(b,ib){var t="none",M="LoadedContent",c=false,v="resize.",o="y",q="auto",e=true,L="nofollow",m="x";function f(a,c){a=a?' id="'+i+a+'"':"";c=c?' style="'+c+'"':"";return b("<div"+a+c+"/>")}function p(a,b){b=b===m?n.width():n.height();return typeof a==="string"?Math.round(/%/.test(a)?b/100*parseInt(a,10):parseInt(a,10)):a}function U(b){return a.photo||/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(b)}function cb(a){for(var c in a)if(b.isFunction(a[c])&&c.substring(0,2)!=="on")a[c]=a[c].call(l);a.rel=a.rel||l.rel||L;a.href=a.href||b(l).attr("href");a.title=a.title||l.title;return a}function w(c,a){a&&a.call(l);b.event.trigger(c)}function jb(){var b,e=i+"Slideshow_",c="click."+i,f,k;if(a.slideshow&&h[1]){f=function(){F.text(a.slideshowStop).unbind(c).bind(V,function(){if(g<h.length-1||a.loop)b=setTimeout(d.next,a.slideshowSpeed)}).bind(W,function(){clearTimeout(b)}).one(c+" "+N,k);j.removeClass(e+"off").addClass(e+"on");b=setTimeout(d.next,a.slideshowSpeed)};k=function(){clearTimeout(b);F.text(a.slideshowStart).unbind([V,W,N,c].join(" ")).one(c,f);j.removeClass(e+"on").addClass(e+"off")};a.slideshowAuto?f():k()}}function db(c){if(!O){l=c;a=cb(b.extend({},b.data(l,r)));h=b(l);g=0;if(a.rel!==L){h=b("."+G).filter(function(){return (b.data(this,r).rel||this.rel)===a.rel});g=h.index(l);if(g===-1){h=h.add(l);g=h.length-1}}if(!u){u=D=e;j.show();if(a.returnFocus)try{l.blur();b(l).one(eb,function(){try{this.focus()}catch(a){}})}catch(f){}x.css({opacity:+a.opacity,cursor:a.overlayClose?"pointer":q}).show();a.w=p(a.initialWidth,m);a.h=p(a.initialHeight,o);d.position(0);X&&n.bind(v+P+" scroll."+P,function(){x.css({width:n.width(),height:n.height(),top:n.scrollTop(),left:n.scrollLeft()})}).trigger("scroll."+P);w(fb,a.onOpen);Y.add(H).add(I).add(F).add(Z).hide();ab.html(a.close).show()}d.load(e)}}var gb={transition:"elastic",speed:300,width:c,initialWidth:"600",innerWidth:c,maxWidth:c,height:c,initialHeight:"450",innerHeight:c,maxHeight:c,scalePhotos:e,scrolling:e,inline:c,html:c,iframe:c,photo:c,href:c,title:c,rel:c,opacity:.9,preloading:e,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:c,returnFocus:e,loop:e,slideshow:c,slideshowAuto:e,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:c,onLoad:c,onComplete:c,onCleanup:c,onClosed:c,overlayClose:e,escKey:e,arrowKey:e},r="colorbox",i="cbox",fb=i+"_open",W=i+"_load",V=i+"_complete",N=i+"_cleanup",eb=i+"_closed",Q=i+"_purge",hb=i+"_loaded",E=b.browser.msie&&!b.support.opacity,X=E&&b.browser.version<7,P=i+"_IE6",x,j,A,s,bb,T,R,S,h,n,k,J,K,Z,Y,F,I,H,ab,B,C,y,z,l,g,a,u,D,O=c,d,G=i+"Element";d=b.fn[r]=b[r]=function(c,f){var a=this,d;if(!a[0]&&a.selector)return a;c=c||{};if(f)c.onComplete=f;if(!a[0]||a.selector===undefined){a=b("<a/>");c.open=e}a.each(function(){b.data(this,r,b.extend({},b.data(this,r)||gb,c));b(this).addClass(G)});d=c.open;if(b.isFunction(d))d=d.call(a);d&&db(a[0]);return a};d.init=function(){var l="hover",m="clear:left";n=b(ib);j=f().attr({id:r,"class":E?i+"IE":""});x=f("Overlay",X?"position:absolute":"").hide();A=f("Wrapper");s=f("Content").append(k=f(M,"width:0; height:0; overflow:hidden"),K=f("LoadingOverlay").add(f("LoadingGraphic")),Z=f("Title"),Y=f("Current"),I=f("Next"),H=f("Previous"),F=f("Slideshow").bind(fb,jb),ab=f("Close"));A.append(f().append(f("TopLeft"),bb=f("TopCenter"),f("TopRight")),f(c,m).append(T=f("MiddleLeft"),s,R=f("MiddleRight")),f(c,m).append(f("BottomLeft"),S=f("BottomCenter"),f("BottomRight"))).children().children().css({"float":"left"});J=f(c,"position:absolute; width:9999px; visibility:hidden; display:none");b("body").prepend(x,j.append(A,J));s.children().hover(function(){b(this).addClass(l)},function(){b(this).removeClass(l)}).addClass(l);B=bb.height()+S.height()+s.outerHeight(e)-s.height();C=T.width()+R.width()+s.outerWidth(e)-s.width();y=k.outerHeight(e);z=k.outerWidth(e);j.css({"padding-bottom":B,"padding-right":C}).hide();I.click(d.next);H.click(d.prev);ab.click(d.close);s.children().removeClass(l);b("."+G).live("click",function(a){if(!(a.button!==0&&typeof a.button!=="undefined"||a.ctrlKey||a.shiftKey||a.altKey)){a.preventDefault();db(this)}});x.click(function(){a.overlayClose&&d.close()});b(document).bind("keydown",function(b){if(u&&a.escKey&&b.keyCode===27){b.preventDefault();d.close()}if(u&&a.arrowKey&&!D&&h[1])if(b.keyCode===37&&(g||a.loop)){b.preventDefault();H.click()}else if(b.keyCode===39&&(g<h.length-1||a.loop)){b.preventDefault();I.click()}})};d.remove=function(){j.add(x).remove();b("."+G).die("click").removeData(r).removeClass(G)};d.position=function(f,d){function b(a){bb[0].style.width=S[0].style.width=s[0].style.width=a.style.width;K[0].style.height=K[1].style.height=s[0].style.height=T[0].style.height=R[0].style.height=a.style.height}var e,h=Math.max(document.documentElement.clientHeight-a.h-y-B,0)/2+n.scrollTop(),g=Math.max(n.width()-a.w-z-C,0)/2+n.scrollLeft();e=j.width()===a.w+z&&j.height()===a.h+y?0:f;A[0].style.width=A[0].style.height="9999px";j.dequeue().animate({width:a.w+z,height:a.h+y,top:h,left:g},{duration:e,complete:function(){b(this);D=c;A[0].style.width=a.w+z+C+"px";A[0].style.height=a.h+y+B+"px";d&&d()},step:function(){b(this)}})};d.resize=function(b){if(u){b=b||{};if(b.width)a.w=p(b.width,m)-z-C;if(b.innerWidth)a.w=p(b.innerWidth,m);k.css({width:a.w});if(b.height)a.h=p(b.height,o)-y-B;if(b.innerHeight)a.h=p(b.innerHeight,o);if(!b.innerHeight&&!b.height){b=k.wrapInner("<div style='overflow:auto'></div>").children();a.h=b.height();b.replaceWith(b.children())}k.css({height:a.h});d.position(a.transition===t?0:a.speed)}};d.prep=function(m){var c="hidden";function l(s){var p,f,m,c,l=h.length,q=a.loop;d.position(s,function(){function s(){E&&j[0].style.removeAttribute("filter")}if(u){E&&o&&k.fadeIn(100);k.show();w(hb);Z.show().html(a.title);if(l>1){typeof a.current==="string"&&Y.html(a.current.replace(/\{current\}/,g+1).replace(/\{total\}/,l)).show();I[q||g<l-1?"show":"hide"]().html(a.next);H[q||g?"show":"hide"]().html(a.previous);p=g?h[g-1]:h[l-1];m=g<l-1?h[g+1]:h[0];a.slideshow&&F.show();if(a.preloading){c=b.data(m,r).href||m.href;f=b.data(p,r).href||p.href;c=b.isFunction(c)?c.call(m):c;f=b.isFunction(f)?f.call(p):f;if(U(c))b("<img/>")[0].src=c;if(U(f))b("<img/>")[0].src=f}}K.hide();a.transition==="fade"?j.fadeTo(e,1,function(){s()}):s();n.bind(v+i,function(){d.position(0)});w(V,a.onComplete)}})}if(u){var o,e=a.transition===t?0:a.speed;n.unbind(v+i);k.remove();k=f(M).html(m);k.hide().appendTo(J.show()).css({width:function(){a.w=a.w||k.width();a.w=a.mw&&a.mw<a.w?a.mw:a.w;return a.w}(),overflow:a.scrolling?q:c}).css({height:function(){a.h=a.h||k.height();a.h=a.mh&&a.mh<a.h?a.mh:a.h;return a.h}()}).prependTo(s);J.hide();b("#"+i+"Photo").css({cssFloat:t,marginLeft:q,marginRight:q});X&&b("select").not(j.find("select")).filter(function(){return this.style.visibility!==c}).css({visibility:c}).one(N,function(){this.style.visibility="inherit"});a.transition==="fade"?j.fadeTo(e,0,function(){l(0)}):l(e)}};d.load=function(u){var n,c,s,q=d.prep;D=e;l=h[g];u||(a=cb(b.extend({},b.data(l,r))));w(Q);w(W,a.onLoad);a.h=a.height?p(a.height,o)-y-B:a.innerHeight&&p(a.innerHeight,o);a.w=a.width?p(a.width,m)-z-C:a.innerWidth&&p(a.innerWidth,m);a.mw=a.w;a.mh=a.h;if(a.maxWidth){a.mw=p(a.maxWidth,m)-z-C;a.mw=a.w&&a.w<a.mw?a.w:a.mw}if(a.maxHeight){a.mh=p(a.maxHeight,o)-y-B;a.mh=a.h&&a.h<a.mh?a.h:a.mh}n=a.href;K.show();if(a.inline){f().hide().insertBefore(b(n)[0]).one(Q,function(){b(this).replaceWith(k.children())});q(b(n))}else if(a.iframe){j.one(hb,function(){var c=b("<iframe frameborder='0' style='width:100%; height:100%; border:0; display:block'/>")[0];c.name=i+ +new Date;c.src=a.href;if(!a.scrolling)c.scrolling="no";if(E)c.allowtransparency="true";b(c).appendTo(k).one(Q,function(){c.src="//about:blank"})});q(" ")}else if(a.html)q(a.html);else if(U(n)){c=new Image;c.onload=function(){var e;c.onload=null;c.id=i+"Photo";b(c).css({border:t,display:"block",cssFloat:"left"});if(a.scalePhotos){s=function(){c.height-=c.height*e;c.width-=c.width*e};if(a.mw&&c.width>a.mw){e=(c.width-a.mw)/c.width;s()}if(a.mh&&c.height>a.mh){e=(c.height-a.mh)/c.height;s()}}if(a.h)c.style.marginTop=Math.max(a.h-c.height,0)/2+"px";h[1]&&(g<h.length-1||a.loop)&&b(c).css({cursor:"pointer"}).click(d.next);if(E)c.style.msInterpolationMode="bicubic";setTimeout(function(){q(c)},1)};setTimeout(function(){c.src=n},1)}else n&&J.load(n,function(d,c,a){q(c==="error"?"Request unsuccessful: "+a.statusText:b(this).children())})};d.next=function(){if(!D){g=g<h.length-1?g+1:0;d.load()}};d.prev=function(){if(!D){g=g?g-1:h.length-1;d.load()}};d.close=function(){if(u&&!O){O=e;u=c;w(N,a.onCleanup);n.unbind("."+i+" ."+P);x.fadeTo("fast",0);j.stop().fadeTo("fast",0,function(){w(Q);k.remove();j.add(x).css({opacity:1,cursor:q}).hide();setTimeout(function(){O=c;w(eb,a.onClosed)},1)})}};d.element=function(){return b(l)};d.settings=gb;b(d.init)})(jQuery,this);
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
})(this.jQuery);
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
window.log = function(){
|
24
|
+
log.history = log.history || [];
|
25
|
+
log.history.push(arguments);
|
26
|
+
if(this.console){
|
27
|
+
console.log( Array.prototype.slice.call(arguments) );
|
28
|
+
}
|
29
|
+
};
|
30
|
+
(function(doc){
|
31
|
+
var write = doc.write;
|
32
|
+
doc.write = function(q){
|
33
|
+
log('document.write(): ',arguments);
|
34
|
+
if (/docwriteregexwhitelist/.test(q)) write.apply(doc,arguments);
|
35
|
+
};
|
36
|
+
})(document);
|
37
|
+
|
38
|
+
|
@@ -0,0 +1,59 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
// call PROFILE.show() to show the profileViewer
|
4
|
+
|
5
|
+
var PROFILE = {
|
6
|
+
|
7
|
+
init : function(bool) {
|
8
|
+
|
9
|
+
// define what objects, constructors and functions you want to profile
|
10
|
+
// documentation here: http://developer.yahoo.com/yui/profiler/
|
11
|
+
|
12
|
+
YAHOO.tool.Profiler.registerObject("jQuery", jQuery, true);
|
13
|
+
|
14
|
+
// the following would profile all methods within constructor's prototype
|
15
|
+
// YAHOO.tool.Profiler.registerConstructor("Person");
|
16
|
+
|
17
|
+
// the following would profile the global function sayHi
|
18
|
+
// YAHOO.tool.Profiler.registerFunction("sayHi", window);
|
19
|
+
|
20
|
+
// if true is passed into init(), F9 will bring up the profiler
|
21
|
+
if (bool){
|
22
|
+
$(document).keyup(function(e){
|
23
|
+
if (e.keyCode === 120){
|
24
|
+
PROFILE.show();
|
25
|
+
$(document).unbind('keyup',arguments.callee);
|
26
|
+
}
|
27
|
+
})
|
28
|
+
}
|
29
|
+
},
|
30
|
+
|
31
|
+
//When the showProfile button is clicked, use YUI Loader to get all required
|
32
|
+
//dependencies and then show the profile:
|
33
|
+
show : function() {
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
var s = document.createElement('link');
|
38
|
+
s.setAttribute('rel','stylesheet');
|
39
|
+
s.setAttribute('type','text/css');
|
40
|
+
s.setAttribute('href','js/profiling/yahoo-profiling.css');
|
41
|
+
document.body.appendChild(s);
|
42
|
+
|
43
|
+
YAHOO.util.Dom.addClass(document.body, 'yui-skin-sam');
|
44
|
+
|
45
|
+
//instantiate ProfilerViewer with desired options:
|
46
|
+
var pv = new YAHOO.widget.ProfilerViewer("", {
|
47
|
+
visible: true, //expand the viewer mmediately after instantiation
|
48
|
+
showChart: true,
|
49
|
+
// base:"../../build/",
|
50
|
+
swfUrl: "/swfs/charts.swf"
|
51
|
+
});
|
52
|
+
|
53
|
+
}
|
54
|
+
|
55
|
+
};
|
56
|
+
|
57
|
+
// check some global debug variable to see if we should be profiling..
|
58
|
+
if (true) { PROFILE.init(true) }
|
59
|
+
|