diff --git a/VERSION b/VERSION index ffe1beac..ce563d6b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.3.0 (2012-12-12 21:13:40) rc1 +Version 2.3.0 (2012-12-12 21:30:14) rc1 diff --git a/applications/welcome/models/menu.py b/applications/welcome/models/menu.py index ae2cdbf2..87d300a8 100644 --- a/applications/welcome/models/menu.py +++ b/applications/welcome/models/menu.py @@ -5,6 +5,8 @@ ## Customize your APP title, subtitle and menus here ######################################################################### +response.logo = A(B('web',SPAN(2),'py'),XML('™ '), + _class="brand",_href="http://www.web2py.com/") response.title = ' '.join( word.capitalize() for word in request.application.split('_')) response.subtitle = T('customize me!') @@ -26,11 +28,12 @@ response.menu = [ (T('Home'), False, URL('default', 'index'), []) ] +DEVELOPMENT_MENU = True + ######################################################################### ## provide shortcuts for development. remove in production ######################################################################### - def _(): # shortcuts app = request.application @@ -133,4 +136,4 @@ def _(): ]) ] )] -_() +if DEVELOPMENT_MENU: _() diff --git a/applications/welcome/static/js/analytics.js b/applications/welcome/static/js/analytics.js new file mode 100644 index 00000000..bb8c401f --- /dev/null +++ b/applications/welcome/static/js/analytics.js @@ -0,0 +1,6 @@ +/* + from http://segmentio.github.com/analytics.js/ + Copyright (C) 2012 Segment.io + MIT License + */ +(function(){var e=this,t=!1,n=new Date,r=!1,i=window.onload;window.onload=function(){r=!0,f(i)&&i()};var s=function(e){return Math.floor(new Date(e)/1e3)},o=function(e){if(!e)return;var t={};for(var n in e)t[n]=e[n];return t},u=function(e){return e===Object(e)},a=function(e){return Object.prototype.toString.call(e)==="[object String]"},f=function(e){return Object.prototype.toString.call(e)==="[object Function]"},l=/.+\@.+\..+/,c=function(e,t){if(!a(e)&&!u(e))throw new Error("Encountered unresolvable settings value.");if(a(e)){var n=e;e={},e[t]=n}return e};e.analytics||(e.analytics={providers:[],userId:null,initialize:function(e){var n=[];for(var r in e){if(!h[r])throw new Error("Couldn't find a provider named \""+r+'"');h[r].initialize(e[r]),n.push(h[r])}this.providers=n,t=!0},identify:function(e,n){if(!t)return;u(e)&&(n=e,e=null),e!==null?this.userId=e:e=this.userId;for(var r=0,i;i=this.providers[r];r++){if(!i.identify)continue;var s=o(n);i.identify(e,s)}},track:function(e,n){if(!t)return;for(var r=0,i;i=this.providers[r];r++){if(!i.track)continue;var s=o(n);i.track(e,s)}}});var h={"Google Analytics":{initialize:function(e){this.settings=e=c(e,"trackingId");var t=t||[];t.push(["_setAccount",e.trackingId]);if(this.settings.enhancedLinkAttribution===!0){var n=("https:"==document.location.protocol?"https://ssl.":"http://www.")+"google-analytics.com/plugins/ga/inpage_linkid.js";t.push(["_require","inpage_linkid",n])}this.settings.siteSpeedSampleRate!=null&&typeof this.settings.siteSpeedSampleRate=="number"&&t.push(["_setSiteSpeedSampleRate",this.settings.siteSpeedSampleRate]),t.push(["_trackPageview"]),function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src=("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}(),window._gaq=t},track:function(e,t){window._gaq.push(["_trackEvent","All",e])}},KISSmetrics:{initialize:function(e){function n(e){setTimeout(function(){var t=document,n=t.getElementsByTagName("script")[0],r=t.createElement("script");r.type="text/javascript",r.async=!0,r.src=e,n.parentNode.insertBefore(r,n)},1)}this.settings=e=c(e,"apiKey");var t=t||[];n("//i.kissmetrics.com/i.js"),n("//doug1izaerwt3.cloudfront.net/"+e.apiKey+".1.js"),window._kmq=t},identify:function(e,t){e&&window._kmq.push(["identify",e]),t&&window._kmq.push(["set",t])},track:function(e,t){window._kmq.push(["record",e,t])}},Mixpanel:{initialize:function(e){this.settings=e=c(e,"token"),function(e,t){window.mixpanel=t;var n,r,i,s;n=e.createElement("script"),n.type="text/javascript",n.async=!0,n.src=("https:"===e.location.protocol?"https:":"http:")+"//cdn.mxpnl.com/libs/mixpanel-2.1.min.js",r=e.getElementsByTagName("script")[0],r.parentNode.insertBefore(n,r),t._i=[],t.init=function(e,n,r){function o(e,t){var n=t.split(".");2==n.length&&(e=e[n[0]],t=n[1]),e[t]=function(){e.push([t].concat(Array.prototype.slice.call(arguments,0)))}}var u=t;"undefined"!=typeof r?u=t[r]=[]:r="mixpanel",u.people=u.people||[],i=["disable","track","track_pageview","track_links","track_forms","register","register_once","unregister","identify","name_tag","set_config","people.identify","people.set","people.increment"];for(s=0;s<",s,' onload="var d=',m,";d.getElementsByTagName('head')[0].",a,"(d.",f,"('script')).",c,"='",r,"//",u.l,"'",'"',">"].join("")}var s="body",o=n[s];if(!o)return setTimeout(l,100);u.P(1);var a="appendChild",f="createElement",c="src",h=n[f]("div"),p=h[a](n[f](i)),v=n[f]("iframe"),m="document",g="domain",y;h.style.display="none",o.insertBefore(h,o.firstChild).id=i,v.frameBorder="0",v.id=i+"-loader",/MSIE[ ]+6/.test(navigator.userAgent)&&(v.src="javascript:false"),v.allowTransparency="true",p[a](v);try{v.contentWindow[m].open()}catch(b){e[g]=n[g],y="javascript:var d="+m+".open();d.domain='"+n.domain+"';",v[c]=y+"void(0);"}try{var w=v.contentWindow[m];w.write(t()),w.close()}catch(E){v[c]=y+'d.write("'+t().replace(/"/g,String.fromCharCode(92)+'"')+'");d.close();'}u.P(2)};l()};o()}({loader:"static.olark.com/jsclient/loader0.js",name:"olark",methods:["configure","extend","declare","identify"]}),window.olark.identify(e.siteId)},identify:function(e,t){if(!e)return;window.olark("api.chat.updateVisitorNickname",{snippet:e})},track:function(e,t){if(!this.settings.track)return;window.olark("api.chat.sendNotificationToOperator",{body:'Visitor triggered "'+e+'".'})}},Chartbeat:{initialize:function(e){this.settings=e=c(e,"uid");var t={};t.uid=e.uid,t.domain=e.domain||window.location.host,e.path&&(t.path=e.path),e.title&&(t.title=e.title),e.useCanonical&&(t.useCanonical=e.useCanonical),e.sections&&(t.sections=e.sections),e.authors&&(t.authors=e.authors),e.noCookies&&(t.noCookies=e.noCookies),function(){window._sf_endpt=n.getTime();var e=document.createElement("script");e.setAttribute("language","javascript"),e.setAttribute("type","text/javascript"),e.setAttribute("src",("https:"==document.location.protocol?"https://a248.e.akamai.net/chartbeat.download.akamai.com/102508/":"http://static.chartbeat.com/")+"js/chartbeat.js"),document.body.appendChild(e)}()}}}}).call(this); \ No newline at end of file diff --git a/applications/welcome/views/layout.html b/applications/welcome/views/layout.html index 7bce9bc3..d2fdfa12 100644 --- a/applications/welcome/views/layout.html +++ b/applications/welcome/views/layout.html @@ -76,7 +76,7 @@ - web2py™  + {{=response.logo or ''}}