From: Radek Czajka Date: Tue, 10 Apr 2012 14:59:17 +0000 (+0200) Subject: move to django 1.4 and django-pipeline, X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/d316a52151685a1b7c295baa12b73a73eabe5657?hp=d2ee1c034911e5b42eb7ad182d90607529d741a4 move to django 1.4 and django-pipeline, better mobile style matching --- diff --git a/.gitignore b/.gitignore index cef8774d8..c3e3e48b6 100644 --- a/.gitignore +++ b/.gitignore @@ -7,14 +7,7 @@ dev.sqlite *.log # Compress output -/wolnelektury/static/css/all.min*.css -/wolnelektury/static/js/all*.min.js -/wolnelektury/static/css/book.min*.css -/wolnelektury/static/js/book*.min.js -/wolnelektury/static/js/jquery.min.js -/wolnelektury/static/css/ie.min*.css -/wolnelektury/static/css/screen.min*.css -/wolnelektury/static/js/base*.min.js +/static # Python garbage *.pyc diff --git a/apps/catalogue/static/jplayer/Jplayer.swf b/apps/catalogue/static/jplayer/Jplayer.swf new file mode 100644 index 000000000..4d50c86ae Binary files /dev/null and b/apps/catalogue/static/jplayer/Jplayer.swf differ diff --git a/apps/catalogue/static/jplayer/jplayer.blue.monday.css b/apps/catalogue/static/jplayer/jplayer.blue.monday.css new file mode 100644 index 000000000..f8b314b6e --- /dev/null +++ b/apps/catalogue/static/jplayer/jplayer.blue.monday.css @@ -0,0 +1,627 @@ +/* + * Skin for jPlayer Plugin (jQuery JavaScript Library) + * http://www.happyworm.com/jquery/jplayer + * + * Skin Name: Blue Monday + * + * Copyright (c) 2010-2011 Happyworm Ltd + * Dual licensed under the MIT and GPL licenses. + * - http://www.opensource.org/licenses/mit-license.php + * - http://www.gnu.org/copyleft/gpl.html + * + * Author: Silvia Benvenuti + * Skin Version: 4.0 (jPlayer 2.1.0) + * Date: 1st September 2011 + */ + +div.jp-audio, +div.jp-video { + + /* Edit the font-size to counteract inherited font sizing. + * Eg. 1.25em = 1 / 0.8em + */ + + font-size:1.25em; /* 1.25em for testing in site pages */ /* No parent CSS that can effect the size in the demos ZIP */ + + font-family:Verdana, Arial, sans-serif; + line-height:1.6; + color: #565656; + border:1px solid #009be3; + background-color:#eee; + position:relative; +} +div.jp-audio { + width:420px; +} +div.jp-video-270p { + width:480px; +} +div.jp-video-360p { + width:640px; +} +div.jp-video-full { + /* Rules for IE6 (full-screen) */ + width:480px; + height:270px; + /* Rules for IE7 (full-screen) - Otherwise the relative container causes other page items that are not position:static (default) to appear over the video/gui. */ + position:static !important; position:relative +} + +div.jp-video-full div.jp-jplayer { + top: 0; + left: 0; + position: fixed !important; position: relative; /* Rules for IE6 (full-screen) */ + overflow: hidden; + z-index:1000; +} + +div.jp-video-full div.jp-gui { + position: fixed !important; position: static; /* Rules for IE6 (full-screen) */ + top: 0; + left: 0; + width:100%; + height:100%; + z-index:1000; +} + +div.jp-video-full div.jp-interface { + position: absolute !important; position: relative; /* Rules for IE6 (full-screen) */ + bottom: 0; + left: 0; + z-index:1000; +} + +div.jp-interface { + position: relative; + background-color:#eee; + width:100%; +} + +div.jp-interface a { + color: #0c767d; +} + +div.jp-audio div.jp-type-single div.jp-interface { + height:80px; +} +div.jp-audio div.jp-type-playlist div.jp-interface { + height:80px; +} + +div.jp-video div.jp-interface { + border-top:1px solid #009be3; +} + +/* @group CONTROLS */ + +div.jp-controls-holder { + clear: both; + width:440px; + margin:0 auto; + position: relative; + overflow:hidden; + top:-8px; /* This negative value depends on the size of the text in jp-currentTime and jp-duration */ +} + +div.jp-interface ul.jp-controls { + list-style-type:none; + margin:0; + padding: 0; + overflow:hidden; +} + +div.jp-audio ul.jp-controls { + width: 380px; + padding:20px 20px 0 20px; +} + +div.jp-video div.jp-type-single ul.jp-controls { + width: 78px; + margin-left: 200px; +} + +div.jp-video div.jp-type-playlist ul.jp-controls { + width: 134px; + margin-left: 172px; +} +div.jp-video ul.jp-controls, +div.jp-interface ul.jp-controls li { + display:inline; + float: left; +} + +div.jp-interface ul.jp-controls a { + display:block; + overflow:hidden; + text-indent:-9999px; +} +a.jp-play, +a.jp-pause { + width:40px; + height:40px; +} + +a.jp-play { + background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 0 no-repeat; +} +a.jp-play:hover { + background: url("/static/jplayer/jplayer.blue.monday.jpg") -41px 0 no-repeat; +} +a.jp-pause { + background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -42px no-repeat; + display: none; +} +a.jp-pause:hover { + background: url("/static/jplayer/jplayer.blue.monday.jpg") -41px -42px no-repeat; +} + +a.jp-stop, a.jp-previous, a.jp-next { + width:28px; + height:28px; + margin-top:6px; +} + +a.jp-stop { + background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -83px no-repeat; + margin-left:10px; +} + +a.jp-stop:hover { + background: url("/static/jplayer/jplayer.blue.monday.jpg") -29px -83px no-repeat; +} + +a.jp-previous { + background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -112px no-repeat; +} +a.jp-previous:hover { + background: url("/static/jplayer/jplayer.blue.monday.jpg") -29px -112px no-repeat; +} + +a.jp-next { + background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -141px no-repeat; +} +a.jp-next:hover { + background: url("/static/jplayer/jplayer.blue.monday.jpg") -29px -141px no-repeat; +} + +/* @end */ + +/* @group progress bar */ + +div.jp-progress { + overflow:hidden; + background-color: #ddd; +} +div.jp-audio div.jp-progress { + position: absolute; + top:32px; + height:15px; +} +div.jp-audio div.jp-type-single div.jp-progress { + left:110px; + width:186px; +} +div.jp-audio div.jp-type-playlist div.jp-progress { + left:166px; + width:130px; +} +div.jp-video div.jp-progress { + top:0px; + left:0px; + width:100%; + height:10px; +} +div.jp-seek-bar { + background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -202px repeat-x; + width:0px; + height:100%; + cursor: pointer; +} +div.jp-play-bar { + background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -218px repeat-x ; + width:0px; + height:100%; +} + +/* The seeking class is added/removed inside jPlayer */ +div.jp-seeking-bg { + background: url("/static/jplayer/jplayer.blue.monday.seeking.gif"); +} + +/* @end */ + +/* @group volume controls */ + + +a.jp-mute, +a.jp-unmute, +a.jp-volume-max { + width:18px; + height:15px; + margin-top:12px; +} + +div.jp-audio div.jp-type-single a.jp-mute, +div.jp-audio div.jp-type-single a.jp-unmute { + margin-left: 210px; +} + +div.jp-audio div.jp-type-playlist a.jp-mute, +div.jp-audio div.jp-type-playlist a.jp-unmute { + margin-left: 154px; +} + +div.jp-audio a.jp-volume-max { + margin-left: 56px; +} + +div.jp-video a.jp-mute, +div.jp-video a.jp-unmute, +div.jp-video a.jp-volume-max { + position: absolute; + top:12px; + margin-top:0; +} + +div.jp-video a.jp-mute, +div.jp-video a.jp-unmute { + left: 50px; +} + +div.jp-video a.jp-volume-max { + left: 134px; +} + +a.jp-mute { + background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -170px no-repeat; +} +a.jp-mute:hover { + background: url("/static/jplayer/jplayer.blue.monday.jpg") -19px -170px no-repeat; +} +a.jp-unmute { + background: url("/static/jplayer/jplayer.blue.monday.jpg") -60px -170px no-repeat; + display: none; +} +a.jp-unmute:hover { + background: url("/static/jplayer/jplayer.blue.monday.jpg") -79px -170px no-repeat; +} + a.jp-volume-max { + background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -186px no-repeat; +} +a.jp-volume-max:hover { + background: url("/static/jplayer/jplayer.blue.monday.jpg") -19px -186px no-repeat; +} + +div.jp-volume-bar { + position: absolute; + overflow:hidden; + background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -250px repeat-x; + width:46px; + height:5px; + cursor: pointer; +} +div.jp-audio div.jp-volume-bar { + top:37px; + left:330px; +} +div.jp-video div.jp-volume-bar { + top:17px; + left:72px; +} +div.jp-volume-bar-value { + background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -256px repeat-x; + width:0px; + height:5px; +} + +/* @end */ + +/* @group current time and duration */ + +div.jp-audio div.jp-time-holder { + position:absolute; + top:50px; +} +div.jp-audio div.jp-type-single div.jp-time-holder { + left:110px; + width:186px; +} +div.jp-audio div.jp-type-playlist div.jp-time-holder { + left:166px; + width:130px; +} + +div.jp-current-time, +div.jp-duration { + width:60px; + font-size:.64em; + font-style:oblique; +} +div.jp-current-time { + float: left; + display:inline; +} +div.jp-duration { + float: right; + display:inline; + text-align: right; +} + +div.jp-video div.jp-current-time { + margin-left:20px; +} +div.jp-video div.jp-duration { + margin-right:20px; +} + +/* @end */ + +/* @group playlist */ + +div.jp-title { + font-weight:bold; + text-align:center; +} + +div.jp-title, +div.jp-playlist { + width:100%; + background-color:#ccc; + border-top:1px solid #009be3; +} +div.jp-type-single div.jp-title, +div.jp-type-playlist div.jp-title, +div.jp-type-single div.jp-playlist { + border-top:none; +} +div.jp-title ul, +div.jp-playlist ul { + list-style-type:none; + margin:0; + padding:0 20px; + font-size:.8em; +} + +div.jp-title li { + padding:5px 0; + font-weight:bold; +} +div.jp-playlist li { + padding:5px 0 4px 20px; + border-bottom:1px solid #eee; +} + +div.jp-playlist li div { + display:inline; +} + +/* Note that the first-child (IE6) and last-child (IE6/7/8) selectors do not work on IE */ + +div.jp-type-playlist div.jp-playlist li:last-child { + padding:5px 0 5px 20px; + border-bottom:none; +} +div.jp-type-playlist div.jp-playlist li.jp-playlist-current { + list-style-type:square; + list-style-position:inside; + padding-left:7px; +} +div.jp-type-playlist div.jp-playlist a { + color: #333; + text-decoration: none; +} +div.jp-type-playlist div.jp-playlist a:hover { + color:#0D7E85; +} +div.jp-type-playlist div.jp-playlist a.jp-playlist-current { + color:#0D7E85; +} + +div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove { + float:right; + display:inline; + text-align:right; + margin-right:10px; + font-weight:bold; + color:#666; +} +div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove:hover { + color:#0D7E85; +} +div.jp-type-playlist div.jp-playlist span.jp-free-media { + float:right; + display:inline; + text-align:right; + margin-right:10px; +} +div.jp-type-playlist div.jp-playlist span.jp-free-media a{ + color:#565656; +} +div.jp-type-playlist div.jp-playlist span.jp-free-media a:hover{ + color:#0D7E85; +} +span.jp-artist { + font-size:.8em; + color:#565656; +} + +/* @end */ + +div.jp-video-play { + position:absolute; + top:0; + left:0; + width:100%; + cursor:pointer; + background-color:rgba(0,0,0,0); /* Makes IE9 work with the active area over the whole video area. IE6/7/8 only have the button as active area. */ +} +div.jp-video-270p div.jp-video-play { + height:270px; +} +div.jp-video-360p div.jp-video-play { + height:360px; +} +div.jp-video-full div.jp-video-play { + height:100%; + z-index:1000; +} +a.jp-video-play-icon { + position:relative; + display:block; + width: 112px; + height: 100px; + + margin-left:-56px; + margin-top:-50px; + left:50%; + top:50%; + + background: url("/static/jplayer/jplayer.blue.monday.video.play.png") 0 0 no-repeat; + text-indent:-9999px; +} +div.jp-video-play:hover a.jp-video-play-icon { + background: url("/static/jplayer/jplayer.blue.monday.video.play.png") 0 -100px no-repeat; +} + + + + + +div.jp-jplayer audio, +div.jp-jplayer { + width:0px; + height:0px; +} + +div.jp-jplayer { + background-color: #000000; +} + + + + + +/* @group TOGGLES */ + +/* The audio toggles are nested inside jp-time-holder */ + +ul.jp-toggles { + list-style-type:none; + padding:0; + margin:0 auto; + overflow:hidden; +} + +div.jp-audio .jp-type-single ul.jp-toggles { + width:25px; +} +div.jp-audio .jp-type-playlist ul.jp-toggles { + width:55px; + margin: 0; + position: absolute; + left: 325px; + top: 50px; +} + +div.jp-video ul.jp-toggles { + margin-top:10px; + width:100px; +} + +ul.jp-toggles li { + display:block; + float:right; +} + +ul.jp-toggles li a { + display:block; + width:25px; + height:18px; + text-indent:-9999px; + line-height:100%; /* need this for IE6 */ +} + +a.jp-full-screen { + background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -310px no-repeat; + margin-left: 20px; +} + +a.jp-full-screen:hover { + background: url("/static/jplayer/jplayer.blue.monday.jpg") -30px -310px no-repeat; +} + +a.jp-restore-screen { + background: url("/static/jplayer/jplayer.blue.monday.jpg") -60px -310px no-repeat; + margin-left: 20px; +} + +a.jp-restore-screen:hover { + background: url("/static/jplayer/jplayer.blue.monday.jpg") -90px -310px no-repeat; +} + +a.jp-repeat { + background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -290px no-repeat; +} + +a.jp-repeat:hover { + background: url("/static/jplayer/jplayer.blue.monday.jpg") -30px -290px no-repeat; +} + +a.jp-repeat-off { + background: url("/static/jplayer/jplayer.blue.monday.jpg") -60px -290px no-repeat; +} + +a.jp-repeat-off:hover { + background: url("/static/jplayer/jplayer.blue.monday.jpg") -90px -290px no-repeat; +} + +a.jp-shuffle { + background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -270px no-repeat; + margin-left: 5px; +} + +a.jp-shuffle:hover { + background: url("/static/jplayer/jplayer.blue.monday.jpg") -30px -270px no-repeat; +} + +a.jp-shuffle-off { + background: url("/static/jplayer/jplayer.blue.monday.jpg") -60px -270px no-repeat; + margin-left: 5px; +} + +a.jp-shuffle-off:hover { + background: url("/static/jplayer/jplayer.blue.monday.jpg") -90px -270px no-repeat; +} + + +/* @end */ + +/* @group NO SOLUTION error feedback */ + +.jp-no-solution { + position:absolute; + width:390px; + margin-left:-202px; + left:50%; + top: 10px; + + padding:5px; + font-size:.8em; + background-color:#eee; + border:2px solid #009be3; + color:#000; + display:none; +} + +.jp-no-solution a { + color:#000; +} + +.jp-no-solution span { + font-size:1em; + display:block; + text-align:center; + font-weight:bold; +} + +/* @end */ diff --git a/apps/catalogue/static/jplayer/jplayer.blue.monday.jpg b/apps/catalogue/static/jplayer/jplayer.blue.monday.jpg new file mode 100644 index 000000000..adab53ff7 Binary files /dev/null and b/apps/catalogue/static/jplayer/jplayer.blue.monday.jpg differ diff --git a/apps/catalogue/static/jplayer/jplayer.blue.monday.seeking.gif b/apps/catalogue/static/jplayer/jplayer.blue.monday.seeking.gif new file mode 100644 index 000000000..dbd2105ab Binary files /dev/null and b/apps/catalogue/static/jplayer/jplayer.blue.monday.seeking.gif differ diff --git a/apps/catalogue/static/jplayer/jplayer.blue.monday.video.play.png b/apps/catalogue/static/jplayer/jplayer.blue.monday.video.play.png new file mode 100644 index 000000000..8e97df011 Binary files /dev/null and b/apps/catalogue/static/jplayer/jplayer.blue.monday.video.play.png differ diff --git a/apps/catalogue/static/jplayer/jplayer.playlist.min.js b/apps/catalogue/static/jplayer/jplayer.playlist.min.js new file mode 100644 index 000000000..42c0e22a1 --- /dev/null +++ b/apps/catalogue/static/jplayer/jplayer.playlist.min.js @@ -0,0 +1,30 @@ +/* + * Playlist Object for the jPlayer Plugin + * http://www.jplayer.org + * + * Copyright (c) 2009 - 2011 Happyworm Ltd + * Dual licensed under the MIT and GPL licenses. + * - http://www.opensource.org/licenses/mit-license.php + * - http://www.gnu.org/copyleft/gpl.html + * + * Author: Mark J Panaghiston + * Version: 2.1.0 (jPlayer 2.1.0) + * Date: 1st September 2011 + */ + +(function(b,f){jPlayerPlaylist=function(a,c,d){var e=this;this.current=0;this.removing=this.shuffled=this.loop=!1;this.cssSelector=b.extend({},this._cssSelector,a);this.options=b.extend(!0,{},this._options,d);this.playlist=[];this.original=[];this._initPlaylist(c);this.cssSelector.title=this.cssSelector.cssSelectorAncestor+" .jp-title";this.cssSelector.playlist=this.cssSelector.cssSelectorAncestor+" .jp-playlist";this.cssSelector.next=this.cssSelector.cssSelectorAncestor+" .jp-next";this.cssSelector.previous= +this.cssSelector.cssSelectorAncestor+" .jp-previous";this.cssSelector.shuffle=this.cssSelector.cssSelectorAncestor+" .jp-shuffle";this.cssSelector.shuffleOff=this.cssSelector.cssSelectorAncestor+" .jp-shuffle-off";this.options.cssSelectorAncestor=this.cssSelector.cssSelectorAncestor;this.options.repeat=function(a){e.loop=a.jPlayer.options.loop};b(this.cssSelector.jPlayer).bind(b.jPlayer.event.ready,function(){e._init()});b(this.cssSelector.jPlayer).bind(b.jPlayer.event.ended,function(){e.next()}); +b(this.cssSelector.jPlayer).bind(b.jPlayer.event.play,function(){b(this).jPlayer("pauseOthers")});b(this.cssSelector.jPlayer).bind(b.jPlayer.event.resize,function(a){a.jPlayer.options.fullScreen?b(e.cssSelector.title).show():b(e.cssSelector.title).hide()});b(this.cssSelector.previous).click(function(){e.previous();b(this).blur();return!1});b(this.cssSelector.next).click(function(){e.next();b(this).blur();return!1});b(this.cssSelector.shuffle).click(function(){e.shuffle(!0);return!1});b(this.cssSelector.shuffleOff).click(function(){e.shuffle(!1); +return!1}).hide();this.options.fullScreen||b(this.cssSelector.title).hide();b(this.cssSelector.playlist+" ul").empty();this._createItemHandlers();b(this.cssSelector.jPlayer).jPlayer(this.options)};jPlayerPlaylist.prototype={_cssSelector:{jPlayer:"#jquery_jplayer_1",cssSelectorAncestor:"#jp_container_1"},_options:{playlistOptions:{autoPlay:!1,loopOnPrevious:!1,shuffleOnLoop:!0,enableRemoveControls:!1,displayTime:"slow",addTime:"fast",removeTime:"fast",shuffleTime:"slow",itemClass:"jp-playlist-item", +freeGroupClass:"jp-free-media",freeItemClass:"jp-playlist-item-free",removeItemClass:"jp-playlist-item-remove"}},option:function(a,b){if(b===f)return this.options.playlistOptions[a];this.options.playlistOptions[a]=b;switch(a){case "enableRemoveControls":this._updateControls();break;case "itemClass":case "freeGroupClass":case "freeItemClass":case "removeItemClass":this._refresh(!0),this._createItemHandlers()}return this},_init:function(){var a=this;this._refresh(function(){a.options.playlistOptions.autoPlay? +a.play(a.current):a.select(a.current)})},_initPlaylist:function(a){this.current=0;this.removing=this.shuffled=!1;this.original=b.extend(!0,[],a);this._originalPlaylist()},_originalPlaylist:function(){var a=this;this.playlist=[];b.each(this.original,function(b){a.playlist[b]=a.original[b]})},_refresh:function(a){var c=this;if(a&&!b.isFunction(a))b(this.cssSelector.playlist+" ul").empty(),b.each(this.playlist,function(a){b(c.cssSelector.playlist+" ul").append(c._createListItem(c.playlist[a]))}),this._updateControls(); +else{var d=b(this.cssSelector.playlist+" ul").children().length?this.options.playlistOptions.displayTime:0;b(this.cssSelector.playlist+" ul").slideUp(d,function(){var d=b(this);b(this).empty();b.each(c.playlist,function(a){d.append(c._createListItem(c.playlist[a]))});c._updateControls();b.isFunction(a)&&a();c.playlist.length?b(this).slideDown(c.options.playlistOptions.displayTime):b(this).show()})}},_createListItem:function(a){var c=this,d="
  • ";d+="×";if(a.free){var e=!0;d+="(";b.each(a,function(a,f){b.jPlayer.prototype.format[a]&&(e?e=!1:d+=" | ",d+=""+a+"")});d+=")"}d+=""+a.title+(a.artist?" ":"")+"";d+="
  • ";return d},_createItemHandlers:function(){var a= +this;b(this.cssSelector.playlist+" a."+this.options.playlistOptions.itemClass).die("click").live("click",function(){var c=b(this).parent().parent().index();a.current!==c?a.play(c):b(a.cssSelector.jPlayer).jPlayer("play");b(this).blur();return!1});b(a.cssSelector.playlist+" a."+this.options.playlistOptions.freeItemClass).die("click").live("click",function(){b(this).parent().parent().find("."+a.options.playlistOptions.itemClass).click();b(this).blur();return!1});b(a.cssSelector.playlist+" a."+this.options.playlistOptions.removeItemClass).die("click").live("click", +function(){var c=b(this).parent().parent().index();a.remove(c);b(this).blur();return!1})},_updateControls:function(){this.options.playlistOptions.enableRemoveControls?b(this.cssSelector.playlist+" ."+this.options.playlistOptions.removeItemClass).show():b(this.cssSelector.playlist+" ."+this.options.playlistOptions.removeItemClass).hide();this.shuffled?(b(this.cssSelector.shuffleOff).show(),b(this.cssSelector.shuffle).hide()):(b(this.cssSelector.shuffleOff).hide(),b(this.cssSelector.shuffle).show())}, +_highlight:function(a){this.playlist.length&&a!==f&&(b(this.cssSelector.playlist+" .jp-playlist-current").removeClass("jp-playlist-current"),b(this.cssSelector.playlist+" li:nth-child("+(a+1)+")").addClass("jp-playlist-current").find(".jp-playlist-item").addClass("jp-playlist-current"),b(this.cssSelector.title+" li").html(this.playlist[a].title+(this.playlist[a].artist?" by "+this.playlist[a].artist+"":"")))},setPlaylist:function(a){this._initPlaylist(a);this._init()}, +add:function(a,c){b(this.cssSelector.playlist+" ul").append(this._createListItem(a)).find("li:last-child").hide().slideDown(this.options.playlistOptions.addTime);this._updateControls();this.original.push(a);this.playlist.push(a);c?this.play(this.playlist.length-1):this.original.length===1&&this.select(0)},remove:function(a){var c=this;if(a===f)return this._initPlaylist([]),this._refresh(function(){b(c.cssSelector.jPlayer).jPlayer("clearMedia")}),!0;else if(this.removing)return!1;else{a=a<0?c.original.length+ +a:a;if(0<=a&&a1?this.shuffle(!0,!0):this.play(a):a>0&&this.play(a)},previous:function(){var a=this.current-1>=0?this.current-1:this.playlist.length-1;(this.loop&&this.options.playlistOptions.loopOnPrevious||a','','','',''];c=document.createElement('');for(var e=0;e0?100*d/this.status.duration:0;typeof a.seekable==="object"&&a.seekable.length>0?(g=this.status.duration>0?100*a.seekable.end(a.seekable.length-1)/this.status.duration:100,f=100*a.currentTime/a.seekable.end(a.seekable.length-1)):(g=100,f=e);b&&(e=f=d=0);this.status.seekPercent=g;this.status.currentPercentRelative=f;this.status.currentPercentAbsolute=e;this.status.currentTime=d;this.status.readyState=a.readyState;this.status.networkState=a.networkState;this.status.playbackRate= +a.playbackRate;this.status.ended=a.ended},_resetStatus:function(){this.status=b.extend({},this.status,b.jPlayer.prototype.status)},_trigger:function(a,c,d){a=b.Event(a);a.jPlayer={};a.jPlayer.version=b.extend({},this.version);a.jPlayer.options=b.extend(!0,{},this.options);a.jPlayer.status=b.extend(!0,{},this.status);a.jPlayer.html=b.extend(!0,{},this.html);a.jPlayer.flash=b.extend(!0,{},this.flash);if(c)a.jPlayer.error=b.extend({},c);if(d)a.jPlayer.warning=b.extend({},d);this.element.trigger(a)}, +jPlayerFlashEvent:function(a,c){if(a===b.jPlayer.event.ready)if(this.internal.ready){if(this.flash.gate){if(this.status.srcSet){var d=this.status.currentTime,e=this.status.paused;this.setMedia(this.status.media);d>0&&(e?this.pause(d):this.play(d))}this._trigger(b.jPlayer.event.flashreset)}}else this.internal.ready=!0,this.internal.flash.jq.css({width:"0px",height:"0px"}),this.version.flash=c.version,this.version.needFlash!==this.version.flash&&this._error({type:b.jPlayer.error.VERSION,context:this.version.flash, +message:b.jPlayer.errorMsg.VERSION+this.version.flash,hint:b.jPlayer.errorHint.VERSION}),this._trigger(b.jPlayer.event.repeat),this._trigger(a);if(this.flash.gate)switch(a){case b.jPlayer.event.progress:this._getFlashStatus(c);this._updateInterface();this._trigger(a);break;case b.jPlayer.event.timeupdate:this._getFlashStatus(c);this._updateInterface();this._trigger(a);break;case b.jPlayer.event.play:this._seeked();this._updateButtons(!0);this._trigger(a);break;case b.jPlayer.event.pause:this._updateButtons(!1); +this._trigger(a);break;case b.jPlayer.event.ended:this._updateButtons(!1);this._trigger(a);break;case b.jPlayer.event.click:this._trigger(a);break;case b.jPlayer.event.error:this.status.waitForLoad=!0;this.status.waitForPlay=!0;this.status.video&&this.internal.flash.jq.css({width:"0px",height:"0px"});this._validString(this.status.media.poster)&&this.internal.poster.jq.show();this.css.jq.videoPlay.length&&this.status.video&&this.css.jq.videoPlay.show();this.status.video?this._flash_setVideo(this.status.media): +this._flash_setAudio(this.status.media);this._updateButtons(!1);this._error({type:b.jPlayer.error.URL,context:c.src,message:b.jPlayer.errorMsg.URL,hint:b.jPlayer.errorHint.URL});break;case b.jPlayer.event.seeking:this._seeking();this._trigger(a);break;case b.jPlayer.event.seeked:this._seeked();this._trigger(a);break;case b.jPlayer.event.ready:break;default:this._trigger(a)}return!1},_getFlashStatus:function(a){this.status.seekPercent=a.seekPercent;this.status.currentPercentRelative=a.currentPercentRelative; +this.status.currentPercentAbsolute=a.currentPercentAbsolute;this.status.currentTime=a.currentTime;this.status.duration=a.duration;this.status.readyState=4;this.status.networkState=0;this.status.playbackRate=1;this.status.ended=!1},_updateButtons:function(a){if(a!==f)this.status.paused=!a,this.css.jq.play.length&&this.css.jq.pause.length&&(a?(this.css.jq.play.hide(),this.css.jq.pause.show()):(this.css.jq.play.show(),this.css.jq.pause.hide()));this.css.jq.restoreScreen.length&&this.css.jq.fullScreen.length&& +(this.status.noFullScreen?(this.css.jq.fullScreen.hide(),this.css.jq.restoreScreen.hide()):this.options.fullScreen?(this.css.jq.fullScreen.hide(),this.css.jq.restoreScreen.show()):(this.css.jq.fullScreen.show(),this.css.jq.restoreScreen.hide()));this.css.jq.repeat.length&&this.css.jq.repeatOff.length&&(this.options.loop?(this.css.jq.repeat.hide(),this.css.jq.repeatOff.show()):(this.css.jq.repeat.show(),this.css.jq.repeatOff.hide()))},_updateInterface:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.width(this.status.seekPercent+ +"%");this.css.jq.playBar.length&&this.css.jq.playBar.width(this.status.currentPercentRelative+"%");this.css.jq.currentTime.length&&this.css.jq.currentTime.text(b.jPlayer.convertTime(this.status.currentTime));this.css.jq.duration.length&&this.css.jq.duration.text(b.jPlayer.convertTime(this.status.duration))},_seeking:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.addClass("jp-seeking-bg")},_seeked:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.removeClass("jp-seeking-bg")}, +_resetGate:function(){this.html.audio.gate=!1;this.html.video.gate=!1;this.flash.gate=!1},_resetActive:function(){this.html.active=!1;this.flash.active=!1},setMedia:function(a){var c=this,d=!1,e=this.status.media.poster!==a.poster;this._resetMedia();this._resetGate();this._resetActive();b.each(this.formats,function(e,f){var i=c.format[f].media==="video";b.each(c.solutions,function(b,e){if(c[e].support[f]&&c._validString(a[f])){var g=e==="html";i?(g?(c.html.video.gate=!0,c._html_setVideo(a),c.html.active= +!0):(c.flash.gate=!0,c._flash_setVideo(a),c.flash.active=!0),c.css.jq.videoPlay.length&&c.css.jq.videoPlay.show(),c.status.video=!0):(g?(c.html.audio.gate=!0,c._html_setAudio(a),c.html.active=!0):(c.flash.gate=!0,c._flash_setAudio(a),c.flash.active=!0),c.css.jq.videoPlay.length&&c.css.jq.videoPlay.hide(),c.status.video=!1);d=!0;return!1}});if(d)return!1});if(d){if((!this.status.nativeVideoControls||!this.html.video.gate)&&this._validString(a.poster))e?this.htmlElement.poster.src=a.poster:this.internal.poster.jq.show(); +this.status.srcSet=!0;this.status.media=b.extend({},a);this._updateButtons(!1);this._updateInterface()}else this._error({type:b.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:b.jPlayer.errorMsg.NO_SUPPORT,hint:b.jPlayer.errorHint.NO_SUPPORT})},_resetMedia:function(){this._resetStatus();this._updateButtons(!1);this._updateInterface();this._seeked();this.internal.poster.jq.hide();clearTimeout(this.internal.htmlDlyCmdId);this.html.active?this._html_resetMedia():this.flash.active&& +this._flash_resetMedia()},clearMedia:function(){this._resetMedia();this.html.active?this._html_clearMedia():this.flash.active&&this._flash_clearMedia();this._resetGate();this._resetActive()},load:function(){this.status.srcSet?this.html.active?this._html_load():this.flash.active&&this._flash_load():this._urlNotSetError("load")},play:function(a){a=typeof a==="number"?a:NaN;this.status.srcSet?this.html.active?this._html_play(a):this.flash.active&&this._flash_play(a):this._urlNotSetError("play")},videoPlay:function(){this.play()}, +pause:function(a){a=typeof a==="number"?a:NaN;this.status.srcSet?this.html.active?this._html_pause(a):this.flash.active&&this._flash_pause(a):this._urlNotSetError("pause")},pauseOthers:function(){var a=this;b.each(this.instances,function(b,d){a.element!==d&&d.data("jPlayer").status.srcSet&&d.jPlayer("pause")})},stop:function(){this.status.srcSet?this.html.active?this._html_pause(0):this.flash.active&&this._flash_pause(0):this._urlNotSetError("stop")},playHead:function(a){a=this._limitValue(a,0,100); +this.status.srcSet?this.html.active?this._html_playHead(a):this.flash.active&&this._flash_playHead(a):this._urlNotSetError("playHead")},_muted:function(a){this.options.muted=a;this.html.used&&this._html_mute(a);this.flash.used&&this._flash_mute(a);!this.html.video.gate&&!this.html.audio.gate&&(this._updateMute(a),this._updateVolume(this.options.volume),this._trigger(b.jPlayer.event.volumechange))},mute:function(a){a=a===f?!0:!!a;this._muted(a)},unmute:function(a){a=a===f?!0:!!a;this._muted(!a)},_updateMute:function(a){if(a=== +f)a=this.options.muted;this.css.jq.mute.length&&this.css.jq.unmute.length&&(this.status.noVolume?(this.css.jq.mute.hide(),this.css.jq.unmute.hide()):a?(this.css.jq.mute.hide(),this.css.jq.unmute.show()):(this.css.jq.mute.show(),this.css.jq.unmute.hide()))},volume:function(a){a=this._limitValue(a,0,1);this.options.volume=a;this.html.used&&this._html_volume(a);this.flash.used&&this._flash_volume(a);!this.html.video.gate&&!this.html.audio.gate&&(this._updateVolume(a),this._trigger(b.jPlayer.event.volumechange))}, +volumeBar:function(a){if(this.css.jq.volumeBar.length){var b=this.css.jq.volumeBar.offset(),d=a.pageX-b.left,e=this.css.jq.volumeBar.width(),a=this.css.jq.volumeBar.height()-a.pageY+b.top,b=this.css.jq.volumeBar.height();this.options.verticalVolume?this.volume(a/b):this.volume(d/e)}this.options.muted&&this._muted(!1)},volumeBarValue:function(a){this.volumeBar(a)},_updateVolume:function(a){if(a===f)a=this.options.volume;a=this.options.muted?0:a;this.status.noVolume?(this.css.jq.volumeBar.length&&this.css.jq.volumeBar.hide(), +this.css.jq.volumeBarValue.length&&this.css.jq.volumeBarValue.hide(),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.hide()):(this.css.jq.volumeBar.length&&this.css.jq.volumeBar.show(),this.css.jq.volumeBarValue.length&&(this.css.jq.volumeBarValue.show(),this.css.jq.volumeBarValue[this.options.verticalVolume?"height":"width"](a*100+"%")),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.show())},volumeMax:function(){this.volume(1);this.options.muted&&this._muted(!1)},_cssSelectorAncestor:function(a){var c= +this;this.options.cssSelectorAncestor=a;this._removeUiClass();this.ancestorJq=a?b(a):[];a&&this.ancestorJq.length!==1&&this._warning({type:b.jPlayer.warning.CSS_SELECTOR_COUNT,context:a,message:b.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.ancestorJq.length+" found for cssSelectorAncestor.",hint:b.jPlayer.warningHint.CSS_SELECTOR_COUNT});this._addUiClass();b.each(this.options.cssSelector,function(a,b){c._cssSelector(a,b)})},_cssSelector:function(a,c){var d=this;typeof c==="string"?b.jPlayer.prototype.options.cssSelector[a]? +(this.css.jq[a]&&this.css.jq[a].length&&this.css.jq[a].unbind(".jPlayer"),this.options.cssSelector[a]=c,this.css.cs[a]=this.options.cssSelectorAncestor+" "+c,this.css.jq[a]=c?b(this.css.cs[a]):[],this.css.jq[a].length&&this.css.jq[a].bind("click.jPlayer",function(c){d[a](c);b(this).blur();return!1}),c&&this.css.jq[a].length!==1&&this._warning({type:b.jPlayer.warning.CSS_SELECTOR_COUNT,context:this.css.cs[a],message:b.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[a].length+" found for "+a+" method.", +hint:b.jPlayer.warningHint.CSS_SELECTOR_COUNT})):this._warning({type:b.jPlayer.warning.CSS_SELECTOR_METHOD,context:a,message:b.jPlayer.warningMsg.CSS_SELECTOR_METHOD,hint:b.jPlayer.warningHint.CSS_SELECTOR_METHOD}):this._warning({type:b.jPlayer.warning.CSS_SELECTOR_STRING,context:c,message:b.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:b.jPlayer.warningHint.CSS_SELECTOR_STRING})},seekBar:function(a){if(this.css.jq.seekBar){var b=this.css.jq.seekBar.offset(),a=a.pageX-b.left,b=this.css.jq.seekBar.width(); +this.playHead(100*a/b)}},playBar:function(a){this.seekBar(a)},repeat:function(){this._loop(!0)},repeatOff:function(){this._loop(!1)},_loop:function(a){if(this.options.loop!==a)this.options.loop=a,this._updateButtons(),this._trigger(b.jPlayer.event.repeat)},currentTime:function(){},duration:function(){},gui:function(){},noSolution:function(){},option:function(a,c){var d=a;if(arguments.length===0)return b.extend(!0,{},this.options);if(typeof a==="string"){var e=a.split(".");if(c===f){for(var d=b.extend(!0, +{},this.options),g=0;g0?this._html_load():clearTimeout(this.internal.htmlDlyCmdId);this.htmlElement.media.pause();if(!isNaN(a))try{this.htmlElement.media.currentTime=a}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.pause(a)},100);return}a>0&&this._html_checkWaitForPlay()},_html_playHead:function(a){var b=this;this._html_load();try{if(typeof this.htmlElement.media.seekable==="object"&&this.htmlElement.media.seekable.length>0)this.htmlElement.media.currentTime= +a*this.htmlElement.media.seekable.end(this.htmlElement.media.seekable.length-1)/100;else if(this.htmlElement.media.duration>0&&!isNaN(this.htmlElement.media.duration))this.htmlElement.media.currentTime=a*this.htmlElement.media.duration/100;else throw"e";}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.playHead(a)},100);return}this.status.waitForLoad||this._html_checkWaitForPlay()},_html_checkWaitForPlay:function(){if(this.status.waitForPlay)this.status.waitForPlay=!1,this.css.jq.videoPlay.length&& +this.css.jq.videoPlay.hide(),this.status.video&&(this.internal.poster.jq.hide(),this.internal.video.jq.css({width:this.status.width,height:this.status.height}))},_html_volume:function(a){if(this.html.audio.available)this.htmlElement.audio.volume=a;if(this.html.video.available)this.htmlElement.video.volume=a},_html_mute:function(a){if(this.html.audio.available)this.htmlElement.audio.muted=a;if(this.html.video.available)this.htmlElement.video.muted=a},_flash_setAudio:function(a){var c=this;try{if(b.each(this.formats, +function(b,d){if(c.flash.support[d]&&a[d]){switch(d){case "m4a":case "fla":c._getMovie().fl_setAudio_m4a(a[d]);break;case "mp3":c._getMovie().fl_setAudio_mp3(a[d])}c.status.src=a[d];c.status.format[d]=!0;c.status.formatType=d;return!1}}),this.options.preload==="auto")this._flash_load(),this.status.waitForLoad=!1}catch(d){this._flashError(d)}},_flash_setVideo:function(a){var c=this;try{if(b.each(this.formats,function(b,d){if(c.flash.support[d]&&a[d]){switch(d){case "m4v":case "flv":c._getMovie().fl_setVideo_m4v(a[d])}c.status.src= +a[d];c.status.format[d]=!0;c.status.formatType=d;return!1}}),this.options.preload==="auto")this._flash_load(),this.status.waitForLoad=!1}catch(d){this._flashError(d)}},_flash_resetMedia:function(){this.internal.flash.jq.css({width:"0px",height:"0px"});this._flash_pause(NaN)},_flash_clearMedia:function(){try{this._getMovie().fl_clearMedia()}catch(a){this._flashError(a)}},_flash_load:function(){try{this._getMovie().fl_load()}catch(a){this._flashError(a)}this.status.waitForLoad=!1},_flash_play:function(a){try{this._getMovie().fl_play(a)}catch(b){this._flashError(b)}this.status.waitForLoad= +!1;this._flash_checkWaitForPlay()},_flash_pause:function(a){try{this._getMovie().fl_pause(a)}catch(b){this._flashError(b)}if(a>0)this.status.waitForLoad=!1,this._flash_checkWaitForPlay()},_flash_playHead:function(a){try{this._getMovie().fl_play_head(a)}catch(b){this._flashError(b)}this.status.waitForLoad||this._flash_checkWaitForPlay()},_flash_checkWaitForPlay:function(){if(this.status.waitForPlay)this.status.waitForPlay=!1,this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide(),this.status.video&& +(this.internal.poster.jq.hide(),this.internal.flash.jq.css({width:this.status.width,height:this.status.height}))},_flash_volume:function(a){try{this._getMovie().fl_volume(a)}catch(b){this._flashError(b)}},_flash_mute:function(a){try{this._getMovie().fl_mute(a)}catch(b){this._flashError(b)}},_getMovie:function(){return document[this.internal.flash.id]},_checkForFlash:function(a){var b=!1,d;if(window.ActiveXObject)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+a),b=!0}catch(e){}else navigator.plugins&& +navigator.mimeTypes.length>0&&(d=navigator.plugins["Shockwave Flash"])&&navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1")>=a&&(b=!0);return b},_validString:function(a){return a&&typeof a==="string"},_limitValue:function(a,b,d){return ad?d:a},_urlNotSetError:function(a){this._error({type:b.jPlayer.error.URL_NOT_SET,context:a,message:b.jPlayer.errorMsg.URL_NOT_SET,hint:b.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(a){var c;c=this.internal.ready?"FLASH_DISABLED": +"FLASH";this._error({type:b.jPlayer.error[c],context:this.internal.flash.swf,message:b.jPlayer.errorMsg[c]+a.message,hint:b.jPlayer.errorHint[c]});this.internal.flash.jq.css({width:"1px",height:"1px"})},_error:function(a){this._trigger(b.jPlayer.event.error,a);this.options.errorAlerts&&this._alert("Error!"+(a.message?"\n\n"+a.message:"")+(a.hint?"\n\n"+a.hint:"")+"\n\nContext: "+a.context)},_warning:function(a){this._trigger(b.jPlayer.event.warning,f,a);this.options.warningAlerts&&this._alert("Warning!"+ +(a.message?"\n\n"+a.message:"")+(a.hint?"\n\n"+a.hint:"")+"\n\nContext: "+a.context)},_alert:function(a){alert("jPlayer "+this.version.script+" : id='"+this.internal.self.id+"' : "+a)},_emulateHtmlBridge:function(){var a=this;b.each(b.jPlayer.emulateMethods.split(/\s+/g),function(b,d){a.internal.domNode[d]=function(b){a[d](b)}});b.each(b.jPlayer.event,function(c,d){var e=!0;b.each(b.jPlayer.reservedEvent.split(/\s+/g),function(a,b){if(b===c)return e=!1});e&&a.element.bind(d+".jPlayer.jPlayerHtml", +function(){a._emulateHtmlUpdate();var b=document.createEvent("Event");b.initEvent(c,!1,!0);a.internal.domNode.dispatchEvent(b)})})},_emulateHtmlUpdate:function(){var a=this;b.each(b.jPlayer.emulateStatus.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.status[d]});b.each(b.jPlayer.emulateOptions.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.options[d]})},_destroyHtmlBridge:function(){var a=this;this.element.unbind(".jPlayerHtml");b.each((b.jPlayer.emulateMethods+" "+b.jPlayer.emulateStatus+ +" "+b.jPlayer.emulateOptions).split(/\s+/g),function(b,d){delete a.internal.domNode[d]})}};b.jPlayer.error={FLASH:"e_flash",FLASH_DISABLED:"e_flash_disabled",NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"};b.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",FLASH_DISABLED:"jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ", +NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.",NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayer "+b.jPlayer.prototype.version.script+" needs Jplayer.swf version "+b.jPlayer.prototype.version.needFlash+" but found "};b.jPlayer.errorHint= +{FLASH:"Check your swfPath option and that Jplayer.swf is there.",FLASH_DISABLED:"Check that you have not display:none; the jPlayer entity or any ancestor.",NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."};b.jPlayer.warning={CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method", +CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"};b.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of css selectors found did not equal one: ",CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",OPTION_KEY:"The option requested in jPlayer('option') is undefined."};b.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.", +CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}})(jQuery); \ No newline at end of file diff --git a/apps/catalogue/static/player/player.css b/apps/catalogue/static/player/player.css new file mode 100644 index 000000000..c449803e5 --- /dev/null +++ b/apps/catalogue/static/player/player.css @@ -0,0 +1,17 @@ +#player h1 { + font-size: 2em; + margin: .5em; +} + +.player-info { + margin: 1em; +} + + +.play { + cursor: pointer; +} + +.play:hover { + color: #0D7E85; +} diff --git a/apps/catalogue/static/player/player.js b/apps/catalogue/static/player/player.js new file mode 100755 index 000000000..69dceed55 --- /dev/null +++ b/apps/catalogue/static/player/player.js @@ -0,0 +1,34 @@ +(function($) { + $(function() { + + $("#jplayer").each(function() { + var $self = $(this); + $self.jPlayer({ + swfPath: "/static/jplayer/", + solution: "html,flash", + supplied: $self.attr('data-supplied'), + + ready: function() { + var player = $(this); + var setMedia = function(elem) { + var li = $(elem).parent(); + $('.jp-playlist-current').removeClass('jp-playlist-current'); + $(li).addClass('jp-playlist-current'); + var media = {} + + $('.mp3', li).each(function() {media['mp3'] = $(this).attr('href')}); + $('.ogg', li).each(function() {media['oga'] = $(this).attr('href')}); + + return player.jPlayer("setMedia", media); + }; + setMedia($('.play').first()).jPlayer("play"); + + $('.play').click(function() { + setMedia(this).jPlayer("play"); + }); + } + }); + }); + + }); +})(jQuery) \ No newline at end of file diff --git a/apps/catalogue/templates/catalogue/book_text.html b/apps/catalogue/templates/catalogue/book_text.html index 027a75807..53a0c6a5f 100644 --- a/apps/catalogue/templates/catalogue/book_text.html +++ b/apps/catalogue/templates/catalogue/book_text.html @@ -1,4 +1,5 @@ {% load i18n %} +{% load static from staticfiles %} {% load chunks compressed catalogue_tags %} @@ -6,7 +7,7 @@ {% trans "Wolne Lektury" %} :: {{ book.pretty_title }} - + {% compressed_css "book" %} {% compressed_js "book" %} @@ -47,7 +48,7 @@
      diff --git a/apps/catalogue/templates/catalogue/player.html b/apps/catalogue/templates/catalogue/player.html index a3ef25ca5..7ecf3e669 100755 --- a/apps/catalogue/templates/catalogue/player.html +++ b/apps/catalogue/templates/catalogue/player.html @@ -9,7 +9,7 @@ content="{{ book.title }} - darmowy audiobook na wolnej licencji" /> {% trans "Wolne Lektury" %} :: {{ book.title }} - {{ audiobook }} - + {% compressed_css "all" %} {% compressed_css "player" %} diff --git a/apps/compress/__init__.py b/apps/compress/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/compress/conf/__init__.py b/apps/compress/conf/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/compress/conf/settings.py b/apps/compress/conf/settings.py deleted file mode 100644 index f6949a201..000000000 --- a/apps/compress/conf/settings.py +++ /dev/null @@ -1,22 +0,0 @@ -from django.core.exceptions import ImproperlyConfigured -from django.conf import settings - -COMPRESS = getattr(settings, 'COMPRESS', not settings.DEBUG) -COMPRESS_AUTO = getattr(settings, 'COMPRESS_AUTO', True) -COMPRESS_VERSION = getattr(settings, 'COMPRESS_VERSION', False) -COMPRESS_VERSION_PLACEHOLDER = getattr(settings, 'COMPRESS_VERSION_PLACEHOLDER', '?') -COMPRESS_VERSION_DEFAULT = getattr(settings, 'COMPRESS_VERSION_DEFAULT', '0') - -COMPRESS_CSS_FILTERS = getattr(settings, 'COMPRESS_CSS_FILTERS', ['compress.filters.csstidy.CSSTidyFilter']) -COMPRESS_JS_FILTERS = getattr(settings, 'COMPRESS_JS_FILTERS', ['compress.filters.jsmin.JSMinFilter']) -COMPRESS_CSS = getattr(settings, 'COMPRESS_CSS', {}) -COMPRESS_JS = getattr(settings, 'COMPRESS_JS', {}) - -if COMPRESS_CSS_FILTERS is None: - COMPRESS_CSS_FILTERS = [] - -if COMPRESS_JS_FILTERS is None: - COMPRESS_JS_FILTERS = [] - -if COMPRESS_VERSION and not COMPRESS_AUTO: - raise ImproperlyConfigured('COMPRESS_AUTO needs to be True when using COMPRESS_VERSION.') diff --git a/apps/compress/filter_base.py b/apps/compress/filter_base.py deleted file mode 100644 index 9bb23b2ff..000000000 --- a/apps/compress/filter_base.py +++ /dev/null @@ -1,14 +0,0 @@ -class FilterBase: - def __init__(self, verbose): - self.verbose = verbose - - def filter_css(self, css): - raise NotImplementedError - def filter_js(self, js): - raise NotImplementedError - -class FilterError(Exception): - """ - This exception is raised when a filter fails - """ - pass \ No newline at end of file diff --git a/apps/compress/filters/__init__.py b/apps/compress/filters/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/compress/filters/csstidy/__init__.py b/apps/compress/filters/csstidy/__init__.py deleted file mode 100644 index ae7c10313..000000000 --- a/apps/compress/filters/csstidy/__init__.py +++ /dev/null @@ -1,33 +0,0 @@ -import os -import warnings -import tempfile - -from django.conf import settings - -from compress.filter_base import FilterBase - -BINARY = getattr(settings, 'CSSTIDY_BINARY', 'csstidy') -ARGUMENTS = getattr(settings, 'CSSTIDY_ARGUMENTS', '--template=highest') - -warnings.simplefilter('ignore', RuntimeWarning) - -class CSSTidyFilter(FilterBase): - def filter_css(self, css): - tmp_file = tempfile.NamedTemporaryFile(mode='w+b') - tmp_file.write(css) - tmp_file.flush() - - output_file = tempfile.NamedTemporaryFile(mode='w+b') - - command = '%s %s %s %s' % (BINARY, tmp_file.name, ARGUMENTS, output_file.name) - - command_output = os.popen(command).read() - - filtered_css = output_file.read() - output_file.close() - tmp_file.close() - - if self.verbose: - print command_output - - return filtered_css diff --git a/apps/compress/filters/csstidy_python/__init__.py b/apps/compress/filters/csstidy_python/__init__.py deleted file mode 100644 index 03a4ac012..000000000 --- a/apps/compress/filters/csstidy_python/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -from django.conf import settings - -from compress.filter_base import FilterBase -from compress.filters.csstidy_python.csstidy import CSSTidy - -COMPRESS_CSSTIDY_SETTINGS = getattr(settings, 'COMPRESS_CSSTIDY_SETTINGS', {}) - -class CSSTidyFilter(FilterBase): - def filter_css(self, css): - tidy = CSSTidy() - - for k, v in COMPRESS_CSSTIDY_SETTINGS.items(): - tidy.setSetting(k, v) - - tidy.parse(css) - - r = tidy.Output('string') - - return r diff --git a/apps/compress/filters/csstidy_python/csstidy.py b/apps/compress/filters/csstidy_python/csstidy.py deleted file mode 100644 index 6ae8dc732..000000000 --- a/apps/compress/filters/csstidy_python/csstidy.py +++ /dev/null @@ -1,636 +0,0 @@ -# CSSTidy - CSS Parse -# -# CSS Parser class -# -# This file is part of CSSTidy. -# -# CSSTidy is free software you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation either version 2 of the License, or -# (at your option) any later version. -# -# CSSTidy is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with CSSTidy if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# -# @license http://opensource.org/licenses/gpl-license.php GNU Public License -# @package csstidy -# @author Dj Gilcrease (digitalxero at gmail dot com) 2005-2006 - -import re - -from optimizer import CSSOptimizer -from output import CSSPrinter -import data -from tools import SortedDict - -class CSSTidy(object): - #Saves the parsed CSS - _css = "" - _raw_css = SortedDict() - _optimized_css = SortedDict() - - #List of Tokens - _tokens = [] - - #Printer class - _output = None - - #Optimiser class - _optimizer = None - - #Saves the CSS charset (@charset) - _charset = '' - - #Saves all @import URLs - _import = [] - - #Saves the namespace - _namespace = '' - - #Contains the version of csstidy - _version = '1.3' - - #Stores the settings - _settings = {} - - # Saves the parser-status. - # - # Possible values: - # - is = in selector - # - ip = in property - # - iv = in value - # - instr = in string (started at " or ' or ( ) - # - ic = in comment (ignore everything) - # - at = in @-block - _status = 'is' - - #Saves the current at rule (@media) - _at = '' - - #Saves the current selector - _selector = '' - - #Saves the current property - _property = '' - - #Saves the position of , in selectors - _sel_separate = [] - - #Saves the current value - _value = '' - - #Saves the current sub-value - _sub_value = '' - - #Saves all subvalues for a property. - _sub_value_arr = [] - - #Saves the char which opened the last string - _str_char = '' - _cur_string = '' - - #Status from which the parser switched to ic or instr - _from = '' - - #Variable needed to manage string-in-strings, for example url("foo.png") - _str_in_str = False - - #=True if in invalid at-rule - _invalid_at = False - - #=True if something has been added to the current selector - _added = False - - #Saves the message log - _log = SortedDict() - - #Saves the line number - _line = 1 - - def __init__(self): - self._settings['remove_bslash'] = True - self._settings['compress_colors'] = True - self._settings['compress_font-weight'] = True - self._settings['lowercase_s'] = False - self._settings['optimise_shorthands'] = 2 - self._settings['remove_last_'] = False - self._settings['case_properties'] = 1 - self._settings['sort_properties'] = False - self._settings['sort_selectors'] = False - self._settings['merge_selectors'] = 2 - self._settings['discard_invalid_properties'] = False - self._settings['css_level'] = 'CSS2.1' - self._settings['preserve_css'] = False - self._settings['timestamp'] = False - self._settings['template'] = 'highest_compression' - - #Maps self._status to methods - self.__statusMethod = {'is':self.__parseStatus_is, 'ip': self.__parseStatus_ip, 'iv':self.__parseStatus_iv, 'instr':self.__parseStatus_instr, 'ic':self.__parseStatus_ic, 'at':self.__parseStatus_at} - - self._output = CSSPrinter(self) - self._optimizer = CSSOptimizer(self) - - #Public Methods - def getSetting(self, setting): - return self._settings.get(setting, False) - - #Set the value of a setting. - def setSetting(self, setting, value): - self._settings[setting] = value - return True - - def log(self, message, ttype, line = -1): - if line == -1: - line = self._line - - line = int(line) - - add = {'m': message, 't': ttype} - - if not self._log.has_key(line): - self._log[line] = [] - self._log[line].append(add) - elif add not in self._log[line]: - self._log[line].append(add) - - - #Checks if a character is escaped (and returns True if it is) - def escaped(self, string, pos): - return not (string[pos-1] != '\\' or self.escaped(string, pos-1)) - - #Adds CSS to an existing media/selector - def merge_css_blocks(self, media, selector, css_add): - for prop, value in css_add.iteritems(): - self.__css_add_property(media, selector, prop, value, False) - - #Checks if $value is !important. - def is_important(self, value): - return '!important' in value.lower() - - #Returns a value without !important - def gvw_important(self, value): - if self.is_important(value): - ret = value.strip() - ret = ret[0:-9] - ret = ret.strip() - ret = ret[0:-1] - ret = ret.strip() - return ret - - return value - - def parse(self, cssString): - #Switch from \r\n to \n - self._css = cssString.replace("\r\n", "\n") + ' ' - self._raw_css = {} - self._optimized_css = {} - self._curComment = '' - - #Start Parsing - i = 0 - while i < len(cssString): - if self._css[i] == "\n" or self._css[i] == "\r": - self._line += 1 - - i += self.__statusMethod[self._status](i) - - i += 1; - - self._optimized_css = self._optimizer.optimize(self._raw_css) - - def parseFile(self, filename): - try: - f = open(filename, "r") - self.parse(f.read()) - finally: - f.close() - - #Private Methods - def __parseStatus_is(self, idx): - """ - Parse in Selector - """ - ret = 0 - - if self.__is_token(self._css, idx): - if self._css[idx] == '/' and self._css[idx+1] == '*' and self._selector.strip() == '': - self._status = 'ic' - self._from = 'is' - return 1 - - elif self._css[idx] == '@' and self._selector.strip() == '': - #Check for at-rule - self._invalid_at = True - - for name, ttype in data.at_rules.iteritems(): - if self._css[idx+1:len(name)].lower() == name.lower(): - if ttype == 'at': - self._at = '@' + name - else: - self._selector = '@' + name - - self._status = ttype - self._invalid_at = False - ret += len(name) - - if self._invalid_at: - self._selector = '@' - invalid_at_name = '' - for j in xrange(idx+1, len(self._css)): - if not self._css[j].isalpha(): - break; - - invalid_at_name += self._css[j] - - self.log('Invalid @-rule: ' + invalid_at_name + ' (removed)', 'Warning') - - elif self._css[idx] == '"' or self._css[idx] == "'": - self._cur_string = self._css[idx] - self._status = 'instr' - self._str_char = self._css[idx] - self._from = 'is' - - elif self._invalid_at and self._css[idx] == ';': - self._invalid_at = False - self._status = 'is' - - elif self._css[idx] == '{': - self._status = 'ip' - self.__add_token(data.SEL_START, self._selector) - self._added = False; - - elif self._css[idx] == '}': - self.__add_token(data.AT_END, self._at) - self._at = '' - self._selector = '' - self._sel_separate = [] - - elif self._css[idx] == ',': - self._selector = self._selector.strip() + ',' - self._sel_separate.append(len(self._selector)) - - elif self._css[idx] == '\\': - self._selector += self.__unicode(idx) - - #remove unnecessary universal selector, FS#147 - elif not (self._css[idx] == '*' and self._css[idx+1] in ('.', '#', '[', ':')): - self._selector += self._css[idx] - - else: - lastpos = len(self._selector)-1 - - if lastpos == -1 or not ((self._selector[lastpos].isspace() or self.__is_token(self._selector, lastpos) and self._selector[lastpos] == ',') and self._css[idx].isspace()): - self._selector += self._css[idx] - - return ret - - def __parseStatus_ip(self, idx): - """ - Parse in property - """ - if self.__is_token(self._css, idx): - if (self._css[idx] == ':' or self._css[idx] == '=') and self._property != '': - self._status = 'iv' - - if not self.getSetting('discard_invalid_properties') or self.__property_is_valid(self._property): - self.__add_token(data.PROPERTY, self._property) - - elif self._css[idx] == '/' and self._css[idx+1] == '*' and self._property == '': - self._status = 'ic' - self._from = 'ip' - return 1 - - elif self._css[idx] == '}': - self.__explode_selectors() - self._status = 'is' - self._invalid_at = False - self.__add_token(data.SEL_END, self._selector) - self._selector = '' - self._property = '' - - elif self._css[idx] == ';': - self._property = '' - - elif self._css[idx] == '\\': - self._property += self.__unicode(idx) - - elif not self._css[idx].isspace(): - self._property += self._css[idx] - - return 0 - - def __parseStatus_iv(self, idx): - """ - Parse in value - """ - pn = (( self._css[idx] == "\n" or self._css[idx] == "\r") and self.__property_is_next(idx+1) or idx == len(self._css)) #CHECK# - if self.__is_token(self._css, idx) or pn: - if self._css[idx] == '/' and self._css[idx+1] == '*': - self._status = 'ic' - self._from = 'iv' - return 1 - - elif self._css[idx] == '"' or self._css[idx] == "'" or self._css[idx] == '(': - self._cur_string = self._css[idx] - self._str_char = ')' if self._css[idx] == '(' else self._css[idx] - self._status = 'instr' - self._from = 'iv' - - elif self._css[idx] == ',': - self._sub_value = self._sub_value.strip() + ',' - - elif self._css[idx] == '\\': - self._sub_value += self.__unicode(idx) - - elif self._css[idx] == ';' or pn: - if len(self._selector) > 0 and self._selector[0] == '@' and data.at_rules.has_key(self._selector[1:]) and data.at_rules[self._selector[1:]] == 'iv': - self._sub_value_arr.append(self._sub_value.strip()) - - self._status = 'is' - - if '@charset' in self._selector: - self._charset = self._sub_value_arr[0] - - elif '@namespace' in self._selector: - self._namespace = ' '.join(self._sub_value_arr) - - elif '@import' in self._selector: - self._import.append(' '.join(self._sub_value_arr)) - - - self._sub_value_arr = [] - self._sub_value = '' - self._selector = '' - self._sel_separate = [] - - else: - self._status = 'ip' - - elif self._css[idx] != '}': - self._sub_value += self._css[idx] - - if (self._css[idx] == '}' or self._css[idx] == ';' or pn) and self._selector != '': - if self._at == '': - self._at = data.DEFAULT_AT - - #case settings - if self.getSetting('lowercase_s'): - self._selector = self._selector.lower() - - self._property = self._property.lower() - - if self._sub_value != '': - self._sub_value_arr.append(self._sub_value) - self._sub_value = '' - - self._value = ' '.join(self._sub_value_arr) - - - self._selector = self._selector.strip() - - valid = self.__property_is_valid(self._property) - - if (not self._invalid_at or self.getSetting('preserve_css')) and (not self.getSetting('discard_invalid_properties') or valid): - self.__css_add_property(self._at, self._selector, self._property, self._value) - self.__add_token(data.VALUE, self._value) - - if not valid: - if self.getSetting('discard_invalid_properties'): - self.log('Removed invalid property: ' + self._property, 'Warning') - - else: - self.log('Invalid property in ' + self.getSetting('css_level').upper() + ': ' + self._property, 'Warning') - - self._property = ''; - self._sub_value_arr = [] - self._value = '' - - if self._css[idx] == '}': - self.__explode_selectors() - self.__add_token(data.SEL_END, self._selector) - self._status = 'is' - self._invalid_at = False - self._selector = '' - - elif not pn: - self._sub_value += self._css[idx] - - if self._css[idx].isspace(): - if self._sub_value != '': - self._sub_value_arr.append(self._sub_value) - self._sub_value = '' - - return 0 - - def __parseStatus_instr(self, idx): - """ - Parse in String - """ - if self._str_char == ')' and (self._css[idx] == '"' or self._css[idx] == "'") and not self.escaped(self._css, idx): - self._str_in_str = not self._str_in_str - - temp_add = self._css[idx] # ...and no not-escaped backslash at the previous position - if (self._css[idx] == "\n" or self._css[idx] == "\r") and not (self._css[idx-1] == '\\' and not self.escaped(self._css, idx-1)): - temp_add = "\\A " - self.log('Fixed incorrect newline in string', 'Warning') - - if not (self._str_char == ')' and self._css[idx].isspace() and not self._str_in_str): - self._cur_string += temp_add - - if self._css[idx] == self._str_char and not self.escaped(self._css, idx) and not self._str_in_str: - self._status = self._from - regex = re.compile(r'([\s]+)', re.I | re.U | re.S) - if regex.match(self._cur_string) is None and self._property != 'content': - if self._str_char == '"' or self._str_char == "'": - self._cur_string = self._cur_string[1:-1] - - elif len(self._cur_string) > 3 and (self._cur_string[1] == '"' or self._cur_string[1] == "'"): - self._cur_string = self._cur_string[0] + self._cur_string[2:-2] + self._cur_string[-1] - - if self._from == 'iv': - self._sub_value += self._cur_string - - elif self._from == 'is': - self._selector += self._cur_string - - return 0 - - def __parseStatus_ic(self, idx): - """ - Parse css In Comment - """ - if self._css[idx] == '*' and self._css[idx+1] == '/': - self._status = self._from - self.__add_token(data.COMMENT, self._curComment) - self._curComment = '' - return 1 - - else: - self._curComment += self._css[idx] - - return 0 - - def __parseStatus_at(self, idx): - """ - Parse in at-block - """ - if self.__is_token(string, idx): - if self._css[idx] == '/' and self._css[idx+1] == '*': - self._status = 'ic' - self._from = 'at' - return 1 - - elif self._css[i] == '{': - self._status = 'is' - self.__add_token(data.AT_START, self._at) - - elif self._css[i] == ',': - self._at = self._at.strip() + ',' - - elif self._css[i] == '\\': - self._at += self.__unicode(i) - else: - lastpos = len(self._at)-1 - if not (self._at[lastpos].isspace() or self.__is_token(self._at, lastpos) and self._at[lastpos] == ',') and self._css[i].isspace(): - self._at += self._css[i] - - return 0 - - def __explode_selectors(self): - #Explode multiple selectors - if self.getSetting('merge_selectors') == 1: - new_sels = [] - lastpos = 0; - self._sel_separate.append(len(self._selector)) - - for num in xrange(len(self._sel_separate)): - pos = self._sel_separate[num] - if num == (len(self._sel_separate)): #CHECK# - pos += 1 - - new_sels.append(self._selector[lastpos:(pos-lastpos-1)]) - lastpos = pos - - if len(new_sels) > 1: - for selector in new_sels: - self.merge_css_blocks(self._at, selector, self._raw_css[self._at][self._selector]) - - del self._raw_css[self._at][self._selector] - - self._sel_separate = [] - - #Adds a property with value to the existing CSS code - def __css_add_property(self, media, selector, prop, new_val): - if self.getSetting('preserve_css') or new_val.strip() == '': - return - - if not self._raw_css.has_key(media): - self._raw_css[media] = SortedDict() - - if not self._raw_css[media].has_key(selector): - self._raw_css[media][selector] = SortedDict() - - self._added = True - if self._raw_css[media][selector].has_key(prop): - if (self.is_important(self._raw_css[media][selector][prop]) and self.is_important(new_val)) or not self.is_important(self._raw_css[media][selector][prop]): - del self._raw_css[media][selector][prop] - self._raw_css[media][selector][prop] = new_val.strip() - - else: - self._raw_css[media][selector][prop] = new_val.strip() - - #Checks if the next word in a string from pos is a CSS property - def __property_is_next(self, pos): - istring = self._css[pos: len(self._css)] - pos = istring.find(':') - if pos == -1: - return False; - - istring = istring[:pos].strip().lower() - if data.all_properties.has_key(istring): - self.log('Added semicolon to the end of declaration', 'Warning') - return True - - return False; - - #Checks if a property is valid - def __property_is_valid(self, prop): - return (data.all_properties.has_key(prop) and data.all_properties[prop].find(self.getSetting('css_level').upper()) != -1) - - #Adds a token to self._tokens - def __add_token(self, ttype, cssdata, do=False): - if self.getSetting('preserve_css') or do: - if ttype == data.COMMENT: - token = [ttype, cssdata] - else: - token = [ttype, cssdata.strip()] - - self._tokens.append(token) - - #Parse unicode notations and find a replacement character - def __unicode(self, idx): - ##FIX## - return '' - - #Starts parsing from URL - ##USED? - def __parse_from_url(self, url): - try: - if "http" in url.lower() or "https" in url.lower(): - f = urllib.urlopen(url) - else: - f = open(url) - - data = f.read() - return self.parse(data) - finally: - f.close() - - #Checks if there is a token at the current position - def __is_token(self, string, idx): - return (string[idx] in data.tokens and not self.escaped(string, idx)) - - - #Property Methods - def _getOutput(self): - self._output.prepare(self._optimized_css) - return self._output.render - - def _getLog(self): - ret = "" - ks = self._log.keys() - ks.sort() - for line in ks: - for msg in self._log[line]: - ret += "Type: " + msg['t'] + "\n" - ret += "Message: " + msg['m'] + "\n" - ret += "\n" - - return ret - - def _getCSS(self): - return self._css - - - #Properties - Output = property(_getOutput, None) - Log = property(_getLog, None) - CSS = property(_getCSS, None) - - -if __name__ == '__main__': - import sys - tidy = CSSTidy() - f = open(sys.argv[1], "r") - css = f.read() - f.close() - tidy.parse(css) - tidy.Output('file', filename="Stylesheet.min.css") - print tidy.Output() - #print tidy._import \ No newline at end of file diff --git a/apps/compress/filters/csstidy_python/data.py b/apps/compress/filters/csstidy_python/data.py deleted file mode 100644 index bd728cbaa..000000000 --- a/apps/compress/filters/csstidy_python/data.py +++ /dev/null @@ -1,421 +0,0 @@ -# Various CSS Data for CSSTidy -# -# This file is part of CSSTidy. -# -# CSSTidy is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# CSSTidy is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with CSSTidy; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# -# @license http://opensource.org/licenses/gpl-license.php GNU Public License -# @package csstidy -# @author Florian Schmitz (floele at gmail dot com) 2005 - -AT_START = 1 -AT_END = 2 -SEL_START = 3 -SEL_END = 4 -PROPERTY = 5 -VALUE = 6 -COMMENT = 7 -DEFAULT_AT = 41 - -# All whitespace allowed in CSS -# -# @global array whitespace -# @version 1.0 -whitespace = frozenset([' ',"\n","\t","\r","\x0B"]) - -# All CSS tokens used by csstidy -# -# @global string tokens -# @version 1.0 -tokens = '/@}{;:=\'"(,\\!$%&)#+.<>?[]^`|~' - -# All CSS units (CSS 3 units included) -# -# @see compress_numbers() -# @global array units -# @version 1.0 -units = frozenset(['in','cm','mm','pt','pc','px','rem','em','%','ex','gd','vw','vh','vm','deg','grad','rad','ms','s','khz','hz']) - -# Available at-rules -# -# @global array at_rules -# @version 1.0 -at_rules = {'page':'is', 'font-face':'is', 'charset':'iv', 'import':'iv', 'namespace':'iv', 'media':'at'} - -# Properties that need a value with unit -# -# @todo CSS3 properties -# @see compress_numbers() -# @global array unit_values -# @version 1.2 -unit_values = frozenset(['background', 'background-position', 'border', 'border-top', 'border-right', 'border-bottom', - 'border-left', 'border-width', 'border-top-width', 'border-right-width', 'border-left-width', - 'border-bottom-width', 'bottom', 'border-spacing', 'font-size','height', 'left', 'margin', 'margin-top', - 'margin-right', 'margin-bottom', 'margin-left', 'max-height', 'max-width', 'min-height', 'min-width', - 'outline-width', 'padding', 'padding-top', 'padding-right', 'padding-bottom', 'padding-left','position', - 'right', 'top', 'text-indent', 'letter-spacing', 'word-spacing', 'width' - ]) - - -# Properties that allow as value -# -# @todo CSS3 properties -# @see compress_numbers() -# @global array color_values -# @version 1.0 -color_values = frozenset(['background-color', 'border-color', 'border-top-color', 'border-right-color', - 'border-bottom-color', 'border-left-color', 'color', 'outline-color']) - - -# Default values for the background properties -# -# @todo Possibly property names will change during CSS3 development -# @global array background_prop_default -# @see dissolve_short_bg() -# @see merge_bg() -# @version 1.0 -background_prop_default = {} -background_prop_default['background-image'] = 'none' -background_prop_default['background-size'] = 'auto' -background_prop_default['background-repeat'] = 'repeat' -background_prop_default['background-position'] = '0 0' -background_prop_default['background-attachment'] = 'scroll' -background_prop_default['background-clip'] = 'border' -background_prop_default['background-origin'] = 'padding' -background_prop_default['background-color'] = 'transparent' - -# A list of non-W3C color names which get replaced by their hex-codes -# -# @global array replace_colors -# @see cut_color() -# @version 1.0 -replace_colors = {} -replace_colors['aliceblue'] = '#F0F8FF' -replace_colors['antiquewhite'] = '#FAEBD7' -replace_colors['aquamarine'] = '#7FFFD4' -replace_colors['azure'] = '#F0FFFF' -replace_colors['beige'] = '#F5F5DC' -replace_colors['bisque'] = '#FFE4C4' -replace_colors['blanchedalmond'] = '#FFEBCD' -replace_colors['blueviolet'] = '#8A2BE2' -replace_colors['brown'] = '#A52A2A' -replace_colors['burlywood'] = '#DEB887' -replace_colors['cadetblue'] = '#5F9EA0' -replace_colors['chartreuse'] = '#7FFF00' -replace_colors['chocolate'] = '#D2691E' -replace_colors['coral'] = '#FF7F50' -replace_colors['cornflowerblue'] = '#6495ED' -replace_colors['cornsilk'] = '#FFF8DC' -replace_colors['crimson'] = '#DC143C' -replace_colors['cyan'] = '#00FFFF' -replace_colors['darkblue'] = '#00008B' -replace_colors['darkcyan'] = '#008B8B' -replace_colors['darkgoldenrod'] = '#B8860B' -replace_colors['darkgray'] = '#A9A9A9' -replace_colors['darkgreen'] = '#006400' -replace_colors['darkkhaki'] = '#BDB76B' -replace_colors['darkmagenta'] = '#8B008B' -replace_colors['darkolivegreen'] = '#556B2F' -replace_colors['darkorange'] = '#FF8C00' -replace_colors['darkorchid'] = '#9932CC' -replace_colors['darkred'] = '#8B0000' -replace_colors['darksalmon'] = '#E9967A' -replace_colors['darkseagreen'] = '#8FBC8F' -replace_colors['darkslateblue'] = '#483D8B' -replace_colors['darkslategray'] = '#2F4F4F' -replace_colors['darkturquoise'] = '#00CED1' -replace_colors['darkviolet'] = '#9400D3' -replace_colors['deeppink'] = '#FF1493' -replace_colors['deepskyblue'] = '#00BFFF' -replace_colors['dimgray'] = '#696969' -replace_colors['dodgerblue'] = '#1E90FF' -replace_colors['feldspar'] = '#D19275' -replace_colors['firebrick'] = '#B22222' -replace_colors['floralwhite'] = '#FFFAF0' -replace_colors['forestgreen'] = '#228B22' -replace_colors['gainsboro'] = '#DCDCDC' -replace_colors['ghostwhite'] = '#F8F8FF' -replace_colors['gold'] = '#FFD700' -replace_colors['goldenrod'] = '#DAA520' -replace_colors['greenyellow'] = '#ADFF2F' -replace_colors['honeydew'] = '#F0FFF0' -replace_colors['hotpink'] = '#FF69B4' -replace_colors['indianred'] = '#CD5C5C' -replace_colors['indigo'] = '#4B0082' -replace_colors['ivory'] = '#FFFFF0' -replace_colors['khaki'] = '#F0E68C' -replace_colors['lavender'] = '#E6E6FA' -replace_colors['lavenderblush'] = '#FFF0F5' -replace_colors['lawngreen'] = '#7CFC00' -replace_colors['lemonchiffon'] = '#FFFACD' -replace_colors['lightblue'] = '#ADD8E6' -replace_colors['lightcoral'] = '#F08080' -replace_colors['lightcyan'] = '#E0FFFF' -replace_colors['lightgoldenrodyellow'] = '#FAFAD2' -replace_colors['lightgrey'] = '#D3D3D3' -replace_colors['lightgreen'] = '#90EE90' -replace_colors['lightpink'] = '#FFB6C1' -replace_colors['lightsalmon'] = '#FFA07A' -replace_colors['lightseagreen'] = '#20B2AA' -replace_colors['lightskyblue'] = '#87CEFA' -replace_colors['lightslateblue'] = '#8470FF' -replace_colors['lightslategray'] = '#778899' -replace_colors['lightsteelblue'] = '#B0C4DE' -replace_colors['lightyellow'] = '#FFFFE0' -replace_colors['limegreen'] = '#32CD32' -replace_colors['linen'] = '#FAF0E6' -replace_colors['magenta'] = '#FF00FF' -replace_colors['mediumaquamarine'] = '#66CDAA' -replace_colors['mediumblue'] = '#0000CD' -replace_colors['mediumorchid'] = '#BA55D3' -replace_colors['mediumpurple'] = '#9370D8' -replace_colors['mediumseagreen'] = '#3CB371' -replace_colors['mediumslateblue'] = '#7B68EE' -replace_colors['mediumspringgreen'] = '#00FA9A' -replace_colors['mediumturquoise'] = '#48D1CC' -replace_colors['mediumvioletred'] = '#C71585' -replace_colors['midnightblue'] = '#191970' -replace_colors['mintcream'] = '#F5FFFA' -replace_colors['mistyrose'] = '#FFE4E1' -replace_colors['moccasin'] = '#FFE4B5' -replace_colors['navajowhite'] = '#FFDEAD' -replace_colors['oldlace'] = '#FDF5E6' -replace_colors['olivedrab'] = '#6B8E23' -replace_colors['orangered'] = '#FF4500' -replace_colors['orchid'] = '#DA70D6' -replace_colors['palegoldenrod'] = '#EEE8AA' -replace_colors['palegreen'] = '#98FB98' -replace_colors['paleturquoise'] = '#AFEEEE' -replace_colors['palevioletred'] = '#D87093' -replace_colors['papayawhip'] = '#FFEFD5' -replace_colors['peachpuff'] = '#FFDAB9' -replace_colors['peru'] = '#CD853F' -replace_colors['pink'] = '#FFC0CB' -replace_colors['plum'] = '#DDA0DD' -replace_colors['powderblue'] = '#B0E0E6' -replace_colors['rosybrown'] = '#BC8F8F' -replace_colors['royalblue'] = '#4169E1' -replace_colors['saddlebrown'] = '#8B4513' -replace_colors['salmon'] = '#FA8072' -replace_colors['sandybrown'] = '#F4A460' -replace_colors['seagreen'] = '#2E8B57' -replace_colors['seashell'] = '#FFF5EE' -replace_colors['sienna'] = '#A0522D' -replace_colors['skyblue'] = '#87CEEB' -replace_colors['slateblue'] = '#6A5ACD' -replace_colors['slategray'] = '#708090' -replace_colors['snow'] = '#FFFAFA' -replace_colors['springgreen'] = '#00FF7F' -replace_colors['steelblue'] = '#4682B4' -replace_colors['tan'] = '#D2B48C' -replace_colors['thistle'] = '#D8BFD8' -replace_colors['tomato'] = '#FF6347' -replace_colors['turquoise'] = '#40E0D0' -replace_colors['violet'] = '#EE82EE' -replace_colors['violetred'] = '#D02090' -replace_colors['wheat'] = '#F5DEB3' -replace_colors['whitesmoke'] = '#F5F5F5' -replace_colors['yellowgreen'] = '#9ACD32' - -#A list of optimized colors -optimize_colors = {} -optimize_colors['black'] = '#000' -optimize_colors['fuchsia'] = '#F0F' -optimize_colors['white'] = '#FFF' -optimize_colors['yellow'] = '#FF0' -optimize_colors['cyan'] = '#0FF' -optimize_colors['magenta'] = '#F0F' -optimize_colors['lightslategray'] = '#789' - -optimize_colors['#800000'] = 'maroon' -optimize_colors['#FFA500'] = 'orange' -optimize_colors['#808000'] = 'olive' -optimize_colors['#800080'] = 'purple' -optimize_colors['#008000'] = 'green' -optimize_colors['#000080'] = 'navy' -optimize_colors['#008080'] = 'teal' -optimize_colors['#C0C0C0'] = 'silver' -optimize_colors['#808080'] = 'gray' -optimize_colors['#4B0082'] = 'indigo' -optimize_colors['#FFD700'] = 'gold' -optimize_colors['#A52A2A'] = 'brown' -optimize_colors['#00FFFF'] = 'cyan' -optimize_colors['#EE82EE'] = 'violet' -optimize_colors['#DA70D6'] = 'orchid' -optimize_colors['#FFE4C4'] = 'bisque' -optimize_colors['#F0E68C'] = 'khaki' -optimize_colors['#F5DEB3'] = 'wheat' -optimize_colors['#FF7F50'] = 'coral' -optimize_colors['#F5F5DC'] = 'beige' -optimize_colors['#F0FFFF'] = 'azure' -optimize_colors['#A0522D'] = 'sienna' -optimize_colors['#CD853F'] = 'peru' -optimize_colors['#FFFFF0'] = 'ivory' -optimize_colors['#DDA0DD'] = 'plum' -optimize_colors['#D2B48C'] = 'tan' -optimize_colors['#FFC0CB'] = 'pink' -optimize_colors['#FFFAFA'] = 'snow' -optimize_colors['#FA8072'] = 'salmon' -optimize_colors['#FF6347'] = 'tomato' -optimize_colors['#FAF0E6'] = 'linen' -optimize_colors['#F00'] = 'red' - - -# A list of all shorthand properties that are devided into four properties and/or have four subvalues -# -# @global array shorthands -# @todo Are there new ones in CSS3? -# @see dissolve_4value_shorthands() -# @see merge_4value_shorthands() -# @version 1.0 -shorthands = {} -shorthands['border-color'] = ['border-top-color','border-right-color','border-bottom-color','border-left-color'] -shorthands['border-style'] = ['border-top-style','border-right-style','border-bottom-style','border-left-style'] -shorthands['border-width'] = ['border-top-width','border-right-width','border-bottom-width','border-left-width'] -shorthands['margin'] = ['margin-top','margin-right','margin-bottom','margin-left'] -shorthands['padding'] = ['padding-top','padding-right','padding-bottom','padding-left'] -shorthands['-moz-border-radius'] = 0 - -# All CSS Properties. Needed for csstidy::property_is_next() -# -# @global array all_properties -# @todo Add CSS3 properties -# @version 1.0 -# @see csstidy::property_is_next() -all_properties = {} -all_properties['background'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['background-color'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['background-image'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['background-repeat'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['background-attachment'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['background-position'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['border'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['border-top'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['border-right'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['border-bottom'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['border-left'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['border-color'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['border-top-color'] = 'CSS2.0,CSS2.1' -all_properties['border-bottom-color'] = 'CSS2.0,CSS2.1' -all_properties['border-left-color'] = 'CSS2.0,CSS2.1' -all_properties['border-right-color'] = 'CSS2.0,CSS2.1' -all_properties['border-style'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['border-top-style'] = 'CSS2.0,CSS2.1' -all_properties['border-right-style'] = 'CSS2.0,CSS2.1' -all_properties['border-left-style'] = 'CSS2.0,CSS2.1' -all_properties['border-bottom-style'] = 'CSS2.0,CSS2.1' -all_properties['border-width'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['border-top-width'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['border-right-width'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['border-left-width'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['border-bottom-width'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['border-collapse'] = 'CSS2.0,CSS2.1' -all_properties['border-spacing'] = 'CSS2.0,CSS2.1' -all_properties['bottom'] = 'CSS2.0,CSS2.1' -all_properties['caption-side'] = 'CSS2.0,CSS2.1' -all_properties['content'] = 'CSS2.0,CSS2.1' -all_properties['clear'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['clip'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['color'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['counter-reset'] = 'CSS2.0,CSS2.1' -all_properties['counter-increment'] = 'CSS2.0,CSS2.1' -all_properties['cursor'] = 'CSS2.0,CSS2.1' -all_properties['empty-cells'] = 'CSS2.0,CSS2.1' -all_properties['display'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['direction'] = 'CSS2.0,CSS2.1' -all_properties['float'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['font'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['font-family'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['font-style'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['font-variant'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['font-weight'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['font-stretch'] = 'CSS2.0' -all_properties['font-size-adjust'] = 'CSS2.0' -all_properties['font-size'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['height'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['left'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['line-height'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['list-style'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['list-style-type'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['list-style-image'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['list-style-position'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['margin'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['margin-top'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['margin-right'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['margin-bottom'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['margin-left'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['marks'] = 'CSS1.0,CSS2.0' -all_properties['marker-offset'] = 'CSS2.0' -all_properties['max-height'] = 'CSS2.0,CSS2.1' -all_properties['max-width'] = 'CSS2.0,CSS2.1' -all_properties['min-height'] = 'CSS2.0,CSS2.1' -all_properties['min-width'] = 'CSS2.0,CSS2.1' -all_properties['overflow'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['orphans'] = 'CSS2.0,CSS2.1' -all_properties['outline'] = 'CSS2.0,CSS2.1' -all_properties['outline-width'] = 'CSS2.0,CSS2.1' -all_properties['outline-style'] = 'CSS2.0,CSS2.1' -all_properties['outline-color'] = 'CSS2.0,CSS2.1' -all_properties['padding'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['padding-top'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['padding-right'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['padding-bottom'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['padding-left'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['page-break-before'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['page-break-after'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['page-break-inside'] = 'CSS2.0,CSS2.1' -all_properties['page'] = 'CSS2.0' -all_properties['position'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['quotes'] = 'CSS2.0,CSS2.1' -all_properties['right'] = 'CSS2.0,CSS2.1' -all_properties['size'] = 'CSS1.0,CSS2.0' -all_properties['speak-header'] = 'CSS2.0,CSS2.1' -all_properties['table-layout'] = 'CSS2.0,CSS2.1' -all_properties['top'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['text-indent'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['text-align'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['text-decoration'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['text-shadow'] = 'CSS2.0' -all_properties['letter-spacing'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['word-spacing'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['text-transform'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['white-space'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['unicode-bidi'] = 'CSS2.0,CSS2.1' -all_properties['vertical-align'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['visibility'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['width'] = 'CSS1.0,CSS2.0,CSS2.1' -all_properties['widows'] = 'CSS2.0,CSS2.1' -all_properties['z-index'] = 'CSS1.0,CSS2.0,CSS2.1' - -# Speech # -all_properties['volume'] = 'CSS2.0,CSS2.1' -all_properties['speak'] = 'CSS2.0,CSS2.1' -all_properties['pause'] = 'CSS2.0,CSS2.1' -all_properties['pause-before'] = 'CSS2.0,CSS2.1' -all_properties['pause-after'] = 'CSS2.0,CSS2.1' -all_properties['cue'] = 'CSS2.0,CSS2.1' -all_properties['cue-before'] = 'CSS2.0,CSS2.1' -all_properties['cue-after'] = 'CSS2.0,CSS2.1' -all_properties['play-during'] = 'CSS2.0,CSS2.1' -all_properties['azimuth'] = 'CSS2.0,CSS2.1' -all_properties['elevation'] = 'CSS2.0,CSS2.1' -all_properties['speech-rate'] = 'CSS2.0,CSS2.1' -all_properties['voice-family'] = 'CSS2.0,CSS2.1' -all_properties['pitch'] = 'CSS2.0,CSS2.1' -all_properties['pitch-range'] = 'CSS2.0,CSS2.1' -all_properties['stress'] = 'CSS2.0,CSS2.1' -all_properties['richness'] = 'CSS2.0,CSS2.1' -all_properties['speak-punctuation'] = 'CSS2.0,CSS2.1' -all_properties['speak-numeral'] = 'CSS2.0,CSS2.1' \ No newline at end of file diff --git a/apps/compress/filters/csstidy_python/optimizer.py b/apps/compress/filters/csstidy_python/optimizer.py deleted file mode 100644 index 7cd284cfc..000000000 --- a/apps/compress/filters/csstidy_python/optimizer.py +++ /dev/null @@ -1,383 +0,0 @@ -# CSSTidy - CSS Optimizer -# -# CSS Optimizer class -# -# This file is part of CSSTidy. -# -# CSSTidy is free software you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation either version 2 of the License, or -# (at your option) any later version. -# -# CSSTidy is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with CSSTidy if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# -# @license http://opensource.org/licenses/gpl-license.php GNU Public License -# @package csstidy -# @author Dj Gilcrease (digitalxero at gmail dot com) 2005-2006 - -import data -from tools import SortedDict - - -class CSSOptimizer(object): - def __init__(self, parser): - #raw_css is a dict - self.parser = parser - self._optimized_css = SortedDict - - -#PUBLIC METHODS - def optimize(self, raw_css): - if self.parser.getSetting('preserve_css'): - return raw_css - - self._optimized_css = raw_css - - if self.parser.getSetting('merge_selectors') == 2: - self.__merge_selectors() - - ##OPTIMIZE## - for media, css in self._optimized_css.iteritems(): - for selector, cssdata in css.iteritems(): - if self.parser.getSetting('optimise_shorthands') >= 1: - cssdata = self.__merge_4value_shorthands(cssdata) - - if self.parser.getSetting('optimise_shorthands') >= 2: - cssdata = self.__merge_bg(cssdata) - - for item, value in cssdata.iteritems(): - value = self.__compress_numbers(item, value) - value = self.__compress_important(value) - - if item in data.color_values and self.parser.getSetting('compress_colors'): - old = value[:] - value = self.__compress_color(value) - if old != value: - self.parser.log('In "' + selector + '" Optimised ' + item + ': Changed ' + old + ' to ' + value, 'Information') - - if item == 'font-weight' and self.parser.getSetting('compress_font-weight'): - if value == 'bold': - value = '700' - self.parser.log('In "' + selector + '" Optimised font-weight: Changed "bold" to "700"', 'Information') - - elif value == 'normal': - value = '400' - self.parser.log('In "' + selector + '" Optimised font-weight: Changed "normal" to "400"', 'Information') - - self._optimized_css[media][selector][item] = value - - - return self._optimized_css - - -#PRIVATE METHODS - def __merge_bg(self, cssdata): - """ - Merges all background properties - @cssdata (dict) is a dictionary of the selector properties - """ - #Max number of background images. CSS3 not yet fully implemented - img = 1 - clr = 1 - bg_img_list = [] - if cssdata.has_key('background-image'): - img = len(cssdata['background-image'].split(',')) - bg_img_list = self.parser.gvw_important(cssdata['background-image']).split(',') - - elif cssdata.has_key('background-color'): - clr = len(cssdata['background-color'].split(',')) - - - number_of_values = max(img, clr, 1) - - new_bg_value = '' - important = '' - - for i in xrange(number_of_values): - for bg_property, default_value in data.background_prop_default.iteritems(): - #Skip if property does not exist - if not cssdata.has_key(bg_property): - continue - - cur_value = cssdata[bg_property] - - #Skip some properties if there is no background image - if (len(bg_img_list) > i and bg_img_list[i] == 'none') and bg_property in frozenset(['background-size', 'background-position', 'background-attachment', 'background-repeat']): - continue - - #Remove !important - if self.parser.is_important(cur_value): - important = ' !important' - cur_value = self.parser.gvw_important(cur_value) - - #Do not add default values - if cur_value == default_value: - continue - - temp = cur_value.split(',') - - if len(temp) > i: - if bg_property == 'background-size': - new_bg_value += '(' + temp[i] + ') ' - - else: - new_bg_value += temp[i] + ' ' - - new_bg_value = new_bg_value.strip() - if i != (number_of_values-1): - new_bg_value += ',' - - #Delete all background-properties - for bg_property, default_value in data.background_prop_default.iteritems(): - try: - del cssdata[bg_property] - except: - pass - - #Add new background property - if new_bg_value != '': - cssdata['background'] = new_bg_value + important - - return cssdata - - def __merge_4value_shorthands(self, cssdata): - """ - Merges Shorthand properties again, the opposite of dissolve_4value_shorthands() - @cssdata (dict) is a dictionary of the selector properties - """ - for key, value in data.shorthands.iteritems(): - important = '' - if value != 0 and cssdata.has_key(value[0]) and cssdata.has_key(value[1]) and cssdata.has_key(value[2]) and cssdata.has_key(value[3]): - cssdata[key] = '' - - for i in xrange(4): - val = cssdata[value[i]] - if self.parser.is_important(val): - important = '!important' - cssdata[key] += self.parser.gvw_important(val) + ' ' - - else: - cssdata[key] += val + ' ' - - del cssdata[value[i]] - if cssdata.has_key(key): - cssdata[key] = self.__shorthand(cssdata[key] + important.strip()) - - return cssdata - - - def __merge_selectors(self): - """ - Merges selectors with same properties. Example: a{color:red} b{color:red} . a,b{color:red} - Very basic and has at least one bug. Hopefully there is a replacement soon. - @selector_one (string) is the current selector - @value_one (dict) is a dictionary of the selector properties - Note: Currently is the elements of a selector are identical, but in a different order, they are not merged - """ - - ##OPTIMIZE## - ##FIX## - - raw_css = self._optimized_css.copy() - delete = [] - add = SortedDict() - for media, css in raw_css.iteritems(): - for selector_one, value_one in css.iteritems(): - newsel = selector_one - - for selector_two, value_two in css.iteritems(): - if selector_one == selector_two: - #We need to skip self - continue - - if value_one == value_two: - #Ok, we need to merge these two selectors - newsel += ', ' + selector_two - delete.append((media, selector_two)) - - - if not add.has_key(media): - add[media] = SortedDict() - - add[media][newsel] = value_one - delete.append((media, selector_one)) - - for item in delete: - try: - del self._optimized_css[item[0]][item[1]] - except: - #Must have already been deleted - continue - - for media, css in add.iteritems(): - self._optimized_css[media].update(css) - - - - def __shorthand(self, value): - """ - Compresses shorthand values. Example: margin:1px 1px 1px 1px . margin:1px - @value (string) - """ - - ##FIX## - - important = ''; - if self.parser.is_important(value): - value_list = self.parser.gvw_important(value) - important = '!important' - else: - value_list = value - - ret = value - value_list = value_list.split(' ') - - if len(value_list) == 4: - if value_list[0] == value_list[1] and value_list[0] == value_list[2] and value_list[0] == value_list[3]: - ret = value_list[0] + important - - elif value_list[1] == value_list[3] and value_list[0] == value_list[2]: - ret = value_list[0] + ' ' + value_list[1] + important - - elif value_list[1] == value_list[3]: - ret = value_list[0] + ' ' + value_list[1] + ' ' + value_list[2] + important - - elif len(value_list) == 3: - if value_list[0] == value_list[1] and value_list[0] == value_list[2]: - ret = value_list[0] + important - - elif value_list[0] == value_list[2]: - return value_list[0] + ' ' + value_list[1] + important - - elif len(value_list) == 2: - if value_list[0] == value_list[1]: - ret = value_list[0] + important - - if ret != value: - self.parser.log('Optimised shorthand notation: Changed "' + value + '" to "' + ret + '"', 'Information') - - return ret - - def __compress_important(self, value): - """ - Removes unnecessary whitespace in ! important - @value (string) - """ - if self.parser.is_important(value): - value = self.parser.gvw_important(value) + '!important' - - return value - - def __compress_numbers(self, prop, value): - """ - Compresses numbers (ie. 1.0 becomes 1 or 1.100 becomes 1.1 ) - @value (string) is the posible number to be compressed - """ - - ##FIX## - - value = value.split('/') - - for l in xrange(len(value)): - #continue if no numeric value - if not (len(value[l]) > 0 and (value[l][0].isdigit() or value[l][0] in ('+', '-') )): - continue - - #Fix bad colors - if prop in data.color_values: - value[l] = '#' + value[l] - - is_floatable = False - try: - float(value[l]) - is_floatable = True - except: - pass - - if is_floatable and float(value[l]) == 0: - value[l] = '0' - - elif value[l][0] != '#': - unit_found = False - for unit in data.units: - pos = value[l].lower().find(unit) - if pos != -1 and prop not in data.shorthands: - value[l] = self.__remove_leading_zeros(float(value[l][:pos])) + unit - unit_found = True - break; - - if not unit_found and prop in data.unit_values and prop not in data.shorthands: - value[l] = self.__remove_leading_zeros(float(value[l])) + 'px' - - elif not unit_found and prop not in data.shorthands: - value[l] = self.__remove_leading_zeros(float(value[l])) - - - if len(value) > 1: - return '/'.join(value) - - return value[0] - - def __remove_leading_zeros(self, float_val): - """ - Removes the leading zeros from a float value - @float_val (float) - @returns (string) - """ - #Remove leading zero - if abs(float_val) < 1: - if float_val < 0: - float_val = '-' . str(float_val)[2:] - else: - float_val = str(float_val)[1:] - - return str(float_val) - - def __compress_color(self, color): - """ - Color compression function. Converts all rgb() values to #-values and uses the short-form if possible. Also replaces 4 color names by #-values. - @color (string) the {posible} color to change - """ - - #rgb(0,0,0) . #000000 (or #000 in this case later) - if color[:4].lower() == 'rgb(': - color_tmp = color[4:(len(color)-5)] - color_tmp = color_tmp.split(',') - - for c in color_tmp: - c = c.strip() - if c[:-1] == '%': - c = round((255*color_tmp[i])/100) - - if color_tmp[i] > 255: - color_tmp[i] = 255 - - color = '#' - - for i in xrange(3): - if color_tmp[i] < 16: - color += '0' + str(hex(color_tmp[i])).replace('0x', '') - else: - color += str(hex(color_tmp[i])).replace('0x', '') - - #Fix bad color names - if data.replace_colors.has_key(color.lower()): - color = data.replace_colors[color.lower()] - - #aabbcc . #abc - if len(color) == 7: - color_temp = color.lower() - if color_temp[0] == '#' and color_temp[1] == color_temp[2] and color_temp[3] == color_temp[4] and color_temp[5] == color_temp[6]: - color = '#' + color[1] + color[3] + color[5] - - if data.optimize_colors.has_key(color.lower()): - color = data.optimize_colors[color.lower()] - - return color \ No newline at end of file diff --git a/apps/compress/filters/csstidy_python/output.py b/apps/compress/filters/csstidy_python/output.py deleted file mode 100644 index 795a0d050..000000000 --- a/apps/compress/filters/csstidy_python/output.py +++ /dev/null @@ -1,101 +0,0 @@ -# CSSTidy - CSS Printer -# -# CSS Printer class -# -# This file is part of CSSTidy. -# -# CSSTidy is free software you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation either version 2 of the License, or -# (at your option) any later version. -# -# CSSTidy is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with CSSTidy if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# -# @license http://opensource.org/licenses/gpl-license.php GNU Public License -# @package csstidy -# @author Dj Gilcrease (digitalxero at gmail dot com) 2005-2006 - -import data - -class CSSPrinter(object): - def __init__(self, parser): - self.parser = parser - self._css = {} - self.__renderMethods = {'string': self.__renderString, 'file': self.__renderFile} - -#PUBLIC METHODS - def prepare(self, css): - self._css = css - - def render(self, output="string", *args, **kwargs): - return self.__renderMethods[output](*args, **kwargs) - -#PRIVATE METHODS - def __renderString(self, *args, **kwargs): - ##OPTIMIZE## - template = self.parser.getSetting('template') - ret = "" - - if template == 'highest_compression': - top_line_end = "" - iner_line_end = "" - bottom_line_end = "" - indent = "" - - elif template == 'high_compression': - top_line_end = "\n" - iner_line_end = "" - bottom_line_end = "\n" - indent = "" - - elif template == 'default': - top_line_end = "\n" - iner_line_end = "\n" - bottom_line_end = "\n\n" - indent = "" - - elif template == 'low_compression': - top_line_end = "\n" - iner_line_end = "\n" - bottom_line_end = "\n\n" - indent = " " - - if self.parser.getSetting('timestamp'): - ret += '/# CSSTidy ' + self.parser.version + ': ' + datetime.now().strftime("%a, %d %b %Y %H:%M:%S +0000") + ' #/' + top_line_end - - for item in self.parser._import: - ret += '@import(' + item + ');' + top_line_end - - for item in self.parser._charset: - ret += '@charset(' + item + ');' + top_line_end - - for item in self.parser._namespace: - ret += '@namespace(' + item + ');' + top_line_end - - for media, css in self._css.iteritems(): - for selector, cssdata in css.iteritems(): - ret += selector + '{' + top_line_end - - for item, value in cssdata.iteritems(): - ret += indent + item + ':' + value + ';' + iner_line_end - - ret += '}' + bottom_line_end - - return ret - - def __renderFile(self, filename=None, *args, **kwargs): - if filename is None: - return self.__renderString() - - try: - f = open(filename, "w") - f.write(self.__renderString()) - finally: - f.close() \ No newline at end of file diff --git a/apps/compress/filters/csstidy_python/tools.py b/apps/compress/filters/csstidy_python/tools.py deleted file mode 100644 index e62faef2c..000000000 --- a/apps/compress/filters/csstidy_python/tools.py +++ /dev/null @@ -1,109 +0,0 @@ - -class SortedDict(dict): - """ - A dictionary that keeps its keys in the order in which they're inserted. - """ - def __init__(self, data=None): - if data is None: - data = {} - super(SortedDict, self).__init__(data) - if isinstance(data, dict): - self.keyOrder = data.keys() - else: - self.keyOrder = [] - for key, value in data: - if key not in self.keyOrder: - self.keyOrder.append(key) - - def __deepcopy__(self, memo): - from copy import deepcopy - return self.__class__([(key, deepcopy(value, memo)) - for key, value in self.iteritems()]) - - def __setitem__(self, key, value): - super(SortedDict, self).__setitem__(key, value) - if key not in self.keyOrder: - self.keyOrder.append(key) - - def __delitem__(self, key): - super(SortedDict, self).__delitem__(key) - self.keyOrder.remove(key) - - def __iter__(self): - for k in self.keyOrder: - yield k - - def pop(self, k, *args): - result = super(SortedDict, self).pop(k, *args) - try: - self.keyOrder.remove(k) - except ValueError: - # Key wasn't in the dictionary in the first place. No problem. - pass - return result - - def popitem(self): - result = super(SortedDict, self).popitem() - self.keyOrder.remove(result[0]) - return result - - def items(self): - return zip(self.keyOrder, self.values()) - - def iteritems(self): - for key in self.keyOrder: - yield key, super(SortedDict, self).__getitem__(key) - - def keys(self): - return self.keyOrder[:] - - def iterkeys(self): - return iter(self.keyOrder) - - def values(self): - return [super(SortedDict, self).__getitem__(k) for k in self.keyOrder] - - def itervalues(self): - for key in self.keyOrder: - yield super(SortedDict, self).__getitem__(key) - - def update(self, dict_): - for k, v in dict_.items(): - self.__setitem__(k, v) - - def setdefault(self, key, default): - if key not in self.keyOrder: - self.keyOrder.append(key) - return super(SortedDict, self).setdefault(key, default) - - def value_for_index(self, index): - """Returns the value of the item at the given zero-based index.""" - return self[self.keyOrder[index]] - - def insert(self, index, key, value): - """Inserts the key, value pair before the item with the given index.""" - if key in self.keyOrder: - n = self.keyOrder.index(key) - del self.keyOrder[n] - if n < index: - index -= 1 - self.keyOrder.insert(index, key) - super(SortedDict, self).__setitem__(key, value) - - def copy(self): - """Returns a copy of this object.""" - # This way of initializing the copy means it works for subclasses, too. - obj = self.__class__(self) - obj.keyOrder = self.keyOrder[:] - return obj - - def __repr__(self): - """ - Replaces the normal dict.__repr__ with a version that returns the keys - in their sorted order. - """ - return '{%s}' % ', '.join(['%r: %r' % (k, v) for k, v in self.items()]) - - def clear(self): - super(SortedDict, self).clear() - self.keyOrder = [] \ No newline at end of file diff --git a/apps/compress/filters/jsmin/__init__.py b/apps/compress/filters/jsmin/__init__.py deleted file mode 100644 index d22620081..000000000 --- a/apps/compress/filters/jsmin/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -from compress.filters.jsmin.jsmin import jsmin -from compress.filter_base import FilterBase - -class JSMinFilter(FilterBase): - def filter_js(self, js): - return jsmin(js) \ No newline at end of file diff --git a/apps/compress/filters/jsmin/jsmin.py b/apps/compress/filters/jsmin/jsmin.py deleted file mode 100644 index 4f9d384f1..000000000 --- a/apps/compress/filters/jsmin/jsmin.py +++ /dev/null @@ -1,218 +0,0 @@ -#!/usr/bin/python - -# This code is original from jsmin by Douglas Crockford, it was translated to -# Python by Baruch Even. The original code had the following copyright and -# license. -# -# /* jsmin.c -# 2007-05-22 -# -# Copyright (c) 2002 Douglas Crockford (www.crockford.com) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy of -# this software and associated documentation files (the "Software"), to deal in -# the Software without restriction, including without limitation the rights to -# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -# of the Software, and to permit persons to whom the Software is furnished to do -# so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# The Software shall be used for Good, not Evil. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# */ - -from StringIO import StringIO - -def jsmin(js): - ins = StringIO(js) - outs = StringIO() - JavascriptMinify().minify(ins, outs) - str = outs.getvalue() - if len(str) > 0 and str[0] == '\n': - str = str[1:] - return str - -def isAlphanum(c): - """return true if the character is a letter, digit, underscore, - dollar sign, or non-ASCII character. - """ - return ((c >= 'a' and c <= 'z') or (c >= '0' and c <= '9') or - (c >= 'A' and c <= 'Z') or c == '_' or c == '$' or c == '\\' or (c is not None and ord(c) > 126)); - -class UnterminatedComment(Exception): - pass - -class UnterminatedStringLiteral(Exception): - pass - -class UnterminatedRegularExpression(Exception): - pass - -class JavascriptMinify(object): - - def _outA(self): - self.outstream.write(self.theA) - def _outB(self): - self.outstream.write(self.theB) - - def _get(self): - """return the next character from stdin. Watch out for lookahead. If - the character is a control character, translate it to a space or - linefeed. - """ - c = self.theLookahead - self.theLookahead = None - if c == None: - c = self.instream.read(1) - if c >= ' ' or c == '\n': - return c - if c == '': # EOF - return '\000' - if c == '\r': - return '\n' - return ' ' - - def _peek(self): - self.theLookahead = self._get() - return self.theLookahead - - def _next(self): - """get the next character, excluding comments. peek() is used to see - if a '/' is followed by a '/' or '*'. - """ - c = self._get() - if c == '/': - p = self._peek() - if p == '/': - c = self._get() - while c > '\n': - c = self._get() - return c - if p == '*': - c = self._get() - while 1: - c = self._get() - if c == '*': - if self._peek() == '/': - self._get() - return ' ' - if c == '\000': - raise UnterminatedComment() - - return c - - def _action(self, action): - """do something! What you do is determined by the argument: - 1 Output A. Copy B to A. Get the next B. - 2 Copy B to A. Get the next B. (Delete A). - 3 Get the next B. (Delete B). - action treats a string as a single character. Wow! - action recognizes a regular expression if it is preceded by ( or , or =. - """ - if action <= 1: - self._outA() - - if action <= 2: - self.theA = self.theB - if self.theA == "'" or self.theA == '"': - while 1: - self._outA() - self.theA = self._get() - if self.theA == self.theB: - break - if self.theA <= '\n': - raise UnterminatedStringLiteral() - if self.theA == '\\': - self._outA() - self.theA = self._get() - - - if action <= 3: - self.theB = self._next() - if self.theB == '/' and (self.theA == '(' or self.theA == ',' or - self.theA == '=' or self.theA == ':' or - self.theA == '[' or self.theA == '?' or - self.theA == '!' or self.theA == '&' or - self.theA == '|' or self.theA == ';' or - self.theA == '{' or self.theA == '}' or - self.theA == '\n'): - self._outA() - self._outB() - while 1: - self.theA = self._get() - if self.theA == '/': - break - elif self.theA == '\\': - self._outA() - self.theA = self._get() - elif self.theA <= '\n': - raise UnterminatedRegularExpression() - self._outA() - self.theB = self._next() - - - def _jsmin(self): - """Copy the input to the output, deleting the characters which are - insignificant to JavaScript. Comments will be removed. Tabs will be - replaced with spaces. Carriage returns will be replaced with linefeeds. - Most spaces and linefeeds will be removed. - """ - self.theA = '\n' - self._action(3) - - while self.theA != '\000': - if self.theA == ' ': - if isAlphanum(self.theB): - self._action(1) - else: - self._action(2) - elif self.theA == '\n': - if self.theB in ['{', '[', '(', '+', '-']: - self._action(1) - elif self.theB == ' ': - self._action(3) - else: - if isAlphanum(self.theB): - self._action(1) - else: - self._action(2) - else: - if self.theB == ' ': - if isAlphanum(self.theA): - self._action(1) - else: - self._action(3) - elif self.theB == '\n': - if self.theA in ['}', ']', ')', '+', '-', '"', '\'']: - self._action(1) - else: - if isAlphanum(self.theA): - self._action(1) - else: - self._action(3) - else: - self._action(1) - - def minify(self, instream, outstream): - self.instream = instream - self.outstream = outstream - self.theA = '\n' - self.theB = None - self.theLookahead = None - - self._jsmin() - self.instream.close() - -if __name__ == '__main__': - import sys - jsm = JavascriptMinify() - jsm.minify(sys.stdin, sys.stdout) \ No newline at end of file diff --git a/apps/compress/filters/yui/__init__.py b/apps/compress/filters/yui/__init__.py deleted file mode 100644 index 1e2e711fd..000000000 --- a/apps/compress/filters/yui/__init__.py +++ /dev/null @@ -1,44 +0,0 @@ -import subprocess - -from django.conf import settings - -from compress.filter_base import FilterBase, FilterError - -BINARY = getattr(settings, 'COMPRESS_YUI_BINARY', 'java -jar yuicompressor.jar') -CSS_ARGUMENTS = getattr(settings, 'COMPRESS_YUI_CSS_ARGUMENTS', '') -JS_ARGUMENTS = getattr(settings, 'COMPRESS_YUI_JS_ARGUMENTS', '') - -class YUICompressorFilter(FilterBase): - - def filter_common(self, content, type_, arguments): - command = '%s --type=%s %s' % (BINARY, type_, arguments) - - if self.verbose: - command += ' --verbose' - - p = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE) - p.stdin.write(content) - p.stdin.close() - - filtered_css = p.stdout.read() - p.stdout.close() - - err = p.stderr.read() - p.stderr.close() - - if p.wait() != 0: - if not err: - err = 'Unable to apply YUI Compressor filter' - - raise FilterError(err) - - if self.verbose: - print err - - return filtered_css - - def filter_js(self, js): - return self.filter_common(js, 'js', JS_ARGUMENTS) - - def filter_css(self, css): - return self.filter_common(css, 'css', CSS_ARGUMENTS) \ No newline at end of file diff --git a/apps/compress/management/__init__.py b/apps/compress/management/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/compress/management/commands/__init__.py b/apps/compress/management/commands/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/compress/management/commands/synccompress.py b/apps/compress/management/commands/synccompress.py deleted file mode 100644 index e2fc6aa2e..000000000 --- a/apps/compress/management/commands/synccompress.py +++ /dev/null @@ -1,59 +0,0 @@ -from django.core.management.base import NoArgsCommand -from optparse import make_option - -from django.conf import settings - -class Command(NoArgsCommand): - option_list = NoArgsCommand.option_list + ( - make_option('--force', action='store_true', default=False, help='Force update of all files, even if the source files are older than the current compressed file.'), - ) - help = 'Updates and compresses CSS and JavsScript on-demand, without restarting Django' - args = '' - - def handle_noargs(self, **options): - - force = options.get('force', False) - verbosity = int(options.get('verbosity', 1)) - - from compress.utils import needs_update, filter_css, filter_js - - for name, css in settings.COMPRESS_CSS.items(): - print css['output_filename'] - u, version = needs_update(css['output_filename'], - css['source_filenames']) - - if (force or u) or verbosity >= 2: - msg = 'CSS Group \'%s\'' % name - print msg - print len(msg) * '-' - print "Version: %s" % version - - if force or u: - filter_css(css, verbosity) - - if (force or u) or verbosity >= 2: - print - - for name, js in settings.COMPRESS_JS.items(): - u, version = needs_update(js['output_filename'], - js['source_filenames']) - - if (force or u) or verbosity >= 2: - msg = 'JavaScript Group \'%s\'' % name - print msg - print len(msg) * '-' - print "Version: %s" % version - - if force or u: - filter_js(js, verbosity) - - if (force or u) or verbosity >= 2: - print - -# Backwards compatibility for Django r9110 -if not [opt for opt in Command.option_list if opt.dest=='verbosity']: - Command.option_list += ( - make_option('--verbosity', '-v', action="store", dest="verbosity", - default='1', type='choice', choices=['0', '1', '2'], - help="Verbosity level; 0=minimal output, 1=normal output, 2=all output"), - ) diff --git a/apps/compress/models.py b/apps/compress/models.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/compress/signals.py b/apps/compress/signals.py deleted file mode 100644 index bd76a76e7..000000000 --- a/apps/compress/signals.py +++ /dev/null @@ -1,4 +0,0 @@ -from django.dispatch import Signal - -css_filtered = Signal() -js_filtered = Signal() diff --git a/apps/compress/templates/compress/css.html b/apps/compress/templates/compress/css.html deleted file mode 100644 index 68ddbac25..000000000 --- a/apps/compress/templates/compress/css.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/compress/templates/compress/css_ie.html b/apps/compress/templates/compress/css_ie.html deleted file mode 100644 index 80372dc8e..000000000 --- a/apps/compress/templates/compress/css_ie.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/compress/templates/compress/js.html b/apps/compress/templates/compress/js.html deleted file mode 100644 index bfa2b593c..000000000 --- a/apps/compress/templates/compress/js.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/compress/templates/compress/js_ie.html b/apps/compress/templates/compress/js_ie.html deleted file mode 100644 index 8235fe2c3..000000000 --- a/apps/compress/templates/compress/js_ie.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/compress/templatetags/__init__.py b/apps/compress/templatetags/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/compress/templatetags/compressed.py b/apps/compress/templatetags/compressed.py deleted file mode 100644 index 2a020099f..000000000 --- a/apps/compress/templatetags/compressed.py +++ /dev/null @@ -1,104 +0,0 @@ -import os - -from django import template - -from django.conf import settings as django_settings - -from compress.conf import settings -from compress.utils import media_root, media_url, needs_update, filter_css, filter_js, get_output_filename, get_version - -register = template.Library() - -def render_common(template_name, obj, filename, version): - if settings.COMPRESS: - filename = get_output_filename(filename, version) - - context = obj.get('extra_context', {}) - context['url'] = media_url(filename) - - return template.loader.render_to_string(template_name, context) - -def render_css(css, filename, version=None): - return render_common(css.get('template_name', 'compress/css.html'), css, filename, version) - -def render_js(js, filename, version=None): - return render_common(js.get('template_name', 'compress/js.html'), js, filename, version) - -class CompressedCSSNode(template.Node): - def __init__(self, name): - self.name = name - - def render(self, context): - css_name = template.Variable(self.name).resolve(context) - - try: - css = settings.COMPRESS_CSS[css_name] - except KeyError: - return '' # fail silently, do not return anything if an invalid group is specified - - if settings.COMPRESS: - - version = None - - if settings.COMPRESS_AUTO: - u, version = needs_update(css['output_filename'], css['source_filenames']) - if u: - filter_css(css) - - return render_css(css, css['output_filename'], version) - else: - # output source files - r = '' - for source_file in css['source_filenames']: - r += render_css(css, source_file) - - return r - -class CompressedJSNode(template.Node): - def __init__(self, name): - self.name = name - - def render(self, context): - js_name = template.Variable(self.name).resolve(context) - - try: - js = settings.COMPRESS_JS[js_name] - except KeyError: - return '' # fail silently, do not return anything if an invalid group is specified - - if settings.COMPRESS: - - version = None - - if settings.COMPRESS_AUTO: - u, version = needs_update(js['output_filename'], js['source_filenames']) - if u: - filter_js(js) - - return render_js(js, js['output_filename'], version) - else: - # output source files - r = '' - for source_file in js['source_filenames']: - r += render_js(js, source_file) - return r - -#@register.tag -def compressed_css(parser, token): - try: - tag_name, name = token.split_contents() - except ValueError: - raise template.TemplateSyntaxError, '%r requires exactly one argument: the name of a group in the COMPRESS_CSS setting' % token.split_contents()[0] - - return CompressedCSSNode(name) -compressed_css = register.tag(compressed_css) - -#@register.tag -def compressed_js(parser, token): - try: - tag_name, name = token.split_contents() - except ValueError: - raise template.TemplateSyntaxError, '%r requires exactly one argument: the name of a group in the COMPRESS_JS setting' % token.split_contents()[0] - - return CompressedJSNode(name) -compressed_js = register.tag(compressed_js) diff --git a/apps/compress/utils.py b/apps/compress/utils.py deleted file mode 100644 index 89b04a56e..000000000 --- a/apps/compress/utils.py +++ /dev/null @@ -1,130 +0,0 @@ -import os -import re -import tempfile - -from django.conf import settings as django_settings -from django.utils.http import urlquote -from django.dispatch import dispatcher - -from compress.conf import settings -from compress.signals import css_filtered, js_filtered - -def get_filter(compressor_class): - """ - Convert a string version of a function name to the callable object. - """ - - if not hasattr(compressor_class, '__bases__'): - - try: - compressor_class = compressor_class.encode('ascii') - mod_name, class_name = get_mod_func(compressor_class) - if class_name != '': - compressor_class = getattr(__import__(mod_name, {}, {}, ['']), class_name) - except (ImportError, AttributeError): - raise Exception('Failed to import filter %s' % compressor_class) - - return compressor_class - -def get_mod_func(callback): - """ - Converts 'django.views.news.stories.story_detail' to - ('django.views.news.stories', 'story_detail') - """ - - try: - dot = callback.rindex('.') - except ValueError: - return callback, '' - return callback[:dot], callback[dot+1:] - -def needs_update(output_file, source_files): - """ - Scan the source files for changes and returns True if the output_file needs to be updated. - """ - - mtime = max_mtime(source_files) - version = get_version(mtime) - - compressed_file_full = media_root(get_output_filename(output_file, version)) - - if not os.path.exists(compressed_file_full): - return True, version - - # Check if the output file is outdated - return (os.stat(compressed_file_full).st_mtime < mtime), mtime - -def media_root(filename): - """ - Return the full path to ``filename``. ``filename`` is a relative path name in MEDIA_ROOT - """ - return os.path.join(django_settings.STATIC_ROOT, filename) - -def media_url(url): - return django_settings.STATIC_URL + urlquote(url) - -def concat(filenames, separator=''): - """ - Concatenate the files from the list of the ``filenames``, ouput separated with ``separator``. - """ - r = '' - - for filename in filenames: - fd = open(media_root(filename), 'rb') - r += fd.read() - r += separator - fd.close() - - return r - -def max_mtime(files): - return int(max([os.stat(media_root(f)).st_mtime for f in files])) - -def save_file(filename, contents): - fd = open(media_root(filename), 'wb+') - fd.write(contents) - fd.close() - -def get_output_filename(filename, version): - if settings.COMPRESS_VERSION and version is not None: - return filename.replace(settings.COMPRESS_VERSION_PLACEHOLDER, get_version(version)) - else: - return filename.replace(settings.COMPRESS_VERSION_PLACEHOLDER, settings.COMPRESS_VERSION_DEFAULT) - -def get_version(version): - try: - return str(int(version)) - except ValueError: - return str(version) - -def remove_files(path, filename, verbosity=0): - regex = re.compile(r'^%s$' % (os.path.basename(get_output_filename(settings.COMPRESS_VERSION_PLACEHOLDER.join([re.escape(part) for part in filename.split(settings.COMPRESS_VERSION_PLACEHOLDER)]), r'\d+')))) - - for f in os.listdir(path): - if regex.match(f): - if verbosity >= 1: - print "Removing outdated file %s" % f - - os.unlink(os.path.join(path, f)) - -def filter_common(obj, verbosity, filters, attr, separator, signal): - output = concat(obj['source_filenames'], separator) - filename = get_output_filename(obj['output_filename'], get_version(max_mtime(obj['source_filenames']))) - - if settings.COMPRESS_VERSION: - remove_files(os.path.dirname(media_root(filename)), obj['output_filename'], verbosity) - - if verbosity >= 1: - print "Saving %s" % filename - - for f in filters: - output = getattr(get_filter(f)(verbose=(verbosity >= 2)), attr)(output) - - save_file(filename, output) - signal.send(None) - -def filter_css(css, verbosity=0): - return filter_common(css, verbosity, filters=settings.COMPRESS_CSS_FILTERS, attr='filter_css', separator='', signal=css_filtered) - -def filter_js(js, verbosity=0): - return filter_common(js, verbosity, filters=settings.COMPRESS_JS_FILTERS, attr='filter_js', separator=';', signal=js_filtered) diff --git a/apps/lesmianator/templates/lesmianator/poem.html b/apps/lesmianator/templates/lesmianator/poem.html index 5d44a26f9..99fe7ed5b 100644 --- a/apps/lesmianator/templates/lesmianator/poem.html +++ b/apps/lesmianator/templates/lesmianator/poem.html @@ -1,4 +1,5 @@ {% load i18n %} +{% load static from staticfiles %} {% load compressed %} @@ -6,7 +7,7 @@ {% block title %}WolneLektury.pl{% endblock %} - + {% compressed_css "book" %} @@ -20,7 +21,7 @@ Wolne Lektury przepuszczone przez mikser.

    diff --git a/apps/pdcounter/static/pdcounter/pdcounter.js b/apps/pdcounter/static/pdcounter/pdcounter.js new file mode 100755 index 000000000..0352076b8 --- /dev/null +++ b/apps/pdcounter/static/pdcounter/pdcounter.js @@ -0,0 +1,36 @@ +(function($) { + $(function() { + + + $('#countdown').each(function() { + var $this = $(this); + + var serverTime = function() { + var time = null; + $.ajax({url: '/zegar/', + async: false, dataType: 'text', + success: function(text) { + time = new Date(text); + }, error: function(http, message, exc) { + time = new Date(); + }}); + return time; + } + + if (LANGUAGE_CODE != 'en') { + $.countdown.setDefaults($.countdown.regional[LANGUAGE_CODE]); + } + else { + $.countdown.setDefaults($.countdown.regional['']); + } + + var d = new Date($this.attr('data-year'), 0, 1); + function re() {location.reload()}; + $this.countdown({until: d, format: 'ydHMS', serverSync: serverTime, + onExpiry: re, alwaysExpire: true}); + + }); + + + }); +})(jQuery); \ No newline at end of file diff --git a/apps/sponsors/static/sponsors/css/sponsors.css b/apps/sponsors/static/sponsors/css/sponsors.css new file mode 100644 index 000000000..16643dfd4 --- /dev/null +++ b/apps/sponsors/static/sponsors/css/sponsors.css @@ -0,0 +1,17 @@ +.sponsors-page { + background: white; + margin-top: 1em; +} + +.sponsors-column { + float: left; + width: 150px; +} + +.sponsor-logos { + height: 130px; +} + +.sponsors-page img { + float: left; +} diff --git a/apps/sponsors/static/sponsors/js/sponsors.js b/apps/sponsors/static/sponsors/js/sponsors.js new file mode 100755 index 000000000..7674379fe --- /dev/null +++ b/apps/sponsors/static/sponsors/js/sponsors.js @@ -0,0 +1,8 @@ +(function($) { + $(function() { + + $('.sponsor-logos').cycle({timeout: 3000}); + + }); +})(jQuery) + diff --git a/apps/waiter/templates/waiter/wait.html b/apps/waiter/templates/waiter/wait.html index e15bd6455..576fc299f 100644 --- a/apps/waiter/templates/waiter/wait.html +++ b/apps/waiter/templates/waiter/wait.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load i18n %} +{% load static from staticfiles %} {% load url from future %} {% block titleextra %} @@ -39,7 +40,7 @@

    {% else %} {% if waiting %} -

    {% trans 'Please wait' %} +

    {% trans 'Please wait' %} {% trans "Your file is being prepared, please wait." %}

    diff --git a/apps/wolnelektury_core/static/css/antiscreen.css b/apps/wolnelektury_core/static/css/antiscreen.css new file mode 100644 index 000000000..5a8e34c59 --- /dev/null +++ b/apps/wolnelektury_core/static/css/antiscreen.css @@ -0,0 +1,149 @@ +/* + * Style for handheld devices. Should cancel screen.css. + */ + +a { + display: inline-block; + padding: .5em; +} + +.left-column { + width: auto !important; + float: none !important; +} +.right-column { + float: none !important; + width: auto !important; +} + +.hidden-box ul { + width: 20em !important; + column-width: auto !important; + -moz-column-width: auto !important; + -webkit-column-width: auto !important; +} + +#header-content, div#main-content, div#half-header-content, #footer-content { + width: auto !important; + margin: 0 !important; +} + +#promo-box { + float: none !important; + margin-top: 0 !important; +} + +#promo-box-body { + height: auto !important; +} + +#big-cite .vip { + float: none !important; + text-align: left !important; + width: auto !important; +} + +#big-cite .cite-body { + margin-left: 0 !important; +} + +#big-cite .source { + margin-left: 0 !important; +} + + +.book-wide-box { + width: auto !important; +} +.book-wide-box .book-box-body { + width: auto !important; +} + + +#tagged-object-list .left-column, #tagged-object-list .right-column { + width: auto !important; +} + + + + +.inline-body { + width: auto !important; +} + + +.search-result { + width: auto !important; +} + + +.book-list-header { + width: auto !important; +} + +.book-wide-box .right-column { + width: auto !important; + margin-top: 0 !important; +} + +.book-wide-box #theme-list-wrapper { + margin-bottom: 0 !important; +} + +.snippets { + width: auto !important; + float: none !important; + margin-top: 0 !important; +} + + +/* HEADER */ + +#header { + height: auto !important; + padding-top: 0 !important; +} +#logo { + position: static !important; +} +#user-info { + float: none !important; + padding: 1em 0 !important; +} + +#tagline { + display: block !important; + margin-left: 0 !important; +} + +#search-area { + margin-left: 0 !important; + width: auto !important; +} + +#search-field { + width: auto !important; + padding-right: 0.5em !important; +} + +#search { + width: auto !important; +} + +#search-button { + float: none !important; +} + +#promo-box { + width: auto; +} + +/* Book list */ + +#book-list-nav { + border-left: none !important; + padding: 0 !important; + position: static !important; + right: 0 !important; + width: auto !important; +} diff --git a/apps/wolnelektury_core/static/css/auth.css b/apps/wolnelektury_core/static/css/auth.css new file mode 100644 index 000000000..2979d0d98 --- /dev/null +++ b/apps/wolnelektury_core/static/css/auth.css @@ -0,0 +1,67 @@ +#auth-page #main-content p { + font-size: 1.2em; +} +#auth-page #main-content h2 { + font-size: 2em; + margin-top: 1em; +} + +.uniForm { + font-size: 1.2em; +} +.uniForm fieldset { + border: none; + margin: .5em 0; +} +.uniForm .ctrlHolder { + margin: .5em 0; +} + +.inlineLabels label { + width: 8em; + display: inline-block; +} +.inlineLabels .buttonHolder, .inlineLabels .formHint { + margin-left: 8em; +} + + + +.email_list .verified { + display: inline-block; + margin-left: 2em; + font-style: italic; +} +.email_list .unverified { + display: inline-block; + margin-left: 2em; + color: #717171; + font-style: italic; +} +.email_list .primary { + display: inline-block; + margin-left: 2em; + font-weight: bold; +} +.socialaccount_provider { + display: inline-block; + background-repeat: no-repeat; + color: transparent; + height: 40px; + width: 40px; + vertical-align: middle; +} +.socialaccount_provider.google { + background-image: url(/static/img/auth/google.png); +} + + +.socialaccount_providers { + margin: 1em 0; + padding: 0; +} +.socialaccount_providers li { + display: inline; + list-style: none; + margin-right: 1em; +} \ No newline at end of file diff --git a/apps/wolnelektury_core/static/css/base.css b/apps/wolnelektury_core/static/css/base.css new file mode 100755 index 000000000..64c5de1de --- /dev/null +++ b/apps/wolnelektury_core/static/css/base.css @@ -0,0 +1,189 @@ +/* Logo font */ +@font-face { + /* IE version */ + font-family: WL-Nav; + src: url(/static/fonts/WL-Nav.eot); +} +@font-face { + font-family: WL-Nav; + src: url(/static/fonts/WL-Nav.ttf) format("truetype"); +} + + +html { + margin: 0; + padding: 0; +} + +body { + margin: 0; + background: #f7f7f7; + font-size: .625em; + font-family: Georgia; + /*line-height: 1.4em;*/ +} + +a img { + border: 0; +} + +a { + color: #0d7e85; /*#1199a2;*/ /* #01adba; */ + text-decoration: none; +} + +/* jquery UI overrides us */ +.ui-menu .ui-menu-item a { + color: #0d7e85 !important; + line-height: 1.636em !important; +} + +.ui-widget { + font-family: Georgia !important; + font-size: 1em !important; +} + +.ui-widget-content { + background: #EEEEEE !important; /* #E2E2E2 ? */ + border-radius: 0px !important; +} + + +h1 { + font-size: 3.5em; + font-weight: normal; + margin-top: .4em +} +h1 a { + color: inherit; +} + +ul.plain { + list-style:none; + margin: 0; + padding: 0; +} + +.normal-text { + font-size: 1.3em; + line-height: 1.3em; +} + +h2 { + margin: 0; + font-size: 1em; + font-weight: normal; +} + + +.mono { + font-family: "Andale Mono", "Lucida Sans Typewriter", "Courier New"; +/* font-weight: bold; */ +} + +.accent1 { + color: #191919; +} + +.accent2 { + color: #242424; +} + +.accent3 { + color: #575c63; +} + + +.accent4 { + color: #707b7a; +} + +.contrast { + #1199a2; +} + +/* #281d1c */ + +.clearboth { + clear: both; +} + +.white-box { + border: 1px solid #ddd; + padding: 1em; + background: #fff; + -moz-box-shadow: 2px 2px 2px #ddd; + -webkit-box-shadow: 2px 2px 2px #ddd; + box-shadow: 2px 2px 2px #ddd; +} + +.page-desc { + margin-left: 1.5em; +} + +.inline-tag-lists p span:first-child { + color: #281d1c; +} + +.inline-tag-lists { + font-size: 1.1em; +} + +.theme-list-link:after { + padding-left: 1em; + content: "↓"; + font-family: WL-Nav; + vertical-align: middle; +} +.theme-list-link { + font-size: 1.1em; +} +.hidden-box-wrapper { + position: relative; +} +.hidden-box { + position: absolute; + left: 0; + display: none; + border: 1px solid #ddd; + padding: 1em 1em .5em 1em; + background: #fff; + -moz-box-shadow: 2px 2px 2px #ddd; + -webkit-box-shadow: 2px 2px 2px #ddd; + box-shadow: 2px 2px 2px #ddd; + z-index: 500; +} +.hidden-box ul { + list-style: none; + padding: 0; + margin: 0; + font-size: 1.1em; +} +.hidden-box li { + margin-bottom: .5em; +} + + +.pagination { + display: block; + font-size: 1.2em; + padding: .5em; + text-align:center; +} + +#footer { + color: #767676; + margin-top: 5em; + padding-top:3em; + background: #fff; + border-top: 1px solid #ddd; +} +#footer p { + margin: .25em 0; +} + +/* just on search page */ +.top-tag-list { + margin-top: 2.2em; + margin-bottom: 1.6em; +} diff --git a/apps/wolnelektury_core/static/css/book_box.css b/apps/wolnelektury_core/static/css/book_box.css new file mode 100755 index 000000000..8dee81384 --- /dev/null +++ b/apps/wolnelektury_core/static/css/book_box.css @@ -0,0 +1,333 @@ +.book-mini-box, .Book-item { + display: inline-block; + vertical-align: top; +} + +.book-wide-box, .book-box { + margin: 0; + vertical-align: top; +} + +.book-box { + width: 48.75em; +} + +.book-mini-box { + width: 16.15em; +} + +.book-wide-box { + /** This is a fullpage box, it must be aligned with the top menu. + This corresponds to a .1em margin below **/ + margin-left: -0.1em; +} + +/* + * A mini-box wraps it's contents (image + label) in an + * other boxes have an inner box as a wrapper. + */ + +.book-box-inner { + /* min, so it can grow */ + min-height: 19.75em; + margin: .5em; +} + +.book-mini-box a, .book-box-inner { + display: block; + color: black; + border: 1px solid #ddd; +/* height: 20em; */ + padding: .8em 1em; + margin: .1em; + background: #fff; + -moz-box-shadow: 2px 2px 2px #ddd; + -webkit-box-shadow: 2px 2px 2px #ddd; + box-shadow: 2px 2px 2px #ddd; +} + +.book-mini-box a { + height: 27.1em; + margin: .1em; + overflow: hidden; +} + + +.book-wide-box .book-box-inner { + /* min, so it can grow */ + min-height: 24.4em; +} + +.search-result .book-box-body { + width: 31em; +} + +.book-list-header { + padding: 0em; + margin-left: -0.1em; +} + +.book-list-header .book-box-inner { + min-height: 1em; +} + +.book-list-header p { + font-size: 2.4em; + margin: 0.5em; +} + + +/* + * ingenous float containment hack + * http://www.mikepadgett.com/technology/technical/alternative-to-the-pie-clearfix-hack/ + */ +/* +.search-result .book-box-inner { + height: 1%; + overflow: hidden; +} +*/ + +.book-mini-box img, .book-box img, .book-wide-box img, .search-result img { + width: 13.9em; + height: 19.3em; +} +.book-mini-box img { + margin-bottom: 1.8em; +} +.book-box-inner img, .book-wide-box img { + float: left; + margin-right: 1.5em; +} + +.book-mini-box .desc { + margin-left:0em; +} +.book-mini-box .author { + font-size: 1.1em; + color: #6d7877; + display: block; + overflow:hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.book-mini-box .title { + font-size: 1.4em; + color: #242424; +} + + +.book-box-body { + height: 17em; + overflow:hidden; + position: relative; +} + +.book-wide-box .book-box-body { + min-height: 17em; +} + +.book-box-head { + min-height: 7em; + padding-top: 1.4em; + margin-bottom: 1em; +} +.book-box-head a { + color: black; +} +.book-box-head .author { + font-size: 1.1em; + max-width: 24em; +} +.book-box-head .title { + font-size: 2.4em; + height: 2.4em; + overflow:hidden; + margin-top: .3em; +} +.book-box-body .tags { + font-size: 1.1em; +} +.book-box-tag { + margin-right: .5em; + margin-left: .4em; +} +.book-box-download { + position: relative; +} + +.book-box-download a { + position: relative; + z-index: 101; +} + +.book-box-formats { + display: none; + position: absolute; + + width: 16.363em; + border: 1px solid #ddd; + padding: 3.454em 1.727em .818em 1.727em; + background: #fff; + -moz-box-shadow: 2px 2px 2px #ddd; + -webkit-box-shadow: 2px 2px 2px #ddd; + box-shadow: 2px 2px 2px #ddd; + + z-index: 100; + top: -1.454em; + left: -1.727em; +} +.book-box-formats span { + display: block; +} + +.book-box-download .book-box-formats span:first-child { + margin-top: 1.454em; +} + +.book-box-download:hover .book-box-formats, +.book-box-download.hover .book-box-formats { + display: block; +} + +.book-box-tools { + width: 46em; + font-size: 1.1em; +} + +.book-wide-box { + min-width: 48.75em; +} +.book-wide-box .book-box-tools { + margin-left: 14em; + width: 32em; +} + +.book-wide-box #theme-list-wrapper { + margin-left: 15.4em; + margin-bottom: 3em; + width: 30em; +} + + + +.book-box-read a:before { + content: "\2609"; + font-family: WL-Nav; + font-size: 2.25em; + margin-right: .15em; + vertical-align: middle; + font-weight: normal; +} + +.book-box-download a.downarrow:before { + content: "\21E9"; + font-family: WL-Nav; + font-size: 2.25em; + margin-right: .15em; + vertical-align: middle; + font-weight: normal; +} + +.book-box-audiobook a:before { + content: "\266B"; + font-family: WL-Nav; + font-size: 2.25em; + margin-right: .15em; + vertical-align: middle; + font-weight: normal; +} + +ul.book-box-tools { + margin: 0; + padding: 0; +} + +.book-box-tools li { + display: inline-block; +} + +.book-box-read { + width: 11.5em; +} +.book-box-download { + width: 8.5em; +} +.book-box-audiobook { + width: 7em; +} + +ul.inline-items, ul.inline-items li { + margin: 0; + padding: 0; +} + +ul.inline-items li { + display: inline-block; +} + +.book-wide-box .other-tools { + float: left; + width: 14.5em; + margin: 5em 0 0 1.5em; + +} + +.book-wide-box .other-download { + float: left; + width: 22em; + margin: 5em 1.5em 0em 1.5em; +} +.book-wide-box .other-tools h2, +.book-wide-box .other-download h2, +.book-wide-box .other-tools ul, +.book-wide-box .other-download ul { + font-size: 1.1em; +} + + + +.star { + font-size: 2.25em; + margin-right: .5em; + position: absolute; + right: 0; +} +.star button::-moz-focus-inner { + padding: 0; + border: 0 +} +.if-unlike button { + font-size: 1em; + font-family: inherit; + border: 0; + background: none; + margin: 0; + padding: 0; + color: #757575; +} + +.if-like a { + display:block; + text-align:right; + padding: 0; +} + +.like .if-unlike { + display: none; +} + +.unlike .if-like { + display: none; +} + +.snippets .snippet-text { + background: #f7f7f7; + font-size: 1.2em; + margin: 1.083em 0em; + padding: 1em; +} + +.snippets .anchor { + display: none; +} diff --git a/apps/wolnelektury_core/static/css/catalogue.css b/apps/wolnelektury_core/static/css/catalogue.css new file mode 100755 index 000000000..0e952ba7d --- /dev/null +++ b/apps/wolnelektury_core/static/css/catalogue.css @@ -0,0 +1,154 @@ +.work-list { + margin: 0; + padding: 0; + list-style: none; +} + +.work-item { + margin: 0; + padding: 0; +} + +.books .work-item { + display: inline-block; +} + + +/* listing of all books */ +#book-list { + padding-left: 50px; +} +/* FIXME: MEDIA? + * +#book-list-nav { + position: absolute; + right: 50px; + width: 200px; + border-left: 1px #cfcfcf solid; + padding: 10px; + font-size: 1.2em; +} + */ + +#book-list-nav ul { + list-style-type: none; + margin: 5px; + padding: 0; +} + +.book-list-show-index { + display: none; + margin: 0; + padding: 0; +} + + +#book-a-list #book-list ol { + padding-left: 1em; + margin: 0.3em 0 1.2em 0; + list-style: none; +} + +#book-a-list #book-list h2 a { + color: black; +} + +#book-list-up { + position: fixed; + bottom: 50px; + right: 50px; + border-left: 1px #cfcfcf solid; + padding: 10px; + background-color: white; +} + + + +.catalogue-catalogue h2 { + font-size: 2em; +} +.catalogue-catalogue ul { + column-width: 30em; + -moz-column-width: 30em; + -webkit-column-width: 30em; +} + + +#description { + margin-bottom: 2em; + cursor: pointer; +} +#description dl { + margin-top: 0; +} +#description dt { + display: inline; + font-weight: bold; + margin: 0; +} +#description dd { + display: inline; + margin: 0; +} +#description p { + margin-top: 0; +} +#description .meta { + list-style: none; + padding: 0; + margin: 0; +} +#description .meta li { + text-align:right; + color: #666; + font-size: .9em; +} + +.inline-header { + display: inline-block; + vertical-align: top; + width: 7em; +} +.inline-body { + display: inline-block; + vertical-align: top; + margin-bottom: .5em; +} +.inline-body ul { + list-style: none; + padding: 0; + margin: 0; +} +.inline-body li { + display: inline-block; + margin-right: 1em; +} + + +.see-also { + margin-left: 8em; + float: left; + width: 14.3em; +} +.download { + margin-left: 2em; + float: left; +} + +.see-also, .download { + margin-top: 2em; + margin-bottom: 2em; +} +.see-also h2, .download h2 { + font-size: 1.1em; +} +.see-also ul, .download ul { + list-style: none; + padding: 0; + margin: 0; + font-size: 1.1em; +} + +.left-column .see-also { + margin-left: 0; +} diff --git a/apps/wolnelektury_core/static/css/cite.css b/apps/wolnelektury_core/static/css/cite.css new file mode 100755 index 000000000..04fdfdd9f --- /dev/null +++ b/apps/wolnelektury_core/static/css/cite.css @@ -0,0 +1,136 @@ +.cite { + display: block; + color: black; + background: white; + padding: 3em 2em .1em 8em; +} +.book-wide-box .cite-body, +#tagged-object-list .cite-body + { + font-size: 1.8em; + line-height: 1.3em; +} +.book-wide-box .source, +#tagged-object-list .source +{ + color: #444; + font-size: 1.1em; + margin-top: 1.6em; +} +.cite .vip { + margin: 0; + color: #575C63; + font-size: 1.1em; +} + + + +#big-cite { + background-color: #444; + color: white; + padding: 0; + margin: 0; + background-image: url(/static/img/backdrop/book-drawer2.jpg); + background-size: 100%; + background-position: 50% 68%; + background-repeat: no-repeat; +} + +#big-cite .cite { + padding: 4.6em 4em 4.8em 0; + background: none; + color: white; +} + +#big-cite h2 { + margin: 0; + font-size: 1.1em; + color: #575c63; +} + + +#big-cite .cite-body { + margin: .05em .05em .05em 1em; +} +#big-cite .cite-body span { + font-size: 3em; + line-height: 1.16em; +} + +#big-cite .vip { + margin-left: 1em; + margin-top: .25em; +} + +#big-cite .vip span { + font-size:1.1em; +} + +#big-cite .cite-body span, +#big-cite .vip span, +#big-cite .source span +{ + color: white; + background-color: rgb(0, 0, 0); + background-color: rgba(0, 0, 0, 0.6); + /* For IE 5.5 - 7*/ + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000); + /* For IE 8*/ + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)"; +} +/* a long cite displays smaller */ +#big-cite .cite-small .cite-body span { + font-size: 2em; +} + + +#big-cite .source { + margin: 1.6em 0.2em 1.6em 1em; +} +#big-cite .source span { + font-size: 1.2em; +} + + + + + +.cite blockquote p { + margin: 0; +} + +.cite blockquote { + padding: 0; + margin: 0; +} + +.book-wide-box .cite { + position: relative; + top: -0.8em; + right: -1em; + background-color: #f7f7f7; + vertical-align: middle; + width: 39.5em; + margin: 0; + padding: 1em; +} + + +.Fragment-item .fragment { + color: black; + display: block; +} +.Fragment-item .toggle { + font-size: 1.1em; + display:block; + padding: .5em 0; +} +.Fragment-item { + margin-bottom: 2em; + /* white-box */ + border: 1px solid #ddd; + background: #fff; + -moz-box-shadow: 2px 2px 2px #ddd; + -webkit-box-shadow: 2px 2px 2px #ddd; + box-shadow: 2px 2px 2px #ddd; +} diff --git a/apps/wolnelektury_core/static/css/core.css b/apps/wolnelektury_core/static/css/core.css new file mode 100644 index 000000000..b5e4432e4 --- /dev/null +++ b/apps/wolnelektury_core/static/css/core.css @@ -0,0 +1,3 @@ +@import url("screen.css"); +@import url("antiscreen.css") handheld; +@import url("antiscreen.css") only screen and (max-device-width:480px); diff --git a/apps/wolnelektury_core/static/css/dialogs.css b/apps/wolnelektury_core/static/css/dialogs.css new file mode 100755 index 000000000..d83116ba6 --- /dev/null +++ b/apps/wolnelektury_core/static/css/dialogs.css @@ -0,0 +1,117 @@ +.cuteform { + font-size: 1.1em; +} +.cuteform ol, .cuteform ul { + padding: 0; + margin: 0; + list-style: none; + font-style: 1.1em; +} + +.cuteform ol li, .cuteform ul li { + margin-top: 0.7em; +} + +.cuteform label { + display: block; +} + +.cuteform span.help-text { + display: block; + font-size: 0.8em; + color: #999; +} + +.cuteform .error { + color: #BF3024; + display: block; +} +.cuteform .errorlist { + color: #BF3024; +} + + +.jqmOverlay { background-color: #000; } + + +.dialog-window { + position: absolute; + display: none; + background-color: transparent; + margin-top: -0.5em; + margin-left: 1em; + width: 20em; +} + +.dialog-window div.header { + font-size: 1.1em; + width: 4em; + background-color: #FFF; + border-right: 0.3em solid #DDD; + padding: 0.5em 1em 0.5em 1em; + right: 0; + left: auto; + float: right; + text-align: center; +} + + +.dialog-window div.target { + background-color: #FFF; + color: black; + border-right: 0.3em solid #DDD; + border-bottom: 0.3em solid #DDD; + padding: 1em; + clear: both; +} + +.dialog-window h1 { + font-size: 1.2em; +} + +.dialog-window textarea, .dialog-window input { + width: 100%; +} + +.hidelabels label { + display: block; + width: 1px; + height: 1px; + overflow:hidden; +} + + + +#login-window { + width: 26em; +} +#register-window { + width: 26em; +} +#context-login-window { + width: 26em; +} + +#suggest-window { + width: 26em; +} + +#suggest-window textarea { + height: 6em; +} + +#suggest-publishing-window { + width: 29em; +} + +#suggest-publishing-window textarea { + height: 3em; +} + +#custom-pdf-window { + width: 24em; +} + +#custom-pdf-window label { + display: inline; +} diff --git a/apps/wolnelektury_core/static/css/error.css b/apps/wolnelektury_core/static/css/error.css new file mode 100644 index 000000000..831573427 --- /dev/null +++ b/apps/wolnelektury_core/static/css/error.css @@ -0,0 +1,83 @@ + +body { +font-family: verdana, arial, sans-serif; +margin: 2em; +font-size: 100%; +} + + + + +h1 { +font-size: 300%; +font-weight: bold; +margin-top: 30px; +} + +h1,h2 { +margin-bottom: 0; +} + +h2 { +font-size: 100%; +font-weight: bold; +margin-top: 1em; +} + +p { +width: 450px; +margin-top: 0.5em; +} + +img { + border: none; +} + + #whoiam { + text-transform: uppercase; + letter-spacing: 0.2em; + font-size: 150%; + margin-bottom: 0.8em; +} + +.howto { + + color: gray; + font-size: 80% +} + +#contact h2 { +margin-top: 0.5em; +} + + +.haj { + background-color: #ffc; +} + +#urle { +margin-top: 2.3em; +} + +/* +LINKS +*/ + +a:link { +color: #037; +text-decoration: underline; +} + +a:visited { +color: #636; +} + +a:active { +color: #900; +text-decoration: none; +} + +a:hover { +color: #d46400; +} + diff --git a/apps/wolnelektury_core/static/css/header.css b/apps/wolnelektury_core/static/css/header.css new file mode 100755 index 000000000..891c16318 --- /dev/null +++ b/apps/wolnelektury_core/static/css/header.css @@ -0,0 +1,244 @@ +#header-bg { + z-index: -1; + background: #191919; + position: absolute; + width: 50%; + height: 9.4em; +} + +#header { + padding-bottom: 0; + color: #989898; + background: #191919; +} +#header a { + color: #17CFDB; +} + +#half-header { + padding-bottom: 0; +} + +#half-header-content { + background: #191919; + color: #989898; +} + + +#tagline { + margin-left: 1.5em; +} + +#tagline span { + font-size: 1.3em; + color: #bbb; +} + +#user-info { + margin: 0; +} + +#search-area { + margin: 0; + background: #444; + color: white; +} + +#search-field { + display: inline-block; + padding-left: .5em; + padding-top: 0.5em; + padding-bottom: 0; +} + +#search { + font-size: 1.3em; + padding: 0; + /*height: 3.3em; + width: 62.6em; + padding-left: .5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + border: none; + border-radius: .5em; + -webkit-box-shadow:0 0 .5em #444 inset; + -moz-box-shadow:0 0 .5em #444 inset; + box-shadow: 0 0 .5em #444 inset;*/ + height: 2.54em; + padding-left: 1em; + -webkit-border-radius: .38em; + -moz-border-radius: .38em; + border: none; + border-radius: .38em; + -webkit-box-shadow:0 0 .38em #444 inset; + -moz-box-shadow:0 0 .38em #444 inset; + box-shadow: 0 0 .5em #444 inset; + line-height: 2.5em; + + font-family: Georgia; + background-color: #fff; + color: #000; + z-index: 200; + position: relative; +} + +/* styling search placeholder */ + +#search:-webkit-input-placeholder +{ + font-family: Georgia; + font-style: italic; + color: #767676; +} + +#search.placeholder +{ + font-family: Georgia; + font-style: italic; + color: #767676; +} + +#search:-moz-placeholder +{ + font-family: Georgia; + font-style: italic; + color: #767676; +} + +#search-button { + display: inline-block; + background: #018189; + color: white; + padding: 0; + margin: 0; + width: 9.4em; +} +#search-button button { + font-size: 1em; + height: 4.5em; + border: none; + background: #018189; + color: white; + width: 100%; + padding: 0; +} + +#search-button button span { + font-size: 1.1em; + position:relative; +} + + +#nav-line { + background-color: #e2e2e2; + height: 4.9em; +} + +ul#menu { + list-style: none; + padding: 0; + margin: 0 0 0 .6em; +} + +li.menu { + background-color: #e2e2e2; + float: left; +} +a.menu { + display: block; + padding-left: 1.4em; + padding-right: 1.4em; + /* must match grid-line */ + height: 3.1em; + padding-top: 1.8em; + color: #0c7076; +} +a.menu span { + font-size: 1.1em; +} + + +#lang-button { + color: #717171; +} +#lang-button:after { + padding-left: 1em; + content: "↓"; + font-family: WL-Nav; + vertical-align: middle; +} +#lang-menu { + position: relative; + float: right; + display: block; + padding-left: 2.5em; + padding-right: 2em; + /* must match grid-line */ + height: 3.3em; + padding-top: 1.6em; + background: #f7f7f7; +} +#lang-menu .lang-flag { + font-size: 1.3em; +} + +#lang-menu-items { + z-index: 9999; +} + +#lang-menu-items button { + display: none; + background: #f7f7f7; + color: #6f6f6f; + cursor: pointer; + width: 100%; + border: solid #ddd; + border-width: 0 0 1px 0; + padding: .5em 0; + margin: 0; + font-size: 1.3em; +} + +#lang-menu:hover button, +#lang-menu.hover button { + display: block; +} + +#lang-menu:hover #lang-menu-items, +#lang-menu.hover #lang-menu-items { + position: absolute; + width: 100%; + padding: 0; + left: 0; + /* must match grid-line height */ + top: 3.9em; +} + +#lang-menu .active { + color: #000; +} + +.search-hint-label { + display: inline-block; + width: 25em; + font-size: 1.1em; + line-height: 1.636em; +} + +.search-hint-category { + font-size: 1.1em; + line-height: 1.636em; + +} + + + +#user-menu { + left: 0; + top: 2em; + width: 15em; + line-height:1.6em; +} +#user-menu a { + color: #0D7E85; +} diff --git a/apps/wolnelektury_core/static/css/ie.css b/apps/wolnelektury_core/static/css/ie.css new file mode 100644 index 000000000..ff6b41242 --- /dev/null +++ b/apps/wolnelektury_core/static/css/ie.css @@ -0,0 +1,9 @@ +#logo { + margin-top: 2.7em; + width: 17em; + height: 10em; + overflow: hidden; +} +#logo a { + padding-top: 3em; +} diff --git a/apps/wolnelektury_core/static/css/jquery.autocomplete.css b/apps/wolnelektury_core/static/css/jquery.autocomplete.css new file mode 100644 index 000000000..434de139d --- /dev/null +++ b/apps/wolnelektury_core/static/css/jquery.autocomplete.css @@ -0,0 +1,36 @@ +.ac_results { + padding: 0px; + border: 0.1em solid #999; + background-color: #FFF; + overflow: hidden; + z-index: 99999; +} + +.ac_results ul { + width: 100%; + list-style-position: outside; + list-style: none; + padding: 0; + margin: 0; +} + +.ac_results li { + margin: 0; + padding: 0.2em 0.5em; + cursor: default; + display: block; + overflow: hidden; +} + +.ac_loading { + background: white url(/static/img/indicator.gif) right center no-repeat; +} + +.ac_odd { + background-color: #EEE; +} + +.ac_over { + background-color: #0A246A; + color: #FFF; +} diff --git a/apps/wolnelektury_core/static/css/jquery.countdown.css b/apps/wolnelektury_core/static/css/jquery.countdown.css new file mode 100644 index 000000000..3eca47676 --- /dev/null +++ b/apps/wolnelektury_core/static/css/jquery.countdown.css @@ -0,0 +1,53 @@ +/* jQuery Countdown styles 1.5.7. */ +.hasCountdown { + /*border: 1px solid #ccc; + background-color: #eee;*/ + margin: 1em 0 7em 0; +} +.countdown_rtl { + direction: rtl; +} +.countdown_holding span { + background-color: #ccc; +} +.countdown_row { + clear: both; + width: 100%; + padding: 0px 2px; + text-align: center; +} +.countdown_show1 .countdown_section { + width: 98%; +} +.countdown_show2 .countdown_section { + width: 48%; +} +.countdown_show3 .countdown_section { + width: 32.5%; +} +.countdown_show4 .countdown_section { + width: 24.5%; +} +.countdown_show5 .countdown_section { + width: 19.5%; +} +.countdown_show6 .countdown_section { + width: 16.25%; +} +.countdown_show7 .countdown_section { + width: 14%; +} +.countdown_section { + display: block; + float: left; + font-size: 100%; + text-align: center; +} +.countdown_amount { + font-size: 3.5em; + line-height: 1.4em; +} +.countdown_descr { + display: block; + width: 100%; +} diff --git a/apps/wolnelektury_core/static/css/main_page.css b/apps/wolnelektury_core/static/css/main_page.css new file mode 100755 index 000000000..cbfc3db7b --- /dev/null +++ b/apps/wolnelektury_core/static/css/main_page.css @@ -0,0 +1,95 @@ + +#promo-box-header { + padding-top: 2em; + height: 3.1em; + padding-bottom: 0; + padding-left: 2.5em; + padding-right: 2.5em; + background: #191919; + color: white; +} +#promo-box-header h2 { + font-size: 1.3em; +} +#promo-box-body { + border-bottom: 2px solid #efefef; + padding: 2em 2.8em; + background: #efefef; +} +#promo-box h3 { + color: #0d777e; + font-size: 1.1em; + height: 2.5em; /* 2.75@1.1 */ + margin: 0; + font-family: "Andale Mono", "Lucida Sans Typewriter", "Courier New"; + font-weight: normal; +} +#promo-box h3:after { + content: " >"; +} +#promo-box a { + color: #0d777e; +} +#promo-box-body a { + display: block; + color: #6c6c6c; +} +#promo-box-body p { + margin-top: 0; + font-size: 1.2em; + line-height: 1.55em; + color: #6c6c6c; +} + +.main-last { + padding-top: 1.9em; + height: 3.2em; + padding-left: 1.9em; +} +.main-last span { + font-size: 1.1em; +} + + +.infopages-box { + width: 20.6em; + display: inline-block; + margin: .5em 0 0 0; + padding: 0 1.7em; + vertical-align: top; + color: #989898; +} +.infopages-box h2 { + color: #017e85; + height: 2.8em; + padding-top: 2.5em; +} +.infopages-box h2 span { + font-size: 1.1em; +} +.infopages-box a { + color: black; +} + +.infopages-box ol, .infopages-box ul { + font-size: 1.1em; + list-style: none; + padding: 0; + margin: 0; + line-height: 1.45em; +} + +.infopages-box li { + margin-bottom: .25em; +} + +.infopages-box .social-links { + margin-top: 1em; +} + +.infopages-box .social-links a { + font-family: WL-Nav, courier; + font-size: 3em; + color: #281d1c; + margin-right: .2em; +} diff --git a/apps/wolnelektury_core/static/css/master.book.css b/apps/wolnelektury_core/static/css/master.book.css new file mode 100644 index 000000000..be5492726 --- /dev/null +++ b/apps/wolnelektury_core/static/css/master.book.css @@ -0,0 +1,406 @@ +body { + font-size: 16px; + font: Georgia, "Times New Roman", serif; + line-height: 1.5em; + margin: 0; +} + +a { + color: blue; + text-decoration: none; +} + +#book-text { + margin: 3em; + max-width: 36em; +} + +/* ================================== */ +/* = Header with logo and menu = */ +/* ================================== */ +#header { + margin: 3.4em 0 0 1.4em; +} + +img { + border: none; +} + +#logo { + font-size: 1.5em; +} +#logo a { + color: black; +} + +#menu { + position: fixed; + left: 0em; + top: 0em; + width: 100%; + height: 1.5em; + background: #333; + color: #FFF; + opacity: 0.9; + z-index: 99; +} + +#menu ul { + list-style: none; + padding: 0; + margin: 0; +} + +#menu li a { + display: block; + float: left; + height: 1.5em; + margin-left: 0.5em; + text-align: center; + color: #FFF; + padding: 0 1em; +} +#menu li a.menu { + padding-right: 1.5em; +} + +#menu li a.menu:hover, #menu li a.menu:active { + color: #000; + background: #FFF url(/static/img/arrow-down.png) no-repeat center right; +} + +#menu li a.menu.selected { + color: #000; + background: #FFF url(/static/img/arrow-up.png) no-repeat center right; +} +#menu a.menu-link { + display: block; + float: left; + height: 1.5em; + margin-left: 0.5em; + text-align: center; + color: #FFF; +} +#menu span { + color: #888; + font-style: italic; + font-size: .75em; + margin-right: 0.5em; +} + + +#toc, #themes, #nota_red, #info { + position: fixed; + left: 0em; + top: 1.5em; + width: 37em; + padding: 1.5em; + background: #FFF; + border-bottom: 0.25em solid #DDD; + border-right: 0.25em solid #DDD; + display: none; + height: 16em; + overflow-x: hidden; + overflow-y: auto; + opacity: 0.9; + z-index: 99; +} +#download { + position: fixed; + left: 0em; + top: 1.5em; + width: 37em; + padding: 1.5em; + background: #FFF; + border-bottom: 0.25em solid #DDD; + border-right: 0.25em solid #DDD; + display: none; + height: 10em; + overflow-x: hidden; + overflow-y: auto; + opacity: 0.9; + z-index: 99; +} + +#toc ol, #themes ol { + list-style: none; + padding: 0; + margin: 0; +} + +#toc ol li { + font-weight: bold; +} + +#toc ol ol { + padding: 0 0 1.5em 1.5em; + margin: 0; +} + +#toc ol ol li { + font-weight: normal; +} + +#toc h2 { + display: none; +} + +#toc .anchor { + float: none; + margin: 0; + color: blue; + font-size: 16px; + position: inherit; +} + +#info p { + text-align: justify; + margin: 1.5em 0 0; +} + +/* =================================================== */ +/* = Common elements: headings, paragraphs and lines = */ +/* =================================================== */ +h1 { + font-size: 3em; + margin: 1.5em 0; + text-align: center; + line-height: 1.5em; + font-weight: bold; +} + +h2 { + font-size: 2em; + margin: 1.5em 0 0; + font-weight: bold; + line-height: 1.5em; +} + +h3 { + font-size: 1.5em; + margin: 1.5em 0 0; + font-weight: normal; + line-height: 1.5em; +} + +h4 { + font-size: 1em; + margin: 1.5em 0 0; + line-height: 1.5em; +} + +p { + margin: 0; +} + +/* ======================== */ +/* = Footnotes and themes = */ +/* ======================== */ +.theme-begin { + border-left: 0.1em solid #DDDDDD; + color: #777; + padding: 0 0.5em; + width: 7.5em; + + font-style: normal; + font-weight: normal; + font-variant: normal; + letter-spacing: 0; + text-transform: none; + text-decoration: none; + + font-size: 16px; + float: right; + margin-right: -9.5em; + margin-bottom: 0.5em; + clear: both; + left: 40em; + line-height: 1.5em; + text-align: left; +} + +.annotation { + font-style: normal; + font-weight: normal; + font-size: 12px; + padding-left: 2px; + position: relative; + top: -4px; +} + +#footnotes { + margin-top: 3em; +} + +#footnotes .annotation { + display: block; + float: left; + width: 2.5em; + clear: both; +} + +#footnotes div { + margin: 1.5em 0 0 0; +} + +#footnotes p, #footnotes ul { + margin-left: 2.5em; + font-size: 0.875em; +} + +#footnotes .permalink { + font-size: .75em; +} + +blockquote { + font-size: 0.875em; +} + +/* ============= */ +/* = Numbering = */ +/* ============= */ +.verse, .paragraph { + position:relative; +} +.anchor { + position: absolute; + margin: -0.25em -0.5em; + left: -3em; + color: #777; + font-size: 12px; + width: 2em; + text-align: center; + padding: 0.25em 0.5em; + line-height: 1.5em; +} + +.anchor:hover, #book-text .anchor:active { + color: #FFF; + background-color: #CCC; +} + +/* =================== */ +/* = Custom elements = */ +/* =================== */ +span.author { + font-size: 0.5em; + display: block; + line-height: 1.5em; + margin-bottom: 0.25em; +} + +span.collection { + font-size: 0.375em; + display: block; + line-height: 1.5em; + margin-bottom: -0.25em; +} + +span.subtitle { + font-size: 0.5em; + display: block; + line-height: 1.5em; + margin-top: -0.25em; +} + +span.translator { + font-size: 0.375em; + display: block; + line-height: 1.5em; + margin-top: 0.25em; +} + +div.didaskalia { + font-style: italic; + margin: 0.5em 0 0 1.5em; +} + +div.kwestia { + margin: 0.5em 0 0; +} + +div.stanza { + margin: 1.5em 0 0; +} + +div.kwestia div.stanza { + margin: 0; +} + +p.paragraph { + text-align: justify; + margin: 1.5em 0 0; +} + +p.motto { + text-align: justify; + font-style: italic; + margin: 1.5em 0 0; +} + +p.motto_podpis { + font-size: 0.875em; + text-align: right; +} + +div.fragment { + border-bottom: 0.1em solid #999; + padding-bottom: 1.5em; +} + +div.note p, div.dedication p, div.note p.paragraph, div.dedication p.paragraph { + text-align: right; + font-style: italic; +} + +hr.spacer { + height: 3em; + visibility: hidden; +} + +hr.spacer-line { + margin: 1.5em 0; + border: none; + border-bottom: 0.1em solid #000; +} + +p.spacer-asterisk { + padding: 0; + margin: 1.5em 0; + text-align: center; +} + +div.person-list ol { + list-style: none; + padding: 0 0 0 1.5em; +} + +p.place-and-time { + font-style: italic; +} + +em.math, em.foreign-word, em.book-title, em.didaskalia { + font-style: italic; +} + +em.author-emphasis { + letter-spacing: 0.1em; +} + +em.person { + font-style: normal; + font-variant: small-caps; +} + +.verse:after { + content: "\feff"; +} + + +/* =================================== */ +/* = Hide some elements for printing = */ +/* =================================== */ + +@media print { + #menu {display: none;} +} diff --git a/apps/wolnelektury_core/static/css/master.css b/apps/wolnelektury_core/static/css/master.css new file mode 100644 index 000000000..26c13cc71 --- /dev/null +++ b/apps/wolnelektury_core/static/css/master.css @@ -0,0 +1,1220 @@ +body { + margin: 0 2em 2em 2em; + font: 70% Verdana, Arial, Helvetica, sans-serif; + line-height: 1.5em; + background: #FFF url(/static/img/bg.png) repeat-x; + color: #2F4110; +} + +#header { + margin-top: -20px; +} + +img { + border: none; +} + +a { + color: #295158; + text-decoration: none; +} + +a:hover, a:active { + text-decoration: underline; +} + +a.banner { + display: block; + white-space: nowrap; +} +a.banner:hover { + text-decoration: none; +} + +input { + font: 1em Verdana, Arial, Helvetica, sans-serif; +} + +h1 { + font: normal normal bold 1.75em Arial, sans-serif; + color: #2F4110; + margin: 0.55em 0 0 0; +} + +h2 { + font-size: 1.2em; + font-weight: bold; + color: #2F4110; + margin: 0; +} + +h3 { + font-size: 1.15em; + font-weight: bold; + margin: 2em 0 .5em 0; + color: #2F4110; +} + +em { +} + +hr { + border: 0; + border-top: 1px solid #2F4110; + margin: 2em 0; + height: 0; +} + +.clearboth { + clear: both; +} + +.blur { + color: #777; +} + +/* ================================== */ +/* = Header with logo and user-info = */ +/* ================================== */ +#header { + position: relative; + margin-top: 1.5em; +} + +#header #logo { + float: left; +} +#header #logo img { + margin-bottom: -1.25em; +} +#header a.logo { + display:block; + color: #777; +} + +#tagline { + color: #777; + position: absolute; +} + +#logo a:hover { + text-decoration: none; +} + +#header #user-info { + margin: 0 0 0 auto; + width: 40em; + text-align: right; +} + +#site-description { + margin-top: -1.5em; + height:4.5em; + overflow: hidden; + float: right; + width: 42em; + text-align: right; + color: #777; +} + +.lang-menu { + margin-right: 0.7em; + line-height: 24px; +} + +.lang-menu button { + color: blue; + border: none; + border-right: 1px solid gray; + -moz-border-radius: 2px; + background: inherit; + cursor: pointer; + padding: 0.2em 0.5em; + font-size: 10px; +} + +.lang-menu button:hover { + color: blue; + text-decoration: underline; +} + +.lang-menu button.active { + color: black; + text-decoration: none; +} + +.lang-menu button.last { + border-right: none; +} + +#lang-menu-items { + z-index: 1; +} + +/* ======================== */ +/* = Footer with sponsors = */ +/* ======================== */ +#footer { + border-top: 0.1em solid #999; + color: #777; + font-size: 0.8em; + padding-top: 0.5em; + margin: 2em 0 0 0; +} + +#footer p { + margin: 0; +} + +#footer a { + color: #999; + text-decoration: underline; +} + + +/* =============== */ +/* = Search form = */ +/* =============== */ +#search-form { + margin: 0.5em 0; + padding: 0.5em; + background-color: rgb(132, 191, 42); +} + +#searchContainer { + width: 100%; + min-height: 65px; + background-color: rgb(132, 191, 42); + padding: 0px 5px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + border-bottom: 0.15em solid #7B9C2D; + border-right: 0.15em solid #7B9C2D; +} + +#searchContainer #search-form { + padding: 0; + margin: 0; +} + +#search-form p { + margin: 0em 0 0 0; +} + +#search-form ol { + margin: 0; + padding: 0; +} + +#search-form li { + margin: 2px 0 0 5px; + padding: 0; + list-style: none; + display: block; + float: left; + /*margin-left: 5px;*/ +} + +#search-form li.category, #search-form li.book-title { + padding: 0.2em 0.5em 0.2em 0.5em; + background-color: rgb(242, 163, 15); + border: 1px solid #BA8722; + border-right: 1px solid #555; + border-bottom: 1px solid #555; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + margin-right: 0.25em; +} + +#search-form li.book-title { + background-color: #DDD; + border: 1px solid #999; + border-right: 1px solid #555; + border-bottom: 1px solid #555; +} + +#search-form input[type=submit] { + color: #444; +} + +.ac_input { + width: 300px; + border: 0; +} + +p .ac_input { + width: 28em; +} + +#searchSubmit { + float: left; + margin-top: 10px; + height: 33px; +} +/* ================== */ +/* = Search matches = */ +/* ================== */ + +.matches li:first-letter { + text-transform: uppercase; +} + +/* ============== */ +/* = Search bar = */ +/* ============== */ + +.collections a { + color: white; + margin: 0 0.5em; +} + + + +/* ============= */ +/* = Tags list = */ +/* ============= */ +#intro { + margin: 0 0 2.5em 0; +} + +#tags-description { + color: #777; + margin: 0 0.5em -0.75em 0.5em; +} + +#main-page #tags-list { + margin-right: 33%; +} + +#categories-list ul, #themes-list ul { + -moz-column-width: 12em; + -webkit-column-width: 12em; + column-width: 12em; +} + +#tags-list { + margin-top: 1em; + padding: 1em; + background-color: #FBF9E7; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + border-bottom: 0.15em solid #E3D888; + border-right: 0.15em solid #E3D888; +} + +#lesmianator #tags-list, +#tagged-object-list #tags-list, #book-detail #tags-list { + margin-left: 39em; +} + +#book-info, #categories-list { + float: left; + width: 47.5%; +} + +#themes-list { + margin-left: 52.5%; +} + +#tagged-object-list #categories-list, #book-detail #book-info { + width: 12em; +} + +#book-detail #formats .change-sets { + margin-right: 0.5em; +} +/* +#formats .wrap ul { + margin: 0; + padding: 0; +} + +#formats .wrap li { + display: block; + width: 100%; + height: 1.9em; + background-color: #F2F2F2; + border: 1px solid #EEE; + text-align: center; +} +*/ +#formats .wrap .header { + display: block; + width: 100%; + height: 1.9em; + background-color: #EEE; + border-bottom: 1px solid #EEE; + margin: 0; + padding-bottom: 2px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + color:#2F4110; + margin-top: 40px; +} + +.audiotabs span.active { + background-color:#FFF; +} + +.audiotabs span { + display: block; + height: 1.6em; + background-color:#EEE; + width: 80px; + text-align: center; + padding: 2px 0; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + color: #2F4110; + font-weight: bold; + float:left; + cursor: pointer; + border: 1px solid #DDD; +} + +#formats .wrap .header span.desc { + display: block; + height: 1.6em; + background-color: #EEE; + width: 100px; + text-align: center; + padding: 2px 0; + color: #2F4110; + font-weight: bold; + float:left; + border: solid #eee; + border-width: 1px; +} + +.audiotabs { + float: right; +} + + +#formats .wrap .online { + display: block; + width: 100%; + background-color: #EEE; + margin: 0.5em 0 1em 0; + padding: 1em 0; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + text-align: center; + font-size: 1.6em; +} + +#formats .wrap div.download { + text-align: center; + margin-bottom: 10px; +} +#formats .wrap div.download img { + padding: 0 10px 0 10px; +} + +#formats .wrap div.download .custom-pdf { + text-align: left; +} + + +#czytamysluchajac { + margin-top: 2.5em; +} + +#czytamy-sluchajac-info { + width: 400px; + height: 80px; +} + +#czytamy-sluchajac-info p { + margin-left: 170px; + padding-top: 1em; + padding-bottom: 0em; +} +div.audiobooks li { + list-style-type: none; +} + +div.audiobooks li.mp3Player { + margin-bottom: 1em; +} + +div.audiobooks { + padding: 15px; + float: left; +} + +.audiobook-list { + float: left; width: 270px; + position: relative; + left: 10px; +} + +#speaker { + float: left; + padding:5px 10px; +} + +#formats #czytamysluchajac-logo { + background: white; + text-align: left; + float: left; + width: 140px; + height: 62px; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + margin: 0px 20px 10px 10px; +} + +#tagged-object-list #themes-list, #book-detail #themes-list { + margin-left: 14em; +} + +#tags-list ol, #tags-list ul { + padding: 0; + margin: 0.3em 0 1.2em 0; +} + +#tags-list li { + list-style: none; + padding: 0; + margin: 0; +} + +#books-list { + width: 38em; + float: left; +} + +.all-tags { + display: none; +} + +div.shown-tags p, div.all-tags p { + margin: -1em 0 1em 0; + text-align: right; +} + +.show-all-tags, .hide-all-tags { + text-decoration: underline; + padding-right: 1em; +} + +.subcategories { + display: block; + padding-left: 2em; + padding-bottom: 0.5em; +} + + +/* ============== */ +/* = Propaganda = */ +/* ============== */ +#propaganda { + float: right; + width: 30%; + margin: 0; + padding: 2em 0.5em 0.5em; +} + + +/* ===================== */ +/* = Other info = */ +/* ===================== */ +#latest-blog-posts { + padding: 0.5em; + float: left; + width: 30%; +} + +#latest-blog-posts ol { + padding: 0 0 0 1.5em; + margin: 1em 0 0 0; + list-style-type: square; + color: #D13628; +} + +#you-can-help { + float: right; + padding: 0.5em; + width: 30%; +} + +#about-us { + padding: 0.5em; + margin-left: 35%; + margin-right: 35%; +} + +/* =============== */ +/* = Description = */ +/* =============== */ +#description { + margin-top: 0.5em; + overflow: hidden; +} +#description-short { + display:none; +} + +#description .meta { + margin: 0.5em; + width: 18em; + list-style: none; + float: right; +} + +#description dt { + font-weight: bold; + display: inline; +} + +#description dd { + margin: 0; + display: inline; +} + +#toggle-description, #tagged-object-list .pagination, #book-detail .pagination { + width: 100%; + height: 1.5em; + background-color: #EEE; + margin-top: 0.5em; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + text-align: center; +} + +#toggle-description p { + margin: 0; + padding: 0; + color: #999; +} + +#download-shelf { + display: block; + width: 100%; + height: 1.5em; + background-color: #EEE; + margin-top: 0.5em; + padding: 0.5em 0; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + text-align: center; + outline: none; +} + +#download-shelf-menu { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + border: 3px solid #EEE; + padding: 5px; + margin-top: -5px; +} + +#download-formats-form li { + float: left; + height: 2em; +} + +#download-formats-form input { + float: left; +} + +#download-formats-form label { + display: block; + background-color: #EEE; + float: left; + width: 8em; + margin-right: 0.5em; + margin-top: -0.5em; + padding-top: 0.5em; + padding-bottom: 0.75em; +} + +#download-formats-form li { + margin: 0; + padding: 0; + list-style: none; +} + +#download-formats-form em { + color: #999; + background-color: #FFF; +} + +#download-formats-form em strong { + color: #000; + font-weight: normal; +} + +#download-formats-form-submit { + margin-left: 0.5em; + +} + +#download-formats-form #download-formats-form-submit-li { + margin-top: 0.75em; +} + +#download-formats-form-cancel { + color: #900; +} + +#toggle-share-shelf { + display: block; + width: 100%; + height: 1.5em; + background-color: #EEE; + margin-top: 0.5em; + padding: 0.5em 0; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + text-align: center; + outline: none; +} +#toggle-share-shelf p { + margin:0; +} + +#share-shelf { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + border: 3px solid #EEE; + padding: 5px; + margin-top: -5px; +} +#share-shelf input { + width: 100%; +} + + +/* ============================ */ +/* = Books and fragments list = */ +/* ============================ */ +#books-list { + margin: 0; +} + +#books-list ol { + list-style: none; + padding: 0; + margin: 1.5em 0; +} + +.book { + padding: 0.5em; + background-color: #FFF; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +.fragment { + border-bottom: 0.1em solid #EEE; + margin-top: 0.5em; +} + +.fragment-text, .fragment-short-text { + padding: 0.5em; + background-color: #FFF; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +.fragment-metadata { + padding: 0.5em 0.5em 1.5em 0.5em; + float: right; +} + +.change-sets { + float: right; +} + +.change-sets a { + padding: 0.2em; + margin: 0.3em; + border: 0.1em solid #EEE; + background-color: #F9F9F9; +} + +.book-description { + margin-left: 3.5em; +} + +.book-thumbnail, .book-parent-thumbnail { + background: transparent url(/static/img/book.png) no-repeat 0 0; + width: 3em; + height: 3em; + float: left; +} + +.book-parent-thumbnail { + background: transparent url(/static/img/book-parent.png) no-repeat 0 0; +} + + +/* =============== */ +/* = Simple form = */ +/* =============== */ +.cuteform ol, .cuteform ul { + padding: 0; + margin: 0; + list-style: none; +} + +.cuteform ol li, .cuteform ul li { + margin-top: 0.7em; +} + +.cuteform label { + display: block; +} + +.cuteform span.help-text { + display: block; + font-size: 0.8em; + color: #999; +} + +.cuteform .error { + color: #BF3024; + display: block; +} + +/* ================ */ +/* = Modal Window = */ +/* ================ */ +.jqmOverlay { background-color: #000; } + +#set-window { + position: absolute; + display: none; + width: 32em; + background-color: transparent; + margin-top: -0.5em; + margin-left: -1em; +} + +#set-window div.header { + background-color: #FFF; + border-right: 0.25em solid #DDD; + width: 4em; + padding: 0.5em 1em 0.5em 1em; +} + +#set-window div.target { + background-color: #FFF; + border-right: 0.3em solid #DDD; + border-bottom: 0.3em solid #DDD; + padding: 1em; +} + +#login-register-window { + position: absolute; + display: none; + width: 24em; + background-color: transparent; + margin-top: -0.5em; + margin-left: 1em; +} + +#login-register-window div.header { + background-color: #FFF; + border-right: 0.3em solid #DDD; + width: 4em; + right: 0; + left: auto; + padding: 0.5em 1em 0.5em 1em; + float: right; + text-align: center; +} + +#login-register-window div.target { + clear: both; + background-color: #FFF; + border-right: 0.3em solid #DDD; + border-bottom: 0.3em solid #DDD; + padding: 1em; +} + +#user-shelves-window { + position: absolute; + display: none; + width: 28em; + background-color: transparent; + margin-top: -0.5em; + margin-left: 1em; +} + +#user-shelves-window div.header { + background-color: #FFF; + border-right: 0.3em solid #DDD; + width: 4em; + right: 0; + left: auto; + padding: 0.5em 1em 0.5em 1em; + float: right; + text-align: center; +} + +#user-shelves-window div.target { + clear: both; + background-color: #FFF; + border-right: 0.3em solid #DDD; + border-bottom: 0.3em solid #DDD; + padding: 1em; +} + +.shelf-list { + list-style: none; + padding: 0; +} + +.shelf-list li { + padding: 0.25em; + margin: 0 -0.25em; +} + +.shelf-list a.delete-shelf { + color: #900; + float: right; + padding: 0.25em 0.25em 0.25em 1em; + margin: -0.25em; +} + +.shelf-list a.delete-shelf:active, .shelf-list a.delete-shelf:hover { + color: #FFF; + background-color: #900; + text-decoration: none; +} + +#suggest-window { + position: absolute; + display: none; + width: 35em; + background-color: transparent; + margin-top: -0.5em; + margin-left: 1em; +} + +#suggest-window div.header { + background-color: #FFF; + border-right: 0.3em solid #DDD; + width: 4em; + right: 0; + left: auto; + padding: 0.5em 1em 0.5em 1em; + float: right; + text-align: center; +} + +#suggest-window div.target { + clear: both; + background-color: #FFF; + border-right: 0.3em solid #DDD; + border-bottom: 0.3em solid #DDD; + padding: 1em; +} +#suggest-form textarea { + width: 30em; +} + + +.big-top-link { + margin-top: .6em; + font-size: 2em; + /*max-width: 15em;*/ + line-height: 1.2em; +} + +#suggest-publishing-window { + position: absolute; + display: none; + width: 45em; + background-color: transparent; + margin-top: -0.5em; + margin-left: 1em; +} + +#suggest-publishing-window div.header { + background-color: #FFF; + border-right: 0.3em solid #DDD; + width: 4em; + right: 0; + left: auto; + padding: 0.5em 1em 0.5em 1em; + float: right; + text-align: center; +} + +#suggest-publishing-window div.target { + clear: both; + background-color: #FFF; + border-right: 0.3em solid #DDD; + border-bottom: 0.3em solid #DDD; + padding: 1em; +} +#suggest-publishing-form textarea { + width: 40em; + height: 6em; +} + +/* ======================== */ +/* = Alphabetic book list = */ +/* ======================== */ +#book-list { + padding-left: 50px; +} +#book-list-nav { + position: absolute; + right: 50px; + width: 200px; + border-left: 1px #cfcfcf solid; + padding: 10px; + font-size: 1.2em; +} + +#book-list-nav ul { + list-style-type: none; + margin: 5px; + padding: 0; +} + +.book-list-show-index { + display: none; + margin: 0; + padding: 0; +} + + +#book-a-list #book-list ol { + padding-left: 1em; + margin: 0.3em 0 1.2em 0; + list-style: none; +} + +#book-a-list #book-list h2 a { + color: black; +} + +#book-list-up { + position: fixed; + bottom: 50px; + right: 50px; + border-left: 1px #cfcfcf solid; + padding: 10px; + background-color: white; +} + +#top-message { + background-color: #2F4110; + color: #FFF; + margin: 0 -2em; + padding: 0 2.5em; + line-height: 2em; +} + +#top-message a { + color: #AAA; +} + + +/* =========== */ +/* = Columns = */ +/* =========== */ +.column-left { + width: 37em; + float: left; + margin-top: 1em; +} + +.column-right { + margin-left: 40em; + margin-top: 1em; +} + +.see-more { + text-align: right; +} + +.remove-from-shelf { + float: right; + padding: 0.2em; + margin: 0.3em; + color: #900; +} + +.remove-from-shelf:active, .remove-from-shelf:hover { + color: #FFF; + background-color: #900; + text-decoration: none; +} + +/* =========== */ +/* = Lessons = */ +/* =========== */ +#lessons { + margin-top: 2.5em; +} + +#document-list { + width: 380px; + float: left; +} + +#document-list ol { + margin: 0; + padding: 0; + list-style: none; +} + +#document-list li a { + padding: 0.5em; + background-color: #FFF; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +/* font-size: 1.2em;*/ + font-weight: bold; + width: 330px; + margin-bottom: 0.25em; + display: block; +} + +#document-list ul { + padding-left: 30px; + list-style: disc; +} + +#document-list li { + padding: 5px; +} + +#document-list li li a { + width: 300px; +} + +#document-list li a:hover, #document-list li a.active { + text-decoration: none; + background-color: #EEE; +} + +#document-list-body #document-detail { + margin-left: 390px; +} + +#document-detail { + width: 480px; +} + +#document-detail h2 { + margin: 0.75em 0 0.75em 0; +} + +#document-list-body #document-detail .download { + float: right; + margin: 0; + padding: 0 +} + +#document-list .download-doc { + display: none; + color: #00F; +} + +/* ====================== */ +/* = One percent banner = */ +/* ====================== */ +#onepercent-banner { + color: #FFF; + margin: 0 -1.1em; + padding: 0 1.1em; + vertical-align: middle; + background-color: #FF6B3C; + height: 60px; + font-size: 1.8em; + line-height: 1.5em; + position: relative; +} + +#onepercent-text, #onepercent-line:visited, #onepercent-text:hover, #onepercent-text:active { + display: block; + line-height: 60px; + color: #FFF; + text-decoration: none; +} + +#onepercent-text strong { + font-weight: normal; + text-decoration: underline; +} + +#onepercent-see-more, #onepercent-see-more:visited, #onepercent-see-more:hover, #onepercent-see-more:active { + position: absolute; + right: 2em; + width: 9em; + text-align: right; + bottom: 0; + font-size: 12px; + color: #FFF; + text-decoration: none; +} + +#createNewShelf { + display: none; +} + +.widget-code { + overflow: hidden; +} + +#presentation-frame { + border: 0px none white; +} + + +/* dictionary */ + +.dictionary-note-source { + margin-top: -1em; +} + +#footnotes .pagination { + margin-top: 1em; +} + + +/* report */ +.stats td { + vertical-align: top; +} + +/* ============ */ +/* = Pictures = */ +/* ============ */ + + +#picture-list .picture .title { + font-weight: bold; +} + +#picture-list .picture { + background-color: white; + padding: 0.8em; + margin: 0.8em; + border: black 1px solid; + width: 600px; +} + diff --git a/apps/wolnelektury_core/static/css/master.plain.css b/apps/wolnelektury_core/static/css/master.plain.css new file mode 100644 index 000000000..62888a4dc --- /dev/null +++ b/apps/wolnelektury_core/static/css/master.plain.css @@ -0,0 +1,125 @@ +/* =================================================== */ +/* = Common elements: headings, paragraphs and lines = */ +/* =================================================== */ +.fragment h1 { + font-size: 3em; + margin: 1.5em 0; + text-align: center; + line-height: 1.5em; + font-weight: bold; +} + +.fragment h2 { + font-size: 2em; + margin: 1.5em 0 0; + font-weight: bold; + line-height: 1.5em; +} + +.fragment h3 { + font-size: 1.5em; + margin: 1.5em 0 0; + font-weight: normal; + line-height: 1.5em; +} + +.fragment h4 { + font-size: 1em; + margin: 1.5em 0 0; + line-height: 1.5em; +} + +.fragment p { + margin: 0; +} + +/* ======================== */ +/* = Footnotes and themes = */ +/* ======================== */ +.theme-begin { + display: none; +} + +.annotation { + display: none; +} + + +/* ============= */ +/* = Numbering = */ +/* ============= */ +.anchor { + display: none; +} + + +/* =================== */ +/* = Custom elements = */ +/* =================== */ +span.author { + font-size: 0.75em; + display: block; + line-height: 1.5em; + margin-bottom: 0.25em; +} + +span.collection { + font-size: 0.75em; + display: block; + line-height: 1.5em; + margin-bottom: -0.25em; +} + +span.subtitle { + font-size: 0.75em; + display: block; + line-height: 1.5em; + margin-top: -0.25em; +} + +div.didaskalia { + font-style: italic; + margin: 0.5em 0 0; +} + +div.kwestia { + margin: 0.5em 0 0; +} + +div.stanza { + margin: 1.5em 0 0; +} + +div.kwestia div.stanza { + margin: 0; +} + +p.paragraph { + text-align: justify; + margin: 1.5em 0 0; +} + +p.motto { + text-align: justify; + font-style: italic; + margin: 1.5em 0 0; +} + +p.motto_podpis { + font-size: 0.875em; +} + +/*div.fragment { + border-bottom: 0.1em solid #999; + padding-bottom: 1.5em; +}*/ + +div.note p, div.note p.paragraph { + text-align: right; + font-style: italic; +} + +hr.spacer { + height: 3em; + visibility: hidden; +} diff --git a/apps/wolnelektury_core/static/css/picture_box.css b/apps/wolnelektury_core/static/css/picture_box.css new file mode 100755 index 000000000..06f3e62c8 --- /dev/null +++ b/apps/wolnelektury_core/static/css/picture_box.css @@ -0,0 +1,90 @@ +.picture-mini-box, .picture-box { + display: inline-block; + margin: 0; + vertical-align: top; +} + + +.picture-box { + width: 37.5em; +} + +.picture-mini-box { + width: 12.5em; +} + +.picture-mini-box a, .picture-box-inner { + display: block; + color: black; + border: 1px solid #ddd; + height: 20em; + padding: .75em; + margin: .1em; + background: #fff; + -moz-box-shadow: 2px 2px 2px #ddd; + -webkit-box-shadow: 2px 2px 2px #ddd; + box-shadow: 2px 2px 2px #ddd; + overflow: hidden; +} + +.picture-mini-box a { + height: 20em; + margin: .1em; +} +.picture-box-inner { + height: 14.4em; + margin: .5em; +} + +.picture-mini-box img, .picture-box img { + width: 10.8em; + height: 14.4em; +} +.picture-mini-box img { + margin-bottom: .3em; +} +.picture-box img { + float: left; + margin-right: 1.5em; +} + +.picture-mini-box .author { + color: #777; +} + + +.picture-box-body { + height: 13em; + overflow: hidden; +} +.picture-box-head { + min-height: 7em; +} +.picture-box-tag { + font-size: .8em; + margin-right: .5em; +} +.picture-box-download { + position: relative; +} +.picture-box-formats { + display: none; + top: -2em; + position: absolute; + height: 2em; + width: 100em; +} +.picture-box-formats a { + margin-right: 1em; +} +.picture-box-download:hover .picture-box-formats { + display: block; +} + +.picture-box-tools a:before { + content: "⇩"; + font-family: WL-Nav; + font-size: 2em; + margin-right: .25em; + vertical-align: middle; +} diff --git a/apps/wolnelektury_core/static/css/screen.css b/apps/wolnelektury_core/static/css/screen.css new file mode 100644 index 000000000..138121e0c --- /dev/null +++ b/apps/wolnelektury_core/static/css/screen.css @@ -0,0 +1,148 @@ +/* + * Should only be applied for big-screen pc-like devices. + */ + +.left-column { + width: 47em; + float: left; +} +.right-column { + float:right; + width: 47em; +} + +.hidden-box ul { + width: 48em; + column-width: 12em; + -moz-column-width: 12em; + -webkit-column-width: 12em; +} + +#header-content, div#main-content, div#half-header-content, #footer-content { + width: 97.5em; + margin: auto; +} + +#promo-box { + float: right; + margin-top: -5.1em; +} + +#promo-box-body { + height: 30em; +} + +#big-cite .vip { + float:left; + text-align:right; + width: 14.7em; +} + +#big-cite .cite-body { + margin-left: 17.5em; +} + +#big-cite .source { + margin-left: 17.5em; +} + + +.book-wide-box { + width: 97.5em; +} +.book-wide-box .book-box-body { + width: 38.2em; +} + + +#tagged-object-list .left-column, #tagged-object-list .right-column { + width: 48em; +} + + + + +.inline-body { + width: 35em; +} + + +.search-result { + width: 97.5em; +} + + +.book-list-header { + width: 97.5em; +} + +.book-wide-box .right-column { + width: 41.5em; + margin-top: -23em; +} + +.book-wide-box #theme-list-wrapper { + margin-bottom: 0; +} + +.snippets { + width: 44em; + float: right; + margin-top: -20em; +} + + +/* HEADER */ + +#header { + height: 3em; + padding-top: 1.9em; +} + +#logo { + position: absolute; + top: 0; +} + +#user-info { + float: right; + padding: 0; +} + +#tagline { + display: inline-block; + margin-left: 25.5em; +} + +#search-area { + margin-left: 24em; + width: 73.5em; +} + +#search-field { + width: 63.1em; + padding-right: 0; +} + +#search { + width: 47.47em; +} + +#search-button { + float: right; +} + +#promo-box { + width: 32em; +} + + +/* Book list */ + +#book-list-nav { + border-left: 1px solid #CFCFCF; + padding: .75em; + position: absolute; + right: 4em; + width: 25em; +} diff --git a/apps/wolnelektury_core/static/css/simple.css b/apps/wolnelektury_core/static/css/simple.css new file mode 100755 index 000000000..6b8a54cc9 --- /dev/null +++ b/apps/wolnelektury_core/static/css/simple.css @@ -0,0 +1,73 @@ +html { + margin: 0; +} + +body { + margin: 0; + padding: 1em; + color: #2F4110; + background: #FFF url(/static/img/bg.png) repeat-x; + font-size: .75em; + font-family: Verdana,Arial,Helvetica,sans-serif; +} + + + +#body { + margin-top: 2em; +/* + max-width: 900px; + margin:auto; +*/ + margin-left: 400px; +} + +#logo { + float: left; + margin-left: 100px; + margin-top: 4em; +} + +h1 { + font: bold 2.2em Arial,sans-serif; + padding-top: .7em; + margin-bottom: .2em; +} + + +h2 { + font-size: 1.1em; + margin:0; +} + +a { + color: #295158; + text-decoration: none; +} + + +.plain li { + list-style: none; +} + +li { + margin: 1em; +} + +.clr { + clear: both; +} + + +.more { + text-align: right; +} + +table { + margin-top: 1em; +} + +th { + font-weight: normal; + text-align: left; +} diff --git a/apps/wolnelektury_core/static/css/social/shelf_tags.css b/apps/wolnelektury_core/static/css/social/shelf_tags.css new file mode 100755 index 000000000..8843af684 --- /dev/null +++ b/apps/wolnelektury_core/static/css/social/shelf_tags.css @@ -0,0 +1,36 @@ +.social-shelf-tags { + list-style: none; + padding: 0; + margin: 1em 0; + width: 30em; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + position:absolute; + margin-left: 15.4em; + top: 13.5em; + padding: .5em 0; + background: #fff; +} + +.social-shelf-tags li { + display: inline-block; + margin-right:1em; + margin-bottom: .5em; +} + +.social-shelf-tags a { + display: block; + padding: .3em 1em; + background: #ABDADE; + color: #08646b; + border-radius: 1em; +} + + +.social-shelf-tags:hover { + overflow: visible; + text-overflow: ellipsis; + white-space: normal; + z-index: 1000; +} diff --git a/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png new file mode 100644 index 000000000..954e22dbd Binary files /dev/null and b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png differ diff --git a/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png new file mode 100644 index 000000000..64ece5707 Binary files /dev/null and b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png differ diff --git a/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png new file mode 100644 index 000000000..abdc01082 Binary files /dev/null and b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png differ diff --git a/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png new file mode 100644 index 000000000..9b383f4d2 Binary files /dev/null and b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png differ diff --git a/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png new file mode 100644 index 000000000..a23baad25 Binary files /dev/null and b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png differ diff --git a/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 000000000..42ccba269 Binary files /dev/null and b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png new file mode 100644 index 000000000..1b1972b56 Binary files /dev/null and b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png differ diff --git a/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png new file mode 100644 index 000000000..f1273672d Binary files /dev/null and b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png differ diff --git a/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png new file mode 100644 index 000000000..359397acf Binary files /dev/null and b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png differ diff --git a/apps/wolnelektury_core/static/css/ui-lightness/images/ui-icons_222222_256x240.png b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-icons_222222_256x240.png new file mode 100644 index 000000000..b273ff111 Binary files /dev/null and b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-icons_222222_256x240.png differ diff --git a/apps/wolnelektury_core/static/css/ui-lightness/images/ui-icons_228ef1_256x240.png b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-icons_228ef1_256x240.png new file mode 100644 index 000000000..a641a371a Binary files /dev/null and b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-icons_228ef1_256x240.png differ diff --git a/apps/wolnelektury_core/static/css/ui-lightness/images/ui-icons_ef8c08_256x240.png b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-icons_ef8c08_256x240.png new file mode 100644 index 000000000..85e63e9f6 Binary files /dev/null and b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-icons_ef8c08_256x240.png differ diff --git a/apps/wolnelektury_core/static/css/ui-lightness/images/ui-icons_ffd27a_256x240.png b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-icons_ffd27a_256x240.png new file mode 100644 index 000000000..e117effa3 Binary files /dev/null and b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-icons_ffd27a_256x240.png differ diff --git a/apps/wolnelektury_core/static/css/ui-lightness/images/ui-icons_ffffff_256x240.png b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-icons_ffffff_256x240.png new file mode 100644 index 000000000..42f8f992c Binary files /dev/null and b/apps/wolnelektury_core/static/css/ui-lightness/images/ui-icons_ffffff_256x240.png differ diff --git a/apps/wolnelektury_core/static/css/ui-lightness/jquery-ui-1.8.16.custom.css b/apps/wolnelektury_core/static/css/ui-lightness/jquery-ui-1.8.16.custom.css new file mode 100644 index 000000000..da10fff71 --- /dev/null +++ b/apps/wolnelektury_core/static/css/ui-lightness/jquery-ui-1.8.16.custom.css @@ -0,0 +1,342 @@ +/* + * jQuery UI CSS Framework 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + + +/* + * jQuery UI CSS Framework 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } +.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } +.ui-widget-content a { color: #333333; } +.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } +.ui-widget-header a { color: #ffffff; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; } +.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; } +.ui-widget :active { outline: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; } +.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } + +/* Overlays */ +.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } +.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -khtml-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/* + * jQuery UI Autocomplete 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Autocomplete#theming + */ +.ui-autocomplete { position: absolute; cursor: default; } + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ + +/* + * jQuery UI Menu 1.8.16 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Menu#theming + */ +.ui-menu { + list-style:none; + padding: 2px; + margin: 0; + display:block; + float: left; +} +.ui-menu .ui-menu { + margin-top: -3px; +} +.ui-menu .ui-menu-item { + margin:0; + padding: 0; + zoom: 1; + float: left; + clear: left; + width: 100%; +} +.ui-menu .ui-menu-item a { + text-decoration:none; + display:block; + padding:.2em .4em; + line-height:1.5; + zoom:1; +} +.ui-menu .ui-menu-item a.ui-state-hover, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} diff --git a/apps/wolnelektury_core/static/css/widget.css b/apps/wolnelektury_core/static/css/widget.css new file mode 100644 index 000000000..626698844 --- /dev/null +++ b/apps/wolnelektury_core/static/css/widget.css @@ -0,0 +1,54 @@ +#wl { +background-color: white; +} +#wl a, a:visited, a:hover { +border: 0; +} +#wl img { +border: 0; +} +.ui-menu { +width: 160px; +font-size: small; +list-style-type: none; +padding: 0; +margin:0; +border-left: 1px solid #696969; +border-right: 1px solid #696969; +border-bottom: 1px solid #696969; +} + +.ui-menu li { +font-size: small; +padding: 5px; +width: 150px +} + +.ui-menu li:nth-child(odd) { +background-color: white; +} + +.ui-menu li:nth-child(even){ +background-color: #EDF1F5; +} + +.ui-menu li:hover{ +background-color: #053469; +color:white; +} + +.ui-menu a:hover { +color:white; +text-decoration: none; +} + +.ui-corner-all { +width: 160px; +cursor: pointer; +display:block; +} + +.ui-corner-all a{ + color: black; + text-decoration: none; +} diff --git a/apps/wolnelektury_core/static/fonts/WL-Nav.eot b/apps/wolnelektury_core/static/fonts/WL-Nav.eot new file mode 100644 index 000000000..f241aa124 Binary files /dev/null and b/apps/wolnelektury_core/static/fonts/WL-Nav.eot differ diff --git a/apps/wolnelektury_core/static/fonts/WL-Nav.ttf b/apps/wolnelektury_core/static/fonts/WL-Nav.ttf new file mode 100644 index 000000000..a82fa2208 Binary files /dev/null and b/apps/wolnelektury_core/static/fonts/WL-Nav.ttf differ diff --git a/apps/wolnelektury_core/static/fonts/WL.eot b/apps/wolnelektury_core/static/fonts/WL.eot new file mode 100644 index 000000000..53fedbda0 Binary files /dev/null and b/apps/wolnelektury_core/static/fonts/WL.eot differ diff --git a/apps/wolnelektury_core/static/fonts/WL.ttf b/apps/wolnelektury_core/static/fonts/WL.ttf new file mode 100644 index 000000000..6a8934a1b Binary files /dev/null and b/apps/wolnelektury_core/static/fonts/WL.ttf differ diff --git a/apps/wolnelektury_core/static/img/1percent-big.png b/apps/wolnelektury_core/static/img/1percent-big.png new file mode 100644 index 000000000..333413ee6 Binary files /dev/null and b/apps/wolnelektury_core/static/img/1percent-big.png differ diff --git a/apps/wolnelektury_core/static/img/android-poster.png b/apps/wolnelektury_core/static/img/android-poster.png new file mode 100644 index 000000000..a518650d4 Binary files /dev/null and b/apps/wolnelektury_core/static/img/android-poster.png differ diff --git a/apps/wolnelektury_core/static/img/arrow-down.png b/apps/wolnelektury_core/static/img/arrow-down.png new file mode 100644 index 000000000..0e32315c0 Binary files /dev/null and b/apps/wolnelektury_core/static/img/arrow-down.png differ diff --git a/apps/wolnelektury_core/static/img/arrow-up.png b/apps/wolnelektury_core/static/img/arrow-up.png new file mode 100644 index 000000000..cdf9cf635 Binary files /dev/null and b/apps/wolnelektury_core/static/img/arrow-up.png differ diff --git a/apps/wolnelektury_core/static/img/auth/facebook.png b/apps/wolnelektury_core/static/img/auth/facebook.png new file mode 100644 index 000000000..f9b6e7149 Binary files /dev/null and b/apps/wolnelektury_core/static/img/auth/facebook.png differ diff --git a/apps/wolnelektury_core/static/img/auth/google.png b/apps/wolnelektury_core/static/img/auth/google.png new file mode 100644 index 000000000..bf7d11240 Binary files /dev/null and b/apps/wolnelektury_core/static/img/auth/google.png differ diff --git a/apps/wolnelektury_core/static/img/auth/openid.png b/apps/wolnelektury_core/static/img/auth/openid.png new file mode 100644 index 000000000..83e97691f Binary files /dev/null and b/apps/wolnelektury_core/static/img/auth/openid.png differ diff --git a/apps/wolnelektury_core/static/img/auth/twitter.png b/apps/wolnelektury_core/static/img/auth/twitter.png new file mode 100644 index 000000000..d2a55029d Binary files /dev/null and b/apps/wolnelektury_core/static/img/auth/twitter.png differ diff --git a/apps/wolnelektury_core/static/img/backdrop/boltron-3212284622.jpg b/apps/wolnelektury_core/static/img/backdrop/boltron-3212284622.jpg new file mode 100644 index 000000000..7fe148c19 Binary files /dev/null and b/apps/wolnelektury_core/static/img/backdrop/boltron-3212284622.jpg differ diff --git a/apps/wolnelektury_core/static/img/backdrop/book-drawer2.jpg b/apps/wolnelektury_core/static/img/backdrop/book-drawer2.jpg new file mode 100644 index 000000000..88a1ee4be Binary files /dev/null and b/apps/wolnelektury_core/static/img/backdrop/book-drawer2.jpg differ diff --git a/apps/wolnelektury_core/static/img/backdrop/horiavarlan-4268896468.jpg b/apps/wolnelektury_core/static/img/backdrop/horiavarlan-4268896468.jpg new file mode 100644 index 000000000..acc80b6e7 Binary files /dev/null and b/apps/wolnelektury_core/static/img/backdrop/horiavarlan-4268896468.jpg differ diff --git a/apps/wolnelektury_core/static/img/bg-header.png b/apps/wolnelektury_core/static/img/bg-header.png new file mode 100644 index 000000000..4e4cdf9a7 Binary files /dev/null and b/apps/wolnelektury_core/static/img/bg-header.png differ diff --git a/apps/wolnelektury_core/static/img/bg.png b/apps/wolnelektury_core/static/img/bg.png new file mode 100644 index 000000000..be7d63a7c Binary files /dev/null and b/apps/wolnelektury_core/static/img/bg.png differ diff --git a/apps/wolnelektury_core/static/img/book-parent.png b/apps/wolnelektury_core/static/img/book-parent.png new file mode 100644 index 000000000..566859807 Binary files /dev/null and b/apps/wolnelektury_core/static/img/book-parent.png differ diff --git a/apps/wolnelektury_core/static/img/book.png b/apps/wolnelektury_core/static/img/book.png new file mode 100644 index 000000000..f26483979 Binary files /dev/null and b/apps/wolnelektury_core/static/img/book.png differ diff --git a/apps/wolnelektury_core/static/img/doodle/20110908-android.png b/apps/wolnelektury_core/static/img/doodle/20110908-android.png new file mode 100644 index 000000000..664b579f5 Binary files /dev/null and b/apps/wolnelektury_core/static/img/doodle/20110908-android.png differ diff --git a/apps/wolnelektury_core/static/img/doodle/20110908-logo.png b/apps/wolnelektury_core/static/img/doodle/20110908-logo.png new file mode 100644 index 000000000..f4ab58319 Binary files /dev/null and b/apps/wolnelektury_core/static/img/doodle/20110908-logo.png differ diff --git a/apps/wolnelektury_core/static/img/epub-www.jpg b/apps/wolnelektury_core/static/img/epub-www.jpg new file mode 100644 index 000000000..84016cf6e Binary files /dev/null and b/apps/wolnelektury_core/static/img/epub-www.jpg differ diff --git a/apps/wolnelektury_core/static/img/epub.png b/apps/wolnelektury_core/static/img/epub.png new file mode 100644 index 000000000..32510fdfb Binary files /dev/null and b/apps/wolnelektury_core/static/img/epub.png differ diff --git a/apps/wolnelektury_core/static/img/favicon.ico b/apps/wolnelektury_core/static/img/favicon.ico new file mode 100644 index 000000000..3f2aacc37 Binary files /dev/null and b/apps/wolnelektury_core/static/img/favicon.ico differ diff --git a/apps/wolnelektury_core/static/img/favicon.png b/apps/wolnelektury_core/static/img/favicon.png new file mode 100644 index 000000000..9794f3588 Binary files /dev/null and b/apps/wolnelektury_core/static/img/favicon.png differ diff --git a/apps/wolnelektury_core/static/img/indicator.gif b/apps/wolnelektury_core/static/img/indicator.gif new file mode 100644 index 000000000..085ccaeca Binary files /dev/null and b/apps/wolnelektury_core/static/img/indicator.gif differ diff --git a/apps/wolnelektury_core/static/img/kindle-poster-260.png b/apps/wolnelektury_core/static/img/kindle-poster-260.png new file mode 100644 index 000000000..1fd435eee Binary files /dev/null and b/apps/wolnelektury_core/static/img/kindle-poster-260.png differ diff --git a/apps/wolnelektury_core/static/img/kindle-poster.png b/apps/wolnelektury_core/static/img/kindle-poster.png new file mode 100644 index 000000000..63560d273 Binary files /dev/null and b/apps/wolnelektury_core/static/img/kindle-poster.png differ diff --git a/apps/wolnelektury_core/static/img/logo-220.png b/apps/wolnelektury_core/static/img/logo-220.png new file mode 100644 index 000000000..9b15e88a3 Binary files /dev/null and b/apps/wolnelektury_core/static/img/logo-220.png differ diff --git a/apps/wolnelektury_core/static/img/logo-bez.png b/apps/wolnelektury_core/static/img/logo-bez.png new file mode 100644 index 000000000..213c442d4 Binary files /dev/null and b/apps/wolnelektury_core/static/img/logo-bez.png differ diff --git a/apps/wolnelektury_core/static/img/logo-big.png b/apps/wolnelektury_core/static/img/logo-big.png new file mode 100644 index 000000000..fae49ea96 Binary files /dev/null and b/apps/wolnelektury_core/static/img/logo-big.png differ diff --git a/apps/wolnelektury_core/static/img/logo-neon.png b/apps/wolnelektury_core/static/img/logo-neon.png new file mode 100644 index 000000000..c729463be Binary files /dev/null and b/apps/wolnelektury_core/static/img/logo-neon.png differ diff --git a/apps/wolnelektury_core/static/img/logo.png b/apps/wolnelektury_core/static/img/logo.png new file mode 100644 index 000000000..398f45d01 Binary files /dev/null and b/apps/wolnelektury_core/static/img/logo.png differ diff --git a/apps/wolnelektury_core/static/img/mobi.png b/apps/wolnelektury_core/static/img/mobi.png new file mode 100644 index 000000000..1631b896d Binary files /dev/null and b/apps/wolnelektury_core/static/img/mobi.png differ diff --git a/apps/wolnelektury_core/static/img/odt.png b/apps/wolnelektury_core/static/img/odt.png new file mode 100644 index 000000000..c0c2602f1 Binary files /dev/null and b/apps/wolnelektury_core/static/img/odt.png differ diff --git a/apps/wolnelektury_core/static/img/pdf.png b/apps/wolnelektury_core/static/img/pdf.png new file mode 100644 index 000000000..5fe5bbe23 Binary files /dev/null and b/apps/wolnelektury_core/static/img/pdf.png differ diff --git a/apps/wolnelektury_core/static/img/procent.png b/apps/wolnelektury_core/static/img/procent.png new file mode 100644 index 000000000..3d0f82d81 Binary files /dev/null and b/apps/wolnelektury_core/static/img/procent.png differ diff --git a/apps/wolnelektury_core/static/img/s5/blank.gif b/apps/wolnelektury_core/static/img/s5/blank.gif new file mode 100644 index 000000000..75b945d25 Binary files /dev/null and b/apps/wolnelektury_core/static/img/s5/blank.gif differ diff --git a/apps/wolnelektury_core/static/img/s5/bodybg.gif b/apps/wolnelektury_core/static/img/s5/bodybg.gif new file mode 100755 index 000000000..5f448a16f Binary files /dev/null and b/apps/wolnelektury_core/static/img/s5/bodybg.gif differ diff --git a/apps/wolnelektury_core/static/img/s5/iepngfix.htc b/apps/wolnelektury_core/static/img/s5/iepngfix.htc new file mode 100644 index 000000000..bba2db756 --- /dev/null +++ b/apps/wolnelektury_core/static/img/s5/iepngfix.htc @@ -0,0 +1,42 @@ + + + + + \ No newline at end of file diff --git a/apps/wolnelektury_core/static/img/search.png b/apps/wolnelektury_core/static/img/search.png new file mode 100644 index 000000000..6bfc84cb1 Binary files /dev/null and b/apps/wolnelektury_core/static/img/search.png differ diff --git a/apps/wolnelektury_core/static/img/social/facebook.png b/apps/wolnelektury_core/static/img/social/facebook.png new file mode 100644 index 000000000..c46485acc Binary files /dev/null and b/apps/wolnelektury_core/static/img/social/facebook.png differ diff --git a/apps/wolnelektury_core/static/img/social/naszaklasa.png b/apps/wolnelektury_core/static/img/social/naszaklasa.png new file mode 100644 index 000000000..6fcd6d53d Binary files /dev/null and b/apps/wolnelektury_core/static/img/social/naszaklasa.png differ diff --git a/apps/wolnelektury_core/static/img/social/twitter.png b/apps/wolnelektury_core/static/img/social/twitter.png new file mode 100644 index 000000000..0a75ea8d7 Binary files /dev/null and b/apps/wolnelektury_core/static/img/social/twitter.png differ diff --git a/apps/wolnelektury_core/static/img/speaker.png b/apps/wolnelektury_core/static/img/speaker.png new file mode 100644 index 000000000..5831f177a Binary files /dev/null and b/apps/wolnelektury_core/static/img/speaker.png differ diff --git a/apps/wolnelektury_core/static/img/turniej-maly.png b/apps/wolnelektury_core/static/img/turniej-maly.png new file mode 100644 index 000000000..b11f0d676 Binary files /dev/null and b/apps/wolnelektury_core/static/img/turniej-maly.png differ diff --git a/apps/wolnelektury_core/static/img/txt.png b/apps/wolnelektury_core/static/img/txt.png new file mode 100644 index 000000000..de699ea24 Binary files /dev/null and b/apps/wolnelektury_core/static/img/txt.png differ diff --git a/apps/wolnelektury_core/static/img/wiatrak.png b/apps/wolnelektury_core/static/img/wiatrak.png new file mode 100644 index 000000000..e96a0c1a5 Binary files /dev/null and b/apps/wolnelektury_core/static/img/wiatrak.png differ diff --git a/apps/wolnelektury_core/static/img/wl_icon_64.png b/apps/wolnelektury_core/static/img/wl_icon_64.png new file mode 100644 index 000000000..a9dded316 Binary files /dev/null and b/apps/wolnelektury_core/static/img/wl_icon_64.png differ diff --git a/apps/wolnelektury_core/static/img/zabawnik.png b/apps/wolnelektury_core/static/img/zabawnik.png new file mode 100644 index 000000000..2a4621693 Binary files /dev/null and b/apps/wolnelektury_core/static/img/zabawnik.png differ diff --git a/apps/wolnelektury_core/static/js/base.js b/apps/wolnelektury_core/static/js/base.js new file mode 100755 index 000000000..77315e6f7 --- /dev/null +++ b/apps/wolnelektury_core/static/js/base.js @@ -0,0 +1,124 @@ +(function($) { + $(function() { + $.fn.toggle_slide = function(p) { + cont = $(this); + short_el = p['short_el'] || $(':first-child', this); + long_el = p['long_el'] || short_el.next(); + button = p['button']; + short_text = p['short_text'], + long_text = p['long_text']; + + var toggle_fun = function(cont, short_el, long_el, button, short_text, long_text) { + var toggle = function() { + if (cont.hasClass('short')) { + cont.animate({"height": long_el.attr("cont_h")+'px'}, {duration: "fast" }).removeClass('short'); + short_el.hide(); + long_el.show(); + if (button && long_text) button.html(long_text); + } else { + cont.animate({"height": short_el.attr("cont_h")+'px'}, {duration: "fast" }).addClass('short'); + long_el.hide(); + short_el.show(); + if (button && short_text) button.html(short_text); + } + return false; + } + return toggle; + } + if (long_el.html().length <= short_el.html().length) + return; + + // ensure long element shown first + long_el.show();short_el.hide(); + long_el.attr("cont_h", $(this).height()).hide(); + short_el.show().attr("cont_h", $(this).height()); + $(this).addClass('short'); + + if (button && short_text) button.html(short_text); + if (button) button.click(toggle_fun(cont, short_el, long_el, button, short_text, long_text)); + }; + + + // Fragments + $('.fragment-with-short').each(function() { + $(this).toggle_slide({ + short_el: $('.fragment-short-text', this), + long_el: $('.fragment-long-text', this), + button: $('.toggle', this) + }) + }); + $('#description').each(function() { + $(this).toggle_slide({ + short_el: $('#description-short', this), + long_el: $('#description-long', this), + button: $(this) + }) + }); + + + + (function() { + var $current = null; + $('.hidden-box-wrapper').each(function() { + var $hidden = $('.hidden-box', this); + $('.hidden-box-trigger', this).click(function(event) { + event.preventDefault(); + if ($current == $hidden) { + $current = null; + $hidden.hide('fast'); + } else { + $current && $current.hide('fast'); + $hidden.show('fast'); + $current = $hidden; + } + }); + }); + $('body').click(function(e) { + if ($current == null) return; + var p = $(e.target); + while (p.length) { + if (p == $current) + return; + if (p.hasClass('hidden-box-trigger')) + return; + p = p.parent(); + } + $current.hide('fast'); + $current = null; + }); + })(); + + + + +$('#themes-list-toggle').click(function(event) { + event.preventDefault(); + $('#themes-list').toggle('slow'); +}); + + +$('.open-player').click(function(event) { + event.preventDefault(); + window.open($(this).attr('href'), + 'player', + 'width=422, height=500' + ); +}); + + + $('.book-list-index').click(function(){ + $('.book-list-show-index').hide('slow'); + if($(this).parent().next('ul:not(:hidden)').length == 0){ + $(this).parent().next('ul').toggle('slow'); + } + return false; + }); + + $('.hoverclick').click(function() {$(this).closest('.hoverget').toggleClass('hover');}); + + $(function(){ + $("#search").search();}); + + }); +})(jQuery); + diff --git a/apps/wolnelektury_core/static/js/book.js b/apps/wolnelektury_core/static/js/book.js new file mode 100644 index 000000000..335fe39c0 --- /dev/null +++ b/apps/wolnelektury_core/static/js/book.js @@ -0,0 +1,61 @@ +$(function() { + function scrollToAnchor(anchor) { + if (anchor) { + var anchor_name = anchor.slice(1); + var element = $('a[name="' + anchor_name + '"]'); + if (element.length > 0) { + $.scrollTo(element, 500, {offset: {top: -50, left: 0}}); + foot_elem = $('#footnotes a[name="' + anchor_name + '"]'); + if (foot_elem.length > 0) { + $(element).parent().highlightFade('yellow'); + } + window.location.hash = anchor; + } + } + } + + $.highlightFade.defaults.speed = 3000; + $('#toc').hide(); + if ($('#toc li').length == 0) { + $('#menu li a[href="#toc"]').remove(); + } + if ($('#nota_red').length == 0) { + $('#menu li a[href="#nota_red"]').remove(); + } + + // On page load, scroll to anchor + scrollToAnchor(window.location.hash) + + $('#toc, #themes, #book-text').delegate('click', 'a', function(event) { + event.preventDefault(); + $('#menu li a.selected').click(); + scrollToAnchor($(this).attr('href')); + }); + + $('#menu li a.menu').toggle(function() { + $('#menu li a.selected').click(); + $(this).addClass('selected'); + $($(this).attr('href')).slideDown('fast'); + }, function() { + $(this).removeClass('selected'); + $($(this).attr('href')).slideUp('fast'); + }); + + + if (window.getSelection) { + $('.theme-begin').click(function() { + var selection = window.getSelection(); + selection.removeAllRanges(); + var range = document.createRange(); + + var e = $(".theme-end[fid='" + $(this).attr('fid') + "']")[0]; + + if (e) { + range.setStartAfter(this); + range.setEndBefore(e); + selection.addRange(range); + } + }); + } + +}); diff --git a/apps/wolnelektury_core/static/js/dialogs.js b/apps/wolnelektury_core/static/js/dialogs.js new file mode 100755 index 000000000..bd412bc74 --- /dev/null +++ b/apps/wolnelektury_core/static/js/dialogs.js @@ -0,0 +1,199 @@ +(function($) { + $(function() { + + // create containers for all ajaxable form links + $('.ajaxable').each(function() { + var $window = $("#ajaxable-window").clone(); + $window.attr("id", this.id + "-window"); + $('body').append($window); + + var $trigger = $(this) + var trigger = '#' + this.id; + + $window.jqm({ + ajax: '@href', + ajaxText: '

    * ' + gettext("Loading") + '

    ', + target: $('.target', $window)[0], + overlay: 60, + trigger: trigger, + onShow: function(hash) { + var offset = $(hash.t).offset(); + var oleft = offset.left - hash.w.width() + $(hash.t).width(); + if (oleft < 0) oleft = 0; + hash.w.css({position: 'absolute', left: oleft, top: offset.top}); + var width = $(hash.t).width(); + width = width > 50 ? width : 50; + $('.header', hash.w).css({width: width}); + hash.w.show(); + }, + onLoad: function(hash) { + $('form', hash.w).ajaxForm({ + dataType: 'json', + target: $('.target', $window), + success: function(response) { + if (response.success) { + $('.target', $window).text(response.message); + setTimeout(function() { $window.jqmHide() }, 1000); + callback = ajaxable_callbacks[$trigger.attr('data-callback')]; + callback && callback($trigger, response); + if (response.redirect) + window.location = response.redirect; + } + else { + $('.error', $window).remove(); + $.each(response.errors, function(id, errors) { + $('#id_' + id, $window).before('' + errors[0] + ''); + }); + $('input[type=submit]', $window).removeAttr('disabled'); + return false; + } + } + }); + } + }); + }); + + + var login_and_retry = function($form) { + var $window = $("#ajaxable-window").clone(); + $window.attr("id", "context-login-window"); + $('body').append($window); + + $window.jqm({ + ajax: '/uzytkownik/zaloguj-utworz/?next=' + escape(window.location), + ajaxText: '

    * ' + gettext("Loading") + '

    ', + target: $('.target', $window)[0], + overlay: 60, + onShow: function(hash) { + var offset = $form.offset(); + hash.w.css({position: 'absolute', left: offset.left - hash.w.width() + $form.width(), top: offset.top}); + var width = $form.width(); + width = width > 50 ? width : 50; + $('.header', hash.w).css({width: width}); + hash.w.show(); + }, + onLoad: function(hash) { + $('form', hash.w).ajaxForm({ + dataType: 'json', + target: $('.target', $window), + success: function(response) { + if (response.success) { + $('.target', $window).text(response.message); + setTimeout(function() { $window.jqmHide() }, 1000); + $form.submit(); + location.reload(); + } + else { + $('.error', $window).remove(); + $.each(response.errors, function(id, errors) { + $('#id_' + id, $window).before('' + errors[0] + ''); + }); + $('input[type=submit]', $window).removeAttr('disabled'); + return false; + } + } + }); + } + }).jqmShow(); + + }; + + + $('.ajax-form').each(function() { + var $form = $(this); + $form.ajaxForm({ + dataType: 'json', + beforeSubmit: function() { + $('input[type=submit]', $form) + .attr('disabled', 'disabled') + .after(''); + }, + error: function(response) { + if (response.status == 403) + login_and_retry($form); + }, + success: function(response) { + if (response.success) { + callback = ajax_form_callbacks[$form.attr('data-callback')]; + callback && callback($form, response); + + } else { + $('span.error', $form).remove(); + $.each(response.errors, function(id, errors) { + $('#id_' + id, $form).before('' + errors[0] + ''); + }); + $('input[type=submit]', $form).removeAttr('disabled'); + $('img', $form).remove(); + } + } + }); + }); + + + var update_star = function($elem, response) { + /* updates the star after successful ajax */ + var $star = $elem.closest('.star'); + if (response.like) { + $star.addClass('like'); + $star.removeClass('unlike'); + } + else { + $star.addClass('unlike'); + $star.removeClass('like'); + } + }; + + var ajax_form_callbacks = { + 'social-like-book': update_star + }; + + var ajaxable_callbacks = { + 'social-book-sets': location.reload + }; + + + + // check placeholder browser support + if (!Modernizr.input.placeholder) + { + // set placeholder values + $(this).find('[placeholder]').each(function() + { + $(this).val( $(this).attr('placeholder') ).addClass('placeholder'); + }); + + // focus and blur of placeholders + $('[placeholder]').focus(function() + { + if ($(this).val() == $(this).attr('placeholder')) + { + $(this).val(''); + $(this).removeClass('placeholder'); + } + }).blur(function() + { + if ($(this).val() == '' || $(this).val() == $(this).attr('placeholder')) + { + $(this).val($(this).attr('placeholder')); + $(this).addClass('placeholder'); + } + }); + + // remove placeholders on submit + $('[placeholder]').closest('form').submit(function() + { + $(this).find('[placeholder]').each(function() + { + if ($(this).val() == $(this).attr('placeholder')) + { + $(this).val(''); + } + }) + }); + } + + + + }); +})(jQuery); + diff --git a/apps/wolnelektury_core/static/js/ierange-m2.js b/apps/wolnelektury_core/static/js/ierange-m2.js new file mode 100644 index 000000000..e87738b0c --- /dev/null +++ b/apps/wolnelektury_core/static/js/ierange-m2.js @@ -0,0 +1,502 @@ +/* + DOM Ranges for Internet Explorer (m2) + + Copyright (c) 2009 Tim Cameron Ryan + Released under the MIT/X License + */ + +/* + Range reference: + http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html + http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsRange.cpp + https://developer.mozilla.org/En/DOM:Range + Selection reference: + http://trac.webkit.org/browser/trunk/WebCore/page/DOMSelection.cpp + TextRange reference: + http://msdn.microsoft.com/en-us/library/ms535872.aspx + Other links: + http://jorgenhorstink.nl/test/javascript/range/range.js + http://jorgenhorstink.nl/2006/07/05/dom-range-implementation-in-ecmascript-completed/ + http://dylanschiemann.com/articles/dom2Range/dom2RangeExamples.html +*/ + +//[TODO] better exception support + +(function () { // sandbox + +/* + DOM functions + */ + +var DOMUtils = { + findChildPosition: function (node) { + for (var i = 0; node = node.previousSibling; i++) + continue; + return i; + }, + isDataNode: function (node) { + return node && node.nodeValue !== null && node.data !== null; + }, + isAncestorOf: function (parent, node) { + return !DOMUtils.isDataNode(parent) && + (parent.contains(DOMUtils.isDataNode(node) ? node.parentNode : node) || + node.parentNode == parent); + }, + isAncestorOrSelf: function (root, node) { + return DOMUtils.isAncestorOf(root, node) || root == node; + }, + findClosestAncestor: function (root, node) { + if (DOMUtils.isAncestorOf(root, node)) + while (node && node.parentNode != root) + node = node.parentNode; + return node; + }, + getNodeLength: function (node) { + return DOMUtils.isDataNode(node) ? node.length : node.childNodes.length; + }, + splitDataNode: function (node, offset) { + if (!DOMUtils.isDataNode(node)) + return false; + var newNode = node.cloneNode(false); + node.deleteData(offset, node.length); + newNode.deleteData(0, offset); + node.parentNode.insertBefore(newNode, node.nextSibling); + } +}; + +/* + Text Range utilities + functions to simplify text range manipulation in ie + */ + +var TextRangeUtils = { + convertToDOMRange: function (textRange, document) { + function adoptBoundary(domRange, textRange, bStart) { + // iterate backwards through parent element to find anchor location + var cursorNode = document.createElement('a'), cursor = textRange.duplicate(); + cursor.collapse(bStart); + var parent = cursor.parentElement(); + do { + parent.insertBefore(cursorNode, cursorNode.previousSibling); + cursor.moveToElementText(cursorNode); + } while (cursor.compareEndPoints(bStart ? 'StartToStart' : 'StartToEnd', textRange) > 0 && cursorNode.previousSibling); + + // when we exceed or meet the cursor, we've found the node + if (cursor.compareEndPoints(bStart ? 'StartToStart' : 'StartToEnd', textRange) == -1 && cursorNode.nextSibling) { + // data node + cursor.setEndPoint(bStart ? 'EndToStart' : 'EndToEnd', textRange); + domRange[bStart ? 'setStart' : 'setEnd'](cursorNode.nextSibling, cursor.text.length); + } else { + // element + domRange[bStart ? 'setStartBefore' : 'setEndBefore'](cursorNode); + } + cursorNode.parentNode.removeChild(cursorNode); + } + + // return a DOM range + var domRange = new DOMRange(document); + adoptBoundary(domRange, textRange, true); + adoptBoundary(domRange, textRange, false); + return domRange; + }, + + convertFromDOMRange: function (domRange) { + function adoptEndPoint(textRange, domRange, bStart) { + // find anchor node and offset + var container = domRange[bStart ? 'startContainer' : 'endContainer']; + var offset = domRange[bStart ? 'startOffset' : 'endOffset'], textOffset = 0; + var anchorNode = DOMUtils.isDataNode(container) ? container : container.childNodes[offset]; + var anchorParent = DOMUtils.isDataNode(container) ? container.parentNode : container; + // visible data nodes need a text offset + if (container.nodeType == 3 || container.nodeType == 4) + textOffset = offset; + + // create a cursor element node to position range (since we can't select text nodes) + var cursorNode = domRange._document.createElement('a'); + anchorParent.insertBefore(cursorNode, anchorNode); + var cursor = domRange._document.body.createTextRange(); + cursor.moveToElementText(cursorNode); + cursorNode.parentNode.removeChild(cursorNode); + // move range + textRange.setEndPoint(bStart ? 'StartToStart' : 'EndToStart', cursor); + textRange[bStart ? 'moveStart' : 'moveEnd']('character', textOffset); + } + + // return an IE text range + var textRange = domRange._document.body.createTextRange(); + adoptEndPoint(textRange, domRange, true); + adoptEndPoint(textRange, domRange, false); + return textRange; + } +}; + +/* + DOM Range + */ + +function DOMRange(document) { + // save document parameter + this._document = document; + + // initialize range +//[TODO] this should be located at document[0], document[0] + this.startContainer = this.endContainer = document.body; + this.endOffset = DOMUtils.getNodeLength(document.body); +} +DOMRange.START_TO_START = 0; +DOMRange.START_TO_END = 1; +DOMRange.END_TO_END = 2; +DOMRange.END_TO_START = 3; + +DOMRange.prototype = { + // public properties + startContainer: null, + startOffset: 0, + endContainer: null, + endOffset: 0, + commonAncestorContainer: null, + collapsed: false, + // private properties + _document: null, + + // private methods + _refreshProperties: function () { + // collapsed attribute + this.collapsed = (this.startContainer == this.endContainer && this.startOffset == this.endOffset); + // find common ancestor + var node = this.startContainer; + while (node && node != this.endContainer && !DOMUtils.isAncestorOf(node, this.endContainer)) + node = node.parentNode; + this.commonAncestorContainer = node; + }, + + // range methods +//[TODO] collapse if start is after end, end is before start + setStart: function(container, offset) { + this.startContainer = container; + this.startOffset = offset; + this._refreshProperties(); + }, + setEnd: function(container, offset) { + this.endContainer = container; + this.endOffset = offset; + this._refreshProperties(); + }, + setStartBefore: function (refNode) { + // set start to beore this node + this.setStart(refNode.parentNode, DOMUtils.findChildPosition(refNode)); + }, + setStartAfter: function (refNode) { + // select next sibling + this.setStart(refNode.parentNode, DOMUtils.findChildPosition(refNode) + 1); + }, + setEndBefore: function (refNode) { + // set end to beore this node + this.setEnd(refNode.parentNode, DOMUtils.findChildPosition(refNode)); + }, + setEndAfter: function (refNode) { + // select next sibling + this.setEnd(refNode.parentNode, DOMUtils.findChildPosition(refNode) + 1); + }, + selectNode: function (refNode) { + this.setStartBefore(refNode); + this.setEndAfter(refNode); + }, + selectNodeContents: function (refNode) { + this.setStart(refNode, 0); + this.setEnd(refNode, DOMUtils.getNodeLength(refNode)); + }, + collapse: function (toStart) { + if (toStart) + this.setEnd(this.startContainer, this.startOffset); + else + this.setStart(this.endContainer, this.endOffset); + }, + + // editing methods + cloneContents: function () { + // clone subtree + return (function cloneSubtree(iterator) { + for (var node, frag = document.createDocumentFragment(); node = iterator.next(); ) { + node = node.cloneNode(!iterator.hasPartialSubtree()); + if (iterator.hasPartialSubtree()) + node.appendChild(cloneSubtree(iterator.getSubtreeIterator())); + frag.appendChild(node); + } + return frag; + })(new RangeIterator(this)); + }, + extractContents: function () { + // cache range and move anchor points + var range = this.cloneRange(); + if (this.startContainer != this.commonAncestorContainer) + this.setStartAfter(DOMUtils.findClosestAncestor(this.commonAncestorContainer, this.startContainer)); + this.collapse(true); + // extract range + return (function extractSubtree(iterator) { + for (var node, frag = document.createDocumentFragment(); node = iterator.next(); ) { + iterator.hasPartialSubtree() ? node = node.cloneNode(false) : iterator.remove(); + if (iterator.hasPartialSubtree()) + node.appendChild(extractSubtree(iterator.getSubtreeIterator())); + frag.appendChild(node); + } + return frag; + })(new RangeIterator(range)); + }, + deleteContents: function () { + // cache range and move anchor points + var range = this.cloneRange(); + if (this.startContainer != this.commonAncestorContainer) + this.setStartAfter(DOMUtils.findClosestAncestor(this.commonAncestorContainer, this.startContainer)); + this.collapse(true); + // delete range + (function deleteSubtree(iterator) { + while (iterator.next()) + iterator.hasPartialSubtree() ? deleteSubtree(iterator.getSubtreeIterator()) : iterator.remove(); + })(new RangeIterator(range)); + }, + insertNode: function (newNode) { + // set original anchor and insert node + if (DOMUtils.isDataNode(this.startContainer)) { + DOMUtils.splitDataNode(this.startContainer, this.startOffset); + this.startContainer.parentNode.insertBefore(newNode, this.startContainer.nextSibling); + } else { + this.startContainer.insertBefore(newNode, this.startContainer.childNodes[this.startOffset]); + } + // resync start anchor + this.setStart(this.startContainer, this.startOffset); + }, + surroundContents: function (newNode) { + // extract and surround contents + var content = this.extractContents(); + this.insertNode(newNode); + newNode.appendChild(content); + this.selectNode(newNode); + }, + + // other methods + compareBoundaryPoints: function (how, sourceRange) { + // get anchors + var containerA, offsetA, containerB, offsetB; + switch (how) { + case DOMRange.START_TO_START: + case DOMRange.START_TO_END: + containerA = this.startContainer; + offsetA = this.startOffset; + break; + case DOMRange.END_TO_END: + case DOMRange.END_TO_START: + containerA = this.endContainer; + offsetA = this.endOffset; + break; + } + switch (how) { + case DOMRange.START_TO_START: + case DOMRange.END_TO_START: + containerB = sourceRange.startContainer; + offsetB = sourceRange.startOffset; + break; + case DOMRange.START_TO_END: + case DOMRange.END_TO_END: + containerB = sourceRange.endContainer; + offsetB = sourceRange.endOffset; + break; + } + + // compare + return containerA.sourceIndex < containerB.sourceIndex ? -1 : + containerA.sourceIndex == containerB.sourceIndex ? + offsetA < offsetB ? -1 : offsetA == offsetB ? 0 : 1 + : 1; + }, + cloneRange: function () { + // return cloned range + var range = new DOMRange(this._document); + range.setStart(this.startContainer, this.startOffset); + range.setEnd(this.endContainer, this.endOffset); + return range; + }, + detach: function () { +//[TODO] Releases Range from use to improve performance. + }, + toString: function () { + return TextRangeUtils.convertFromDOMRange(this).text; + }, + createContextualFragment: function (tagString) { + // parse the tag string in a context node + var content = (DOMUtils.isDataNode(this.startContainer) ? this.startContainer.parentNode : this.startContainer).cloneNode(false); + content.innerHTML = tagString; + // return a document fragment from the created node + for (var fragment = this._document.createDocumentFragment(); content.firstChild; ) + fragment.appendChild(content.firstChild); + return fragment; + } +}; + +/* + Range iterator + */ + +function RangeIterator(range) { + this.range = range; + if (range.collapsed) + return; + +//[TODO] ensure this works + // get anchors + var root = range.commonAncestorContainer; + this._next = range.startContainer == root && !DOMUtils.isDataNode(range.startContainer) ? + range.startContainer.childNodes[range.startOffset] : + DOMUtils.findClosestAncestor(root, range.startContainer); + this._end = range.endContainer == root && !DOMUtils.isDataNode(range.endContainer) ? + range.endContainer.childNodes[range.endOffset] : + DOMUtils.findClosestAncestor(root, range.endContainer).nextSibling; +} + +RangeIterator.prototype = { + // public properties + range: null, + // private properties + _current: null, + _next: null, + _end: null, + + // public methods + hasNext: function () { + return !!this._next; + }, + next: function () { + // move to next node + var current = this._current = this._next; + this._next = this._current && this._current.nextSibling != this._end ? + this._current.nextSibling : null; + + // check for partial text nodes + if (DOMUtils.isDataNode(this._current)) { + if (this.range.endContainer == this._current) + (current = current.cloneNode(true)).deleteData(this.range.endOffset, current.length - this.range.endOffset); + if (this.range.startContainer == this._current) + (current = current.cloneNode(true)).deleteData(0, this.range.startOffset); + } + return current; + }, + remove: function () { + // check for partial text nodes + if (DOMUtils.isDataNode(this._current) && + (this.range.startContainer == this._current || this.range.endContainer == this._current)) { + var start = this.range.startContainer == this._current ? this.range.startOffset : 0; + var end = this.range.endContainer == this._current ? this.range.endOffset : this._current.length; + this._current.deleteData(start, end - start); + } else + this._current.parentNode.removeChild(this._current); + }, + hasPartialSubtree: function () { + // check if this node be partially selected + return !DOMUtils.isDataNode(this._current) && + (DOMUtils.isAncestorOrSelf(this._current, this.range.startContainer) || + DOMUtils.isAncestorOrSelf(this._current, this.range.endContainer)); + }, + getSubtreeIterator: function () { + // create a new range + var subRange = new DOMRange(this.range._document); + subRange.selectNodeContents(this._current); + // handle anchor points + if (DOMUtils.isAncestorOrSelf(this._current, this.range.startContainer)) + subRange.setStart(this.range.startContainer, this.range.startOffset); + if (DOMUtils.isAncestorOrSelf(this._current, this.range.endContainer)) + subRange.setEnd(this.range.endContainer, this.range.endOffset); + // return iterator + return new RangeIterator(subRange); + } +}; + +/* + DOM Selection + */ + +//[NOTE] This is a very shallow implementation of the Selection object, based on Webkit's +// implementation and without redundant features. Complete selection manipulation is still +// possible with just removeAllRanges/addRange/getRangeAt. + +function DOMSelection(document) { + // save document parameter + this._document = document; + + // add DOM selection handler + var selection = this; + document.attachEvent('onselectionchange', function () { selection._selectionChangeHandler(); }); +} + +DOMSelection.prototype = { + // public properties + rangeCount: 0, + // private properties + _document: null, + + // private methods + _selectionChangeHandler: function () { + // check if there exists a range + this.rangeCount = this._selectionExists(this._document.selection.createRange()) ? 1 : 0; + }, + _selectionExists: function (textRange) { + // checks if a created text range exists or is an editable cursor + return textRange.compareEndPoints('StartToEnd', textRange) != 0 || + textRange.parentElement().isContentEditable; + }, + + // public methods + addRange: function (range) { + // add range or combine with existing range + var selection = this._document.selection.createRange(), textRange = TextRangeUtils.convertFromDOMRange(range); + if (!this._selectionExists(selection)) + { + // select range + textRange.select(); + } + else + { + // only modify range if it intersects with current range + if (textRange.compareEndPoints('StartToStart', selection) == -1) + if (textRange.compareEndPoints('StartToEnd', selection) > -1 && + textRange.compareEndPoints('EndToEnd', selection) == -1) + selection.setEndPoint('StartToStart', textRange); + else + if (textRange.compareEndPoints('EndToStart', selection) < 1 && + textRange.compareEndPoints('EndToEnd', selection) > -1) + selection.setEndPoint('EndToEnd', textRange); + selection.select(); + } + }, + removeAllRanges: function () { + // remove all ranges + this._document.selection.empty(); + }, + getRangeAt: function (index) { + // return any existing selection, or a cursor position in content editable mode + var textRange = this._document.selection.createRange(); + if (this._selectionExists(textRange)) + return TextRangeUtils.convertToDOMRange(textRange, this._document); + return null; + }, + toString: function () { + // get selection text + return this._document.selection.createRange().text; + } +}; + +/* + scripting hooks + */ + +document.createRange = function () { + return new DOMRange(document); +}; + +var selection = new DOMSelection(document); +window.getSelection = function () { + return selection; +}; + +//[TODO] expose DOMRange/DOMSelection to window.? + +})(); diff --git a/apps/wolnelektury_core/static/js/jquery-ui-1.8.16.custom.min.js b/apps/wolnelektury_core/static/js/jquery-ui-1.8.16.custom.min.js new file mode 100644 index 000000000..a9c6fa316 --- /dev/null +++ b/apps/wolnelektury_core/static/js/jquery-ui-1.8.16.custom.min.js @@ -0,0 +1,149 @@ +/*! + * jQuery UI 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function(c,j){function k(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&l(a)}return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)}function l(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.16", +keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({propAttr:c.fn.prop||c.fn.attr,_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d= +this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this, +"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart": +"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,m,n){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight, +outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return k(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a, +"tabindex"),d=isNaN(b);return(d||b>=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&& +a.element[0].parentNode)for(var e=0;e0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted= +false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery); +;/* + * jQuery UI Position 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Position + */ +(function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY, +left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+= +k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+(parseInt(c.curCSS(this,"marginRight",true))||0),w=m+q+(parseInt(c.curCSS(this,"marginBottom",true))||0),i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-= +m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left= +d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+= +a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b), +g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery); +;/* + * jQuery UI Draggable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Draggables + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper== +"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b= +this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;if(b.iframeFix)d(b.iframeFix===true?"iframe":b.iframeFix).each(function(){d('
    ').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")});return true},_mouseStart:function(a){var b=this.options; +this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}); +this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);d.ui.ddmanager&&d.ui.ddmanager.dragStart(this,a);return true}, +_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b= +false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration, +10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},_mouseUp:function(a){this.options.iframeFix===true&&d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});d.ui.ddmanager&&d.ui.ddmanager.dragStop(this,a);return d.ui.mouse.prototype._mouseUp.call(this,a)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle|| +!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone().removeAttr("id"):this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&& +a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent= +this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"), +10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"), +10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[a.containment=="document"?0:d(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a.containment=="document"?0:d(window).scrollTop()-this.offset.relative.top-this.offset.parent.top, +(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){a=d(a.containment);var b=a[0];if(b){a.offset();var c=d(b).css("overflow")!= +"hidden";this.containment=[(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0),(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0),(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"), +10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=a}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+ +this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&& +!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,h=a.pageY;if(this.originalPosition){var g;if(this.containment){if(this.relative_container){g=this.relative_container.offset();g=[this.containment[0]+g.left,this.containment[1]+g.top,this.containment[2]+g.left,this.containment[3]+g.top]}else g=this.containment;if(a.pageX-this.offset.click.leftg[2])e=g[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>g[3])h=g[3]+this.offset.click.top}if(b.grid){h=b.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/b.grid[1])*b.grid[1]:this.originalPageY;h=g?!(h-this.offset.click.topg[3])?h:!(h-this.offset.click.topg[2])?e:!(e-this.offset.click.left=0;i--){var j=c.snapElements[i].left,l=j+c.snapElements[i].width,k=c.snapElements[i].top,m=k+c.snapElements[i].height;if(j-e").addClass("ui-autocomplete").appendTo(d(this.options.appendTo||"body",b)[0]).mousedown(function(c){var f=a.menu.element[0];d(c.target).closest(".ui-menu-item").length||setTimeout(function(){d(document).one("mousedown",function(h){h.target!==a.element[0]&&h.target!==f&&!d.ui.contains(f,h.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(c,f){f=f.item.data("item.autocomplete");false!==a._trigger("focus",c,{item:f})&&/^key/.test(c.originalEvent.type)&& +a.element.val(f.value)},selected:function(c,f){var h=f.item.data("item.autocomplete"),i=a.previous;if(a.element[0]!==b.activeElement){a.element.focus();a.previous=i;setTimeout(function(){a.previous=i;a.selectedItem=h},1)}false!==a._trigger("select",c,{item:h})&&a.element.val(h.value);a.term=a.element.val();a.close(c);a.selectedItem=h},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"); +d.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();d.Widget.prototype.destroy.call(this)},_setOption:function(a,b){d.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource();if(a==="appendTo")this.menu.element.appendTo(d(b||"body",this.element[0].ownerDocument)[0]);a==="disabled"&& +b&&this.xhr&&this.xhr.abort()},_initSource:function(){var a=this,b,g;if(d.isArray(this.options.source)){b=this.options.source;this.source=function(c,f){f(d.ui.autocomplete.filter(b,c.term))}}else if(typeof this.options.source==="string"){g=this.options.source;this.source=function(c,f){a.xhr&&a.xhr.abort();a.xhr=d.ajax({url:g,data:c,dataType:"json",autocompleteRequest:++e,success:function(h){this.autocompleteRequest===e&&f(h)},error:function(){this.autocompleteRequest===e&&f([])}})}}else this.source= +this.options.source},search:function(a,b){a=a!=null?a:this.element.val();this.term=this.element.val();if(a.length").data("item.autocomplete",b).append(d("
    ").text(b.label)).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](b);else this.search(null,b)},widget:function(){return this.menu.element}});d.extend(d.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, +"\\$&")},filter:function(a,b){var g=new RegExp(d.ui.autocomplete.escapeRegex(b),"i");return d.grep(a,function(c){return g.test(c.label||c.value||c)})}})})(jQuery); +(function(d){d.widget("ui.menu",{_create:function(){var e=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(a){if(d(a.target).closest(".ui-menu-item a").length){a.preventDefault();e.select(a)}});this.refresh()},refresh:function(){var e=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex", +-1).mouseenter(function(a){e.activate(a,d(this).parent())}).mouseleave(function(){e.deactivate()})},activate:function(e,a){this.deactivate();if(this.hasScroll()){var b=a.offset().top-this.element.offset().top,g=this.element.scrollTop(),c=this.element.height();if(b<0)this.element.scrollTop(g+b);else b>=c&&this.element.scrollTop(g+b-c+a.height())}this.active=a.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",e,{item:a})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id"); +this._trigger("blur");this.active=null}},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,a,b){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0);e.length?this.activate(b,e):this.activate(b,this.element.children(a))}else this.activate(b, +this.element.children(a))},nextPage:function(e){if(this.hasScroll())if(!this.active||this.last())this.activate(e,this.element.children(".ui-menu-item:first"));else{var a=this.active.offset().top,b=this.element.height(),g=this.element.children(".ui-menu-item").filter(function(){var c=d(this).offset().top-a-b+d(this).height();return c<10&&c>-10});g.length||(g=this.element.children(".ui-menu-item:last"));this.activate(e,g)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active|| +this.last()?":first":":last"))},previousPage:function(e){if(this.hasScroll())if(!this.active||this.first())this.activate(e,this.element.children(".ui-menu-item:last"));else{var a=this.active.offset().top,b=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var g=d(this).offset().top-a+b-d(this).height();return g<10&&g>-10});result.length||(result=this.element.children(".ui-menu-item:first"));this.activate(e,result)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active|| +this.first()?":last":":first"))},hasScroll:function(){return this.element.height()0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a=0)&&c(a).is(":focusable")}})}})(jQuery); +;/*! + * jQuery UI Widget 1.8.2 + * + * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Widget + */ +(function(b){var j=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add(this).each(function(){b(this).triggerHandler("remove")});return j.call(b(this),a,c)})};b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend({},c.options);b[e][a].prototype= +b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.substring(0,1)==="_")return h;e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==undefined){h=i;return false}}):this.each(function(){var g= +b.data(this,a);if(g){d&&g.option(d);g._init()}else b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){this.element=b(c).data(this.widgetName,this);this.options=b.extend(true,{},this.options,b.metadata&&b.metadata.get(c)[this.widgetName],a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create(); +this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(a,c){var d=a,e=this;if(arguments.length===0)return b.extend({},e.options);if(typeof a==="string"){if(c===undefined)return this.options[a];d={};d[a]=c}b.each(d,function(f, +h){e._setOption(f,h)});return e},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a= +b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery); +;/* + * jQuery UI Position 1.8.2 + * + * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Position + */ +(function(c){c.ui=c.ui||{};var m=/left|center|right/,n=/top|center|bottom/,p=c.fn.position,q=c.fn.offset;c.fn.position=function(a){if(!a||!a.of)return p.apply(this,arguments);a=c.extend({},a);var b=c(a.of),d=(a.collision||"flip").split(" "),e=a.offset?a.offset.split(" "):[0,0],g,h,i;if(a.of.nodeType===9){g=b.width();h=b.height();i={top:0,left:0}}else if(a.of.scrollTo&&a.of.document){g=b.width();h=b.height();i={top:b.scrollTop(),left:b.scrollLeft()}}else if(a.of.preventDefault){a.at="left top";g=h= +0;i={top:a.of.pageY,left:a.of.pageX}}else{g=b.outerWidth();h=b.outerHeight();i=b.offset()}c.each(["my","at"],function(){var f=(a[this]||"").split(" ");if(f.length===1)f=m.test(f[0])?f.concat(["center"]):n.test(f[0])?["center"].concat(f):["center","center"];f[0]=m.test(f[0])?f[0]:"center";f[1]=n.test(f[1])?f[1]:"center";a[this]=f});if(d.length===1)d[1]=d[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(a.at[0]==="right")i.left+=g;else if(a.at[0]==="center")i.left+= +g/2;if(a.at[1]==="bottom")i.top+=h;else if(a.at[1]==="center")i.top+=h/2;i.left+=e[0];i.top+=e[1];return this.each(function(){var f=c(this),k=f.outerWidth(),l=f.outerHeight(),j=c.extend({},i);if(a.my[0]==="right")j.left-=k;else if(a.my[0]==="center")j.left-=k/2;if(a.my[1]==="bottom")j.top-=l;else if(a.my[1]==="center")j.top-=l/2;j.left=parseInt(j.left);j.top=parseInt(j.top);c.each(["left","top"],function(o,r){c.ui.position[d[o]]&&c.ui.position[d[o]][r](j,{targetWidth:g,targetHeight:h,elemWidth:k, +elemHeight:l,offset:e,my:a.my,at:a.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(j,{using:a.using}))})};c.ui.position={fit:{left:function(a,b){var d=c(window);b=a.left+b.elemWidth-d.width()-d.scrollLeft();a.left=b>0?a.left-b:Math.max(0,a.left)},top:function(a,b){var d=c(window);b=a.top+b.elemHeight-d.height()-d.scrollTop();a.top=b>0?a.top-b:Math.max(0,a.top)}},flip:{left:function(a,b){if(b.at[0]!=="center"){var d=c(window);d=a.left+b.elemWidth-d.width()-d.scrollLeft();var e=b.my[0]==="left"? +-b.elemWidth:b.my[0]==="right"?b.elemWidth:0,g=-2*b.offset[0];a.left+=a.left<0?e+b.targetWidth+g:d>0?e-b.targetWidth+g:0}},top:function(a,b){if(b.at[1]!=="center"){var d=c(window);d=a.top+b.elemHeight-d.height()-d.scrollTop();var e=b.my[1]==="top"?-b.elemHeight:b.my[1]==="bottom"?b.elemHeight:0,g=b.at[1]==="top"?b.targetHeight:-b.targetHeight,h=-2*b.offset[1];a.top+=a.top<0?e+b.targetHeight+h:d>0?e+g+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(a,b){if(/static/.test(c.curCSS(a,"position")))a.style.position= +"relative";var d=c(a),e=d.offset(),g=parseInt(c.curCSS(a,"top",true),10)||0,h=parseInt(c.curCSS(a,"left",true),10)||0;e={top:b.top-e.top+g,left:b.left-e.left+h};"using"in b?b.using.call(a,e):d.css(e)};c.fn.offset=function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(){c.offset.setOffset(this,a)});return q.call(this)}}})(jQuery); +;/* + * jQuery UI Autocomplete 1.8.2 + * + * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Autocomplete + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + * jquery.ui.position.js + */ +(function(e){e.widget("ui.autocomplete",{options:{minLength:1,delay:300},_create:function(){var a=this,c=this.element[0].ownerDocument;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(d){var b=e.ui.keyCode;switch(d.keyCode){case b.PAGE_UP:a._move("previousPage",d);break;case b.PAGE_DOWN:a._move("nextPage",d);break;case b.UP:a._move("previous",d);d.preventDefault(); +break;case b.DOWN:a._move("next",d);d.preventDefault();break;case b.ENTER:case b.NUMPAD_ENTER:a.menu.active&&d.preventDefault();case b.TAB:if(!a.menu.active)return;a.menu.select(d);break;case b.ESCAPE:a.element.val(a.term);a.close(d);break;case b.LEFT:case b.RIGHT:case b.SHIFT:case b.CONTROL:case b.ALT:case b.COMMAND:case b.COMMAND_RIGHT:case b.INSERT:case b.CAPS_LOCK:case b.END:case b.HOME:break;default:clearTimeout(a.searching);a.searching=setTimeout(function(){a.search(null,d)},a.options.delay); +break}}).bind("focus.autocomplete",function(){a.selectedItem=null;a.previous=a.element.val()}).bind("blur.autocomplete",function(d){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(d);a._change(d)},150)});this._initSource();this.response=function(){return a._response.apply(a,arguments)};this.menu=e("
      ").addClass("ui-autocomplete").appendTo("body",c).mousedown(function(){setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(d,b){b=b.item.data("item.autocomplete"); +false!==a._trigger("focus",null,{item:b})&&/^key/.test(d.originalEvent.type)&&a.element.val(b.value)},selected:function(d,b){b=b.item.data("item.autocomplete");false!==a._trigger("select",d,{item:b})&&a.element.val(b.value);a.close(d);d=a.previous;if(a.element[0]!==c.activeElement){a.element.focus();a.previous=d}a.selectedItem=b},blur:function(){a.menu.element.is(":visible")&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");e.fn.bgiframe&&this.menu.element.bgiframe()}, +destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();e.Widget.prototype.destroy.call(this)},_setOption:function(a){e.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource()},_initSource:function(){var a,c;if(e.isArray(this.options.source)){a=this.options.source;this.source=function(d,b){b(e.ui.autocomplete.filter(a,d.term))}}else if(typeof this.options.source=== +"string"){c=this.options.source;this.source=function(d,b){e.getJSON(c,d,b)}}else this.source=this.options.source},search:function(a,c){a=a!=null?a:this.element.val();if(a.length").data("item.autocomplete", +c).append(""+c.label+"").appendTo(a)},_move:function(a,c){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](c);else this.search(null,c)},widget:function(){return this.menu.element}});e.extend(e.ui.autocomplete,{escapeRegex:function(a){return a.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")},filter:function(a,c){var d=new RegExp(e.ui.autocomplete.escapeRegex(c), +"i");return e.grep(a,function(b){return d.test(b.label||b.value||b)})}})})(jQuery); +(function(e){e.widget("ui.menu",{_create:function(){var a=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(e(c.target).closest(".ui-menu-item a").length){c.preventDefault();a.select(c)}});this.refresh()},refresh:function(){var a=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex", +-1).mouseenter(function(c){a.activate(c,e(this).parent())}).mouseleave(function(){a.deactivate()})},activate:function(a,c){this.deactivate();if(this.hasScroll()){var d=c.offset().top-this.element.offset().top,b=this.element.attr("scrollTop"),f=this.element.height();if(d<0)this.element.attr("scrollTop",b+d);else d>f&&this.element.attr("scrollTop",b+d-f+c.height())}this.active=c.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",a,{item:c})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id"); +this._trigger("blur");this.active=null}},next:function(a){this.move("next",".ui-menu-item:first",a)},previous:function(a){this.move("prev",".ui-menu-item:last",a)},first:function(){return this.active&&!this.active.prev().length},last:function(){return this.active&&!this.active.next().length},move:function(a,c,d){if(this.active){a=this.active[a+"All"](".ui-menu-item").eq(0);a.length?this.activate(d,a):this.activate(d,this.element.children(c))}else this.activate(d,this.element.children(c))},nextPage:function(a){if(this.hasScroll())if(!this.active|| +this.last())this.activate(a,this.element.children(":first"));else{var c=this.active.offset().top,d=this.element.height(),b=this.element.children("li").filter(function(){var f=e(this).offset().top-c-d+e(this).height();return f<10&&f>-10});b.length||(b=this.element.children(":last"));this.activate(a,b)}else this.activate(a,this.element.children(!this.active||this.last()?":first":":last"))},previousPage:function(a){if(this.hasScroll())if(!this.active||this.first())this.activate(a,this.element.children(":last")); +else{var c=this.active.offset().top,d=this.element.height();result=this.element.children("li").filter(function(){var b=e(this).offset().top-c+d-e(this).height();return b<10&&b>-10});result.length||(result=this.element.children(":first"));this.activate(a,result)}else this.activate(a,this.element.children(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height() 1 && !select.visible() ) { + onChange(0, true); + } + }).bind("search", function() { + // TODO why not just specifying both arguments? + var fn = (arguments.length > 1) ? arguments[1] : null; + function findValueCallback(q, data) { + var result; + if( data && data.length ) { + for (var i=0; i < data.length; i++) { + if( data[i].result.toLowerCase() == q.toLowerCase() ) { + result = data[i]; + break; + } + } + } + if( typeof fn == "function" ) fn(result); + else $input.trigger("result", result && [result.data, result.value]); + } + $.each(trimWords($input.val()), function(i, value) { + request(value, findValueCallback, findValueCallback); + }); + }).bind("flushCache", function() { + cache.flush(); + }).bind("setOptions", function() { + $.extend(options, arguments[1]); + // if we've updated the data, repopulate + if ( "data" in arguments[1] ) + cache.populate(); + }).bind("unautocomplete", function() { + select.unbind(); + $input.unbind(); + $(input.form).unbind(".autocomplete"); + }); + + + function selectCurrent() { + var selected = select.selected(); + if( !selected ) + return false; + + var v = selected.result; + previousValue = v; + + if ( options.multiple ) { + var words = trimWords($input.val()); + if ( words.length > 1 ) { + var seperator = options.multipleSeparator.length; + var cursorAt = $(input).selection().start; + var wordAt, progress = 0; + $.each(words, function(i, word) { + progress += word.length; + if (cursorAt <= progress) { + wordAt = i; + return false; + } + progress += seperator; + }); + words[wordAt] = v; + // TODO this should set the cursor to the right position, but it gets overriden somewhere + //$.Autocompleter.Selection(input, progress + seperator, progress + seperator); + v = words.join( options.multipleSeparator ); + } + v += options.multipleSeparator; + } + + $input.val(v); + hideResultsNow(); + $input.trigger("result", [selected.data, selected.value]); + return true; + } + + function onChange(crap, skipPrevCheck) { + if( lastKeyPressCode == KEY.DEL ) { + select.hide(); + return; + } + + var currentValue = $input.val(); + + if ( !skipPrevCheck && currentValue == previousValue ) + return; + + previousValue = currentValue; + + currentValue = lastWord(currentValue); + if ( currentValue.length >= options.minChars) { + $input.addClass(options.loadingClass); + if (!options.matchCase) + currentValue = currentValue.toLowerCase(); + request(currentValue, receiveData, hideResultsNow); + } else { + stopLoading(); + select.hide(); + } + }; + + function trimWords(value) { + if (!value) + return [""]; + if (!options.multiple) + return [$.trim(value)]; + return $.map(value.split(options.multipleSeparator), function(word) { + return $.trim(value).length ? $.trim(word) : null; + }); + } + + function lastWord(value) { + if ( !options.multiple ) + return value; + var words = trimWords(value); + if (words.length == 1) + return words[0]; + var cursorAt = $(input).selection().start; + if (cursorAt == value.length) { + words = trimWords(value) + } else { + words = trimWords(value.replace(value.substring(cursorAt), "")); + } + return words[words.length - 1]; + } + + // fills in the input box w/the first match (assumed to be the best match) + // q: the term entered + // sValue: the first matching result + function autoFill(q, sValue){ + // autofill in the complete box w/the first match as long as the user hasn't entered in more data + // if the last user key pressed was backspace, don't autofill + if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) { + // fill in the value (keep the case the user has typed) + $input.val($input.val() + sValue.substring(lastWord(previousValue).length)); + // select the portion of the value not typed by the user (so the next character will erase) + $(input).selection(previousValue.length, previousValue.length + sValue.length); + } + }; + + function hideResults() { + clearTimeout(timeout); + timeout = setTimeout(hideResultsNow, 200); + }; + + function hideResultsNow() { + var wasVisible = select.visible(); + select.hide(); + clearTimeout(timeout); + stopLoading(); + if (options.mustMatch) { + // call search and run callback + $input.search( + function (result){ + // if no value found, clear the input box + if( !result ) { + if (options.multiple) { + var words = trimWords($input.val()).slice(0, -1); + $input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") ); + } + else { + $input.val( "" ); + $input.trigger("result", null); + } + } + } + ); + } + }; + + function receiveData(q, data) { + if ( data && data.length && hasFocus ) { + stopLoading(); + select.display(data, q); + autoFill(q, data[0].value); + select.show(); + } else { + hideResultsNow(); + } + }; + + function request(term, success, failure) { + if (!options.matchCase) + term = term.toLowerCase(); + var data = cache.load(term); + // recieve the cached data + if (data && data.length) { + success(term, data); + // if an AJAX url has been supplied, try loading the data now + } else if( (typeof options.url == "string") && (options.url.length > 0) ){ + + var extraParams = { + timestamp: +new Date() + }; + $.each(options.extraParams, function(key, param) { + extraParams[key] = typeof param == "function" ? param() : param; + }); + + $.ajax({ + // try to leverage ajaxQueue plugin to abort previous requests + mode: "abort", + // limit abortion to this input + port: "autocomplete" + input.name, + dataType: options.dataType, + url: options.url, + data: $.extend({ + q: lastWord(term), + limit: options.max + }, extraParams), + success: function(data) { + var parsed = options.parse && options.parse(data) || parse(data); + cache.add(term, parsed); + success(term, parsed); + } + }); + } else { + // if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match + select.emptyList(); + failure(term); + } + }; + + function parse(data) { + var parsed = []; + var rows = data.split("\n"); + for (var i=0; i < rows.length; i++) { + var row = $.trim(rows[i]); + if (row) { + row = row.split("|"); + parsed[parsed.length] = { + data: row, + value: row[0], + result: options.formatResult && options.formatResult(row, row[0]) || row[0] + }; + } + } + return parsed; + }; + + function stopLoading() { + $input.removeClass(options.loadingClass); + }; + +}; + +$.Autocompleter.defaults = { + inputClass: "ac_input", + resultsClass: "ac_results", + loadingClass: "ac_loading", + minChars: 1, + delay: 400, + matchCase: false, + matchSubset: true, + matchContains: false, + cacheLength: 10, + max: 100, + mustMatch: false, + extraParams: {}, + selectFirst: true, + formatItem: function(row) { return row[0]; }, + formatMatch: null, + autoFill: false, + width: 0, + multiple: false, + multipleSeparator: ", ", + regex_escape: function(term) { + term = term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1"); + /* no polish diacritics; should be more locale-aware */ + term = term.replace(/a/g, '[aą]') + .replace(/c/g, '[cć]') + .replace(/e/g, '[eę]') + .replace(/l/g, '[lł]') + .replace(/n/g, '[nń]') + .replace(/o/g, '[oó]') + .replace(/s/g, '[sś]') + .replace(/z/g, '[zźż]'); + return term; + }, + highlight: function(value, term) { + term = $.Autocompleter.defaults.regex_escape(term); + return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "$1"); + }, + scroll: true, + scrollHeight: 180 +}; + +$.Autocompleter.Cache = function(options) { + + var data = {}; + var length = 0; + + function matchSubset(s, sub) { + if (!options.matchCase) + s = s.toLowerCase(); + var i = s.indexOf(sub); + if (options.matchContains == "word"){ + query = $.Autocompleter.defaults.regex_escape(sub.toLowerCase()); + i = s.toLowerCase().search("\\b" + query); + } + if (i == -1) return false; + return i == 0 || options.matchContains; + }; + + function add(q, value) { + if (length > options.cacheLength){ + flush(); + } + if (!data[q]){ + length++; + } + data[q] = value; + } + + function populate(){ + if( !options.data ) return false; + // track the matches + var stMatchSets = {}, + nullData = 0; + + // no url was specified, we need to adjust the cache length to make sure it fits the local data store + if( !options.url ) options.cacheLength = 1; + + // track all options for minChars = 0 + stMatchSets[""] = []; + + // loop through the array and create a lookup structure + for ( var i = 0, ol = options.data.length; i < ol; i++ ) { + var rawValue = options.data[i]; + // if rawValue is a string, make an array otherwise just reference the array + rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue; + + var value = options.formatMatch(rawValue, i+1, options.data.length); + if ( value === false ) + continue; + + var firstChar = value.charAt(0).toLowerCase(); + // if no lookup array for this character exists, look it up now + if( !stMatchSets[firstChar] ) + stMatchSets[firstChar] = []; + + // if the match is a string + var row = { + value: value, + data: rawValue, + result: options.formatResult && options.formatResult(rawValue) || value + }; + + // push the current match into the set list + stMatchSets[firstChar].push(row); + + // keep track of minChars zero items + if ( nullData++ < options.max ) { + stMatchSets[""].push(row); + } + }; + + // add the data items to the cache + $.each(stMatchSets, function(i, value) { + // increase the cache size + options.cacheLength++; + // add to the cache + add(i, value); + }); + } + + // populate any existing data + setTimeout(populate, 25); + + function flush(){ + data = {}; + length = 0; + } + + return { + flush: flush, + add: add, + populate: populate, + load: function(q) { + if (!options.cacheLength || !length) + return null; + /* + * if dealing w/local data and matchContains than we must make sure + * to loop through all the data collections looking for matches + */ + if( !options.url && options.matchContains ){ + // track all matches + var csub = []; + // loop through all the data grids for matches + for( var k in data ){ + // don't search through the stMatchSets[""] (minChars: 0) cache + // this prevents duplicates + if( k.length > 0 ){ + var c = data[k]; + $.each(c, function(i, x) { + // if we've got a match, add it to the array + if (matchSubset(x.value, q)) { + csub.push(x); + } + }); + } + } + return csub; + } else + // if the exact item exists, use it + if (data[q]){ + return data[q]; + } else + if (options.matchSubset) { + for (var i = q.length - 1; i >= options.minChars; i--) { + var c = data[q.substr(0, i)]; + if (c) { + var csub = []; + $.each(c, function(i, x) { + if (matchSubset(x.value, q)) { + csub[csub.length] = x; + } + }); + return csub; + } + } + } + return null; + } + }; +}; + +$.Autocompleter.Select = function (options, input, select, config) { + var CLASSES = { + ACTIVE: "ac_over" + }; + + var listItems, + active = -1, + data, + term = "", + needsInit = true, + element, + list; + + // Create results + function init() { + if (!needsInit) + return; + element = $("
      ") + .hide() + .addClass(options.resultsClass) + .css("position", "absolute") + .appendTo(document.body); + + list = $("
        ").appendTo(element).mouseover( function(event) { + if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') { + active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event)); + $(target(event)).addClass(CLASSES.ACTIVE); + } + }).click(function(event) { + $(target(event)).addClass(CLASSES.ACTIVE); + select(); + // TODO provide option to avoid setting focus again after selection? useful for cleanup-on-focus + input.focus(); + return false; + }).mousedown(function() { + config.mouseDownOnSelect = true; + }).mouseup(function() { + config.mouseDownOnSelect = false; + }); + + if( options.width > 0 ) + element.css("width", options.width); + + needsInit = false; + } + + function target(event) { + var element = event.target; + while(element && element.tagName != "LI") + element = element.parentNode; + // more fun with IE, sometimes event.target is empty, just ignore it then + if(!element) + return []; + return element; + } + + function moveSelect(step) { + listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE); + movePosition(step); + var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE); + if(options.scroll) { + var offset = 0; + listItems.slice(0, active).each(function() { + offset += this.offsetHeight; + }); + if((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) { + list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight()); + } else if(offset < list.scrollTop()) { + list.scrollTop(offset); + } + } + }; + + function movePosition(step) { + active += step; + if (active < 0) { + active = listItems.size() - 1; + } else if (active >= listItems.size()) { + active = 0; + } + } + + function limitNumberOfItems(available) { + return options.max && options.max < available + ? options.max + : available; + } + + function fillList() { + list.empty(); + var max = limitNumberOfItems(data.length); + for (var i=0; i < max; i++) { + if (!data[i]) + continue; + var formatted = options.formatItem(data[i].data, i+1, max, data[i].value, term); + if ( formatted === false ) + continue; + var li = $("
      • ").html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? "ac_even" : "ac_odd").appendTo(list)[0]; + $.data(li, "ac_data", data[i]); + } + listItems = list.find("li"); + if ( options.selectFirst ) { + listItems.slice(0, 1).addClass(CLASSES.ACTIVE); + active = 0; + } + // apply bgiframe if available + if ( $.fn.bgiframe ) + list.bgiframe(); + } + + return { + display: function(d, q) { + init(); + data = d; + term = q; + fillList(); + }, + next: function() { + moveSelect(1); + }, + prev: function() { + moveSelect(-1); + }, + pageUp: function() { + if (active != 0 && active - 8 < 0) { + moveSelect( -active ); + } else { + moveSelect(-8); + } + }, + pageDown: function() { + if (active != listItems.size() - 1 && active + 8 > listItems.size()) { + moveSelect( listItems.size() - 1 - active ); + } else { + moveSelect(8); + } + }, + hide: function() { + element && element.hide(); + listItems && listItems.removeClass(CLASSES.ACTIVE); + active = -1; + }, + visible : function() { + return element && element.is(":visible"); + }, + current: function() { + return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]); + }, + show: function() { + var offset = $(input).offset(); + element.css({ + width: typeof options.width == "string" || options.width > 0 ? options.width : $(input).width(), + top: offset.top + input.offsetHeight, + left: offset.left + }).show(); + if(options.scroll) { + list.scrollTop(0); + list.css({ + maxHeight: options.scrollHeight, + overflow: 'auto' + }); + + if($.browser.msie && typeof document.body.style.maxHeight === "undefined") { + var listHeight = 0; + listItems.each(function() { + listHeight += this.offsetHeight; + }); + var scrollbarsVisible = listHeight > options.scrollHeight; + list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight ); + if (!scrollbarsVisible) { + // IE doesn't recalculate width when scrollbar disappears + listItems.width( list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")) ); + } + } + + } + }, + selected: function() { + var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE); + return selected && selected.length && $.data(selected[0], "ac_data"); + }, + emptyList: function (){ + list && list.empty(); + }, + unbind: function() { + element && element.remove(); + } + }; +}; + +$.fn.selection = function(start, end) { + if (start !== undefined) { + return this.each(function() { + if( this.createTextRange ){ + var selRange = this.createTextRange(); + if (end === undefined || start == end) { + selRange.move("character", start); + selRange.select(); + } else { + selRange.collapse(true); + selRange.moveStart("character", start); + selRange.moveEnd("character", end); + selRange.select(); + } + } else if( this.setSelectionRange ){ + this.setSelectionRange(start, end); + } else if( this.selectionStart ){ + this.selectionStart = start; + this.selectionEnd = end; + } + }); + } + var field = this[0]; + if ( field.createTextRange ) { + var range = document.selection.createRange(), + orig = field.value, + teststring = "<->", + textLength = range.text.length; + range.text = teststring; + var caretAt = field.value.indexOf(teststring); + field.value = orig; + this.selection(caretAt, caretAt + textLength); + return { + start: caretAt, + end: caretAt + textLength + } + } else if( field.selectionStart !== undefined ){ + return { + start: field.selectionStart, + end: field.selectionEnd + } + } +}; + +})(jQuery); \ No newline at end of file diff --git a/apps/wolnelektury_core/static/js/jquery.countdown-de.js b/apps/wolnelektury_core/static/js/jquery.countdown-de.js new file mode 100644 index 000000000..5a3f43d78 --- /dev/null +++ b/apps/wolnelektury_core/static/js/jquery.countdown-de.js @@ -0,0 +1,12 @@ +/* http://keith-wood.name/countdown.html + German initialisation for the jQuery countdown extension + Written by Keith Wood (kbwood@virginbroadband.com.au) Jan 2008. */ +(function($) { + $.countdown.regional['de'] = { + labels: ['Jahren', 'Monate', 'Wochen', 'Tage', 'Stunden', 'Minuten', 'Sekunden'], + labels1: ['Jahre', 'Monat', 'Woche', 'Tag', 'Stunde', 'Minute', 'Sekunde'], + compactLabels: ['J', 'M', 'W', 'T'], + whichLabels: null, + timeSeparator: ':', isRTL: false}; + $.countdown.setDefaults($.countdown.regional['de']); +})(jQuery); diff --git a/apps/wolnelektury_core/static/js/jquery.countdown-es.js b/apps/wolnelektury_core/static/js/jquery.countdown-es.js new file mode 100644 index 000000000..362f58c7d --- /dev/null +++ b/apps/wolnelektury_core/static/js/jquery.countdown-es.js @@ -0,0 +1,12 @@ +/* http://keith-wood.name/countdown.html + * Spanish initialisation for the jQuery countdown extension + * Written by Sergio Carracedo Martinez webmaster@neodisenoweb.com (2008) */ +(function($) { + $.countdown.regional['es'] = { + labels: ['Años', 'Meses', 'Semanas', 'Dias', 'Horas', 'Minutos', 'Segundos'], + labels1: ['Años', 'Meses', 'Semanas', 'Dias', 'Horas', 'Minutos', 'Segundos'], + compactLabels: ['a', 'm', 's', 'g'], + whichLabels: null, + timeSeparator: ':', isRTL: false}; + $.countdown.setDefaults($.countdown.regional['es']); +})(jQuery); diff --git a/apps/wolnelektury_core/static/js/jquery.countdown-fr.js b/apps/wolnelektury_core/static/js/jquery.countdown-fr.js new file mode 100644 index 000000000..70e17def7 --- /dev/null +++ b/apps/wolnelektury_core/static/js/jquery.countdown-fr.js @@ -0,0 +1,12 @@ +/* http://keith-wood.name/countdown.html + French initialisation for the jQuery countdown extension + Written by Keith Wood (kbwood{at}iinet.com.au) Jan 2008. */ +(function($) { + $.countdown.regional['fr'] = { + labels: ['Années', 'Mois', 'Semaines', 'Jours', 'Heures', 'Minutes', 'Secondes'], + labels1: ['Année', 'Mois', 'Semaine', 'Jour', 'Heure', 'Minute', 'Seconde'], + compactLabels: ['a', 'm', 's', 'j'], + whichLabels: null, + timeSeparator: ':', isRTL: false}; + $.countdown.setDefaults($.countdown.regional['fr']); +})(jQuery); diff --git a/apps/wolnelektury_core/static/js/jquery.countdown-lt.js b/apps/wolnelektury_core/static/js/jquery.countdown-lt.js new file mode 100644 index 000000000..ee11c71c5 --- /dev/null +++ b/apps/wolnelektury_core/static/js/jquery.countdown-lt.js @@ -0,0 +1,12 @@ +/* http://keith-wood.name/countdown.html + * Lithuanian localisation for the jQuery countdown extension + * Written by Moacir P. de Sá Pereira (moacir{at}gmail.com) (2009) */ +(function($) { + $.countdown.regional['lt'] = { + labels: ['Metų', 'Mėnesių', 'Savaičių', 'Dienų', 'Valandų', 'Minučių', 'Sekundžių'], + labels1: ['Metai', 'Mėnuo', 'Savaitė', 'Diena', 'Valanda', 'Minutė', 'Sekundė'], + compactLabels: ['m', 'm', 's', 'd'], + whichLabels: null, + timeSeparator: ':', isRTL: false}; + $.countdown.setDefaults($.countdown.regional['lt']); +})(jQuery); diff --git a/apps/wolnelektury_core/static/js/jquery.countdown-pl.js b/apps/wolnelektury_core/static/js/jquery.countdown-pl.js new file mode 100644 index 000000000..6860a4bab --- /dev/null +++ b/apps/wolnelektury_core/static/js/jquery.countdown-pl.js @@ -0,0 +1,17 @@ +/* http://keith-wood.name/countdown.html + * Polish initialisation for the jQuery countdown extension + * Written by Pawel Lewtak lewtak@gmail.com (2008) */ +(function($) { + $.countdown.regional['pl'] = { + labels: ['lat', 'miesięcy', 'tygodni', 'dni', 'godzin', 'minut', 'sekund'], + labels1: ['rok', 'miesiąc', 'tydzień', 'dzień', 'godzina', 'minuta', 'sekunda'], + labels2: ['lata', 'miesiące', 'tygodnie', 'dni', 'godziny', 'minuty', 'sekundy'], + compactLabels: ['l', 'm', 't', 'd'], compactLabels1: ['r', 'm', 't', 'd'], + whichLabels: function(amount) { + var units = amount % 10; + var tens = Math.floor((amount % 100) / 10); + return (amount == 1 ? 1 : (units >= 2 && units <= 4 && tens != 1 ? 2 : 0)); + }, + timeSeparator: ':', isRTL: false}; + $.countdown.setDefaults($.countdown.regional['pl']); +})(jQuery); diff --git a/apps/wolnelektury_core/static/js/jquery.countdown-ru.js b/apps/wolnelektury_core/static/js/jquery.countdown-ru.js new file mode 100644 index 000000000..badd3eb01 --- /dev/null +++ b/apps/wolnelektury_core/static/js/jquery.countdown-ru.js @@ -0,0 +1,12 @@ +/* http://keith-wood.name/countdown.html + * Russian initialisation for the jQuery countdown extension + * Written by Dominus i3rixon@gmail.com (2008) */ +(function($) { + $.countdown.regional['ru'] = { + labels: ['Лет', 'Месяцев', 'Недель', 'Дней', 'Часов', 'Минут', 'Секунд'], + labels1: ['Год', 'Месяц', 'Неделя', 'День', 'Час', 'Минута', 'Секунда'], + compactLabels: ['l', 'm', 'n', 'd'], compactLabels1: ['g', 'm', 'n', 'd'], + whichLabels: null, + timeSeparator: ':', isRTL: false}; + $.countdown.setDefaults($.countdown.regional['ru']); +})(jQuery); diff --git a/apps/wolnelektury_core/static/js/jquery.countdown-uk.js b/apps/wolnelektury_core/static/js/jquery.countdown-uk.js new file mode 100644 index 000000000..c98791e53 --- /dev/null +++ b/apps/wolnelektury_core/static/js/jquery.countdown-uk.js @@ -0,0 +1,12 @@ +/* http://keith-wood.name/countdown.html + * Ukrainian initialisation for the jQuery countdown extension + * Written by Goloborodko M misha.gm@gmail.com (2009) */ +(function($) { + $.countdown.regional['uk'] = { + labels: ['Років', 'Місяців', 'Тижднів', 'Днів', 'Годин', 'Хвилин', 'Секунд'], + labels1: ['Рік', 'Місяць', 'Тиждень', 'День', 'Година', 'Хвилина', 'Секунда'], + compactLabels: ['r', 'm', 't', 'd'], + whichLabels: null, + timeSeparator: ':', isRTL: false}; + $.countdown.setDefaults($.countdown.regional['uk']); +})(jQuery); diff --git a/apps/wolnelektury_core/static/js/jquery.countdown.js b/apps/wolnelektury_core/static/js/jquery.countdown.js new file mode 100644 index 000000000..f9c58d370 --- /dev/null +++ b/apps/wolnelektury_core/static/js/jquery.countdown.js @@ -0,0 +1,759 @@ +/* http://keith-wood.name/countdown.html + Countdown for jQuery v1.5.8. + Written by Keith Wood (kbwood{at}iinet.com.au) January 2008. + Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and + MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses. + Please attribute the author if you use it. */ + +/* Display a countdown timer. + Attach it with options like: + $('div selector').countdown( + {until: new Date(2009, 1 - 1, 1, 0, 0, 0), onExpiry: happyNewYear}); */ + +(function($) { // Hide scope, no $ conflict + +/* Countdown manager. */ +function Countdown() { + this.regional = []; // Available regional settings, indexed by language code + this.regional[''] = { // Default regional settings + // The display texts for the counters + labels: ['Years', 'Months', 'Weeks', 'Days', 'Hours', 'Minutes', 'Seconds'], + // The display texts for the counters if only one + labels1: ['Year', 'Month', 'Week', 'Day', 'Hour', 'Minute', 'Second'], + compactLabels: ['y', 'm', 'w', 'd'], // The compact texts for the counters + whichLabels: null, // Function to determine which labels to use + timeSeparator: ':', // Separator for time periods + isRTL: false // True for right-to-left languages, false for left-to-right + }; + this._defaults = { + until: null, // new Date(year, mth - 1, day, hr, min, sec) - date/time to count down to + // or numeric for seconds offset, or string for unit offset(s): + // 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds + since: null, // new Date(year, mth - 1, day, hr, min, sec) - date/time to count up from + // or numeric for seconds offset, or string for unit offset(s): + // 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds + timezone: null, // The timezone (hours or minutes from GMT) for the target times, + // or null for client local + serverSync: null, // A function to retrieve the current server time for synchronisation + format: 'dHMS', // Format for display - upper case for always, lower case only if non-zero, + // 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds + layout: '', // Build your own layout for the countdown + compact: false, // True to display in a compact format, false for an expanded one + significant: 0, // The number of periods with values to show, zero for all + description: '', // The description displayed for the countdown + expiryUrl: '', // A URL to load upon expiry, replacing the current page + expiryText: '', // Text to display upon expiry, replacing the countdown + alwaysExpire: false, // True to trigger onExpiry even if never counted down + onExpiry: null, // Callback when the countdown expires - + // receives no parameters and 'this' is the containing division + onTick: null, // Callback when the countdown is updated - + // receives int[7] being the breakdown by period (based on format) + // and 'this' is the containing division + tickInterval: 1 // Interval (seconds) between onTick callbacks + }; + $.extend(this._defaults, this.regional['']); + this._serverSyncs = []; +} + +var PROP_NAME = 'countdown'; + +var Y = 0; // Years +var O = 1; // Months +var W = 2; // Weeks +var D = 3; // Days +var H = 4; // Hours +var M = 5; // Minutes +var S = 6; // Seconds + +$.extend(Countdown.prototype, { + /* Class name added to elements to indicate already configured with countdown. */ + markerClassName: 'hasCountdown', + + /* Shared timer for all countdowns. */ + _timer: setInterval(function() { $.countdown._updateTargets(); }, 980), + /* List of currently active countdown targets. */ + _timerTargets: [], + + /* Override the default settings for all instances of the countdown widget. + @param options (object) the new settings to use as defaults */ + setDefaults: function(options) { + this._resetExtraLabels(this._defaults, options); + extendRemove(this._defaults, options || {}); + }, + + /* Convert a date/time to UTC. + @param tz (number) the hour or minute offset from GMT, e.g. +9, -360 + @param year (Date) the date/time in that timezone or + (number) the year in that timezone + @param month (number, optional) the month (0 - 11) (omit if year is a Date) + @param day (number, optional) the day (omit if year is a Date) + @param hours (number, optional) the hour (omit if year is a Date) + @param mins (number, optional) the minute (omit if year is a Date) + @param secs (number, optional) the second (omit if year is a Date) + @param ms (number, optional) the millisecond (omit if year is a Date) + @return (Date) the equivalent UTC date/time */ + UTCDate: function(tz, year, month, day, hours, mins, secs, ms) { + if (typeof year == 'object' && year.constructor == Date) { + ms = year.getMilliseconds(); + secs = year.getSeconds(); + mins = year.getMinutes(); + hours = year.getHours(); + day = year.getDate(); + month = year.getMonth(); + year = year.getFullYear(); + } + var d = new Date(); + d.setUTCFullYear(year); + d.setUTCDate(1); + d.setUTCMonth(month || 0); + d.setUTCDate(day || 1); + d.setUTCHours(hours || 0); + d.setUTCMinutes((mins || 0) - (Math.abs(tz) < 30 ? tz * 60 : tz)); + d.setUTCSeconds(secs || 0); + d.setUTCMilliseconds(ms || 0); + return d; + }, + + /* Convert a set of periods into seconds. + Averaged for months and years. + @param periods (number[7]) the periods per year/month/week/day/hour/minute/second + @return (number) the corresponding number of seconds */ + periodsToSeconds: function(periods) { + return periods[0] * 31557600 + periods[1] * 2629800 + periods[2] * 604800 + + periods[3] * 86400 + periods[4] * 3600 + periods[5] * 60 + periods[6]; + }, + + /* Retrieve one or more settings values. + @param name (string, optional) the name of the setting to retrieve + or 'all' for all instance settings or omit for all default settings + @return (any) the requested setting(s) */ + _settingsCountdown: function(target, name) { + if (!name) { + return $.countdown._defaults; + } + var inst = $.data(target, PROP_NAME); + return (name == 'all' ? inst.options : inst.options[name]); + }, + + /* Attach the countdown widget to a div. + @param target (element) the containing division + @param options (object) the initial settings for the countdown */ + _attachCountdown: function(target, options) { + var $target = $(target); + if ($target.hasClass(this.markerClassName)) { + return; + } + $target.addClass(this.markerClassName); + var inst = {options: $.extend({}, options), + _periods: [0, 0, 0, 0, 0, 0, 0]}; + $.data(target, PROP_NAME, inst); + this._changeCountdown(target); + }, + + /* Add a target to the list of active ones. + @param target (element) the countdown target */ + _addTarget: function(target) { + if (!this._hasTarget(target)) { + this._timerTargets.push(target); + } + }, + + /* See if a target is in the list of active ones. + @param target (element) the countdown target + @return (boolean) true if present, false if not */ + _hasTarget: function(target) { + return ($.inArray(target, this._timerTargets) > -1); + }, + + /* Remove a target from the list of active ones. + @param target (element) the countdown target */ + _removeTarget: function(target) { + this._timerTargets = $.map(this._timerTargets, + function(value) { return (value == target ? null : value); }); // delete entry + }, + + /* Update each active timer target. */ + _updateTargets: function() { + for (var i = this._timerTargets.length - 1; i >= 0; i--) { + this._updateCountdown(this._timerTargets[i]); + } + }, + + /* Redisplay the countdown with an updated display. + @param target (jQuery) the containing division + @param inst (object) the current settings for this instance */ + _updateCountdown: function(target, inst) { + var $target = $(target); + inst = inst || $.data(target, PROP_NAME); + if (!inst) { + return; + } + $target.html(this._generateHTML(inst)); + $target[(this._get(inst, 'isRTL') ? 'add' : 'remove') + 'Class']('countdown_rtl'); + var onTick = this._get(inst, 'onTick'); + if (onTick) { + var periods = inst._hold != 'lap' ? inst._periods : + this._calculatePeriods(inst, inst._show, this._get(inst, 'significant'), new Date()); + var tickInterval = this._get(inst, 'tickInterval'); + if (tickInterval == 1 || this.periodsToSeconds(periods) % tickInterval == 0) { + onTick.apply(target, [periods]); + } + } + var expired = inst._hold != 'pause' && + (inst._since ? inst._now.getTime() < inst._since.getTime() : + inst._now.getTime() >= inst._until.getTime()); + if (expired && !inst._expiring) { + inst._expiring = true; + if (this._hasTarget(target) || this._get(inst, 'alwaysExpire')) { + this._removeTarget(target); + var onExpiry = this._get(inst, 'onExpiry'); + if (onExpiry) { + onExpiry.apply(target, []); + } + var expiryText = this._get(inst, 'expiryText'); + if (expiryText) { + var layout = this._get(inst, 'layout'); + inst.options.layout = expiryText; + this._updateCountdown(target, inst); + inst.options.layout = layout; + } + var expiryUrl = this._get(inst, 'expiryUrl'); + if (expiryUrl) { + window.location = expiryUrl; + } + } + inst._expiring = false; + } + else if (inst._hold == 'pause') { + this._removeTarget(target); + } + $.data(target, PROP_NAME, inst); + }, + + /* Reconfigure the settings for a countdown div. + @param target (element) the containing division + @param options (object) the new settings for the countdown or + (string) an individual property name + @param value (any) the individual property value + (omit if options is an object) */ + _changeCountdown: function(target, options, value) { + options = options || {}; + if (typeof options == 'string') { + var name = options; + options = {}; + options[name] = value; + } + var inst = $.data(target, PROP_NAME); + if (inst) { + this._resetExtraLabels(inst.options, options); + extendRemove(inst.options, options); + this._adjustSettings(target, inst); + $.data(target, PROP_NAME, inst); + var now = new Date(); + if ((inst._since && inst._since < now) || + (inst._until && inst._until > now)) { + this._addTarget(target); + } + this._updateCountdown(target, inst); + } + }, + + /* Reset any extra labelsn and compactLabelsn entries if changing labels. + @param base (object) the options to be updated + @param options (object) the new option values */ + _resetExtraLabels: function(base, options) { + var changingLabels = false; + for (var n in options) { + if (n != 'whichLabels' && n.match(/[Ll]abels/)) { + changingLabels = true; + break; + } + } + if (changingLabels) { + for (var n in base) { // Remove custom numbered labels + if (n.match(/[Ll]abels[0-9]/)) { + base[n] = null; + } + } + } + }, + + /* Calculate interal settings for an instance. + @param target (element) the containing division + @param inst (object) the current settings for this instance */ + _adjustSettings: function(target, inst) { + var now; + var serverSync = this._get(inst, 'serverSync'); + var serverOffset = 0; + var serverEntry = null; + for (var i = 0; i < this._serverSyncs.length; i++) { + if (this._serverSyncs[i][0] == serverSync) { + serverEntry = this._serverSyncs[i][1]; + break; + } + } + if (serverEntry != null) { + serverOffset = (serverSync ? serverEntry : 0); + now = new Date(); + } + else { + var serverResult = (serverSync ? serverSync.apply(target, []) : null); + now = new Date(); + serverOffset = (serverResult ? now.getTime() - serverResult.getTime() : 0); + this._serverSyncs.push([serverSync, serverOffset]); + } + var timezone = this._get(inst, 'timezone'); + timezone = (timezone == null ? -now.getTimezoneOffset() : timezone); + inst._since = this._get(inst, 'since'); + if (inst._since != null) { + inst._since = this.UTCDate(timezone, this._determineTime(inst._since, null)); + if (inst._since && serverOffset) { + inst._since.setMilliseconds(inst._since.getMilliseconds() + serverOffset); + } + } + inst._until = this.UTCDate(timezone, this._determineTime(this._get(inst, 'until'), now)); + if (serverOffset) { + inst._until.setMilliseconds(inst._until.getMilliseconds() + serverOffset); + } + inst._show = this._determineShow(inst); + }, + + /* Remove the countdown widget from a div. + @param target (element) the containing division */ + _destroyCountdown: function(target) { + var $target = $(target); + if (!$target.hasClass(this.markerClassName)) { + return; + } + this._removeTarget(target); + $target.removeClass(this.markerClassName).empty(); + $.removeData(target, PROP_NAME); + }, + + /* Pause a countdown widget at the current time. + Stop it running but remember and display the current time. + @param target (element) the containing division */ + _pauseCountdown: function(target) { + this._hold(target, 'pause'); + }, + + /* Pause a countdown widget at the current time. + Stop the display but keep the countdown running. + @param target (element) the containing division */ + _lapCountdown: function(target) { + this._hold(target, 'lap'); + }, + + /* Resume a paused countdown widget. + @param target (element) the containing division */ + _resumeCountdown: function(target) { + this._hold(target, null); + }, + + /* Pause or resume a countdown widget. + @param target (element) the containing division + @param hold (string) the new hold setting */ + _hold: function(target, hold) { + var inst = $.data(target, PROP_NAME); + if (inst) { + if (inst._hold == 'pause' && !hold) { + inst._periods = inst._savePeriods; + var sign = (inst._since ? '-' : '+'); + inst[inst._since ? '_since' : '_until'] = + this._determineTime(sign + inst._periods[0] + 'y' + + sign + inst._periods[1] + 'o' + sign + inst._periods[2] + 'w' + + sign + inst._periods[3] + 'd' + sign + inst._periods[4] + 'h' + + sign + inst._periods[5] + 'm' + sign + inst._periods[6] + 's'); + this._addTarget(target); + } + inst._hold = hold; + inst._savePeriods = (hold == 'pause' ? inst._periods : null); + $.data(target, PROP_NAME, inst); + this._updateCountdown(target, inst); + } + }, + + /* Return the current time periods. + @param target (element) the containing division + @return (number[7]) the current periods for the countdown */ + _getTimesCountdown: function(target) { + var inst = $.data(target, PROP_NAME); + return (!inst ? null : (!inst._hold ? inst._periods : + this._calculatePeriods(inst, inst._show, this._get(inst, 'significant'), new Date()))); + }, + + /* Get a setting value, defaulting if necessary. + @param inst (object) the current settings for this instance + @param name (string) the name of the required setting + @return (any) the setting's value or a default if not overridden */ + _get: function(inst, name) { + return (inst.options[name] != null ? + inst.options[name] : $.countdown._defaults[name]); + }, + + /* A time may be specified as an exact value or a relative one. + @param setting (string or number or Date) - the date/time value + as a relative or absolute value + @param defaultTime (Date) the date/time to use if no other is supplied + @return (Date) the corresponding date/time */ + _determineTime: function(setting, defaultTime) { + var offsetNumeric = function(offset) { // e.g. +300, -2 + var time = new Date(); + time.setTime(time.getTime() + offset * 1000); + return time; + }; + var offsetString = function(offset) { // e.g. '+2d', '-4w', '+3h +30m' + offset = offset.toLowerCase(); + var time = new Date(); + var year = time.getFullYear(); + var month = time.getMonth(); + var day = time.getDate(); + var hour = time.getHours(); + var minute = time.getMinutes(); + var second = time.getSeconds(); + var pattern = /([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g; + var matches = pattern.exec(offset); + while (matches) { + switch (matches[2] || 's') { + case 's': second += parseInt(matches[1], 10); break; + case 'm': minute += parseInt(matches[1], 10); break; + case 'h': hour += parseInt(matches[1], 10); break; + case 'd': day += parseInt(matches[1], 10); break; + case 'w': day += parseInt(matches[1], 10) * 7; break; + case 'o': + month += parseInt(matches[1], 10); + day = Math.min(day, $.countdown._getDaysInMonth(year, month)); + break; + case 'y': + year += parseInt(matches[1], 10); + day = Math.min(day, $.countdown._getDaysInMonth(year, month)); + break; + } + matches = pattern.exec(offset); + } + return new Date(year, month, day, hour, minute, second, 0); + }; + var time = (setting == null ? defaultTime : + (typeof setting == 'string' ? offsetString(setting) : + (typeof setting == 'number' ? offsetNumeric(setting) : setting))); + if (time) time.setMilliseconds(0); + return time; + }, + + /* Determine the number of days in a month. + @param year (number) the year + @param month (number) the month + @return (number) the days in that month */ + _getDaysInMonth: function(year, month) { + return 32 - new Date(year, month, 32).getDate(); + }, + + /* Determine which set of labels should be used for an amount. + @param num (number) the amount to be displayed + @return (number) the set of labels to be used for this amount */ + _normalLabels: function(num) { + return num; + }, + + /* Generate the HTML to display the countdown widget. + @param inst (object) the current settings for this instance + @return (string) the new HTML for the countdown display */ + _generateHTML: function(inst) { + // Determine what to show + var significant = this._get(inst, 'significant'); + inst._periods = (inst._hold ? inst._periods : + this._calculatePeriods(inst, inst._show, significant, new Date())); + // Show all 'asNeeded' after first non-zero value + var shownNonZero = false; + var showCount = 0; + var sigCount = significant; + var show = $.extend({}, inst._show); + for (var period = Y; period <= S; period++) { + shownNonZero |= (inst._show[period] == '?' && inst._periods[period] > 0); + show[period] = (inst._show[period] == '?' && !shownNonZero ? null : inst._show[period]); + showCount += (show[period] ? 1 : 0); + sigCount -= (inst._periods[period] > 0 ? 1 : 0); + } + var showSignificant = [false, false, false, false, false, false, false]; + for (var period = S; period >= Y; period--) { // Determine significant periods + if (inst._show[period]) { + if (inst._periods[period]) { + showSignificant[period] = true; + } + else { + showSignificant[period] = sigCount > 0; + sigCount--; + } + } + } + var compact = this._get(inst, 'compact'); + var layout = this._get(inst, 'layout'); + var labels = (compact ? this._get(inst, 'compactLabels') : this._get(inst, 'labels')); + var whichLabels = this._get(inst, 'whichLabels') || this._normalLabels; + var timeSeparator = this._get(inst, 'timeSeparator'); + var description = this._get(inst, 'description') || ''; + var showCompact = function(period) { + var labelsNum = $.countdown._get(inst, + 'compactLabels' + whichLabels(inst._periods[period])); + return (show[period] ? inst._periods[period] + + (labelsNum ? labelsNum[period] : labels[period]) + ' ' : ''); + }; + var showFull = function(period) { + var labelsNum = $.countdown._get(inst, 'labels' + whichLabels(inst._periods[period])); + return ((!significant && show[period]) || (significant && showSignificant[period]) ? + '' + + inst._periods[period] + '
        ' + + (labelsNum ? labelsNum[period] : labels[period]) + '
        ' : ''); + }; + return (layout ? this._buildLayout(inst, show, layout, compact, significant, showSignificant) : + ((compact ? // Compact version + '' + + showCompact(Y) + showCompact(O) + showCompact(W) + showCompact(D) + + (show[H] ? this._minDigits(inst._periods[H], 2) : '') + + (show[M] ? (show[H] ? timeSeparator : '') + + this._minDigits(inst._periods[M], 2) : '') + + (show[S] ? (show[H] || show[M] ? timeSeparator : '') + + this._minDigits(inst._periods[S], 2) : '') : + // Full version + '' + + showFull(Y) + showFull(O) + showFull(W) + showFull(D) + + showFull(H) + showFull(M) + showFull(S)) + '' + + (description ? '' + description + '' : ''))); + }, + + /* Construct a custom layout. + @param inst (object) the current settings for this instance + @param show (string[7]) flags indicating which periods are requested + @param layout (string) the customised layout + @param compact (boolean) true if using compact labels + @param significant (number) the number of periods with values to show, zero for all + @param showSignificant (boolean[7]) other periods to show for significance + @return (string) the custom HTML */ + _buildLayout: function(inst, show, layout, compact, significant, showSignificant) { + var labels = this._get(inst, (compact ? 'compactLabels' : 'labels')); + var whichLabels = this._get(inst, 'whichLabels') || this._normalLabels; + var labelFor = function(index) { + return ($.countdown._get(inst, + (compact ? 'compactLabels' : 'labels') + whichLabels(inst._periods[index])) || + labels)[index]; + }; + var digit = function(value, position) { + return Math.floor(value / position) % 10; + }; + var subs = {desc: this._get(inst, 'description'), sep: this._get(inst, 'timeSeparator'), + yl: labelFor(Y), yn: inst._periods[Y], ynn: this._minDigits(inst._periods[Y], 2), + ynnn: this._minDigits(inst._periods[Y], 3), y1: digit(inst._periods[Y], 1), + y10: digit(inst._periods[Y], 10), y100: digit(inst._periods[Y], 100), + y1000: digit(inst._periods[Y], 1000), + ol: labelFor(O), on: inst._periods[O], onn: this._minDigits(inst._periods[O], 2), + onnn: this._minDigits(inst._periods[O], 3), o1: digit(inst._periods[O], 1), + o10: digit(inst._periods[O], 10), o100: digit(inst._periods[O], 100), + o1000: digit(inst._periods[O], 1000), + wl: labelFor(W), wn: inst._periods[W], wnn: this._minDigits(inst._periods[W], 2), + wnnn: this._minDigits(inst._periods[W], 3), w1: digit(inst._periods[W], 1), + w10: digit(inst._periods[W], 10), w100: digit(inst._periods[W], 100), + w1000: digit(inst._periods[W], 1000), + dl: labelFor(D), dn: inst._periods[D], dnn: this._minDigits(inst._periods[D], 2), + dnnn: this._minDigits(inst._periods[D], 3), d1: digit(inst._periods[D], 1), + d10: digit(inst._periods[D], 10), d100: digit(inst._periods[D], 100), + d1000: digit(inst._periods[D], 1000), + hl: labelFor(H), hn: inst._periods[H], hnn: this._minDigits(inst._periods[H], 2), + hnnn: this._minDigits(inst._periods[H], 3), h1: digit(inst._periods[H], 1), + h10: digit(inst._periods[H], 10), h100: digit(inst._periods[H], 100), + h1000: digit(inst._periods[H], 1000), + ml: labelFor(M), mn: inst._periods[M], mnn: this._minDigits(inst._periods[M], 2), + mnnn: this._minDigits(inst._periods[M], 3), m1: digit(inst._periods[M], 1), + m10: digit(inst._periods[M], 10), m100: digit(inst._periods[M], 100), + m1000: digit(inst._periods[M], 1000), + sl: labelFor(S), sn: inst._periods[S], snn: this._minDigits(inst._periods[S], 2), + snnn: this._minDigits(inst._periods[S], 3), s1: digit(inst._periods[S], 1), + s10: digit(inst._periods[S], 10), s100: digit(inst._periods[S], 100), + s1000: digit(inst._periods[S], 1000)}; + var html = layout; + // Replace period containers: {p<}...{p>} + for (var i = Y; i <= S; i++) { + var period = 'yowdhms'.charAt(i); + var re = new RegExp('\\{' + period + '<\\}(.*)\\{' + period + '>\\}', 'g'); + html = html.replace(re, ((!significant && show[i]) || + (significant && showSignificant[i]) ? '$1' : '')); + } + // Replace period values: {pn} + $.each(subs, function(n, v) { + var re = new RegExp('\\{' + n + '\\}', 'g'); + html = html.replace(re, v); + }); + return html; + }, + + /* Ensure a numeric value has at least n digits for display. + @param value (number) the value to display + @param len (number) the minimum length + @return (string) the display text */ + _minDigits: function(value, len) { + value = '' + value; + if (value.length >= len) { + return value; + } + value = '0000000000' + value; + return value.substr(value.length - len); + }, + + /* Translate the format into flags for each period. + @param inst (object) the current settings for this instance + @return (string[7]) flags indicating which periods are requested (?) or + required (!) by year, month, week, day, hour, minute, second */ + _determineShow: function(inst) { + var format = this._get(inst, 'format'); + var show = []; + show[Y] = (format.match('y') ? '?' : (format.match('Y') ? '!' : null)); + show[O] = (format.match('o') ? '?' : (format.match('O') ? '!' : null)); + show[W] = (format.match('w') ? '?' : (format.match('W') ? '!' : null)); + show[D] = (format.match('d') ? '?' : (format.match('D') ? '!' : null)); + show[H] = (format.match('h') ? '?' : (format.match('H') ? '!' : null)); + show[M] = (format.match('m') ? '?' : (format.match('M') ? '!' : null)); + show[S] = (format.match('s') ? '?' : (format.match('S') ? '!' : null)); + return show; + }, + + /* Calculate the requested periods between now and the target time. + @param inst (object) the current settings for this instance + @param show (string[7]) flags indicating which periods are requested/required + @param significant (number) the number of periods with values to show, zero for all + @param now (Date) the current date and time + @return (number[7]) the current time periods (always positive) + by year, month, week, day, hour, minute, second */ + _calculatePeriods: function(inst, show, significant, now) { + // Find endpoints + inst._now = now; + inst._now.setMilliseconds(0); + var until = new Date(inst._now.getTime()); + if (inst._since) { + if (now.getTime() < inst._since.getTime()) { + inst._now = now = until; + } + else { + now = inst._since; + } + } + else { + until.setTime(inst._until.getTime()); + if (now.getTime() > inst._until.getTime()) { + inst._now = now = until; + } + } + // Calculate differences by period + var periods = [0, 0, 0, 0, 0, 0, 0]; + if (show[Y] || show[O]) { + // Treat end of months as the same + var lastNow = $.countdown._getDaysInMonth(now.getFullYear(), now.getMonth()); + var lastUntil = $.countdown._getDaysInMonth(until.getFullYear(), until.getMonth()); + var sameDay = (until.getDate() == now.getDate() || + (until.getDate() >= Math.min(lastNow, lastUntil) && + now.getDate() >= Math.min(lastNow, lastUntil))); + var getSecs = function(date) { + return (date.getHours() * 60 + date.getMinutes()) * 60 + date.getSeconds(); + }; + var months = Math.max(0, + (until.getFullYear() - now.getFullYear()) * 12 + until.getMonth() - now.getMonth() + + ((until.getDate() < now.getDate() && !sameDay) || + (sameDay && getSecs(until) < getSecs(now)) ? -1 : 0)); + periods[Y] = (show[Y] ? Math.floor(months / 12) : 0); + periods[O] = (show[O] ? months - periods[Y] * 12 : 0); + // Adjust for months difference and end of month if necessary + now = new Date(now.getTime()); + var wasLastDay = (now.getDate() == lastNow); + var lastDay = $.countdown._getDaysInMonth(now.getFullYear() + periods[Y], + now.getMonth() + periods[O]); + if (now.getDate() > lastDay) { + now.setDate(lastDay); + } + now.setFullYear(now.getFullYear() + periods[Y]); + now.setMonth(now.getMonth() + periods[O]); + if (wasLastDay) { + now.setDate(lastDay); + } + } + var diff = Math.floor((until.getTime() - now.getTime()) / 1000); + var extractPeriod = function(period, numSecs) { + periods[period] = (show[period] ? Math.floor(diff / numSecs) : 0); + diff -= periods[period] * numSecs; + }; + extractPeriod(W, 604800); + extractPeriod(D, 86400); + extractPeriod(H, 3600); + extractPeriod(M, 60); + extractPeriod(S, 1); + if (diff > 0 && !inst._since) { // Round up if left overs + var multiplier = [1, 12, 4.3482, 7, 24, 60, 60]; + var lastShown = S; + var max = 1; + for (var period = S; period >= Y; period--) { + if (show[period]) { + if (periods[lastShown] >= max) { + periods[lastShown] = 0; + diff = 1; + } + if (diff > 0) { + periods[period]++; + diff = 0; + lastShown = period; + max = 1; + } + } + max *= multiplier[period]; + } + } + if (significant) { // Zero out insignificant periods + for (var period = Y; period <= S; period++) { + if (significant && periods[period]) { + significant--; + } + else if (!significant) { + periods[period] = 0; + } + } + } + return periods; + } +}); + +/* jQuery extend now ignores nulls! + @param target (object) the object to update + @param props (object) the new settings + @return (object) the updated object */ +function extendRemove(target, props) { + $.extend(target, props); + for (var name in props) { + if (props[name] == null) { + target[name] = null; + } + } + return target; +} + +/* Process the countdown functionality for a jQuery selection. + @param command (string) the command to run (optional, default 'attach') + @param options (object) the new settings to use for these countdown instances + @return (jQuery) for chaining further calls */ +$.fn.countdown = function(options) { + var otherArgs = Array.prototype.slice.call(arguments, 1); + if (options == 'getTimes' || options == 'settings') { + return $.countdown['_' + options + 'Countdown']. + apply($.countdown, [this[0]].concat(otherArgs)); + } + return this.each(function() { + if (typeof options == 'string') { + $.countdown['_' + options + 'Countdown'].apply($.countdown, [this].concat(otherArgs)); + } + else { + $.countdown._attachCountdown(this, options); + } + }); +}; + +/* Initialise the countdown functionality. */ +$.countdown = new Countdown(); // singleton instance + +})(jQuery); diff --git a/apps/wolnelektury_core/static/js/jquery.cycle.min.js b/apps/wolnelektury_core/static/js/jquery.cycle.min.js new file mode 100644 index 000000000..9311b63fe --- /dev/null +++ b/apps/wolnelektury_core/static/js/jquery.cycle.min.js @@ -0,0 +1,11 @@ +/*! + * jQuery Cycle Lite Plugin + * http://malsup.com/jquery/cycle/lite/ + * Copyright (c) 2008 M. Alsup + * Version: 1.0 (06/08/2008) + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * Requires: jQuery v1.2.3 or later + */ +(function(D){var A="Lite-1.0";D.fn.cycle=function(E){return this.each(function(){E=E||{};if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=0;this.cyclePause=0;var I=D(this);var J=E.slideExpr?D(E.slideExpr,this):I.children();var G=J.get();if(G.length<2){if(window.console&&window.console.log){window.console.log("terminating; too few slides: "+G.length)}return }var H=D.extend({},D.fn.cycle.defaults,E||{},D.metadata?I.metadata():D.meta?I.data():{});H.before=H.before?[H.before]:[];H.after=H.after?[H.after]:[];H.after.unshift(function(){H.busy=0});var F=this.className;H.width=parseInt((F.match(/w:(\d+)/)||[])[1])||H.width;H.height=parseInt((F.match(/h:(\d+)/)||[])[1])||H.height;H.timeout=parseInt((F.match(/t:(\d+)/)||[])[1])||H.timeout;if(I.css("position")=="static"){I.css("position","relative")}if(H.width){I.width(H.width)}if(H.height&&H.height!="auto"){I.height(H.height)}var K=0;J.css({position:"absolute",top:0,left:0}).hide().each(function(M){D(this).css("z-index",G.length-M)});D(G[K]).css("opacity",1).show();if(D.browser.msie){G[K].style.removeAttribute("filter")}if(H.fit&&H.width){J.width(H.width)}if(H.fit&&H.height&&H.height!="auto"){J.height(H.height)}if(H.pause){I.hover(function(){this.cyclePause=1},function(){this.cyclePause=0})}D.fn.cycle.transitions.fade(I,J,H);J.each(function(){var M=D(this);this.cycleH=(H.fit&&H.height)?H.height:M.height();this.cycleW=(H.fit&&H.width)?H.width:M.width()});J.not(":eq("+K+")").css({opacity:0});if(H.cssFirst){D(J[K]).css(H.cssFirst)}if(H.timeout){if(H.speed.constructor==String){H.speed={slow:600,fast:200}[H.speed]||400}if(!H.sync){H.speed=H.speed/2}while((H.timeout-H.speed)<250){H.timeout+=H.speed}}H.speedIn=H.speed;H.speedOut=H.speed;H.slideCount=G.length;H.currSlide=K;H.nextSlide=1;var L=J[K];if(H.before.length){H.before[0].apply(L,[L,L,H,true])}if(H.after.length>1){H.after[1].apply(L,[L,L,H,true])}if(H.click&&!H.next){H.next=H.click}if(H.next){D(H.next).bind("click",function(){return C(G,H,H.rev?-1:1)})}if(H.prev){D(H.prev).bind("click",function(){return C(G,H,H.rev?1:-1)})}if(H.timeout){this.cycleTimeout=setTimeout(function(){B(G,H,0,!H.rev)},H.timeout+(H.delay||0))}})};function B(J,E,I,K){if(E.busy){return }var H=J[0].parentNode,M=J[E.currSlide],L=J[E.nextSlide];if(H.cycleTimeout===0&&!I){return }if(I||!H.cyclePause){if(E.before.length){D.each(E.before,function(N,O){O.apply(L,[M,L,E,K])})}var F=function(){if(D.browser.msie){this.style.removeAttribute("filter")}D.each(E.after,function(N,O){O.apply(L,[M,L,E,K])})};if(E.nextSlide!=E.currSlide){E.busy=1;D.fn.cycle.custom(M,L,E,F)}var G=(E.nextSlide+1)==J.length;E.nextSlide=G?0:E.nextSlide+1;E.currSlide=G?J.length-1:E.nextSlide-1}if(E.timeout){H.cycleTimeout=setTimeout(function(){B(J,E,0,!E.rev)},E.timeout)}}function C(E,F,I){var H=E[0].parentNode,G=H.cycleTimeout;if(G){clearTimeout(G);H.cycleTimeout=0}F.nextSlide=F.currSlide+I;if(F.nextSlide<0){F.nextSlide=E.length-1}else{if(F.nextSlide>=E.length){F.nextSlide=0}}B(E,F,1,I>=0);return false}D.fn.cycle.custom=function(K,H,I,E){var J=D(K),G=D(H);G.css({opacity:0});var F=function(){G.animate({opacity:1},I.speedIn,I.easeIn,E)};J.animate({opacity:0},I.speedOut,I.easeOut,function(){J.css({display:"none"});if(!I.sync){F()}});if(I.sync){F()}};D.fn.cycle.transitions={fade:function(F,G,E){G.not(":eq(0)").css("opacity",0);E.before.push(function(){D(this).show()})}};D.fn.cycle.ver=function(){return A};D.fn.cycle.defaults={timeout:4000,speed:1000,next:null,prev:null,before:null,after:null,height:"auto",sync:1,fit:0,pause:0,delay:0,slideExpr:null}})(jQuery); \ No newline at end of file diff --git a/apps/wolnelektury_core/static/js/jquery.eventdelegation.js b/apps/wolnelektury_core/static/js/jquery.eventdelegation.js new file mode 100644 index 000000000..52fce074a --- /dev/null +++ b/apps/wolnelektury_core/static/js/jquery.eventdelegation.js @@ -0,0 +1,55 @@ +/* + * jQuery Event Delegation Plugin - jquery.eventdelegation.js + * Fast flexible event handling + * + * January 2008 - Randy Morey (http://dev.distilldesign.com/) + */ + +(function ($) { + /* setup list of allowed events for event delegation + * only events that bubble are appropriate + */ + var allowed = {}; + $.each([ + 'click', + 'dblclick', + 'mousedown', + 'mouseup', + 'mousemove', + 'mouseover', + 'mouseout', + 'keydown', + 'keypress', + 'keyup' + ], function(i, eventName) { + allowed[eventName] = true; + }); + + $.fn.extend({ + delegate: function (event, selector, f) { + return $(this).each(function () { + if (allowed[event]) + $(this).bind(event, function (e) { + var el = $(e.target), + result = false; + + while (!$(el).is('body')) { + if ($(el).is(selector)) { + result = f.apply($(el)[0], [e]); + if (result === false) + e.preventDefault(); + return; + } + + el = $(el).parent(); + } + }); + }); + }, + undelegate: function (event) { + return $(this).each(function () { + $(this).unbind(event); + }); + } + }); +})(jQuery); \ No newline at end of file diff --git a/apps/wolnelektury_core/static/js/jquery.form.js b/apps/wolnelektury_core/static/js/jquery.form.js new file mode 100644 index 000000000..36af6b199 --- /dev/null +++ b/apps/wolnelektury_core/static/js/jquery.form.js @@ -0,0 +1,601 @@ +/* + * jQuery Form Plugin + * version: 2.12 (06/07/2008) + * @requires jQuery v1.2.2 or later + * + * Examples and documentation at: http://malsup.com/jquery/form/ + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * Revision: $Id$ + */ +(function($) { + +/* + Usage Note: + ----------- + Do not use both ajaxSubmit and ajaxForm on the same form. These + functions are intended to be exclusive. Use ajaxSubmit if you want + to bind your own submit handler to the form. For example, + + $(document).ready(function() { + $('#myForm').bind('submit', function() { + $(this).ajaxSubmit({ + target: '#output' + }); + return false; // <-- important! + }); + }); + + Use ajaxForm when you want the plugin to manage all the event binding + for you. For example, + + $(document).ready(function() { + $('#myForm').ajaxForm({ + target: '#output' + }); + }); + + When using ajaxForm, the ajaxSubmit function will be invoked for you + at the appropriate time. +*/ + +/** + * ajaxSubmit() provides a mechanism for immediately submitting + * an HTML form using AJAX. + */ +$.fn.ajaxSubmit = function(options) { + // fast fail if nothing selected (http://dev.jquery.com/ticket/2752) + if (!this.length) { + log('ajaxSubmit: skipping submit process - no element selected'); + return this; + } + + if (typeof options == 'function') + options = { success: options }; + + options = $.extend({ + url: this.attr('action') || window.location.toString(), + type: this.attr('method') || 'GET' + }, options || {}); + + // hook for manipulating the form data before it is extracted; + // convenient for use with rich editors like tinyMCE or FCKEditor + var veto = {}; + this.trigger('form-pre-serialize', [this, options, veto]); + if (veto.veto) { + log('ajaxSubmit: submit vetoed via form-pre-serialize trigger'); + return this; + } + + var a = this.formToArray(options.semantic); + if (options.data) { + options.extraData = options.data; + for (var n in options.data) + a.push( { name: n, value: options.data[n] } ); + } + + // give pre-submit callback an opportunity to abort the submit + if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) { + log('ajaxSubmit: submit aborted via beforeSubmit callback'); + return this; + } + + // fire vetoable 'validate' event + this.trigger('form-submit-validate', [a, this, options, veto]); + if (veto.veto) { + log('ajaxSubmit: submit vetoed via form-submit-validate trigger'); + return this; + } + + var q = $.param(a); + + if (options.type.toUpperCase() == 'GET') { + options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q; + options.data = null; // data is null for 'get' + } + else + options.data = q; // data is the query string for 'post' + + var $form = this, callbacks = []; + if (options.resetForm) callbacks.push(function() { $form.resetForm(); }); + if (options.clearForm) callbacks.push(function() { $form.clearForm(); }); + + // perform a load on the target only if dataType is not provided + if (!options.dataType && options.target) { + var oldSuccess = options.success || function(){}; + callbacks.push(function(data) { + $(options.target).html(data).each(oldSuccess, arguments); + }); + } + else if (options.success) + callbacks.push(options.success); + + options.success = function(data, status) { + for (var i=0, max=callbacks.length; i < max; i++) + callbacks[i](data, status, $form); + }; + + // are there files to upload? + var files = $('input:file', this).fieldValue(); + var found = false; + for (var j=0; j < files.length; j++) + if (files[j]) + found = true; + + // options.iframe allows user to force iframe mode + if (options.iframe || found) { + // hack to fix Safari hang (thanks to Tim Molendijk for this) + // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d + if ($.browser.safari && options.closeKeepAlive) + $.get(options.closeKeepAlive, fileUpload); + else + fileUpload(); + } + else + $.ajax(options); + + // fire 'notify' event + this.trigger('form-submit-notify', [this, options]); + return this; + + + // private function for handling file uploads (hat tip to YAHOO!) + function fileUpload() { + var form = $form[0]; + + if ($(':input[@name=submit]', form).length) { + alert('Error: Form elements must not be named "submit".'); + return; + } + + var opts = $.extend({}, $.ajaxSettings, options); + + var id = 'jqFormIO' + (new Date().getTime()); + var $io = $('').css({opacity:0}), +e=function(h){if(ie6)if(h.o)h.o.html('

        ').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i); f(h);}, +f=function(h){try{$(':input:visible',h.w)[0].focus();}catch(_){}}, +L=function(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m);}, +m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return !r;}, +hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function() { + if(!this[c]){this[c]=[];$(this).click(function(){for(var i in {jqmShow:1,jqmHide:1})for(var s in this[i])if(H[this[i][s]])H[this[i][s]].w[i](this);return F;});}this[c].push(s);});});}; +})(jQuery); \ No newline at end of file diff --git a/apps/wolnelektury_core/static/js/jquery.js b/apps/wolnelektury_core/static/js/jquery.js new file mode 100644 index 000000000..7c2430802 --- /dev/null +++ b/apps/wolnelektury_core/static/js/jquery.js @@ -0,0 +1,154 @@ +/*! + * jQuery JavaScript Library v1.4.2 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Sat Feb 13 22:33:48 2010 -0500 + */ +(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, +Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& +(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, +a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== +"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, +function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
        a"; +var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, +parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= +false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= +s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, +applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; +else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, +a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== +w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, +cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= +c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); +a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, +function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); +k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), +C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type= +e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& +f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; +if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", +e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, +"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, +d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, +e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); +t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| +g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, +CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, +g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, +text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, +setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= +h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== +"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, +h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& +q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=""; +if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="

        ";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); +(function(){var g=s.createElement("div");g.innerHTML="
        ";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: +function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= +{},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== +"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", +d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? +a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== +1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"},F={option:[1,""],legend:[1,"
        ","
        "],thead:[1,"","
        "],tr:[2,"","
        "],td:[3,"","
        "],col:[2,"","
        "],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
        ","
        "];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= +c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, +wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, +prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, +this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); +return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, +""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); +return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", +""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= +c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? +c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= +function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= +Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, +"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= +a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= +a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=//gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== +"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("
        ").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, +serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), +function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, +global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& +e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? +"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== +false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= +false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", +c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| +d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); +g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== +1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== +"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; +if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== +"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| +c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; +this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= +this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, +e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b
        "; +a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); +c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, +d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- +f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": +"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in +e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); diff --git a/apps/wolnelektury_core/static/js/jquery.scrollto.js b/apps/wolnelektury_core/static/js/jquery.scrollto.js new file mode 100644 index 000000000..c403ab9df --- /dev/null +++ b/apps/wolnelektury_core/static/js/jquery.scrollto.js @@ -0,0 +1,194 @@ +/** + * jQuery.ScrollTo + * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com + * Dual licensed under MIT and GPL. + * Date: 9/11/2008 + * + * @projectDescription Easy element scrolling using jQuery. + * http://flesler.blogspot.com/2007/10/jqueryscrollto.html + * Tested with jQuery 1.2.6. On FF 2/3, IE 6/7, Opera 9.2/5 and Safari 3. on Windows. + * + * @author Ariel Flesler + * @version 1.4 + * + * @id jQuery.scrollTo + * @id jQuery.fn.scrollTo + * @param {String, Number, DOMElement, jQuery, Object} target Where to scroll the matched elements. + * The different options for target are: + * - A number position (will be applied to all axes). + * - A string position ('44', '100px', '+=90', etc ) will be applied to all axes + * - A jQuery/DOM element ( logically, child of the element to scroll ) + * - A string selector, that will be relative to the element to scroll ( 'li:eq(2)', etc ) + * - A hash { top:x, left:y }, x and y can be any kind of number/string like above. + * @param {Number} duration The OVERALL length of the animation, this argument can be the settings object instead. + * @param {Object,Function} settings Optional set of settings or the onAfter callback. + * @option {String} axis Which axis must be scrolled, use 'x', 'y', 'xy' or 'yx'. + * @option {Number} duration The OVERALL length of the animation. + * @option {String} easing The easing method for the animation. + * @option {Boolean} margin If true, the margin of the target element will be deducted from the final position. + * @option {Object, Number} offset Add/deduct from the end position. One number for both axes or { top:x, left:y }. + * @option {Object, Number} over Add/deduct the height/width multiplied by 'over', can be { top:x, left:y } when using both axes. + * @option {Boolean} queue If true, and both axis are given, the 2nd axis will only be animated after the first one ends. + * @option {Function} onAfter Function to be called after the scrolling ends. + * @option {Function} onAfterFirst If queuing is activated, this function will be called after the first scrolling ends. + * @return {jQuery} Returns the same jQuery object, for chaining. + * + * @desc Scroll to a fixed position + * @example $('div').scrollTo( 340 ); + * + * @desc Scroll relatively to the actual position + * @example $('div').scrollTo( '+=340px', { axis:'y' } ); + * + * @dec Scroll using a selector (relative to the scrolled element) + * @example $('div').scrollTo( 'p.paragraph:eq(2)', 500, { easing:'swing', queue:true, axis:'xy' } ); + * + * @ Scroll to a DOM element (same for jQuery object) + * @example var second_child = document.getElementById('container').firstChild.nextSibling; + * $('#container').scrollTo( second_child, { duration:500, axis:'x', onAfter:function(){ + * alert('scrolled!!'); + * }}); + * + * @desc Scroll on both axes, to different values + * @example $('div').scrollTo( { top: 300, left:'+=200' }, { axis:'xy', offset:-20 } ); + */ +;(function( $ ){ + + var $scrollTo = $.scrollTo = function( target, duration, settings ){ + $(window).scrollTo( target, duration, settings ); + }; + + $scrollTo.defaults = { + axis:'y', + duration:1 + }; + + // Returns the element that needs to be animated to scroll the window. + // Kept for backwards compatibility (specially for localScroll & serialScroll) + $scrollTo.window = function( scope ){ + return $(window).scrollable(); + }; + + // Hack, hack, hack... stay away! + // Returns the real elements to scroll (supports window/iframes, documents and regular nodes) + $.fn.scrollable = function(){ + return this.map(function(){ + // Just store it, we might need it + var win = this.parentWindow || this.defaultView, + // If it's a document, get its iframe or the window if it's THE document + elem = this.nodeName == '#document' ? win.frameElement || win : this, + // Get the corresponding document + doc = elem.contentDocument || (elem.contentWindow || elem).document, + isWin = elem.setInterval; + + return elem.nodeName == 'IFRAME' || isWin && $.browser.safari ? doc.body + : isWin ? doc.documentElement + : this; + }); + }; + + $.fn.scrollTo = function( target, duration, settings ){ + if( typeof duration == 'object' ){ + settings = duration; + duration = 0; + } + if( typeof settings == 'function' ) + settings = { onAfter:settings }; + + settings = $.extend( {}, $scrollTo.defaults, settings ); + // Speed is still recognized for backwards compatibility + duration = duration || settings.speed || settings.duration; + // Make sure the settings are given right + settings.queue = settings.queue && settings.axis.length > 1; + + if( settings.queue ) + // Let's keep the overall duration + duration /= 2; + settings.offset = both( settings.offset ); + settings.over = both( settings.over ); + + return this.scrollable().each(function(){ + var elem = this, + $elem = $(elem), + targ = target, toff, attr = {}, + win = $elem.is('html,body'); + + switch( typeof targ ){ + // A number will pass the regex + case 'number': + case 'string': + if( /^([+-]=)?\d+(px)?$/.test(targ) ){ + targ = both( targ ); + // We are done + break; + } + // Relative selector, no break! + targ = $(targ,this); + case 'object': + // DOMElement / jQuery + if( targ.is || targ.style ) + // Get the real position of the target + toff = (targ = $(targ)).offset(); + } + $.each( settings.axis.split(''), function( i, axis ){ + var Pos = axis == 'x' ? 'Left' : 'Top', + pos = Pos.toLowerCase(), + key = 'scroll' + Pos, + old = elem[key], + Dim = axis == 'x' ? 'Width' : 'Height', + dim = Dim.toLowerCase(); + + if( toff ){// jQuery / DOMElement + attr[key] = toff[pos] + ( win ? 0 : old - $elem.offset()[pos] ); + + // If it's a dom element, reduce the margin + if( settings.margin ){ + attr[key] -= parseInt(targ.css('margin'+Pos)) || 0; + attr[key] -= parseInt(targ.css('border'+Pos+'Width')) || 0; + } + + attr[key] += settings.offset[pos] || 0; + + if( settings.over[pos] ) + // Scroll to a fraction of its width/height + attr[key] += targ[dim]() * settings.over[pos]; + }else + attr[key] = targ[pos]; + + // Number or 'number' + if( /^\d+$/.test(attr[key]) ) + // Check the limits + attr[key] = attr[key] <= 0 ? 0 : Math.min( attr[key], max(Dim) ); + + // Queueing axes + if( !i && settings.queue ){ + // Don't waste time animating, if there's no need. + if( old != attr[key] ) + // Intermediate animation + animate( settings.onAfterFirst ); + // Don't animate this axis again in the next iteration. + delete attr[key]; + } + }); + animate( settings.onAfter ); + + function animate( callback ){ + $elem.animate( attr, duration, settings.easing, callback && function(){ + callback.call(this, target, settings); + }); + }; + function max( Dim ){ + var attr ='scroll'+Dim, + doc = elem.ownerDocument; + + return win + ? Math.max( doc.documentElement[attr], doc.body[attr] ) + : elem[attr]; + }; + }).end(); + }; + + function both( val ){ + return typeof val == 'object' ? val : { top:val, left:val }; + }; + +})( jQuery ); \ No newline at end of file diff --git a/apps/wolnelektury_core/static/js/locale.js b/apps/wolnelektury_core/static/js/locale.js new file mode 100755 index 000000000..e4c8f17aa --- /dev/null +++ b/apps/wolnelektury_core/static/js/locale.js @@ -0,0 +1,35 @@ +var LOCALE_TEXTS = { + "pl": { + "Loading": "Ładowanie" + }, + "de": { + "Loading": "Herunterladen" + }, + "fr": { + "Loading": "Chargement" + }, + "en": { + "Loading": "Loading" + }, + "ru": { + "Loading": "Загрузка" + }, + "es": { + "Loading": "Cargando" + }, + "lt":{ + "Loading": "Krovimas" + }, + "uk":{ + "Loading": "Завантажується" + }, + "jp":{ + "Loading": "負荷" + }, + "it":{ + "Loading": "caricamento" + }, +} +function gettext(text) { + return LOCALE_TEXTS[LANGUAGE_CODE][text]; +} diff --git a/apps/wolnelektury_core/static/js/modernizr.custom.19652.js b/apps/wolnelektury_core/static/js/modernizr.custom.19652.js new file mode 100644 index 000000000..8106cb788 --- /dev/null +++ b/apps/wolnelektury_core/static/js/modernizr.custom.19652.js @@ -0,0 +1,4 @@ +/* Modernizr 2.5.3 (Custom Build) | MIT & BSD + * Build: http://www.modernizr.com/download/#-input + */ +;window.Modernizr=function(a,b,c){function t(a){i.cssText=a}function u(a,b){return t(prefixes.join(a+";")+(b||""))}function v(a,b){return typeof a===b}function w(a,b){return!!~(""+a).indexOf(b)}function x(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:v(f,"function")?f.bind(d||b):f}return!1}function y(){e.input=function(c){for(var d=0,e=c.length;d
      ').insertAfter($(this)); + var choicesList = $('
        ').appendTo(container).css({ + width: 200, float: 'left', minHeight: 200, backgroundColor: '#eee', margin: 0, padding: 0 + }); + var valuesList = $('
          ').appendTo(container).css({ + width: 200, float: 'left', minHeight: 200, backgroundColor: '#eee', margin: 0, padding: 0 + }); + var choiceIds = []; + $.each(settings.choices, function() { + choiceIds.push('' + this.id); + }); + + function createItem(hash) { + return $('
        1. ' + hash.name + '
        2. ').css({ + backgroundColor: '#cff', + display: 'block', + border: '1px solid #cdd', + padding: 2, + margin: 0 + }).data('obj-id', hash.id); + } + + $.each(settings.choices, function() { + if ($.inArray('' + this.id, values) == -1) { + choicesList.append(createItem(this)); + } + }); + + $.each(values, function() { + var index = $.inArray('' + this, choiceIds); // Why this[0]? + if (index != -1) { + valuesList.append(createItem(settings.choices[index])); + } + }); + + choicesList.sortable({ + connectWith: '.connectedSortable' + }).disableSelection(); + + valuesList.sortable({ + connectWith: '.connectedSortable', + update: function() { + values = []; + $('li', valuesList).each(function(index) { + values.push($(this).data('obj-id')); + console.log($(this).data('obj-id')); + }); + console.log('update', values.join(','), input); + input.val(values.join(',')); + } + }).disableSelection(); + }; +})(jQuery); diff --git a/apps/wolnelektury_core/static/js/search.js b/apps/wolnelektury_core/static/js/search.js new file mode 100644 index 000000000..6afc4a399 --- /dev/null +++ b/apps/wolnelektury_core/static/js/search.js @@ -0,0 +1,45 @@ + +var __bind = function (self, fn) { + return function() { fn.apply(self, arguments); }; +}; + +(function($){ + $.widget("wl.search", { + options: { + minLength: 0, + }, + + _create: function() { + var opts = { + minLength: this.options.minLength, + select: __bind(this, this.enter), + focus: function() { return false; }, + source: this.element.data('source'), + }; + this.element.autocomplete(opts).data("autocomplete")._renderItem = __bind(this, this.render_item); + }, + + enter: function(event, ui) { + if (ui.item.url != undefined) { + location.href = ui.item.url; + } else { + this.element.closest('form').submit(); + } + }, + + render_item: function (ul, item) { + return $("
        3. ").data('item.autocomplete', item) + .append(''+item.label+''+ + ''+item.category+'') + .appendTo(ul); + }, + + destroy: function() { + + }, + + + }); + + +})(jQuery); diff --git a/apps/wolnelektury_core/static/js/widget.js b/apps/wolnelektury_core/static/js/widget.js new file mode 100644 index 000000000..de30eb714 --- /dev/null +++ b/apps/wolnelektury_core/static/js/widget.js @@ -0,0 +1,73 @@ +/* create basic elements */ +var id = "wl"; +var widget = document.getElementById(id); +var linkLogo = document.createElement('a'); +var logo = document.createElement('img'); +var form = document.createElement('form'); +var inputText = document.createElement('input'); +var inputSubmit = document.createElement('input'); +var body = document.getElementsByTagName('body') +var stylesheet = document.createElement('link'); + +var host = 'www.wolnelektury.pl'; + +/* set attributes of created elements */ +stylesheet.setAttribute('type', 'text/css'); +stylesheet.setAttribute('rel', 'stylesheet'); +stylesheet.setAttribute('href', 'http://'+host+'/static/css/widget.css'); +linkLogo.setAttribute('href', 'http://'+host); +logo.setAttribute('src', 'http://'+host+'/static/img/logo.png'); +form.setAttribute('action', 'http://'+host+'/szukaj/'); +form.setAttribute('method', 'get'); +form.setAttribute('accept-charset', 'utf-8'); +form.setAttribute('id', 'wl-form'); +inputText.setAttribute('type', 'text'); +inputText.setAttribute('title', 'tytul, autor, motyw/temat, epoka, rodzaj, gatunek'); +inputText.setAttribute('value', ''); +inputText.setAttribute('name', 'q'); +inputText.setAttribute('id', 'id_qq'); +inputText.setAttribute('size', '13'); +inputSubmit.setAttribute('type', 'image'); +inputSubmit.setAttribute('src', 'http://'+host+'/static/img/search.png'); +inputSubmit.setAttribute('style', 'position:relative; top:5px; margin-left:5px'); + +/* import jquery and autocomplete */ +var scriptJ = document.createElement('script'); +scriptJ.setAttribute('type', 'text/javascript'); +scriptJ.setAttribute('src', 'http://'+host+'/static/js/jquery.js'); + +var scriptAutoComplete = document.createElement('script'); +scriptAutoComplete.setAttribute('type', 'text/javascript'); +scriptAutoComplete.setAttribute('src', 'http://'+host+'/static/js/jquery-ui-1.8.2.custom.min.js'); + +var scriptInit = document.createElement('script'); +scriptInit.setAttribute('type', 'text/javascript'); +scriptInit.setAttribute('src', 'http://'+host+'/static/js/widgetInit.js'); + +body[0].appendChild(scriptJ); +body[0].appendChild(scriptAutoComplete); +body[0].appendChild(scriptInit); + +/* append elements to widget */ +widget.appendChild(stylesheet); +widget.appendChild(linkLogo); +linkLogo.appendChild(logo); +widget.appendChild(form); +form.appendChild(inputText); +form.appendChild(inputSubmit); + +/* ...and a little make-up */ +widget.style.borderColor = "#84BF2A"; +widget.style.borderWidth = "2px"; +widget.style.borderStyle = "solid"; +widget.style.width = "160px"; +widget.style.padding = "10px"; +widget.style.fontSize = "12px"; +form.style.paddingTop = "10px"; + +/* resize - if needed */ +if(widget.getAttribute('width') == '140'){ + logo.setAttribute('width', '140'); + inputText.setAttribute('size', '10'); + widget.style.width = "140px"; +} diff --git a/apps/wolnelektury_core/static/js/widgetInit.js b/apps/wolnelektury_core/static/js/widgetInit.js new file mode 100644 index 000000000..ab57a3062 --- /dev/null +++ b/apps/wolnelektury_core/static/js/widgetInit.js @@ -0,0 +1,29 @@ + $(function() { + $("#id_qq").autocomplete({ + source: function(request, response) { + $.ajax({ + url: "http://www.wolnelektury.pl/katalog/jtags/", + dataType: "jsonp", + data: { + featureClass: "P", + style: "full", + maxRows: 10, + q: request.term + }, + success: function(data) { + response($.map(data.matches, function(item) { + return { + label: item, + value: item + } + })) + } + }) + }, + minLength: 2, + select: function(event, ui) { + $("#id_qq").val(ui.item.value); + $("#wl-form").submit(); + } + }); + }); diff --git a/apps/wolnelektury_core/static/opensearch.xml b/apps/wolnelektury_core/static/opensearch.xml new file mode 100644 index 000000000..8ccdd269b --- /dev/null +++ b/apps/wolnelektury_core/static/opensearch.xml @@ -0,0 +1,20 @@ + + + Wolne Lektury + WolneLektury.pl, szkolna biblioteka internetowa. + UTF-8 + lektury + Fundacja Nowoczesna Polska + pl + fundacja@nowoczesnapolska.org.pl + http://static.wolnelektury.pl/static/img/favicon.ico + http://static.wolnelektury.pl/static/img/wl_icon_64.png + + + + http://wolnelektury.pl/ + + diff --git a/apps/wolnelektury_core/static/widget.html b/apps/wolnelektury_core/static/widget.html new file mode 100644 index 000000000..890184da4 --- /dev/null +++ b/apps/wolnelektury_core/static/widget.html @@ -0,0 +1,12 @@ + + + +
          + + + + + + + + diff --git a/apps/wolnelektury_core/templates/socialaccount/snippets/provider_list.html b/apps/wolnelektury_core/templates/socialaccount/snippets/provider_list.html index 3ca849360..1361d7018 100644 --- a/apps/wolnelektury_core/templates/socialaccount/snippets/provider_list.html +++ b/apps/wolnelektury_core/templates/socialaccount/snippets/provider_list.html @@ -1,24 +1,20 @@ +{% load static from staticfiles %} {% load allauth_tags %} {% load common_tags %} {% if allauth.openid_enabled %}
        4. - Google
        5. + Google {% endif %} {% if allauth.facebook_enabled %}
        6. + Facebook {% endif %} {% if allauth.twitter_enabled %}
        7. + Twitter {% endif %} {% if allauth.openid_enabled %} - -
        8. - OpenID
        9. - + OpenID {% endif %} diff --git a/apps/wolnelektury_core/templates/superbase.html b/apps/wolnelektury_core/templates/superbase.html index 2f933da53..79542ecfc 100644 --- a/apps/wolnelektury_core/templates/superbase.html +++ b/apps/wolnelektury_core/templates/superbase.html @@ -1,6 +1,7 @@ {% load cache compressed i18n %} + {% load static from staticfiles %} {% load catalogue_tags reporting_stats sponsor_tags %} @@ -16,10 +17,13 @@ {% block title %}{% trans "Wolne Lektury" %} :: {% block titleextra %}{% endblock %}{% endblock %} - - + + {% compressed_css "all" %} - {% compressed_css "screen" %} + + + {#% compressed_css "handheld" %#} @@ -38,7 +42,7 @@
          @@ -185,7 +189,7 @@
          -

          * {% trans "Loading" %}

          +

          * {% trans "Loading" %}

          @@ -213,7 +217,6 @@ {% block extrabody %} {% endblock %} - - + diff --git a/requirements.txt b/requirements.txt index 98deab79d..fb64d9501 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,11 @@ --find-links=http://www.pythonware.com/products/pil/ # django -Django>=1.3,<1.4 +Django>=1.4,<1.5 South>=0.7 # migrations for django +django-pipeline>=1.2 django-pagination>=1.0 -#django-rosetta>=0.5.3 -django-maintenancemode>=0.9 +django-maintenancemode>=0.10 django-piston django-jsonfield django-picklefield diff --git a/wolnelektury.vhost.template b/wolnelektury.vhost.template index 7d4455730..b077499ad 100644 --- a/wolnelektury.vhost.template +++ b/wolnelektury.vhost.template @@ -18,15 +18,8 @@ Allow from all - Alias /admin-media %(path)s/admin-media - - Options Indexes - Order allow,deny - Allow from all - - - Alias /static %(path)s/releases/current/%(project_name)s/static - + Alias /static %(path)s/releases/current/static + Options Indexes Order allow,deny Allow from all diff --git a/wolnelektury/settings/__init__.py b/wolnelektury/settings/__init__.py index be82e3d0b..f2314a9ad 100644 --- a/wolnelektury/settings/__init__.py +++ b/wolnelektury/settings/__init__.py @@ -53,7 +53,6 @@ INSTALLED_APPS_OUR = [ 'dictionary', 'infopages', 'lesmianator', - #'lessons', 'newtagging', 'opds', 'pdcounter', @@ -74,7 +73,9 @@ INSTALLED_APPS_CONTRIB = [ 'django.contrib.sites', 'django.contrib.admin', 'django.contrib.admindocs', + 'django.contrib.staticfiles', 'pagination', + 'pipeline', 'piston', 'piwik.django', #'rosetta', @@ -96,7 +97,6 @@ INSTALLED_APPS_CONTRIB = [ #'allauth.twitter', # included - 'compress', 'modeltranslation', ] diff --git a/wolnelektury/settings/static.py b/wolnelektury/settings/static.py index 77aa92f28..8dcdf8f3b 100644 --- a/wolnelektury/settings/static.py +++ b/wolnelektury/settings/static.py @@ -4,7 +4,7 @@ from settings.paths import PROJECT_DIR # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" MEDIA_ROOT = path.join(PROJECT_DIR, '../media/') -STATIC_ROOT = path.join(PROJECT_DIR, 'static/') +STATIC_ROOT = path.join(PROJECT_DIR, '../static/') SEARCH_INDEX = path.join(PROJECT_DIR, '../search_index/') # URL that handles the media served from MEDIA_ROOT. Make sure to use a @@ -13,15 +13,10 @@ SEARCH_INDEX = path.join(PROJECT_DIR, '../search_index/') MEDIA_URL = '/media/' STATIC_URL = '/static/' -# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a -# trailing slash. -# Examples: "http://foo.com/media/", "/media/". -ADMIN_MEDIA_PREFIX = '/admin-media/' - # CSS and JavaScript file groups -COMPRESS_CSS = { +PIPELINE_CSS = { 'all': { - #'source_filenames': ('css/master.css', 'css/jquery.autocomplete.css', 'css/master.plain.css', 'css/facelist_2-0.css',), + # styles both for mobile and for big screen 'source_filenames': [ 'css/jquery.countdown.css', @@ -33,47 +28,40 @@ COMPRESS_CSS = { 'css/picture_box.css', 'css/book_box.css', 'css/catalogue.css', - 'css/sponsors.css', + 'sponsors/css/sponsors.css', 'css/auth.css', 'css/social/shelf_tags.css', 'css/ui-lightness/jquery-ui-1.8.16.custom.css', ], - 'output_filename': 'css/all.min?.css', - }, - 'screen': { - 'source_filenames': ['css/screen.css'], - 'output_filename': 'css/screen.min?.css', - 'extra_context': { - 'media': 'screen and (min-width: 800px)', - }, + 'output_filename': 'css/compressed/all.css', }, 'ie': { 'source_filenames': [ 'css/ie.css', ], - 'output_filename': 'css/ie.min?.css', + 'output_filename': 'css/compressed/ie.css', }, 'book': { 'source_filenames': [ 'css/master.book.css', ], - 'output_filename': 'css/book.min?.css', + 'output_filename': 'css/compressed/book.css', }, 'player': { 'source_filenames': [ 'jplayer/jplayer.blue.monday.css', - 'css/player.css', + 'player/player.css', ], - 'output_filename': 'css/player.min?.css', + 'output_filename': 'css/compressed/player.css', }, 'simple': { 'source_filenames': ('css/simple.css',), - 'output_filename': 'css/simple.min?.css', + 'output_filename': 'css/compressed/simple.css', }, } -COMPRESS_JS = { +PIPELINE_JS = { 'base': { 'source_filenames': ( 'js/jquery.cycle.min.js', @@ -88,32 +76,33 @@ COMPRESS_JS = { 'js/locale.js', 'js/dialogs.js', - 'js/sponsors.js', 'js/base.js', - 'js/pdcounter.js', + 'pdcounter/pdcounter.js', + 'sponsors/js/sponsors.js', 'js/search.js', ), - 'output_filename': 'js/base?.min.js', + 'output_filename': 'js/base.min.js', }, 'player': { 'source_filenames': [ 'jplayer/jquery.jplayer.min.js', 'jplayer/jplayer.playlist.min.js', - 'js/player.js', + 'player/player.js', ], - 'output_filename': 'js/player.min?.js', + 'output_filename': 'js/player.min.js', }, 'book': { 'source_filenames': ('js/jquery.eventdelegation.js', 'js/jquery.scrollto.js', 'js/jquery.highlightfade.js', 'js/book.js',), - 'output_filename': 'js/book?.min.js', + 'output_filename': 'js/book.min.js', }, 'book_ie': { 'source_filenames': ('js/ierange-m2.js',), - 'output_filename': 'js/book_ie?.min.js', + 'output_filename': 'js/book_ie.min.js', } } -COMPRESS_VERSION = True -COMPRESS_CSS_FILTERS = None +STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage' +PIPELINE_CSS_COMPRESSOR = None +PIPELINE_JS_COMPRESSOR = None diff --git a/wolnelektury/static/css/auth.css b/wolnelektury/static/css/auth.css deleted file mode 100644 index 2979d0d98..000000000 --- a/wolnelektury/static/css/auth.css +++ /dev/null @@ -1,67 +0,0 @@ -#auth-page #main-content p { - font-size: 1.2em; -} -#auth-page #main-content h2 { - font-size: 2em; - margin-top: 1em; -} - -.uniForm { - font-size: 1.2em; -} -.uniForm fieldset { - border: none; - margin: .5em 0; -} -.uniForm .ctrlHolder { - margin: .5em 0; -} - -.inlineLabels label { - width: 8em; - display: inline-block; -} -.inlineLabels .buttonHolder, .inlineLabels .formHint { - margin-left: 8em; -} - - - -.email_list .verified { - display: inline-block; - margin-left: 2em; - font-style: italic; -} -.email_list .unverified { - display: inline-block; - margin-left: 2em; - color: #717171; - font-style: italic; -} -.email_list .primary { - display: inline-block; - margin-left: 2em; - font-weight: bold; -} -.socialaccount_provider { - display: inline-block; - background-repeat: no-repeat; - color: transparent; - height: 40px; - width: 40px; - vertical-align: middle; -} -.socialaccount_provider.google { - background-image: url(/static/img/auth/google.png); -} - - -.socialaccount_providers { - margin: 1em 0; - padding: 0; -} -.socialaccount_providers li { - display: inline; - list-style: none; - margin-right: 1em; -} \ No newline at end of file diff --git a/wolnelektury/static/css/base.css b/wolnelektury/static/css/base.css deleted file mode 100755 index cdb8b4fed..000000000 --- a/wolnelektury/static/css/base.css +++ /dev/null @@ -1,192 +0,0 @@ -/* Logo font */ -@font-face { - /* IE version */ - font-family: WL-Nav; - src: url(/static/fonts/WL-Nav.eot); -} -@font-face { - font-family: WL-Nav; - src: url(/static/fonts/WL-Nav.ttf) format("truetype"); -} - - -html { - margin: 0; - padding: 0; -} - -body { - margin: 0; - background: #f7f7f7; - font-size: .625em; - font-family: Georgia; - /*line-height: 1.4em;*/ -} - -a img { - border: 0; -} - -a { - color: #0d7e85; /*#1199a2;*/ /* #01adba; */ - text-decoration: none; -} - -/* jquery UI overrides us */ -.ui-menu .ui-menu-item a { - color: #0d7e85 !important; - line-height: 1.636em !important; -} - -.ui-widget { - font-family: Georgia !important; - font-size: 1em !important; -} - -.ui-widget-content { - background: #EEEEEE !important; /* #E2E2E2 ? */ - border-radius: 0px !important; -} - - -h1 { - font-size: 3.5em; - font-weight: normal; - margin-top: .4em -} -h1 a { - color: inherit; -} - -ul.plain { - list-style:none; - margin: 0; - padding: 0; -} - -.normal-text { - font-size: 1.3em; - line-height: 1.3em; -} - -h2 { - margin: 0; - font-size: 1em; - font-weight: normal; -} - - -.mono { - font-family: "Andale Mono", "Lucida Sans Typewriter", "Courier New"; -/* font-weight: bold; */ -} - -.accent1 { - color: #191919; -} - -.accent2 { - color: #242424; -} - -.accent3 { - color: #575c63; -} - - -.accent4 { - color: #707b7a; -} - -.contrast { - #1199a2; -} - -/* #281d1c */ - -.clearboth { - clear: both; -} - -.white-box { - border: 1px solid #ddd; - padding: 1em; - background: #fff; - -moz-box-shadow: 2px 2px 2px #ddd; - -webkit-box-shadow: 2px 2px 2px #ddd; - box-shadow: 2px 2px 2px #ddd; -} - -.page-desc { - margin-left: 1.5em; -} - -.inline-tag-lists p span:first-child { - color: #281d1c; -} - -.inline-tag-lists { - font-size: 1.1em; -} - -.theme-list-link:after { - padding-left: 1em; - content: "↓"; - font-family: WL-Nav; - vertical-align: middle; -} -.theme-list-link { - font-size: 1.1em; -} -.hidden-box-wrapper { - position: relative; -} -.hidden-box { - position: absolute; - left: 0; - display: none; - border: 1px solid #ddd; - padding: 1em 1em .5em 1em; - background: #fff; - -moz-box-shadow: 2px 2px 2px #ddd; - -webkit-box-shadow: 2px 2px 2px #ddd; - box-shadow: 2px 2px 2px #ddd; - z-index: 500; -} -.hidden-box ul { - list-style: none; - padding: 0; - margin: 0; - font-size: 1.1em; - column-width: 12em; - -moz-column-width: 12em; - -webkit-column-width: 12em; -} -.hidden-box li { - margin-bottom: .5em; -} - - -.pagination { - display: block; - font-size: 1.2em; - padding: .5em; - text-align:center; -} - -#footer { - color: #767676; - margin-top: 5em; - padding-top:3em; - background: #fff; - border-top: 1px solid #ddd; -} -#footer p { - margin: .25em 0; -} - -/* just on search page */ -.top-tag-list { - margin-top: 2.2em; - margin-bottom: 1.6em; -} diff --git a/wolnelektury/static/css/book_box.css b/wolnelektury/static/css/book_box.css deleted file mode 100755 index 8dee81384..000000000 --- a/wolnelektury/static/css/book_box.css +++ /dev/null @@ -1,333 +0,0 @@ -.book-mini-box, .Book-item { - display: inline-block; - vertical-align: top; -} - -.book-wide-box, .book-box { - margin: 0; - vertical-align: top; -} - -.book-box { - width: 48.75em; -} - -.book-mini-box { - width: 16.15em; -} - -.book-wide-box { - /** This is a fullpage box, it must be aligned with the top menu. - This corresponds to a .1em margin below **/ - margin-left: -0.1em; -} - -/* - * A mini-box wraps it's contents (image + label) in an - * other boxes have an inner box as a wrapper. - */ - -.book-box-inner { - /* min, so it can grow */ - min-height: 19.75em; - margin: .5em; -} - -.book-mini-box a, .book-box-inner { - display: block; - color: black; - border: 1px solid #ddd; -/* height: 20em; */ - padding: .8em 1em; - margin: .1em; - background: #fff; - -moz-box-shadow: 2px 2px 2px #ddd; - -webkit-box-shadow: 2px 2px 2px #ddd; - box-shadow: 2px 2px 2px #ddd; -} - -.book-mini-box a { - height: 27.1em; - margin: .1em; - overflow: hidden; -} - - -.book-wide-box .book-box-inner { - /* min, so it can grow */ - min-height: 24.4em; -} - -.search-result .book-box-body { - width: 31em; -} - -.book-list-header { - padding: 0em; - margin-left: -0.1em; -} - -.book-list-header .book-box-inner { - min-height: 1em; -} - -.book-list-header p { - font-size: 2.4em; - margin: 0.5em; -} - - -/* - * ingenous float containment hack - * http://www.mikepadgett.com/technology/technical/alternative-to-the-pie-clearfix-hack/ - */ -/* -.search-result .book-box-inner { - height: 1%; - overflow: hidden; -} -*/ - -.book-mini-box img, .book-box img, .book-wide-box img, .search-result img { - width: 13.9em; - height: 19.3em; -} -.book-mini-box img { - margin-bottom: 1.8em; -} -.book-box-inner img, .book-wide-box img { - float: left; - margin-right: 1.5em; -} - -.book-mini-box .desc { - margin-left:0em; -} -.book-mini-box .author { - font-size: 1.1em; - color: #6d7877; - display: block; - overflow:hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -.book-mini-box .title { - font-size: 1.4em; - color: #242424; -} - - -.book-box-body { - height: 17em; - overflow:hidden; - position: relative; -} - -.book-wide-box .book-box-body { - min-height: 17em; -} - -.book-box-head { - min-height: 7em; - padding-top: 1.4em; - margin-bottom: 1em; -} -.book-box-head a { - color: black; -} -.book-box-head .author { - font-size: 1.1em; - max-width: 24em; -} -.book-box-head .title { - font-size: 2.4em; - height: 2.4em; - overflow:hidden; - margin-top: .3em; -} -.book-box-body .tags { - font-size: 1.1em; -} -.book-box-tag { - margin-right: .5em; - margin-left: .4em; -} -.book-box-download { - position: relative; -} - -.book-box-download a { - position: relative; - z-index: 101; -} - -.book-box-formats { - display: none; - position: absolute; - - width: 16.363em; - border: 1px solid #ddd; - padding: 3.454em 1.727em .818em 1.727em; - background: #fff; - -moz-box-shadow: 2px 2px 2px #ddd; - -webkit-box-shadow: 2px 2px 2px #ddd; - box-shadow: 2px 2px 2px #ddd; - - z-index: 100; - top: -1.454em; - left: -1.727em; -} -.book-box-formats span { - display: block; -} - -.book-box-download .book-box-formats span:first-child { - margin-top: 1.454em; -} - -.book-box-download:hover .book-box-formats, -.book-box-download.hover .book-box-formats { - display: block; -} - -.book-box-tools { - width: 46em; - font-size: 1.1em; -} - -.book-wide-box { - min-width: 48.75em; -} -.book-wide-box .book-box-tools { - margin-left: 14em; - width: 32em; -} - -.book-wide-box #theme-list-wrapper { - margin-left: 15.4em; - margin-bottom: 3em; - width: 30em; -} - - - -.book-box-read a:before { - content: "\2609"; - font-family: WL-Nav; - font-size: 2.25em; - margin-right: .15em; - vertical-align: middle; - font-weight: normal; -} - -.book-box-download a.downarrow:before { - content: "\21E9"; - font-family: WL-Nav; - font-size: 2.25em; - margin-right: .15em; - vertical-align: middle; - font-weight: normal; -} - -.book-box-audiobook a:before { - content: "\266B"; - font-family: WL-Nav; - font-size: 2.25em; - margin-right: .15em; - vertical-align: middle; - font-weight: normal; -} - -ul.book-box-tools { - margin: 0; - padding: 0; -} - -.book-box-tools li { - display: inline-block; -} - -.book-box-read { - width: 11.5em; -} -.book-box-download { - width: 8.5em; -} -.book-box-audiobook { - width: 7em; -} - -ul.inline-items, ul.inline-items li { - margin: 0; - padding: 0; -} - -ul.inline-items li { - display: inline-block; -} - -.book-wide-box .other-tools { - float: left; - width: 14.5em; - margin: 5em 0 0 1.5em; - -} - -.book-wide-box .other-download { - float: left; - width: 22em; - margin: 5em 1.5em 0em 1.5em; -} -.book-wide-box .other-tools h2, -.book-wide-box .other-download h2, -.book-wide-box .other-tools ul, -.book-wide-box .other-download ul { - font-size: 1.1em; -} - - - -.star { - font-size: 2.25em; - margin-right: .5em; - position: absolute; - right: 0; -} -.star button::-moz-focus-inner { - padding: 0; - border: 0 -} -.if-unlike button { - font-size: 1em; - font-family: inherit; - border: 0; - background: none; - margin: 0; - padding: 0; - color: #757575; -} - -.if-like a { - display:block; - text-align:right; - padding: 0; -} - -.like .if-unlike { - display: none; -} - -.unlike .if-like { - display: none; -} - -.snippets .snippet-text { - background: #f7f7f7; - font-size: 1.2em; - margin: 1.083em 0em; - padding: 1em; -} - -.snippets .anchor { - display: none; -} diff --git a/wolnelektury/static/css/catalogue.css b/wolnelektury/static/css/catalogue.css deleted file mode 100755 index 0e952ba7d..000000000 --- a/wolnelektury/static/css/catalogue.css +++ /dev/null @@ -1,154 +0,0 @@ -.work-list { - margin: 0; - padding: 0; - list-style: none; -} - -.work-item { - margin: 0; - padding: 0; -} - -.books .work-item { - display: inline-block; -} - - -/* listing of all books */ -#book-list { - padding-left: 50px; -} -/* FIXME: MEDIA? - * -#book-list-nav { - position: absolute; - right: 50px; - width: 200px; - border-left: 1px #cfcfcf solid; - padding: 10px; - font-size: 1.2em; -} - */ - -#book-list-nav ul { - list-style-type: none; - margin: 5px; - padding: 0; -} - -.book-list-show-index { - display: none; - margin: 0; - padding: 0; -} - - -#book-a-list #book-list ol { - padding-left: 1em; - margin: 0.3em 0 1.2em 0; - list-style: none; -} - -#book-a-list #book-list h2 a { - color: black; -} - -#book-list-up { - position: fixed; - bottom: 50px; - right: 50px; - border-left: 1px #cfcfcf solid; - padding: 10px; - background-color: white; -} - - - -.catalogue-catalogue h2 { - font-size: 2em; -} -.catalogue-catalogue ul { - column-width: 30em; - -moz-column-width: 30em; - -webkit-column-width: 30em; -} - - -#description { - margin-bottom: 2em; - cursor: pointer; -} -#description dl { - margin-top: 0; -} -#description dt { - display: inline; - font-weight: bold; - margin: 0; -} -#description dd { - display: inline; - margin: 0; -} -#description p { - margin-top: 0; -} -#description .meta { - list-style: none; - padding: 0; - margin: 0; -} -#description .meta li { - text-align:right; - color: #666; - font-size: .9em; -} - -.inline-header { - display: inline-block; - vertical-align: top; - width: 7em; -} -.inline-body { - display: inline-block; - vertical-align: top; - margin-bottom: .5em; -} -.inline-body ul { - list-style: none; - padding: 0; - margin: 0; -} -.inline-body li { - display: inline-block; - margin-right: 1em; -} - - -.see-also { - margin-left: 8em; - float: left; - width: 14.3em; -} -.download { - margin-left: 2em; - float: left; -} - -.see-also, .download { - margin-top: 2em; - margin-bottom: 2em; -} -.see-also h2, .download h2 { - font-size: 1.1em; -} -.see-also ul, .download ul { - list-style: none; - padding: 0; - margin: 0; - font-size: 1.1em; -} - -.left-column .see-also { - margin-left: 0; -} diff --git a/wolnelektury/static/css/cite.css b/wolnelektury/static/css/cite.css deleted file mode 100755 index 04fdfdd9f..000000000 --- a/wolnelektury/static/css/cite.css +++ /dev/null @@ -1,136 +0,0 @@ -.cite { - display: block; - color: black; - background: white; - padding: 3em 2em .1em 8em; -} -.book-wide-box .cite-body, -#tagged-object-list .cite-body - { - font-size: 1.8em; - line-height: 1.3em; -} -.book-wide-box .source, -#tagged-object-list .source -{ - color: #444; - font-size: 1.1em; - margin-top: 1.6em; -} -.cite .vip { - margin: 0; - color: #575C63; - font-size: 1.1em; -} - - - -#big-cite { - background-color: #444; - color: white; - padding: 0; - margin: 0; - background-image: url(/static/img/backdrop/book-drawer2.jpg); - background-size: 100%; - background-position: 50% 68%; - background-repeat: no-repeat; -} - -#big-cite .cite { - padding: 4.6em 4em 4.8em 0; - background: none; - color: white; -} - -#big-cite h2 { - margin: 0; - font-size: 1.1em; - color: #575c63; -} - - -#big-cite .cite-body { - margin: .05em .05em .05em 1em; -} -#big-cite .cite-body span { - font-size: 3em; - line-height: 1.16em; -} - -#big-cite .vip { - margin-left: 1em; - margin-top: .25em; -} - -#big-cite .vip span { - font-size:1.1em; -} - -#big-cite .cite-body span, -#big-cite .vip span, -#big-cite .source span -{ - color: white; - background-color: rgb(0, 0, 0); - background-color: rgba(0, 0, 0, 0.6); - /* For IE 5.5 - 7*/ - filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000); - /* For IE 8*/ - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)"; -} -/* a long cite displays smaller */ -#big-cite .cite-small .cite-body span { - font-size: 2em; -} - - -#big-cite .source { - margin: 1.6em 0.2em 1.6em 1em; -} -#big-cite .source span { - font-size: 1.2em; -} - - - - - -.cite blockquote p { - margin: 0; -} - -.cite blockquote { - padding: 0; - margin: 0; -} - -.book-wide-box .cite { - position: relative; - top: -0.8em; - right: -1em; - background-color: #f7f7f7; - vertical-align: middle; - width: 39.5em; - margin: 0; - padding: 1em; -} - - -.Fragment-item .fragment { - color: black; - display: block; -} -.Fragment-item .toggle { - font-size: 1.1em; - display:block; - padding: .5em 0; -} -.Fragment-item { - margin-bottom: 2em; - /* white-box */ - border: 1px solid #ddd; - background: #fff; - -moz-box-shadow: 2px 2px 2px #ddd; - -webkit-box-shadow: 2px 2px 2px #ddd; - box-shadow: 2px 2px 2px #ddd; -} diff --git a/wolnelektury/static/css/dialogs.css b/wolnelektury/static/css/dialogs.css deleted file mode 100755 index d83116ba6..000000000 --- a/wolnelektury/static/css/dialogs.css +++ /dev/null @@ -1,117 +0,0 @@ -.cuteform { - font-size: 1.1em; -} -.cuteform ol, .cuteform ul { - padding: 0; - margin: 0; - list-style: none; - font-style: 1.1em; -} - -.cuteform ol li, .cuteform ul li { - margin-top: 0.7em; -} - -.cuteform label { - display: block; -} - -.cuteform span.help-text { - display: block; - font-size: 0.8em; - color: #999; -} - -.cuteform .error { - color: #BF3024; - display: block; -} -.cuteform .errorlist { - color: #BF3024; -} - - -.jqmOverlay { background-color: #000; } - - -.dialog-window { - position: absolute; - display: none; - background-color: transparent; - margin-top: -0.5em; - margin-left: 1em; - width: 20em; -} - -.dialog-window div.header { - font-size: 1.1em; - width: 4em; - background-color: #FFF; - border-right: 0.3em solid #DDD; - padding: 0.5em 1em 0.5em 1em; - right: 0; - left: auto; - float: right; - text-align: center; -} - - -.dialog-window div.target { - background-color: #FFF; - color: black; - border-right: 0.3em solid #DDD; - border-bottom: 0.3em solid #DDD; - padding: 1em; - clear: both; -} - -.dialog-window h1 { - font-size: 1.2em; -} - -.dialog-window textarea, .dialog-window input { - width: 100%; -} - -.hidelabels label { - display: block; - width: 1px; - height: 1px; - overflow:hidden; -} - - - -#login-window { - width: 26em; -} -#register-window { - width: 26em; -} -#context-login-window { - width: 26em; -} - -#suggest-window { - width: 26em; -} - -#suggest-window textarea { - height: 6em; -} - -#suggest-publishing-window { - width: 29em; -} - -#suggest-publishing-window textarea { - height: 3em; -} - -#custom-pdf-window { - width: 24em; -} - -#custom-pdf-window label { - display: inline; -} diff --git a/wolnelektury/static/css/error.css b/wolnelektury/static/css/error.css deleted file mode 100644 index 831573427..000000000 --- a/wolnelektury/static/css/error.css +++ /dev/null @@ -1,83 +0,0 @@ - -body { -font-family: verdana, arial, sans-serif; -margin: 2em; -font-size: 100%; -} - - - - -h1 { -font-size: 300%; -font-weight: bold; -margin-top: 30px; -} - -h1,h2 { -margin-bottom: 0; -} - -h2 { -font-size: 100%; -font-weight: bold; -margin-top: 1em; -} - -p { -width: 450px; -margin-top: 0.5em; -} - -img { - border: none; -} - - #whoiam { - text-transform: uppercase; - letter-spacing: 0.2em; - font-size: 150%; - margin-bottom: 0.8em; -} - -.howto { - - color: gray; - font-size: 80% -} - -#contact h2 { -margin-top: 0.5em; -} - - -.haj { - background-color: #ffc; -} - -#urle { -margin-top: 2.3em; -} - -/* -LINKS -*/ - -a:link { -color: #037; -text-decoration: underline; -} - -a:visited { -color: #636; -} - -a:active { -color: #900; -text-decoration: none; -} - -a:hover { -color: #d46400; -} - diff --git a/wolnelektury/static/css/facelist_2-0.css b/wolnelektury/static/css/facelist_2-0.css deleted file mode 100644 index 9f9ddc441..000000000 --- a/wolnelektury/static/css/facelist_2-0.css +++ /dev/null @@ -1,182 +0,0 @@ -.facelist-selections a { - color: black; - text-decoration: none; -} -.facelist-selections a:hover { - color: black; - text-decoration: none; -} -ul.facelist-selections { - list-style-type: none; - border-top: 1px solid #888; - border-bottom: 1px solid #b6b6b6; - border-left: 1px solid #aaa; - border-right: 1px solid #aaa; - padding: 4px 0 4px 4px; - overflow: auto; - background-color: #fff; - box-shadow:inset 0 1px 2px #888; - -webkit-box-shadow:inset 0 1px 2px #888; - -moz-box-shadow:inset 0 1px 2px #888; - width: 90%; -} - -ul.facelist-selections.loading { - background-color: #eee; -} - -ul.facelist-selections li { - float: left; - margin: 1px 4px 1px 0; - padding-top: 20px; - margin-left: 10px; -} - -ul.facelist-selections li.facelist-selection-item { - color:white; - position: relative; - background-color: #fbc11d; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - -webkit-transition: background-color .2s ease-in; - cursor: pointer; - padding:2px 5px 2px 5px; - font-size: 13px; - font-family: "Lucida Grande", arial, sans-serif; -} - -ul.facelist-selections li.facelist-selection-item:last-child { - margin-left: 30px; -} - -ul.facelist-selections li.facelist-selection-item a.facelist-close { - float: right; - margin: 1px 0 0 7px; - padding: 0 2px; - cursor: pointer; - color: black; - font-family: "Helvetica", helvetica, arial, sans-serif; - font-size: 14px; - font-weight: bold; - -webkit-transition: color .1s ease-in; -} - -ul.facelist-selections li.facelist-selection-item.blur a.facelist-close { - color: #999; -} - -ul.facelist-selections li:hover.facelist-selection-item { - background-color: #d8dfea; -} - -ul.facelist-selections li.facelist-selection-item.selected { - background-color: #5670a6; - color: #fff; -} - -ul.facelist-selections li.facelist-original { - margin-left: 0; -} - -ul.facelist-selections li.facelist-original input { - border: none; - outline: none; - font-size: 13px; - width: 120px; - height: 18px; - padding-top: 3px; -} - -ul.facelist-list { - position: absolute; - list-style-type: none; - margin: 2px 0 0 0; - padding: 0; - font-size: 14px; - color: #000; - font-family: "Lucida Grande", arial, sans-serif; - background-color: #fff; - z-index: 2; - border: solid #ccd5e4 1px; -} - -li.facelist-result-item, li.facelist-message { - margin: 0 0 0 0; - padding: 5px 12px; - background-color: transparent; - border: 1px solid #fff; - border-bottom: 1px solid #ddd; - cursor: pointer; -} - -li:first-child.facelist-result-item { - margin: 0; -} - -li.facelist-message { - margin: 0; - cursor: default; -} - -li.facelist-result-item.active { - background-color: #3b5998; - border-color: #3342e8; - color: #fff; -} - -li.facelist-result-item em { - font-style: normal; - background: #dbe1ec; - padding: 0 2px; -} - -li.facelist-result-item.active em { - background: #5670a6; - color: #fff; -} - -/* Firefox 3.0 Hacks */ -ul.facelist-list, x:-moz-any-link, x:default { - border: 1px solid #888; -} -BODY:first-of-type ul.facelist-list, x:-moz-any-link, x:default { /* Target FF 3.5+ */ - border: none; -} - -/* Webkit Hacks */ -@media screen and (-webkit-min-device-pixel-ratio:0) { - ul.facelist-selections { - border-top-width: 2px; - } - ul.facelist-selections li.facelist-selection-item { - padding-top: 3px; - padding-bottom: 3px; - } - ul.facelist-selections li.facelist-selection-item a.facelist-close { - margin-top: -1px; - } - ul.facelist-selections li.facelist-original input { - height: 19px; - } -} - -/* Opera Hacks */ -@media all and (-webkit-min-device-pixel-ratio:10000), not all and (-webkit-min-device-pixel-ratio:0) { - ul.facelist-list { - border: 1px solid #888; - } - ul.facelist-selections li.facelist-selection-item a.facelist-close { - margin-left: 4px; - margin-top: 0; - } -} - -/* IE Hacks */ -ul.facelist-list { - border: 1px solid #888\9; -} -ul.facelist-selections li.facelist-selection-item a.facelist-close { - margin-left: 4px\9; - margin-top: 0\9; -} diff --git a/wolnelektury/static/css/header.css b/wolnelektury/static/css/header.css deleted file mode 100755 index c0fbbc73e..000000000 --- a/wolnelektury/static/css/header.css +++ /dev/null @@ -1,248 +0,0 @@ -#header-bg { - z-index: -1; - background: #191919; - position: absolute; - width: 50%; - height: 9.4em; -} - -#header { - padding-top: 1.9em; - padding-bottom: 0; - color: #989898; - background: #191919; -} -#header a { - color: #17CFDB; -} - -#half-header { - padding-bottom: 0; -} - -#half-header-content { - background: #191919; - color: #989898; -} - - -#tagline { - margin-left: 1.5em; -} - -#tagline span { - font-size: 1.3em; - color: #bbb; -} - -#user-info { - margin: 0; - padding: 1em 0; - margin-left: 1.5em; -} - -#search-area { - margin: 0; - background: #444; - color: white; -} - -#search-field { - display: inline-block; - padding-left: .5em; - padding-right: .5em; - padding-top: 0.5em; - padding-bottom: 0; -} - -#search { - font-size: 1.3em; - padding: 0; - /*height: 3.3em; - width: 62.6em; - padding-left: .5em; - -webkit-border-radius: .5em; - -moz-border-radius: .5em; - border: none; - border-radius: .5em; - -webkit-box-shadow:0 0 .5em #444 inset; - -moz-box-shadow:0 0 .5em #444 inset; - box-shadow: 0 0 .5em #444 inset;*/ - height: 2.54em; - padding-left: 1em; - -webkit-border-radius: .38em; - -moz-border-radius: .38em; - border: none; - border-radius: .38em; - -webkit-box-shadow:0 0 .38em #444 inset; - -moz-box-shadow:0 0 .38em #444 inset; - box-shadow: 0 0 .5em #444 inset; - line-height: 2.5em; - - font-family: Georgia; - background-color: #fff; - color: #000; - z-index: 200; - position: relative; -} - -/* styling search placeholder */ - -#search:-webkit-input-placeholder -{ - font-family: Georgia; - font-style: italic; - color: #767676; -} - -#search.placeholder -{ - font-family: Georgia; - font-style: italic; - color: #767676; -} - -#search:-moz-placeholder -{ - font-family: Georgia; - font-style: italic; - color: #767676; -} - -#search-button { - display: inline-block; - background: #018189; - color: white; - padding: 0; - margin: 0; - width: 9.4em; -} -#search-button button { - font-size: 1em; - height: 4.5em; - border: none; - background: #018189; - color: white; - width: 100%; - padding: 0; -} - -#search-button button span { - font-size: 1.1em; - position:relative; -} - - -#nav-line { - background-color: #e2e2e2; - height: 4.9em; -} - -ul#menu { - list-style: none; - padding: 0; - margin: 0 0 0 .6em; -} - -li.menu { - background-color: #e2e2e2; - float: left; -} -a.menu { - display: block; - padding-left: 1.4em; - padding-right: 1.4em; - /* must match grid-line */ - height: 3.1em; - padding-top: 1.8em; - color: #0c7076; -} -a.menu span { - font-size: 1.1em; -} - - -#lang-button { - color: #717171; -} -#lang-button:after { - padding-left: 1em; - content: "↓"; - font-family: WL-Nav; - vertical-align: middle; -} -#lang-menu { - position: relative; - float: right; - display: block; - padding-left: 2.5em; - padding-right: 2em; - /* must match grid-line */ - height: 3.3em; - padding-top: 1.6em; - background: #f7f7f7; -} -#lang-menu .lang-flag { - font-size: 1.3em; -} - -#lang-menu-items { - z-index: 9999; -} - -#lang-menu-items button { - display: none; - background: #f7f7f7; - color: #6f6f6f; - cursor: pointer; - width: 100%; - border: solid #ddd; - border-width: 0 0 1px 0; - padding: .5em 0; - margin: 0; - font-size: 1.3em; -} - -#lang-menu:hover button, -#lang-menu.hover button { - display: block; -} - -#lang-menu:hover #lang-menu-items, -#lang-menu.hover #lang-menu-items { - position: absolute; - width: 100%; - padding: 0; - left: 0; - /* must match grid-line height */ - top: 3.9em; -} - -#lang-menu .active { - color: #000; -} - -.search-hint-label { - display: inline-block; - width: 25em; - font-size: 1.1em; - line-height: 1.636em; -} - -.search-hint-category { - font-size: 1.1em; - line-height: 1.636em; - -} - - - -#user-menu { - left: 0; - top: 2em; - width: 15em; - line-height:1.6em; -} -#user-menu a { - color: #0D7E85; -} diff --git a/wolnelektury/static/css/ie.css b/wolnelektury/static/css/ie.css deleted file mode 100644 index ff6b41242..000000000 --- a/wolnelektury/static/css/ie.css +++ /dev/null @@ -1,9 +0,0 @@ -#logo { - margin-top: 2.7em; - width: 17em; - height: 10em; - overflow: hidden; -} -#logo a { - padding-top: 3em; -} diff --git a/wolnelektury/static/css/jquery.autocomplete.css b/wolnelektury/static/css/jquery.autocomplete.css deleted file mode 100644 index 434de139d..000000000 --- a/wolnelektury/static/css/jquery.autocomplete.css +++ /dev/null @@ -1,36 +0,0 @@ -.ac_results { - padding: 0px; - border: 0.1em solid #999; - background-color: #FFF; - overflow: hidden; - z-index: 99999; -} - -.ac_results ul { - width: 100%; - list-style-position: outside; - list-style: none; - padding: 0; - margin: 0; -} - -.ac_results li { - margin: 0; - padding: 0.2em 0.5em; - cursor: default; - display: block; - overflow: hidden; -} - -.ac_loading { - background: white url(/static/img/indicator.gif) right center no-repeat; -} - -.ac_odd { - background-color: #EEE; -} - -.ac_over { - background-color: #0A246A; - color: #FFF; -} diff --git a/wolnelektury/static/css/jquery.countdown.css b/wolnelektury/static/css/jquery.countdown.css deleted file mode 100644 index 3eca47676..000000000 --- a/wolnelektury/static/css/jquery.countdown.css +++ /dev/null @@ -1,53 +0,0 @@ -/* jQuery Countdown styles 1.5.7. */ -.hasCountdown { - /*border: 1px solid #ccc; - background-color: #eee;*/ - margin: 1em 0 7em 0; -} -.countdown_rtl { - direction: rtl; -} -.countdown_holding span { - background-color: #ccc; -} -.countdown_row { - clear: both; - width: 100%; - padding: 0px 2px; - text-align: center; -} -.countdown_show1 .countdown_section { - width: 98%; -} -.countdown_show2 .countdown_section { - width: 48%; -} -.countdown_show3 .countdown_section { - width: 32.5%; -} -.countdown_show4 .countdown_section { - width: 24.5%; -} -.countdown_show5 .countdown_section { - width: 19.5%; -} -.countdown_show6 .countdown_section { - width: 16.25%; -} -.countdown_show7 .countdown_section { - width: 14%; -} -.countdown_section { - display: block; - float: left; - font-size: 100%; - text-align: center; -} -.countdown_amount { - font-size: 3.5em; - line-height: 1.4em; -} -.countdown_descr { - display: block; - width: 100%; -} diff --git a/wolnelektury/static/css/main_page.css b/wolnelektury/static/css/main_page.css deleted file mode 100755 index 331e21041..000000000 --- a/wolnelektury/static/css/main_page.css +++ /dev/null @@ -1,98 +0,0 @@ - -#promo-box { - width: 32em; -} -#promo-box-header { - padding-top: 2em; - height: 3.1em; - padding-bottom: 0; - padding-left: 2.5em; - padding-right: 2.5em; - background: #191919; - color: white; -} -#promo-box-header h2 { - font-size: 1.3em; -} -#promo-box-body { - border-bottom: 2px solid #efefef; - padding: 2em 2.8em; - background: #efefef; -} -#promo-box h3 { - color: #0d777e; - font-size: 1.1em; - height: 2.5em; /* 2.75@1.1 */ - margin: 0; - font-family: "Andale Mono", "Lucida Sans Typewriter", "Courier New"; - font-weight: normal; -} -#promo-box h3:after { - content: " >"; -} -#promo-box a { - color: #0d777e; -} -#promo-box-body a { - display: block; - color: #6c6c6c; -} -#promo-box-body p { - margin-top: 0; - font-size: 1.2em; - line-height: 1.55em; - color: #6c6c6c; -} - -.main-last { - padding-top: 1.9em; - height: 3.2em; - padding-left: 1.9em; -} -.main-last span { - font-size: 1.1em; -} - - -.infopages-box { - width: 20.6em; - display: inline-block; - margin: .5em 0 0 0; - padding: 0 1.7em; - vertical-align: top; - color: #989898; -} -.infopages-box h2 { - color: #017e85; - height: 2.8em; - padding-top: 2.5em; -} -.infopages-box h2 span { - font-size: 1.1em; -} -.infopages-box a { - color: black; -} - -.infopages-box ol, .infopages-box ul { - font-size: 1.1em; - list-style: none; - padding: 0; - margin: 0; - line-height: 1.45em; -} - -.infopages-box li { - margin-bottom: .25em; -} - -.infopages-box .social-links { - margin-top: 1em; -} - -.infopages-box .social-links a { - font-family: WL-Nav, courier; - font-size: 3em; - color: #281d1c; - margin-right: .2em; -} diff --git a/wolnelektury/static/css/master.book.css b/wolnelektury/static/css/master.book.css deleted file mode 100644 index be5492726..000000000 --- a/wolnelektury/static/css/master.book.css +++ /dev/null @@ -1,406 +0,0 @@ -body { - font-size: 16px; - font: Georgia, "Times New Roman", serif; - line-height: 1.5em; - margin: 0; -} - -a { - color: blue; - text-decoration: none; -} - -#book-text { - margin: 3em; - max-width: 36em; -} - -/* ================================== */ -/* = Header with logo and menu = */ -/* ================================== */ -#header { - margin: 3.4em 0 0 1.4em; -} - -img { - border: none; -} - -#logo { - font-size: 1.5em; -} -#logo a { - color: black; -} - -#menu { - position: fixed; - left: 0em; - top: 0em; - width: 100%; - height: 1.5em; - background: #333; - color: #FFF; - opacity: 0.9; - z-index: 99; -} - -#menu ul { - list-style: none; - padding: 0; - margin: 0; -} - -#menu li a { - display: block; - float: left; - height: 1.5em; - margin-left: 0.5em; - text-align: center; - color: #FFF; - padding: 0 1em; -} -#menu li a.menu { - padding-right: 1.5em; -} - -#menu li a.menu:hover, #menu li a.menu:active { - color: #000; - background: #FFF url(/static/img/arrow-down.png) no-repeat center right; -} - -#menu li a.menu.selected { - color: #000; - background: #FFF url(/static/img/arrow-up.png) no-repeat center right; -} -#menu a.menu-link { - display: block; - float: left; - height: 1.5em; - margin-left: 0.5em; - text-align: center; - color: #FFF; -} -#menu span { - color: #888; - font-style: italic; - font-size: .75em; - margin-right: 0.5em; -} - - -#toc, #themes, #nota_red, #info { - position: fixed; - left: 0em; - top: 1.5em; - width: 37em; - padding: 1.5em; - background: #FFF; - border-bottom: 0.25em solid #DDD; - border-right: 0.25em solid #DDD; - display: none; - height: 16em; - overflow-x: hidden; - overflow-y: auto; - opacity: 0.9; - z-index: 99; -} -#download { - position: fixed; - left: 0em; - top: 1.5em; - width: 37em; - padding: 1.5em; - background: #FFF; - border-bottom: 0.25em solid #DDD; - border-right: 0.25em solid #DDD; - display: none; - height: 10em; - overflow-x: hidden; - overflow-y: auto; - opacity: 0.9; - z-index: 99; -} - -#toc ol, #themes ol { - list-style: none; - padding: 0; - margin: 0; -} - -#toc ol li { - font-weight: bold; -} - -#toc ol ol { - padding: 0 0 1.5em 1.5em; - margin: 0; -} - -#toc ol ol li { - font-weight: normal; -} - -#toc h2 { - display: none; -} - -#toc .anchor { - float: none; - margin: 0; - color: blue; - font-size: 16px; - position: inherit; -} - -#info p { - text-align: justify; - margin: 1.5em 0 0; -} - -/* =================================================== */ -/* = Common elements: headings, paragraphs and lines = */ -/* =================================================== */ -h1 { - font-size: 3em; - margin: 1.5em 0; - text-align: center; - line-height: 1.5em; - font-weight: bold; -} - -h2 { - font-size: 2em; - margin: 1.5em 0 0; - font-weight: bold; - line-height: 1.5em; -} - -h3 { - font-size: 1.5em; - margin: 1.5em 0 0; - font-weight: normal; - line-height: 1.5em; -} - -h4 { - font-size: 1em; - margin: 1.5em 0 0; - line-height: 1.5em; -} - -p { - margin: 0; -} - -/* ======================== */ -/* = Footnotes and themes = */ -/* ======================== */ -.theme-begin { - border-left: 0.1em solid #DDDDDD; - color: #777; - padding: 0 0.5em; - width: 7.5em; - - font-style: normal; - font-weight: normal; - font-variant: normal; - letter-spacing: 0; - text-transform: none; - text-decoration: none; - - font-size: 16px; - float: right; - margin-right: -9.5em; - margin-bottom: 0.5em; - clear: both; - left: 40em; - line-height: 1.5em; - text-align: left; -} - -.annotation { - font-style: normal; - font-weight: normal; - font-size: 12px; - padding-left: 2px; - position: relative; - top: -4px; -} - -#footnotes { - margin-top: 3em; -} - -#footnotes .annotation { - display: block; - float: left; - width: 2.5em; - clear: both; -} - -#footnotes div { - margin: 1.5em 0 0 0; -} - -#footnotes p, #footnotes ul { - margin-left: 2.5em; - font-size: 0.875em; -} - -#footnotes .permalink { - font-size: .75em; -} - -blockquote { - font-size: 0.875em; -} - -/* ============= */ -/* = Numbering = */ -/* ============= */ -.verse, .paragraph { - position:relative; -} -.anchor { - position: absolute; - margin: -0.25em -0.5em; - left: -3em; - color: #777; - font-size: 12px; - width: 2em; - text-align: center; - padding: 0.25em 0.5em; - line-height: 1.5em; -} - -.anchor:hover, #book-text .anchor:active { - color: #FFF; - background-color: #CCC; -} - -/* =================== */ -/* = Custom elements = */ -/* =================== */ -span.author { - font-size: 0.5em; - display: block; - line-height: 1.5em; - margin-bottom: 0.25em; -} - -span.collection { - font-size: 0.375em; - display: block; - line-height: 1.5em; - margin-bottom: -0.25em; -} - -span.subtitle { - font-size: 0.5em; - display: block; - line-height: 1.5em; - margin-top: -0.25em; -} - -span.translator { - font-size: 0.375em; - display: block; - line-height: 1.5em; - margin-top: 0.25em; -} - -div.didaskalia { - font-style: italic; - margin: 0.5em 0 0 1.5em; -} - -div.kwestia { - margin: 0.5em 0 0; -} - -div.stanza { - margin: 1.5em 0 0; -} - -div.kwestia div.stanza { - margin: 0; -} - -p.paragraph { - text-align: justify; - margin: 1.5em 0 0; -} - -p.motto { - text-align: justify; - font-style: italic; - margin: 1.5em 0 0; -} - -p.motto_podpis { - font-size: 0.875em; - text-align: right; -} - -div.fragment { - border-bottom: 0.1em solid #999; - padding-bottom: 1.5em; -} - -div.note p, div.dedication p, div.note p.paragraph, div.dedication p.paragraph { - text-align: right; - font-style: italic; -} - -hr.spacer { - height: 3em; - visibility: hidden; -} - -hr.spacer-line { - margin: 1.5em 0; - border: none; - border-bottom: 0.1em solid #000; -} - -p.spacer-asterisk { - padding: 0; - margin: 1.5em 0; - text-align: center; -} - -div.person-list ol { - list-style: none; - padding: 0 0 0 1.5em; -} - -p.place-and-time { - font-style: italic; -} - -em.math, em.foreign-word, em.book-title, em.didaskalia { - font-style: italic; -} - -em.author-emphasis { - letter-spacing: 0.1em; -} - -em.person { - font-style: normal; - font-variant: small-caps; -} - -.verse:after { - content: "\feff"; -} - - -/* =================================== */ -/* = Hide some elements for printing = */ -/* =================================== */ - -@media print { - #menu {display: none;} -} diff --git a/wolnelektury/static/css/master.css b/wolnelektury/static/css/master.css deleted file mode 100644 index 26c13cc71..000000000 --- a/wolnelektury/static/css/master.css +++ /dev/null @@ -1,1220 +0,0 @@ -body { - margin: 0 2em 2em 2em; - font: 70% Verdana, Arial, Helvetica, sans-serif; - line-height: 1.5em; - background: #FFF url(/static/img/bg.png) repeat-x; - color: #2F4110; -} - -#header { - margin-top: -20px; -} - -img { - border: none; -} - -a { - color: #295158; - text-decoration: none; -} - -a:hover, a:active { - text-decoration: underline; -} - -a.banner { - display: block; - white-space: nowrap; -} -a.banner:hover { - text-decoration: none; -} - -input { - font: 1em Verdana, Arial, Helvetica, sans-serif; -} - -h1 { - font: normal normal bold 1.75em Arial, sans-serif; - color: #2F4110; - margin: 0.55em 0 0 0; -} - -h2 { - font-size: 1.2em; - font-weight: bold; - color: #2F4110; - margin: 0; -} - -h3 { - font-size: 1.15em; - font-weight: bold; - margin: 2em 0 .5em 0; - color: #2F4110; -} - -em { -} - -hr { - border: 0; - border-top: 1px solid #2F4110; - margin: 2em 0; - height: 0; -} - -.clearboth { - clear: both; -} - -.blur { - color: #777; -} - -/* ================================== */ -/* = Header with logo and user-info = */ -/* ================================== */ -#header { - position: relative; - margin-top: 1.5em; -} - -#header #logo { - float: left; -} -#header #logo img { - margin-bottom: -1.25em; -} -#header a.logo { - display:block; - color: #777; -} - -#tagline { - color: #777; - position: absolute; -} - -#logo a:hover { - text-decoration: none; -} - -#header #user-info { - margin: 0 0 0 auto; - width: 40em; - text-align: right; -} - -#site-description { - margin-top: -1.5em; - height:4.5em; - overflow: hidden; - float: right; - width: 42em; - text-align: right; - color: #777; -} - -.lang-menu { - margin-right: 0.7em; - line-height: 24px; -} - -.lang-menu button { - color: blue; - border: none; - border-right: 1px solid gray; - -moz-border-radius: 2px; - background: inherit; - cursor: pointer; - padding: 0.2em 0.5em; - font-size: 10px; -} - -.lang-menu button:hover { - color: blue; - text-decoration: underline; -} - -.lang-menu button.active { - color: black; - text-decoration: none; -} - -.lang-menu button.last { - border-right: none; -} - -#lang-menu-items { - z-index: 1; -} - -/* ======================== */ -/* = Footer with sponsors = */ -/* ======================== */ -#footer { - border-top: 0.1em solid #999; - color: #777; - font-size: 0.8em; - padding-top: 0.5em; - margin: 2em 0 0 0; -} - -#footer p { - margin: 0; -} - -#footer a { - color: #999; - text-decoration: underline; -} - - -/* =============== */ -/* = Search form = */ -/* =============== */ -#search-form { - margin: 0.5em 0; - padding: 0.5em; - background-color: rgb(132, 191, 42); -} - -#searchContainer { - width: 100%; - min-height: 65px; - background-color: rgb(132, 191, 42); - padding: 0px 5px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - border-bottom: 0.15em solid #7B9C2D; - border-right: 0.15em solid #7B9C2D; -} - -#searchContainer #search-form { - padding: 0; - margin: 0; -} - -#search-form p { - margin: 0em 0 0 0; -} - -#search-form ol { - margin: 0; - padding: 0; -} - -#search-form li { - margin: 2px 0 0 5px; - padding: 0; - list-style: none; - display: block; - float: left; - /*margin-left: 5px;*/ -} - -#search-form li.category, #search-form li.book-title { - padding: 0.2em 0.5em 0.2em 0.5em; - background-color: rgb(242, 163, 15); - border: 1px solid #BA8722; - border-right: 1px solid #555; - border-bottom: 1px solid #555; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - margin-right: 0.25em; -} - -#search-form li.book-title { - background-color: #DDD; - border: 1px solid #999; - border-right: 1px solid #555; - border-bottom: 1px solid #555; -} - -#search-form input[type=submit] { - color: #444; -} - -.ac_input { - width: 300px; - border: 0; -} - -p .ac_input { - width: 28em; -} - -#searchSubmit { - float: left; - margin-top: 10px; - height: 33px; -} -/* ================== */ -/* = Search matches = */ -/* ================== */ - -.matches li:first-letter { - text-transform: uppercase; -} - -/* ============== */ -/* = Search bar = */ -/* ============== */ - -.collections a { - color: white; - margin: 0 0.5em; -} - - - -/* ============= */ -/* = Tags list = */ -/* ============= */ -#intro { - margin: 0 0 2.5em 0; -} - -#tags-description { - color: #777; - margin: 0 0.5em -0.75em 0.5em; -} - -#main-page #tags-list { - margin-right: 33%; -} - -#categories-list ul, #themes-list ul { - -moz-column-width: 12em; - -webkit-column-width: 12em; - column-width: 12em; -} - -#tags-list { - margin-top: 1em; - padding: 1em; - background-color: #FBF9E7; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - border-bottom: 0.15em solid #E3D888; - border-right: 0.15em solid #E3D888; -} - -#lesmianator #tags-list, -#tagged-object-list #tags-list, #book-detail #tags-list { - margin-left: 39em; -} - -#book-info, #categories-list { - float: left; - width: 47.5%; -} - -#themes-list { - margin-left: 52.5%; -} - -#tagged-object-list #categories-list, #book-detail #book-info { - width: 12em; -} - -#book-detail #formats .change-sets { - margin-right: 0.5em; -} -/* -#formats .wrap ul { - margin: 0; - padding: 0; -} - -#formats .wrap li { - display: block; - width: 100%; - height: 1.9em; - background-color: #F2F2F2; - border: 1px solid #EEE; - text-align: center; -} -*/ -#formats .wrap .header { - display: block; - width: 100%; - height: 1.9em; - background-color: #EEE; - border-bottom: 1px solid #EEE; - margin: 0; - padding-bottom: 2px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - color:#2F4110; - margin-top: 40px; -} - -.audiotabs span.active { - background-color:#FFF; -} - -.audiotabs span { - display: block; - height: 1.6em; - background-color:#EEE; - width: 80px; - text-align: center; - padding: 2px 0; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - color: #2F4110; - font-weight: bold; - float:left; - cursor: pointer; - border: 1px solid #DDD; -} - -#formats .wrap .header span.desc { - display: block; - height: 1.6em; - background-color: #EEE; - width: 100px; - text-align: center; - padding: 2px 0; - color: #2F4110; - font-weight: bold; - float:left; - border: solid #eee; - border-width: 1px; -} - -.audiotabs { - float: right; -} - - -#formats .wrap .online { - display: block; - width: 100%; - background-color: #EEE; - margin: 0.5em 0 1em 0; - padding: 1em 0; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - text-align: center; - font-size: 1.6em; -} - -#formats .wrap div.download { - text-align: center; - margin-bottom: 10px; -} -#formats .wrap div.download img { - padding: 0 10px 0 10px; -} - -#formats .wrap div.download .custom-pdf { - text-align: left; -} - - -#czytamysluchajac { - margin-top: 2.5em; -} - -#czytamy-sluchajac-info { - width: 400px; - height: 80px; -} - -#czytamy-sluchajac-info p { - margin-left: 170px; - padding-top: 1em; - padding-bottom: 0em; -} -div.audiobooks li { - list-style-type: none; -} - -div.audiobooks li.mp3Player { - margin-bottom: 1em; -} - -div.audiobooks { - padding: 15px; - float: left; -} - -.audiobook-list { - float: left; width: 270px; - position: relative; - left: 10px; -} - -#speaker { - float: left; - padding:5px 10px; -} - -#formats #czytamysluchajac-logo { - background: white; - text-align: left; - float: left; - width: 140px; - height: 62px; - -moz-border-radius: 0px; - -webkit-border-radius: 0px; - border-radius: 0px; - margin: 0px 20px 10px 10px; -} - -#tagged-object-list #themes-list, #book-detail #themes-list { - margin-left: 14em; -} - -#tags-list ol, #tags-list ul { - padding: 0; - margin: 0.3em 0 1.2em 0; -} - -#tags-list li { - list-style: none; - padding: 0; - margin: 0; -} - -#books-list { - width: 38em; - float: left; -} - -.all-tags { - display: none; -} - -div.shown-tags p, div.all-tags p { - margin: -1em 0 1em 0; - text-align: right; -} - -.show-all-tags, .hide-all-tags { - text-decoration: underline; - padding-right: 1em; -} - -.subcategories { - display: block; - padding-left: 2em; - padding-bottom: 0.5em; -} - - -/* ============== */ -/* = Propaganda = */ -/* ============== */ -#propaganda { - float: right; - width: 30%; - margin: 0; - padding: 2em 0.5em 0.5em; -} - - -/* ===================== */ -/* = Other info = */ -/* ===================== */ -#latest-blog-posts { - padding: 0.5em; - float: left; - width: 30%; -} - -#latest-blog-posts ol { - padding: 0 0 0 1.5em; - margin: 1em 0 0 0; - list-style-type: square; - color: #D13628; -} - -#you-can-help { - float: right; - padding: 0.5em; - width: 30%; -} - -#about-us { - padding: 0.5em; - margin-left: 35%; - margin-right: 35%; -} - -/* =============== */ -/* = Description = */ -/* =============== */ -#description { - margin-top: 0.5em; - overflow: hidden; -} -#description-short { - display:none; -} - -#description .meta { - margin: 0.5em; - width: 18em; - list-style: none; - float: right; -} - -#description dt { - font-weight: bold; - display: inline; -} - -#description dd { - margin: 0; - display: inline; -} - -#toggle-description, #tagged-object-list .pagination, #book-detail .pagination { - width: 100%; - height: 1.5em; - background-color: #EEE; - margin-top: 0.5em; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - text-align: center; -} - -#toggle-description p { - margin: 0; - padding: 0; - color: #999; -} - -#download-shelf { - display: block; - width: 100%; - height: 1.5em; - background-color: #EEE; - margin-top: 0.5em; - padding: 0.5em 0; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - text-align: center; - outline: none; -} - -#download-shelf-menu { - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - border: 3px solid #EEE; - padding: 5px; - margin-top: -5px; -} - -#download-formats-form li { - float: left; - height: 2em; -} - -#download-formats-form input { - float: left; -} - -#download-formats-form label { - display: block; - background-color: #EEE; - float: left; - width: 8em; - margin-right: 0.5em; - margin-top: -0.5em; - padding-top: 0.5em; - padding-bottom: 0.75em; -} - -#download-formats-form li { - margin: 0; - padding: 0; - list-style: none; -} - -#download-formats-form em { - color: #999; - background-color: #FFF; -} - -#download-formats-form em strong { - color: #000; - font-weight: normal; -} - -#download-formats-form-submit { - margin-left: 0.5em; - -} - -#download-formats-form #download-formats-form-submit-li { - margin-top: 0.75em; -} - -#download-formats-form-cancel { - color: #900; -} - -#toggle-share-shelf { - display: block; - width: 100%; - height: 1.5em; - background-color: #EEE; - margin-top: 0.5em; - padding: 0.5em 0; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - text-align: center; - outline: none; -} -#toggle-share-shelf p { - margin:0; -} - -#share-shelf { - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - border: 3px solid #EEE; - padding: 5px; - margin-top: -5px; -} -#share-shelf input { - width: 100%; -} - - -/* ============================ */ -/* = Books and fragments list = */ -/* ============================ */ -#books-list { - margin: 0; -} - -#books-list ol { - list-style: none; - padding: 0; - margin: 1.5em 0; -} - -.book { - padding: 0.5em; - background-color: #FFF; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; -} - -.fragment { - border-bottom: 0.1em solid #EEE; - margin-top: 0.5em; -} - -.fragment-text, .fragment-short-text { - padding: 0.5em; - background-color: #FFF; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; -} - -.fragment-metadata { - padding: 0.5em 0.5em 1.5em 0.5em; - float: right; -} - -.change-sets { - float: right; -} - -.change-sets a { - padding: 0.2em; - margin: 0.3em; - border: 0.1em solid #EEE; - background-color: #F9F9F9; -} - -.book-description { - margin-left: 3.5em; -} - -.book-thumbnail, .book-parent-thumbnail { - background: transparent url(/static/img/book.png) no-repeat 0 0; - width: 3em; - height: 3em; - float: left; -} - -.book-parent-thumbnail { - background: transparent url(/static/img/book-parent.png) no-repeat 0 0; -} - - -/* =============== */ -/* = Simple form = */ -/* =============== */ -.cuteform ol, .cuteform ul { - padding: 0; - margin: 0; - list-style: none; -} - -.cuteform ol li, .cuteform ul li { - margin-top: 0.7em; -} - -.cuteform label { - display: block; -} - -.cuteform span.help-text { - display: block; - font-size: 0.8em; - color: #999; -} - -.cuteform .error { - color: #BF3024; - display: block; -} - -/* ================ */ -/* = Modal Window = */ -/* ================ */ -.jqmOverlay { background-color: #000; } - -#set-window { - position: absolute; - display: none; - width: 32em; - background-color: transparent; - margin-top: -0.5em; - margin-left: -1em; -} - -#set-window div.header { - background-color: #FFF; - border-right: 0.25em solid #DDD; - width: 4em; - padding: 0.5em 1em 0.5em 1em; -} - -#set-window div.target { - background-color: #FFF; - border-right: 0.3em solid #DDD; - border-bottom: 0.3em solid #DDD; - padding: 1em; -} - -#login-register-window { - position: absolute; - display: none; - width: 24em; - background-color: transparent; - margin-top: -0.5em; - margin-left: 1em; -} - -#login-register-window div.header { - background-color: #FFF; - border-right: 0.3em solid #DDD; - width: 4em; - right: 0; - left: auto; - padding: 0.5em 1em 0.5em 1em; - float: right; - text-align: center; -} - -#login-register-window div.target { - clear: both; - background-color: #FFF; - border-right: 0.3em solid #DDD; - border-bottom: 0.3em solid #DDD; - padding: 1em; -} - -#user-shelves-window { - position: absolute; - display: none; - width: 28em; - background-color: transparent; - margin-top: -0.5em; - margin-left: 1em; -} - -#user-shelves-window div.header { - background-color: #FFF; - border-right: 0.3em solid #DDD; - width: 4em; - right: 0; - left: auto; - padding: 0.5em 1em 0.5em 1em; - float: right; - text-align: center; -} - -#user-shelves-window div.target { - clear: both; - background-color: #FFF; - border-right: 0.3em solid #DDD; - border-bottom: 0.3em solid #DDD; - padding: 1em; -} - -.shelf-list { - list-style: none; - padding: 0; -} - -.shelf-list li { - padding: 0.25em; - margin: 0 -0.25em; -} - -.shelf-list a.delete-shelf { - color: #900; - float: right; - padding: 0.25em 0.25em 0.25em 1em; - margin: -0.25em; -} - -.shelf-list a.delete-shelf:active, .shelf-list a.delete-shelf:hover { - color: #FFF; - background-color: #900; - text-decoration: none; -} - -#suggest-window { - position: absolute; - display: none; - width: 35em; - background-color: transparent; - margin-top: -0.5em; - margin-left: 1em; -} - -#suggest-window div.header { - background-color: #FFF; - border-right: 0.3em solid #DDD; - width: 4em; - right: 0; - left: auto; - padding: 0.5em 1em 0.5em 1em; - float: right; - text-align: center; -} - -#suggest-window div.target { - clear: both; - background-color: #FFF; - border-right: 0.3em solid #DDD; - border-bottom: 0.3em solid #DDD; - padding: 1em; -} -#suggest-form textarea { - width: 30em; -} - - -.big-top-link { - margin-top: .6em; - font-size: 2em; - /*max-width: 15em;*/ - line-height: 1.2em; -} - -#suggest-publishing-window { - position: absolute; - display: none; - width: 45em; - background-color: transparent; - margin-top: -0.5em; - margin-left: 1em; -} - -#suggest-publishing-window div.header { - background-color: #FFF; - border-right: 0.3em solid #DDD; - width: 4em; - right: 0; - left: auto; - padding: 0.5em 1em 0.5em 1em; - float: right; - text-align: center; -} - -#suggest-publishing-window div.target { - clear: both; - background-color: #FFF; - border-right: 0.3em solid #DDD; - border-bottom: 0.3em solid #DDD; - padding: 1em; -} -#suggest-publishing-form textarea { - width: 40em; - height: 6em; -} - -/* ======================== */ -/* = Alphabetic book list = */ -/* ======================== */ -#book-list { - padding-left: 50px; -} -#book-list-nav { - position: absolute; - right: 50px; - width: 200px; - border-left: 1px #cfcfcf solid; - padding: 10px; - font-size: 1.2em; -} - -#book-list-nav ul { - list-style-type: none; - margin: 5px; - padding: 0; -} - -.book-list-show-index { - display: none; - margin: 0; - padding: 0; -} - - -#book-a-list #book-list ol { - padding-left: 1em; - margin: 0.3em 0 1.2em 0; - list-style: none; -} - -#book-a-list #book-list h2 a { - color: black; -} - -#book-list-up { - position: fixed; - bottom: 50px; - right: 50px; - border-left: 1px #cfcfcf solid; - padding: 10px; - background-color: white; -} - -#top-message { - background-color: #2F4110; - color: #FFF; - margin: 0 -2em; - padding: 0 2.5em; - line-height: 2em; -} - -#top-message a { - color: #AAA; -} - - -/* =========== */ -/* = Columns = */ -/* =========== */ -.column-left { - width: 37em; - float: left; - margin-top: 1em; -} - -.column-right { - margin-left: 40em; - margin-top: 1em; -} - -.see-more { - text-align: right; -} - -.remove-from-shelf { - float: right; - padding: 0.2em; - margin: 0.3em; - color: #900; -} - -.remove-from-shelf:active, .remove-from-shelf:hover { - color: #FFF; - background-color: #900; - text-decoration: none; -} - -/* =========== */ -/* = Lessons = */ -/* =========== */ -#lessons { - margin-top: 2.5em; -} - -#document-list { - width: 380px; - float: left; -} - -#document-list ol { - margin: 0; - padding: 0; - list-style: none; -} - -#document-list li a { - padding: 0.5em; - background-color: #FFF; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; -/* font-size: 1.2em;*/ - font-weight: bold; - width: 330px; - margin-bottom: 0.25em; - display: block; -} - -#document-list ul { - padding-left: 30px; - list-style: disc; -} - -#document-list li { - padding: 5px; -} - -#document-list li li a { - width: 300px; -} - -#document-list li a:hover, #document-list li a.active { - text-decoration: none; - background-color: #EEE; -} - -#document-list-body #document-detail { - margin-left: 390px; -} - -#document-detail { - width: 480px; -} - -#document-detail h2 { - margin: 0.75em 0 0.75em 0; -} - -#document-list-body #document-detail .download { - float: right; - margin: 0; - padding: 0 -} - -#document-list .download-doc { - display: none; - color: #00F; -} - -/* ====================== */ -/* = One percent banner = */ -/* ====================== */ -#onepercent-banner { - color: #FFF; - margin: 0 -1.1em; - padding: 0 1.1em; - vertical-align: middle; - background-color: #FF6B3C; - height: 60px; - font-size: 1.8em; - line-height: 1.5em; - position: relative; -} - -#onepercent-text, #onepercent-line:visited, #onepercent-text:hover, #onepercent-text:active { - display: block; - line-height: 60px; - color: #FFF; - text-decoration: none; -} - -#onepercent-text strong { - font-weight: normal; - text-decoration: underline; -} - -#onepercent-see-more, #onepercent-see-more:visited, #onepercent-see-more:hover, #onepercent-see-more:active { - position: absolute; - right: 2em; - width: 9em; - text-align: right; - bottom: 0; - font-size: 12px; - color: #FFF; - text-decoration: none; -} - -#createNewShelf { - display: none; -} - -.widget-code { - overflow: hidden; -} - -#presentation-frame { - border: 0px none white; -} - - -/* dictionary */ - -.dictionary-note-source { - margin-top: -1em; -} - -#footnotes .pagination { - margin-top: 1em; -} - - -/* report */ -.stats td { - vertical-align: top; -} - -/* ============ */ -/* = Pictures = */ -/* ============ */ - - -#picture-list .picture .title { - font-weight: bold; -} - -#picture-list .picture { - background-color: white; - padding: 0.8em; - margin: 0.8em; - border: black 1px solid; - width: 600px; -} - diff --git a/wolnelektury/static/css/master.plain.css b/wolnelektury/static/css/master.plain.css deleted file mode 100644 index 62888a4dc..000000000 --- a/wolnelektury/static/css/master.plain.css +++ /dev/null @@ -1,125 +0,0 @@ -/* =================================================== */ -/* = Common elements: headings, paragraphs and lines = */ -/* =================================================== */ -.fragment h1 { - font-size: 3em; - margin: 1.5em 0; - text-align: center; - line-height: 1.5em; - font-weight: bold; -} - -.fragment h2 { - font-size: 2em; - margin: 1.5em 0 0; - font-weight: bold; - line-height: 1.5em; -} - -.fragment h3 { - font-size: 1.5em; - margin: 1.5em 0 0; - font-weight: normal; - line-height: 1.5em; -} - -.fragment h4 { - font-size: 1em; - margin: 1.5em 0 0; - line-height: 1.5em; -} - -.fragment p { - margin: 0; -} - -/* ======================== */ -/* = Footnotes and themes = */ -/* ======================== */ -.theme-begin { - display: none; -} - -.annotation { - display: none; -} - - -/* ============= */ -/* = Numbering = */ -/* ============= */ -.anchor { - display: none; -} - - -/* =================== */ -/* = Custom elements = */ -/* =================== */ -span.author { - font-size: 0.75em; - display: block; - line-height: 1.5em; - margin-bottom: 0.25em; -} - -span.collection { - font-size: 0.75em; - display: block; - line-height: 1.5em; - margin-bottom: -0.25em; -} - -span.subtitle { - font-size: 0.75em; - display: block; - line-height: 1.5em; - margin-top: -0.25em; -} - -div.didaskalia { - font-style: italic; - margin: 0.5em 0 0; -} - -div.kwestia { - margin: 0.5em 0 0; -} - -div.stanza { - margin: 1.5em 0 0; -} - -div.kwestia div.stanza { - margin: 0; -} - -p.paragraph { - text-align: justify; - margin: 1.5em 0 0; -} - -p.motto { - text-align: justify; - font-style: italic; - margin: 1.5em 0 0; -} - -p.motto_podpis { - font-size: 0.875em; -} - -/*div.fragment { - border-bottom: 0.1em solid #999; - padding-bottom: 1.5em; -}*/ - -div.note p, div.note p.paragraph { - text-align: right; - font-style: italic; -} - -hr.spacer { - height: 3em; - visibility: hidden; -} diff --git a/wolnelektury/static/css/picture_box.css b/wolnelektury/static/css/picture_box.css deleted file mode 100755 index 06f3e62c8..000000000 --- a/wolnelektury/static/css/picture_box.css +++ /dev/null @@ -1,90 +0,0 @@ -.picture-mini-box, .picture-box { - display: inline-block; - margin: 0; - vertical-align: top; -} - - -.picture-box { - width: 37.5em; -} - -.picture-mini-box { - width: 12.5em; -} - -.picture-mini-box a, .picture-box-inner { - display: block; - color: black; - border: 1px solid #ddd; - height: 20em; - padding: .75em; - margin: .1em; - background: #fff; - -moz-box-shadow: 2px 2px 2px #ddd; - -webkit-box-shadow: 2px 2px 2px #ddd; - box-shadow: 2px 2px 2px #ddd; - overflow: hidden; -} - -.picture-mini-box a { - height: 20em; - margin: .1em; -} -.picture-box-inner { - height: 14.4em; - margin: .5em; -} - -.picture-mini-box img, .picture-box img { - width: 10.8em; - height: 14.4em; -} -.picture-mini-box img { - margin-bottom: .3em; -} -.picture-box img { - float: left; - margin-right: 1.5em; -} - -.picture-mini-box .author { - color: #777; -} - - -.picture-box-body { - height: 13em; - overflow: hidden; -} -.picture-box-head { - min-height: 7em; -} -.picture-box-tag { - font-size: .8em; - margin-right: .5em; -} -.picture-box-download { - position: relative; -} -.picture-box-formats { - display: none; - top: -2em; - position: absolute; - height: 2em; - width: 100em; -} -.picture-box-formats a { - margin-right: 1em; -} -.picture-box-download:hover .picture-box-formats { - display: block; -} - -.picture-box-tools a:before { - content: "⇩"; - font-family: WL-Nav; - font-size: 2em; - margin-right: .25em; - vertical-align: middle; -} diff --git a/wolnelektury/static/css/player.css b/wolnelektury/static/css/player.css deleted file mode 100644 index c449803e5..000000000 --- a/wolnelektury/static/css/player.css +++ /dev/null @@ -1,17 +0,0 @@ -#player h1 { - font-size: 2em; - margin: .5em; -} - -.player-info { - margin: 1em; -} - - -.play { - cursor: pointer; -} - -.play:hover { - color: #0D7E85; -} diff --git a/wolnelektury/static/css/s5/framing.css b/wolnelektury/static/css/s5/framing.css deleted file mode 100644 index 14d8509e9..000000000 --- a/wolnelektury/static/css/s5/framing.css +++ /dev/null @@ -1,23 +0,0 @@ -/* The following styles size, place, and layer the slide components. - Edit these if you want to change the overall slide layout. - The commented lines can be uncommented (and modified, if necessary) - to help you with the rearrangement process. */ - -/* target = 1024x768 */ - -div#header, div#footer, .slide {width: 100%; top: 0; left: 0;} -div#header {top: 0; height: 3em; z-index: 1;} -div#footer {top: auto; bottom: 0; height: 2.5em; z-index: 5;} -.slide {top: 0; width: 92%; padding: 3.5em 4% 4%; z-index: 2; list-style: none;} -div#controls {left: 50%; bottom: 0; width: 50%; z-index: 100;} -div#controls form {position: absolute; bottom: 0; right: 0; width: 100%; - margin: 0;} -#currentSlide {position: absolute; width: 10%; left: 45%; bottom: 1em; z-index: 10;} -html>body #currentSlide {position: fixed;} - -/* -div#header {background: #FCC;} -div#footer {background: #CCF;} -div#controls {background: #BBD;} -div#currentSlide {background: #FFC;} -*/ diff --git a/wolnelektury/static/css/s5/opera.css b/wolnelektury/static/css/s5/opera.css deleted file mode 100644 index 9e9d2a3c5..000000000 --- a/wolnelektury/static/css/s5/opera.css +++ /dev/null @@ -1,7 +0,0 @@ -/* DO NOT CHANGE THESE unless you really want to break Opera Show */ -.slide { - visibility: visible !important; - position: static !important; - page-break-before: always; -} -#slide0 {page-break-before: avoid;} diff --git a/wolnelektury/static/css/s5/outline.css b/wolnelektury/static/css/s5/outline.css deleted file mode 100644 index 14f6bc48f..000000000 --- a/wolnelektury/static/css/s5/outline.css +++ /dev/null @@ -1,16 +0,0 @@ -/* don't change this unless you want the layout stuff to show up in the outline view! */ - -.layout div, #footer *, #controlForm * {display: none;} -#footer, #controls, #controlForm, #navLinks, #toggle { - display: block; visibility: visible; margin: 0; padding: 0;} -#toggle {float: right; padding: 0.5em;} -html>body #toggle {position: fixed; top: 0; right: 0;} - -/* making the outline look pretty-ish */ - -#slide0 h1, #slide0 h2, #slide0 h3, #slide0 h4 {border: none; margin: 0;} -#slide0 h1 {padding-top: 1.5em;} -.slide h1 {margin: 1.5em 0 0; padding-top: 0.25em; - border-top: 1px solid #888; border-bottom: 1px solid #AAA;} -#toggle {border: 1px solid; border-width: 0 0 1px 1px; background: #FFF;} -#presentation { text-align: center; } diff --git a/wolnelektury/static/css/s5/pretty.css b/wolnelektury/static/css/s5/pretty.css deleted file mode 100644 index ab0dbeec4..000000000 --- a/wolnelektury/static/css/s5/pretty.css +++ /dev/null @@ -1,86 +0,0 @@ -/* Following are the presentation styles -- edit away! */ - -body {background: #FFF url(bodybg.gif) -16px 0 no-repeat; color: #000; font-size: 2em;} -:link, :visited {text-decoration: none; color: #00C;} -#controls :active {color: #88A !important;} -#controls :focus {outline: 1px dotted #227;} -h1, h2, h3, h4 {font-size: 100%; margin: 0; padding: 0; font-weight: inherit;} -ul, pre {margin: 0; line-height: 1em;} -html, body {margin: 0; padding: 0;} - -blockquote, q {font-style: italic;} -blockquote {padding: 0 2em 0.5em; margin: 0 1.5em 0.5em; text-align: center; font-size: 1em;} -blockquote p {margin: 0;} -blockquote i {font-style: normal;} -blockquote b {display: block; margin-top: 0.5em; font-weight: normal; font-size: smaller; font-style: normal;} -blockquote b i {font-style: italic;} - -kbd {font-weight: bold; font-size: 1em;} -sup {font-size: smaller; line-height: 1px;} - -.slide code {padding: 2px 0.25em; font-weight: bold; color: #533;} -.slide code.bad, code del {color: red;} -.slide code.old {color: silver;} -.slide pre {padding: 0; margin: 0.25em 0 0.5em 0.5em; color: #533; font-size: 90%;} -.slide pre code {display: block;} -.slide ul {margin-left: 5%; margin-right: 7%; list-style: disc;} -.slide li {margin-top: 0.75em; margin-right: 0;} -.slide ul ul {line-height: 1;} -.slide ul ul li {margin: .2em; font-size: 85%; list-style: square;} -.slide img.leader {display: block; margin: 0 auto;} - -div#header, div#footer {background: #ffffff; color: black; - font-family: Verdana, Helvetica, sans-serif;} -div#header {background: #ffffff - line-height: 1px;} -div#footer {font-size: 0.5em; font-weight: bold; padding: 1em 0;} -#footer h1, #footer h2 {display: block; padding: 0 1em;} -#footer h2 {font-style: italic;} - -div.long {font-size: 0.75em;} -.slide h1 {position: absolute; top: 0.7em; left: 87px; z-index: 1; - margin: 0; padding: 0.3em 0 0 50px; white-space: nowrap; - font: bold 150%/1em Helvetica, sans-serif; text-transform: capitalize; - color: #DDE; background: #005;} -.slide h3 {font-size: 130%;} -h1 abbr {font-variant: small-caps;} - -div#controls {position: absolute; left: 50%; bottom: 0; - width: 50%; - text-align: right; font: bold 0.9em Verdana, Helvetica, sans-serif;} -html>body div#controls {position: absolute; padding: 0 0 1em 0; - top: auto; left:0; width:500px;} -div#controls form {position: absolute; bottom: 0; right: 0; width: 100%; - margin: 0; padding: 0;} -#controls #navLinks a {padding: 0; margin: 0 0.5em; - background: #005; border: none; color: #779; - cursor: pointer;} -#controls #navList {height: 1em;} -#controls #navList #jumplist {position: absolute; bottom: 0; left: 10px; background: #DDD; color: #227; width: 300px;} - -#currentSlide {text-align: center; font-size: 0.5em; color: #449;} - -#slide0 {padding-top: 3.5em; font-size: 90%;} -#slide0 h1 {position: static; margin: 1em 0 0; padding: 0; - font: bold 2em Helvetica, sans-serif; white-space: normal; - color: #000; background: transparent;} -#slide0 h2 {font: bold italic 1em Helvetica, sans-serif; margin: 0.25em;} -#slide0 h3 {margin-top: 1.5em; font-size: 1.5em;} -#slide0 h4 {margin-top: 0; font-size: 1em;} - -ul.urls {list-style: none; display: inline; margin: 0;} -.urls li {display: inline; margin: 0;} -.note {display: none;} -.external {border-bottom: 1px dotted gray;} -html>body .external {border-bottom: none;} -.external:after {content: " \274F"; font-size: smaller; color: #77B;} - -.incremental, .incremental *, .incremental *:after {color: #DDE; visibility: visible;} -img.incremental {visibility: hidden;} -.slide .current {color: #B02;} - - -/* diagnostics - -li:after {content: " [" attr(class) "]"; color: #F88;} - */ diff --git a/wolnelektury/static/css/s5/print.css b/wolnelektury/static/css/s5/print.css deleted file mode 100644 index e7a71d145..000000000 --- a/wolnelektury/static/css/s5/print.css +++ /dev/null @@ -1 +0,0 @@ -/* The following rule is necessary to have all slides appear in print! DO NOT REMOVE IT! */ .slide, ul {page-break-inside: avoid; visibility: visible !important;} h1 {page-break-after: avoid;} body {font-size: 12pt; background: white;} * {color: black;} #slide0 h1 {font-size: 200%; border: none; margin: 0.5em 0 0.25em;} #slide0 h3 {margin: 0; padding: 0;} #slide0 h4 {margin: 0 0 0.5em; padding: 0;} #slide0 {margin-bottom: 3em;} h1 {border-top: 2pt solid gray; border-bottom: 1px dotted silver;} .extra {background: transparent !important;} div.extra, pre.extra, .example {font-size: 10pt; color: #333;} ul.extra a {font-weight: bold;} p.example {display: none;} #header {display: none;} #footer h1 {margin: 0; border-bottom: 1px solid; color: gray; font-style: italic;} #footer h2, #controls {display: none;} /* The following rule keeps the layout stuff out of print. Remove at your own risk! */ .layout, .layout * {display: none !important;} \ No newline at end of file diff --git a/wolnelektury/static/css/s5/s5-core.css b/wolnelektury/static/css/s5/s5-core.css deleted file mode 100644 index 86444e041..000000000 --- a/wolnelektury/static/css/s5/s5-core.css +++ /dev/null @@ -1,9 +0,0 @@ -/* Do not edit or override these styles! The system will likely break if you do. */ - -div#header, div#footer, div#controls, .slide {position: absolute;} -html>body div#header, html>body div#footer, - html>body div#controls, html>body .slide {position: fixed;} -.handout {display: none;} -.layout {display: block;} -.slide, .hideme, .incremental {visibility: hidden;} -#slide0 {visibility: visible;} diff --git a/wolnelektury/static/css/s5/slides.css b/wolnelektury/static/css/s5/slides.css deleted file mode 100644 index 0786d7dbd..000000000 --- a/wolnelektury/static/css/s5/slides.css +++ /dev/null @@ -1,3 +0,0 @@ -@import url(s5-core.css); /* required to make the slide show run at all */ -@import url(framing.css); /* sets basic placement and size of slide components */ -@import url(pretty.css); /* stuff that makes the slides look better than blah */ \ No newline at end of file diff --git a/wolnelektury/static/css/screen.css b/wolnelektury/static/css/screen.css deleted file mode 100644 index ca00e972c..000000000 --- a/wolnelektury/static/css/screen.css +++ /dev/null @@ -1,137 +0,0 @@ -.left-column { - width: 47em; - float: left; -} -.right-column { - float:right; - width: 47em; -} - -.hidden-box ul { - width: 48em; -} - -#header-content, div#main-content, div#half-header-content, #footer-content { - width: 97.5em; - margin: auto; -} - -#promo-box { - float: right; - margin-top: -5.1em; -} - -#promo-box-body { - height: 30em; -} - -#big-cite .vip { - float:left; - text-align:right; - width: 14.7em; -} - -#big-cite .cite-body { - margin-left: 17.5em; -} - -#big-cite .source { - margin-left: 17.5em; -} - - -.book-wide-box { - width: 97.5em; -} -.book-wide-box .book-box-body { - width: 38.2em; -} - - -#tagged-object-list .left-column, #tagged-object-list .right-column { - width: 48em; -} - - - - -.inline-body { - width: 35em; -} - - -.search-result { - width: 97.5em; -} - - -.book-list-header { - width: 97.5em; -} - -.book-wide-box .right-column { - width: 41.5em; - margin-top: -23em; -} - -.book-wide-box #theme-list-wrapper { - margin-bottom: 0; -} - -.snippets { - width: 44em; - float: right; - margin-top: -20em; -} - - -/* HEADER */ - -#header { - height: 3em; -} - -#logo { - position: absolute; - top: 0; -} - -#user-info { - float: right; - padding: 0 !important; - margin-left: 0; -} - -#tagline { - display: inline-block; - margin-left: 25.5em; -} - -#search-area { - margin-left: 24em; - width: 73.5em; -} - -#search-field { - width: 63.1em; - padding-right: 0 !important; -} - -#search { - width: 47.47em; -} - -#search-button { - float: right; -} - - -/* Book list */ - -#book-list-nav { - border-left: 1px solid #CFCFCF; - padding: .75em; - position: absolute; - right: 4em; - width: 25em; -} \ No newline at end of file diff --git a/wolnelektury/static/css/simple.css b/wolnelektury/static/css/simple.css deleted file mode 100755 index 6b8a54cc9..000000000 --- a/wolnelektury/static/css/simple.css +++ /dev/null @@ -1,73 +0,0 @@ -html { - margin: 0; -} - -body { - margin: 0; - padding: 1em; - color: #2F4110; - background: #FFF url(/static/img/bg.png) repeat-x; - font-size: .75em; - font-family: Verdana,Arial,Helvetica,sans-serif; -} - - - -#body { - margin-top: 2em; -/* - max-width: 900px; - margin:auto; -*/ - margin-left: 400px; -} - -#logo { - float: left; - margin-left: 100px; - margin-top: 4em; -} - -h1 { - font: bold 2.2em Arial,sans-serif; - padding-top: .7em; - margin-bottom: .2em; -} - - -h2 { - font-size: 1.1em; - margin:0; -} - -a { - color: #295158; - text-decoration: none; -} - - -.plain li { - list-style: none; -} - -li { - margin: 1em; -} - -.clr { - clear: both; -} - - -.more { - text-align: right; -} - -table { - margin-top: 1em; -} - -th { - font-weight: normal; - text-align: left; -} diff --git a/wolnelektury/static/css/social/shelf_tags.css b/wolnelektury/static/css/social/shelf_tags.css deleted file mode 100755 index 8843af684..000000000 --- a/wolnelektury/static/css/social/shelf_tags.css +++ /dev/null @@ -1,36 +0,0 @@ -.social-shelf-tags { - list-style: none; - padding: 0; - margin: 1em 0; - width: 30em; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - position:absolute; - margin-left: 15.4em; - top: 13.5em; - padding: .5em 0; - background: #fff; -} - -.social-shelf-tags li { - display: inline-block; - margin-right:1em; - margin-bottom: .5em; -} - -.social-shelf-tags a { - display: block; - padding: .3em 1em; - background: #ABDADE; - color: #08646b; - border-radius: 1em; -} - - -.social-shelf-tags:hover { - overflow: visible; - text-overflow: ellipsis; - white-space: normal; - z-index: 1000; -} diff --git a/wolnelektury/static/css/sponsors.css b/wolnelektury/static/css/sponsors.css deleted file mode 100644 index 16643dfd4..000000000 --- a/wolnelektury/static/css/sponsors.css +++ /dev/null @@ -1,17 +0,0 @@ -.sponsors-page { - background: white; - margin-top: 1em; -} - -.sponsors-column { - float: left; - width: 150px; -} - -.sponsor-logos { - height: 130px; -} - -.sponsors-page img { - float: left; -} diff --git a/wolnelektury/static/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/wolnelektury/static/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png deleted file mode 100644 index 954e22dbd..000000000 Binary files a/wolnelektury/static/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png and /dev/null differ diff --git a/wolnelektury/static/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png b/wolnelektury/static/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png deleted file mode 100644 index 64ece5707..000000000 Binary files a/wolnelektury/static/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png and /dev/null differ diff --git a/wolnelektury/static/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png b/wolnelektury/static/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png deleted file mode 100644 index abdc01082..000000000 Binary files a/wolnelektury/static/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png and /dev/null differ diff --git a/wolnelektury/static/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png b/wolnelektury/static/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png deleted file mode 100644 index 9b383f4d2..000000000 Binary files a/wolnelektury/static/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png and /dev/null differ diff --git a/wolnelektury/static/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png b/wolnelektury/static/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png deleted file mode 100644 index a23baad25..000000000 Binary files a/wolnelektury/static/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png and /dev/null differ diff --git a/wolnelektury/static/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png b/wolnelektury/static/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png deleted file mode 100644 index 42ccba269..000000000 Binary files a/wolnelektury/static/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png and /dev/null differ diff --git a/wolnelektury/static/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/wolnelektury/static/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png deleted file mode 100644 index 1b1972b56..000000000 Binary files a/wolnelektury/static/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png and /dev/null differ diff --git a/wolnelektury/static/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/wolnelektury/static/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png deleted file mode 100644 index f1273672d..000000000 Binary files a/wolnelektury/static/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png and /dev/null differ diff --git a/wolnelektury/static/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/wolnelektury/static/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png deleted file mode 100644 index 359397acf..000000000 Binary files a/wolnelektury/static/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png and /dev/null differ diff --git a/wolnelektury/static/css/ui-lightness/images/ui-icons_222222_256x240.png b/wolnelektury/static/css/ui-lightness/images/ui-icons_222222_256x240.png deleted file mode 100644 index b273ff111..000000000 Binary files a/wolnelektury/static/css/ui-lightness/images/ui-icons_222222_256x240.png and /dev/null differ diff --git a/wolnelektury/static/css/ui-lightness/images/ui-icons_228ef1_256x240.png b/wolnelektury/static/css/ui-lightness/images/ui-icons_228ef1_256x240.png deleted file mode 100644 index a641a371a..000000000 Binary files a/wolnelektury/static/css/ui-lightness/images/ui-icons_228ef1_256x240.png and /dev/null differ diff --git a/wolnelektury/static/css/ui-lightness/images/ui-icons_ef8c08_256x240.png b/wolnelektury/static/css/ui-lightness/images/ui-icons_ef8c08_256x240.png deleted file mode 100644 index 85e63e9f6..000000000 Binary files a/wolnelektury/static/css/ui-lightness/images/ui-icons_ef8c08_256x240.png and /dev/null differ diff --git a/wolnelektury/static/css/ui-lightness/images/ui-icons_ffd27a_256x240.png b/wolnelektury/static/css/ui-lightness/images/ui-icons_ffd27a_256x240.png deleted file mode 100644 index e117effa3..000000000 Binary files a/wolnelektury/static/css/ui-lightness/images/ui-icons_ffd27a_256x240.png and /dev/null differ diff --git a/wolnelektury/static/css/ui-lightness/images/ui-icons_ffffff_256x240.png b/wolnelektury/static/css/ui-lightness/images/ui-icons_ffffff_256x240.png deleted file mode 100644 index 42f8f992c..000000000 Binary files a/wolnelektury/static/css/ui-lightness/images/ui-icons_ffffff_256x240.png and /dev/null differ diff --git a/wolnelektury/static/css/ui-lightness/jquery-ui-1.8.16.custom.css b/wolnelektury/static/css/ui-lightness/jquery-ui-1.8.16.custom.css deleted file mode 100644 index da10fff71..000000000 --- a/wolnelektury/static/css/ui-lightness/jquery-ui-1.8.16.custom.css +++ /dev/null @@ -1,342 +0,0 @@ -/* - * jQuery UI CSS Framework 1.8.16 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Theming/API - */ - -/* Layout helpers -----------------------------------*/ -.ui-helper-hidden { display: none; } -.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } -.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } -.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } -.ui-helper-clearfix { display: inline-block; } -/* required comment for clearfix to work in Opera \*/ -* html .ui-helper-clearfix { height:1%; } -.ui-helper-clearfix { display:block; } -/* end clearfix */ -.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } - - -/* Interaction Cues -----------------------------------*/ -.ui-state-disabled { cursor: default !important; } - - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } - - -/* Misc visuals -----------------------------------*/ - -/* Overlays */ -.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } - - -/* - * jQuery UI CSS Framework 1.8.16 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Theming/API - * - * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px - */ - - -/* Component containers -----------------------------------*/ -.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; } -.ui-widget .ui-widget { font-size: 1em; } -.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } -.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } -.ui-widget-content a { color: #333333; } -.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } -.ui-widget-header a { color: #ffffff; } - -/* Interaction states -----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; } -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } -.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; } -.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; } -.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; } -.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; } -.ui-widget :active { outline: none; } - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } -.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } -.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } -.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } -.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } -.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } -.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); } -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } -.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } -.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); } -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); } - -/* positioning */ -.ui-icon-carat-1-n { background-position: 0 0; } -.ui-icon-carat-1-ne { background-position: -16px 0; } -.ui-icon-carat-1-e { background-position: -32px 0; } -.ui-icon-carat-1-se { background-position: -48px 0; } -.ui-icon-carat-1-s { background-position: -64px 0; } -.ui-icon-carat-1-sw { background-position: -80px 0; } -.ui-icon-carat-1-w { background-position: -96px 0; } -.ui-icon-carat-1-nw { background-position: -112px 0; } -.ui-icon-carat-2-n-s { background-position: -128px 0; } -.ui-icon-carat-2-e-w { background-position: -144px 0; } -.ui-icon-triangle-1-n { background-position: 0 -16px; } -.ui-icon-triangle-1-ne { background-position: -16px -16px; } -.ui-icon-triangle-1-e { background-position: -32px -16px; } -.ui-icon-triangle-1-se { background-position: -48px -16px; } -.ui-icon-triangle-1-s { background-position: -64px -16px; } -.ui-icon-triangle-1-sw { background-position: -80px -16px; } -.ui-icon-triangle-1-w { background-position: -96px -16px; } -.ui-icon-triangle-1-nw { background-position: -112px -16px; } -.ui-icon-triangle-2-n-s { background-position: -128px -16px; } -.ui-icon-triangle-2-e-w { background-position: -144px -16px; } -.ui-icon-arrow-1-n { background-position: 0 -32px; } -.ui-icon-arrow-1-ne { background-position: -16px -32px; } -.ui-icon-arrow-1-e { background-position: -32px -32px; } -.ui-icon-arrow-1-se { background-position: -48px -32px; } -.ui-icon-arrow-1-s { background-position: -64px -32px; } -.ui-icon-arrow-1-sw { background-position: -80px -32px; } -.ui-icon-arrow-1-w { background-position: -96px -32px; } -.ui-icon-arrow-1-nw { background-position: -112px -32px; } -.ui-icon-arrow-2-n-s { background-position: -128px -32px; } -.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } -.ui-icon-arrow-2-e-w { background-position: -160px -32px; } -.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } -.ui-icon-arrowstop-1-n { background-position: -192px -32px; } -.ui-icon-arrowstop-1-e { background-position: -208px -32px; } -.ui-icon-arrowstop-1-s { background-position: -224px -32px; } -.ui-icon-arrowstop-1-w { background-position: -240px -32px; } -.ui-icon-arrowthick-1-n { background-position: 0 -48px; } -.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } -.ui-icon-arrowthick-1-e { background-position: -32px -48px; } -.ui-icon-arrowthick-1-se { background-position: -48px -48px; } -.ui-icon-arrowthick-1-s { background-position: -64px -48px; } -.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } -.ui-icon-arrowthick-1-w { background-position: -96px -48px; } -.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } -.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } -.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } -.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } -.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } -.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } -.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } -.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } -.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } -.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } -.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } -.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } -.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } -.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } -.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } -.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } -.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } -.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } -.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } -.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } -.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } -.ui-icon-arrow-4 { background-position: 0 -80px; } -.ui-icon-arrow-4-diag { background-position: -16px -80px; } -.ui-icon-extlink { background-position: -32px -80px; } -.ui-icon-newwin { background-position: -48px -80px; } -.ui-icon-refresh { background-position: -64px -80px; } -.ui-icon-shuffle { background-position: -80px -80px; } -.ui-icon-transfer-e-w { background-position: -96px -80px; } -.ui-icon-transferthick-e-w { background-position: -112px -80px; } -.ui-icon-folder-collapsed { background-position: 0 -96px; } -.ui-icon-folder-open { background-position: -16px -96px; } -.ui-icon-document { background-position: -32px -96px; } -.ui-icon-document-b { background-position: -48px -96px; } -.ui-icon-note { background-position: -64px -96px; } -.ui-icon-mail-closed { background-position: -80px -96px; } -.ui-icon-mail-open { background-position: -96px -96px; } -.ui-icon-suitcase { background-position: -112px -96px; } -.ui-icon-comment { background-position: -128px -96px; } -.ui-icon-person { background-position: -144px -96px; } -.ui-icon-print { background-position: -160px -96px; } -.ui-icon-trash { background-position: -176px -96px; } -.ui-icon-locked { background-position: -192px -96px; } -.ui-icon-unlocked { background-position: -208px -96px; } -.ui-icon-bookmark { background-position: -224px -96px; } -.ui-icon-tag { background-position: -240px -96px; } -.ui-icon-home { background-position: 0 -112px; } -.ui-icon-flag { background-position: -16px -112px; } -.ui-icon-calendar { background-position: -32px -112px; } -.ui-icon-cart { background-position: -48px -112px; } -.ui-icon-pencil { background-position: -64px -112px; } -.ui-icon-clock { background-position: -80px -112px; } -.ui-icon-disk { background-position: -96px -112px; } -.ui-icon-calculator { background-position: -112px -112px; } -.ui-icon-zoomin { background-position: -128px -112px; } -.ui-icon-zoomout { background-position: -144px -112px; } -.ui-icon-search { background-position: -160px -112px; } -.ui-icon-wrench { background-position: -176px -112px; } -.ui-icon-gear { background-position: -192px -112px; } -.ui-icon-heart { background-position: -208px -112px; } -.ui-icon-star { background-position: -224px -112px; } -.ui-icon-link { background-position: -240px -112px; } -.ui-icon-cancel { background-position: 0 -128px; } -.ui-icon-plus { background-position: -16px -128px; } -.ui-icon-plusthick { background-position: -32px -128px; } -.ui-icon-minus { background-position: -48px -128px; } -.ui-icon-minusthick { background-position: -64px -128px; } -.ui-icon-close { background-position: -80px -128px; } -.ui-icon-closethick { background-position: -96px -128px; } -.ui-icon-key { background-position: -112px -128px; } -.ui-icon-lightbulb { background-position: -128px -128px; } -.ui-icon-scissors { background-position: -144px -128px; } -.ui-icon-clipboard { background-position: -160px -128px; } -.ui-icon-copy { background-position: -176px -128px; } -.ui-icon-contact { background-position: -192px -128px; } -.ui-icon-image { background-position: -208px -128px; } -.ui-icon-video { background-position: -224px -128px; } -.ui-icon-script { background-position: -240px -128px; } -.ui-icon-alert { background-position: 0 -144px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-notice { background-position: -32px -144px; } -.ui-icon-help { background-position: -48px -144px; } -.ui-icon-check { background-position: -64px -144px; } -.ui-icon-bullet { background-position: -80px -144px; } -.ui-icon-radio-off { background-position: -96px -144px; } -.ui-icon-radio-on { background-position: -112px -144px; } -.ui-icon-pin-w { background-position: -128px -144px; } -.ui-icon-pin-s { background-position: -144px -144px; } -.ui-icon-play { background-position: 0 -160px; } -.ui-icon-pause { background-position: -16px -160px; } -.ui-icon-seek-next { background-position: -32px -160px; } -.ui-icon-seek-prev { background-position: -48px -160px; } -.ui-icon-seek-end { background-position: -64px -160px; } -.ui-icon-seek-start { background-position: -80px -160px; } -/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ -.ui-icon-seek-first { background-position: -80px -160px; } -.ui-icon-stop { background-position: -96px -160px; } -.ui-icon-eject { background-position: -112px -160px; } -.ui-icon-volume-off { background-position: -128px -160px; } -.ui-icon-volume-on { background-position: -144px -160px; } -.ui-icon-power { background-position: 0 -176px; } -.ui-icon-signal-diag { background-position: -16px -176px; } -.ui-icon-signal { background-position: -32px -176px; } -.ui-icon-battery-0 { background-position: -48px -176px; } -.ui-icon-battery-1 { background-position: -64px -176px; } -.ui-icon-battery-2 { background-position: -80px -176px; } -.ui-icon-battery-3 { background-position: -96px -176px; } -.ui-icon-circle-plus { background-position: 0 -192px; } -.ui-icon-circle-minus { background-position: -16px -192px; } -.ui-icon-circle-close { background-position: -32px -192px; } -.ui-icon-circle-triangle-e { background-position: -48px -192px; } -.ui-icon-circle-triangle-s { background-position: -64px -192px; } -.ui-icon-circle-triangle-w { background-position: -80px -192px; } -.ui-icon-circle-triangle-n { background-position: -96px -192px; } -.ui-icon-circle-arrow-e { background-position: -112px -192px; } -.ui-icon-circle-arrow-s { background-position: -128px -192px; } -.ui-icon-circle-arrow-w { background-position: -144px -192px; } -.ui-icon-circle-arrow-n { background-position: -160px -192px; } -.ui-icon-circle-zoomin { background-position: -176px -192px; } -.ui-icon-circle-zoomout { background-position: -192px -192px; } -.ui-icon-circle-check { background-position: -208px -192px; } -.ui-icon-circlesmall-plus { background-position: 0 -208px; } -.ui-icon-circlesmall-minus { background-position: -16px -208px; } -.ui-icon-circlesmall-close { background-position: -32px -208px; } -.ui-icon-squaresmall-plus { background-position: -48px -208px; } -.ui-icon-squaresmall-minus { background-position: -64px -208px; } -.ui-icon-squaresmall-close { background-position: -80px -208px; } -.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } -.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } -.ui-icon-grip-solid-vertical { background-position: -32px -224px; } -.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } -.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } - - -/* Misc visuals -----------------------------------*/ - -/* Corner radius */ -.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; } -.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; } -.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } -.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } - -/* Overlays */ -.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } -.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -khtml-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/* - * jQuery UI Autocomplete 1.8.16 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Autocomplete#theming - */ -.ui-autocomplete { position: absolute; cursor: default; } - -/* workarounds */ -* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ - -/* - * jQuery UI Menu 1.8.16 - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Menu#theming - */ -.ui-menu { - list-style:none; - padding: 2px; - margin: 0; - display:block; - float: left; -} -.ui-menu .ui-menu { - margin-top: -3px; -} -.ui-menu .ui-menu-item { - margin:0; - padding: 0; - zoom: 1; - float: left; - clear: left; - width: 100%; -} -.ui-menu .ui-menu-item a { - text-decoration:none; - display:block; - padding:.2em .4em; - line-height:1.5; - zoom:1; -} -.ui-menu .ui-menu-item a.ui-state-hover, -.ui-menu .ui-menu-item a.ui-state-active { - font-weight: normal; - margin: -1px; -} diff --git a/wolnelektury/static/css/widget.css b/wolnelektury/static/css/widget.css deleted file mode 100644 index 626698844..000000000 --- a/wolnelektury/static/css/widget.css +++ /dev/null @@ -1,54 +0,0 @@ -#wl { -background-color: white; -} -#wl a, a:visited, a:hover { -border: 0; -} -#wl img { -border: 0; -} -.ui-menu { -width: 160px; -font-size: small; -list-style-type: none; -padding: 0; -margin:0; -border-left: 1px solid #696969; -border-right: 1px solid #696969; -border-bottom: 1px solid #696969; -} - -.ui-menu li { -font-size: small; -padding: 5px; -width: 150px -} - -.ui-menu li:nth-child(odd) { -background-color: white; -} - -.ui-menu li:nth-child(even){ -background-color: #EDF1F5; -} - -.ui-menu li:hover{ -background-color: #053469; -color:white; -} - -.ui-menu a:hover { -color:white; -text-decoration: none; -} - -.ui-corner-all { -width: 160px; -cursor: pointer; -display:block; -} - -.ui-corner-all a{ - color: black; - text-decoration: none; -} diff --git a/wolnelektury/static/fonts/WL-Nav.eot b/wolnelektury/static/fonts/WL-Nav.eot deleted file mode 100644 index f241aa124..000000000 Binary files a/wolnelektury/static/fonts/WL-Nav.eot and /dev/null differ diff --git a/wolnelektury/static/fonts/WL-Nav.ttf b/wolnelektury/static/fonts/WL-Nav.ttf deleted file mode 100644 index a82fa2208..000000000 Binary files a/wolnelektury/static/fonts/WL-Nav.ttf and /dev/null differ diff --git a/wolnelektury/static/fonts/WL.eot b/wolnelektury/static/fonts/WL.eot deleted file mode 100644 index 53fedbda0..000000000 Binary files a/wolnelektury/static/fonts/WL.eot and /dev/null differ diff --git a/wolnelektury/static/fonts/WL.ttf b/wolnelektury/static/fonts/WL.ttf deleted file mode 100644 index 6a8934a1b..000000000 Binary files a/wolnelektury/static/fonts/WL.ttf and /dev/null differ diff --git a/wolnelektury/static/img/1percent-big.png b/wolnelektury/static/img/1percent-big.png deleted file mode 100644 index 333413ee6..000000000 Binary files a/wolnelektury/static/img/1percent-big.png and /dev/null differ diff --git a/wolnelektury/static/img/android-poster.png b/wolnelektury/static/img/android-poster.png deleted file mode 100644 index a518650d4..000000000 Binary files a/wolnelektury/static/img/android-poster.png and /dev/null differ diff --git a/wolnelektury/static/img/arrow-down.png b/wolnelektury/static/img/arrow-down.png deleted file mode 100644 index 0e32315c0..000000000 Binary files a/wolnelektury/static/img/arrow-down.png and /dev/null differ diff --git a/wolnelektury/static/img/arrow-up.png b/wolnelektury/static/img/arrow-up.png deleted file mode 100644 index cdf9cf635..000000000 Binary files a/wolnelektury/static/img/arrow-up.png and /dev/null differ diff --git a/wolnelektury/static/img/auth/facebook.png b/wolnelektury/static/img/auth/facebook.png deleted file mode 100644 index f9b6e7149..000000000 Binary files a/wolnelektury/static/img/auth/facebook.png and /dev/null differ diff --git a/wolnelektury/static/img/auth/google.png b/wolnelektury/static/img/auth/google.png deleted file mode 100644 index bf7d11240..000000000 Binary files a/wolnelektury/static/img/auth/google.png and /dev/null differ diff --git a/wolnelektury/static/img/auth/openid.png b/wolnelektury/static/img/auth/openid.png deleted file mode 100644 index 83e97691f..000000000 Binary files a/wolnelektury/static/img/auth/openid.png and /dev/null differ diff --git a/wolnelektury/static/img/auth/twitter.png b/wolnelektury/static/img/auth/twitter.png deleted file mode 100644 index d2a55029d..000000000 Binary files a/wolnelektury/static/img/auth/twitter.png and /dev/null differ diff --git a/wolnelektury/static/img/backdrop/boltron-3212284622.jpg b/wolnelektury/static/img/backdrop/boltron-3212284622.jpg deleted file mode 100644 index 7fe148c19..000000000 Binary files a/wolnelektury/static/img/backdrop/boltron-3212284622.jpg and /dev/null differ diff --git a/wolnelektury/static/img/backdrop/book-drawer2.jpg b/wolnelektury/static/img/backdrop/book-drawer2.jpg deleted file mode 100644 index 88a1ee4be..000000000 Binary files a/wolnelektury/static/img/backdrop/book-drawer2.jpg and /dev/null differ diff --git a/wolnelektury/static/img/backdrop/horiavarlan-4268896468.jpg b/wolnelektury/static/img/backdrop/horiavarlan-4268896468.jpg deleted file mode 100644 index acc80b6e7..000000000 Binary files a/wolnelektury/static/img/backdrop/horiavarlan-4268896468.jpg and /dev/null differ diff --git a/wolnelektury/static/img/bg-header.png b/wolnelektury/static/img/bg-header.png deleted file mode 100644 index 4e4cdf9a7..000000000 Binary files a/wolnelektury/static/img/bg-header.png and /dev/null differ diff --git a/wolnelektury/static/img/bg.png b/wolnelektury/static/img/bg.png deleted file mode 100644 index be7d63a7c..000000000 Binary files a/wolnelektury/static/img/bg.png and /dev/null differ diff --git a/wolnelektury/static/img/book-parent.png b/wolnelektury/static/img/book-parent.png deleted file mode 100644 index 566859807..000000000 Binary files a/wolnelektury/static/img/book-parent.png and /dev/null differ diff --git a/wolnelektury/static/img/book.png b/wolnelektury/static/img/book.png deleted file mode 100644 index f26483979..000000000 Binary files a/wolnelektury/static/img/book.png and /dev/null differ diff --git a/wolnelektury/static/img/doodle/20110908-android.png b/wolnelektury/static/img/doodle/20110908-android.png deleted file mode 100644 index 664b579f5..000000000 Binary files a/wolnelektury/static/img/doodle/20110908-android.png and /dev/null differ diff --git a/wolnelektury/static/img/doodle/20110908-logo.png b/wolnelektury/static/img/doodle/20110908-logo.png deleted file mode 100644 index f4ab58319..000000000 Binary files a/wolnelektury/static/img/doodle/20110908-logo.png and /dev/null differ diff --git a/wolnelektury/static/img/epub-www.jpg b/wolnelektury/static/img/epub-www.jpg deleted file mode 100644 index 84016cf6e..000000000 Binary files a/wolnelektury/static/img/epub-www.jpg and /dev/null differ diff --git a/wolnelektury/static/img/epub.png b/wolnelektury/static/img/epub.png deleted file mode 100644 index 32510fdfb..000000000 Binary files a/wolnelektury/static/img/epub.png and /dev/null differ diff --git a/wolnelektury/static/img/favicon.ico b/wolnelektury/static/img/favicon.ico deleted file mode 100644 index 3f2aacc37..000000000 Binary files a/wolnelektury/static/img/favicon.ico and /dev/null differ diff --git a/wolnelektury/static/img/favicon.png b/wolnelektury/static/img/favicon.png deleted file mode 100644 index 9794f3588..000000000 Binary files a/wolnelektury/static/img/favicon.png and /dev/null differ diff --git a/wolnelektury/static/img/indicator.gif b/wolnelektury/static/img/indicator.gif deleted file mode 100644 index 085ccaeca..000000000 Binary files a/wolnelektury/static/img/indicator.gif and /dev/null differ diff --git a/wolnelektury/static/img/kindle-poster-260.png b/wolnelektury/static/img/kindle-poster-260.png deleted file mode 100644 index 1fd435eee..000000000 Binary files a/wolnelektury/static/img/kindle-poster-260.png and /dev/null differ diff --git a/wolnelektury/static/img/kindle-poster.png b/wolnelektury/static/img/kindle-poster.png deleted file mode 100644 index 63560d273..000000000 Binary files a/wolnelektury/static/img/kindle-poster.png and /dev/null differ diff --git a/wolnelektury/static/img/logo-220.png b/wolnelektury/static/img/logo-220.png deleted file mode 100644 index 9b15e88a3..000000000 Binary files a/wolnelektury/static/img/logo-220.png and /dev/null differ diff --git a/wolnelektury/static/img/logo-bez.png b/wolnelektury/static/img/logo-bez.png deleted file mode 100644 index 213c442d4..000000000 Binary files a/wolnelektury/static/img/logo-bez.png and /dev/null differ diff --git a/wolnelektury/static/img/logo-big.png b/wolnelektury/static/img/logo-big.png deleted file mode 100644 index fae49ea96..000000000 Binary files a/wolnelektury/static/img/logo-big.png and /dev/null differ diff --git a/wolnelektury/static/img/logo-neon.png b/wolnelektury/static/img/logo-neon.png deleted file mode 100644 index c729463be..000000000 Binary files a/wolnelektury/static/img/logo-neon.png and /dev/null differ diff --git a/wolnelektury/static/img/logo.png b/wolnelektury/static/img/logo.png deleted file mode 100644 index 398f45d01..000000000 Binary files a/wolnelektury/static/img/logo.png and /dev/null differ diff --git a/wolnelektury/static/img/mobi.png b/wolnelektury/static/img/mobi.png deleted file mode 100644 index 1631b896d..000000000 Binary files a/wolnelektury/static/img/mobi.png and /dev/null differ diff --git a/wolnelektury/static/img/odt.png b/wolnelektury/static/img/odt.png deleted file mode 100644 index c0c2602f1..000000000 Binary files a/wolnelektury/static/img/odt.png and /dev/null differ diff --git a/wolnelektury/static/img/pdf.png b/wolnelektury/static/img/pdf.png deleted file mode 100644 index 5fe5bbe23..000000000 Binary files a/wolnelektury/static/img/pdf.png and /dev/null differ diff --git a/wolnelektury/static/img/procent.png b/wolnelektury/static/img/procent.png deleted file mode 100644 index 3d0f82d81..000000000 Binary files a/wolnelektury/static/img/procent.png and /dev/null differ diff --git a/wolnelektury/static/img/s5/blank.gif b/wolnelektury/static/img/s5/blank.gif deleted file mode 100644 index 75b945d25..000000000 Binary files a/wolnelektury/static/img/s5/blank.gif and /dev/null differ diff --git a/wolnelektury/static/img/s5/bodybg.gif b/wolnelektury/static/img/s5/bodybg.gif deleted file mode 100755 index 5f448a16f..000000000 Binary files a/wolnelektury/static/img/s5/bodybg.gif and /dev/null differ diff --git a/wolnelektury/static/img/s5/iepngfix.htc b/wolnelektury/static/img/s5/iepngfix.htc deleted file mode 100644 index bba2db756..000000000 --- a/wolnelektury/static/img/s5/iepngfix.htc +++ /dev/null @@ -1,42 +0,0 @@ - - - - - \ No newline at end of file diff --git a/wolnelektury/static/img/search.png b/wolnelektury/static/img/search.png deleted file mode 100644 index 6bfc84cb1..000000000 Binary files a/wolnelektury/static/img/search.png and /dev/null differ diff --git a/wolnelektury/static/img/social/facebook.png b/wolnelektury/static/img/social/facebook.png deleted file mode 100644 index c46485acc..000000000 Binary files a/wolnelektury/static/img/social/facebook.png and /dev/null differ diff --git a/wolnelektury/static/img/social/naszaklasa.png b/wolnelektury/static/img/social/naszaklasa.png deleted file mode 100644 index 6fcd6d53d..000000000 Binary files a/wolnelektury/static/img/social/naszaklasa.png and /dev/null differ diff --git a/wolnelektury/static/img/social/twitter.png b/wolnelektury/static/img/social/twitter.png deleted file mode 100644 index 0a75ea8d7..000000000 Binary files a/wolnelektury/static/img/social/twitter.png and /dev/null differ diff --git a/wolnelektury/static/img/speaker.png b/wolnelektury/static/img/speaker.png deleted file mode 100644 index 5831f177a..000000000 Binary files a/wolnelektury/static/img/speaker.png and /dev/null differ diff --git a/wolnelektury/static/img/turniej-maly.png b/wolnelektury/static/img/turniej-maly.png deleted file mode 100644 index b11f0d676..000000000 Binary files a/wolnelektury/static/img/turniej-maly.png and /dev/null differ diff --git a/wolnelektury/static/img/txt.png b/wolnelektury/static/img/txt.png deleted file mode 100644 index de699ea24..000000000 Binary files a/wolnelektury/static/img/txt.png and /dev/null differ diff --git a/wolnelektury/static/img/wiatrak.png b/wolnelektury/static/img/wiatrak.png deleted file mode 100644 index e96a0c1a5..000000000 Binary files a/wolnelektury/static/img/wiatrak.png and /dev/null differ diff --git a/wolnelektury/static/img/wl_icon_64.png b/wolnelektury/static/img/wl_icon_64.png deleted file mode 100644 index a9dded316..000000000 Binary files a/wolnelektury/static/img/wl_icon_64.png and /dev/null differ diff --git a/wolnelektury/static/img/zabawnik.png b/wolnelektury/static/img/zabawnik.png deleted file mode 100644 index 2a4621693..000000000 Binary files a/wolnelektury/static/img/zabawnik.png and /dev/null differ diff --git a/wolnelektury/static/infobar/infobar.css b/wolnelektury/static/infobar/infobar.css deleted file mode 100644 index fbab95163..000000000 --- a/wolnelektury/static/infobar/infobar.css +++ /dev/null @@ -1,4 +0,0 @@ -/*Based on No IE Information Bar 0.2.6 by Martin Ng , modified by Kornel Lesinski. Under license:http://creativecommons.org/licenses/by-nc/2.0/legalcode*/ -@media screen{#viewplot{ -padding:0; /* << Tutaj ustaw margines jak dla */ -width:100%;height:95%;overflow:auto;height:expression(this.parentNode.offsetHeight-this.offsetTop);position:relative}html{border-top:0;border-left:0;border-bottom:0;overflow:hidden;height:100%}body{margin:0;padding:0;overflow:hidden;height:100%}#infobar{width:100%;font:normal 8pt/1 "MS Sans Serif"}#infobar a{display:block;font:message-box;zoom:1;color:InfoText;background:InfoBackground url(infobar.gif) no-repeat fixed .33em .2em;padding:.45em .3em .45em 2.3em;border-bottom:.16em outset;text-align:left;text-decoration:none;cursor:default}#infobar a{font-size:8pt;letter-spacing:0}#infobar a:hover{color:HighlightText;background-color:Highlight}}#infobar b{position:absolute;right:5px;top:3px;font-size:11px;font-family:webdings;cursor:hand}@media print{#infobar{display:none}} \ No newline at end of file diff --git a/wolnelektury/static/infobar/infobar.gif b/wolnelektury/static/infobar/infobar.gif deleted file mode 100644 index 12b74741f..000000000 Binary files a/wolnelektury/static/infobar/infobar.gif and /dev/null differ diff --git a/wolnelektury/static/infobar/infobar.js b/wolnelektury/static/infobar/infobar.js deleted file mode 100644 index b2e75caea..000000000 --- a/wolnelektury/static/infobar/infobar.js +++ /dev/null @@ -1,2 +0,0 @@ -/*Based on No IE Information Bar 0.2.9 by Martin Ng , Ching Yonghan, modified by Kornel Lesinski. Under license: http://creativecommons.org/licenses/by-nc/2.0/legalcode*/ -(function(){if (!infobar||!viewplot)return;if(Math.random()*10>(infobar.s||10) || document.cookie.indexOf('browsehappyinfobar=0')>=0){infobar.style.display='none';return}infobar.innerHTML='r'+infobar.innerHTML;infobar.onclick=function(){infobar.all.tags("a")[0].innerHTML='Trwa otwieranie strony informacyjnej...'};if (!infobar.offsetHeight) return;var I=infobar.runtimeStyle,V=viewplot.runtimeStyle;I.top=infobar.offsetHeight*-1;I.left=V.top=V.left=0;V.position=I.position="absolute";var T=setInterval(function(){var N=parseInt(infobar.currentStyle.top),M=-N;if(M>0){M=M>5?5:M;I.top=N+M;V.top=parseInt(V.top)+M}else{clearInterval(T);I.position=V.position="";V.top='0'}},40)})() diff --git a/wolnelektury/static/jplayer/Jplayer.swf b/wolnelektury/static/jplayer/Jplayer.swf deleted file mode 100644 index 4d50c86ae..000000000 Binary files a/wolnelektury/static/jplayer/Jplayer.swf and /dev/null differ diff --git a/wolnelektury/static/jplayer/jplayer.blue.monday.css b/wolnelektury/static/jplayer/jplayer.blue.monday.css deleted file mode 100644 index f8b314b6e..000000000 --- a/wolnelektury/static/jplayer/jplayer.blue.monday.css +++ /dev/null @@ -1,627 +0,0 @@ -/* - * Skin for jPlayer Plugin (jQuery JavaScript Library) - * http://www.happyworm.com/jquery/jplayer - * - * Skin Name: Blue Monday - * - * Copyright (c) 2010-2011 Happyworm Ltd - * Dual licensed under the MIT and GPL licenses. - * - http://www.opensource.org/licenses/mit-license.php - * - http://www.gnu.org/copyleft/gpl.html - * - * Author: Silvia Benvenuti - * Skin Version: 4.0 (jPlayer 2.1.0) - * Date: 1st September 2011 - */ - -div.jp-audio, -div.jp-video { - - /* Edit the font-size to counteract inherited font sizing. - * Eg. 1.25em = 1 / 0.8em - */ - - font-size:1.25em; /* 1.25em for testing in site pages */ /* No parent CSS that can effect the size in the demos ZIP */ - - font-family:Verdana, Arial, sans-serif; - line-height:1.6; - color: #565656; - border:1px solid #009be3; - background-color:#eee; - position:relative; -} -div.jp-audio { - width:420px; -} -div.jp-video-270p { - width:480px; -} -div.jp-video-360p { - width:640px; -} -div.jp-video-full { - /* Rules for IE6 (full-screen) */ - width:480px; - height:270px; - /* Rules for IE7 (full-screen) - Otherwise the relative container causes other page items that are not position:static (default) to appear over the video/gui. */ - position:static !important; position:relative -} - -div.jp-video-full div.jp-jplayer { - top: 0; - left: 0; - position: fixed !important; position: relative; /* Rules for IE6 (full-screen) */ - overflow: hidden; - z-index:1000; -} - -div.jp-video-full div.jp-gui { - position: fixed !important; position: static; /* Rules for IE6 (full-screen) */ - top: 0; - left: 0; - width:100%; - height:100%; - z-index:1000; -} - -div.jp-video-full div.jp-interface { - position: absolute !important; position: relative; /* Rules for IE6 (full-screen) */ - bottom: 0; - left: 0; - z-index:1000; -} - -div.jp-interface { - position: relative; - background-color:#eee; - width:100%; -} - -div.jp-interface a { - color: #0c767d; -} - -div.jp-audio div.jp-type-single div.jp-interface { - height:80px; -} -div.jp-audio div.jp-type-playlist div.jp-interface { - height:80px; -} - -div.jp-video div.jp-interface { - border-top:1px solid #009be3; -} - -/* @group CONTROLS */ - -div.jp-controls-holder { - clear: both; - width:440px; - margin:0 auto; - position: relative; - overflow:hidden; - top:-8px; /* This negative value depends on the size of the text in jp-currentTime and jp-duration */ -} - -div.jp-interface ul.jp-controls { - list-style-type:none; - margin:0; - padding: 0; - overflow:hidden; -} - -div.jp-audio ul.jp-controls { - width: 380px; - padding:20px 20px 0 20px; -} - -div.jp-video div.jp-type-single ul.jp-controls { - width: 78px; - margin-left: 200px; -} - -div.jp-video div.jp-type-playlist ul.jp-controls { - width: 134px; - margin-left: 172px; -} -div.jp-video ul.jp-controls, -div.jp-interface ul.jp-controls li { - display:inline; - float: left; -} - -div.jp-interface ul.jp-controls a { - display:block; - overflow:hidden; - text-indent:-9999px; -} -a.jp-play, -a.jp-pause { - width:40px; - height:40px; -} - -a.jp-play { - background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 0 no-repeat; -} -a.jp-play:hover { - background: url("/static/jplayer/jplayer.blue.monday.jpg") -41px 0 no-repeat; -} -a.jp-pause { - background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -42px no-repeat; - display: none; -} -a.jp-pause:hover { - background: url("/static/jplayer/jplayer.blue.monday.jpg") -41px -42px no-repeat; -} - -a.jp-stop, a.jp-previous, a.jp-next { - width:28px; - height:28px; - margin-top:6px; -} - -a.jp-stop { - background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -83px no-repeat; - margin-left:10px; -} - -a.jp-stop:hover { - background: url("/static/jplayer/jplayer.blue.monday.jpg") -29px -83px no-repeat; -} - -a.jp-previous { - background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -112px no-repeat; -} -a.jp-previous:hover { - background: url("/static/jplayer/jplayer.blue.monday.jpg") -29px -112px no-repeat; -} - -a.jp-next { - background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -141px no-repeat; -} -a.jp-next:hover { - background: url("/static/jplayer/jplayer.blue.monday.jpg") -29px -141px no-repeat; -} - -/* @end */ - -/* @group progress bar */ - -div.jp-progress { - overflow:hidden; - background-color: #ddd; -} -div.jp-audio div.jp-progress { - position: absolute; - top:32px; - height:15px; -} -div.jp-audio div.jp-type-single div.jp-progress { - left:110px; - width:186px; -} -div.jp-audio div.jp-type-playlist div.jp-progress { - left:166px; - width:130px; -} -div.jp-video div.jp-progress { - top:0px; - left:0px; - width:100%; - height:10px; -} -div.jp-seek-bar { - background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -202px repeat-x; - width:0px; - height:100%; - cursor: pointer; -} -div.jp-play-bar { - background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -218px repeat-x ; - width:0px; - height:100%; -} - -/* The seeking class is added/removed inside jPlayer */ -div.jp-seeking-bg { - background: url("/static/jplayer/jplayer.blue.monday.seeking.gif"); -} - -/* @end */ - -/* @group volume controls */ - - -a.jp-mute, -a.jp-unmute, -a.jp-volume-max { - width:18px; - height:15px; - margin-top:12px; -} - -div.jp-audio div.jp-type-single a.jp-mute, -div.jp-audio div.jp-type-single a.jp-unmute { - margin-left: 210px; -} - -div.jp-audio div.jp-type-playlist a.jp-mute, -div.jp-audio div.jp-type-playlist a.jp-unmute { - margin-left: 154px; -} - -div.jp-audio a.jp-volume-max { - margin-left: 56px; -} - -div.jp-video a.jp-mute, -div.jp-video a.jp-unmute, -div.jp-video a.jp-volume-max { - position: absolute; - top:12px; - margin-top:0; -} - -div.jp-video a.jp-mute, -div.jp-video a.jp-unmute { - left: 50px; -} - -div.jp-video a.jp-volume-max { - left: 134px; -} - -a.jp-mute { - background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -170px no-repeat; -} -a.jp-mute:hover { - background: url("/static/jplayer/jplayer.blue.monday.jpg") -19px -170px no-repeat; -} -a.jp-unmute { - background: url("/static/jplayer/jplayer.blue.monday.jpg") -60px -170px no-repeat; - display: none; -} -a.jp-unmute:hover { - background: url("/static/jplayer/jplayer.blue.monday.jpg") -79px -170px no-repeat; -} - a.jp-volume-max { - background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -186px no-repeat; -} -a.jp-volume-max:hover { - background: url("/static/jplayer/jplayer.blue.monday.jpg") -19px -186px no-repeat; -} - -div.jp-volume-bar { - position: absolute; - overflow:hidden; - background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -250px repeat-x; - width:46px; - height:5px; - cursor: pointer; -} -div.jp-audio div.jp-volume-bar { - top:37px; - left:330px; -} -div.jp-video div.jp-volume-bar { - top:17px; - left:72px; -} -div.jp-volume-bar-value { - background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -256px repeat-x; - width:0px; - height:5px; -} - -/* @end */ - -/* @group current time and duration */ - -div.jp-audio div.jp-time-holder { - position:absolute; - top:50px; -} -div.jp-audio div.jp-type-single div.jp-time-holder { - left:110px; - width:186px; -} -div.jp-audio div.jp-type-playlist div.jp-time-holder { - left:166px; - width:130px; -} - -div.jp-current-time, -div.jp-duration { - width:60px; - font-size:.64em; - font-style:oblique; -} -div.jp-current-time { - float: left; - display:inline; -} -div.jp-duration { - float: right; - display:inline; - text-align: right; -} - -div.jp-video div.jp-current-time { - margin-left:20px; -} -div.jp-video div.jp-duration { - margin-right:20px; -} - -/* @end */ - -/* @group playlist */ - -div.jp-title { - font-weight:bold; - text-align:center; -} - -div.jp-title, -div.jp-playlist { - width:100%; - background-color:#ccc; - border-top:1px solid #009be3; -} -div.jp-type-single div.jp-title, -div.jp-type-playlist div.jp-title, -div.jp-type-single div.jp-playlist { - border-top:none; -} -div.jp-title ul, -div.jp-playlist ul { - list-style-type:none; - margin:0; - padding:0 20px; - font-size:.8em; -} - -div.jp-title li { - padding:5px 0; - font-weight:bold; -} -div.jp-playlist li { - padding:5px 0 4px 20px; - border-bottom:1px solid #eee; -} - -div.jp-playlist li div { - display:inline; -} - -/* Note that the first-child (IE6) and last-child (IE6/7/8) selectors do not work on IE */ - -div.jp-type-playlist div.jp-playlist li:last-child { - padding:5px 0 5px 20px; - border-bottom:none; -} -div.jp-type-playlist div.jp-playlist li.jp-playlist-current { - list-style-type:square; - list-style-position:inside; - padding-left:7px; -} -div.jp-type-playlist div.jp-playlist a { - color: #333; - text-decoration: none; -} -div.jp-type-playlist div.jp-playlist a:hover { - color:#0D7E85; -} -div.jp-type-playlist div.jp-playlist a.jp-playlist-current { - color:#0D7E85; -} - -div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove { - float:right; - display:inline; - text-align:right; - margin-right:10px; - font-weight:bold; - color:#666; -} -div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove:hover { - color:#0D7E85; -} -div.jp-type-playlist div.jp-playlist span.jp-free-media { - float:right; - display:inline; - text-align:right; - margin-right:10px; -} -div.jp-type-playlist div.jp-playlist span.jp-free-media a{ - color:#565656; -} -div.jp-type-playlist div.jp-playlist span.jp-free-media a:hover{ - color:#0D7E85; -} -span.jp-artist { - font-size:.8em; - color:#565656; -} - -/* @end */ - -div.jp-video-play { - position:absolute; - top:0; - left:0; - width:100%; - cursor:pointer; - background-color:rgba(0,0,0,0); /* Makes IE9 work with the active area over the whole video area. IE6/7/8 only have the button as active area. */ -} -div.jp-video-270p div.jp-video-play { - height:270px; -} -div.jp-video-360p div.jp-video-play { - height:360px; -} -div.jp-video-full div.jp-video-play { - height:100%; - z-index:1000; -} -a.jp-video-play-icon { - position:relative; - display:block; - width: 112px; - height: 100px; - - margin-left:-56px; - margin-top:-50px; - left:50%; - top:50%; - - background: url("/static/jplayer/jplayer.blue.monday.video.play.png") 0 0 no-repeat; - text-indent:-9999px; -} -div.jp-video-play:hover a.jp-video-play-icon { - background: url("/static/jplayer/jplayer.blue.monday.video.play.png") 0 -100px no-repeat; -} - - - - - -div.jp-jplayer audio, -div.jp-jplayer { - width:0px; - height:0px; -} - -div.jp-jplayer { - background-color: #000000; -} - - - - - -/* @group TOGGLES */ - -/* The audio toggles are nested inside jp-time-holder */ - -ul.jp-toggles { - list-style-type:none; - padding:0; - margin:0 auto; - overflow:hidden; -} - -div.jp-audio .jp-type-single ul.jp-toggles { - width:25px; -} -div.jp-audio .jp-type-playlist ul.jp-toggles { - width:55px; - margin: 0; - position: absolute; - left: 325px; - top: 50px; -} - -div.jp-video ul.jp-toggles { - margin-top:10px; - width:100px; -} - -ul.jp-toggles li { - display:block; - float:right; -} - -ul.jp-toggles li a { - display:block; - width:25px; - height:18px; - text-indent:-9999px; - line-height:100%; /* need this for IE6 */ -} - -a.jp-full-screen { - background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -310px no-repeat; - margin-left: 20px; -} - -a.jp-full-screen:hover { - background: url("/static/jplayer/jplayer.blue.monday.jpg") -30px -310px no-repeat; -} - -a.jp-restore-screen { - background: url("/static/jplayer/jplayer.blue.monday.jpg") -60px -310px no-repeat; - margin-left: 20px; -} - -a.jp-restore-screen:hover { - background: url("/static/jplayer/jplayer.blue.monday.jpg") -90px -310px no-repeat; -} - -a.jp-repeat { - background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -290px no-repeat; -} - -a.jp-repeat:hover { - background: url("/static/jplayer/jplayer.blue.monday.jpg") -30px -290px no-repeat; -} - -a.jp-repeat-off { - background: url("/static/jplayer/jplayer.blue.monday.jpg") -60px -290px no-repeat; -} - -a.jp-repeat-off:hover { - background: url("/static/jplayer/jplayer.blue.monday.jpg") -90px -290px no-repeat; -} - -a.jp-shuffle { - background: url("/static/jplayer/jplayer.blue.monday.jpg") 0 -270px no-repeat; - margin-left: 5px; -} - -a.jp-shuffle:hover { - background: url("/static/jplayer/jplayer.blue.monday.jpg") -30px -270px no-repeat; -} - -a.jp-shuffle-off { - background: url("/static/jplayer/jplayer.blue.monday.jpg") -60px -270px no-repeat; - margin-left: 5px; -} - -a.jp-shuffle-off:hover { - background: url("/static/jplayer/jplayer.blue.monday.jpg") -90px -270px no-repeat; -} - - -/* @end */ - -/* @group NO SOLUTION error feedback */ - -.jp-no-solution { - position:absolute; - width:390px; - margin-left:-202px; - left:50%; - top: 10px; - - padding:5px; - font-size:.8em; - background-color:#eee; - border:2px solid #009be3; - color:#000; - display:none; -} - -.jp-no-solution a { - color:#000; -} - -.jp-no-solution span { - font-size:1em; - display:block; - text-align:center; - font-weight:bold; -} - -/* @end */ diff --git a/wolnelektury/static/jplayer/jplayer.blue.monday.jpg b/wolnelektury/static/jplayer/jplayer.blue.monday.jpg deleted file mode 100644 index adab53ff7..000000000 Binary files a/wolnelektury/static/jplayer/jplayer.blue.monday.jpg and /dev/null differ diff --git a/wolnelektury/static/jplayer/jplayer.blue.monday.seeking.gif b/wolnelektury/static/jplayer/jplayer.blue.monday.seeking.gif deleted file mode 100644 index dbd2105ab..000000000 Binary files a/wolnelektury/static/jplayer/jplayer.blue.monday.seeking.gif and /dev/null differ diff --git a/wolnelektury/static/jplayer/jplayer.blue.monday.video.play.png b/wolnelektury/static/jplayer/jplayer.blue.monday.video.play.png deleted file mode 100644 index 8e97df011..000000000 Binary files a/wolnelektury/static/jplayer/jplayer.blue.monday.video.play.png and /dev/null differ diff --git a/wolnelektury/static/jplayer/jplayer.playlist.min.js b/wolnelektury/static/jplayer/jplayer.playlist.min.js deleted file mode 100644 index 42c0e22a1..000000000 --- a/wolnelektury/static/jplayer/jplayer.playlist.min.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Playlist Object for the jPlayer Plugin - * http://www.jplayer.org - * - * Copyright (c) 2009 - 2011 Happyworm Ltd - * Dual licensed under the MIT and GPL licenses. - * - http://www.opensource.org/licenses/mit-license.php - * - http://www.gnu.org/copyleft/gpl.html - * - * Author: Mark J Panaghiston - * Version: 2.1.0 (jPlayer 2.1.0) - * Date: 1st September 2011 - */ - -(function(b,f){jPlayerPlaylist=function(a,c,d){var e=this;this.current=0;this.removing=this.shuffled=this.loop=!1;this.cssSelector=b.extend({},this._cssSelector,a);this.options=b.extend(!0,{},this._options,d);this.playlist=[];this.original=[];this._initPlaylist(c);this.cssSelector.title=this.cssSelector.cssSelectorAncestor+" .jp-title";this.cssSelector.playlist=this.cssSelector.cssSelectorAncestor+" .jp-playlist";this.cssSelector.next=this.cssSelector.cssSelectorAncestor+" .jp-next";this.cssSelector.previous= -this.cssSelector.cssSelectorAncestor+" .jp-previous";this.cssSelector.shuffle=this.cssSelector.cssSelectorAncestor+" .jp-shuffle";this.cssSelector.shuffleOff=this.cssSelector.cssSelectorAncestor+" .jp-shuffle-off";this.options.cssSelectorAncestor=this.cssSelector.cssSelectorAncestor;this.options.repeat=function(a){e.loop=a.jPlayer.options.loop};b(this.cssSelector.jPlayer).bind(b.jPlayer.event.ready,function(){e._init()});b(this.cssSelector.jPlayer).bind(b.jPlayer.event.ended,function(){e.next()}); -b(this.cssSelector.jPlayer).bind(b.jPlayer.event.play,function(){b(this).jPlayer("pauseOthers")});b(this.cssSelector.jPlayer).bind(b.jPlayer.event.resize,function(a){a.jPlayer.options.fullScreen?b(e.cssSelector.title).show():b(e.cssSelector.title).hide()});b(this.cssSelector.previous).click(function(){e.previous();b(this).blur();return!1});b(this.cssSelector.next).click(function(){e.next();b(this).blur();return!1});b(this.cssSelector.shuffle).click(function(){e.shuffle(!0);return!1});b(this.cssSelector.shuffleOff).click(function(){e.shuffle(!1); -return!1}).hide();this.options.fullScreen||b(this.cssSelector.title).hide();b(this.cssSelector.playlist+" ul").empty();this._createItemHandlers();b(this.cssSelector.jPlayer).jPlayer(this.options)};jPlayerPlaylist.prototype={_cssSelector:{jPlayer:"#jquery_jplayer_1",cssSelectorAncestor:"#jp_container_1"},_options:{playlistOptions:{autoPlay:!1,loopOnPrevious:!1,shuffleOnLoop:!0,enableRemoveControls:!1,displayTime:"slow",addTime:"fast",removeTime:"fast",shuffleTime:"slow",itemClass:"jp-playlist-item", -freeGroupClass:"jp-free-media",freeItemClass:"jp-playlist-item-free",removeItemClass:"jp-playlist-item-remove"}},option:function(a,b){if(b===f)return this.options.playlistOptions[a];this.options.playlistOptions[a]=b;switch(a){case "enableRemoveControls":this._updateControls();break;case "itemClass":case "freeGroupClass":case "freeItemClass":case "removeItemClass":this._refresh(!0),this._createItemHandlers()}return this},_init:function(){var a=this;this._refresh(function(){a.options.playlistOptions.autoPlay? -a.play(a.current):a.select(a.current)})},_initPlaylist:function(a){this.current=0;this.removing=this.shuffled=!1;this.original=b.extend(!0,[],a);this._originalPlaylist()},_originalPlaylist:function(){var a=this;this.playlist=[];b.each(this.original,function(b){a.playlist[b]=a.original[b]})},_refresh:function(a){var c=this;if(a&&!b.isFunction(a))b(this.cssSelector.playlist+" ul").empty(),b.each(this.playlist,function(a){b(c.cssSelector.playlist+" ul").append(c._createListItem(c.playlist[a]))}),this._updateControls(); -else{var d=b(this.cssSelector.playlist+" ul").children().length?this.options.playlistOptions.displayTime:0;b(this.cssSelector.playlist+" ul").slideUp(d,function(){var d=b(this);b(this).empty();b.each(c.playlist,function(a){d.append(c._createListItem(c.playlist[a]))});c._updateControls();b.isFunction(a)&&a();c.playlist.length?b(this).slideDown(c.options.playlistOptions.displayTime):b(this).show()})}},_createListItem:function(a){var c=this,d="
        10. ";d+="×";if(a.free){var e=!0;d+="(";b.each(a,function(a,f){b.jPlayer.prototype.format[a]&&(e?e=!1:d+=" | ",d+=""+a+"")});d+=")"}d+=""+a.title+(a.artist?" ":"")+"";d+="
        11. ";return d},_createItemHandlers:function(){var a= -this;b(this.cssSelector.playlist+" a."+this.options.playlistOptions.itemClass).die("click").live("click",function(){var c=b(this).parent().parent().index();a.current!==c?a.play(c):b(a.cssSelector.jPlayer).jPlayer("play");b(this).blur();return!1});b(a.cssSelector.playlist+" a."+this.options.playlistOptions.freeItemClass).die("click").live("click",function(){b(this).parent().parent().find("."+a.options.playlistOptions.itemClass).click();b(this).blur();return!1});b(a.cssSelector.playlist+" a."+this.options.playlistOptions.removeItemClass).die("click").live("click", -function(){var c=b(this).parent().parent().index();a.remove(c);b(this).blur();return!1})},_updateControls:function(){this.options.playlistOptions.enableRemoveControls?b(this.cssSelector.playlist+" ."+this.options.playlistOptions.removeItemClass).show():b(this.cssSelector.playlist+" ."+this.options.playlistOptions.removeItemClass).hide();this.shuffled?(b(this.cssSelector.shuffleOff).show(),b(this.cssSelector.shuffle).hide()):(b(this.cssSelector.shuffleOff).hide(),b(this.cssSelector.shuffle).show())}, -_highlight:function(a){this.playlist.length&&a!==f&&(b(this.cssSelector.playlist+" .jp-playlist-current").removeClass("jp-playlist-current"),b(this.cssSelector.playlist+" li:nth-child("+(a+1)+")").addClass("jp-playlist-current").find(".jp-playlist-item").addClass("jp-playlist-current"),b(this.cssSelector.title+" li").html(this.playlist[a].title+(this.playlist[a].artist?" ":"")))},setPlaylist:function(a){this._initPlaylist(a);this._init()}, -add:function(a,c){b(this.cssSelector.playlist+" ul").append(this._createListItem(a)).find("li:last-child").hide().slideDown(this.options.playlistOptions.addTime);this._updateControls();this.original.push(a);this.playlist.push(a);c?this.play(this.playlist.length-1):this.original.length===1&&this.select(0)},remove:function(a){var c=this;if(a===f)return this._initPlaylist([]),this._refresh(function(){b(c.cssSelector.jPlayer).jPlayer("clearMedia")}),!0;else if(this.removing)return!1;else{a=a<0?c.original.length+ -a:a;if(0<=a&&a1?this.shuffle(!0,!0):this.play(a):a>0&&this.play(a)},previous:function(){var a=this.current-1>=0?this.current-1:this.playlist.length-1;(this.loop&&this.options.playlistOptions.loopOnPrevious||a','','','',''];c=document.createElement('');for(var e=0;e0?100*d/this.status.duration:0;typeof a.seekable==="object"&&a.seekable.length>0?(g=this.status.duration>0?100*a.seekable.end(a.seekable.length-1)/this.status.duration:100,f=100*a.currentTime/a.seekable.end(a.seekable.length-1)):(g=100,f=e);b&&(e=f=d=0);this.status.seekPercent=g;this.status.currentPercentRelative=f;this.status.currentPercentAbsolute=e;this.status.currentTime=d;this.status.readyState=a.readyState;this.status.networkState=a.networkState;this.status.playbackRate= -a.playbackRate;this.status.ended=a.ended},_resetStatus:function(){this.status=b.extend({},this.status,b.jPlayer.prototype.status)},_trigger:function(a,c,d){a=b.Event(a);a.jPlayer={};a.jPlayer.version=b.extend({},this.version);a.jPlayer.options=b.extend(!0,{},this.options);a.jPlayer.status=b.extend(!0,{},this.status);a.jPlayer.html=b.extend(!0,{},this.html);a.jPlayer.flash=b.extend(!0,{},this.flash);if(c)a.jPlayer.error=b.extend({},c);if(d)a.jPlayer.warning=b.extend({},d);this.element.trigger(a)}, -jPlayerFlashEvent:function(a,c){if(a===b.jPlayer.event.ready)if(this.internal.ready){if(this.flash.gate){if(this.status.srcSet){var d=this.status.currentTime,e=this.status.paused;this.setMedia(this.status.media);d>0&&(e?this.pause(d):this.play(d))}this._trigger(b.jPlayer.event.flashreset)}}else this.internal.ready=!0,this.internal.flash.jq.css({width:"0px",height:"0px"}),this.version.flash=c.version,this.version.needFlash!==this.version.flash&&this._error({type:b.jPlayer.error.VERSION,context:this.version.flash, -message:b.jPlayer.errorMsg.VERSION+this.version.flash,hint:b.jPlayer.errorHint.VERSION}),this._trigger(b.jPlayer.event.repeat),this._trigger(a);if(this.flash.gate)switch(a){case b.jPlayer.event.progress:this._getFlashStatus(c);this._updateInterface();this._trigger(a);break;case b.jPlayer.event.timeupdate:this._getFlashStatus(c);this._updateInterface();this._trigger(a);break;case b.jPlayer.event.play:this._seeked();this._updateButtons(!0);this._trigger(a);break;case b.jPlayer.event.pause:this._updateButtons(!1); -this._trigger(a);break;case b.jPlayer.event.ended:this._updateButtons(!1);this._trigger(a);break;case b.jPlayer.event.click:this._trigger(a);break;case b.jPlayer.event.error:this.status.waitForLoad=!0;this.status.waitForPlay=!0;this.status.video&&this.internal.flash.jq.css({width:"0px",height:"0px"});this._validString(this.status.media.poster)&&this.internal.poster.jq.show();this.css.jq.videoPlay.length&&this.status.video&&this.css.jq.videoPlay.show();this.status.video?this._flash_setVideo(this.status.media): -this._flash_setAudio(this.status.media);this._updateButtons(!1);this._error({type:b.jPlayer.error.URL,context:c.src,message:b.jPlayer.errorMsg.URL,hint:b.jPlayer.errorHint.URL});break;case b.jPlayer.event.seeking:this._seeking();this._trigger(a);break;case b.jPlayer.event.seeked:this._seeked();this._trigger(a);break;case b.jPlayer.event.ready:break;default:this._trigger(a)}return!1},_getFlashStatus:function(a){this.status.seekPercent=a.seekPercent;this.status.currentPercentRelative=a.currentPercentRelative; -this.status.currentPercentAbsolute=a.currentPercentAbsolute;this.status.currentTime=a.currentTime;this.status.duration=a.duration;this.status.readyState=4;this.status.networkState=0;this.status.playbackRate=1;this.status.ended=!1},_updateButtons:function(a){if(a!==f)this.status.paused=!a,this.css.jq.play.length&&this.css.jq.pause.length&&(a?(this.css.jq.play.hide(),this.css.jq.pause.show()):(this.css.jq.play.show(),this.css.jq.pause.hide()));this.css.jq.restoreScreen.length&&this.css.jq.fullScreen.length&& -(this.status.noFullScreen?(this.css.jq.fullScreen.hide(),this.css.jq.restoreScreen.hide()):this.options.fullScreen?(this.css.jq.fullScreen.hide(),this.css.jq.restoreScreen.show()):(this.css.jq.fullScreen.show(),this.css.jq.restoreScreen.hide()));this.css.jq.repeat.length&&this.css.jq.repeatOff.length&&(this.options.loop?(this.css.jq.repeat.hide(),this.css.jq.repeatOff.show()):(this.css.jq.repeat.show(),this.css.jq.repeatOff.hide()))},_updateInterface:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.width(this.status.seekPercent+ -"%");this.css.jq.playBar.length&&this.css.jq.playBar.width(this.status.currentPercentRelative+"%");this.css.jq.currentTime.length&&this.css.jq.currentTime.text(b.jPlayer.convertTime(this.status.currentTime));this.css.jq.duration.length&&this.css.jq.duration.text(b.jPlayer.convertTime(this.status.duration))},_seeking:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.addClass("jp-seeking-bg")},_seeked:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.removeClass("jp-seeking-bg")}, -_resetGate:function(){this.html.audio.gate=!1;this.html.video.gate=!1;this.flash.gate=!1},_resetActive:function(){this.html.active=!1;this.flash.active=!1},setMedia:function(a){var c=this,d=!1,e=this.status.media.poster!==a.poster;this._resetMedia();this._resetGate();this._resetActive();b.each(this.formats,function(e,f){var i=c.format[f].media==="video";b.each(c.solutions,function(b,e){if(c[e].support[f]&&c._validString(a[f])){var g=e==="html";i?(g?(c.html.video.gate=!0,c._html_setVideo(a),c.html.active= -!0):(c.flash.gate=!0,c._flash_setVideo(a),c.flash.active=!0),c.css.jq.videoPlay.length&&c.css.jq.videoPlay.show(),c.status.video=!0):(g?(c.html.audio.gate=!0,c._html_setAudio(a),c.html.active=!0):(c.flash.gate=!0,c._flash_setAudio(a),c.flash.active=!0),c.css.jq.videoPlay.length&&c.css.jq.videoPlay.hide(),c.status.video=!1);d=!0;return!1}});if(d)return!1});if(d){if((!this.status.nativeVideoControls||!this.html.video.gate)&&this._validString(a.poster))e?this.htmlElement.poster.src=a.poster:this.internal.poster.jq.show(); -this.status.srcSet=!0;this.status.media=b.extend({},a);this._updateButtons(!1);this._updateInterface()}else this._error({type:b.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:b.jPlayer.errorMsg.NO_SUPPORT,hint:b.jPlayer.errorHint.NO_SUPPORT})},_resetMedia:function(){this._resetStatus();this._updateButtons(!1);this._updateInterface();this._seeked();this.internal.poster.jq.hide();clearTimeout(this.internal.htmlDlyCmdId);this.html.active?this._html_resetMedia():this.flash.active&& -this._flash_resetMedia()},clearMedia:function(){this._resetMedia();this.html.active?this._html_clearMedia():this.flash.active&&this._flash_clearMedia();this._resetGate();this._resetActive()},load:function(){this.status.srcSet?this.html.active?this._html_load():this.flash.active&&this._flash_load():this._urlNotSetError("load")},play:function(a){a=typeof a==="number"?a:NaN;this.status.srcSet?this.html.active?this._html_play(a):this.flash.active&&this._flash_play(a):this._urlNotSetError("play")},videoPlay:function(){this.play()}, -pause:function(a){a=typeof a==="number"?a:NaN;this.status.srcSet?this.html.active?this._html_pause(a):this.flash.active&&this._flash_pause(a):this._urlNotSetError("pause")},pauseOthers:function(){var a=this;b.each(this.instances,function(b,d){a.element!==d&&d.data("jPlayer").status.srcSet&&d.jPlayer("pause")})},stop:function(){this.status.srcSet?this.html.active?this._html_pause(0):this.flash.active&&this._flash_pause(0):this._urlNotSetError("stop")},playHead:function(a){a=this._limitValue(a,0,100); -this.status.srcSet?this.html.active?this._html_playHead(a):this.flash.active&&this._flash_playHead(a):this._urlNotSetError("playHead")},_muted:function(a){this.options.muted=a;this.html.used&&this._html_mute(a);this.flash.used&&this._flash_mute(a);!this.html.video.gate&&!this.html.audio.gate&&(this._updateMute(a),this._updateVolume(this.options.volume),this._trigger(b.jPlayer.event.volumechange))},mute:function(a){a=a===f?!0:!!a;this._muted(a)},unmute:function(a){a=a===f?!0:!!a;this._muted(!a)},_updateMute:function(a){if(a=== -f)a=this.options.muted;this.css.jq.mute.length&&this.css.jq.unmute.length&&(this.status.noVolume?(this.css.jq.mute.hide(),this.css.jq.unmute.hide()):a?(this.css.jq.mute.hide(),this.css.jq.unmute.show()):(this.css.jq.mute.show(),this.css.jq.unmute.hide()))},volume:function(a){a=this._limitValue(a,0,1);this.options.volume=a;this.html.used&&this._html_volume(a);this.flash.used&&this._flash_volume(a);!this.html.video.gate&&!this.html.audio.gate&&(this._updateVolume(a),this._trigger(b.jPlayer.event.volumechange))}, -volumeBar:function(a){if(this.css.jq.volumeBar.length){var b=this.css.jq.volumeBar.offset(),d=a.pageX-b.left,e=this.css.jq.volumeBar.width(),a=this.css.jq.volumeBar.height()-a.pageY+b.top,b=this.css.jq.volumeBar.height();this.options.verticalVolume?this.volume(a/b):this.volume(d/e)}this.options.muted&&this._muted(!1)},volumeBarValue:function(a){this.volumeBar(a)},_updateVolume:function(a){if(a===f)a=this.options.volume;a=this.options.muted?0:a;this.status.noVolume?(this.css.jq.volumeBar.length&&this.css.jq.volumeBar.hide(), -this.css.jq.volumeBarValue.length&&this.css.jq.volumeBarValue.hide(),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.hide()):(this.css.jq.volumeBar.length&&this.css.jq.volumeBar.show(),this.css.jq.volumeBarValue.length&&(this.css.jq.volumeBarValue.show(),this.css.jq.volumeBarValue[this.options.verticalVolume?"height":"width"](a*100+"%")),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.show())},volumeMax:function(){this.volume(1);this.options.muted&&this._muted(!1)},_cssSelectorAncestor:function(a){var c= -this;this.options.cssSelectorAncestor=a;this._removeUiClass();this.ancestorJq=a?b(a):[];a&&this.ancestorJq.length!==1&&this._warning({type:b.jPlayer.warning.CSS_SELECTOR_COUNT,context:a,message:b.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.ancestorJq.length+" found for cssSelectorAncestor.",hint:b.jPlayer.warningHint.CSS_SELECTOR_COUNT});this._addUiClass();b.each(this.options.cssSelector,function(a,b){c._cssSelector(a,b)})},_cssSelector:function(a,c){var d=this;typeof c==="string"?b.jPlayer.prototype.options.cssSelector[a]? -(this.css.jq[a]&&this.css.jq[a].length&&this.css.jq[a].unbind(".jPlayer"),this.options.cssSelector[a]=c,this.css.cs[a]=this.options.cssSelectorAncestor+" "+c,this.css.jq[a]=c?b(this.css.cs[a]):[],this.css.jq[a].length&&this.css.jq[a].bind("click.jPlayer",function(c){d[a](c);b(this).blur();return!1}),c&&this.css.jq[a].length!==1&&this._warning({type:b.jPlayer.warning.CSS_SELECTOR_COUNT,context:this.css.cs[a],message:b.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[a].length+" found for "+a+" method.", -hint:b.jPlayer.warningHint.CSS_SELECTOR_COUNT})):this._warning({type:b.jPlayer.warning.CSS_SELECTOR_METHOD,context:a,message:b.jPlayer.warningMsg.CSS_SELECTOR_METHOD,hint:b.jPlayer.warningHint.CSS_SELECTOR_METHOD}):this._warning({type:b.jPlayer.warning.CSS_SELECTOR_STRING,context:c,message:b.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:b.jPlayer.warningHint.CSS_SELECTOR_STRING})},seekBar:function(a){if(this.css.jq.seekBar){var b=this.css.jq.seekBar.offset(),a=a.pageX-b.left,b=this.css.jq.seekBar.width(); -this.playHead(100*a/b)}},playBar:function(a){this.seekBar(a)},repeat:function(){this._loop(!0)},repeatOff:function(){this._loop(!1)},_loop:function(a){if(this.options.loop!==a)this.options.loop=a,this._updateButtons(),this._trigger(b.jPlayer.event.repeat)},currentTime:function(){},duration:function(){},gui:function(){},noSolution:function(){},option:function(a,c){var d=a;if(arguments.length===0)return b.extend(!0,{},this.options);if(typeof a==="string"){var e=a.split(".");if(c===f){for(var d=b.extend(!0, -{},this.options),g=0;g0?this._html_load():clearTimeout(this.internal.htmlDlyCmdId);this.htmlElement.media.pause();if(!isNaN(a))try{this.htmlElement.media.currentTime=a}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.pause(a)},100);return}a>0&&this._html_checkWaitForPlay()},_html_playHead:function(a){var b=this;this._html_load();try{if(typeof this.htmlElement.media.seekable==="object"&&this.htmlElement.media.seekable.length>0)this.htmlElement.media.currentTime= -a*this.htmlElement.media.seekable.end(this.htmlElement.media.seekable.length-1)/100;else if(this.htmlElement.media.duration>0&&!isNaN(this.htmlElement.media.duration))this.htmlElement.media.currentTime=a*this.htmlElement.media.duration/100;else throw"e";}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.playHead(a)},100);return}this.status.waitForLoad||this._html_checkWaitForPlay()},_html_checkWaitForPlay:function(){if(this.status.waitForPlay)this.status.waitForPlay=!1,this.css.jq.videoPlay.length&& -this.css.jq.videoPlay.hide(),this.status.video&&(this.internal.poster.jq.hide(),this.internal.video.jq.css({width:this.status.width,height:this.status.height}))},_html_volume:function(a){if(this.html.audio.available)this.htmlElement.audio.volume=a;if(this.html.video.available)this.htmlElement.video.volume=a},_html_mute:function(a){if(this.html.audio.available)this.htmlElement.audio.muted=a;if(this.html.video.available)this.htmlElement.video.muted=a},_flash_setAudio:function(a){var c=this;try{if(b.each(this.formats, -function(b,d){if(c.flash.support[d]&&a[d]){switch(d){case "m4a":case "fla":c._getMovie().fl_setAudio_m4a(a[d]);break;case "mp3":c._getMovie().fl_setAudio_mp3(a[d])}c.status.src=a[d];c.status.format[d]=!0;c.status.formatType=d;return!1}}),this.options.preload==="auto")this._flash_load(),this.status.waitForLoad=!1}catch(d){this._flashError(d)}},_flash_setVideo:function(a){var c=this;try{if(b.each(this.formats,function(b,d){if(c.flash.support[d]&&a[d]){switch(d){case "m4v":case "flv":c._getMovie().fl_setVideo_m4v(a[d])}c.status.src= -a[d];c.status.format[d]=!0;c.status.formatType=d;return!1}}),this.options.preload==="auto")this._flash_load(),this.status.waitForLoad=!1}catch(d){this._flashError(d)}},_flash_resetMedia:function(){this.internal.flash.jq.css({width:"0px",height:"0px"});this._flash_pause(NaN)},_flash_clearMedia:function(){try{this._getMovie().fl_clearMedia()}catch(a){this._flashError(a)}},_flash_load:function(){try{this._getMovie().fl_load()}catch(a){this._flashError(a)}this.status.waitForLoad=!1},_flash_play:function(a){try{this._getMovie().fl_play(a)}catch(b){this._flashError(b)}this.status.waitForLoad= -!1;this._flash_checkWaitForPlay()},_flash_pause:function(a){try{this._getMovie().fl_pause(a)}catch(b){this._flashError(b)}if(a>0)this.status.waitForLoad=!1,this._flash_checkWaitForPlay()},_flash_playHead:function(a){try{this._getMovie().fl_play_head(a)}catch(b){this._flashError(b)}this.status.waitForLoad||this._flash_checkWaitForPlay()},_flash_checkWaitForPlay:function(){if(this.status.waitForPlay)this.status.waitForPlay=!1,this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide(),this.status.video&& -(this.internal.poster.jq.hide(),this.internal.flash.jq.css({width:this.status.width,height:this.status.height}))},_flash_volume:function(a){try{this._getMovie().fl_volume(a)}catch(b){this._flashError(b)}},_flash_mute:function(a){try{this._getMovie().fl_mute(a)}catch(b){this._flashError(b)}},_getMovie:function(){return document[this.internal.flash.id]},_checkForFlash:function(a){var b=!1,d;if(window.ActiveXObject)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+a),b=!0}catch(e){}else navigator.plugins&& -navigator.mimeTypes.length>0&&(d=navigator.plugins["Shockwave Flash"])&&navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1")>=a&&(b=!0);return b},_validString:function(a){return a&&typeof a==="string"},_limitValue:function(a,b,d){return ad?d:a},_urlNotSetError:function(a){this._error({type:b.jPlayer.error.URL_NOT_SET,context:a,message:b.jPlayer.errorMsg.URL_NOT_SET,hint:b.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(a){var c;c=this.internal.ready?"FLASH_DISABLED": -"FLASH";this._error({type:b.jPlayer.error[c],context:this.internal.flash.swf,message:b.jPlayer.errorMsg[c]+a.message,hint:b.jPlayer.errorHint[c]});this.internal.flash.jq.css({width:"1px",height:"1px"})},_error:function(a){this._trigger(b.jPlayer.event.error,a);this.options.errorAlerts&&this._alert("Error!"+(a.message?"\n\n"+a.message:"")+(a.hint?"\n\n"+a.hint:"")+"\n\nContext: "+a.context)},_warning:function(a){this._trigger(b.jPlayer.event.warning,f,a);this.options.warningAlerts&&this._alert("Warning!"+ -(a.message?"\n\n"+a.message:"")+(a.hint?"\n\n"+a.hint:"")+"\n\nContext: "+a.context)},_alert:function(a){alert("jPlayer "+this.version.script+" : id='"+this.internal.self.id+"' : "+a)},_emulateHtmlBridge:function(){var a=this;b.each(b.jPlayer.emulateMethods.split(/\s+/g),function(b,d){a.internal.domNode[d]=function(b){a[d](b)}});b.each(b.jPlayer.event,function(c,d){var e=!0;b.each(b.jPlayer.reservedEvent.split(/\s+/g),function(a,b){if(b===c)return e=!1});e&&a.element.bind(d+".jPlayer.jPlayerHtml", -function(){a._emulateHtmlUpdate();var b=document.createEvent("Event");b.initEvent(c,!1,!0);a.internal.domNode.dispatchEvent(b)})})},_emulateHtmlUpdate:function(){var a=this;b.each(b.jPlayer.emulateStatus.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.status[d]});b.each(b.jPlayer.emulateOptions.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.options[d]})},_destroyHtmlBridge:function(){var a=this;this.element.unbind(".jPlayerHtml");b.each((b.jPlayer.emulateMethods+" "+b.jPlayer.emulateStatus+ -" "+b.jPlayer.emulateOptions).split(/\s+/g),function(b,d){delete a.internal.domNode[d]})}};b.jPlayer.error={FLASH:"e_flash",FLASH_DISABLED:"e_flash_disabled",NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"};b.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",FLASH_DISABLED:"jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ", -NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.",NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayer "+b.jPlayer.prototype.version.script+" needs Jplayer.swf version "+b.jPlayer.prototype.version.needFlash+" but found "};b.jPlayer.errorHint= -{FLASH:"Check your swfPath option and that Jplayer.swf is there.",FLASH_DISABLED:"Check that you have not display:none; the jPlayer entity or any ancestor.",NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."};b.jPlayer.warning={CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method", -CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"};b.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of css selectors found did not equal one: ",CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",OPTION_KEY:"The option requested in jPlayer('option') is undefined."};b.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.", -CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}})(jQuery); \ No newline at end of file diff --git a/wolnelektury/static/js/base.js b/wolnelektury/static/js/base.js deleted file mode 100755 index 32cdd7068..000000000 --- a/wolnelektury/static/js/base.js +++ /dev/null @@ -1,124 +0,0 @@ -(function($) { - $(function() { - $.fn.toggle_slide = function(p) { - cont = $(this); - short_el = p['short_el'] || $(':first-child', this); - long_el = p['long_el'] || short_el.next(); - button = p['button']; - short_text = p['short_text'], - long_text = p['long_text']; - - var toggle_fun = function(cont, short_el, long_el, button, short_text, long_text) { - var toggle = function() { - if (cont.hasClass('short')) { - cont.animate({"height": long_el.attr("cont_h")+'px'}, {duration: "fast" }).removeClass('short'); - short_el.hide(); - long_el.show(); - if (button && long_text) button.html(long_text); - } else { - cont.animate({"height": short_el.attr("cont_h")+'px'}, {duration: "fast" }).addClass('short'); - long_el.hide(); - short_el.show(); - if (button && short_text) button.html(short_text); - } - return false; - } - return toggle; - } - if (long_el.html().length <= short_el.html().length) - return; - - // ensure long element shown first - long_el.show();short_el.hide(); - long_el.attr("cont_h", $(this).height()).hide(); - short_el.show().attr("cont_h", $(this).height()); - $(this).addClass('short'); - - if (button && short_text) button.html(short_text); - if (button) button.click(toggle_fun(cont, short_el, long_el, button, short_text, long_text)); - }; - - - // Fragments - $('.fragment-with-short').each(function() { - $(this).toggle_slide({ - short_el: $('.fragment-short-text', this), - long_el: $('.fragment-long-text', this), - button: $('.toggle', this) - }) - }); - $('#description').each(function() { - $(this).toggle_slide({ - short_el: $('#description-short', this), - long_el: $('#description-long', this), - button: $(this) - }) - }); - - - - (function() { - var $current = null; - $('.hidden-box-wrapper').each(function() { - var $hidden = $('.hidden-box', this); - $('.hidden-box-trigger', this).click(function(event) { - event.preventDefault(); - if ($current == $hidden) { - $current = null; - $hidden.hide('fast'); - } else { - $current && $current.hide('fast'); - $hidden.show('fast'); - $current = $hidden; - } - }); - }); - $('body').click(function(e) { - if ($current == null) return; - var p = $(e.target); - while (p.length) { - if (p == $current) - return; - if (p.hasClass('hidden-box-trigger')) - return; - p = p.parent(); - } - $current.hide('fast'); - $current = null; - }); - })(); - - - - -$('#themes-list-toggle').click(function(event) { - event.preventDefault(); - $('#themes-list').toggle('slow'); -}); - - -$('.open-player').click(function(event) { - event.preventDefault(); - window.open($(this).attr('href'), - 'player', - 'width=422, height=500' - ); -}); - - - $('.book-list-index').click(function(){ - $('.book-list-show-index').hide('slow'); - if($(this).parent().next('ul:not(:hidden)').length == 0){ - $(this).parent().next('ul').toggle('slow'); - } - return false; - }); - - $('.hoverclick').click(function() {$(this).closest('.hoverget').toggleClass('hover');}); - - $(function(){ - $("#search").search();}); - - }); -})(jQuery) - diff --git a/wolnelektury/static/js/book.js b/wolnelektury/static/js/book.js deleted file mode 100644 index 335fe39c0..000000000 --- a/wolnelektury/static/js/book.js +++ /dev/null @@ -1,61 +0,0 @@ -$(function() { - function scrollToAnchor(anchor) { - if (anchor) { - var anchor_name = anchor.slice(1); - var element = $('a[name="' + anchor_name + '"]'); - if (element.length > 0) { - $.scrollTo(element, 500, {offset: {top: -50, left: 0}}); - foot_elem = $('#footnotes a[name="' + anchor_name + '"]'); - if (foot_elem.length > 0) { - $(element).parent().highlightFade('yellow'); - } - window.location.hash = anchor; - } - } - } - - $.highlightFade.defaults.speed = 3000; - $('#toc').hide(); - if ($('#toc li').length == 0) { - $('#menu li a[href="#toc"]').remove(); - } - if ($('#nota_red').length == 0) { - $('#menu li a[href="#nota_red"]').remove(); - } - - // On page load, scroll to anchor - scrollToAnchor(window.location.hash) - - $('#toc, #themes, #book-text').delegate('click', 'a', function(event) { - event.preventDefault(); - $('#menu li a.selected').click(); - scrollToAnchor($(this).attr('href')); - }); - - $('#menu li a.menu').toggle(function() { - $('#menu li a.selected').click(); - $(this).addClass('selected'); - $($(this).attr('href')).slideDown('fast'); - }, function() { - $(this).removeClass('selected'); - $($(this).attr('href')).slideUp('fast'); - }); - - - if (window.getSelection) { - $('.theme-begin').click(function() { - var selection = window.getSelection(); - selection.removeAllRanges(); - var range = document.createRange(); - - var e = $(".theme-end[fid='" + $(this).attr('fid') + "']")[0]; - - if (e) { - range.setStartAfter(this); - range.setEndBefore(e); - selection.addRange(range); - } - }); - } - -}); diff --git a/wolnelektury/static/js/catalogue.js b/wolnelektury/static/js/catalogue.js deleted file mode 100644 index 485780692..000000000 --- a/wolnelektury/static/js/catalogue.js +++ /dev/null @@ -1,603 +0,0 @@ -var STATIC = '/static/'; -var LOCALE_TEXTS = { - "pl": { - "DELETE_SHELF": "Czy na pewno usunąć półkę", - "HIDE_DESCRIPTION": "Zwiń opis", - "EXPAND_DESCRIPTION": "Rozwiń opis", - "LOADING": "Ładowanie" - }, - "de": { - "DELETE_SHELF": "Möchtest du wirklich dieses Bücherregal entfernen?", - "HIDE_DESCRIPTION": "Beschreibung zuklappen", - "EXPAND_DESCRIPTION": "Beschreibung aufklappen", - "LOADING": "Herunterladen" - }, - "fr": { - "DELETE_SHELF": "Voulez-vous supprimer l'étagère définitivement?", - "HIDE_DESCRIPTION": "Montrer la description", - "EXPAND_DESCRIPTION": "Cacher la description", - "LOADING": "Chargement" - }, - "en": { - "DELETE_SHELF": "Are you sure you want to delete this shelf?", - "HIDE_DESCRIPTION": "Hide", - "EXPAND_DESCRIPTION": "Expand", - "LOADING": "Loading" - }, - "ru": { - "DELETE_SHELF": "Уверены ли вы том, чтобы удалить полку?", - "HIDE_DESCRIPTION": "Свернуть описание", - "EXPAND_DESCRIPTION": "Раскрыть описание", - "LOADING": "Загрузка" - }, - "es": { - "DELETE_SHELF": "¿Estás seguro que quieres borrar este estante?", - "HIDE_DESCRIPTION": "Esconder la descripción", - "EXPAND_DESCRIPTION": "Ampliar la descripción", - "LOADING": "Cargando" - }, - "lt":{ - "DELETE_SHELF": "Ar tikrai nori pašalinti lentną?", - "HIDE_DESCRIPTION": "Suvyniok aprašymą ", - "EXPAND_DESCRIPTION": "Išplėsk aprašymą", - "LOADING": "Krovimas" - }, - "uk":{ - "DELETE_SHELF": "Ви впевнені, що хочете видалити полицю?", - "HIDE_DESCRIPTION": "Сховати опис", - "EXPAND_DESCRIPTION": "Показати опис", - "LOADING": "Завантажується" - } -} -var BANNER_TEXTS = [ - 'Przekaż 1% żeby ukryć ten baner.', - 'Jak dobrze wydać 1% swojego podatku? Poradnik dla opornych.', - 'Wiadomość systemowa: wystąpił błąd brak funduszy. Wykonaj procedurę 1%.', - 'FREE! Wygraj darmowe lektury!', - 'Confidential business offer. Not scam! 1% for you.', - 'Biblioteka Wolne Lektury wymaga aktualizacji. Kliknij dalej.', - '1000 lektur. 1 procent.', - '1% dla biblioteki lektur szkolnych. 1% dla Twojej biblioteki.', - '1% na lektury szkolne.', - '1% dla wolności lektur szkolnych.', - 'Podaruj Jeden Procent na rzecz szkolnej biblioteki internetowej.', - '1% podatku dla biblioteki szkolnej Wolne Lektury.', - '1% na rzecz darmowego dostępu do szkolnych lektur.', - 'Żeby czytać teksty a nie skany. Przekaż 1%.', - 'Czytaj teksty a nie skany. Przekaż 1%', - 'Motyw artysty w literaturze - 47 cytatów. Pomóż znaleźć następne.', - 'Twój 1% uwolni więcej lektur.', - 'Ponad 400 motywów, blisko 10 000 000 cytatów. Pomóż znaleźć następne. Przekaż swój 1%.', - 'Twój 1% uwolni lektury.', - 'Rozlicz swój PIT z Wolnymi Lekturami. Skorzystaj z darmowego programu do rozliczania podatków.', - 'Lektury 2010: Pan Tadeusz, Trylogia.', - 'Pan Tadeusz też chce być w Internecie! Przekaż 1% swojego podatku.', - 'Pomóż uwolnić 286 utworów z listy lektur szkolnych. Przekaż swój 1% na Wolne Lektury.' -] - -function changeBannerText() { - var index = Math.floor(Math.random() * BANNER_TEXTS.length); - if (BANNER_TEXTS[index] == $('#onepercent-text').html()) { - // try again - changeBannerText(); - } else { - $('#onepercent-text').fadeOut('slow', function() { - $(this).html(BANNER_TEXTS[index]); - $(this).fadeIn('slow'); - }); - - setTimeout(changeBannerText, 30 * 1000); - } -} - -function autocomplete_format_item(ul, item) { - return $("
        12. ").data('item.autocomplete', item) - .append(''+item.label+ ' ('+item.category+')') - .appendTo(ul); -} - -function autocomplete_result_handler(event, ui) { - if (ui.item.url != undefined) { - location.href = ui.item.url; - } else { - $(event.target).closest('form').submit(); - } -} - -function serverTime() { - var time = null; - $.ajax({url: '/katalog/zegar/', - async: false, dataType: 'text', - success: function(text) { - time = new Date(text); - }, error: function(http, message, exc) { - time = new Date(); - }}); - return time; -} - -(function($) { - $(function() { - - $.fn.toggle_slide = function(p) { - cont = $(this); - short_el = p['short_el'] || $(':first-child', this); - long_el = p['long_el'] || short_el.next(); - button = p['button']; - short_text = p['short_text'], - long_text = p['long_text']; - - var toggle_fun = function(cont, short_el, long_el, button, short_text, long_text) { - var toggle = function() { - if (cont.hasClass('short')) { - cont.animate({"height": long_el.attr("cont_h")+'px'}, {duration: "fast" }).removeClass('short'); - short_el.hide(); - long_el.show(); - if (button && long_text) button.html(long_text); - } else { - cont.animate({"height": short_el.attr("cont_h")+'px'}, {duration: "fast" }).addClass('short'); - long_el.hide(); - short_el.show(); - if (button && short_text) button.html(short_text); - } - return false; - } - return toggle; - } - if (long_el.html().length <= short_el.html().length) - return; - - // ensure long element shown first - long_el.show();short_el.hide(); - long_el.attr("cont_h", $(this).height()).hide(); - short_el.show().attr("cont_h", $(this).height()); - $(this).addClass('short'); - - if (button && short_text) button.html(short_text); - if (button) button.hover( - function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); }, - function() { $(this).css({background: '#EEE'}); } - ).click(toggle_fun(cont, short_el, long_el, button, short_text, long_text)); - short_el.hover( - function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); }, - function() { $(this).css({background: '#FFF'}); } - ).click(toggle_fun(cont, short_el, long_el, button, short_text, long_text)); - long_el.hover( - function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); }, - function() { $(this).css({background: '#FFF'}); } - ).click(toggle_fun(cont, short_el, long_el, button, short_text, long_text)); - }; - - $('form input').labelify({labelledClass: 'blur'}); - - target = $('#login-register-window div.target'); - - $('#show-registration-form').click(function() { - $('#login-form').hide(); - $('#registration-form').show(); - }); - - $('#show-login-form').click(function() { - $('#registration-form').hide(); - $('#login-form').show(); - }); - - // Fragments - $('.fragment-short-text').each(function() { - var fragment = $(this).closest('.fragment'); - fragment.toggle_slide({ - short_el: $(this), - long_el: fragment.find('.fragment-text') - }) - }); - - $('.show-all-tags').click(function() { - $(this).parent().parent().fadeOut(function() { - $(this).next().fadeIn(); - }); - return false; - }); - - $('.hide-all-tags').click(function() { - $(this).parent().parent().fadeOut(function() { - $(this).prev().fadeIn(); - }); - return false; - }); - - $('#registration-form').ajaxForm({ - dataType: 'json', - beforeSubmit: function() { - $('#registration-form input[type=submit]') - .attr('disabled', 'disabled') - .after(''); - }, - success: function(response) { - if (response.success) { - location.reload(true); - } else { - $('#registration-form span.error').remove(); - $.each(response.errors, function(id, errors) { - $('#id_registration-' + id).before('' + errors[0] + ''); - }); - $('#registration-form input[type=submit]').removeAttr('disabled'); - $('#registration-form img').remove(); - } - } - }); - - $('#login-form').ajaxForm({ - dataType: 'json', - beforeSubmit: function() { - $('#login-form input[type=submit]') - .attr('disabled', 'disabled') - .after(''); - }, - success: function(response) { - if (response.success) { - location.reload(true); - } else { - $('#login-form span.error').remove(); - $.each(response.errors, function(id, errors) { - $('#id_login-' + id).before('' + errors[0] + ''); - }); - $('#login-form input[type=submit]').removeAttr('disabled'); - $('#login-form img').remove(); - } - } - }); - - $('#login-register-window').jqm({ - target: target[0], - overlay: 60, - trigger: '.login-register-link', - onShow: function(hash) { - var offset = $(hash.t).offset(); - hash.w.css({position: 'absolute', left: offset.left - hash.w.width() + $(hash.t).width(), top: offset.top}); - $('div.header', hash.w).css({width: $(hash.t).width()}); - hash.w.show(); - } - }); - - $('ul.shelf-list li').hover(function() { - $(this).css({background: '#EEE', cursor: 'pointer'}); - }, function() { - $(this).css({background: 'transparent'}); - }).click(function() { - location.href = $('a.visit-shelf', this).attr('href'); - }); - - $('.delete-shelf').click(function() { - var link = $(this); - var shelf_name = $('.visit-shelf', link.parent()).text(); - if (confirm(LOCALE_TEXTS[LANGUAGE_CODE]['DELETE_SHELF']+ ' '+ shelf_name + '?')) { - $.post(link.attr('href'), function(data, textStatus) { - link.parent().remove(); - }); - } - return false; - }); - - var serverResponse; - $('#user-shelves-window').jqm({ - ajax: '@href', - target: $('#user-shelves-window div.target')[0], - overlay: 60, - trigger: '#user-shelves-link', - onShow: function(hash) { - var offset = $(hash.t).offset(); - hash.w.css({position: 'absolute', left: offset.left - hash.w.width() + $(hash.t).width(), top: offset.top}); - $('div.header', hash.w).css({width: $(hash.t).width()}); - hash.w.show(); - }, - onLoad: function(hash) { - $('form', hash.w).ajaxForm({ - target: serverResponse, - success: function(serverResponse) { - var newShelf = $.parseJSON(serverResponse); - $('#user-shelves-window div.target').html(newShelf.msg); - setTimeout(function() { $('#user-shelves-window').jqmHide() }, 1000); - } - }); - - $('input', hash.w).labelify({labelledClass: 'blur'}); - - $('ul.shelf-list li', hash.w).hover(function() { - $(this).css({background: '#EEE', cursor: 'pointer'}); - }, function() { - $(this).css({background: 'transparent'}); - }).click(function() { - location.href = $('a.visit-shelf', this).attr('href'); - }); - - $('.delete-shelf').click(function() { - var link = $(this); - var shelf_name = $('.visit-shelf', link.parent()).text(); - if (confirm(LOCALE_TEXTS[LANGUAGE_CODE]['DELETE_SHELF'] + ' ' + shelf_name + '?')) { - $.post(link.attr('href'), function(data, textStatus) { - link.parent().remove(); - }); - } - return false; - }); - } - }); - - $('#suggest-window').jqm({ - ajax: '@href', - target: $('#suggest-window div.target')[0], - overlay: 60, - trigger: '#suggest-link', - onShow: function(hash) { - var offset = $(hash.t).offset(); - hash.w.css({position: 'absolute', left: offset.left - hash.w.width() + $(hash.t).width(), top: offset.top}); - $('div.header', hash.w).css({width: $(hash.t).width()}); - hash.w.show(); - }, - onLoad: function(hash) { - $('form', hash.w).ajaxForm({ - dataType: 'json', - target: $('#suggest-window div.target'), - success: function(response) { - if (response.success) { - $('#suggest-window div.target').text(response.message); - setTimeout(function() { $('#suggest-window').jqmHide() }, 1000) - } - else { - $('#suggest-form .error').remove(); - $.each(response.errors, function(id, errors) { - $('#suggest-form #id_' + id).before('' + errors[0] + ''); - }); - $('#suggest-form input[type=submit]').removeAttr('disabled'); - return false; - } - } - }); - } - }); - - $('#suggest-publishing-window').jqm({ - ajax: '@data-ajax', - target: $('#suggest-publishing-window div.target')[0], - overlay: 60, - trigger: '#suggest-publishing-link', - onShow: function(hash) { - var offset = $(hash.t).offset(); - hash.w.css({position: 'absolute', left: offset.left - hash.w.width() + $(hash.t).width(), top: offset.top}); - $('div.header', hash.w).css({width: $(hash.t).width()}); - hash.w.show(); - }, - onLoad: function(hash) { - $('form', hash.w).each(function() {this.action += '?ajax=1';}); - $('form', hash.w).ajaxForm({ - dataType: 'json', - target: $('#suggest-publishing-window div.target'), - success: function(response) { - if (response.success) { - $('#suggest-publishing-window div.target').text(response.message); - setTimeout(function() { $('#suggest-publishing-window').jqmHide() }, 1000) - } - else { - $('#suggest-publishing-form .error').remove(); - $.each(response.errors, function(id, errors) { - $('#suggest-publishing-form #id_' + id).before('' + errors[0] + ''); - }); - $('#suggest-publishing-form input[type=submit]').removeAttr('disabled'); - return false; - } - } - }); - } - }); - - (function($this) { - $form = $('form', $this); - $form.each(function() {this.action += '?ajax=1';}); - $form.ajaxForm({ - dataType: 'json', - target: $this, - success: function(response) { - if (response.success) { - $this.text(response.message); - } - else { - $('.error', $form).remove(); - $.each(response.errors, function(id, errors) { - $('#id_' + id, $form).before('' + errors[0] + ''); - }); - $('input[type=submit]', $form).removeAttr('disabled'); - return false; - } - } - }); - })($('.block-form')); - - $('#books-list .book').hover( - function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); }, - function() { $(this).css({background: '#FFF'}); } - ).click(function() { - location.href = $('h2 a', this).attr('href'); - }); - - $('#description').each(function(){$(this).toggle_slide({ - long_el: $('#description-long', this), - short_el: $('#description-short', this), - button: $(this).nextAll('#toggle-description').first().find('p'), - long_text: LOCALE_TEXTS[LANGUAGE_CODE]['HIDE_DESCRIPTION'] + ' ▲', - short_text: LOCALE_TEXTS[LANGUAGE_CODE]['EXPAND_DESCRIPTION'] + ' ▼' - })}); - - $('#toggle-share-shelf').hover( - function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); }, - function() { $(this).css({background: '#EEE'}); } - ).click(function() { - if ($('#share-shelf').hasClass('hidden')) { - $('#share-shelf').slideDown('fast').removeClass('hidden'); - } else { - $('#share-shelf').slideUp('fast').addClass('hidden'); - } - }); - - var target = $('#set-window div.target'); - - $('#set-window').jqm({ - ajax: '@href', - target: target[0], - overlay: 60, - trigger: 'a.jqm-trigger', - onShow: function(hash) { - var offset = $(hash.t).offset(); - target.html('

          '+LOCALE_TEXTS[LANGUAGE_CODE]['DELETE_SHELF']+'

          '); - hash.w.css({position: 'absolute', left: offset.left, top: offset.top}).show() }, - onLoad: function(hash) { - try { - $('#createShelfTrigger').click(function(){ - // who cares it's not needed, but I was looking for it - // that's why I want it to stay.. :) - // var slug = $(hash.t).attr('href').split("/")[3]; - $('#createNewShelf').show(); - }); - } catch (e){} - var serverResponse; - $('form', hash.w).ajaxForm({ - target: serverResponse, - success: function(serverResponse) { - var newShelf = $.parseJSON(serverResponse); - // for live shelf adding - if(newShelf.name){ - var noIds = $("#putOnShelf ol ul").children('li').length; - $("#putOnShelf ol ul").prepend('
        13. '); - $("#createNewShelf ol input[name=name]").val(""); - } - if(newShelf.after == "close"){ - setTimeout(function() {$('#set-window').jqmHide();}, 1000); - } - } - }); - } - }); - - $('a.remove-from-shelf').click(function(event) { - event.preventDefault(); - link = $(this); - $.post(link.attr('href'), function(data, textStatus) { - link.parent().remove(); - }); - }); - - $('#share-shelf').hide().addClass('hidden'); - $('#share-shelf input').focus(function(){this.select();}); - - $('#user-info').show(); - changeBannerText(); - $('#onepercent-banner').show(); - - var formatsDownloaded = false; - $('#download-shelf').click(function() { - $('#download-shelf-menu').slideDown('fast'); - - if (!formatsDownloaded) { - // Get info about the formats - formatsDownloaded = true; - $.ajax({ - url: $('#download-formats-form').attr('data-formats-feed'), - type: 'GET', - dataType: 'json', - complete: function() { - $('#download-formats-form-submit').attr('disabled', null); - $('#download-formats-form-submit-li img').remove(); - $('#updating-formats').fadeOut('fast', function() { - $('#formats-updated').fadeIn('fast'); - }); - }, - success: function(data) { - $('#download-formats-form li').each(function() { - var item = $(this); - if (!!item.attr('data-format') && !data[item.attr('data-format')]) { - item.fadeOut('fast', function() { - item.remove(); - }); - } - }); - } - }); - } - return false; - }); - - $('#download-formats-form-cancel').click(function() { - $('#download-shelf-menu').slideUp('fast'); - return false; - }); - - $('.sponsor-logos').cycle({timeout: 3000}); - - $('.widget-code').focus( - function(){ - $(this).animate({rows: '11'}, 100, function(){ - this.select(); - $(this).click(function(){ - this.select(); - }); - }) - - } - ).blur( - function(){ - $(this).animate({rows: '1'}, 300, function(){ - $(this).unbind('click'); - }) - } - ); - - $('.book-list-index').click(function(){ - $('.book-list-show-index').hide('slow'); - if($(this).parent().next('ul:not(:hidden)').length == 0){ - $(this).parent().next('ul').toggle('slow'); - } - return false; - }); - - // player for audiobooks - - // event handlers for playing different formats - $('.audiotabs span').click(function(){ - $('.audiobook-list').hide(); - $('.audiotabs .active').removeClass('active'); - // we don't want to interact with "audiobook" label, just 'format' tabs - var $this = $(this); - $this.addClass("active"); - $("#"+$this.attr('data-format')+"-files").show(); - }); - - $('.audiobook-list').hide(); - if($(".audiotabs .active").length > 0) { - $("#"+$(".audiotabs .active").html().toLowerCase()+"-files").show(); - } - - /* this will be useful for javascript html player - var medias = $('.audiobook-list a'); - var mp3List = []; - var oggList = []; - var daisyList = []; - var tmpExt; - if (medias.length > 0) { - // creating sources list for player - medias.each(function(index, item) { - tmpExt = item.href.split(".").pop(); - if(tmpExt == "mp3") { - mp3List.push(item.href); - } else if (tmpExt == "ogg") { - oggList.push(item.href); - } else if(tmpExt == "daisy") { - daisyList.push(item.href); - } - }); - }*/ - $("#custom-pdf-link").toggle( - function(ev) { $(".custom-pdf").show(); return false; }, - function(ev) { $(".custom-pdf").hide(); return false; } - ); - }); -})(jQuery) - diff --git a/wolnelektury/static/js/dialogs.js b/wolnelektury/static/js/dialogs.js deleted file mode 100755 index d44dab32e..000000000 --- a/wolnelektury/static/js/dialogs.js +++ /dev/null @@ -1,197 +0,0 @@ -(function($) { - $(function() { - - // create containers for all ajaxable form links - $('.ajaxable').each(function() { - var $window = $("#ajaxable-window").clone(); - $window.attr("id", this.id + "-window"); - $('body').append($window); - - var $trigger = $(this) - var trigger = '#' + this.id; - - $window.jqm({ - ajax: '@href', - ajaxText: '

          * ' + gettext("Loading") + '

          ', - target: $('.target', $window)[0], - overlay: 60, - trigger: trigger, - onShow: function(hash) { - var offset = $(hash.t).offset(); - hash.w.css({position: 'absolute', left: offset.left - hash.w.width() + $(hash.t).width(), top: offset.top}); - var width = $(hash.t).width(); - width = width > 50 ? width : 50; - $('.header', hash.w).css({width: width}); - hash.w.show(); - }, - onLoad: function(hash) { - $('form', hash.w).ajaxForm({ - dataType: 'json', - target: $('.target', $window), - success: function(response) { - if (response.success) { - $('.target', $window).text(response.message); - setTimeout(function() { $window.jqmHide() }, 1000); - callback = ajaxable_callbacks[$trigger.attr('data-callback')]; - callback && callback($trigger, response); - if (response.redirect) - window.location = response.redirect; - } - else { - $('.error', $window).remove(); - $.each(response.errors, function(id, errors) { - $('#id_' + id, $window).before('' + errors[0] + ''); - }); - $('input[type=submit]', $window).removeAttr('disabled'); - return false; - } - } - }); - } - }); - }); - - - var login_and_retry = function($form) { - var $window = $("#ajaxable-window").clone(); - $window.attr("id", "context-login-window"); - $('body').append($window); - - $window.jqm({ - ajax: '/uzytkownik/zaloguj-utworz/?next=' + escape(window.location), - ajaxText: '

          * ' + gettext("Loading") + '

          ', - target: $('.target', $window)[0], - overlay: 60, - onShow: function(hash) { - var offset = $form.offset(); - hash.w.css({position: 'absolute', left: offset.left - hash.w.width() + $form.width(), top: offset.top}); - var width = $form.width(); - width = width > 50 ? width : 50; - $('.header', hash.w).css({width: width}); - hash.w.show(); - }, - onLoad: function(hash) { - $('form', hash.w).ajaxForm({ - dataType: 'json', - target: $('.target', $window), - success: function(response) { - if (response.success) { - $('.target', $window).text(response.message); - setTimeout(function() { $window.jqmHide() }, 1000); - $form.submit(); - location.reload(); - } - else { - $('.error', $window).remove(); - $.each(response.errors, function(id, errors) { - $('#id_' + id, $window).before('' + errors[0] + ''); - }); - $('input[type=submit]', $window).removeAttr('disabled'); - return false; - } - } - }); - } - }).jqmShow(); - - }; - - - $('.ajax-form').each(function() { - var $form = $(this); - $form.ajaxForm({ - dataType: 'json', - beforeSubmit: function() { - $('input[type=submit]', $form) - .attr('disabled', 'disabled') - .after(''); - }, - error: function(response) { - if (response.status == 403) - login_and_retry($form); - }, - success: function(response) { - if (response.success) { - callback = ajax_form_callbacks[$form.attr('data-callback')]; - callback && callback($form, response); - - } else { - $('span.error', $form).remove(); - $.each(response.errors, function(id, errors) { - $('#id_' + id, $form).before('' + errors[0] + ''); - }); - $('input[type=submit]', $form).removeAttr('disabled'); - $('img', $form).remove(); - } - } - }); - }); - - - var update_star = function($elem, response) { - /* updates the star after successful ajax */ - var $star = $elem.closest('.star'); - if (response.like) { - $star.addClass('like'); - $star.removeClass('unlike'); - } - else { - $star.addClass('unlike'); - $star.removeClass('like'); - } - }; - - var ajax_form_callbacks = { - 'social-like-book': update_star - }; - - var ajaxable_callbacks = { - 'social-book-sets': location.reload - }; - - - - // check placeholder browser support - if (!Modernizr.input.placeholder) - { - // set placeholder values - $(this).find('[placeholder]').each(function() - { - $(this).val( $(this).attr('placeholder') ).addClass('placeholder'); - }); - - // focus and blur of placeholders - $('[placeholder]').focus(function() - { - if ($(this).val() == $(this).attr('placeholder')) - { - $(this).val(''); - $(this).removeClass('placeholder'); - } - }).blur(function() - { - if ($(this).val() == '' || $(this).val() == $(this).attr('placeholder')) - { - $(this).val($(this).attr('placeholder')); - $(this).addClass('placeholder'); - } - }); - - // remove placeholders on submit - $('[placeholder]').closest('form').submit(function() - { - $(this).find('[placeholder]').each(function() - { - if ($(this).val() == $(this).attr('placeholder')) - { - $(this).val(''); - } - }) - }); - } - - - - }); -})(jQuery) - diff --git a/wolnelektury/static/js/ierange-m2.js b/wolnelektury/static/js/ierange-m2.js deleted file mode 100644 index e87738b0c..000000000 --- a/wolnelektury/static/js/ierange-m2.js +++ /dev/null @@ -1,502 +0,0 @@ -/* - DOM Ranges for Internet Explorer (m2) - - Copyright (c) 2009 Tim Cameron Ryan - Released under the MIT/X License - */ - -/* - Range reference: - http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html - http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsRange.cpp - https://developer.mozilla.org/En/DOM:Range - Selection reference: - http://trac.webkit.org/browser/trunk/WebCore/page/DOMSelection.cpp - TextRange reference: - http://msdn.microsoft.com/en-us/library/ms535872.aspx - Other links: - http://jorgenhorstink.nl/test/javascript/range/range.js - http://jorgenhorstink.nl/2006/07/05/dom-range-implementation-in-ecmascript-completed/ - http://dylanschiemann.com/articles/dom2Range/dom2RangeExamples.html -*/ - -//[TODO] better exception support - -(function () { // sandbox - -/* - DOM functions - */ - -var DOMUtils = { - findChildPosition: function (node) { - for (var i = 0; node = node.previousSibling; i++) - continue; - return i; - }, - isDataNode: function (node) { - return node && node.nodeValue !== null && node.data !== null; - }, - isAncestorOf: function (parent, node) { - return !DOMUtils.isDataNode(parent) && - (parent.contains(DOMUtils.isDataNode(node) ? node.parentNode : node) || - node.parentNode == parent); - }, - isAncestorOrSelf: function (root, node) { - return DOMUtils.isAncestorOf(root, node) || root == node; - }, - findClosestAncestor: function (root, node) { - if (DOMUtils.isAncestorOf(root, node)) - while (node && node.parentNode != root) - node = node.parentNode; - return node; - }, - getNodeLength: function (node) { - return DOMUtils.isDataNode(node) ? node.length : node.childNodes.length; - }, - splitDataNode: function (node, offset) { - if (!DOMUtils.isDataNode(node)) - return false; - var newNode = node.cloneNode(false); - node.deleteData(offset, node.length); - newNode.deleteData(0, offset); - node.parentNode.insertBefore(newNode, node.nextSibling); - } -}; - -/* - Text Range utilities - functions to simplify text range manipulation in ie - */ - -var TextRangeUtils = { - convertToDOMRange: function (textRange, document) { - function adoptBoundary(domRange, textRange, bStart) { - // iterate backwards through parent element to find anchor location - var cursorNode = document.createElement('a'), cursor = textRange.duplicate(); - cursor.collapse(bStart); - var parent = cursor.parentElement(); - do { - parent.insertBefore(cursorNode, cursorNode.previousSibling); - cursor.moveToElementText(cursorNode); - } while (cursor.compareEndPoints(bStart ? 'StartToStart' : 'StartToEnd', textRange) > 0 && cursorNode.previousSibling); - - // when we exceed or meet the cursor, we've found the node - if (cursor.compareEndPoints(bStart ? 'StartToStart' : 'StartToEnd', textRange) == -1 && cursorNode.nextSibling) { - // data node - cursor.setEndPoint(bStart ? 'EndToStart' : 'EndToEnd', textRange); - domRange[bStart ? 'setStart' : 'setEnd'](cursorNode.nextSibling, cursor.text.length); - } else { - // element - domRange[bStart ? 'setStartBefore' : 'setEndBefore'](cursorNode); - } - cursorNode.parentNode.removeChild(cursorNode); - } - - // return a DOM range - var domRange = new DOMRange(document); - adoptBoundary(domRange, textRange, true); - adoptBoundary(domRange, textRange, false); - return domRange; - }, - - convertFromDOMRange: function (domRange) { - function adoptEndPoint(textRange, domRange, bStart) { - // find anchor node and offset - var container = domRange[bStart ? 'startContainer' : 'endContainer']; - var offset = domRange[bStart ? 'startOffset' : 'endOffset'], textOffset = 0; - var anchorNode = DOMUtils.isDataNode(container) ? container : container.childNodes[offset]; - var anchorParent = DOMUtils.isDataNode(container) ? container.parentNode : container; - // visible data nodes need a text offset - if (container.nodeType == 3 || container.nodeType == 4) - textOffset = offset; - - // create a cursor element node to position range (since we can't select text nodes) - var cursorNode = domRange._document.createElement('a'); - anchorParent.insertBefore(cursorNode, anchorNode); - var cursor = domRange._document.body.createTextRange(); - cursor.moveToElementText(cursorNode); - cursorNode.parentNode.removeChild(cursorNode); - // move range - textRange.setEndPoint(bStart ? 'StartToStart' : 'EndToStart', cursor); - textRange[bStart ? 'moveStart' : 'moveEnd']('character', textOffset); - } - - // return an IE text range - var textRange = domRange._document.body.createTextRange(); - adoptEndPoint(textRange, domRange, true); - adoptEndPoint(textRange, domRange, false); - return textRange; - } -}; - -/* - DOM Range - */ - -function DOMRange(document) { - // save document parameter - this._document = document; - - // initialize range -//[TODO] this should be located at document[0], document[0] - this.startContainer = this.endContainer = document.body; - this.endOffset = DOMUtils.getNodeLength(document.body); -} -DOMRange.START_TO_START = 0; -DOMRange.START_TO_END = 1; -DOMRange.END_TO_END = 2; -DOMRange.END_TO_START = 3; - -DOMRange.prototype = { - // public properties - startContainer: null, - startOffset: 0, - endContainer: null, - endOffset: 0, - commonAncestorContainer: null, - collapsed: false, - // private properties - _document: null, - - // private methods - _refreshProperties: function () { - // collapsed attribute - this.collapsed = (this.startContainer == this.endContainer && this.startOffset == this.endOffset); - // find common ancestor - var node = this.startContainer; - while (node && node != this.endContainer && !DOMUtils.isAncestorOf(node, this.endContainer)) - node = node.parentNode; - this.commonAncestorContainer = node; - }, - - // range methods -//[TODO] collapse if start is after end, end is before start - setStart: function(container, offset) { - this.startContainer = container; - this.startOffset = offset; - this._refreshProperties(); - }, - setEnd: function(container, offset) { - this.endContainer = container; - this.endOffset = offset; - this._refreshProperties(); - }, - setStartBefore: function (refNode) { - // set start to beore this node - this.setStart(refNode.parentNode, DOMUtils.findChildPosition(refNode)); - }, - setStartAfter: function (refNode) { - // select next sibling - this.setStart(refNode.parentNode, DOMUtils.findChildPosition(refNode) + 1); - }, - setEndBefore: function (refNode) { - // set end to beore this node - this.setEnd(refNode.parentNode, DOMUtils.findChildPosition(refNode)); - }, - setEndAfter: function (refNode) { - // select next sibling - this.setEnd(refNode.parentNode, DOMUtils.findChildPosition(refNode) + 1); - }, - selectNode: function (refNode) { - this.setStartBefore(refNode); - this.setEndAfter(refNode); - }, - selectNodeContents: function (refNode) { - this.setStart(refNode, 0); - this.setEnd(refNode, DOMUtils.getNodeLength(refNode)); - }, - collapse: function (toStart) { - if (toStart) - this.setEnd(this.startContainer, this.startOffset); - else - this.setStart(this.endContainer, this.endOffset); - }, - - // editing methods - cloneContents: function () { - // clone subtree - return (function cloneSubtree(iterator) { - for (var node, frag = document.createDocumentFragment(); node = iterator.next(); ) { - node = node.cloneNode(!iterator.hasPartialSubtree()); - if (iterator.hasPartialSubtree()) - node.appendChild(cloneSubtree(iterator.getSubtreeIterator())); - frag.appendChild(node); - } - return frag; - })(new RangeIterator(this)); - }, - extractContents: function () { - // cache range and move anchor points - var range = this.cloneRange(); - if (this.startContainer != this.commonAncestorContainer) - this.setStartAfter(DOMUtils.findClosestAncestor(this.commonAncestorContainer, this.startContainer)); - this.collapse(true); - // extract range - return (function extractSubtree(iterator) { - for (var node, frag = document.createDocumentFragment(); node = iterator.next(); ) { - iterator.hasPartialSubtree() ? node = node.cloneNode(false) : iterator.remove(); - if (iterator.hasPartialSubtree()) - node.appendChild(extractSubtree(iterator.getSubtreeIterator())); - frag.appendChild(node); - } - return frag; - })(new RangeIterator(range)); - }, - deleteContents: function () { - // cache range and move anchor points - var range = this.cloneRange(); - if (this.startContainer != this.commonAncestorContainer) - this.setStartAfter(DOMUtils.findClosestAncestor(this.commonAncestorContainer, this.startContainer)); - this.collapse(true); - // delete range - (function deleteSubtree(iterator) { - while (iterator.next()) - iterator.hasPartialSubtree() ? deleteSubtree(iterator.getSubtreeIterator()) : iterator.remove(); - })(new RangeIterator(range)); - }, - insertNode: function (newNode) { - // set original anchor and insert node - if (DOMUtils.isDataNode(this.startContainer)) { - DOMUtils.splitDataNode(this.startContainer, this.startOffset); - this.startContainer.parentNode.insertBefore(newNode, this.startContainer.nextSibling); - } else { - this.startContainer.insertBefore(newNode, this.startContainer.childNodes[this.startOffset]); - } - // resync start anchor - this.setStart(this.startContainer, this.startOffset); - }, - surroundContents: function (newNode) { - // extract and surround contents - var content = this.extractContents(); - this.insertNode(newNode); - newNode.appendChild(content); - this.selectNode(newNode); - }, - - // other methods - compareBoundaryPoints: function (how, sourceRange) { - // get anchors - var containerA, offsetA, containerB, offsetB; - switch (how) { - case DOMRange.START_TO_START: - case DOMRange.START_TO_END: - containerA = this.startContainer; - offsetA = this.startOffset; - break; - case DOMRange.END_TO_END: - case DOMRange.END_TO_START: - containerA = this.endContainer; - offsetA = this.endOffset; - break; - } - switch (how) { - case DOMRange.START_TO_START: - case DOMRange.END_TO_START: - containerB = sourceRange.startContainer; - offsetB = sourceRange.startOffset; - break; - case DOMRange.START_TO_END: - case DOMRange.END_TO_END: - containerB = sourceRange.endContainer; - offsetB = sourceRange.endOffset; - break; - } - - // compare - return containerA.sourceIndex < containerB.sourceIndex ? -1 : - containerA.sourceIndex == containerB.sourceIndex ? - offsetA < offsetB ? -1 : offsetA == offsetB ? 0 : 1 - : 1; - }, - cloneRange: function () { - // return cloned range - var range = new DOMRange(this._document); - range.setStart(this.startContainer, this.startOffset); - range.setEnd(this.endContainer, this.endOffset); - return range; - }, - detach: function () { -//[TODO] Releases Range from use to improve performance. - }, - toString: function () { - return TextRangeUtils.convertFromDOMRange(this).text; - }, - createContextualFragment: function (tagString) { - // parse the tag string in a context node - var content = (DOMUtils.isDataNode(this.startContainer) ? this.startContainer.parentNode : this.startContainer).cloneNode(false); - content.innerHTML = tagString; - // return a document fragment from the created node - for (var fragment = this._document.createDocumentFragment(); content.firstChild; ) - fragment.appendChild(content.firstChild); - return fragment; - } -}; - -/* - Range iterator - */ - -function RangeIterator(range) { - this.range = range; - if (range.collapsed) - return; - -//[TODO] ensure this works - // get anchors - var root = range.commonAncestorContainer; - this._next = range.startContainer == root && !DOMUtils.isDataNode(range.startContainer) ? - range.startContainer.childNodes[range.startOffset] : - DOMUtils.findClosestAncestor(root, range.startContainer); - this._end = range.endContainer == root && !DOMUtils.isDataNode(range.endContainer) ? - range.endContainer.childNodes[range.endOffset] : - DOMUtils.findClosestAncestor(root, range.endContainer).nextSibling; -} - -RangeIterator.prototype = { - // public properties - range: null, - // private properties - _current: null, - _next: null, - _end: null, - - // public methods - hasNext: function () { - return !!this._next; - }, - next: function () { - // move to next node - var current = this._current = this._next; - this._next = this._current && this._current.nextSibling != this._end ? - this._current.nextSibling : null; - - // check for partial text nodes - if (DOMUtils.isDataNode(this._current)) { - if (this.range.endContainer == this._current) - (current = current.cloneNode(true)).deleteData(this.range.endOffset, current.length - this.range.endOffset); - if (this.range.startContainer == this._current) - (current = current.cloneNode(true)).deleteData(0, this.range.startOffset); - } - return current; - }, - remove: function () { - // check for partial text nodes - if (DOMUtils.isDataNode(this._current) && - (this.range.startContainer == this._current || this.range.endContainer == this._current)) { - var start = this.range.startContainer == this._current ? this.range.startOffset : 0; - var end = this.range.endContainer == this._current ? this.range.endOffset : this._current.length; - this._current.deleteData(start, end - start); - } else - this._current.parentNode.removeChild(this._current); - }, - hasPartialSubtree: function () { - // check if this node be partially selected - return !DOMUtils.isDataNode(this._current) && - (DOMUtils.isAncestorOrSelf(this._current, this.range.startContainer) || - DOMUtils.isAncestorOrSelf(this._current, this.range.endContainer)); - }, - getSubtreeIterator: function () { - // create a new range - var subRange = new DOMRange(this.range._document); - subRange.selectNodeContents(this._current); - // handle anchor points - if (DOMUtils.isAncestorOrSelf(this._current, this.range.startContainer)) - subRange.setStart(this.range.startContainer, this.range.startOffset); - if (DOMUtils.isAncestorOrSelf(this._current, this.range.endContainer)) - subRange.setEnd(this.range.endContainer, this.range.endOffset); - // return iterator - return new RangeIterator(subRange); - } -}; - -/* - DOM Selection - */ - -//[NOTE] This is a very shallow implementation of the Selection object, based on Webkit's -// implementation and without redundant features. Complete selection manipulation is still -// possible with just removeAllRanges/addRange/getRangeAt. - -function DOMSelection(document) { - // save document parameter - this._document = document; - - // add DOM selection handler - var selection = this; - document.attachEvent('onselectionchange', function () { selection._selectionChangeHandler(); }); -} - -DOMSelection.prototype = { - // public properties - rangeCount: 0, - // private properties - _document: null, - - // private methods - _selectionChangeHandler: function () { - // check if there exists a range - this.rangeCount = this._selectionExists(this._document.selection.createRange()) ? 1 : 0; - }, - _selectionExists: function (textRange) { - // checks if a created text range exists or is an editable cursor - return textRange.compareEndPoints('StartToEnd', textRange) != 0 || - textRange.parentElement().isContentEditable; - }, - - // public methods - addRange: function (range) { - // add range or combine with existing range - var selection = this._document.selection.createRange(), textRange = TextRangeUtils.convertFromDOMRange(range); - if (!this._selectionExists(selection)) - { - // select range - textRange.select(); - } - else - { - // only modify range if it intersects with current range - if (textRange.compareEndPoints('StartToStart', selection) == -1) - if (textRange.compareEndPoints('StartToEnd', selection) > -1 && - textRange.compareEndPoints('EndToEnd', selection) == -1) - selection.setEndPoint('StartToStart', textRange); - else - if (textRange.compareEndPoints('EndToStart', selection) < 1 && - textRange.compareEndPoints('EndToEnd', selection) > -1) - selection.setEndPoint('EndToEnd', textRange); - selection.select(); - } - }, - removeAllRanges: function () { - // remove all ranges - this._document.selection.empty(); - }, - getRangeAt: function (index) { - // return any existing selection, or a cursor position in content editable mode - var textRange = this._document.selection.createRange(); - if (this._selectionExists(textRange)) - return TextRangeUtils.convertToDOMRange(textRange, this._document); - return null; - }, - toString: function () { - // get selection text - return this._document.selection.createRange().text; - } -}; - -/* - scripting hooks - */ - -document.createRange = function () { - return new DOMRange(document); -}; - -var selection = new DOMSelection(document); -window.getSelection = function () { - return selection; -}; - -//[TODO] expose DOMRange/DOMSelection to window.? - -})(); diff --git a/wolnelektury/static/js/jquery-ui-1.8.16.custom.min.js b/wolnelektury/static/js/jquery-ui-1.8.16.custom.min.js deleted file mode 100644 index a9c6fa316..000000000 --- a/wolnelektury/static/js/jquery-ui-1.8.16.custom.min.js +++ /dev/null @@ -1,149 +0,0 @@ -/*! - * jQuery UI 1.8.16 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI - */ -(function(c,j){function k(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&l(a)}return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)}function l(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.16", -keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({propAttr:c.fn.prop||c.fn.attr,_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d= -this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this, -"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart": -"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,m,n){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight, -outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return k(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a, -"tabindex"),d=isNaN(b);return(d||b>=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&& -a.element[0].parentNode)for(var e=0;e0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted= -false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery); -;/* - * jQuery UI Position 1.8.16 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Position - */ -(function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY, -left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+= -k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+(parseInt(c.curCSS(this,"marginRight",true))||0),w=m+q+(parseInt(c.curCSS(this,"marginBottom",true))||0),i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-= -m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left= -d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+= -a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b), -g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery); -;/* - * jQuery UI Draggable 1.8.16 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Draggables - * - * Depends: - * jquery.ui.core.js - * jquery.ui.mouse.js - * jquery.ui.widget.js - */ -(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper== -"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b= -this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;if(b.iframeFix)d(b.iframeFix===true?"iframe":b.iframeFix).each(function(){d('
          ').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")});return true},_mouseStart:function(a){var b=this.options; -this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}); -this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);d.ui.ddmanager&&d.ui.ddmanager.dragStart(this,a);return true}, -_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b= -false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration, -10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},_mouseUp:function(a){this.options.iframeFix===true&&d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});d.ui.ddmanager&&d.ui.ddmanager.dragStop(this,a);return d.ui.mouse.prototype._mouseUp.call(this,a)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle|| -!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone().removeAttr("id"):this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&& -a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent= -this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"), -10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"), -10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[a.containment=="document"?0:d(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a.containment=="document"?0:d(window).scrollTop()-this.offset.relative.top-this.offset.parent.top, -(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){a=d(a.containment);var b=a[0];if(b){a.offset();var c=d(b).css("overflow")!= -"hidden";this.containment=[(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0),(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0),(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"), -10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=a}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+ -this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&& -!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,h=a.pageY;if(this.originalPosition){var g;if(this.containment){if(this.relative_container){g=this.relative_container.offset();g=[this.containment[0]+g.left,this.containment[1]+g.top,this.containment[2]+g.left,this.containment[3]+g.top]}else g=this.containment;if(a.pageX-this.offset.click.leftg[2])e=g[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>g[3])h=g[3]+this.offset.click.top}if(b.grid){h=b.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/b.grid[1])*b.grid[1]:this.originalPageY;h=g?!(h-this.offset.click.topg[3])?h:!(h-this.offset.click.topg[2])?e:!(e-this.offset.click.left=0;i--){var j=c.snapElements[i].left,l=j+c.snapElements[i].width,k=c.snapElements[i].top,m=k+c.snapElements[i].height;if(j-e").addClass("ui-autocomplete").appendTo(d(this.options.appendTo||"body",b)[0]).mousedown(function(c){var f=a.menu.element[0];d(c.target).closest(".ui-menu-item").length||setTimeout(function(){d(document).one("mousedown",function(h){h.target!==a.element[0]&&h.target!==f&&!d.ui.contains(f,h.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(c,f){f=f.item.data("item.autocomplete");false!==a._trigger("focus",c,{item:f})&&/^key/.test(c.originalEvent.type)&& -a.element.val(f.value)},selected:function(c,f){var h=f.item.data("item.autocomplete"),i=a.previous;if(a.element[0]!==b.activeElement){a.element.focus();a.previous=i;setTimeout(function(){a.previous=i;a.selectedItem=h},1)}false!==a._trigger("select",c,{item:h})&&a.element.val(h.value);a.term=a.element.val();a.close(c);a.selectedItem=h},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"); -d.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();d.Widget.prototype.destroy.call(this)},_setOption:function(a,b){d.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource();if(a==="appendTo")this.menu.element.appendTo(d(b||"body",this.element[0].ownerDocument)[0]);a==="disabled"&& -b&&this.xhr&&this.xhr.abort()},_initSource:function(){var a=this,b,g;if(d.isArray(this.options.source)){b=this.options.source;this.source=function(c,f){f(d.ui.autocomplete.filter(b,c.term))}}else if(typeof this.options.source==="string"){g=this.options.source;this.source=function(c,f){a.xhr&&a.xhr.abort();a.xhr=d.ajax({url:g,data:c,dataType:"json",autocompleteRequest:++e,success:function(h){this.autocompleteRequest===e&&f(h)},error:function(){this.autocompleteRequest===e&&f([])}})}}else this.source= -this.options.source},search:function(a,b){a=a!=null?a:this.element.val();this.term=this.element.val();if(a.length").data("item.autocomplete",b).append(d("").text(b.label)).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](b);else this.search(null,b)},widget:function(){return this.menu.element}});d.extend(d.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, -"\\$&")},filter:function(a,b){var g=new RegExp(d.ui.autocomplete.escapeRegex(b),"i");return d.grep(a,function(c){return g.test(c.label||c.value||c)})}})})(jQuery); -(function(d){d.widget("ui.menu",{_create:function(){var e=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(a){if(d(a.target).closest(".ui-menu-item a").length){a.preventDefault();e.select(a)}});this.refresh()},refresh:function(){var e=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex", --1).mouseenter(function(a){e.activate(a,d(this).parent())}).mouseleave(function(){e.deactivate()})},activate:function(e,a){this.deactivate();if(this.hasScroll()){var b=a.offset().top-this.element.offset().top,g=this.element.scrollTop(),c=this.element.height();if(b<0)this.element.scrollTop(g+b);else b>=c&&this.element.scrollTop(g+b-c+a.height())}this.active=a.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",e,{item:a})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id"); -this._trigger("blur");this.active=null}},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,a,b){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0);e.length?this.activate(b,e):this.activate(b,this.element.children(a))}else this.activate(b, -this.element.children(a))},nextPage:function(e){if(this.hasScroll())if(!this.active||this.last())this.activate(e,this.element.children(".ui-menu-item:first"));else{var a=this.active.offset().top,b=this.element.height(),g=this.element.children(".ui-menu-item").filter(function(){var c=d(this).offset().top-a-b+d(this).height();return c<10&&c>-10});g.length||(g=this.element.children(".ui-menu-item:last"));this.activate(e,g)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active|| -this.last()?":first":":last"))},previousPage:function(e){if(this.hasScroll())if(!this.active||this.first())this.activate(e,this.element.children(".ui-menu-item:last"));else{var a=this.active.offset().top,b=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var g=d(this).offset().top-a+b-d(this).height();return g<10&&g>-10});result.length||(result=this.element.children(".ui-menu-item:first"));this.activate(e,result)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active|| -this.first()?":last":":first"))},hasScroll:function(){return this.element.height()0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a=0)&&c(a).is(":focusable")}})}})(jQuery); -;/*! - * jQuery UI Widget 1.8.2 - * - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * http://docs.jquery.com/UI/Widget - */ -(function(b){var j=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add(this).each(function(){b(this).triggerHandler("remove")});return j.call(b(this),a,c)})};b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend({},c.options);b[e][a].prototype= -b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.substring(0,1)==="_")return h;e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==undefined){h=i;return false}}):this.each(function(){var g= -b.data(this,a);if(g){d&&g.option(d);g._init()}else b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){this.element=b(c).data(this.widgetName,this);this.options=b.extend(true,{},this.options,b.metadata&&b.metadata.get(c)[this.widgetName],a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create(); -this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(a,c){var d=a,e=this;if(arguments.length===0)return b.extend({},e.options);if(typeof a==="string"){if(c===undefined)return this.options[a];d={};d[a]=c}b.each(d,function(f, -h){e._setOption(f,h)});return e},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a= -b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery); -;/* - * jQuery UI Position 1.8.2 - * - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * http://docs.jquery.com/UI/Position - */ -(function(c){c.ui=c.ui||{};var m=/left|center|right/,n=/top|center|bottom/,p=c.fn.position,q=c.fn.offset;c.fn.position=function(a){if(!a||!a.of)return p.apply(this,arguments);a=c.extend({},a);var b=c(a.of),d=(a.collision||"flip").split(" "),e=a.offset?a.offset.split(" "):[0,0],g,h,i;if(a.of.nodeType===9){g=b.width();h=b.height();i={top:0,left:0}}else if(a.of.scrollTo&&a.of.document){g=b.width();h=b.height();i={top:b.scrollTop(),left:b.scrollLeft()}}else if(a.of.preventDefault){a.at="left top";g=h= -0;i={top:a.of.pageY,left:a.of.pageX}}else{g=b.outerWidth();h=b.outerHeight();i=b.offset()}c.each(["my","at"],function(){var f=(a[this]||"").split(" ");if(f.length===1)f=m.test(f[0])?f.concat(["center"]):n.test(f[0])?["center"].concat(f):["center","center"];f[0]=m.test(f[0])?f[0]:"center";f[1]=n.test(f[1])?f[1]:"center";a[this]=f});if(d.length===1)d[1]=d[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(a.at[0]==="right")i.left+=g;else if(a.at[0]==="center")i.left+= -g/2;if(a.at[1]==="bottom")i.top+=h;else if(a.at[1]==="center")i.top+=h/2;i.left+=e[0];i.top+=e[1];return this.each(function(){var f=c(this),k=f.outerWidth(),l=f.outerHeight(),j=c.extend({},i);if(a.my[0]==="right")j.left-=k;else if(a.my[0]==="center")j.left-=k/2;if(a.my[1]==="bottom")j.top-=l;else if(a.my[1]==="center")j.top-=l/2;j.left=parseInt(j.left);j.top=parseInt(j.top);c.each(["left","top"],function(o,r){c.ui.position[d[o]]&&c.ui.position[d[o]][r](j,{targetWidth:g,targetHeight:h,elemWidth:k, -elemHeight:l,offset:e,my:a.my,at:a.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(j,{using:a.using}))})};c.ui.position={fit:{left:function(a,b){var d=c(window);b=a.left+b.elemWidth-d.width()-d.scrollLeft();a.left=b>0?a.left-b:Math.max(0,a.left)},top:function(a,b){var d=c(window);b=a.top+b.elemHeight-d.height()-d.scrollTop();a.top=b>0?a.top-b:Math.max(0,a.top)}},flip:{left:function(a,b){if(b.at[0]!=="center"){var d=c(window);d=a.left+b.elemWidth-d.width()-d.scrollLeft();var e=b.my[0]==="left"? --b.elemWidth:b.my[0]==="right"?b.elemWidth:0,g=-2*b.offset[0];a.left+=a.left<0?e+b.targetWidth+g:d>0?e-b.targetWidth+g:0}},top:function(a,b){if(b.at[1]!=="center"){var d=c(window);d=a.top+b.elemHeight-d.height()-d.scrollTop();var e=b.my[1]==="top"?-b.elemHeight:b.my[1]==="bottom"?b.elemHeight:0,g=b.at[1]==="top"?b.targetHeight:-b.targetHeight,h=-2*b.offset[1];a.top+=a.top<0?e+b.targetHeight+h:d>0?e+g+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(a,b){if(/static/.test(c.curCSS(a,"position")))a.style.position= -"relative";var d=c(a),e=d.offset(),g=parseInt(c.curCSS(a,"top",true),10)||0,h=parseInt(c.curCSS(a,"left",true),10)||0;e={top:b.top-e.top+g,left:b.left-e.left+h};"using"in b?b.using.call(a,e):d.css(e)};c.fn.offset=function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(){c.offset.setOffset(this,a)});return q.call(this)}}})(jQuery); -;/* - * jQuery UI Autocomplete 1.8.2 - * - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * http://docs.jquery.com/UI/Autocomplete - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - * jquery.ui.position.js - */ -(function(e){e.widget("ui.autocomplete",{options:{minLength:1,delay:300},_create:function(){var a=this,c=this.element[0].ownerDocument;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(d){var b=e.ui.keyCode;switch(d.keyCode){case b.PAGE_UP:a._move("previousPage",d);break;case b.PAGE_DOWN:a._move("nextPage",d);break;case b.UP:a._move("previous",d);d.preventDefault(); -break;case b.DOWN:a._move("next",d);d.preventDefault();break;case b.ENTER:case b.NUMPAD_ENTER:a.menu.active&&d.preventDefault();case b.TAB:if(!a.menu.active)return;a.menu.select(d);break;case b.ESCAPE:a.element.val(a.term);a.close(d);break;case b.LEFT:case b.RIGHT:case b.SHIFT:case b.CONTROL:case b.ALT:case b.COMMAND:case b.COMMAND_RIGHT:case b.INSERT:case b.CAPS_LOCK:case b.END:case b.HOME:break;default:clearTimeout(a.searching);a.searching=setTimeout(function(){a.search(null,d)},a.options.delay); -break}}).bind("focus.autocomplete",function(){a.selectedItem=null;a.previous=a.element.val()}).bind("blur.autocomplete",function(d){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(d);a._change(d)},150)});this._initSource();this.response=function(){return a._response.apply(a,arguments)};this.menu=e("
            ").addClass("ui-autocomplete").appendTo("body",c).mousedown(function(){setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(d,b){b=b.item.data("item.autocomplete"); -false!==a._trigger("focus",null,{item:b})&&/^key/.test(d.originalEvent.type)&&a.element.val(b.value)},selected:function(d,b){b=b.item.data("item.autocomplete");false!==a._trigger("select",d,{item:b})&&a.element.val(b.value);a.close(d);d=a.previous;if(a.element[0]!==c.activeElement){a.element.focus();a.previous=d}a.selectedItem=b},blur:function(){a.menu.element.is(":visible")&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");e.fn.bgiframe&&this.menu.element.bgiframe()}, -destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();e.Widget.prototype.destroy.call(this)},_setOption:function(a){e.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource()},_initSource:function(){var a,c;if(e.isArray(this.options.source)){a=this.options.source;this.source=function(d,b){b(e.ui.autocomplete.filter(a,d.term))}}else if(typeof this.options.source=== -"string"){c=this.options.source;this.source=function(d,b){e.getJSON(c,d,b)}}else this.source=this.options.source},search:function(a,c){a=a!=null?a:this.element.val();if(a.length").data("item.autocomplete", -c).append(""+c.label+"").appendTo(a)},_move:function(a,c){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](c);else this.search(null,c)},widget:function(){return this.menu.element}});e.extend(e.ui.autocomplete,{escapeRegex:function(a){return a.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")},filter:function(a,c){var d=new RegExp(e.ui.autocomplete.escapeRegex(c), -"i");return e.grep(a,function(b){return d.test(b.label||b.value||b)})}})})(jQuery); -(function(e){e.widget("ui.menu",{_create:function(){var a=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(e(c.target).closest(".ui-menu-item a").length){c.preventDefault();a.select(c)}});this.refresh()},refresh:function(){var a=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex", --1).mouseenter(function(c){a.activate(c,e(this).parent())}).mouseleave(function(){a.deactivate()})},activate:function(a,c){this.deactivate();if(this.hasScroll()){var d=c.offset().top-this.element.offset().top,b=this.element.attr("scrollTop"),f=this.element.height();if(d<0)this.element.attr("scrollTop",b+d);else d>f&&this.element.attr("scrollTop",b+d-f+c.height())}this.active=c.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",a,{item:c})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id"); -this._trigger("blur");this.active=null}},next:function(a){this.move("next",".ui-menu-item:first",a)},previous:function(a){this.move("prev",".ui-menu-item:last",a)},first:function(){return this.active&&!this.active.prev().length},last:function(){return this.active&&!this.active.next().length},move:function(a,c,d){if(this.active){a=this.active[a+"All"](".ui-menu-item").eq(0);a.length?this.activate(d,a):this.activate(d,this.element.children(c))}else this.activate(d,this.element.children(c))},nextPage:function(a){if(this.hasScroll())if(!this.active|| -this.last())this.activate(a,this.element.children(":first"));else{var c=this.active.offset().top,d=this.element.height(),b=this.element.children("li").filter(function(){var f=e(this).offset().top-c-d+e(this).height();return f<10&&f>-10});b.length||(b=this.element.children(":last"));this.activate(a,b)}else this.activate(a,this.element.children(!this.active||this.last()?":first":":last"))},previousPage:function(a){if(this.hasScroll())if(!this.active||this.first())this.activate(a,this.element.children(":last")); -else{var c=this.active.offset().top,d=this.element.height();result=this.element.children("li").filter(function(){var b=e(this).offset().top-c+d-e(this).height();return b<10&&b>-10});result.length||(result=this.element.children(":first"));this.activate(a,result)}else this.activate(a,this.element.children(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height() 1 && !select.visible() ) { - onChange(0, true); - } - }).bind("search", function() { - // TODO why not just specifying both arguments? - var fn = (arguments.length > 1) ? arguments[1] : null; - function findValueCallback(q, data) { - var result; - if( data && data.length ) { - for (var i=0; i < data.length; i++) { - if( data[i].result.toLowerCase() == q.toLowerCase() ) { - result = data[i]; - break; - } - } - } - if( typeof fn == "function" ) fn(result); - else $input.trigger("result", result && [result.data, result.value]); - } - $.each(trimWords($input.val()), function(i, value) { - request(value, findValueCallback, findValueCallback); - }); - }).bind("flushCache", function() { - cache.flush(); - }).bind("setOptions", function() { - $.extend(options, arguments[1]); - // if we've updated the data, repopulate - if ( "data" in arguments[1] ) - cache.populate(); - }).bind("unautocomplete", function() { - select.unbind(); - $input.unbind(); - $(input.form).unbind(".autocomplete"); - }); - - - function selectCurrent() { - var selected = select.selected(); - if( !selected ) - return false; - - var v = selected.result; - previousValue = v; - - if ( options.multiple ) { - var words = trimWords($input.val()); - if ( words.length > 1 ) { - var seperator = options.multipleSeparator.length; - var cursorAt = $(input).selection().start; - var wordAt, progress = 0; - $.each(words, function(i, word) { - progress += word.length; - if (cursorAt <= progress) { - wordAt = i; - return false; - } - progress += seperator; - }); - words[wordAt] = v; - // TODO this should set the cursor to the right position, but it gets overriden somewhere - //$.Autocompleter.Selection(input, progress + seperator, progress + seperator); - v = words.join( options.multipleSeparator ); - } - v += options.multipleSeparator; - } - - $input.val(v); - hideResultsNow(); - $input.trigger("result", [selected.data, selected.value]); - return true; - } - - function onChange(crap, skipPrevCheck) { - if( lastKeyPressCode == KEY.DEL ) { - select.hide(); - return; - } - - var currentValue = $input.val(); - - if ( !skipPrevCheck && currentValue == previousValue ) - return; - - previousValue = currentValue; - - currentValue = lastWord(currentValue); - if ( currentValue.length >= options.minChars) { - $input.addClass(options.loadingClass); - if (!options.matchCase) - currentValue = currentValue.toLowerCase(); - request(currentValue, receiveData, hideResultsNow); - } else { - stopLoading(); - select.hide(); - } - }; - - function trimWords(value) { - if (!value) - return [""]; - if (!options.multiple) - return [$.trim(value)]; - return $.map(value.split(options.multipleSeparator), function(word) { - return $.trim(value).length ? $.trim(word) : null; - }); - } - - function lastWord(value) { - if ( !options.multiple ) - return value; - var words = trimWords(value); - if (words.length == 1) - return words[0]; - var cursorAt = $(input).selection().start; - if (cursorAt == value.length) { - words = trimWords(value) - } else { - words = trimWords(value.replace(value.substring(cursorAt), "")); - } - return words[words.length - 1]; - } - - // fills in the input box w/the first match (assumed to be the best match) - // q: the term entered - // sValue: the first matching result - function autoFill(q, sValue){ - // autofill in the complete box w/the first match as long as the user hasn't entered in more data - // if the last user key pressed was backspace, don't autofill - if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) { - // fill in the value (keep the case the user has typed) - $input.val($input.val() + sValue.substring(lastWord(previousValue).length)); - // select the portion of the value not typed by the user (so the next character will erase) - $(input).selection(previousValue.length, previousValue.length + sValue.length); - } - }; - - function hideResults() { - clearTimeout(timeout); - timeout = setTimeout(hideResultsNow, 200); - }; - - function hideResultsNow() { - var wasVisible = select.visible(); - select.hide(); - clearTimeout(timeout); - stopLoading(); - if (options.mustMatch) { - // call search and run callback - $input.search( - function (result){ - // if no value found, clear the input box - if( !result ) { - if (options.multiple) { - var words = trimWords($input.val()).slice(0, -1); - $input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") ); - } - else { - $input.val( "" ); - $input.trigger("result", null); - } - } - } - ); - } - }; - - function receiveData(q, data) { - if ( data && data.length && hasFocus ) { - stopLoading(); - select.display(data, q); - autoFill(q, data[0].value); - select.show(); - } else { - hideResultsNow(); - } - }; - - function request(term, success, failure) { - if (!options.matchCase) - term = term.toLowerCase(); - var data = cache.load(term); - // recieve the cached data - if (data && data.length) { - success(term, data); - // if an AJAX url has been supplied, try loading the data now - } else if( (typeof options.url == "string") && (options.url.length > 0) ){ - - var extraParams = { - timestamp: +new Date() - }; - $.each(options.extraParams, function(key, param) { - extraParams[key] = typeof param == "function" ? param() : param; - }); - - $.ajax({ - // try to leverage ajaxQueue plugin to abort previous requests - mode: "abort", - // limit abortion to this input - port: "autocomplete" + input.name, - dataType: options.dataType, - url: options.url, - data: $.extend({ - q: lastWord(term), - limit: options.max - }, extraParams), - success: function(data) { - var parsed = options.parse && options.parse(data) || parse(data); - cache.add(term, parsed); - success(term, parsed); - } - }); - } else { - // if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match - select.emptyList(); - failure(term); - } - }; - - function parse(data) { - var parsed = []; - var rows = data.split("\n"); - for (var i=0; i < rows.length; i++) { - var row = $.trim(rows[i]); - if (row) { - row = row.split("|"); - parsed[parsed.length] = { - data: row, - value: row[0], - result: options.formatResult && options.formatResult(row, row[0]) || row[0] - }; - } - } - return parsed; - }; - - function stopLoading() { - $input.removeClass(options.loadingClass); - }; - -}; - -$.Autocompleter.defaults = { - inputClass: "ac_input", - resultsClass: "ac_results", - loadingClass: "ac_loading", - minChars: 1, - delay: 400, - matchCase: false, - matchSubset: true, - matchContains: false, - cacheLength: 10, - max: 100, - mustMatch: false, - extraParams: {}, - selectFirst: true, - formatItem: function(row) { return row[0]; }, - formatMatch: null, - autoFill: false, - width: 0, - multiple: false, - multipleSeparator: ", ", - regex_escape: function(term) { - term = term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1"); - /* no polish diacritics; should be more locale-aware */ - term = term.replace(/a/g, '[aą]') - .replace(/c/g, '[cć]') - .replace(/e/g, '[eę]') - .replace(/l/g, '[lł]') - .replace(/n/g, '[nń]') - .replace(/o/g, '[oó]') - .replace(/s/g, '[sś]') - .replace(/z/g, '[zźż]'); - return term; - }, - highlight: function(value, term) { - term = $.Autocompleter.defaults.regex_escape(term); - return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "$1"); - }, - scroll: true, - scrollHeight: 180 -}; - -$.Autocompleter.Cache = function(options) { - - var data = {}; - var length = 0; - - function matchSubset(s, sub) { - if (!options.matchCase) - s = s.toLowerCase(); - var i = s.indexOf(sub); - if (options.matchContains == "word"){ - query = $.Autocompleter.defaults.regex_escape(sub.toLowerCase()); - i = s.toLowerCase().search("\\b" + query); - } - if (i == -1) return false; - return i == 0 || options.matchContains; - }; - - function add(q, value) { - if (length > options.cacheLength){ - flush(); - } - if (!data[q]){ - length++; - } - data[q] = value; - } - - function populate(){ - if( !options.data ) return false; - // track the matches - var stMatchSets = {}, - nullData = 0; - - // no url was specified, we need to adjust the cache length to make sure it fits the local data store - if( !options.url ) options.cacheLength = 1; - - // track all options for minChars = 0 - stMatchSets[""] = []; - - // loop through the array and create a lookup structure - for ( var i = 0, ol = options.data.length; i < ol; i++ ) { - var rawValue = options.data[i]; - // if rawValue is a string, make an array otherwise just reference the array - rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue; - - var value = options.formatMatch(rawValue, i+1, options.data.length); - if ( value === false ) - continue; - - var firstChar = value.charAt(0).toLowerCase(); - // if no lookup array for this character exists, look it up now - if( !stMatchSets[firstChar] ) - stMatchSets[firstChar] = []; - - // if the match is a string - var row = { - value: value, - data: rawValue, - result: options.formatResult && options.formatResult(rawValue) || value - }; - - // push the current match into the set list - stMatchSets[firstChar].push(row); - - // keep track of minChars zero items - if ( nullData++ < options.max ) { - stMatchSets[""].push(row); - } - }; - - // add the data items to the cache - $.each(stMatchSets, function(i, value) { - // increase the cache size - options.cacheLength++; - // add to the cache - add(i, value); - }); - } - - // populate any existing data - setTimeout(populate, 25); - - function flush(){ - data = {}; - length = 0; - } - - return { - flush: flush, - add: add, - populate: populate, - load: function(q) { - if (!options.cacheLength || !length) - return null; - /* - * if dealing w/local data and matchContains than we must make sure - * to loop through all the data collections looking for matches - */ - if( !options.url && options.matchContains ){ - // track all matches - var csub = []; - // loop through all the data grids for matches - for( var k in data ){ - // don't search through the stMatchSets[""] (minChars: 0) cache - // this prevents duplicates - if( k.length > 0 ){ - var c = data[k]; - $.each(c, function(i, x) { - // if we've got a match, add it to the array - if (matchSubset(x.value, q)) { - csub.push(x); - } - }); - } - } - return csub; - } else - // if the exact item exists, use it - if (data[q]){ - return data[q]; - } else - if (options.matchSubset) { - for (var i = q.length - 1; i >= options.minChars; i--) { - var c = data[q.substr(0, i)]; - if (c) { - var csub = []; - $.each(c, function(i, x) { - if (matchSubset(x.value, q)) { - csub[csub.length] = x; - } - }); - return csub; - } - } - } - return null; - } - }; -}; - -$.Autocompleter.Select = function (options, input, select, config) { - var CLASSES = { - ACTIVE: "ac_over" - }; - - var listItems, - active = -1, - data, - term = "", - needsInit = true, - element, - list; - - // Create results - function init() { - if (!needsInit) - return; - element = $("
            ") - .hide() - .addClass(options.resultsClass) - .css("position", "absolute") - .appendTo(document.body); - - list = $("
              ").appendTo(element).mouseover( function(event) { - if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') { - active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event)); - $(target(event)).addClass(CLASSES.ACTIVE); - } - }).click(function(event) { - $(target(event)).addClass(CLASSES.ACTIVE); - select(); - // TODO provide option to avoid setting focus again after selection? useful for cleanup-on-focus - input.focus(); - return false; - }).mousedown(function() { - config.mouseDownOnSelect = true; - }).mouseup(function() { - config.mouseDownOnSelect = false; - }); - - if( options.width > 0 ) - element.css("width", options.width); - - needsInit = false; - } - - function target(event) { - var element = event.target; - while(element && element.tagName != "LI") - element = element.parentNode; - // more fun with IE, sometimes event.target is empty, just ignore it then - if(!element) - return []; - return element; - } - - function moveSelect(step) { - listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE); - movePosition(step); - var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE); - if(options.scroll) { - var offset = 0; - listItems.slice(0, active).each(function() { - offset += this.offsetHeight; - }); - if((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) { - list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight()); - } else if(offset < list.scrollTop()) { - list.scrollTop(offset); - } - } - }; - - function movePosition(step) { - active += step; - if (active < 0) { - active = listItems.size() - 1; - } else if (active >= listItems.size()) { - active = 0; - } - } - - function limitNumberOfItems(available) { - return options.max && options.max < available - ? options.max - : available; - } - - function fillList() { - list.empty(); - var max = limitNumberOfItems(data.length); - for (var i=0; i < max; i++) { - if (!data[i]) - continue; - var formatted = options.formatItem(data[i].data, i+1, max, data[i].value, term); - if ( formatted === false ) - continue; - var li = $("
            • ").html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? "ac_even" : "ac_odd").appendTo(list)[0]; - $.data(li, "ac_data", data[i]); - } - listItems = list.find("li"); - if ( options.selectFirst ) { - listItems.slice(0, 1).addClass(CLASSES.ACTIVE); - active = 0; - } - // apply bgiframe if available - if ( $.fn.bgiframe ) - list.bgiframe(); - } - - return { - display: function(d, q) { - init(); - data = d; - term = q; - fillList(); - }, - next: function() { - moveSelect(1); - }, - prev: function() { - moveSelect(-1); - }, - pageUp: function() { - if (active != 0 && active - 8 < 0) { - moveSelect( -active ); - } else { - moveSelect(-8); - } - }, - pageDown: function() { - if (active != listItems.size() - 1 && active + 8 > listItems.size()) { - moveSelect( listItems.size() - 1 - active ); - } else { - moveSelect(8); - } - }, - hide: function() { - element && element.hide(); - listItems && listItems.removeClass(CLASSES.ACTIVE); - active = -1; - }, - visible : function() { - return element && element.is(":visible"); - }, - current: function() { - return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]); - }, - show: function() { - var offset = $(input).offset(); - element.css({ - width: typeof options.width == "string" || options.width > 0 ? options.width : $(input).width(), - top: offset.top + input.offsetHeight, - left: offset.left - }).show(); - if(options.scroll) { - list.scrollTop(0); - list.css({ - maxHeight: options.scrollHeight, - overflow: 'auto' - }); - - if($.browser.msie && typeof document.body.style.maxHeight === "undefined") { - var listHeight = 0; - listItems.each(function() { - listHeight += this.offsetHeight; - }); - var scrollbarsVisible = listHeight > options.scrollHeight; - list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight ); - if (!scrollbarsVisible) { - // IE doesn't recalculate width when scrollbar disappears - listItems.width( list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")) ); - } - } - - } - }, - selected: function() { - var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE); - return selected && selected.length && $.data(selected[0], "ac_data"); - }, - emptyList: function (){ - list && list.empty(); - }, - unbind: function() { - element && element.remove(); - } - }; -}; - -$.fn.selection = function(start, end) { - if (start !== undefined) { - return this.each(function() { - if( this.createTextRange ){ - var selRange = this.createTextRange(); - if (end === undefined || start == end) { - selRange.move("character", start); - selRange.select(); - } else { - selRange.collapse(true); - selRange.moveStart("character", start); - selRange.moveEnd("character", end); - selRange.select(); - } - } else if( this.setSelectionRange ){ - this.setSelectionRange(start, end); - } else if( this.selectionStart ){ - this.selectionStart = start; - this.selectionEnd = end; - } - }); - } - var field = this[0]; - if ( field.createTextRange ) { - var range = document.selection.createRange(), - orig = field.value, - teststring = "<->", - textLength = range.text.length; - range.text = teststring; - var caretAt = field.value.indexOf(teststring); - field.value = orig; - this.selection(caretAt, caretAt + textLength); - return { - start: caretAt, - end: caretAt + textLength - } - } else if( field.selectionStart !== undefined ){ - return { - start: field.selectionStart, - end: field.selectionEnd - } - } -}; - -})(jQuery); \ No newline at end of file diff --git a/wolnelektury/static/js/jquery.countdown-de.js b/wolnelektury/static/js/jquery.countdown-de.js deleted file mode 100644 index 5a3f43d78..000000000 --- a/wolnelektury/static/js/jquery.countdown-de.js +++ /dev/null @@ -1,12 +0,0 @@ -/* http://keith-wood.name/countdown.html - German initialisation for the jQuery countdown extension - Written by Keith Wood (kbwood@virginbroadband.com.au) Jan 2008. */ -(function($) { - $.countdown.regional['de'] = { - labels: ['Jahren', 'Monate', 'Wochen', 'Tage', 'Stunden', 'Minuten', 'Sekunden'], - labels1: ['Jahre', 'Monat', 'Woche', 'Tag', 'Stunde', 'Minute', 'Sekunde'], - compactLabels: ['J', 'M', 'W', 'T'], - whichLabels: null, - timeSeparator: ':', isRTL: false}; - $.countdown.setDefaults($.countdown.regional['de']); -})(jQuery); diff --git a/wolnelektury/static/js/jquery.countdown-es.js b/wolnelektury/static/js/jquery.countdown-es.js deleted file mode 100644 index 362f58c7d..000000000 --- a/wolnelektury/static/js/jquery.countdown-es.js +++ /dev/null @@ -1,12 +0,0 @@ -/* http://keith-wood.name/countdown.html - * Spanish initialisation for the jQuery countdown extension - * Written by Sergio Carracedo Martinez webmaster@neodisenoweb.com (2008) */ -(function($) { - $.countdown.regional['es'] = { - labels: ['Años', 'Meses', 'Semanas', 'Dias', 'Horas', 'Minutos', 'Segundos'], - labels1: ['Años', 'Meses', 'Semanas', 'Dias', 'Horas', 'Minutos', 'Segundos'], - compactLabels: ['a', 'm', 's', 'g'], - whichLabels: null, - timeSeparator: ':', isRTL: false}; - $.countdown.setDefaults($.countdown.regional['es']); -})(jQuery); diff --git a/wolnelektury/static/js/jquery.countdown-fr.js b/wolnelektury/static/js/jquery.countdown-fr.js deleted file mode 100644 index 70e17def7..000000000 --- a/wolnelektury/static/js/jquery.countdown-fr.js +++ /dev/null @@ -1,12 +0,0 @@ -/* http://keith-wood.name/countdown.html - French initialisation for the jQuery countdown extension - Written by Keith Wood (kbwood{at}iinet.com.au) Jan 2008. */ -(function($) { - $.countdown.regional['fr'] = { - labels: ['Années', 'Mois', 'Semaines', 'Jours', 'Heures', 'Minutes', 'Secondes'], - labels1: ['Année', 'Mois', 'Semaine', 'Jour', 'Heure', 'Minute', 'Seconde'], - compactLabels: ['a', 'm', 's', 'j'], - whichLabels: null, - timeSeparator: ':', isRTL: false}; - $.countdown.setDefaults($.countdown.regional['fr']); -})(jQuery); diff --git a/wolnelektury/static/js/jquery.countdown-lt.js b/wolnelektury/static/js/jquery.countdown-lt.js deleted file mode 100644 index ee11c71c5..000000000 --- a/wolnelektury/static/js/jquery.countdown-lt.js +++ /dev/null @@ -1,12 +0,0 @@ -/* http://keith-wood.name/countdown.html - * Lithuanian localisation for the jQuery countdown extension - * Written by Moacir P. de Sá Pereira (moacir{at}gmail.com) (2009) */ -(function($) { - $.countdown.regional['lt'] = { - labels: ['Metų', 'Mėnesių', 'Savaičių', 'Dienų', 'Valandų', 'Minučių', 'Sekundžių'], - labels1: ['Metai', 'Mėnuo', 'Savaitė', 'Diena', 'Valanda', 'Minutė', 'Sekundė'], - compactLabels: ['m', 'm', 's', 'd'], - whichLabels: null, - timeSeparator: ':', isRTL: false}; - $.countdown.setDefaults($.countdown.regional['lt']); -})(jQuery); diff --git a/wolnelektury/static/js/jquery.countdown-pl.js b/wolnelektury/static/js/jquery.countdown-pl.js deleted file mode 100644 index 6860a4bab..000000000 --- a/wolnelektury/static/js/jquery.countdown-pl.js +++ /dev/null @@ -1,17 +0,0 @@ -/* http://keith-wood.name/countdown.html - * Polish initialisation for the jQuery countdown extension - * Written by Pawel Lewtak lewtak@gmail.com (2008) */ -(function($) { - $.countdown.regional['pl'] = { - labels: ['lat', 'miesięcy', 'tygodni', 'dni', 'godzin', 'minut', 'sekund'], - labels1: ['rok', 'miesiąc', 'tydzień', 'dzień', 'godzina', 'minuta', 'sekunda'], - labels2: ['lata', 'miesiące', 'tygodnie', 'dni', 'godziny', 'minuty', 'sekundy'], - compactLabels: ['l', 'm', 't', 'd'], compactLabels1: ['r', 'm', 't', 'd'], - whichLabels: function(amount) { - var units = amount % 10; - var tens = Math.floor((amount % 100) / 10); - return (amount == 1 ? 1 : (units >= 2 && units <= 4 && tens != 1 ? 2 : 0)); - }, - timeSeparator: ':', isRTL: false}; - $.countdown.setDefaults($.countdown.regional['pl']); -})(jQuery); diff --git a/wolnelektury/static/js/jquery.countdown-ru.js b/wolnelektury/static/js/jquery.countdown-ru.js deleted file mode 100644 index badd3eb01..000000000 --- a/wolnelektury/static/js/jquery.countdown-ru.js +++ /dev/null @@ -1,12 +0,0 @@ -/* http://keith-wood.name/countdown.html - * Russian initialisation for the jQuery countdown extension - * Written by Dominus i3rixon@gmail.com (2008) */ -(function($) { - $.countdown.regional['ru'] = { - labels: ['Лет', 'Месяцев', 'Недель', 'Дней', 'Часов', 'Минут', 'Секунд'], - labels1: ['Год', 'Месяц', 'Неделя', 'День', 'Час', 'Минута', 'Секунда'], - compactLabels: ['l', 'm', 'n', 'd'], compactLabels1: ['g', 'm', 'n', 'd'], - whichLabels: null, - timeSeparator: ':', isRTL: false}; - $.countdown.setDefaults($.countdown.regional['ru']); -})(jQuery); diff --git a/wolnelektury/static/js/jquery.countdown-uk.js b/wolnelektury/static/js/jquery.countdown-uk.js deleted file mode 100644 index c98791e53..000000000 --- a/wolnelektury/static/js/jquery.countdown-uk.js +++ /dev/null @@ -1,12 +0,0 @@ -/* http://keith-wood.name/countdown.html - * Ukrainian initialisation for the jQuery countdown extension - * Written by Goloborodko M misha.gm@gmail.com (2009) */ -(function($) { - $.countdown.regional['uk'] = { - labels: ['Років', 'Місяців', 'Тижднів', 'Днів', 'Годин', 'Хвилин', 'Секунд'], - labels1: ['Рік', 'Місяць', 'Тиждень', 'День', 'Година', 'Хвилина', 'Секунда'], - compactLabels: ['r', 'm', 't', 'd'], - whichLabels: null, - timeSeparator: ':', isRTL: false}; - $.countdown.setDefaults($.countdown.regional['uk']); -})(jQuery); diff --git a/wolnelektury/static/js/jquery.countdown.js b/wolnelektury/static/js/jquery.countdown.js deleted file mode 100644 index f9c58d370..000000000 --- a/wolnelektury/static/js/jquery.countdown.js +++ /dev/null @@ -1,759 +0,0 @@ -/* http://keith-wood.name/countdown.html - Countdown for jQuery v1.5.8. - Written by Keith Wood (kbwood{at}iinet.com.au) January 2008. - Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and - MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses. - Please attribute the author if you use it. */ - -/* Display a countdown timer. - Attach it with options like: - $('div selector').countdown( - {until: new Date(2009, 1 - 1, 1, 0, 0, 0), onExpiry: happyNewYear}); */ - -(function($) { // Hide scope, no $ conflict - -/* Countdown manager. */ -function Countdown() { - this.regional = []; // Available regional settings, indexed by language code - this.regional[''] = { // Default regional settings - // The display texts for the counters - labels: ['Years', 'Months', 'Weeks', 'Days', 'Hours', 'Minutes', 'Seconds'], - // The display texts for the counters if only one - labels1: ['Year', 'Month', 'Week', 'Day', 'Hour', 'Minute', 'Second'], - compactLabels: ['y', 'm', 'w', 'd'], // The compact texts for the counters - whichLabels: null, // Function to determine which labels to use - timeSeparator: ':', // Separator for time periods - isRTL: false // True for right-to-left languages, false for left-to-right - }; - this._defaults = { - until: null, // new Date(year, mth - 1, day, hr, min, sec) - date/time to count down to - // or numeric for seconds offset, or string for unit offset(s): - // 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds - since: null, // new Date(year, mth - 1, day, hr, min, sec) - date/time to count up from - // or numeric for seconds offset, or string for unit offset(s): - // 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds - timezone: null, // The timezone (hours or minutes from GMT) for the target times, - // or null for client local - serverSync: null, // A function to retrieve the current server time for synchronisation - format: 'dHMS', // Format for display - upper case for always, lower case only if non-zero, - // 'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds - layout: '', // Build your own layout for the countdown - compact: false, // True to display in a compact format, false for an expanded one - significant: 0, // The number of periods with values to show, zero for all - description: '', // The description displayed for the countdown - expiryUrl: '', // A URL to load upon expiry, replacing the current page - expiryText: '', // Text to display upon expiry, replacing the countdown - alwaysExpire: false, // True to trigger onExpiry even if never counted down - onExpiry: null, // Callback when the countdown expires - - // receives no parameters and 'this' is the containing division - onTick: null, // Callback when the countdown is updated - - // receives int[7] being the breakdown by period (based on format) - // and 'this' is the containing division - tickInterval: 1 // Interval (seconds) between onTick callbacks - }; - $.extend(this._defaults, this.regional['']); - this._serverSyncs = []; -} - -var PROP_NAME = 'countdown'; - -var Y = 0; // Years -var O = 1; // Months -var W = 2; // Weeks -var D = 3; // Days -var H = 4; // Hours -var M = 5; // Minutes -var S = 6; // Seconds - -$.extend(Countdown.prototype, { - /* Class name added to elements to indicate already configured with countdown. */ - markerClassName: 'hasCountdown', - - /* Shared timer for all countdowns. */ - _timer: setInterval(function() { $.countdown._updateTargets(); }, 980), - /* List of currently active countdown targets. */ - _timerTargets: [], - - /* Override the default settings for all instances of the countdown widget. - @param options (object) the new settings to use as defaults */ - setDefaults: function(options) { - this._resetExtraLabels(this._defaults, options); - extendRemove(this._defaults, options || {}); - }, - - /* Convert a date/time to UTC. - @param tz (number) the hour or minute offset from GMT, e.g. +9, -360 - @param year (Date) the date/time in that timezone or - (number) the year in that timezone - @param month (number, optional) the month (0 - 11) (omit if year is a Date) - @param day (number, optional) the day (omit if year is a Date) - @param hours (number, optional) the hour (omit if year is a Date) - @param mins (number, optional) the minute (omit if year is a Date) - @param secs (number, optional) the second (omit if year is a Date) - @param ms (number, optional) the millisecond (omit if year is a Date) - @return (Date) the equivalent UTC date/time */ - UTCDate: function(tz, year, month, day, hours, mins, secs, ms) { - if (typeof year == 'object' && year.constructor == Date) { - ms = year.getMilliseconds(); - secs = year.getSeconds(); - mins = year.getMinutes(); - hours = year.getHours(); - day = year.getDate(); - month = year.getMonth(); - year = year.getFullYear(); - } - var d = new Date(); - d.setUTCFullYear(year); - d.setUTCDate(1); - d.setUTCMonth(month || 0); - d.setUTCDate(day || 1); - d.setUTCHours(hours || 0); - d.setUTCMinutes((mins || 0) - (Math.abs(tz) < 30 ? tz * 60 : tz)); - d.setUTCSeconds(secs || 0); - d.setUTCMilliseconds(ms || 0); - return d; - }, - - /* Convert a set of periods into seconds. - Averaged for months and years. - @param periods (number[7]) the periods per year/month/week/day/hour/minute/second - @return (number) the corresponding number of seconds */ - periodsToSeconds: function(periods) { - return periods[0] * 31557600 + periods[1] * 2629800 + periods[2] * 604800 + - periods[3] * 86400 + periods[4] * 3600 + periods[5] * 60 + periods[6]; - }, - - /* Retrieve one or more settings values. - @param name (string, optional) the name of the setting to retrieve - or 'all' for all instance settings or omit for all default settings - @return (any) the requested setting(s) */ - _settingsCountdown: function(target, name) { - if (!name) { - return $.countdown._defaults; - } - var inst = $.data(target, PROP_NAME); - return (name == 'all' ? inst.options : inst.options[name]); - }, - - /* Attach the countdown widget to a div. - @param target (element) the containing division - @param options (object) the initial settings for the countdown */ - _attachCountdown: function(target, options) { - var $target = $(target); - if ($target.hasClass(this.markerClassName)) { - return; - } - $target.addClass(this.markerClassName); - var inst = {options: $.extend({}, options), - _periods: [0, 0, 0, 0, 0, 0, 0]}; - $.data(target, PROP_NAME, inst); - this._changeCountdown(target); - }, - - /* Add a target to the list of active ones. - @param target (element) the countdown target */ - _addTarget: function(target) { - if (!this._hasTarget(target)) { - this._timerTargets.push(target); - } - }, - - /* See if a target is in the list of active ones. - @param target (element) the countdown target - @return (boolean) true if present, false if not */ - _hasTarget: function(target) { - return ($.inArray(target, this._timerTargets) > -1); - }, - - /* Remove a target from the list of active ones. - @param target (element) the countdown target */ - _removeTarget: function(target) { - this._timerTargets = $.map(this._timerTargets, - function(value) { return (value == target ? null : value); }); // delete entry - }, - - /* Update each active timer target. */ - _updateTargets: function() { - for (var i = this._timerTargets.length - 1; i >= 0; i--) { - this._updateCountdown(this._timerTargets[i]); - } - }, - - /* Redisplay the countdown with an updated display. - @param target (jQuery) the containing division - @param inst (object) the current settings for this instance */ - _updateCountdown: function(target, inst) { - var $target = $(target); - inst = inst || $.data(target, PROP_NAME); - if (!inst) { - return; - } - $target.html(this._generateHTML(inst)); - $target[(this._get(inst, 'isRTL') ? 'add' : 'remove') + 'Class']('countdown_rtl'); - var onTick = this._get(inst, 'onTick'); - if (onTick) { - var periods = inst._hold != 'lap' ? inst._periods : - this._calculatePeriods(inst, inst._show, this._get(inst, 'significant'), new Date()); - var tickInterval = this._get(inst, 'tickInterval'); - if (tickInterval == 1 || this.periodsToSeconds(periods) % tickInterval == 0) { - onTick.apply(target, [periods]); - } - } - var expired = inst._hold != 'pause' && - (inst._since ? inst._now.getTime() < inst._since.getTime() : - inst._now.getTime() >= inst._until.getTime()); - if (expired && !inst._expiring) { - inst._expiring = true; - if (this._hasTarget(target) || this._get(inst, 'alwaysExpire')) { - this._removeTarget(target); - var onExpiry = this._get(inst, 'onExpiry'); - if (onExpiry) { - onExpiry.apply(target, []); - } - var expiryText = this._get(inst, 'expiryText'); - if (expiryText) { - var layout = this._get(inst, 'layout'); - inst.options.layout = expiryText; - this._updateCountdown(target, inst); - inst.options.layout = layout; - } - var expiryUrl = this._get(inst, 'expiryUrl'); - if (expiryUrl) { - window.location = expiryUrl; - } - } - inst._expiring = false; - } - else if (inst._hold == 'pause') { - this._removeTarget(target); - } - $.data(target, PROP_NAME, inst); - }, - - /* Reconfigure the settings for a countdown div. - @param target (element) the containing division - @param options (object) the new settings for the countdown or - (string) an individual property name - @param value (any) the individual property value - (omit if options is an object) */ - _changeCountdown: function(target, options, value) { - options = options || {}; - if (typeof options == 'string') { - var name = options; - options = {}; - options[name] = value; - } - var inst = $.data(target, PROP_NAME); - if (inst) { - this._resetExtraLabels(inst.options, options); - extendRemove(inst.options, options); - this._adjustSettings(target, inst); - $.data(target, PROP_NAME, inst); - var now = new Date(); - if ((inst._since && inst._since < now) || - (inst._until && inst._until > now)) { - this._addTarget(target); - } - this._updateCountdown(target, inst); - } - }, - - /* Reset any extra labelsn and compactLabelsn entries if changing labels. - @param base (object) the options to be updated - @param options (object) the new option values */ - _resetExtraLabels: function(base, options) { - var changingLabels = false; - for (var n in options) { - if (n != 'whichLabels' && n.match(/[Ll]abels/)) { - changingLabels = true; - break; - } - } - if (changingLabels) { - for (var n in base) { // Remove custom numbered labels - if (n.match(/[Ll]abels[0-9]/)) { - base[n] = null; - } - } - } - }, - - /* Calculate interal settings for an instance. - @param target (element) the containing division - @param inst (object) the current settings for this instance */ - _adjustSettings: function(target, inst) { - var now; - var serverSync = this._get(inst, 'serverSync'); - var serverOffset = 0; - var serverEntry = null; - for (var i = 0; i < this._serverSyncs.length; i++) { - if (this._serverSyncs[i][0] == serverSync) { - serverEntry = this._serverSyncs[i][1]; - break; - } - } - if (serverEntry != null) { - serverOffset = (serverSync ? serverEntry : 0); - now = new Date(); - } - else { - var serverResult = (serverSync ? serverSync.apply(target, []) : null); - now = new Date(); - serverOffset = (serverResult ? now.getTime() - serverResult.getTime() : 0); - this._serverSyncs.push([serverSync, serverOffset]); - } - var timezone = this._get(inst, 'timezone'); - timezone = (timezone == null ? -now.getTimezoneOffset() : timezone); - inst._since = this._get(inst, 'since'); - if (inst._since != null) { - inst._since = this.UTCDate(timezone, this._determineTime(inst._since, null)); - if (inst._since && serverOffset) { - inst._since.setMilliseconds(inst._since.getMilliseconds() + serverOffset); - } - } - inst._until = this.UTCDate(timezone, this._determineTime(this._get(inst, 'until'), now)); - if (serverOffset) { - inst._until.setMilliseconds(inst._until.getMilliseconds() + serverOffset); - } - inst._show = this._determineShow(inst); - }, - - /* Remove the countdown widget from a div. - @param target (element) the containing division */ - _destroyCountdown: function(target) { - var $target = $(target); - if (!$target.hasClass(this.markerClassName)) { - return; - } - this._removeTarget(target); - $target.removeClass(this.markerClassName).empty(); - $.removeData(target, PROP_NAME); - }, - - /* Pause a countdown widget at the current time. - Stop it running but remember and display the current time. - @param target (element) the containing division */ - _pauseCountdown: function(target) { - this._hold(target, 'pause'); - }, - - /* Pause a countdown widget at the current time. - Stop the display but keep the countdown running. - @param target (element) the containing division */ - _lapCountdown: function(target) { - this._hold(target, 'lap'); - }, - - /* Resume a paused countdown widget. - @param target (element) the containing division */ - _resumeCountdown: function(target) { - this._hold(target, null); - }, - - /* Pause or resume a countdown widget. - @param target (element) the containing division - @param hold (string) the new hold setting */ - _hold: function(target, hold) { - var inst = $.data(target, PROP_NAME); - if (inst) { - if (inst._hold == 'pause' && !hold) { - inst._periods = inst._savePeriods; - var sign = (inst._since ? '-' : '+'); - inst[inst._since ? '_since' : '_until'] = - this._determineTime(sign + inst._periods[0] + 'y' + - sign + inst._periods[1] + 'o' + sign + inst._periods[2] + 'w' + - sign + inst._periods[3] + 'd' + sign + inst._periods[4] + 'h' + - sign + inst._periods[5] + 'm' + sign + inst._periods[6] + 's'); - this._addTarget(target); - } - inst._hold = hold; - inst._savePeriods = (hold == 'pause' ? inst._periods : null); - $.data(target, PROP_NAME, inst); - this._updateCountdown(target, inst); - } - }, - - /* Return the current time periods. - @param target (element) the containing division - @return (number[7]) the current periods for the countdown */ - _getTimesCountdown: function(target) { - var inst = $.data(target, PROP_NAME); - return (!inst ? null : (!inst._hold ? inst._periods : - this._calculatePeriods(inst, inst._show, this._get(inst, 'significant'), new Date()))); - }, - - /* Get a setting value, defaulting if necessary. - @param inst (object) the current settings for this instance - @param name (string) the name of the required setting - @return (any) the setting's value or a default if not overridden */ - _get: function(inst, name) { - return (inst.options[name] != null ? - inst.options[name] : $.countdown._defaults[name]); - }, - - /* A time may be specified as an exact value or a relative one. - @param setting (string or number or Date) - the date/time value - as a relative or absolute value - @param defaultTime (Date) the date/time to use if no other is supplied - @return (Date) the corresponding date/time */ - _determineTime: function(setting, defaultTime) { - var offsetNumeric = function(offset) { // e.g. +300, -2 - var time = new Date(); - time.setTime(time.getTime() + offset * 1000); - return time; - }; - var offsetString = function(offset) { // e.g. '+2d', '-4w', '+3h +30m' - offset = offset.toLowerCase(); - var time = new Date(); - var year = time.getFullYear(); - var month = time.getMonth(); - var day = time.getDate(); - var hour = time.getHours(); - var minute = time.getMinutes(); - var second = time.getSeconds(); - var pattern = /([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g; - var matches = pattern.exec(offset); - while (matches) { - switch (matches[2] || 's') { - case 's': second += parseInt(matches[1], 10); break; - case 'm': minute += parseInt(matches[1], 10); break; - case 'h': hour += parseInt(matches[1], 10); break; - case 'd': day += parseInt(matches[1], 10); break; - case 'w': day += parseInt(matches[1], 10) * 7; break; - case 'o': - month += parseInt(matches[1], 10); - day = Math.min(day, $.countdown._getDaysInMonth(year, month)); - break; - case 'y': - year += parseInt(matches[1], 10); - day = Math.min(day, $.countdown._getDaysInMonth(year, month)); - break; - } - matches = pattern.exec(offset); - } - return new Date(year, month, day, hour, minute, second, 0); - }; - var time = (setting == null ? defaultTime : - (typeof setting == 'string' ? offsetString(setting) : - (typeof setting == 'number' ? offsetNumeric(setting) : setting))); - if (time) time.setMilliseconds(0); - return time; - }, - - /* Determine the number of days in a month. - @param year (number) the year - @param month (number) the month - @return (number) the days in that month */ - _getDaysInMonth: function(year, month) { - return 32 - new Date(year, month, 32).getDate(); - }, - - /* Determine which set of labels should be used for an amount. - @param num (number) the amount to be displayed - @return (number) the set of labels to be used for this amount */ - _normalLabels: function(num) { - return num; - }, - - /* Generate the HTML to display the countdown widget. - @param inst (object) the current settings for this instance - @return (string) the new HTML for the countdown display */ - _generateHTML: function(inst) { - // Determine what to show - var significant = this._get(inst, 'significant'); - inst._periods = (inst._hold ? inst._periods : - this._calculatePeriods(inst, inst._show, significant, new Date())); - // Show all 'asNeeded' after first non-zero value - var shownNonZero = false; - var showCount = 0; - var sigCount = significant; - var show = $.extend({}, inst._show); - for (var period = Y; period <= S; period++) { - shownNonZero |= (inst._show[period] == '?' && inst._periods[period] > 0); - show[period] = (inst._show[period] == '?' && !shownNonZero ? null : inst._show[period]); - showCount += (show[period] ? 1 : 0); - sigCount -= (inst._periods[period] > 0 ? 1 : 0); - } - var showSignificant = [false, false, false, false, false, false, false]; - for (var period = S; period >= Y; period--) { // Determine significant periods - if (inst._show[period]) { - if (inst._periods[period]) { - showSignificant[period] = true; - } - else { - showSignificant[period] = sigCount > 0; - sigCount--; - } - } - } - var compact = this._get(inst, 'compact'); - var layout = this._get(inst, 'layout'); - var labels = (compact ? this._get(inst, 'compactLabels') : this._get(inst, 'labels')); - var whichLabels = this._get(inst, 'whichLabels') || this._normalLabels; - var timeSeparator = this._get(inst, 'timeSeparator'); - var description = this._get(inst, 'description') || ''; - var showCompact = function(period) { - var labelsNum = $.countdown._get(inst, - 'compactLabels' + whichLabels(inst._periods[period])); - return (show[period] ? inst._periods[period] + - (labelsNum ? labelsNum[period] : labels[period]) + ' ' : ''); - }; - var showFull = function(period) { - var labelsNum = $.countdown._get(inst, 'labels' + whichLabels(inst._periods[period])); - return ((!significant && show[period]) || (significant && showSignificant[period]) ? - '' + - inst._periods[period] + '
              ' + - (labelsNum ? labelsNum[period] : labels[period]) + '
              ' : ''); - }; - return (layout ? this._buildLayout(inst, show, layout, compact, significant, showSignificant) : - ((compact ? // Compact version - '' + - showCompact(Y) + showCompact(O) + showCompact(W) + showCompact(D) + - (show[H] ? this._minDigits(inst._periods[H], 2) : '') + - (show[M] ? (show[H] ? timeSeparator : '') + - this._minDigits(inst._periods[M], 2) : '') + - (show[S] ? (show[H] || show[M] ? timeSeparator : '') + - this._minDigits(inst._periods[S], 2) : '') : - // Full version - '' + - showFull(Y) + showFull(O) + showFull(W) + showFull(D) + - showFull(H) + showFull(M) + showFull(S)) + '' + - (description ? '' + description + '' : ''))); - }, - - /* Construct a custom layout. - @param inst (object) the current settings for this instance - @param show (string[7]) flags indicating which periods are requested - @param layout (string) the customised layout - @param compact (boolean) true if using compact labels - @param significant (number) the number of periods with values to show, zero for all - @param showSignificant (boolean[7]) other periods to show for significance - @return (string) the custom HTML */ - _buildLayout: function(inst, show, layout, compact, significant, showSignificant) { - var labels = this._get(inst, (compact ? 'compactLabels' : 'labels')); - var whichLabels = this._get(inst, 'whichLabels') || this._normalLabels; - var labelFor = function(index) { - return ($.countdown._get(inst, - (compact ? 'compactLabels' : 'labels') + whichLabels(inst._periods[index])) || - labels)[index]; - }; - var digit = function(value, position) { - return Math.floor(value / position) % 10; - }; - var subs = {desc: this._get(inst, 'description'), sep: this._get(inst, 'timeSeparator'), - yl: labelFor(Y), yn: inst._periods[Y], ynn: this._minDigits(inst._periods[Y], 2), - ynnn: this._minDigits(inst._periods[Y], 3), y1: digit(inst._periods[Y], 1), - y10: digit(inst._periods[Y], 10), y100: digit(inst._periods[Y], 100), - y1000: digit(inst._periods[Y], 1000), - ol: labelFor(O), on: inst._periods[O], onn: this._minDigits(inst._periods[O], 2), - onnn: this._minDigits(inst._periods[O], 3), o1: digit(inst._periods[O], 1), - o10: digit(inst._periods[O], 10), o100: digit(inst._periods[O], 100), - o1000: digit(inst._periods[O], 1000), - wl: labelFor(W), wn: inst._periods[W], wnn: this._minDigits(inst._periods[W], 2), - wnnn: this._minDigits(inst._periods[W], 3), w1: digit(inst._periods[W], 1), - w10: digit(inst._periods[W], 10), w100: digit(inst._periods[W], 100), - w1000: digit(inst._periods[W], 1000), - dl: labelFor(D), dn: inst._periods[D], dnn: this._minDigits(inst._periods[D], 2), - dnnn: this._minDigits(inst._periods[D], 3), d1: digit(inst._periods[D], 1), - d10: digit(inst._periods[D], 10), d100: digit(inst._periods[D], 100), - d1000: digit(inst._periods[D], 1000), - hl: labelFor(H), hn: inst._periods[H], hnn: this._minDigits(inst._periods[H], 2), - hnnn: this._minDigits(inst._periods[H], 3), h1: digit(inst._periods[H], 1), - h10: digit(inst._periods[H], 10), h100: digit(inst._periods[H], 100), - h1000: digit(inst._periods[H], 1000), - ml: labelFor(M), mn: inst._periods[M], mnn: this._minDigits(inst._periods[M], 2), - mnnn: this._minDigits(inst._periods[M], 3), m1: digit(inst._periods[M], 1), - m10: digit(inst._periods[M], 10), m100: digit(inst._periods[M], 100), - m1000: digit(inst._periods[M], 1000), - sl: labelFor(S), sn: inst._periods[S], snn: this._minDigits(inst._periods[S], 2), - snnn: this._minDigits(inst._periods[S], 3), s1: digit(inst._periods[S], 1), - s10: digit(inst._periods[S], 10), s100: digit(inst._periods[S], 100), - s1000: digit(inst._periods[S], 1000)}; - var html = layout; - // Replace period containers: {p<}...{p>} - for (var i = Y; i <= S; i++) { - var period = 'yowdhms'.charAt(i); - var re = new RegExp('\\{' + period + '<\\}(.*)\\{' + period + '>\\}', 'g'); - html = html.replace(re, ((!significant && show[i]) || - (significant && showSignificant[i]) ? '$1' : '')); - } - // Replace period values: {pn} - $.each(subs, function(n, v) { - var re = new RegExp('\\{' + n + '\\}', 'g'); - html = html.replace(re, v); - }); - return html; - }, - - /* Ensure a numeric value has at least n digits for display. - @param value (number) the value to display - @param len (number) the minimum length - @return (string) the display text */ - _minDigits: function(value, len) { - value = '' + value; - if (value.length >= len) { - return value; - } - value = '0000000000' + value; - return value.substr(value.length - len); - }, - - /* Translate the format into flags for each period. - @param inst (object) the current settings for this instance - @return (string[7]) flags indicating which periods are requested (?) or - required (!) by year, month, week, day, hour, minute, second */ - _determineShow: function(inst) { - var format = this._get(inst, 'format'); - var show = []; - show[Y] = (format.match('y') ? '?' : (format.match('Y') ? '!' : null)); - show[O] = (format.match('o') ? '?' : (format.match('O') ? '!' : null)); - show[W] = (format.match('w') ? '?' : (format.match('W') ? '!' : null)); - show[D] = (format.match('d') ? '?' : (format.match('D') ? '!' : null)); - show[H] = (format.match('h') ? '?' : (format.match('H') ? '!' : null)); - show[M] = (format.match('m') ? '?' : (format.match('M') ? '!' : null)); - show[S] = (format.match('s') ? '?' : (format.match('S') ? '!' : null)); - return show; - }, - - /* Calculate the requested periods between now and the target time. - @param inst (object) the current settings for this instance - @param show (string[7]) flags indicating which periods are requested/required - @param significant (number) the number of periods with values to show, zero for all - @param now (Date) the current date and time - @return (number[7]) the current time periods (always positive) - by year, month, week, day, hour, minute, second */ - _calculatePeriods: function(inst, show, significant, now) { - // Find endpoints - inst._now = now; - inst._now.setMilliseconds(0); - var until = new Date(inst._now.getTime()); - if (inst._since) { - if (now.getTime() < inst._since.getTime()) { - inst._now = now = until; - } - else { - now = inst._since; - } - } - else { - until.setTime(inst._until.getTime()); - if (now.getTime() > inst._until.getTime()) { - inst._now = now = until; - } - } - // Calculate differences by period - var periods = [0, 0, 0, 0, 0, 0, 0]; - if (show[Y] || show[O]) { - // Treat end of months as the same - var lastNow = $.countdown._getDaysInMonth(now.getFullYear(), now.getMonth()); - var lastUntil = $.countdown._getDaysInMonth(until.getFullYear(), until.getMonth()); - var sameDay = (until.getDate() == now.getDate() || - (until.getDate() >= Math.min(lastNow, lastUntil) && - now.getDate() >= Math.min(lastNow, lastUntil))); - var getSecs = function(date) { - return (date.getHours() * 60 + date.getMinutes()) * 60 + date.getSeconds(); - }; - var months = Math.max(0, - (until.getFullYear() - now.getFullYear()) * 12 + until.getMonth() - now.getMonth() + - ((until.getDate() < now.getDate() && !sameDay) || - (sameDay && getSecs(until) < getSecs(now)) ? -1 : 0)); - periods[Y] = (show[Y] ? Math.floor(months / 12) : 0); - periods[O] = (show[O] ? months - periods[Y] * 12 : 0); - // Adjust for months difference and end of month if necessary - now = new Date(now.getTime()); - var wasLastDay = (now.getDate() == lastNow); - var lastDay = $.countdown._getDaysInMonth(now.getFullYear() + periods[Y], - now.getMonth() + periods[O]); - if (now.getDate() > lastDay) { - now.setDate(lastDay); - } - now.setFullYear(now.getFullYear() + periods[Y]); - now.setMonth(now.getMonth() + periods[O]); - if (wasLastDay) { - now.setDate(lastDay); - } - } - var diff = Math.floor((until.getTime() - now.getTime()) / 1000); - var extractPeriod = function(period, numSecs) { - periods[period] = (show[period] ? Math.floor(diff / numSecs) : 0); - diff -= periods[period] * numSecs; - }; - extractPeriod(W, 604800); - extractPeriod(D, 86400); - extractPeriod(H, 3600); - extractPeriod(M, 60); - extractPeriod(S, 1); - if (diff > 0 && !inst._since) { // Round up if left overs - var multiplier = [1, 12, 4.3482, 7, 24, 60, 60]; - var lastShown = S; - var max = 1; - for (var period = S; period >= Y; period--) { - if (show[period]) { - if (periods[lastShown] >= max) { - periods[lastShown] = 0; - diff = 1; - } - if (diff > 0) { - periods[period]++; - diff = 0; - lastShown = period; - max = 1; - } - } - max *= multiplier[period]; - } - } - if (significant) { // Zero out insignificant periods - for (var period = Y; period <= S; period++) { - if (significant && periods[period]) { - significant--; - } - else if (!significant) { - periods[period] = 0; - } - } - } - return periods; - } -}); - -/* jQuery extend now ignores nulls! - @param target (object) the object to update - @param props (object) the new settings - @return (object) the updated object */ -function extendRemove(target, props) { - $.extend(target, props); - for (var name in props) { - if (props[name] == null) { - target[name] = null; - } - } - return target; -} - -/* Process the countdown functionality for a jQuery selection. - @param command (string) the command to run (optional, default 'attach') - @param options (object) the new settings to use for these countdown instances - @return (jQuery) for chaining further calls */ -$.fn.countdown = function(options) { - var otherArgs = Array.prototype.slice.call(arguments, 1); - if (options == 'getTimes' || options == 'settings') { - return $.countdown['_' + options + 'Countdown']. - apply($.countdown, [this[0]].concat(otherArgs)); - } - return this.each(function() { - if (typeof options == 'string') { - $.countdown['_' + options + 'Countdown'].apply($.countdown, [this].concat(otherArgs)); - } - else { - $.countdown._attachCountdown(this, options); - } - }); -}; - -/* Initialise the countdown functionality. */ -$.countdown = new Countdown(); // singleton instance - -})(jQuery); diff --git a/wolnelektury/static/js/jquery.cycle.min.js b/wolnelektury/static/js/jquery.cycle.min.js deleted file mode 100644 index 3db15eb8d..000000000 --- a/wolnelektury/static/js/jquery.cycle.min.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * jQuery Cycle Lite Plugin - * http://malsup.com/jquery/cycle/lite/ - * Copyright (c) 2008 M. Alsup - * Version: 1.0 (06/08/2008) - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - * Requires: jQuery v1.2.3 or later - */ -(function(D){var A="Lite-1.0";D.fn.cycle=function(E){return this.each(function(){E=E||{};if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=0;this.cyclePause=0;var I=D(this);var J=E.slideExpr?D(E.slideExpr,this):I.children();var G=J.get();if(G.length<2){if(window.console&&window.console.log){window.console.log("terminating; too few slides: "+G.length)}return }var H=D.extend({},D.fn.cycle.defaults,E||{},D.metadata?I.metadata():D.meta?I.data():{});H.before=H.before?[H.before]:[];H.after=H.after?[H.after]:[];H.after.unshift(function(){H.busy=0});var F=this.className;H.width=parseInt((F.match(/w:(\d+)/)||[])[1])||H.width;H.height=parseInt((F.match(/h:(\d+)/)||[])[1])||H.height;H.timeout=parseInt((F.match(/t:(\d+)/)||[])[1])||H.timeout;if(I.css("position")=="static"){I.css("position","relative")}if(H.width){I.width(H.width)}if(H.height&&H.height!="auto"){I.height(H.height)}var K=0;J.css({position:"absolute",top:0,left:0}).hide().each(function(M){D(this).css("z-index",G.length-M)});D(G[K]).css("opacity",1).show();if(D.browser.msie){G[K].style.removeAttribute("filter")}if(H.fit&&H.width){J.width(H.width)}if(H.fit&&H.height&&H.height!="auto"){J.height(H.height)}if(H.pause){I.hover(function(){this.cyclePause=1},function(){this.cyclePause=0})}D.fn.cycle.transitions.fade(I,J,H);J.each(function(){var M=D(this);this.cycleH=(H.fit&&H.height)?H.height:M.height();this.cycleW=(H.fit&&H.width)?H.width:M.width()});J.not(":eq("+K+")").css({opacity:0});if(H.cssFirst){D(J[K]).css(H.cssFirst)}if(H.timeout){if(H.speed.constructor==String){H.speed={slow:600,fast:200}[H.speed]||400}if(!H.sync){H.speed=H.speed/2}while((H.timeout-H.speed)<250){H.timeout+=H.speed}}H.speedIn=H.speed;H.speedOut=H.speed;H.slideCount=G.length;H.currSlide=K;H.nextSlide=1;var L=J[K];if(H.before.length){H.before[0].apply(L,[L,L,H,true])}if(H.after.length>1){H.after[1].apply(L,[L,L,H,true])}if(H.click&&!H.next){H.next=H.click}if(H.next){D(H.next).bind("click",function(){return C(G,H,H.rev?-1:1)})}if(H.prev){D(H.prev).bind("click",function(){return C(G,H,H.rev?1:-1)})}if(H.timeout){this.cycleTimeout=setTimeout(function(){B(G,H,0,!H.rev)},H.timeout+(H.delay||0))}})};function B(J,E,I,K){if(E.busy){return }var H=J[0].parentNode,M=J[E.currSlide],L=J[E.nextSlide];if(H.cycleTimeout===0&&!I){return }if(I||!H.cyclePause){if(E.before.length){D.each(E.before,function(N,O){O.apply(L,[M,L,E,K])})}var F=function(){if(D.browser.msie){this.style.removeAttribute("filter")}D.each(E.after,function(N,O){O.apply(L,[M,L,E,K])})};if(E.nextSlide!=E.currSlide){E.busy=1;D.fn.cycle.custom(M,L,E,F)}var G=(E.nextSlide+1)==J.length;E.nextSlide=G?0:E.nextSlide+1;E.currSlide=G?J.length-1:E.nextSlide-1}if(E.timeout){H.cycleTimeout=setTimeout(function(){B(J,E,0,!E.rev)},E.timeout)}}function C(E,F,I){var H=E[0].parentNode,G=H.cycleTimeout;if(G){clearTimeout(G);H.cycleTimeout=0}F.nextSlide=F.currSlide+I;if(F.nextSlide<0){F.nextSlide=E.length-1}else{if(F.nextSlide>=E.length){F.nextSlide=0}}B(E,F,1,I>=0);return false}D.fn.cycle.custom=function(K,H,I,E){var J=D(K),G=D(H);G.css({opacity:0});var F=function(){G.animate({opacity:1},I.speedIn,I.easeIn,E)};J.animate({opacity:0},I.speedOut,I.easeOut,function(){J.css({display:"none"});if(!I.sync){F()}});if(I.sync){F()}};D.fn.cycle.transitions={fade:function(F,G,E){G.not(":eq(0)").css("opacity",0);E.before.push(function(){D(this).show()})}};D.fn.cycle.ver=function(){return A};D.fn.cycle.defaults={timeout:4000,speed:1000,next:null,prev:null,before:null,after:null,height:"auto",sync:1,fit:0,pause:0,delay:0,slideExpr:null}})(jQuery) \ No newline at end of file diff --git a/wolnelektury/static/js/jquery.eventdelegation.js b/wolnelektury/static/js/jquery.eventdelegation.js deleted file mode 100644 index 52fce074a..000000000 --- a/wolnelektury/static/js/jquery.eventdelegation.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * jQuery Event Delegation Plugin - jquery.eventdelegation.js - * Fast flexible event handling - * - * January 2008 - Randy Morey (http://dev.distilldesign.com/) - */ - -(function ($) { - /* setup list of allowed events for event delegation - * only events that bubble are appropriate - */ - var allowed = {}; - $.each([ - 'click', - 'dblclick', - 'mousedown', - 'mouseup', - 'mousemove', - 'mouseover', - 'mouseout', - 'keydown', - 'keypress', - 'keyup' - ], function(i, eventName) { - allowed[eventName] = true; - }); - - $.fn.extend({ - delegate: function (event, selector, f) { - return $(this).each(function () { - if (allowed[event]) - $(this).bind(event, function (e) { - var el = $(e.target), - result = false; - - while (!$(el).is('body')) { - if ($(el).is(selector)) { - result = f.apply($(el)[0], [e]); - if (result === false) - e.preventDefault(); - return; - } - - el = $(el).parent(); - } - }); - }); - }, - undelegate: function (event) { - return $(this).each(function () { - $(this).unbind(event); - }); - } - }); -})(jQuery); \ No newline at end of file diff --git a/wolnelektury/static/js/jquery.form.js b/wolnelektury/static/js/jquery.form.js deleted file mode 100644 index 36af6b199..000000000 --- a/wolnelektury/static/js/jquery.form.js +++ /dev/null @@ -1,601 +0,0 @@ -/* - * jQuery Form Plugin - * version: 2.12 (06/07/2008) - * @requires jQuery v1.2.2 or later - * - * Examples and documentation at: http://malsup.com/jquery/form/ - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - * - * Revision: $Id$ - */ -(function($) { - -/* - Usage Note: - ----------- - Do not use both ajaxSubmit and ajaxForm on the same form. These - functions are intended to be exclusive. Use ajaxSubmit if you want - to bind your own submit handler to the form. For example, - - $(document).ready(function() { - $('#myForm').bind('submit', function() { - $(this).ajaxSubmit({ - target: '#output' - }); - return false; // <-- important! - }); - }); - - Use ajaxForm when you want the plugin to manage all the event binding - for you. For example, - - $(document).ready(function() { - $('#myForm').ajaxForm({ - target: '#output' - }); - }); - - When using ajaxForm, the ajaxSubmit function will be invoked for you - at the appropriate time. -*/ - -/** - * ajaxSubmit() provides a mechanism for immediately submitting - * an HTML form using AJAX. - */ -$.fn.ajaxSubmit = function(options) { - // fast fail if nothing selected (http://dev.jquery.com/ticket/2752) - if (!this.length) { - log('ajaxSubmit: skipping submit process - no element selected'); - return this; - } - - if (typeof options == 'function') - options = { success: options }; - - options = $.extend({ - url: this.attr('action') || window.location.toString(), - type: this.attr('method') || 'GET' - }, options || {}); - - // hook for manipulating the form data before it is extracted; - // convenient for use with rich editors like tinyMCE or FCKEditor - var veto = {}; - this.trigger('form-pre-serialize', [this, options, veto]); - if (veto.veto) { - log('ajaxSubmit: submit vetoed via form-pre-serialize trigger'); - return this; - } - - var a = this.formToArray(options.semantic); - if (options.data) { - options.extraData = options.data; - for (var n in options.data) - a.push( { name: n, value: options.data[n] } ); - } - - // give pre-submit callback an opportunity to abort the submit - if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) { - log('ajaxSubmit: submit aborted via beforeSubmit callback'); - return this; - } - - // fire vetoable 'validate' event - this.trigger('form-submit-validate', [a, this, options, veto]); - if (veto.veto) { - log('ajaxSubmit: submit vetoed via form-submit-validate trigger'); - return this; - } - - var q = $.param(a); - - if (options.type.toUpperCase() == 'GET') { - options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q; - options.data = null; // data is null for 'get' - } - else - options.data = q; // data is the query string for 'post' - - var $form = this, callbacks = []; - if (options.resetForm) callbacks.push(function() { $form.resetForm(); }); - if (options.clearForm) callbacks.push(function() { $form.clearForm(); }); - - // perform a load on the target only if dataType is not provided - if (!options.dataType && options.target) { - var oldSuccess = options.success || function(){}; - callbacks.push(function(data) { - $(options.target).html(data).each(oldSuccess, arguments); - }); - } - else if (options.success) - callbacks.push(options.success); - - options.success = function(data, status) { - for (var i=0, max=callbacks.length; i < max; i++) - callbacks[i](data, status, $form); - }; - - // are there files to upload? - var files = $('input:file', this).fieldValue(); - var found = false; - for (var j=0; j < files.length; j++) - if (files[j]) - found = true; - - // options.iframe allows user to force iframe mode - if (options.iframe || found) { - // hack to fix Safari hang (thanks to Tim Molendijk for this) - // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d - if ($.browser.safari && options.closeKeepAlive) - $.get(options.closeKeepAlive, fileUpload); - else - fileUpload(); - } - else - $.ajax(options); - - // fire 'notify' event - this.trigger('form-submit-notify', [this, options]); - return this; - - - // private function for handling file uploads (hat tip to YAHOO!) - function fileUpload() { - var form = $form[0]; - - if ($(':input[@name=submit]', form).length) { - alert('Error: Form elements must not be named "submit".'); - return; - } - - var opts = $.extend({}, $.ajaxSettings, options); - - var id = 'jqFormIO' + (new Date().getTime()); - var $io = $('').css({opacity:0}), -e=function(h){if(ie6)if(h.o)h.o.html('

              ').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i); f(h);}, -f=function(h){try{$(':input:visible',h.w)[0].focus();}catch(_){}}, -L=function(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m);}, -m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return !r;}, -hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function() { - if(!this[c]){this[c]=[];$(this).click(function(){for(var i in {jqmShow:1,jqmHide:1})for(var s in this[i])if(H[this[i][s]])H[this[i][s]].w[i](this);return F;});}this[c].push(s);});});}; -})(jQuery); \ No newline at end of file diff --git a/wolnelektury/static/js/jquery.js b/wolnelektury/static/js/jquery.js deleted file mode 100644 index 7c2430802..000000000 --- a/wolnelektury/static/js/jquery.js +++ /dev/null @@ -1,154 +0,0 @@ -/*! - * jQuery JavaScript Library v1.4.2 - * http://jquery.com/ - * - * Copyright 2010, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2010, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Sat Feb 13 22:33:48 2010 -0500 - */ -(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, -Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& -(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, -a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== -"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, -function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
              a"; -var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, -parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= -false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= -s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, -applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; -else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, -a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== -w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, -cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= -c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); -a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, -function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); -k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), -C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type= -e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& -f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; -if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", -e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, -"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, -d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, -e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); -t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| -g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, -CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, -g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, -text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, -setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= -h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== -"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, -h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& -q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=""; -if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="

              ";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); -(function(){var g=s.createElement("div");g.innerHTML="
              ";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: -function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= -{},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== -"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", -d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? -a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== -1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"},F={option:[1,""],legend:[1,"
              ","
              "],thead:[1,"","
              "],tr:[2,"","
              "],td:[3,"","
              "],col:[2,"","
              "],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
              ","
              "];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= -c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, -wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, -prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, -this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); -return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, -""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); -return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", -""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= -c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? -c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= -function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= -Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, -"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= -a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= -a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=//gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== -"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("
              ").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, -serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), -function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, -global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& -e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? -"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== -false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= -false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", -c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| -d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); -g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== -1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== -"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; -if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== -"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| -c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; -this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= -this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, -e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b
              "; -a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); -c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, -d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- -f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": -"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in -e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); diff --git a/wolnelektury/static/js/jquery.scrollto.js b/wolnelektury/static/js/jquery.scrollto.js deleted file mode 100644 index c403ab9df..000000000 --- a/wolnelektury/static/js/jquery.scrollto.js +++ /dev/null @@ -1,194 +0,0 @@ -/** - * jQuery.ScrollTo - * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com - * Dual licensed under MIT and GPL. - * Date: 9/11/2008 - * - * @projectDescription Easy element scrolling using jQuery. - * http://flesler.blogspot.com/2007/10/jqueryscrollto.html - * Tested with jQuery 1.2.6. On FF 2/3, IE 6/7, Opera 9.2/5 and Safari 3. on Windows. - * - * @author Ariel Flesler - * @version 1.4 - * - * @id jQuery.scrollTo - * @id jQuery.fn.scrollTo - * @param {String, Number, DOMElement, jQuery, Object} target Where to scroll the matched elements. - * The different options for target are: - * - A number position (will be applied to all axes). - * - A string position ('44', '100px', '+=90', etc ) will be applied to all axes - * - A jQuery/DOM element ( logically, child of the element to scroll ) - * - A string selector, that will be relative to the element to scroll ( 'li:eq(2)', etc ) - * - A hash { top:x, left:y }, x and y can be any kind of number/string like above. - * @param {Number} duration The OVERALL length of the animation, this argument can be the settings object instead. - * @param {Object,Function} settings Optional set of settings or the onAfter callback. - * @option {String} axis Which axis must be scrolled, use 'x', 'y', 'xy' or 'yx'. - * @option {Number} duration The OVERALL length of the animation. - * @option {String} easing The easing method for the animation. - * @option {Boolean} margin If true, the margin of the target element will be deducted from the final position. - * @option {Object, Number} offset Add/deduct from the end position. One number for both axes or { top:x, left:y }. - * @option {Object, Number} over Add/deduct the height/width multiplied by 'over', can be { top:x, left:y } when using both axes. - * @option {Boolean} queue If true, and both axis are given, the 2nd axis will only be animated after the first one ends. - * @option {Function} onAfter Function to be called after the scrolling ends. - * @option {Function} onAfterFirst If queuing is activated, this function will be called after the first scrolling ends. - * @return {jQuery} Returns the same jQuery object, for chaining. - * - * @desc Scroll to a fixed position - * @example $('div').scrollTo( 340 ); - * - * @desc Scroll relatively to the actual position - * @example $('div').scrollTo( '+=340px', { axis:'y' } ); - * - * @dec Scroll using a selector (relative to the scrolled element) - * @example $('div').scrollTo( 'p.paragraph:eq(2)', 500, { easing:'swing', queue:true, axis:'xy' } ); - * - * @ Scroll to a DOM element (same for jQuery object) - * @example var second_child = document.getElementById('container').firstChild.nextSibling; - * $('#container').scrollTo( second_child, { duration:500, axis:'x', onAfter:function(){ - * alert('scrolled!!'); - * }}); - * - * @desc Scroll on both axes, to different values - * @example $('div').scrollTo( { top: 300, left:'+=200' }, { axis:'xy', offset:-20 } ); - */ -;(function( $ ){ - - var $scrollTo = $.scrollTo = function( target, duration, settings ){ - $(window).scrollTo( target, duration, settings ); - }; - - $scrollTo.defaults = { - axis:'y', - duration:1 - }; - - // Returns the element that needs to be animated to scroll the window. - // Kept for backwards compatibility (specially for localScroll & serialScroll) - $scrollTo.window = function( scope ){ - return $(window).scrollable(); - }; - - // Hack, hack, hack... stay away! - // Returns the real elements to scroll (supports window/iframes, documents and regular nodes) - $.fn.scrollable = function(){ - return this.map(function(){ - // Just store it, we might need it - var win = this.parentWindow || this.defaultView, - // If it's a document, get its iframe or the window if it's THE document - elem = this.nodeName == '#document' ? win.frameElement || win : this, - // Get the corresponding document - doc = elem.contentDocument || (elem.contentWindow || elem).document, - isWin = elem.setInterval; - - return elem.nodeName == 'IFRAME' || isWin && $.browser.safari ? doc.body - : isWin ? doc.documentElement - : this; - }); - }; - - $.fn.scrollTo = function( target, duration, settings ){ - if( typeof duration == 'object' ){ - settings = duration; - duration = 0; - } - if( typeof settings == 'function' ) - settings = { onAfter:settings }; - - settings = $.extend( {}, $scrollTo.defaults, settings ); - // Speed is still recognized for backwards compatibility - duration = duration || settings.speed || settings.duration; - // Make sure the settings are given right - settings.queue = settings.queue && settings.axis.length > 1; - - if( settings.queue ) - // Let's keep the overall duration - duration /= 2; - settings.offset = both( settings.offset ); - settings.over = both( settings.over ); - - return this.scrollable().each(function(){ - var elem = this, - $elem = $(elem), - targ = target, toff, attr = {}, - win = $elem.is('html,body'); - - switch( typeof targ ){ - // A number will pass the regex - case 'number': - case 'string': - if( /^([+-]=)?\d+(px)?$/.test(targ) ){ - targ = both( targ ); - // We are done - break; - } - // Relative selector, no break! - targ = $(targ,this); - case 'object': - // DOMElement / jQuery - if( targ.is || targ.style ) - // Get the real position of the target - toff = (targ = $(targ)).offset(); - } - $.each( settings.axis.split(''), function( i, axis ){ - var Pos = axis == 'x' ? 'Left' : 'Top', - pos = Pos.toLowerCase(), - key = 'scroll' + Pos, - old = elem[key], - Dim = axis == 'x' ? 'Width' : 'Height', - dim = Dim.toLowerCase(); - - if( toff ){// jQuery / DOMElement - attr[key] = toff[pos] + ( win ? 0 : old - $elem.offset()[pos] ); - - // If it's a dom element, reduce the margin - if( settings.margin ){ - attr[key] -= parseInt(targ.css('margin'+Pos)) || 0; - attr[key] -= parseInt(targ.css('border'+Pos+'Width')) || 0; - } - - attr[key] += settings.offset[pos] || 0; - - if( settings.over[pos] ) - // Scroll to a fraction of its width/height - attr[key] += targ[dim]() * settings.over[pos]; - }else - attr[key] = targ[pos]; - - // Number or 'number' - if( /^\d+$/.test(attr[key]) ) - // Check the limits - attr[key] = attr[key] <= 0 ? 0 : Math.min( attr[key], max(Dim) ); - - // Queueing axes - if( !i && settings.queue ){ - // Don't waste time animating, if there's no need. - if( old != attr[key] ) - // Intermediate animation - animate( settings.onAfterFirst ); - // Don't animate this axis again in the next iteration. - delete attr[key]; - } - }); - animate( settings.onAfter ); - - function animate( callback ){ - $elem.animate( attr, duration, settings.easing, callback && function(){ - callback.call(this, target, settings); - }); - }; - function max( Dim ){ - var attr ='scroll'+Dim, - doc = elem.ownerDocument; - - return win - ? Math.max( doc.documentElement[attr], doc.body[attr] ) - : elem[attr]; - }; - }).end(); - }; - - function both( val ){ - return typeof val == 'object' ? val : { top:val, left:val }; - }; - -})( jQuery ); \ No newline at end of file diff --git a/wolnelektury/static/js/locale.js b/wolnelektury/static/js/locale.js deleted file mode 100755 index e4c8f17aa..000000000 --- a/wolnelektury/static/js/locale.js +++ /dev/null @@ -1,35 +0,0 @@ -var LOCALE_TEXTS = { - "pl": { - "Loading": "Ładowanie" - }, - "de": { - "Loading": "Herunterladen" - }, - "fr": { - "Loading": "Chargement" - }, - "en": { - "Loading": "Loading" - }, - "ru": { - "Loading": "Загрузка" - }, - "es": { - "Loading": "Cargando" - }, - "lt":{ - "Loading": "Krovimas" - }, - "uk":{ - "Loading": "Завантажується" - }, - "jp":{ - "Loading": "負荷" - }, - "it":{ - "Loading": "caricamento" - }, -} -function gettext(text) { - return LOCALE_TEXTS[LANGUAGE_CODE][text]; -} diff --git a/wolnelektury/static/js/modernizr.custom.19652.js b/wolnelektury/static/js/modernizr.custom.19652.js deleted file mode 100644 index 8106cb788..000000000 --- a/wolnelektury/static/js/modernizr.custom.19652.js +++ /dev/null @@ -1,4 +0,0 @@ -/* Modernizr 2.5.3 (Custom Build) | MIT & BSD - * Build: http://www.modernizr.com/download/#-input - */ -;window.Modernizr=function(a,b,c){function t(a){i.cssText=a}function u(a,b){return t(prefixes.join(a+";")+(b||""))}function v(a,b){return typeof a===b}function w(a,b){return!!~(""+a).indexOf(b)}function x(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:v(f,"function")?f.bind(d||b):f}return!1}function y(){e.input=function(c){for(var d=0,e=c.length;d
            ').insertAfter($(this)); - var choicesList = $('
              ').appendTo(container).css({ - width: 200, float: 'left', minHeight: 200, backgroundColor: '#eee', margin: 0, padding: 0 - }); - var valuesList = $('
                ').appendTo(container).css({ - width: 200, float: 'left', minHeight: 200, backgroundColor: '#eee', margin: 0, padding: 0 - }); - var choiceIds = []; - $.each(settings.choices, function() { - choiceIds.push('' + this.id); - }); - - function createItem(hash) { - return $('
              1. ' + hash.name + '
              2. ').css({ - backgroundColor: '#cff', - display: 'block', - border: '1px solid #cdd', - padding: 2, - margin: 0 - }).data('obj-id', hash.id); - } - - $.each(settings.choices, function() { - if ($.inArray('' + this.id, values) == -1) { - choicesList.append(createItem(this)); - } - }); - - $.each(values, function() { - var index = $.inArray('' + this, choiceIds); // Why this[0]? - if (index != -1) { - valuesList.append(createItem(settings.choices[index])); - } - }); - - choicesList.sortable({ - connectWith: '.connectedSortable' - }).disableSelection(); - - valuesList.sortable({ - connectWith: '.connectedSortable', - update: function() { - values = []; - $('li', valuesList).each(function(index) { - values.push($(this).data('obj-id')); - console.log($(this).data('obj-id')); - }); - console.log('update', values.join(','), input); - input.val(values.join(',')); - } - }).disableSelection(); - }; -})(jQuery); diff --git a/wolnelektury/static/js/pdcounter.js b/wolnelektury/static/js/pdcounter.js deleted file mode 100755 index 00c074280..000000000 --- a/wolnelektury/static/js/pdcounter.js +++ /dev/null @@ -1,36 +0,0 @@ -(function($) { - $(function() { - - - $('#countdown').each(function() { - var $this = $(this); - - var serverTime = function() { - var time = null; - $.ajax({url: '/zegar/', - async: false, dataType: 'text', - success: function(text) { - time = new Date(text); - }, error: function(http, message, exc) { - time = new Date(); - }}); - return time; - } - - if (LANGUAGE_CODE != 'en') { - $.countdown.setDefaults($.countdown.regional[LANGUAGE_CODE]); - } - else { - $.countdown.setDefaults($.countdown.regional['']); - } - - var d = new Date($this.attr('data-year'), 0, 1); - function re() {location.reload()}; - $this.countdown({until: d, format: 'ydHMS', serverSync: serverTime, - onExpiry: re, alwaysExpire: true}); - - }); - - - }); -})(jQuery) \ No newline at end of file diff --git a/wolnelektury/static/js/player.js b/wolnelektury/static/js/player.js deleted file mode 100755 index 69dceed55..000000000 --- a/wolnelektury/static/js/player.js +++ /dev/null @@ -1,34 +0,0 @@ -(function($) { - $(function() { - - $("#jplayer").each(function() { - var $self = $(this); - $self.jPlayer({ - swfPath: "/static/jplayer/", - solution: "html,flash", - supplied: $self.attr('data-supplied'), - - ready: function() { - var player = $(this); - var setMedia = function(elem) { - var li = $(elem).parent(); - $('.jp-playlist-current').removeClass('jp-playlist-current'); - $(li).addClass('jp-playlist-current'); - var media = {} - - $('.mp3', li).each(function() {media['mp3'] = $(this).attr('href')}); - $('.ogg', li).each(function() {media['oga'] = $(this).attr('href')}); - - return player.jPlayer("setMedia", media); - }; - setMedia($('.play').first()).jPlayer("play"); - - $('.play').click(function() { - setMedia(this).jPlayer("play"); - }); - } - }); - }); - - }); -})(jQuery) \ No newline at end of file diff --git a/wolnelektury/static/js/search.js b/wolnelektury/static/js/search.js deleted file mode 100644 index 6afc4a399..000000000 --- a/wolnelektury/static/js/search.js +++ /dev/null @@ -1,45 +0,0 @@ - -var __bind = function (self, fn) { - return function() { fn.apply(self, arguments); }; -}; - -(function($){ - $.widget("wl.search", { - options: { - minLength: 0, - }, - - _create: function() { - var opts = { - minLength: this.options.minLength, - select: __bind(this, this.enter), - focus: function() { return false; }, - source: this.element.data('source'), - }; - this.element.autocomplete(opts).data("autocomplete")._renderItem = __bind(this, this.render_item); - }, - - enter: function(event, ui) { - if (ui.item.url != undefined) { - location.href = ui.item.url; - } else { - this.element.closest('form').submit(); - } - }, - - render_item: function (ul, item) { - return $("
              3. ").data('item.autocomplete', item) - .append(''+item.label+''+ - ''+item.category+'') - .appendTo(ul); - }, - - destroy: function() { - - }, - - - }); - - -})(jQuery); diff --git a/wolnelektury/static/js/slides.js b/wolnelektury/static/js/slides.js deleted file mode 100644 index c602054ab..000000000 --- a/wolnelektury/static/js/slides.js +++ /dev/null @@ -1,559 +0,0 @@ -// S5 v1.1 slides.js -- released into the Public Domain -// -// Please see http://www.meyerweb.com/eric/tools/s5/credits.html for information -// about all the wonderful and talented contributors to this code! - -var undef; -var slideCSS = ''; -var snum = 0; -var smax = 1; -var incpos = 0; -var number = undef; -var s5mode = true; -var defaultView = 'slideshow'; -var controlVis = 'visible'; - -var isIE = navigator.appName == 'Microsoft Internet Explorer' && navigator.userAgent.indexOf('Opera') < 1 ? 1 : 0; -var isOp = navigator.userAgent.indexOf('Opera') > -1 ? 1 : 0; -var isGe = navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('Safari') < 1 ? 1 : 0; - -function hasClass(object, className) { - if (!object.className) return false; - return (object.className.search('(^|\\s)' + className + '(\\s|$)') != -1); -} - -function hasValue(object, value) { - if (!object) return false; - return (object.search('(^|\\s)' + value + '(\\s|$)') != -1); -} - -function removeClass(object,className) { - if (!object) return; - object.className = object.className.replace(new RegExp('(^|\\s)'+className+'(\\s|$)'), RegExp.$1+RegExp.$2); -} - -function addClass(object,className) { - if (!object || hasClass(object, className)) return; - if (object.className) { - object.className += ' '+className; - } else { - object.className = className; - } -} - -function GetElementsWithClassName(elementName,className) { - var allElements = document.getElementsByTagName(elementName); - var elemColl = new Array(); - for (var i = 0; i< allElements.length; i++) { - if (hasClass(allElements[i], className)) { - elemColl[elemColl.length] = allElements[i]; - } - } - return elemColl; -} - -function isParentOrSelf(element, id) { - if (element == null || element.nodeName=='BODY') return false; - else if (element.id == id) return true; - else return isParentOrSelf(element.parentNode, id); -} - -function nodeValue(node) { - var result = ""; - if (node.nodeType == 1) { - var children = node.childNodes; - for (var i = 0; i < children.length; ++i) { - result += nodeValue(children[i]); - } - } - else if (node.nodeType == 3) { - result = node.nodeValue; - } - return(result); -} - -function slideLabel() { - var slideColl = GetElementsWithClassName('*','slide'); - var list = document.getElementById('jumplist'); - smax = slideColl.length; - for (var n = 0; n < smax; n++) { - var obj = slideColl[n]; - - var did = 'slide' + n.toString(); - obj.setAttribute('id',did); - if (isOp) continue; - - var otext = ''; - var menu = obj.firstChild; - if (!menu) continue; // to cope with empty slides - while (menu && menu.nodeType == 3) { - menu = menu.nextSibling; - } - if (!menu) continue; // to cope with slides with only text nodes - - var menunodes = menu.childNodes; - for (var o = 0; o < menunodes.length; o++) { - otext += nodeValue(menunodes[o]); - } - otext = otext.substr(0,15) + '...'; - list.options[list.length] = new Option(n + ' : ' + otext, n); - } -} -/* -function currentSlide() { - var cs; - if (document.getElementById) { - cs = document.getElementById('currentSlide'); - } else { - cs = document.currentSlide; - } - cs.innerHTML = '' + snum + '<\/span> ' + - '\/<\/span> ' + - '' + (smax-1) + '<\/span>'; - if (snum == 0) { - cs.style.visibility = 'hidden'; - } else { - cs.style.visibility = 'visible'; - } -}*/ - -function go(step) { - if (document.getElementById('slideProj').disabled || step == 0) return; - var jl = document.getElementById('jumplist'); - var cid = 'slide' + snum; - var ce = document.getElementById(cid); - if (incrementals[snum].length > 0) { - for (var i = 0; i < incrementals[snum].length; i++) { - removeClass(incrementals[snum][i], 'current'); - removeClass(incrementals[snum][i], 'incremental'); - } - } - if (step != 'j') { - snum += step; - lmax = smax - 1; - if (snum > lmax) snum = lmax; - if (snum < 0) snum = 0; - } else - snum = parseInt(jl.value); - var nid = 'slide' + snum; - var ne = document.getElementById(nid); - if (!ne) { - ne = document.getElementById('slide0'); - snum = 0; - } - if (step < 0) {incpos = incrementals[snum].length} else {incpos = 0;} - if (incrementals[snum].length > 0 && incpos == 0) { - for (var i = 0; i < incrementals[snum].length; i++) { - if (hasClass(incrementals[snum][i], 'current')) - incpos = i + 1; - else - addClass(incrementals[snum][i], 'incremental'); - } - } - if (incrementals[snum].length > 0 && incpos > 0) - addClass(incrementals[snum][incpos - 1], 'current'); - ce.style.visibility = 'hidden'; - ne.style.visibility = 'visible'; - jl.selectedIndex = snum; - //currentSlide(); - number = 0; -} - -function goTo(target) { - if (target >= smax || target == snum) return; - go(target - snum); -} - -function subgo(step) { - if (step > 0) { - removeClass(incrementals[snum][incpos - 1],'current'); - removeClass(incrementals[snum][incpos], 'incremental'); - addClass(incrementals[snum][incpos],'current'); - incpos++; - } else { - incpos--; - removeClass(incrementals[snum][incpos],'current'); - addClass(incrementals[snum][incpos], 'incremental'); - addClass(incrementals[snum][incpos - 1],'current'); - } -} - -function toggle() { - var slideColl = GetElementsWithClassName('*','slide'); - var slides = document.getElementById('slideProj'); - var outline = document.getElementById('outlineStyle'); - var controls = document.getElementById('controls'); - if (!slides.disabled) { - slides.disabled = true; - outline.disabled = false; - s5mode = false; - fontSize('1em'); - for (var n = 0; n < smax; n++) { - var slide = slideColl[n]; - slide.style.visibility = 'visible'; - } - document.getElementById("toggle").value = "Lista slajdów"; - addClass(controls, 'hideme'); - showHide('h'); - } else { - slides.disabled = false; - outline.disabled = true; - s5mode = true; - fontScale(); - for (var n = 0; n < smax; n++) { - var slide = slideColl[n]; - slide.style.visibility = 'hidden'; - } - slideColl[snum].style.visibility = 'visible'; - document.getElementById("toggle").value = "Ciągły tekst"; - showHide('s'); - } -} - -function showHide(action) { - var obj = GetElementsWithClassName('*','hideme')[0]; - switch (action) { - case 's': obj.style.visibility = 'visible'; break; - case 'h': obj.style.visibility = 'hidden'; break; - case 'k': - if (obj.style.visibility != 'visible') { - obj.style.visibility = 'visible'; - } else { - obj.style.visibility = 'hidden'; - } - break; - } -} - -// 'keys' code adapted from MozPoint (http://mozpoint.mozdev.org/) -function keys(key) { - if (!key) { - key = event; - key.which = key.keyCode; - } - if (key.which == 84) { - toggle(); - return; - } - if (s5mode) { - switch (key.which) { - case 10: // return - case 13: // enter - if (window.event && isParentOrSelf(window.event.srcElement, 'controls')) return; - if (key.target && isParentOrSelf(key.target, 'controls')) return; - if(number != undef) { - goTo(number); - break; - } - case 32: // spacebar - case 34: // page down - case 39: // rightkey - case 40: // downkey - if(number != undef) { - go(number); - } else if (!incrementals[snum] || incpos >= incrementals[snum].length) { - go(1); - } else { - subgo(1); - } - break; - case 33: // page up - case 37: // leftkey - case 38: // upkey - if(number != undef) { - go(-1 * number); - } else if (!incrementals[snum] || incpos <= 0) { - go(-1); - } else { - subgo(-1); - } - break; - case 36: // home - goTo(0); - break; - case 35: // end - goTo(smax-1); - break; - case 67: // c - showHide('k'); - break; - } - if (key.which < 48 || key.which > 57) { - number = undef; - } else { - if (window.event && isParentOrSelf(window.event.srcElement, 'controls')) return; - if (key.target && isParentOrSelf(key.target, 'controls')) return; - number = (((number != undef) ? number : 0) * 10) + (key.which - 48); - } - } - return false; -} - -function clicker(e) { - number = undef; - var target; - if (window.event) { - target = window.event.srcElement; - e = window.event; - } else target = e.target; - if (target.getAttribute('href') != null || hasValue(target.rel, 'external') || isParentOrSelf(target, 'controls') || isParentOrSelf(target,'embed') || isParentOrSelf(target,'object')) return true; - if (!e.which || e.which == 1) { - if (!incrementals[snum] || incpos >= incrementals[snum].length) { - go(1); - } else { - subgo(1); - } - } -} - -function findSlide(hash) { - var target = null; - var slides = GetElementsWithClassName('*','slide'); - for (var i = 0; i < slides.length; i++) { - var targetSlide = slides[i]; - if ( (targetSlide.name && targetSlide.name == hash) - || (targetSlide.id && targetSlide.id == hash) ) { - target = targetSlide; - break; - } - } - while(target != null && target.nodeName != 'BODY') { - if (hasClass(target, 'slide')) { - return parseInt(target.id.slice(5)); - } - target = target.parentNode; - } - return null; -} - -function slideJump() { - if (window.location.hash == null) return; - var sregex = /^#slide(\d+)$/; - var matches = sregex.exec(window.location.hash); - var dest = null; - if (matches != null) { - dest = parseInt(matches[1]); - } else { - dest = findSlide(window.location.hash.slice(1)); - } - if (dest != null) - go(dest - snum); -} - -function fixLinks() { - var thisUri = window.location.href; - thisUri = thisUri.slice(0, thisUri.length - window.location.hash.length); - var aelements = document.getElementsByTagName('A'); - for (var i = 0; i < aelements.length; i++) { - var a = aelements[i].href; - var slideID = a.match('\#slide[0-9]{1,2}'); - if ((slideID) && (slideID[0].slice(0,1) == '#')) { - var dest = findSlide(slideID[0].slice(1)); - if (dest != null) { - if (aelements[i].addEventListener) { - aelements[i].addEventListener("click", new Function("e", - "if (document.getElementById('slideProj').disabled) return;" + - "go("+dest+" - snum); " + - "if (e.preventDefault) e.preventDefault();"), true); - } else if (aelements[i].attachEvent) { - aelements[i].attachEvent("onclick", new Function("", - "if (document.getElementById('slideProj').disabled) return;" + - "go("+dest+" - snum); " + - "event.returnValue = false;")); - } - } - } - } -} - -function externalLinks() { - if (!document.getElementsByTagName) return; - var anchors = document.getElementsByTagName('a'); - for (var i=0; i<\/select><\/div>'; - /*if (controlVis == 'hidden') { - var hidden = document.getElementById('navLinks'); - } else { - var hidden = document.getElementById('jumplist'); - } - addClass(hidden,'hideme');*/ - document.getElementById("toggle").onclick = toggle; -} - -function fontScale() { // causes layout problems in FireFox that get fixed if browser's Reload is used; same may be true of other Gecko-based browsers - if (!s5mode) return false; - var vScale = 22; // both yield 32 (after rounding) at 1024x768 - var hScale = 32; // perhaps should auto-calculate based on theme's declared value? - if (window.innerHeight) { - var vSize = window.innerHeight; - var hSize = window.innerWidth; - } else if (document.documentElement.clientHeight) { - var vSize = document.documentElement.clientHeight; - var hSize = document.documentElement.clientWidth; - } else if (document.body.clientHeight) { - var vSize = document.body.clientHeight; - var hSize = document.body.clientWidth; - } else { - var vSize = 700; // assuming 1024x768, minus chrome and such - var hSize = 1024; // these do not account for kiosk mode or Opera Show - } - var newSize = Math.min(Math.round(vSize/vScale),Math.round(hSize/hScale)); - fontSize(newSize + 'px'); - if (isGe) { // hack to counter incremental reflow bugs - var obj = document.getElementsByTagName('body')[0]; - obj.style.display = 'none'; - obj.style.display = 'block'; - } -} - -function fontSize(value) { - if (!(s5ss = document.getElementById('s5ss'))) { - if (!isIE) { - document.getElementsByTagName('head')[0].appendChild(s5ss = document.createElement('style')); - s5ss.setAttribute('media','screen, projection'); - s5ss.setAttribute('id','s5ss'); - } else { - document.createStyleSheet(); - document.s5ss = document.styleSheets[document.styleSheets.length - 1]; - } - } - if (!isIE) { - while (s5ss.lastChild) s5ss.removeChild(s5ss.lastChild); - s5ss.appendChild(document.createTextNode('body {font-size: ' + value + ' !important;}')); - } else { - document.s5ss.addRule('body','font-size: ' + value + ' !important;'); - } -} - -function notOperaFix() { - slideCSS = document.getElementById('slideProj').href; - var slides = document.getElementById('slideProj'); - var outline = document.getElementById('outlineStyle'); - slides.setAttribute('media','screen'); - outline.disabled = true; - if (isGe) { - slides.setAttribute('href','null'); // Gecko fix - slides.setAttribute('href',slideCSS); // Gecko fix - } - if (isIE && document.styleSheets && document.styleSheets[0]) { - document.styleSheets[0].addRule('img', 'behavior: url(ui/default/iepngfix.htc)'); - document.styleSheets[0].addRule('div', 'behavior: url(ui/default/iepngfix.htc)'); - document.styleSheets[0].addRule('.slide', 'behavior: url(ui/default/iepngfix.htc)'); - } -} - -function getIncrementals(obj) { - var incrementals = new Array(); - if (!obj) - return incrementals; - var children = obj.childNodes; - for (var i = 0; i < children.length; i++) { - var child = children[i]; - if (hasClass(child, 'incremental')) { - if (child.nodeName == 'OL' || child.nodeName == 'UL') { - removeClass(child, 'incremental'); - for (var j = 0; j < child.childNodes.length; j++) { - if (child.childNodes[j].nodeType == 1) { - addClass(child.childNodes[j], 'incremental'); - } - } - } else { - incrementals[incrementals.length] = child; - removeClass(child,'incremental'); - } - } - if (hasClass(child, 'show-first')) { - if (child.nodeName == 'OL' || child.nodeName == 'UL') { - removeClass(child, 'show-first'); - if (child.childNodes[isGe].nodeType == 1) { - removeClass(child.childNodes[isGe], 'incremental'); - } - } else { - incrementals[incrementals.length] = child; - } - } - incrementals = incrementals.concat(getIncrementals(child)); - } - return incrementals; -} - -function createIncrementals() { - var incrementals = new Array(); - for (var i = 0; i < smax; i++) { - incrementals[i] = getIncrementals(document.getElementById('slide'+i)); - } - return incrementals; -} - -function defaultCheck() { - var allMetas = document.getElementsByTagName('meta'); - for (var i = 0; i< allMetas.length; i++) { - if (allMetas[i].name == 'defaultView') { - defaultView = allMetas[i].content; - } - if (allMetas[i].name == 'controlVis') { - controlVis = allMetas[i].content; - } - } -} - -// Key trap fix, new function body for trap() -function trap(e) { - if (!e) { - e = event; - e.which = e.keyCode; - } - try { - modifierKey = e.ctrlKey || e.altKey || e.metaKey; - } - catch(e) { - modifierKey = false; - } - return modifierKey || e.which == 0; -} - -function startup() { - defaultCheck(); - if (!isOp) - createControls(); - slideLabel(); - fixLinks(); - externalLinks(); - fontScale(); - if (!isOp) { - notOperaFix(); - incrementals = createIncrementals(); - slideJump(); - if (defaultView == 'outline') { - toggle(); - } - document.onkeyup = keys; - document.onkeypress = trap; - document.onclick = clicker; - } -} - -window.onload = startup; -window.onresize = function(){setTimeout('fontScale()', 50);} diff --git a/wolnelektury/static/js/sponsors.js b/wolnelektury/static/js/sponsors.js deleted file mode 100755 index 7674379fe..000000000 --- a/wolnelektury/static/js/sponsors.js +++ /dev/null @@ -1,8 +0,0 @@ -(function($) { - $(function() { - - $('.sponsor-logos').cycle({timeout: 3000}); - - }); -})(jQuery) - diff --git a/wolnelektury/static/js/widget.js b/wolnelektury/static/js/widget.js deleted file mode 100644 index de30eb714..000000000 --- a/wolnelektury/static/js/widget.js +++ /dev/null @@ -1,73 +0,0 @@ -/* create basic elements */ -var id = "wl"; -var widget = document.getElementById(id); -var linkLogo = document.createElement('a'); -var logo = document.createElement('img'); -var form = document.createElement('form'); -var inputText = document.createElement('input'); -var inputSubmit = document.createElement('input'); -var body = document.getElementsByTagName('body') -var stylesheet = document.createElement('link'); - -var host = 'www.wolnelektury.pl'; - -/* set attributes of created elements */ -stylesheet.setAttribute('type', 'text/css'); -stylesheet.setAttribute('rel', 'stylesheet'); -stylesheet.setAttribute('href', 'http://'+host+'/static/css/widget.css'); -linkLogo.setAttribute('href', 'http://'+host); -logo.setAttribute('src', 'http://'+host+'/static/img/logo.png'); -form.setAttribute('action', 'http://'+host+'/szukaj/'); -form.setAttribute('method', 'get'); -form.setAttribute('accept-charset', 'utf-8'); -form.setAttribute('id', 'wl-form'); -inputText.setAttribute('type', 'text'); -inputText.setAttribute('title', 'tytul, autor, motyw/temat, epoka, rodzaj, gatunek'); -inputText.setAttribute('value', ''); -inputText.setAttribute('name', 'q'); -inputText.setAttribute('id', 'id_qq'); -inputText.setAttribute('size', '13'); -inputSubmit.setAttribute('type', 'image'); -inputSubmit.setAttribute('src', 'http://'+host+'/static/img/search.png'); -inputSubmit.setAttribute('style', 'position:relative; top:5px; margin-left:5px'); - -/* import jquery and autocomplete */ -var scriptJ = document.createElement('script'); -scriptJ.setAttribute('type', 'text/javascript'); -scriptJ.setAttribute('src', 'http://'+host+'/static/js/jquery.js'); - -var scriptAutoComplete = document.createElement('script'); -scriptAutoComplete.setAttribute('type', 'text/javascript'); -scriptAutoComplete.setAttribute('src', 'http://'+host+'/static/js/jquery-ui-1.8.2.custom.min.js'); - -var scriptInit = document.createElement('script'); -scriptInit.setAttribute('type', 'text/javascript'); -scriptInit.setAttribute('src', 'http://'+host+'/static/js/widgetInit.js'); - -body[0].appendChild(scriptJ); -body[0].appendChild(scriptAutoComplete); -body[0].appendChild(scriptInit); - -/* append elements to widget */ -widget.appendChild(stylesheet); -widget.appendChild(linkLogo); -linkLogo.appendChild(logo); -widget.appendChild(form); -form.appendChild(inputText); -form.appendChild(inputSubmit); - -/* ...and a little make-up */ -widget.style.borderColor = "#84BF2A"; -widget.style.borderWidth = "2px"; -widget.style.borderStyle = "solid"; -widget.style.width = "160px"; -widget.style.padding = "10px"; -widget.style.fontSize = "12px"; -form.style.paddingTop = "10px"; - -/* resize - if needed */ -if(widget.getAttribute('width') == '140'){ - logo.setAttribute('width', '140'); - inputText.setAttribute('size', '10'); - widget.style.width = "140px"; -} diff --git a/wolnelektury/static/js/widgetInit.js b/wolnelektury/static/js/widgetInit.js deleted file mode 100644 index ab57a3062..000000000 --- a/wolnelektury/static/js/widgetInit.js +++ /dev/null @@ -1,29 +0,0 @@ - $(function() { - $("#id_qq").autocomplete({ - source: function(request, response) { - $.ajax({ - url: "http://www.wolnelektury.pl/katalog/jtags/", - dataType: "jsonp", - data: { - featureClass: "P", - style: "full", - maxRows: 10, - q: request.term - }, - success: function(data) { - response($.map(data.matches, function(item) { - return { - label: item, - value: item - } - })) - } - }) - }, - minLength: 2, - select: function(event, ui) { - $("#id_qq").val(ui.item.value); - $("#wl-form").submit(); - } - }); - }); diff --git a/wolnelektury/static/opensearch.xml b/wolnelektury/static/opensearch.xml deleted file mode 100644 index 8ccdd269b..000000000 --- a/wolnelektury/static/opensearch.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - Wolne Lektury - WolneLektury.pl, szkolna biblioteka internetowa. - UTF-8 - lektury - Fundacja Nowoczesna Polska - pl - fundacja@nowoczesnapolska.org.pl - http://static.wolnelektury.pl/static/img/favicon.ico - http://static.wolnelektury.pl/static/img/wl_icon_64.png - - - - http://wolnelektury.pl/ - - diff --git a/wolnelektury/static/player.swf b/wolnelektury/static/player.swf deleted file mode 100644 index b2fde3365..000000000 Binary files a/wolnelektury/static/player.swf and /dev/null differ diff --git a/wolnelektury/static/sponsors/css/footer_admin.css b/wolnelektury/static/sponsors/css/footer_admin.css deleted file mode 100644 index fe19d30c9..000000000 --- a/wolnelektury/static/sponsors/css/footer_admin.css +++ /dev/null @@ -1,73 +0,0 @@ -.sponsors { - display: block; - clear: both; - margin-top: 5px; -} - -.sponsors .sponsors-sponsor-group { - float: left; - width: 180px; - border: 1px solid #CCC; - margin: 2px 2px 0 0; -} - -.sponsors .sponsors-sponsor-group-name { - border-bottom: 1px solid #CCC; - padding: 2px 2px 2px 4px; - margin: 0; - color: #FFF; - background-color: #7CA0C7; - font-weight: bold; - height: 15px; -} - -.sponsors .sponsors-sponsor-group-name input { - margin: -2px -2px -2px -4px; - padding: 0; - height: 15px; - width: 160px; -} - -.sponsors .sponsors-remove-sponsor-group { - float: right; - background-color: #CC3434; - color: #FFF; - width: 10px; - height: 15px; - padding: 2px; - text-align: center; - font-weight: bold; - display: block; - cursor: default; -} - -.sponsors .sponsors-remove-sponsor-group:hover { - color: #CC3434; - background-color: white; -} - -.sponsors .sponsors-unused-sponsor-group-name { - background-color: #FFF; - color: #666; -} - -.sponsors .sponsors-sponsor-group-list { - margin: 0; - padding: 2px; - list-style: none; - min-height: 400px; -} - -.sponsors-sponsor { - margin: 0 40px 2px 0; - width: 120px; - height: 120px; - border: 1px solid #CCC; - background-color: #EEE; - cursor: default; -} - -.sponsors-sponsor img { - max-width: 120px; - max-height: 120px; -} diff --git a/wolnelektury/static/sponsors/js/footer_admin.js b/wolnelektury/static/sponsors/js/footer_admin.js deleted file mode 100644 index 33c794a3d..000000000 --- a/wolnelektury/static/sponsors/js/footer_admin.js +++ /dev/null @@ -1,131 +0,0 @@ -(function($) { - $.fn.sponsorsFooter = function(options) { - var settings = { - sponsors: [] - }; - $.extend(settings, options); - - var input = $(this).hide(); - - var container = $('
                ').appendTo(input.parent()); - var groups = $.evalJSON(input.val()); - - var unusedDiv = $('
                ') - .appendTo(container) - .append('

                dostępni sponsorzy

                '); - var unusedList = $('
                  ') - .appendTo(unusedDiv) - .sortable({ - connectWith: '.sponsors-sponsor-group-list' - }); - - // Edit group name inline - function editNameInline(name) { - name.unbind('click.sponsorsFooter'); - var inlineInput = $('').val(name.html()); - name.html(''); - - function endEditing() { - name.html(inlineInput.val()); - inlineInput.remove(); - name.bind('click.sponsorsFooter', function() { - editNameInline($(this)); - }); - input.parents('form').unbind('submit.sponsorsFooter', endEditing); - return false; - } - - inlineInput.appendTo(name).focus().blur(endEditing); - input.parents('form').bind('submit.sponsorsFooter', endEditing); - } - - // Remove sponsor with passed id from sponsors array and return it - function popSponsor(id) { - for (var i=0; i < settings.sponsors.length; i++) { - if (settings.sponsors[i].id == id) { - var s = settings.sponsors[i]; - settings.sponsors.splice(i, 1); - return s; - } - } - return null; - } - - // Create sponsor group and bind events - function createGroup(name, sponsors) { - if (!sponsors) { - sponsors = []; - } - - var groupDiv = $('
                  '); - - $('X') - .click(function() { - groupDiv.fadeOut('slow', function() { - $('.sponsors-sponsor', groupDiv).hide().appendTo(unusedList).fadeIn(); - groupDiv.remove(); - }); - }).appendTo(groupDiv); - - $('

                  ' + name + '

                  ') - .bind('click.sponsorsFooter', function() { - editNameInline($(this)); - }).appendTo(groupDiv); - - var groupList = $('
                    ') - .appendTo(groupDiv) - .sortable({ - connectWith: '.sponsors-sponsor-group-list' - }); - - - for (var i = 0; i < sponsors.length; i++) { - $('
                  1. ' + sponsors[i].name + '
                  2. ') - .data('obj_id', sponsors[i].id) - .appendTo(groupList); - } - return groupDiv; - } - - // Create groups from data in input value - for (var i = 0; i < groups.length; i++) { - var group = groups[i]; - var sponsors = []; - - for (var j = 0; j < group.sponsors.length; j++) { - var s = popSponsor(group.sponsors[j]); - if (s) { - sponsors.push(s); - } - } - createGroup(group.name, sponsors).appendTo(container); - } - - // Serialize input value before submiting form - input.parents('form').submit(function(event) { - var groups = []; - $('.sponsors-sponsor-group', container).not('.sponsors-unused-sponsor-group').each(function() { - var group = {name: $('.sponsors-sponsor-group-name', this).html(), sponsors: []}; - $('.sponsors-sponsor', this).each(function() { - group.sponsors.push($(this).data('obj_id')); - }); - groups.push(group); - }); - input.val($.toJSON(groups)); - }); - - for (i = 0; i < settings.sponsors.length; i++) { - $('
                  3. ' + settings.sponsors[i].name + '
                  4. ') - .data('obj_id', settings.sponsors[i].id) - .appendTo(unusedList); - } - - $('') - .click(function() { - var newGroup = createGroup('').appendTo(container); - editNameInline($('.sponsors-sponsor-group-name', newGroup)); - }).prependTo(input.parent()); - - input.parent().append('
                    '); - }; -})(jQuery); diff --git a/wolnelektury/static/sponsors/js/jquery.json.min.js b/wolnelektury/static/sponsors/js/jquery.json.min.js deleted file mode 100644 index bad4a0afa..000000000 --- a/wolnelektury/static/sponsors/js/jquery.json.min.js +++ /dev/null @@ -1,31 +0,0 @@ - -(function($){$.toJSON=function(o) -{if(typeof(JSON)=='object'&&JSON.stringify) -return JSON.stringify(o);var type=typeof(o);if(o===null) -return"null";if(type=="undefined") -return undefined;if(type=="number"||type=="boolean") -return o+"";if(type=="string") -return $.quoteString(o);if(type=='object') -{if(typeof o.toJSON=="function") -return $.toJSON(o.toJSON());if(o.constructor===Date) -{var month=o.getUTCMonth()+1;if(month<10)month='0'+month;var day=o.getUTCDate();if(day<10)day='0'+day;var year=o.getUTCFullYear();var hours=o.getUTCHours();if(hours<10)hours='0'+hours;var minutes=o.getUTCMinutes();if(minutes<10)minutes='0'+minutes;var seconds=o.getUTCSeconds();if(seconds<10)seconds='0'+seconds;var milli=o.getUTCMilliseconds();if(milli<100)milli='0'+milli;if(milli<10)milli='0'+milli;return'"'+year+'-'+month+'-'+day+'T'+ -hours+':'+minutes+':'+seconds+'.'+milli+'Z"';} -if(o.constructor===Array) -{var ret=[];for(var i=0;i - - -
                    - - - - - - - -