From 036d7bbb0e3bd351c76fe0f610e61b52a06646e2 Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 29 Nov 2012 02:02:37 +0800 Subject: [PATCH] Module store --- .../images/modulestore/carousel_feature.png | Bin 0 -> 18819 bytes app/assets/images/modulestore/h1_bg.png | Bin 0 -> 2997 bytes app/assets/images/modulestore/left_nav.png | Bin 0 -> 275 bytes app/assets/images/modulestore/right_nav.png | Bin 0 -> 267 bytes .../lib/jquery.cycle.all.latest.js | 1331 +++++++++++++++++ app/assets/stylesheets/modulestore.css | 259 ++++ .../admin/module_store_controller.rb | 11 + .../admin/template_store_controller.rb | 3 + app/views/admin/module_store/index.html.erb | 58 + app/views/admin/module_store/show.html.erb | 97 ++ app/views/admin/sites/_side_bar.html.erb | 3 +- app/views/admin/template_store/index.html.erb | 10 +- app/views/admin/template_store/show.html.erb | 77 + config/routes.rb | 3 + 14 files changed, 1847 insertions(+), 5 deletions(-) create mode 100644 app/assets/images/modulestore/carousel_feature.png create mode 100644 app/assets/images/modulestore/h1_bg.png create mode 100644 app/assets/images/modulestore/left_nav.png create mode 100644 app/assets/images/modulestore/right_nav.png create mode 100644 app/assets/javascripts/lib/jquery.cycle.all.latest.js create mode 100644 app/assets/stylesheets/modulestore.css create mode 100644 app/controllers/admin/module_store_controller.rb create mode 100644 app/views/admin/module_store/index.html.erb create mode 100644 app/views/admin/module_store/show.html.erb create mode 100644 app/views/admin/template_store/show.html.erb diff --git a/app/assets/images/modulestore/carousel_feature.png b/app/assets/images/modulestore/carousel_feature.png new file mode 100644 index 0000000000000000000000000000000000000000..ee38685fb219dff2d8c956e9a67d7d8945b80529 GIT binary patch literal 18819 zcmaHT1yq|+mT+isN^vMw+%>pUT!T9WiUkku))w~`4-_x%ZUu_Fy9A26mE!iNvopJM z_U!!OBqU$nm3QC$-qn`~H5EBbbP{v`0D!3=FRcLpAk@O2KvZP-m8&FWE%-lTHyJ%Q zO-Hbsr>To2K*GY&%#u>U!PLr9!_w5k+j-DZ1ORw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#NUB|rGEq|zFhnZ?0Mg>vO!61Xx+zs6A(_N=sfenMII9X-B4U=L zps^UDCK5JPF)|JEa16Hr0BXaDsW#j?4ZdoQM;6mv=_W=_Lddkl%+#HkHvBr#gerj> zy3Q+Zf?(uj1OUVlH_z~Wvi)_ki9~I;<;GMTqj4SDauG=jn#_?gMYpDU?4(^5L=J%3 zb!2h&i<{dqN~mNaCKJYT30dM|7FW>XikgZbB{d!fVFCb@LjY}$tI5R3mWbIDG9xjw zEoi#uvn^_(dGx3Hv>Bihicsl?9KrG{Luc(-pWBjX9PRL2=^#cGvB}E{qK$D6( z(sGV{r9t4*<|+XI5S}y~->dezsFlXtSs>>C06^fXMXbtt9p!F-tFgg{NC5z9Mf9rn znk(Hi& literal 0 HcmV?d00001 diff --git a/app/assets/images/modulestore/h1_bg.png b/app/assets/images/modulestore/h1_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..c413594c6d779e04bf5685d9fca1229f34351030 GIT binary patch literal 2997 zcmaJ@c|4SB8y=((B}=wwOcO>iOR|h6F=NbRJ+{a?X2#4MW?p8dF_tJ9OC@9}S>hbU zDND)Pi6j*%oZ%dz$kI_FDO4kTqf?#lkFW3j{oeO}p67R6*L~ghbN}(CxH#D<$Z5)f zKp+Jo0p}`?mEu=lX1(~EbAz)Y4jNorFRmL9%#9$isUT|#5JUwNnIsz3l}e&ShIdf+ zfk09ahPxNn%h3T%2AIaAHHMutVI*=0l?x7{(ikiZWcK&l5HN#+fgIZF zh;R(UQt1pr6r1W6<>XF|3L#riAXfXq`}k=;3$-l7-7VTWN}G+ zBNk`JHw7G(LuNC=xD0>=UQ;9m0Y|tPh}h{rB{0Lj%d$9M+azunoKFgaBaIPjC4B=r zI{tqslldLZ;kr`)_4_}CIqs2RRJbdZ0~}$K#TOU6V=Yw}8q21VxB%N707AcY(S;6h z0S+Aq17qFx8Y97n7%U19!TExBbVL(b94?7PrV?=&h*-gx!JwdV7BUeTmF-C` zO+9H|D?QNfWBy6%m)_+AWlNI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>P7bai|G%a z$(Hj7k3*uiqg582gf4bF2e%ne~O%Re|oWH zB4c1VtF2a|rRCo0SSJUyJF_4)jsT5zxE+@=udTS6aO;yj1bM#!3-o4rZK% zDSbUTpRcc;WO}hI?$G*K+LdnQ@#Mm$Uz;sqgJ(K1Enb}_uk3Lz{a)VPTf1<2Fv^;0 zDx)=1fPFiSmEu|L4Brb10BuY{E*ipH2 z8p;yBQHy8aWJ^D(BAuoCw|ib(IyPHSLiZV~$1Yg>l&5$mrpZp3E=k#T%EP+(y+q}# z{J=7|&1j=d(B(J+YB4b`AB4w3S>t` zn`Gd3YmBxGn+LI-l>%v5M?_X&9@rwVHD7YBvV(r^?PuveTD8B#+x`QhQaR+nuVDsk zr{ebXu~)j0h5daiQVXw?k{3btFDw$aUKp4n$3ZhPYnsTp=ZzEW^bb&Uw8kTF=1rGw ze(Wl45#>)EoL1@>j7f`*iJ4Z?AU}^)BS~nI)834vOb)tQtjC@cj8b3TnPLBuP{=Fi zKM(QRudnDlV*NRaHut=G|02!4&sk`i8D8EOLF&A+drWwp@VDX#sTOaib!ws|IFCl7 frC<}|)~SO8m>t>=WYgZR{YVpSop6;lf${$Vu^J$g literal 0 HcmV?d00001 diff --git a/app/assets/images/modulestore/left_nav.png b/app/assets/images/modulestore/left_nav.png new file mode 100644 index 0000000000000000000000000000000000000000..e312ed92a9169781b3f319deaf5edbe39e7190ed GIT binary patch literal 275 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpUtTb?eCAr-gYUO%hlnkdnhxM#giIMu&6?;~?e*dI%`xsQ(TSoeebOlepALGPpQ6SoEbF^bc!TYlSo zf7kb}`)|ee_nFruu73Q!X!E>3zSj?D@%o!SVwf!JuJdT4+ne%QVeg7{g6$GzvL6GK z^9=779uZh>`e@zN#BbS0O#HHr*os;8NjzBNHm7Xg8JWkMKlkSJyuIVAtONxArsV7D W@Cq0tzRLsplEKr}&t;ucLK6T33V3z^ literal 0 HcmV?d00001 diff --git a/app/assets/images/modulestore/right_nav.png b/app/assets/images/modulestore/right_nav.png new file mode 100644 index 0000000000000000000000000000000000000000..df81ea5dcaa26be7095eb03be39faae626fe677a GIT binary patch literal 267 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpUtOP(%{Ar-gYUia5x4UjnYP`m5) zUJtetXD-C~taZG}YAk%@#95zzB8G+wrgTm)eQEe1_tE3pun+&N=31p2bb!DQ;|;AZ z&oR#5abQRGfzJ5rGhRy=tP^g~K2z2+<9Mp;orI0aM>yC;KXz?hSDv(9>E4E0rb+vi z>^9spO=7=aaXjsM$8D?5w|R$`7lb^Xzwx5(gAK>*6L((zpxBrFhda!wH~v6uZ~Ysy zx|ZKk_6Ijy{-J7f<%jW^lHD67OV!`|s`$P2^0xU>Z?@Icy14+sAA9?QCcFY)mt0B# P`i{ZV)z4*}Q$iB}k@tI+ literal 0 HcmV?d00001 diff --git a/app/assets/javascripts/lib/jquery.cycle.all.latest.js b/app/assets/javascripts/lib/jquery.cycle.all.latest.js new file mode 100644 index 00000000..75d7ab98 --- /dev/null +++ b/app/assets/javascripts/lib/jquery.cycle.all.latest.js @@ -0,0 +1,1331 @@ +/*! + * jQuery Cycle Plugin (with Transition Definitions) + * Examples and documentation at: http://jquery.malsup.com/cycle/ + * Copyright (c) 2007-2010 M. Alsup + * Version: 2.88 (08-JUN-2010) + * Dual licensed under the MIT and GPL licenses. + * http://jquery.malsup.com/license.html + * Requires: jQuery v1.2.6 or later + */ +;(function($) { + +var ver = '2.88'; + +// if $.support is not defined (pre jQuery 1.3) add what I need +if ($.support == undefined) { + $.support = { + opacity: !($.browser.msie) + }; +} + +function debug(s) { + if ($.fn.cycle.debug) + log(s); +} +function log() { + if (window.console && window.console.log) + window.console.log('[cycle] ' + Array.prototype.join.call(arguments,' ')); +}; + +// the options arg can be... +// a number - indicates an immediate transition should occur to the given slide index +// a string - 'pause', 'resume', 'toggle', 'next', 'prev', 'stop', 'destroy' or the name of a transition effect (ie, 'fade', 'zoom', etc) +// an object - properties to control the slideshow +// +// the arg2 arg can be... +// the name of an fx (only used in conjunction with a numeric value for 'options') +// the value true (only used in first arg == 'resume') and indicates +// that the resume should occur immediately (not wait for next timeout) + +$.fn.cycle = function(options, arg2) { + var o = { s: this.selector, c: this.context }; + + // in 1.3+ we can fix mistakes with the ready state + if (this.length === 0 && options != 'stop') { + if (!$.isReady && o.s) { + log('DOM not ready, queuing slideshow'); + $(function() { + $(o.s,o.c).cycle(options,arg2); + }); + return this; + } + // is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready() + log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)')); + return this; + } + + // iterate the matched nodeset + return this.each(function() { + var opts = handleArguments(this, options, arg2); + if (opts === false) + return; + + opts.updateActivePagerLink = opts.updateActivePagerLink || $.fn.cycle.updateActivePagerLink; + + // stop existing slideshow for this container (if there is one) + if (this.cycleTimeout) + clearTimeout(this.cycleTimeout); + this.cycleTimeout = this.cyclePause = 0; + + var $cont = $(this); + var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children(); + var els = $slides.get(); + if (els.length < 2) { + log('terminating; too few slides: ' + els.length); + return; + } + + var opts2 = buildOptions($cont, $slides, els, opts, o); + if (opts2 === false) + return; + + var startTime = opts2.continuous ? 10 : getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.rev); + + // if it's an auto slideshow, kick it off + if (startTime) { + startTime += (opts2.delay || 0); + if (startTime < 10) + startTime = 10; + debug('first timeout: ' + startTime); + this.cycleTimeout = setTimeout(function(){go(els,opts2,0,(!opts2.rev && !opts.backwards))}, startTime); + } + }); +}; + +// process the args that were passed to the plugin fn +function handleArguments(cont, options, arg2) { + if (cont.cycleStop == undefined) + cont.cycleStop = 0; + if (options === undefined || options === null) + options = {}; + if (options.constructor == String) { + switch(options) { + case 'destroy': + case 'stop': + var opts = $(cont).data('cycle.opts'); + if (!opts) + return false; + cont.cycleStop++; // callbacks look for change + if (cont.cycleTimeout) + clearTimeout(cont.cycleTimeout); + cont.cycleTimeout = 0; + $(cont).removeData('cycle.opts'); + if (options == 'destroy') + destroy(opts); + return false; + case 'toggle': + cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1; + checkInstantResume(cont.cyclePause, arg2, cont); + return false; + case 'pause': + cont.cyclePause = 1; + return false; + case 'resume': + cont.cyclePause = 0; + checkInstantResume(false, arg2, cont); + return false; + case 'prev': + case 'next': + var opts = $(cont).data('cycle.opts'); + if (!opts) { + log('options not found, "prev/next" ignored'); + return false; + } + $.fn.cycle[options](opts); + return false; + default: + options = { fx: options }; + }; + return options; + } + else if (options.constructor == Number) { + // go to the requested slide + var num = options; + options = $(cont).data('cycle.opts'); + if (!options) { + log('options not found, can not advance slide'); + return false; + } + if (num < 0 || num >= options.elements.length) { + log('invalid slide index: ' + num); + return false; + } + options.nextSlide = num; + if (cont.cycleTimeout) { + clearTimeout(cont.cycleTimeout); + cont.cycleTimeout = 0; + } + if (typeof arg2 == 'string') + options.oneTimeFx = arg2; + go(options.elements, options, 1, num >= options.currSlide); + return false; + } + return options; + + function checkInstantResume(isPaused, arg2, cont) { + if (!isPaused && arg2 === true) { // resume now! + var options = $(cont).data('cycle.opts'); + if (!options) { + log('options not found, can not resume'); + return false; + } + if (cont.cycleTimeout) { + clearTimeout(cont.cycleTimeout); + cont.cycleTimeout = 0; + } + go(options.elements, options, 1, (!opts.rev && !opts.backwards)); + } + } +}; + +function removeFilter(el, opts) { + if (!$.support.opacity && opts.cleartype && el.style.filter) { + try { el.style.removeAttribute('filter'); } + catch(smother) {} // handle old opera versions + } +}; + +// unbind event handlers +function destroy(opts) { + if (opts.next) + $(opts.next).unbind(opts.prevNextEvent); + if (opts.prev) + $(opts.prev).unbind(opts.prevNextEvent); + + if (opts.pager || opts.pagerAnchorBuilder) + $.each(opts.pagerAnchors || [], function() { + this.unbind().remove(); + }); + opts.pagerAnchors = null; + if (opts.destroy) // callback + opts.destroy(opts); +}; + +// one-time initialization +function buildOptions($cont, $slides, els, options, o) { + // support metadata plugin (v1.0 and v2.0) + var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {}); + if (opts.autostop) + opts.countdown = opts.autostopCount || els.length; + + var cont = $cont[0]; + $cont.data('cycle.opts', opts); + opts.$cont = $cont; + opts.stopCount = cont.cycleStop; + opts.elements = els; + opts.before = opts.before ? [opts.before] : []; + opts.after = opts.after ? [opts.after] : []; + opts.after.unshift(function(){ opts.busy=0; }); + + // push some after callbacks + if (!$.support.opacity && opts.cleartype) + opts.after.push(function() { removeFilter(this, opts); }); + if (opts.continuous) + opts.after.push(function() { go(els,opts,0,(!opts.rev && !opts.backwards)); }); + + saveOriginalOpts(opts); + + // clearType corrections + if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg) + clearTypeFix($slides); + + // container requires non-static position so that slides can be position within + if ($cont.css('position') == 'static') + $cont.css('position', 'relative'); + if (opts.width) + $cont.width(opts.width); + if (opts.height && opts.height != 'auto') + $cont.height(opts.height); + + if (opts.startingSlide) + opts.startingSlide = parseInt(opts.startingSlide); + else if (opts.backwards) + opts.startingSlide = els.length - 1; + + // if random, mix up the slide array + if (opts.random) { + opts.randomMap = []; + for (var i = 0; i < els.length; i++) + opts.randomMap.push(i); + opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;}); + opts.randomIndex = 1; + opts.startingSlide = opts.randomMap[1]; + } + else if (opts.startingSlide >= els.length) + opts.startingSlide = 0; // catch bogus input + opts.currSlide = opts.startingSlide || 0; + var first = opts.startingSlide; + + // set position and zIndex on all the slides + $slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) { + var z; + if (opts.backwards) + z = first ? i <= first ? els.length + (i-first) : first-i : els.length-i; + else + z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i; + $(this).css('z-index', z) + }); + + // make sure first slide is visible + $(els[first]).css('opacity',1).show(); // opacity bit needed to handle restart use case + removeFilter(els[first], opts); + + // stretch slides + if (opts.fit && opts.width) + $slides.width(opts.width); + if (opts.fit && opts.height && opts.height != 'auto') + $slides.height(opts.height); + + // stretch container + var reshape = opts.containerResize && !$cont.innerHeight(); + if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9 + var maxw = 0, maxh = 0; + for(var j=0; j < els.length; j++) { + var $e = $(els[j]), e = $e[0], w = $e.outerWidth(), h = $e.outerHeight(); + if (!w) w = e.offsetWidth || e.width || $e.attr('width') + if (!h) h = e.offsetHeight || e.height || $e.attr('height'); + maxw = w > maxw ? w : maxw; + maxh = h > maxh ? h : maxh; + } + if (maxw > 0 && maxh > 0) + $cont.css({width:maxw+'px',height:maxh+'px'}); + } + + if (opts.pause) + $cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;}); + + if (supportMultiTransitions(opts) === false) + return false; + + // apparently a lot of people use image slideshows without height/width attributes on the images. + // Cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that. + var requeue = false; + options.requeueAttempts = options.requeueAttempts || 0; + $slides.each(function() { + // try to get height/width of each slide + var $el = $(this); + this.cycleH = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetHeight || this.height || $el.attr('height') || 0); + this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr('width') || 0); + + if ( $el.is('img') ) { + // sigh.. sniffing, hacking, shrugging... this crappy hack tries to account for what browsers do when + // an image is being downloaded and the markup did not include sizing info (height/width attributes); + // there seems to be some "default" sizes used in this situation + var loadingIE = ($.browser.msie && this.cycleW == 28 && this.cycleH == 30 && !this.complete); + var loadingFF = ($.browser.mozilla && this.cycleW == 34 && this.cycleH == 19 && !this.complete); + var loadingOp = ($.browser.opera && ((this.cycleW == 42 && this.cycleH == 19) || (this.cycleW == 37 && this.cycleH == 17)) && !this.complete); + var loadingOther = (this.cycleH == 0 && this.cycleW == 0 && !this.complete); + // don't requeue for images that are still loading but have a valid size + if (loadingIE || loadingFF || loadingOp || loadingOther) { + if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever + log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH); + setTimeout(function() {$(o.s,o.c).cycle(options)}, opts.requeueTimeout); + requeue = true; + return false; // break each loop + } + else { + log('could not determine size of image: '+this.src, this.cycleW, this.cycleH); + } + } + } + return true; + }); + + if (requeue) + return false; + + opts.cssBefore = opts.cssBefore || {}; + opts.animIn = opts.animIn || {}; + opts.animOut = opts.animOut || {}; + + $slides.not(':eq('+first+')').css(opts.cssBefore); + if (opts.cssFirst) + $($slides[first]).css(opts.cssFirst); + + if (opts.timeout) { + opts.timeout = parseInt(opts.timeout); + // ensure that timeout and speed settings are sane + if (opts.speed.constructor == String) + opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed); + if (!opts.sync) + opts.speed = opts.speed / 2; + + var buffer = opts.fx == 'shuffle' ? 500 : 250; + while((opts.timeout - opts.speed) < buffer) // sanitize timeout + opts.timeout += opts.speed; + } + if (opts.easing) + opts.easeIn = opts.easeOut = opts.easing; + if (!opts.speedIn) + opts.speedIn = opts.speed; + if (!opts.speedOut) + opts.speedOut = opts.speed; + + opts.slideCount = els.length; + opts.currSlide = opts.lastSlide = first; + if (opts.random) { + if (++opts.randomIndex == els.length) + opts.randomIndex = 0; + opts.nextSlide = opts.randomMap[opts.randomIndex]; + } + else if (opts.backwards) + opts.nextSlide = opts.startingSlide == 0 ? (els.length-1) : opts.startingSlide-1; + else + opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1; + + // run transition init fn + if (!opts.multiFx) { + var init = $.fn.cycle.transitions[opts.fx]; + if ($.isFunction(init)) + init($cont, $slides, opts); + else if (opts.fx != 'custom' && !opts.multiFx) { + log('unknown transition: ' + opts.fx,'; slideshow terminating'); + return false; + } + } + + // fire artificial events + var e0 = $slides[first]; + if (opts.before.length) + opts.before[0].apply(e0, [e0, e0, opts, true]); + if (opts.after.length > 1) + opts.after[1].apply(e0, [e0, e0, opts, true]); + + if (opts.next) + $(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?-1:1)}); + if (opts.prev) + $(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?1:-1)}); + if (opts.pager || opts.pagerAnchorBuilder) + buildPager(els,opts); + + exposeAddSlide(opts, els); + + return opts; +}; + +// save off original opts so we can restore after clearing state +function saveOriginalOpts(opts) { + opts.original = { before: [], after: [] }; + opts.original.cssBefore = $.extend({}, opts.cssBefore); + opts.original.cssAfter = $.extend({}, opts.cssAfter); + opts.original.animIn = $.extend({}, opts.animIn); + opts.original.animOut = $.extend({}, opts.animOut); + $.each(opts.before, function() { opts.original.before.push(this); }); + $.each(opts.after, function() { opts.original.after.push(this); }); +}; + +function supportMultiTransitions(opts) { + var i, tx, txs = $.fn.cycle.transitions; + // look for multiple effects + if (opts.fx.indexOf(',') > 0) { + opts.multiFx = true; + opts.fxs = opts.fx.replace(/\s*/g,'').split(','); + // discard any bogus effect names + for (i=0; i < opts.fxs.length; i++) { + var fx = opts.fxs[i]; + tx = txs[fx]; + if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) { + log('discarding unknown transition: ',fx); + opts.fxs.splice(i,1); + i--; + } + } + // if we have an empty list then we threw everything away! + if (!opts.fxs.length) { + log('No valid transitions named; slideshow terminating.'); + return false; + } + } + else if (opts.fx == 'all') { // auto-gen the list of transitions + opts.multiFx = true; + opts.fxs = []; + for (p in txs) { + tx = txs[p]; + if (txs.hasOwnProperty(p) && $.isFunction(tx)) + opts.fxs.push(p); + } + } + if (opts.multiFx && opts.randomizeEffects) { + // munge the fxs array to make effect selection random + var r1 = Math.floor(Math.random() * 20) + 30; + for (i = 0; i < r1; i++) { + var r2 = Math.floor(Math.random() * opts.fxs.length); + opts.fxs.push(opts.fxs.splice(r2,1)[0]); + } + debug('randomized fx sequence: ',opts.fxs); + } + return true; +}; + +// provide a mechanism for adding slides after the slideshow has started +function exposeAddSlide(opts, els) { + opts.addSlide = function(newSlide, prepend) { + var $s = $(newSlide), s = $s[0]; + if (!opts.autostopCount) + opts.countdown++; + els[prepend?'unshift':'push'](s); + if (opts.els) + opts.els[prepend?'unshift':'push'](s); // shuffle needs this + opts.slideCount = els.length; + + $s.css('position','absolute'); + $s[prepend?'prependTo':'appendTo'](opts.$cont); + + if (prepend) { + opts.currSlide++; + opts.nextSlide++; + } + + if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg) + clearTypeFix($s); + + if (opts.fit && opts.width) + $s.width(opts.width); + if (opts.fit && opts.height && opts.height != 'auto') + $slides.height(opts.height); + s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height(); + s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width(); + + $s.css(opts.cssBefore); + + if (opts.pager || opts.pagerAnchorBuilder) + $.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts); + + if ($.isFunction(opts.onAddSlide)) + opts.onAddSlide($s); + else + $s.hide(); // default behavior + }; +} + +// reset internal state; we do this on every pass in order to support multiple effects +$.fn.cycle.resetState = function(opts, fx) { + fx = fx || opts.fx; + opts.before = []; opts.after = []; + opts.cssBefore = $.extend({}, opts.original.cssBefore); + opts.cssAfter = $.extend({}, opts.original.cssAfter); + opts.animIn = $.extend({}, opts.original.animIn); + opts.animOut = $.extend({}, opts.original.animOut); + opts.fxFn = null; + $.each(opts.original.before, function() { opts.before.push(this); }); + $.each(opts.original.after, function() { opts.after.push(this); }); + + // re-init + var init = $.fn.cycle.transitions[fx]; + if ($.isFunction(init)) + init(opts.$cont, $(opts.elements), opts); +}; + +// this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt +function go(els, opts, manual, fwd) { + // opts.busy is true if we're in the middle of an animation + if (manual && opts.busy && opts.manualTrump) { + // let manual transitions requests trump active ones + debug('manualTrump in go(), stopping active transition'); + $(els).stop(true,true); + opts.busy = false; + } + // don't begin another timeout-based transition if there is one active + if (opts.busy) { + debug('transition active, ignoring new tx request'); + return; + } + + var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide]; + + // stop cycling if we have an outstanding stop request + if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual) + return; + + // check to see if we should stop cycling based on autostop options + if (!manual && !p.cyclePause && !opts.bounce && + ((opts.autostop && (--opts.countdown <= 0)) || + (opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) { + if (opts.end) + opts.end(opts); + return; + } + + // if slideshow is paused, only transition on a manual trigger + var changed = false; + if ((manual || !p.cyclePause) && (opts.nextSlide != opts.currSlide)) { + changed = true; + var fx = opts.fx; + // keep trying to get the slide size if we don't have it yet + curr.cycleH = curr.cycleH || $(curr).height(); + curr.cycleW = curr.cycleW || $(curr).width(); + next.cycleH = next.cycleH || $(next).height(); + next.cycleW = next.cycleW || $(next).width(); + + // support multiple transition types + if (opts.multiFx) { + if (opts.lastFx == undefined || ++opts.lastFx >= opts.fxs.length) + opts.lastFx = 0; + fx = opts.fxs[opts.lastFx]; + opts.currFx = fx; + } + + // one-time fx overrides apply to: $('div').cycle(3,'zoom'); + if (opts.oneTimeFx) { + fx = opts.oneTimeFx; + opts.oneTimeFx = null; + } + + $.fn.cycle.resetState(opts, fx); + + // run the before callbacks + if (opts.before.length) + $.each(opts.before, function(i,o) { + if (p.cycleStop != opts.stopCount) return; + o.apply(next, [curr, next, opts, fwd]); + }); + + // stage the after callacks + var after = function() { + $.each(opts.after, function(i,o) { + if (p.cycleStop != opts.stopCount) return; + o.apply(next, [curr, next, opts, fwd]); + }); + }; + + debug('tx firing; currSlide: ' + opts.currSlide + '; nextSlide: ' + opts.nextSlide); + + // get ready to perform the transition + opts.busy = 1; + if (opts.fxFn) // fx function provided? + opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent); + else if ($.isFunction($.fn.cycle[opts.fx])) // fx plugin ? + $.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastOnEvent); + else + $.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent); + } + + if (changed || opts.nextSlide == opts.currSlide) { + // calculate the next slide + opts.lastSlide = opts.currSlide; + if (opts.random) { + opts.currSlide = opts.nextSlide; + if (++opts.randomIndex == els.length) + opts.randomIndex = 0; + opts.nextSlide = opts.randomMap[opts.randomIndex]; + if (opts.nextSlide == opts.currSlide) + opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1; + } + else if (opts.backwards) { + var roll = (opts.nextSlide - 1) < 0; + if (roll && opts.bounce) { + opts.backwards = !opts.backwards; + opts.nextSlide = 1; + opts.currSlide = 0; + } + else { + opts.nextSlide = roll ? (els.length-1) : opts.nextSlide-1; + opts.currSlide = roll ? 0 : opts.nextSlide+1; + } + } + else { // sequence + var roll = (opts.nextSlide + 1) == els.length; + if (roll && opts.bounce) { + opts.backwards = !opts.backwards; + opts.nextSlide = els.length-2; + opts.currSlide = els.length-1; + } + else { + opts.nextSlide = roll ? 0 : opts.nextSlide+1; + opts.currSlide = roll ? els.length-1 : opts.nextSlide-1; + } + } + } + if (changed && opts.pager) + opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass); + + // stage the next transition + var ms = 0; + if (opts.timeout && !opts.continuous) + ms = getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd); + else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic + ms = 10; + if (ms > 0) + p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, (!opts.rev && !opts.backwards)) }, ms); +}; + +// invoked after transition +$.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) { + $(pager).each(function() { + $(this).children().removeClass(clsName).eq(currSlide).addClass(clsName); + }); +}; + +// calculate timeout value for current transition +function getTimeout(curr, next, opts, fwd) { + if (opts.timeoutFn) { + // call user provided calc fn + var t = opts.timeoutFn.call(curr,curr,next,opts,fwd); + while ((t - opts.speed) < 250) // sanitize timeout + t += opts.speed; + debug('calculated timeout: ' + t + '; speed: ' + opts.speed); + if (t !== false) + return t; + } + return opts.timeout; +}; + +// expose next/prev function, caller must pass in state +$.fn.cycle.next = function(opts) { advance(opts, opts.rev?-1:1); }; +$.fn.cycle.prev = function(opts) { advance(opts, opts.rev?1:-1);}; + +// advance slide forward or back +function advance(opts, val) { + var els = opts.elements; + var p = opts.$cont[0], timeout = p.cycleTimeout; + if (timeout) { + clearTimeout(timeout); + p.cycleTimeout = 0; + } + if (opts.random && val < 0) { + // move back to the previously display slide + opts.randomIndex--; + if (--opts.randomIndex == -2) + opts.randomIndex = els.length-2; + else if (opts.randomIndex == -1) + opts.randomIndex = els.length-1; + opts.nextSlide = opts.randomMap[opts.randomIndex]; + } + else if (opts.random) { + opts.nextSlide = opts.randomMap[opts.randomIndex]; + } + else { + opts.nextSlide = opts.currSlide + val; + if (opts.nextSlide < 0) { + if (opts.nowrap) return false; + opts.nextSlide = els.length - 1; + } + else if (opts.nextSlide >= els.length) { + if (opts.nowrap) return false; + opts.nextSlide = 0; + } + } + + var cb = opts.onPrevNextEvent || opts.prevNextClick; // prevNextClick is deprecated + if ($.isFunction(cb)) + cb(val > 0, opts.nextSlide, els[opts.nextSlide]); + go(els, opts, 1, val>=0); + return false; +}; + +function buildPager(els, opts) { + var $p = $(opts.pager); + $.each(els, function(i,o) { + $.fn.cycle.createPagerAnchor(i,o,$p,els,opts); + }); + opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass); +}; + +$.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) { + var a; + if ($.isFunction(opts.pagerAnchorBuilder)) { + a = opts.pagerAnchorBuilder(i,el); + debug('pagerAnchorBuilder('+i+', el) returned: ' + a); + } + else + a = ''+(i+1)+''; + + if (!a) + return; + var $a = $(a); + // don't reparent if anchor is in the dom + if ($a.parents('body').length === 0) { + var arr = []; + if ($p.length > 1) { + $p.each(function() { + var $clone = $a.clone(true); + $(this).append($clone); + arr.push($clone[0]); + }); + $a = $(arr); + } + else { + $a.appendTo($p); + } + } + + opts.pagerAnchors = opts.pagerAnchors || []; + opts.pagerAnchors.push($a); + $a.bind(opts.pagerEvent, function(e) { + e.preventDefault(); + opts.nextSlide = i; + var p = opts.$cont[0], timeout = p.cycleTimeout; + if (timeout) { + clearTimeout(timeout); + p.cycleTimeout = 0; + } + var cb = opts.onPagerEvent || opts.pagerClick; // pagerClick is deprecated + if ($.isFunction(cb)) + cb(opts.nextSlide, els[opts.nextSlide]); + go(els,opts,1,opts.currSlide < i); // trigger the trans +// return false; // <== allow bubble + }); + + if ( ! /^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble) + $a.bind('click.cycle', function(){return false;}); // suppress click + + if (opts.pauseOnPagerHover) + $a.hover(function() { opts.$cont[0].cyclePause++; }, function() { opts.$cont[0].cyclePause--; } ); +}; + +// helper fn to calculate the number of slides between the current and the next +$.fn.cycle.hopsFromLast = function(opts, fwd) { + var hops, l = opts.lastSlide, c = opts.currSlide; + if (fwd) + hops = c > l ? c - l : opts.slideCount - l; + else + hops = c < l ? l - c : l + opts.slideCount - c; + return hops; +}; + +// fix clearType problems in ie6 by setting an explicit bg color +// (otherwise text slides look horrible during a fade transition) +function clearTypeFix($slides) { + debug('applying clearType background-color hack'); + function hex(s) { + s = parseInt(s).toString(16); + return s.length < 2 ? '0'+s : s; + }; + function getBg(e) { + for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) { + var v = $.css(e,'background-color'); + if (v.indexOf('rgb') >= 0 ) { + var rgb = v.match(/\d+/g); + return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]); + } + if (v && v != 'transparent') + return v; + } + return '#ffffff'; + }; + $slides.each(function() { $(this).css('background-color', getBg(this)); }); +}; + +// reset common props before the next transition +$.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) { + $(opts.elements).not(curr).hide(); + opts.cssBefore.opacity = 1; + opts.cssBefore.display = 'block'; + if (w !== false && next.cycleW > 0) + opts.cssBefore.width = next.cycleW; + if (h !== false && next.cycleH > 0) + opts.cssBefore.height = next.cycleH; + opts.cssAfter = opts.cssAfter || {}; + opts.cssAfter.display = 'none'; + $(curr).css('zIndex',opts.slideCount + (rev === true ? 1 : 0)); + $(next).css('zIndex',opts.slideCount + (rev === true ? 0 : 1)); +}; + +// the actual fn for effecting a transition +$.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedOverride) { + var $l = $(curr), $n = $(next); + var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut; + $n.css(opts.cssBefore); + if (speedOverride) { + if (typeof speedOverride == 'number') + speedIn = speedOut = speedOverride; + else + speedIn = speedOut = 1; + easeIn = easeOut = null; + } + var fn = function() {$n.animate(opts.animIn, speedIn, easeIn, cb)}; + $l.animate(opts.animOut, speedOut, easeOut, function() { + if (opts.cssAfter) $l.css(opts.cssAfter); + if (!opts.sync) fn(); + }); + if (opts.sync) fn(); +}; + +// transition definitions - only fade is defined here, transition pack defines the rest +$.fn.cycle.transitions = { + fade: function($cont, $slides, opts) { + $slides.not(':eq('+opts.currSlide+')').css('opacity',0); + opts.before.push(function(curr,next,opts) { + $.fn.cycle.commonReset(curr,next,opts); + opts.cssBefore.opacity = 0; + }); + opts.animIn = { opacity: 1 }; + opts.animOut = { opacity: 0 }; + opts.cssBefore = { top: 0, left: 0 }; + } +}; + +$.fn.cycle.ver = function() { return ver; }; + +// override these globally if you like (they are all optional) +$.fn.cycle.defaults = { + fx: 'fade', // name of transition effect (or comma separated names, ex: 'fade,scrollUp,shuffle') + timeout: 4000, // milliseconds between slide transitions (0 to disable auto advance) + timeoutFn: null, // callback for determining per-slide timeout value: function(currSlideElement, nextSlideElement, options, forwardFlag) + continuous: 0, // true to start next transition immediately after current one completes + speed: 1000, // speed of the transition (any valid fx speed value) + speedIn: null, // speed of the 'in' transition + speedOut: null, // speed of the 'out' transition + next: null, // selector for element to use as event trigger for next slide + prev: null, // selector for element to use as event trigger for previous slide +// prevNextClick: null, // @deprecated; please use onPrevNextEvent instead + onPrevNextEvent: null, // callback fn for prev/next events: function(isNext, zeroBasedSlideIndex, slideElement) + prevNextEvent:'click.cycle',// event which drives the manual transition to the previous or next slide + pager: null, // selector for element to use as pager container + //pagerClick null, // @deprecated; please use onPagerEvent instead + onPagerEvent: null, // callback fn for pager events: function(zeroBasedSlideIndex, slideElement) + pagerEvent: 'click.cycle', // name of event which drives the pager navigation + allowPagerClickBubble: false, // allows or prevents click event on pager anchors from bubbling + pagerAnchorBuilder: null, // callback fn for building anchor links: function(index, DOMelement) + before: null, // transition callback (scope set to element to be shown): function(currSlideElement, nextSlideElement, options, forwardFlag) + after: null, // transition callback (scope set to element that was shown): function(currSlideElement, nextSlideElement, options, forwardFlag) + end: null, // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options) + easing: null, // easing method for both in and out transitions + easeIn: null, // easing for "in" transition + easeOut: null, // easing for "out" transition + shuffle: null, // coords for shuffle animation, ex: { top:15, left: 200 } + animIn: null, // properties that define how the slide animates in + animOut: null, // properties that define how the slide animates out + cssBefore: null, // properties that define the initial state of the slide before transitioning in + cssAfter: null, // properties that defined the state of the slide after transitioning out + fxFn: null, // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag) + height: 'auto', // container height + startingSlide: 0, // zero-based index of the first slide to be displayed + sync: 1, // true if in/out transitions should occur simultaneously + random: 0, // true for random, false for sequence (not applicable to shuffle fx) + fit: 0, // force slides to fit container + containerResize: 1, // resize container to fit largest slide + pause: 0, // true to enable "pause on hover" + pauseOnPagerHover: 0, // true to pause when hovering over pager link + autostop: 0, // true to end slideshow after X transitions (where X == slide count) + autostopCount: 0, // number of transitions (optionally used with autostop to define X) + delay: 0, // additional delay (in ms) for first transition (hint: can be negative) + slideExpr: null, // expression for selecting slides (if something other than all children is required) + cleartype: !$.support.opacity, // true if clearType corrections should be applied (for IE) + cleartypeNoBg: false, // set to true to disable extra cleartype fixing (leave false to force background color setting on slides) + nowrap: 0, // true to prevent slideshow from wrapping + fastOnEvent: 0, // force fast transitions when triggered manually (via pager or prev/next); value == time in ms + randomizeEffects: 1, // valid when multiple effects are used; true to make the effect sequence random + rev: 0, // causes animations to transition in reverse + manualTrump: true, // causes manual transition to stop an active transition instead of being ignored + requeueOnImageNotLoaded: true, // requeue the slideshow if any image slides are not yet loaded + requeueTimeout: 250, // ms delay for requeue + activePagerClass: 'activeSlide', // class name used for the active pager link + updateActivePagerLink: null, // callback fn invoked to update the active pager link (adds/removes activePagerClass style) + backwards: false // true to start slideshow at last slide and move backwards through the stack +}; + +})(jQuery); + + +/*! + * jQuery Cycle Plugin Transition Definitions + * This script is a plugin for the jQuery Cycle Plugin + * Examples and documentation at: http://malsup.com/jquery/cycle/ + * Copyright (c) 2007-2010 M. Alsup + * Version: 2.72 + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + */ +(function($) { + +// +// These functions define one-time slide initialization for the named +// transitions. To save file size feel free to remove any of these that you +// don't need. +// +$.fn.cycle.transitions.none = function($cont, $slides, opts) { + opts.fxFn = function(curr,next,opts,after){ + $(next).show(); + $(curr).hide(); + after(); + }; +} + +// scrollUp/Down/Left/Right +$.fn.cycle.transitions.scrollUp = function($cont, $slides, opts) { + $cont.css('overflow','hidden'); + opts.before.push($.fn.cycle.commonReset); + var h = $cont.height(); + opts.cssBefore ={ top: h, left: 0 }; + opts.cssFirst = { top: 0 }; + opts.animIn = { top: 0 }; + opts.animOut = { top: -h }; +}; +$.fn.cycle.transitions.scrollDown = function($cont, $slides, opts) { + $cont.css('overflow','hidden'); + opts.before.push($.fn.cycle.commonReset); + var h = $cont.height(); + opts.cssFirst = { top: 0 }; + opts.cssBefore= { top: -h, left: 0 }; + opts.animIn = { top: 0 }; + opts.animOut = { top: h }; +}; +$.fn.cycle.transitions.scrollLeft = function($cont, $slides, opts) { + $cont.css('overflow','hidden'); + opts.before.push($.fn.cycle.commonReset); + var w = $cont.width(); + opts.cssFirst = { left: 0 }; + opts.cssBefore= { left: w, top: 0 }; + opts.animIn = { left: 0 }; + opts.animOut = { left: 0-w }; +}; +$.fn.cycle.transitions.scrollRight = function($cont, $slides, opts) { + $cont.css('overflow','hidden'); + opts.before.push($.fn.cycle.commonReset); + var w = $cont.width(); + opts.cssFirst = { left: 0 }; + opts.cssBefore= { left: -w, top: 0 }; + opts.animIn = { left: 0 }; + opts.animOut = { left: w }; +}; +$.fn.cycle.transitions.scrollHorz = function($cont, $slides, opts) { + $cont.css('overflow','hidden').width(); + opts.before.push(function(curr, next, opts, fwd) { + $.fn.cycle.commonReset(curr,next,opts); + opts.cssBefore.left = fwd ? (next.cycleW-1) : (1-next.cycleW); + opts.animOut.left = fwd ? -curr.cycleW : curr.cycleW; + }); + opts.cssFirst = { left: 0 }; + opts.cssBefore= { top: 0 }; + opts.animIn = { left: 0 }; + opts.animOut = { top: 0 }; +}; +$.fn.cycle.transitions.scrollVert = function($cont, $slides, opts) { + $cont.css('overflow','hidden'); + opts.before.push(function(curr, next, opts, fwd) { + $.fn.cycle.commonReset(curr,next,opts); + opts.cssBefore.top = fwd ? (1-next.cycleH) : (next.cycleH-1); + opts.animOut.top = fwd ? curr.cycleH : -curr.cycleH; + }); + opts.cssFirst = { top: 0 }; + opts.cssBefore= { left: 0 }; + opts.animIn = { top: 0 }; + opts.animOut = { left: 0 }; +}; + +// slideX/slideY +$.fn.cycle.transitions.slideX = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $(opts.elements).not(curr).hide(); + $.fn.cycle.commonReset(curr,next,opts,false,true); + opts.animIn.width = next.cycleW; + }); + opts.cssBefore = { left: 0, top: 0, width: 0 }; + opts.animIn = { width: 'show' }; + opts.animOut = { width: 0 }; +}; +$.fn.cycle.transitions.slideY = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $(opts.elements).not(curr).hide(); + $.fn.cycle.commonReset(curr,next,opts,true,false); + opts.animIn.height = next.cycleH; + }); + opts.cssBefore = { left: 0, top: 0, height: 0 }; + opts.animIn = { height: 'show' }; + opts.animOut = { height: 0 }; +}; + +// shuffle +$.fn.cycle.transitions.shuffle = function($cont, $slides, opts) { + var i, w = $cont.css('overflow', 'visible').width(); + $slides.css({left: 0, top: 0}); + opts.before.push(function(curr,next,opts) { + $.fn.cycle.commonReset(curr,next,opts,true,true,true); + }); + // only adjust speed once! + if (!opts.speedAdjusted) { + opts.speed = opts.speed / 2; // shuffle has 2 transitions + opts.speedAdjusted = true; + } + opts.random = 0; + opts.shuffle = opts.shuffle || {left:-w, top:15}; + opts.els = []; + for (i=0; i < $slides.length; i++) + opts.els.push($slides[i]); + + for (i=0; i < opts.currSlide; i++) + opts.els.push(opts.els.shift()); + + // custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!) + opts.fxFn = function(curr, next, opts, cb, fwd) { + var $el = fwd ? $(curr) : $(next); + $(next).css(opts.cssBefore); + var count = opts.slideCount; + $el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() { + var hops = $.fn.cycle.hopsFromLast(opts, fwd); + for (var k=0; k < hops; k++) + fwd ? opts.els.push(opts.els.shift()) : opts.els.unshift(opts.els.pop()); + if (fwd) { + for (var i=0, len=opts.els.length; i < len; i++) + $(opts.els[i]).css('z-index', len-i+count); + } + else { + var z = $(curr).css('z-index'); + $el.css('z-index', parseInt(z)+1+count); + } + $el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function() { + $(fwd ? this : curr).hide(); + if (cb) cb(); + }); + }); + }; + opts.cssBefore = { display: 'block', opacity: 1, top: 0, left: 0 }; +}; + +// turnUp/Down/Left/Right +$.fn.cycle.transitions.turnUp = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,true,false); + opts.cssBefore.top = next.cycleH; + opts.animIn.height = next.cycleH; + }); + opts.cssFirst = { top: 0 }; + opts.cssBefore = { left: 0, height: 0 }; + opts.animIn = { top: 0 }; + opts.animOut = { height: 0 }; +}; +$.fn.cycle.transitions.turnDown = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,true,false); + opts.animIn.height = next.cycleH; + opts.animOut.top = curr.cycleH; + }); + opts.cssFirst = { top: 0 }; + opts.cssBefore = { left: 0, top: 0, height: 0 }; + opts.animOut = { height: 0 }; +}; +$.fn.cycle.transitions.turnLeft = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,false,true); + opts.cssBefore.left = next.cycleW; + opts.animIn.width = next.cycleW; + }); + opts.cssBefore = { top: 0, width: 0 }; + opts.animIn = { left: 0 }; + opts.animOut = { width: 0 }; +}; +$.fn.cycle.transitions.turnRight = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,false,true); + opts.animIn.width = next.cycleW; + opts.animOut.left = curr.cycleW; + }); + opts.cssBefore = { top: 0, left: 0, width: 0 }; + opts.animIn = { left: 0 }; + opts.animOut = { width: 0 }; +}; + +// zoom +$.fn.cycle.transitions.zoom = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,false,false,true); + opts.cssBefore.top = next.cycleH/2; + opts.cssBefore.left = next.cycleW/2; + opts.animIn = { top: 0, left: 0, width: next.cycleW, height: next.cycleH }; + opts.animOut = { width: 0, height: 0, top: curr.cycleH/2, left: curr.cycleW/2 }; + }); + opts.cssFirst = { top:0, left: 0 }; + opts.cssBefore = { width: 0, height: 0 }; +}; + +// fadeZoom +$.fn.cycle.transitions.fadeZoom = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,false,false); + opts.cssBefore.left = next.cycleW/2; + opts.cssBefore.top = next.cycleH/2; + opts.animIn = { top: 0, left: 0, width: next.cycleW, height: next.cycleH }; + }); + opts.cssBefore = { width: 0, height: 0 }; + opts.animOut = { opacity: 0 }; +}; + +// blindX +$.fn.cycle.transitions.blindX = function($cont, $slides, opts) { + var w = $cont.css('overflow','hidden').width(); + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts); + opts.animIn.width = next.cycleW; + opts.animOut.left = curr.cycleW; + }); + opts.cssBefore = { left: w, top: 0 }; + opts.animIn = { left: 0 }; + opts.animOut = { left: w }; +}; +// blindY +$.fn.cycle.transitions.blindY = function($cont, $slides, opts) { + var h = $cont.css('overflow','hidden').height(); + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts); + opts.animIn.height = next.cycleH; + opts.animOut.top = curr.cycleH; + }); + opts.cssBefore = { top: h, left: 0 }; + opts.animIn = { top: 0 }; + opts.animOut = { top: h }; +}; +// blindZ +$.fn.cycle.transitions.blindZ = function($cont, $slides, opts) { + var h = $cont.css('overflow','hidden').height(); + var w = $cont.width(); + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts); + opts.animIn.height = next.cycleH; + opts.animOut.top = curr.cycleH; + }); + opts.cssBefore = { top: h, left: w }; + opts.animIn = { top: 0, left: 0 }; + opts.animOut = { top: h, left: w }; +}; + +// growX - grow horizontally from centered 0 width +$.fn.cycle.transitions.growX = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,false,true); + opts.cssBefore.left = this.cycleW/2; + opts.animIn = { left: 0, width: this.cycleW }; + opts.animOut = { left: 0 }; + }); + opts.cssBefore = { width: 0, top: 0 }; +}; +// growY - grow vertically from centered 0 height +$.fn.cycle.transitions.growY = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,true,false); + opts.cssBefore.top = this.cycleH/2; + opts.animIn = { top: 0, height: this.cycleH }; + opts.animOut = { top: 0 }; + }); + opts.cssBefore = { height: 0, left: 0 }; +}; + +// curtainX - squeeze in both edges horizontally +$.fn.cycle.transitions.curtainX = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,false,true,true); + opts.cssBefore.left = next.cycleW/2; + opts.animIn = { left: 0, width: this.cycleW }; + opts.animOut = { left: curr.cycleW/2, width: 0 }; + }); + opts.cssBefore = { top: 0, width: 0 }; +}; +// curtainY - squeeze in both edges vertically +$.fn.cycle.transitions.curtainY = function($cont, $slides, opts) { + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,true,false,true); + opts.cssBefore.top = next.cycleH/2; + opts.animIn = { top: 0, height: next.cycleH }; + opts.animOut = { top: curr.cycleH/2, height: 0 }; + }); + opts.cssBefore = { left: 0, height: 0 }; +}; + +// cover - curr slide covered by next slide +$.fn.cycle.transitions.cover = function($cont, $slides, opts) { + var d = opts.direction || 'left'; + var w = $cont.css('overflow','hidden').width(); + var h = $cont.height(); + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts); + if (d == 'right') + opts.cssBefore.left = -w; + else if (d == 'up') + opts.cssBefore.top = h; + else if (d == 'down') + opts.cssBefore.top = -h; + else + opts.cssBefore.left = w; + }); + opts.animIn = { left: 0, top: 0}; + opts.animOut = { opacity: 1 }; + opts.cssBefore = { top: 0, left: 0 }; +}; + +// uncover - curr slide moves off next slide +$.fn.cycle.transitions.uncover = function($cont, $slides, opts) { + var d = opts.direction || 'left'; + var w = $cont.css('overflow','hidden').width(); + var h = $cont.height(); + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,true,true,true); + if (d == 'right') + opts.animOut.left = w; + else if (d == 'up') + opts.animOut.top = -h; + else if (d == 'down') + opts.animOut.top = h; + else + opts.animOut.left = -w; + }); + opts.animIn = { left: 0, top: 0 }; + opts.animOut = { opacity: 1 }; + opts.cssBefore = { top: 0, left: 0 }; +}; + +// toss - move top slide and fade away +$.fn.cycle.transitions.toss = function($cont, $slides, opts) { + var w = $cont.css('overflow','visible').width(); + var h = $cont.height(); + opts.before.push(function(curr, next, opts) { + $.fn.cycle.commonReset(curr,next,opts,true,true,true); + // provide default toss settings if animOut not provided + if (!opts.animOut.left && !opts.animOut.top) + opts.animOut = { left: w*2, top: -h/2, opacity: 0 }; + else + opts.animOut.opacity = 0; + }); + opts.cssBefore = { left: 0, top: 0 }; + opts.animIn = { left: 0 }; +}; + +// wipe - clip animation +$.fn.cycle.transitions.wipe = function($cont, $slides, opts) { + var w = $cont.css('overflow','hidden').width(); + var h = $cont.height(); + opts.cssBefore = opts.cssBefore || {}; + var clip; + if (opts.clip) { + if (/l2r/.test(opts.clip)) + clip = 'rect(0px 0px '+h+'px 0px)'; + else if (/r2l/.test(opts.clip)) + clip = 'rect(0px '+w+'px '+h+'px '+w+'px)'; + else if (/t2b/.test(opts.clip)) + clip = 'rect(0px '+w+'px 0px 0px)'; + else if (/b2t/.test(opts.clip)) + clip = 'rect('+h+'px '+w+'px '+h+'px 0px)'; + else if (/zoom/.test(opts.clip)) { + var top = parseInt(h/2); + var left = parseInt(w/2); + clip = 'rect('+top+'px '+left+'px '+top+'px '+left+'px)'; + } + } + + opts.cssBefore.clip = opts.cssBefore.clip || clip || 'rect(0px 0px 0px 0px)'; + + var d = opts.cssBefore.clip.match(/(\d+)/g); + var t = parseInt(d[0]), r = parseInt(d[1]), b = parseInt(d[2]), l = parseInt(d[3]); + + opts.before.push(function(curr, next, opts) { + if (curr == next) return; + var $curr = $(curr), $next = $(next); + $.fn.cycle.commonReset(curr,next,opts,true,true,false); + opts.cssAfter.display = 'block'; + + var step = 1, count = parseInt((opts.speedIn / 13)) - 1; + (function f() { + var tt = t ? t - parseInt(step * (t/count)) : 0; + var ll = l ? l - parseInt(step * (l/count)) : 0; + var bb = b < h ? b + parseInt(step * ((h-b)/count || 1)) : h; + var rr = r < w ? r + parseInt(step * ((w-r)/count || 1)) : w; + $next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' }); + (step++ <= count) ? setTimeout(f, 13) : $curr.css('display', 'none'); + })(); + }); + opts.cssBefore = { display: 'block', opacity: 1, top: 0, left: 0 }; + opts.animIn = { left: 0 }; + opts.animOut = { left: 0 }; +}; + +})(jQuery); diff --git a/app/assets/stylesheets/modulestore.css b/app/assets/stylesheets/modulestore.css new file mode 100644 index 00000000..ef265aeb --- /dev/null +++ b/app/assets/stylesheets/modulestore.css @@ -0,0 +1,259 @@ +ul, li{ + margin: 0; + list-style: none; +} +body{ + color: #000; + font-family: helvetica, arial, sans-serif; +} +.md-bg{ + padding-top: 30px; + background: #e8eef5; + max-height: 300px; +} +.md-store{ + margin: 0 40px; + min-width: 780px; +} +.modulestore .header{ + width: 780px; + margin: 0 auto; +} +.home{ + margin: 39px 0 0 18px; + background: url(<%= asset_path 'modulestore/h1_bg.png' %>) left top no-repeat; + width: 174px; + height: 39px; + display: block; +} +.home:hover{ + -moz-transition: all 0.1s ease-in-out; + -ms-transition: all 0.1s ease-in-out; + -webkit-transition: all 0.1s ease-in-out; + transition: all 0.1s ease-in-out; + opacity: .85; +} +.home:active{ + position: relative; + top: 1px; +} +.home a{ + text-indent: -9999px; + display: block; +} +.slide{ + position: relative; +} +.slide-wrap{ + position: relative; + width: 780px; + margin: 0 auto; +} +.slide{ + margin: 25px 0 55px 0; + width: 740px; + height: 220px; +} +.slide-nav a{ + overflow: hidden; + position: absolute; + top: 50%; + left: 10px; + width: 40px; + height: 40px; + margin-top: -20px; + font-size: 50px; + font-weight: 100; + line-height: 30px; + color: #fff; + text-align: center; + background: #999; + border: 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + opacity: 1; + filter: alpha(opacity=100); + z-index: 10; +} +.slide-nav a{ + display: block; + text-decoration: none; +} +.slide-nav .next { + right: 10px; + left: auto; + background: #999; +} +.slide-nav .next:hover{ + background: #529bdf; + opacity: 1; + filter: alpha(opacity=100); +} +.slide-nav .prev:hover{ + background: #529bdf; + opacity: 1; + filter: alpha(opacity=100); +} +.slide-feature{ + background: url(<%= asset_path 'modulestore/carousel_feature.png' %>) left top no-repeat; + width: 435px; + height: 305px; + position: absolute; + right: 60px; + top: -25px; + z-index: 9; +} +.app{ + width: 240px; +} +.app-list a{ + width: 200px; + height: 200px; + overflow: hidden; + display: block; + background: #00699f; + position: relative; + margin: 0 0 40px 0; + -webkit-box-shadow: 0px 2px 10px 0px #a3a3a3; + box-shadow: 0px 2px 10px 0px #a3a3a3; +} +.app-list .detail{ + background: #f0f0f0; + position: absolute; + width: 180px; + bottom: 0; + left: 0; + padding: 10px 10px 5px 10px; +} +.app-list .detail .apptitle{ + display: block; + font-size: 13px; + margin-bottom: 2px; +} +.app-list .detail .apptitle:hover{ + text-decoration: underline; +} +.app-list .detail .apptitle:active{ + position: relative; + top: 1px; +} + +.app-list .detail .price{ + font-size: 12px; + color: #76787a; +} + +/* module detail page */ +.modulestore-detail .header{ + margin-bottom: 30px; +} +.breadcrumb{ + background: none; + font-size: 12px; + margin: 10px 0 0 0; + padding: 0; + font-style: italic; +} +.left-col.span3{ + width: 170px; +} +.app-icon{ + border: 1px solid #ddd; + margin: 0 0 5px 0; +} +.price.btn.btn-primary{ + margin: 0 0 5px 10px; +} +.downloads{ + font-size: 12px; + color: #363636; +} +.downloads span{ + color: #727272; +} +.who-are-using-this-apps, .recommends{ + font-size: 12px; + padding: 0; + margin: 7px 0; + line-height: 1.9; +} +.download-meta ul li{ + font-size: 11px; + padding-left: 5px; +} +.recommend-thumbs{ + margin: 0 0 0 15px; +} +.recommend-thumbs img{ + display: inline-block; + border: 1px solid #dcdcdc; + margin-bottom: 10px; +} +.recommend-thumbs a:hover img{ + -moz-transition: all 0.1s ease-in-out; + -ms-transition: all 0.1s ease-in-out; + -webkit-transition: all 0.1s ease-in-out; + transition: all 0.1s ease-in-out; + opacity: .85; +} +.right-col.span6{ + width: 530px; +} +.right-col h2{ + font-size: 24px; + color: #3e94e4; + font-weight: 100; + line-height: 28px; +} +.right-col h3{ + color: #363636; + font-size: 15px; + font-weight: 100; + margin: 8px 0; + line-height: 20px; +} +.app-description{ + color: #5d5d5d; + font-size: 12px; +} + +.screenshots .slide{ + width: 580px; + height: 360px; +} +.detail-slide-nav { + text-align: center; + z-index: 50; + position: absolute; + bottom: 0; + left: 0; + background: #000000; + opacity: .75; + width: 580px; + line-height: 20px; +} +.detail-slide-nav a{ + color: #fff; + background: #fff; + margin: 0 7px 0 0; + -webkit-border-radius: 5px; + border-radius: 5px; + height: 10px; + width: 10px; + display: inline-block; + overflow: hidden; +} +.detail-slide-nav a:hover{ + color: #4bbaf3; + background: #4bbaf3; + text-decoration: none; +} +.detail-slide-nav a.activeSlide { + background: #4bbaf3; + color: #4bbaf3; +} +.detail-slide-nav a:focus { + outline: none; +} + diff --git a/app/controllers/admin/module_store_controller.rb b/app/controllers/admin/module_store_controller.rb new file mode 100644 index 00000000..263a0732 --- /dev/null +++ b/app/controllers/admin/module_store_controller.rb @@ -0,0 +1,11 @@ +class Admin::ModuleStoreController < ApplicationController + + layout "new_admin" + + def index + end + + def show + end + +end \ No newline at end of file diff --git a/app/controllers/admin/template_store_controller.rb b/app/controllers/admin/template_store_controller.rb index 88229b3b..cdda6ff9 100644 --- a/app/controllers/admin/template_store_controller.rb +++ b/app/controllers/admin/template_store_controller.rb @@ -5,4 +5,7 @@ class Admin::TemplateStoreController < ApplicationController def index end + def show + end + end \ No newline at end of file diff --git a/app/views/admin/module_store/index.html.erb b/app/views/admin/module_store/index.html.erb new file mode 100644 index 00000000..4a9eaa12 --- /dev/null +++ b/app/views/admin/module_store/index.html.erb @@ -0,0 +1,58 @@ +<% content_for :side_bar do %> + <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :icon => 'icons-cog', :side_bar_content => 'admin/sites/side_bar'} %> +<% end %> + +<% content_for :page_specific_css do %> + <%= stylesheet_link_tag 'modulestore' %> +<% end %> + +<% content_for :page_specific_javascript do %> + <%= javascript_include_tag 'lib/jquery.cycle.all.latest.js' %> + +<% end %> + +
+
+
+

Orbit Module Store

+
+
+
+
+ + +
+ + + +
+
+
+
+
+ <% 9.times do %> + + <% end %> +
+
+
\ No newline at end of file diff --git a/app/views/admin/module_store/show.html.erb b/app/views/admin/module_store/show.html.erb new file mode 100644 index 00000000..64e88d02 --- /dev/null +++ b/app/views/admin/module_store/show.html.erb @@ -0,0 +1,97 @@ +<% content_for :side_bar do %> + <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :icon => 'icons-cog', :side_bar_content => 'admin/sites/side_bar'} %> +<% end %> + +<% content_for :page_specific_css do %> + <%= stylesheet_link_tag 'modulestore' %> +<% end %> + +<% content_for :page_specific_javascript do %> + <%= javascript_include_tag 'lib/jquery.cycle.all.latest.js' %> + +<% end %> +
+ +
+
+ <%= image_tag 'modulestore/app-icon.jpg', :class => "app-icon" %> + Free download + +
+ +
+ +

Orbit app name here

+

Description

+

+ Orbit Blog makes it easy to post text, photos and video onto your blog. + + We created Orbit blog to give you an easy way to share your thoughts about current events, what's going on in your life, or anything else you'd care to discuss with the world. We've developed a host of features to make blogging as simple and effective as possible: + + * Free hosting for your images, video, and blog content + * Powerful Template Designer for customizing your blog's look and feel + * Drag and drop widget arrangements + * Hundreds of background images and of flexible default templates + * Built-in blog stats for realtime traffic data + * Easy, built-in monetization with AdSense + * Mobile support for blogging-on-the-go + * Use your custom URL for free + * Support for individual, team, and private blogs + * Post and comment notifications + * Gadget directory with hundreds of free widgets and add-ons + * Available in 4 languages +

+ +
+
+
\ No newline at end of file diff --git a/app/views/admin/sites/_side_bar.html.erb b/app/views/admin/sites/_side_bar.html.erb index c301c595..67b7c661 100644 --- a/app/views/admin/sites/_side_bar.html.erb +++ b/app/views/admin/sites/_side_bar.html.erb @@ -17,8 +17,9 @@ <% end -%> <%= content_tag :li, :class => active_for_controllers('template_store', 'module_store') do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-window-block') + content_tag(:span, t(:purchase)), admin_purchases_path %> + <%= link_to content_tag(:i, nil, :class => 'icons-cart') + content_tag(:span, t(:purchase)), admin_purchases_path %> <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('template_store', 'module_store')) do -%> <%= content_tag :li, link_to(t('store.template'), admin_template_store_path), :class => active_for_action('template_store', 'index') %> + <%= content_tag :li, link_to(t('store.module'), admin_module_store_path), :class => active_for_action('module_store', 'index') %> <% end %> <% end -%> diff --git a/app/views/admin/template_store/index.html.erb b/app/views/admin/template_store/index.html.erb index 2d270cdd..0599c44c 100644 --- a/app/views/admin/template_store/index.html.erb +++ b/app/views/admin/template_store/index.html.erb @@ -1,5 +1,5 @@ <% content_for :side_bar do %> - <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :side_bar_content => 'admin/sites/side_bar'} %> + <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :icon => 'icons-cog', :side_bar_content => 'admin/sites/side_bar'} %> <% end %> <% content_for :page_specific_css do %> @@ -8,13 +8,13 @@
+ + diff --git a/app/views/admin/template_store/show.html.erb b/app/views/admin/template_store/show.html.erb new file mode 100644 index 00000000..1a3e37d7 --- /dev/null +++ b/app/views/admin/template_store/show.html.erb @@ -0,0 +1,77 @@ +<% content_for :side_bar do %> + <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :icon => 'icons-cog', :side_bar_content => 'admin/sites/side_bar'} %> +<% end %> + +<% content_for :page_specific_css do %> + <%= stylesheet_link_tag 'templatestore' %> +<% end %> + +<% content_for :page_specific_javascript do %> + <%= javascript_include_tag 'lib/jquery.cycle.all.latest.js' %> + +<% end %> + +
+ +
+
+ <%= image_tag 'templatestore/template-icon.jpg', :class => "template-icon" %> + Free download +
    +
  • Views: 7985 times
  • +
+
+ +
+ +

Orbit Template name here

+

Description

+

+ Orbit Blog makes it easy to post text, photos and video onto your blog. + + We created Orbit blog to give you an easy way to share your thoughts about current events, what's going on in your life, or anything else you'd care to discuss with the world. We've developed a host of features to make blogging as simple and effective as possible: + + * Free hosting for your images, video, and blog content + * Powerful Template Designer for customizing your blog's look and feel + * Drag and drop widget arrangements + * Hundreds of background images and of flexible default templates + * Built-in blog stats for realtime traffic data + * Easy, built-in monetization with AdSense + * Mobile support for blogging-on-the-go + * Use your custom URL for free + * Support for individual, team, and private blogs + * Post and comment notifications + * Gadget directory with hundreds of free widgets and add-ons + * Available in 4 languages +

+ +
+
+
\ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 42a5d477..94afbd40 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -138,7 +138,10 @@ Orbit::Application.routes.draw do match 'member_select_add' => "member_selects#member_select_add" ,:as => :member_select_add,:via => "post" end + match 'module_store' => 'module_store#index' + match 'module_store/show' => 'module_store#show' match 'template_store' => 'template_store#index' + match 'template_store/show' => 'template_store#show' end # end admin