From: yomguy Date: Fri, 20 Apr 2012 13:05:40 +0000 (+0200) Subject: fix again X-Git-Tag: 1.4.3-2~8^2 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=f0c855e25a7f2f491d6aab6fbdc1787b7181b075;p=telemeta.git fix again --- diff --git a/telemeta/static/telemeta/css/admin.css b/telemeta/static/telemeta/css/admin.css new file mode 100644 index 00000000..c5b55afb --- /dev/null +++ b/telemeta/static/telemeta/css/admin.css @@ -0,0 +1,41 @@ +/* Shamelessly stolen from trac's admin.css... */ + +.tabs { + border: 1px solid #6a0307; + /* border-color: gray black black gray;*/ + margin: 0em 0; + padding: .3em 0 0 .5em; + float: left; + width: 15em; + color: #6a0307; + font-size: 14px; + font-weight: bold; + -moz-border-radius: 8px 8px 8px 8px; + -webkit-border-radius: 8px 8px 8px 8px; + border-radius: 8px 8px 8px 8px; +} +.tabs ul { list-style: none; margin: 0 0 .5em; padding: 0 } +.tabs li { margin: 0; padding: 0.1em .5em } +.tabs li li { margin: 0 -0.5em; padding-left: 1.5em } +.tabs li li.active { background: #ccb; } +.tabs :link, .tabs :visited { border: none; display: block } +.tabs :link:hover, .tabs :visited:hover { background: transparent } + +.tabcontents { + padding: 0em 2em; + margin-left: 1em; + min-height: 300px; +} +p.help { color: #666; font-size: 90%; margin: 1em .5em .5em } + +form.addnew { clear: right; float: right; margin: -2em 0 4em; width: 33% } +form.mod { margin-top: 1em; } +form.mod .field { margin: .5em 0; } +form .field em { color: #888; font-size: smaller } +form .field .disabled em { color: #d7d7d7 } + +table.listing { clear: none; width: 64% } +table.listing .sel, table.listing .default { text-align: center; width: 1% } + + + diff --git a/telemeta/static/telemeta/css/indent.png b/telemeta/static/telemeta/css/indent.png new file mode 100644 index 00000000..03a7c341 Binary files /dev/null and b/telemeta/static/telemeta/css/indent.png differ diff --git a/telemeta/static/telemeta/css/indicator.gif b/telemeta/static/telemeta/css/indicator.gif new file mode 100644 index 00000000..085ccaec Binary files /dev/null and b/telemeta/static/telemeta/css/indicator.gif differ diff --git a/telemeta/static/telemeta/css/jquery.autocomplete.css b/telemeta/static/telemeta/css/jquery.autocomplete.css new file mode 100644 index 00000000..91b62283 --- /dev/null +++ b/telemeta/static/telemeta/css/jquery.autocomplete.css @@ -0,0 +1,48 @@ +.ac_results { + padding: 0px; + border: 1px solid black; + background-color: white; + 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: 0px; + padding: 2px 5px; + cursor: default; + display: block; + /* + if width will be 100% horizontal scrollbar will apear + when scroll mode will be used + */ + /*width: 100%;*/ + font: menu; + font-size: 12px; + /* + it is very important, if line-height not setted or setted + in relative units scroll will be broken in firefox + */ + line-height: 16px; + overflow: hidden; +} + +.ac_loading { + background: white url('indicator.gif') right center no-repeat; +} + +.ac_odd { + background-color: #eee; +} + +.ac_over { + background-color: #0A246A; + color: white; +} diff --git a/telemeta/static/telemeta/css/more.gif b/telemeta/static/telemeta/css/more.gif new file mode 100644 index 00000000..f4e7d5e6 Binary files /dev/null and b/telemeta/static/telemeta/css/more.gif differ diff --git a/telemeta/static/telemeta/css/more.png b/telemeta/static/telemeta/css/more.png new file mode 100644 index 00000000..db83cb87 Binary files /dev/null and b/telemeta/static/telemeta/css/more.png differ diff --git a/telemeta/static/telemeta/css/player.css b/telemeta/static/telemeta/css/player.css new file mode 100644 index 00000000..009155ab --- /dev/null +++ b/telemeta/static/telemeta/css/player.css @@ -0,0 +1,53 @@ + +#player_maximized .ts-player .ts-wave, #player_maximized .ts-player .ts-image { + height: 170px; +} + +.ts-skin-lab .ts-player .ts-control { + background: url('../images/player_controlbg.png'); +} + +#player_maximized, #player_minimized { + position: relative; +} + + +#player_maximized .toggle, #player_minimized .toggle { + position: relative; + display: block; + overflow: hidden; + float: left; + width: 18px; + padding: 10px 0 0 0; + height: 0px !important; + height /**/:10px; /* for IE5/Win only */ + background-image: url('../images/maximize.png'); + text-decoration: none; + border: none; +} + +#player_maximized .toggle:hover, #player_minimized .toggle:hover { + background-position: 0px -10px; +} + +#player_maximized .embed_player_frame, #player_minimized .embed_player_frame { + float: right; + font-weight: bold; + color: #6A0307; + text-decoration: none; + font-size: 50%; + padding-left: 2ex; + padding-right: 2ex; + position: relative; + top: -1px; + line-height: 1.5em; +} + +#player_maximized .embed_player_frame:hover, #player_minimized .embed_player_frame:hover { + text-decoration: none; +} + +#player_maximized { + margin: 10px 0 15px 0; + display: none; +} \ No newline at end of file diff --git a/telemeta/static/telemeta/css/search_bg.png b/telemeta/static/telemeta/css/search_bg.png new file mode 100644 index 00000000..923ed4c2 Binary files /dev/null and b/telemeta/static/telemeta/css/search_bg.png differ diff --git a/telemeta/static/telemeta/css/telemeta.css b/telemeta/static/telemeta/css/telemeta.css new file mode 100644 index 00000000..d1a4dae9 --- /dev/null +++ b/telemeta/static/telemeta/css/telemeta.css @@ -0,0 +1,1266 @@ +body {margin: 0; padding: 0;} +a {text-decoration: none; color: #969696;} +a img {border: none;} +html, input, select, textarea, h1, h2, h3, h4, h5, h6 { + font-size: 100%; +} +body { + font: 0.8125em/1em Verdana, sans-serif; + line-height: 1.3em; + color: #333; + background: #FFF; + margin: 0em; +} + +/*a:link, a:visited { + color: #BB0000; + text-decoration:none; +} +a:link:hover, a:visited:hover { + background-color: transparent; + color: #BB0000; + text-decoration: underline; +}*/ +a, a:visited { + color: #BB0000; + text-decoration:none; +} +a:hover { + background-color: transparent; + color: #BB0000; + text-decoration: underline; +} + +a img { border: none; } + +.rst-content h1 { + font-size: 1.2em; + font-weight: bold; + color: #353535; +} +.nett { + clear: both; + height: 5px; +} + +.wazing { + clear: both; + position: relative; +} + +/* Min-width */ +#layout { + min-width: 740px; +} + +#content { + /*margin-top: 1em;*/ + margin-bottom: 0em; +} + +#content { + position: relative; + margin-left: 2em; + margin-right: 2em; +} + + +#content ul, #content ul ul, #content ol { + list-style: square; + padding: .7em; + padding-left: 2em; + font-size: 0.8em; + clear: both; +} +#content ul ul { + font-size: 1.1em; + padding-left: 0; +} +#content li { + padding: .2em; + padding-left: 0; +} +#content li a { + padding: .1em 0; +} +#content h1 { + color: #6a0307; + font-weight: bold; + display: inline; + font-size: 120%; +} +#content h3 { + color: #6a0307; + font-weight: bold; + display: inline; +} + +#content h2 { + color: #6a0307; +} + +#logo a, #logo a:hover { border: none; background: transparent; } + +#header { + padding: 0em; +/* background: url("../images/waves.png") 100% 0% no-repeat; */ +} + +#content_header, #header{ + margin-bottom: .8em; +} + +#content_header{ + width:100%; + border-collapse:collapse; +} + +#content_header td{ + vertical-align: top; +} + +#content_header td.rightcol{ + text-align:right; + white-space:nowrap; /**this implies to stretach righcol to accomodate all the width, + UNLESS there is a div.fixedWidthAsPlayer inside td.rightcol (see blow)*/ +} + +#content_header td.rightcol div.fixedWidthAsPlayer{ + width:374px; /*must be width+2*padding, see #rightcol below*/ + float:right; + white-space:normal; /*to override no-wrap defined in #content_header td.rightcol*/ +} + +#content_header td.rightcol div.fixedWidthAsPlayer a{ + display:inline-block; + margin-top:0.5ex; +} + +#rightcol { + width: 362px; /**if u change this, change also width #content_header td.rightcol, see above*/ + padding: 6px; /**if u change this, change also width #content_header td.rightcol, see above*/ + position: relative; + z-index: 1; + float: right; + border: 1px solid #999; + background-color: #eee; + -moz-border-radius: 8px 8px 8px 8px; + -webkit-border-radius: 8px 8px 8px 8px; + border-radius: 8px 8px 8px 8px; +} + +#rightcol .analyzer, #rightcol .exporter, .markers { + text-align: left; + position: relative; +} + +#rightcol form { + width: 360px; + margin-top: 5px; + background-color: #fff; + border: 1px solid #adadad; +} + +#rightcol p { + margin: 0; + padding: 0; +} + +#collection_player { + background: transparent; + /* background-image: url(../images/grid_bg.png); */ +} + +#collection_player .title { + padding: 2px 5px 7px 5px; +} + + +.exporter { + background-color: #fff; + border: 1px solid #adadad; + padding: 2px; + height: 26px; + margin: 5px 0 0; + font-size: 0.9em; + color: #000; + font-weight: bold; +} + +.analyzer, .markers { + background-color: #fff; + color: #000; + border: 1px solid #adadad; + width: 356px; + padding: 2px; + /* margin: 5px 0 0; */ + font-size: 1em; +} + +.markers { + max-height: 500px; + overflow-y: scroll; +} + +.vscroll { + max-height: 300px; + overflow-y: scroll; + width: 100%; +} + + +.analyzer-title { + background-color: #f2f2f2; + color: #000; + padding: 2px; +} + +.analyzer-line { + background-color: #fdfdfd; + color: #000; + padding: 4px; +} + +/* Geographic navigator */ +ul.continents, ul.continents ul { list-style: none; margin: 0; padding: 0;} +ul.continents { margin: 1em 0; } +ul.continents ul {margin-left: 0; margin-bottom: 0.9em; padding: 0 1em 1em 0;} +ul.continents li.name { width: 460px; float: left; clear: left; margin-right: 30px;} +ul.continents li.odd { clear: none;} +ul.continents li.name b { font-size: 120%; font-weight: bold; } +ul.continents ul li { display: inline; padding-right: 2em;} +ul.continents ul li a { line-height: 1.8em; } + +/* Collection */ +#content .intro { + font-size: 1em; + font-weight: bold; + color: #444; + margin: 5px 0; + font-size: 0.8em; +} +#content .intro span { + padding: 3px; + +} + +/* Forms */ +input, textarea, select { margin: 2px } +input, select { vertical-align: middle } +input[type=button], input[type=submit], input[type=reset] { + background: #f2f2f2; + color: #444; + border: 3px double #ccc; + padding: .1em .5em; + font-weight: bold; + cursor: pointer; +} +input[type=button]:hover, input[type=submit]:hover, input[type=reset]:hover { + background: #8D8C94; + color: #fff; +} +input[type=button][disabled], input[type=submit][disabled], +input[type=reset][disabled] { + background: #f6f6f6; + border-style: solid; + color: #999; +} +input[type=text], input[type=password], input.textwidget, textarea { border: 1px solid #ccc; } +input[type=text], input[type=password], input.textwidget { padding: .25em .1em } +input[type=text]:focus, input[type=password]:focus, input.textwidget:focus, textarea:focus { + border-color: #aaa; +} +option { border-bottom: 1px dotted #d7d7d7; } +fieldset { border: 1px solid #d7d7d7; padding: .5em; margin: 0 } +fieldset.iefix { background: transparent; border: none; padding: 0; margin: 0 } +* html fieldset.iefix { width: 98% } +fieldset.iefix p { margin: 0 } +legend { color: #999; padding: 0 .25em; font-size: 90%; font-weight: bold } +label.disabled { color: #d7d7d7 } +.buttons { margin: .5em .5em .5em 0 } +.buttons form, .buttons form div { display: inline } +.buttons input { margin: 1em .5em .1em 0 } +.inlinebuttons input { + font-size: 70%; + border-width: 1px; + border-style: dotted; + margin: 0; + padding: 0.1em; + background: none; +} + +/* Quick search */ +#quick_search { + position: absolute; + top: 1.7em; + left: 35%; + background-color: #6a0307; + padding: 0.3em 0em 0.3em 0.3em; + -moz-border-radius: 8px 8px 8px 8px; + -webkit-border-radius: 8px 8px 8px 8px; + border-radius: 8px 8px 8px 8px; +} +#quick_search form { + float: left; + margin-right: 12px; +} +#quick_search p { + margin-top: .3em; + clear: left; +} + +#quick_search a { + font-size: .8em; + font-weight: bold; + vertical-align: middle; +} + +#quick_search input { + vertical-align: middle; + font-size: .8em; + margin-right: 0; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +#quick_search_pattern { + background: #FFF url(search_bg.png) no-repeat; + padding: .4em .1em; + padding-left: 25px; + width: 180px; + color: #555; + font-weight: bold; +} + +/* Authentication */ +#auth_info { + color: #FFF; + font-weight: bold; + position: absolute; + top: 1.5em; + right: 1.1em; + margin-right: 1em; + font-size: 0.9em; + background-color: #6a0307; + padding: 1em; + -moz-border-radius: 8px 8px 8px 8px; + -webkit-border-radius: 8px 8px 8px 8px; + border-radius: 8px 8px 8px 8px; +} + +#auth_info a { + color: #FFF; + font-size: 1em; + font-weight: bold; +} + +form.login { + font-size: 0.8em; + float: left; + margin-top: 2em; + margin-bottom: 4em; + padding: .5em; + border: 1px dotted #888; +} + +.login-error { + color: #BB0000; +} + +form.login label { + display: block; + width: 11em; + float: left; + clear: left; + font-weight: bold; + padding-top: 0.3em; +} + +form.login .submit { + float: right; + margin-top: 1em; +} + +/* Search form */ +#searchform { + margin: 15px 0; +} +#searchform fieldset { + padding: 0; + padding: .5em; + width: 650px; + border: none; + border: 1px solid #6a0307; + margin-bottom: 1em; + -moz-border-radius: 8px 8px 8px 8px; + -webkit-border-radius: 8px 8px 8px 8px; + border-radius: 8px 8px 8px 8px; +} +#searchform p { + background-color: #fff; + padding: .5em 0; +} +#searchform label { + font-size: 0.8em; + display: block; + float: left; + width: 30%; + margin-left: 15px; + margin-top: .2em; + line-height: 1.8em; + font-weight: bold; + color: #333; + text-transform: uppercase; +} +#searchform select { + width: 59%; +} +#searchform fieldset input { + width: 56%; +} +#searchform select, #searchform fieldset input { + font-size: 0.8em; +} +#searchform .submit { + padding: 0; + clear: both; + width: 450px; +} + +#searchform select.tiny { + width: 12%; +} + +/* Main navigation bar (borrowed from Trac) */ +#menu { + background-color: #6a0307 ; + font: normal verdana,'Bitstream Vera Sans',helvetica,arial,sans-serif; + border-top: .25em solid #6a0307; + padding-left:26px; +} + +#menu a, #menu a:visited{ + display:inline-block; + color: #fff; + text-decoration:none; + border-bottom-width:.5em; + border-bottom-style: solid; + background-color: #6a0307; + -webkit-border-top-left-radius:5px 5px; + moz-border-radius-topleft: 5px 5px; + border-top-left-radius: 5px 5px; + -webkit-border-top-right-radius:5px 5px; + moz-border-radius-topright: 5px 5px; + border-top-right-radius: 5px 5px; + font-weight: bold; + font-size: 14px; + padding: .5em 1em; +} +#menu a:hover, #menu a.active{ + background-color: #FFF; + color: #6a0307; +} + +#menu .darkblue { border-bottom-color: #0f3179; } +#menu .blue { border-bottom-color: #4f628a; } +#menu .green { border-bottom-color: #92b220; } +#menu .yellow { border-bottom-color: #f3ad17; } +#menu .orange { border-bottom-color: #e65911; } +#menu .darkgreen { border-bottom-color: #006a12; } +#menu .black { border-bottom-color: #000000; } +#menu .red { border-bottom-color: #DD0000; } +#menu .violet { border-bottom-color: #A00020; } +#menu .origin { border-bottom-color: #6a0307; } + +* html #menu :link, * html #menu :visited { background-position: 1px 0 } + + +/* Drop Down Menus */ +.clear {clear:both} + +#nav { + margin:0; + padding:0; + list-style:none; +} + +/* make the LI display inline */ +/* it's position relative so that position absolute */ +/* can be used in submenu */ + +#nav li { +display:inline-block; +position:relative; +z-index:500; +} + +/* this is the parent menu */ +#nav li a { +display:block; +text-align:center; +} + +/* you can make a different style for default selected value */ +#nav a.selected { +color:#FFF; +} + +/* submenu, it's hidden by default */ +#nav ul { + position:absolute; + left:0; + display:none; + margin:0 0 0 -2px; + padding:0; + list-style: none outside none; + border-left:2px solid #6a0307; + border-right:2px solid #6a0307; + border-bottom:2px solid #6a0307; + background-color: #6a0307; + color: #FFF; +} + +#nav ul li { + width:100px; + float:left; + border-bottom:0px solid #fff; +} + +/* display block will make the link fill the whole area of LI */ +#nav ul a { + display:block; + height:15px; + padding: 5px 5px; + font-size: 11px; + text-align:left; + -webkit-border-top-left-radius:0px 0px; + moz-border-radius-topleft: 0px 0px; + border-top-left-radius: 0px 0px; + -webkit-border-top-right-radius:0px 0px; + moz-border-radius-topright: 0px 0px; + border-top-right-radius: 0px 0px; + border-bottom-width: 0px; +} + +#nav ul a:hover { + background-color: #FFF ; + color: #6a0307 ; +} + +#nav ul a:active { + background-color: #FFF; + color: #6a0307 ; +} + + + +/* Footer (borrowed from Trac) */ +#footer { + background: #6a0307; + clear: both; + color: #FFF; + font-size: 10px; + border-top: 1px solid; + height: 31px; + padding: 0.5em 0.5em 1.1em 0.5em; + margin-top: 2.5em; +} +#footer :link, #footer :visited { color: #FFF; } +#footer hr { display: none } +#footer #telemeta_powered { border: 0; float: left } +#footer #telemeta_powered:hover { background: transparent } +#footer p { margin: 0; } +#footer p.left { + float: left; + margin-left: 1em; + padding: 0 1em; + border-left: 1px solid #d7d7d7; + border-right: 1px solid #d7d7d7; +} +#footer p.right { + float: right; + text-align: right; +} +#footer p.center { + text-align: center; +} + +/* Homepage */ +.homelinks a { font-size: 120%;} + + +/* Definition list */ +dl { + position: relative; + margin: .5em 0; +} +dl dt, dl dd { + position: relative; + margin: 0; + margin-bottom: .5em; + padding: 0; + font-size: 0.8em; + line-height: 1.4em; + min-height: 1.4em; +} +dl dd { + border: 1px solid transparent; +} +dl dt { + float: left; + clear: left; +} + +dl.listing dt { + width: 18em; + background-color: #f9f9f9; + border: .1em solid #eee; + border-right: .3em solid #ddd; + padding-left: .3em; + margin-right: .8em; + color: #444; +} +dl.listing dt.group { + float: none; + margin-top: .9em; + background-color: #DDDDDD; + border-color: #ccc; + border-right: .1em solid #ccc; + width: 18.2em; +} +dl.listing dd { + margin-left: 19.4em; + font-weight: bold; +} + +/* dublin core display */ +h4.dublincore { + text-align: left; + padding: 5px 0 10px; + font-weight: bold; + color: #666; +} +dl.dublincore dt { + margin-right: .8em; + width: 23em !important; + font-style: italic; +} +dl.dublincore dd { + margin-left: 23.4em; + font-weight: bold; +} +dl.dublincore dt span { + width: 13em; + display: block; + float: left; + font-style: normal; + background-color: #f9f9f9; + border: 1px solid #eee; + border-right: 3px solid #ddd; + padding-left: .3em; + margin-right: 1.2em; + color: #444; +} +dl.dublincore .caption { + background-color: #B8B7C1; + margin: .5em 0; + margin-top: 0; + border-bottom: 1px dotted #666; + padding-top: .4em; + padding-bottom: .4em; + padding-left: .3em; + color: #fff; + font-weight: bold; + border-right: 1px solid #fff; +} +dl.dublincore dt.caption span { + background-color: #B8B7C1; + border: none; + border-right: 1px solid #fff; + color: #fff; +} +dl.dublincore dd.caption { + padding-top: .3em; + padding-left: .4em; + margin-left: 23.4em; +} + +/* infos item/collection */ +.infos, .extraInfos { + margin-bottom: 15px; +} + +.infos dl, .infos table { + position: relative; + font-size: 105%; +} + +.extraInfos dl, .extraInfos table { + position: relative; + font-size: 105%; +} + +.extraInfos div { + padding: 0; + margin-bottom: 5px; +} +.extraInfos .nett { + position: relative; + height: 0; + margin-bottom: -5px; +} +.extraInfos h4 { + /* clear: both; */ + font-size: 1em; + line-height: 1.4em; + border-bottom: 1px dotted #aaa; + color: #6a0307; +} +.with-rightcol .extraInfos h4 { + margin-right: 395px; +} + +.extraInfos h4 a { + position: relative; + display: block; + color: #6a0307 !important; + text-decoration: none; + margin: 0; + background: #fff url(more.png) no-repeat left top; + background-position: 0 -16px; + padding-bottom: 2px; + padding-left: 16px; + border-bottom: none !important; + outline: none; +} +.extraInfos h4 a:hover { + background-color: transparent; + border-bottom: none; + color: #6a0307 !important; + text-decoration:none; +} +.extraInfos .folded h4 { + border-bottom: none; +} +.extraInfos .folded h4 a { + background-position: 0 1px; +} + +/* Pagination */ +.pagination { + margin-top: .7em; + margin-bottom: .3em; + padding: .3em 0; + font-size: 1em; + background-color: #fff; + border-bottom: 1px solid #aaa; + color: #333; + font-weight: bold; +} +.pagination a { + background-color: #fff; + border-bottom: none; + font-size: 1em; + padding: .3em; +} + +/* Item instruments */ +div.instruments { + position: relative; + margin-left: -.7em; + margin-right: .5em; +} +table.instruments { + border: none; + border-collapse: separate; + /* width: 100%; */ + border-spacing: .7em; +} +table.instruments td { + font-size: .8em; + padding: 0 .2em; +} +table.instruments thead td { + background-color: #F9F9F9; + border: .1em solid #E1E1E1; + border-bottom: .3em solid #E1E1E1; +} +table.instruments tbody td { + border-bottom: .1em solid #E1E1E1; +} + +/* Styles for tabular listings (stolen from trac) */ +table.listing { + + border-spacing: 0; +} + +.fullpage table.listing { + width: 100%; + font-size: 105%; +} + +table.listing th { + text-align: left; + padding: 0 14em .1em 0; + font-size: 1em; +} +table.listing th, table.listing td { + font-size: 0.8em; + border-bottom: 1px solid #dfdfdf; +} +table.listing thead { background: #e8eaf0 } +table.listing thead th { + font-size: 0.9em; + padding: 3px .5em 3px; +} +table.listing thead th :link:hover, table.listing thead th :visited:hover { + background-color: transparent; +} +/*conflicts with buttons inside table*/ +/*table.listing a { + border: none; +}*/ +table.listing thead th a { + padding-right: 12px; +} +table.listing th.asc a, table.listing th.desc a { font-weight: bold } +table.listing th.asc a, table.listing th.desc a { + background-position: 100% 50%; + background-repeat: no-repeat; +} +table.listing th.asc a { background-image: url(../images/asc.png) } +table.listing th.desc a { background-image: url(../images/desc.png) } +table.listing tbody td, table.listing tbody th { + padding: .33em .5em; + vertical-align: top; + font-weight: normal; +} +table.listing tbody td { + font-weight: bold; +} +table.listing tbody td.tmp { + width: 100%; +} +table.listing tbody td a:hover, table.listing tbody th a:hover { + background-color: transparent; +} +table.listing tbody tr { border-top: 1px solid #ddd } +table.listing tbody tr.even { background-color: #fcfcfc } +table.listing tbody tr.odd { background-color: #f7f7f7 } +table.listing tbody tr:hover { background: #f7f8fa !important } + +table td.error { + color: red; + font-weight: bold; +} + +.infos li.error{ + color: red; + font-weight: bold; + font-size: 110%; +} + +.gmap { + border: solid 1px #888; + margin-top: 0.8em; +} + +.rst-content { + padding-top: 5px; +} + +.rst-content h1 { + color: #6a0307; +} + +.rst-content img.align-left { + float: left; + margin-right: 2ex; + margin-top: 0.6ex; + margin-bottom: 0.5ex; +} + +.rst-content img.align-right { + float: left; + margin-left: 2ex; + margin-top: 0.6ex; + margin-bottom: 0.5ex; +} + +img.align-left { + float: left; + padding-bottom: 1ex; + padding-right: 1ex; +} + +#content .rst-content ul, #content .rst-content ol { + clear: none; + font-size: 1em; + margin-left: 0.4em; +} + +#module-set { + float: right; + clear: right; +} + +#module-set .module { + border: 1px solid #000; + background-image: url(../images/grid_bg.png); + padding: 0.3em 0.8em 0.8em 0.8em; + margin: 0 0 1.5em 1.5em; + -moz-border-radius: 8px 8px 8px 8px; + -webkit-border-radius: 8px 8px 8px 8px; + border-radius: 8px 8px 8px 8px; +} + +#module-set .module h3 { + color: #FFF; + font-size: 1.1em; + font-weight: bold; +} + +#module-set .module a:hover { + text-decoration: none; +} + +a.image-link { + border: none; +} + +.map-thumbnail { + border: solid 1px #999; +} + +.home-content .module { + width: 400px; +} + +.home-description { + padding-right: 33%; + display: block; +} + +#content ul.playlist { + list-style-type: none; + border-top: solid 1px #e1e1e1; + margin: 0; + padding: 0; +} + +#content ul.playlist li { + display: block; + border: solid 1px #e1e1e1; + border-top: 0; + background: white; + margin: 0; + padding: 1em; +} + + +.tab_unselected, .tab_unselected:hover, .tab_unselected:visited { + background-color: #cccccc; + font-weight: normal; + color: #333333; + border: 1px solid #cccccc; + +} +.tab_selected, .tab_selected:hover, .tab_selected:visited { + background-color: #ffffff; + color: #000000; + font-weight: bold; + border-top: 1px solid #999999; + border-right: 1px solid #999999; + border-left: 1px solid #999999; + border-bottom: 1px solid #ffffff; + +} + +.tab, .tab:hover, .tab:visited{ + margin-top: 1ex; + display: inline-block; + margin-left: 0px; + padding: 1ex; + -moz-border-radius: 1ex 1ex 0ex 0ex; -webkit-border-radius: 1ex 1ex 0ex 0ex; border-radius: 1ex 1ex 0ex 0ex; +} + +.roundBorder4{ + /*padding: 0.3em 0.8em 0.8em 0.8em; + margin: 0 0 1.5em 1.5em;*/ + + -moz-border-radius: 4px 4px 4px 4px; + -webkit-border-radius: 4px 4px 4px 4px; + border-radius: 4px 4px 4px 4px; +} +.roundBorder6{ + /*padding: 0.3em 0.8em 0.8em 0.8em; + margin: 0 0 1.5em 1.5em;*/ + + -moz-border-radius: 6px 6px 6px 6px; + -webkit-border-radius: 6px 6px 6px 6px; + border-radius: 6px 6px 6px 6px; +} +.roundBorder8{ + /*padding: 0.3em 0.8em 0.8em 0.8em; + margin: 0 0 1.5em 1.5em;*/ + + -moz-border-radius: 8px 8px 8px 8px; + -webkit-border-radius: 8px 8px 8px 8px; + border-radius: 8px 8px 8px 8px; +} +.roundBorder10{ + /*padding: 0.3em 0.8em 0.8em 0.8em; + margin: 0 0 1.5em 1.5em;*/ + + -moz-border-radius: 10px 10px 10px 10px; + -webkit-border-radius: 10px 10px 10px 10px; + border-radius: 10px 10px 10px 10px; +} + +.markersdivUneditable{ + border: 0px !important; +} + +.markerdiv div{ + padding:0.7ex 1ex; +} +.markerdiv div[zero_top_padding]{ /*mathces any div with the attribute zero_top_padding set (whatever the value)*/ + padding-top:0px; +} +.markerdiv div *{ + vertical-align:middle; + font-family: sans-serif; +} +.markerdiv div input, .markerdiv div textarea{ + margin:0px; + padding:2px; +} +.markerdiv .ts-marker{ + background-image: url('../images/marker_tiny.png'); text-align: center; min-width:3ex; +} +.markerdiv .ts-marker, .markerdiv .markersdivOffset, .markerdiv .markersdivTitle, .markerdiv .markersdivAddPlaylist, .markerdiv .markersdivEdit{margin-right:.8ex;} +.markerdiv div a, .markerdiv div a:visited, .markerdiv div a:hover{ + display: inline-block; /*otherwise width and height do not work*/ + background-repeat: no-repeat; + text-decoration: none; + +} +.markerdiv .markersdivOffset, .markerdiv .markersdivOffset:hover, .markerdiv .markersdivOffset:visited{ + color: #000; +} +.markerdiv .ts-marker, .markerdiv .ts-marker:hover, .markerdiv .ts-marker:visited{ + font-family: monospace; background: #e65911;color: #FFF;padding-left: .3ex; padding-right:.3ex; +} +.markersdivDelete{ background-image: url('../images/del_marker.png');width:15px;height:2ex;background-repeat: no-repeat;} +/*backfround-repeat is redundant with .markerDiv a,.. defined above but this way .markersDivDelete is re-usable in other context (eg popupdiv*/ +.markersdivAddPlaylist{ background-image: url('../images/add_playlist_marker.png');width:13px;height:2ex; } +.markersdivTitle{ font-weight:bold;} +.markersdivEdit, .markersdivEdit:hover, .markersdivEdit:visited{ + line-height: normal; + color:#000; + background-position: -2px center; + padding-left: 13px; padding-right: 2px; + font-size: 65%; + border:2px solid #666; + background-color: #fff; + background-image: url('../images/edit_marker.png'); + -moz-border-radius: 1ex; -webkit-border-radius: 1ex; border-radius: 1ex; +} +.markersdivSave, .markersdivSave:hover, .markersdivSave:visited{ + background-color: #087714; + color: #fff; + font-weight: bold; + padding:.7ex; padding-left: 20px; + background-position: 5px center; + -moz-border-radius: 1ex;-webkit-border-radius: 1ex;border-radius: 1ex; + background-image: url('../images/ok.png'); +} +.markerdiv{ + border: 1px solid #aaaaaa; + margin-bottom: 1ex; + -moz-border-radius: 1e; + -webkit-border-radius: 1ex; + border-radius: 1ex; +} + +/*----------------------------------*/ +.component, .component_icon, .component:hover, .component_icon:hover, .component:visited, .component_icon:visited{ + background-position: 1ex .5ex; + -moz-border-radius: 1ex 1ex 1ex 1ex; + -webkit-border-radius: 1ex 1ex 1ex 1ex; + border-radius: 1ex 1ex 1ex 1ex; + padding:.7ex .7ex .7ex .7ex; + background-color: #f9f9f9; /*#626262;*/ + color:#444; + text-decoration: none; + margin:0; +} +.component + .component, .component + .component_icon, .component_icon + .component , +.component_icon + .component_icon{ + margin-left: .1ex; +} + +.component_icon, .component_icon:hover, .component_icon:visited{ + background-repeat: no-repeat; + background-position: 1ex .5ex; + padding:4px 8px 4px 26px; /*top right bottom left - last value depends on the icon size (default=16)*/ +} + +.button, .button:visited, .button:hover{ + font-weight: bold; + border: 1px solid #e1e1e1; + white-space:nowrap; + /* border-top: 1px solid #e1e1e1 !important; + border-left: 1px solid #e1e1e1 !important; + border-right: 1px solid #e1e1e1 !important; + border-bottom: 1px solid #e1e1e1 !important;*/ +} + +.button:hover{ + border-top: 1px solid #f9f9f9 !important; + border-left: 1px solid #f9f9f9 !important; + border-bottom: 1px solid #999 !important; + border-right: 1px solid #999 !important; + background-color: #f4f4f4; /*#e9e9d9;*/ + color: #000; /*#6A0307;*/ +} + + +.list_item, .list_item:visited, .list_item:hover{ + display:block; + color:#6A0307; +} + +.list_item:hover{ + font-weight: bold; +} + +.icon_edit{ + background-image: url('../images/edit_page.png'); +} +.icon_copy{ + background-image: url('../images/copy_page.png'); +} +.icon_previous{ + background-image: url('../images/previous.png'); +} +.icon_next{ + background-image: url('../images/next.png'); +} +.icon_dublin_core{ + background-image: url('../images/dublin_core.png'); +} +.icon_cancel{ + background-image: url('../images/cancel.png'); +} +.icon_save{ + background-image: url('../images/save.png'); +} +.icon_add{ + background-image: url('../images/add.png'); +} +.icon_add_to_playlist{ + background-image: url('../images/add_to_playlist.png'); +} +.icon_login{ + background-image: url('../images/password.png'); +} +.icon_search{ + background-image: url('../images/find.png'); +} +.icon_ok{ + background-image: url('../images/ok.png'); +} +.icon_csv{ + background-image: url('../images/csv.png'); +} +.icon_playlist{ + background-image: url('../images/playlist.png'); +} +.icon_filter{ + background-image: url('../images/filter.png'); +} +.icon_delete{ + background-image: url('../images/delete.png'); +} +.icon_rss,.icon_rss:hover{ + background: url('../images/feed-icon-14x14.png') no-repeat; + background-position: 0ex .8ex; + padding:.0ex 0ex .8ex .7ex; + text-decoration: none; +} + +.addToPlaylist { + margin:0.5ex; + position: absolute; + display:none; + left: 0; + top: 0; +} + +/* FORMS */ +#id_title { + width: 500px; +} +#id_alt_title { + width: 500px; +} +#id_collector { + width: 500px; +} +#id_creator { + width: 500px; +} +#id_cultural_area { + width: 500px; +} +#id_location_comment { + width: 500px; +} +#id_old_code { + width: 500px; +} +#id_code { + width: 500px; +} +#id_author { + width: 500px; +} +#id_collector_selection { + width: 500px; +} +#id_booklet_author { + width: 500px; +} +#id_alt_ids { + width: 500px; +} +#id_travail { + width: 500px; +} +#id_value_add { + width: 200px; +} +#id_value_edit { + width: 500px; +} +#id_file { + width: 500px; +} +#id_conservation_site { + width: 500px; +} + +/*focus on elements*/ +a:focus,div:focus{ + -moz-outline: 1px dotted #999 !important; + outline: #999 dotted 1px; /*!important;*/ +} +input,textarea{ + outline: none !important; +} + +.related_media { + border-top: 1px dotted #6a0307; +} diff --git a/telemeta/static/telemeta/css/telemeta_ie.css b/telemeta/static/telemeta/css/telemeta_ie.css new file mode 100644 index 00000000..f9c46d6b --- /dev/null +++ b/telemeta/static/telemeta/css/telemeta_ie.css @@ -0,0 +1,17 @@ +dl.listing, #rightcol { + margin-top: .4em; +} +dl.listing dd { + margin-top: .2em; +} +dl dd { + border-color: #fff; +} +dl.dublincore dd.caption { + margin-top: -.1em; +} +div.instruments { + margin-left: -.1em; + margin-right: .9em; +} + diff --git a/telemeta/static/telemeta/css/telemeta_ie6.css b/telemeta/static/telemeta/css/telemeta_ie6.css new file mode 100644 index 00000000..4b3fb5f9 --- /dev/null +++ b/telemeta/static/telemeta/css/telemeta_ie6.css @@ -0,0 +1,4 @@ +/* Min-width */ +/*#submenu h3, #submenu div { + height: 1.6em; +}*/ diff --git a/telemeta/static/telemeta/images/.directory b/telemeta/static/telemeta/images/.directory new file mode 100644 index 00000000..eaebf3d7 --- /dev/null +++ b/telemeta/static/telemeta/images/.directory @@ -0,0 +1,6 @@ +[Dolphin] +ShowPreview=true +SortOrder=0 +Sorting=0 +Timestamp=2012,4,13,18,2,6 +ViewMode=0 diff --git a/telemeta/static/telemeta/images/add.png b/telemeta/static/telemeta/images/add.png new file mode 100644 index 00000000..fe07994c Binary files /dev/null and b/telemeta/static/telemeta/images/add.png differ diff --git a/telemeta/static/telemeta/images/add_playlist_marker.png b/telemeta/static/telemeta/images/add_playlist_marker.png new file mode 100644 index 00000000..09158156 Binary files /dev/null and b/telemeta/static/telemeta/images/add_playlist_marker.png differ diff --git a/telemeta/static/telemeta/images/add_to_playlist.png b/telemeta/static/telemeta/images/add_to_playlist.png new file mode 100644 index 00000000..8431237b Binary files /dev/null and b/telemeta/static/telemeta/images/add_to_playlist.png differ diff --git a/telemeta/static/telemeta/images/admin_red.png b/telemeta/static/telemeta/images/admin_red.png new file mode 100644 index 00000000..4c952ff7 Binary files /dev/null and b/telemeta/static/telemeta/images/admin_red.png differ diff --git a/telemeta/static/telemeta/images/admin_wh.png b/telemeta/static/telemeta/images/admin_wh.png new file mode 100644 index 00000000..37923390 Binary files /dev/null and b/telemeta/static/telemeta/images/admin_wh.png differ diff --git a/telemeta/static/telemeta/images/adv_search_red.png b/telemeta/static/telemeta/images/adv_search_red.png new file mode 100644 index 00000000..c4d69e83 Binary files /dev/null and b/telemeta/static/telemeta/images/adv_search_red.png differ diff --git a/telemeta/static/telemeta/images/adv_search_wh.png b/telemeta/static/telemeta/images/adv_search_wh.png new file mode 100644 index 00000000..09c2e4c2 Binary files /dev/null and b/telemeta/static/telemeta/images/adv_search_wh.png differ diff --git a/telemeta/static/telemeta/images/asc.png b/telemeta/static/telemeta/images/asc.png new file mode 100644 index 00000000..486b7315 Binary files /dev/null and b/telemeta/static/telemeta/images/asc.png differ diff --git a/telemeta/static/telemeta/images/bg_yt.png b/telemeta/static/telemeta/images/bg_yt.png new file mode 100644 index 00000000..a2119535 Binary files /dev/null and b/telemeta/static/telemeta/images/bg_yt.png differ diff --git a/telemeta/static/telemeta/images/cancel.png b/telemeta/static/telemeta/images/cancel.png new file mode 100644 index 00000000..0ad2eb21 Binary files /dev/null and b/telemeta/static/telemeta/images/cancel.png differ diff --git a/telemeta/static/telemeta/images/close.png b/telemeta/static/telemeta/images/close.png new file mode 100644 index 00000000..ca837947 Binary files /dev/null and b/telemeta/static/telemeta/images/close.png differ diff --git a/telemeta/static/telemeta/images/collections_red.png b/telemeta/static/telemeta/images/collections_red.png new file mode 100644 index 00000000..b65328da Binary files /dev/null and b/telemeta/static/telemeta/images/collections_red.png differ diff --git a/telemeta/static/telemeta/images/collections_wh.png b/telemeta/static/telemeta/images/collections_wh.png new file mode 100644 index 00000000..bebb9f62 Binary files /dev/null and b/telemeta/static/telemeta/images/collections_wh.png differ diff --git a/telemeta/static/telemeta/images/copy_page.png b/telemeta/static/telemeta/images/copy_page.png new file mode 100644 index 00000000..c600e997 Binary files /dev/null and b/telemeta/static/telemeta/images/copy_page.png differ diff --git a/telemeta/static/telemeta/images/corpus.png b/telemeta/static/telemeta/images/corpus.png new file mode 100644 index 00000000..6b0f3714 Binary files /dev/null and b/telemeta/static/telemeta/images/corpus.png differ diff --git a/telemeta/static/telemeta/images/csv.png b/telemeta/static/telemeta/images/csv.png new file mode 100644 index 00000000..c9012665 Binary files /dev/null and b/telemeta/static/telemeta/images/csv.png differ diff --git a/telemeta/static/telemeta/images/del_marker.png b/telemeta/static/telemeta/images/del_marker.png new file mode 100644 index 00000000..5055a0f4 Binary files /dev/null and b/telemeta/static/telemeta/images/del_marker.png differ diff --git a/telemeta/static/telemeta/images/delete.png b/telemeta/static/telemeta/images/delete.png new file mode 100644 index 00000000..5a3c05d5 Binary files /dev/null and b/telemeta/static/telemeta/images/delete.png differ diff --git a/telemeta/static/telemeta/images/desc.png b/telemeta/static/telemeta/images/desc.png new file mode 100644 index 00000000..20701855 Binary files /dev/null and b/telemeta/static/telemeta/images/desc.png differ diff --git a/telemeta/static/telemeta/images/dialog-error.png b/telemeta/static/telemeta/images/dialog-error.png new file mode 100644 index 00000000..a296fefb Binary files /dev/null and b/telemeta/static/telemeta/images/dialog-error.png differ diff --git a/telemeta/static/telemeta/images/dots.gif b/telemeta/static/telemeta/images/dots.gif new file mode 100644 index 00000000..c6ae052f Binary files /dev/null and b/telemeta/static/telemeta/images/dots.gif differ diff --git a/telemeta/static/telemeta/images/download.png b/telemeta/static/telemeta/images/download.png new file mode 100644 index 00000000..4f7a3c26 Binary files /dev/null and b/telemeta/static/telemeta/images/download.png differ diff --git a/telemeta/static/telemeta/images/dublin_core.png b/telemeta/static/telemeta/images/dublin_core.png new file mode 100644 index 00000000..d53e56ef Binary files /dev/null and b/telemeta/static/telemeta/images/dublin_core.png differ diff --git a/telemeta/static/telemeta/images/edit_cancel.png b/telemeta/static/telemeta/images/edit_cancel.png new file mode 100644 index 00000000..ebd4b9d4 Binary files /dev/null and b/telemeta/static/telemeta/images/edit_cancel.png differ diff --git a/telemeta/static/telemeta/images/edit_marker.png b/telemeta/static/telemeta/images/edit_marker.png new file mode 100644 index 00000000..277a9005 Binary files /dev/null and b/telemeta/static/telemeta/images/edit_marker.png differ diff --git a/telemeta/static/telemeta/images/edit_page.png b/telemeta/static/telemeta/images/edit_page.png new file mode 100644 index 00000000..98713acb Binary files /dev/null and b/telemeta/static/telemeta/images/edit_page.png differ diff --git a/telemeta/static/telemeta/images/favicon.ico b/telemeta/static/telemeta/images/favicon.ico new file mode 100644 index 00000000..46ec3e27 Binary files /dev/null and b/telemeta/static/telemeta/images/favicon.ico differ diff --git a/telemeta/static/telemeta/images/feed-icon-14x14.png b/telemeta/static/telemeta/images/feed-icon-14x14.png new file mode 100755 index 00000000..b3c949d2 Binary files /dev/null and b/telemeta/static/telemeta/images/feed-icon-14x14.png differ diff --git a/telemeta/static/telemeta/images/feed-icon-28x28.png b/telemeta/static/telemeta/images/feed-icon-28x28.png new file mode 100755 index 00000000..d64c669c Binary files /dev/null and b/telemeta/static/telemeta/images/feed-icon-28x28.png differ diff --git a/telemeta/static/telemeta/images/filter.png b/telemeta/static/telemeta/images/filter.png new file mode 100644 index 00000000..9cabc5a3 Binary files /dev/null and b/telemeta/static/telemeta/images/filter.png differ diff --git a/telemeta/static/telemeta/images/find.png b/telemeta/static/telemeta/images/find.png new file mode 100644 index 00000000..943e00b4 Binary files /dev/null and b/telemeta/static/telemeta/images/find.png differ diff --git a/telemeta/static/telemeta/images/flac.png b/telemeta/static/telemeta/images/flac.png new file mode 100644 index 00000000..3cf18451 Binary files /dev/null and b/telemeta/static/telemeta/images/flac.png differ diff --git a/telemeta/static/telemeta/images/fonds.png b/telemeta/static/telemeta/images/fonds.png new file mode 100644 index 00000000..0f20201c Binary files /dev/null and b/telemeta/static/telemeta/images/fonds.png differ diff --git a/telemeta/static/telemeta/images/geo_wh.png b/telemeta/static/telemeta/images/geo_wh.png new file mode 100644 index 00000000..b5d96466 Binary files /dev/null and b/telemeta/static/telemeta/images/geo_wh.png differ diff --git a/telemeta/static/telemeta/images/grid_bg.png b/telemeta/static/telemeta/images/grid_bg.png new file mode 100644 index 00000000..c7760f55 Binary files /dev/null and b/telemeta/static/telemeta/images/grid_bg.png differ diff --git a/telemeta/static/telemeta/images/grid_bg_2.png b/telemeta/static/telemeta/images/grid_bg_2.png new file mode 100644 index 00000000..08e6c67a Binary files /dev/null and b/telemeta/static/telemeta/images/grid_bg_2.png differ diff --git a/telemeta/static/telemeta/images/help.png b/telemeta/static/telemeta/images/help.png new file mode 100644 index 00000000..0177a642 Binary files /dev/null and b/telemeta/static/telemeta/images/help.png differ diff --git a/telemeta/static/telemeta/images/home_red.png b/telemeta/static/telemeta/images/home_red.png new file mode 100644 index 00000000..b5d96466 Binary files /dev/null and b/telemeta/static/telemeta/images/home_red.png differ diff --git a/telemeta/static/telemeta/images/item.png b/telemeta/static/telemeta/images/item.png new file mode 100644 index 00000000..3f173d50 Binary files /dev/null and b/telemeta/static/telemeta/images/item.png differ diff --git a/telemeta/static/telemeta/images/item_collector.png b/telemeta/static/telemeta/images/item_collector.png new file mode 100644 index 00000000..79b8f989 Binary files /dev/null and b/telemeta/static/telemeta/images/item_collector.png differ diff --git a/telemeta/static/telemeta/images/item_duration.png b/telemeta/static/telemeta/images/item_duration.png new file mode 100644 index 00000000..523ffb68 Binary files /dev/null and b/telemeta/static/telemeta/images/item_duration.png differ diff --git a/telemeta/static/telemeta/images/item_flag.png b/telemeta/static/telemeta/images/item_flag.png new file mode 100644 index 00000000..00327794 Binary files /dev/null and b/telemeta/static/telemeta/images/item_flag.png differ diff --git a/telemeta/static/telemeta/images/item_title.png b/telemeta/static/telemeta/images/item_title.png new file mode 100644 index 00000000..6afd789e Binary files /dev/null and b/telemeta/static/telemeta/images/item_title.png differ diff --git a/telemeta/static/telemeta/images/logo-CNRS.png b/telemeta/static/telemeta/images/logo-CNRS.png new file mode 100644 index 00000000..1d49bd14 Binary files /dev/null and b/telemeta/static/telemeta/images/logo-CNRS.png differ diff --git a/telemeta/static/telemeta/images/logo-adonis.jpg b/telemeta/static/telemeta/images/logo-adonis.jpg new file mode 100644 index 00000000..2e6bce32 Binary files /dev/null and b/telemeta/static/telemeta/images/logo-adonis.jpg differ diff --git a/telemeta/static/telemeta/images/logo-mnhn.gif b/telemeta/static/telemeta/images/logo-mnhn.gif new file mode 100644 index 00000000..df019675 Binary files /dev/null and b/telemeta/static/telemeta/images/logo-mnhn.gif differ diff --git a/telemeta/static/telemeta/images/logo.png b/telemeta/static/telemeta/images/logo.png new file mode 100644 index 00000000..430231a8 Binary files /dev/null and b/telemeta/static/telemeta/images/logo.png differ diff --git a/telemeta/static/telemeta/images/logo_crem.png b/telemeta/static/telemeta/images/logo_crem.png new file mode 100644 index 00000000..9438fb82 Binary files /dev/null and b/telemeta/static/telemeta/images/logo_crem.png differ diff --git a/telemeta/static/telemeta/images/logo_mcc_2.png b/telemeta/static/telemeta/images/logo_mcc_2.png new file mode 100644 index 00000000..4be03849 Binary files /dev/null and b/telemeta/static/telemeta/images/logo_mcc_2.png differ diff --git a/telemeta/static/telemeta/images/logo_mini.png b/telemeta/static/telemeta/images/logo_mini.png new file mode 100644 index 00000000..e834e708 Binary files /dev/null and b/telemeta/static/telemeta/images/logo_mini.png differ diff --git a/telemeta/static/telemeta/images/logo_mini_2.png b/telemeta/static/telemeta/images/logo_mini_2.png new file mode 100644 index 00000000..15e1fb7d Binary files /dev/null and b/telemeta/static/telemeta/images/logo_mini_2.png differ diff --git a/telemeta/static/telemeta/images/logo_mini_wh.png b/telemeta/static/telemeta/images/logo_mini_wh.png new file mode 100644 index 00000000..9ef05cb3 Binary files /dev/null and b/telemeta/static/telemeta/images/logo_mini_wh.png differ diff --git a/telemeta/static/telemeta/images/logo_only.png b/telemeta/static/telemeta/images/logo_only.png new file mode 100644 index 00000000..1f043ce4 Binary files /dev/null and b/telemeta/static/telemeta/images/logo_only.png differ diff --git a/telemeta/static/telemeta/images/logo_only_22.png b/telemeta/static/telemeta/images/logo_only_22.png new file mode 100644 index 00000000..68cc1ccd Binary files /dev/null and b/telemeta/static/telemeta/images/logo_only_22.png differ diff --git a/telemeta/static/telemeta/images/logo_only_22_cont.png b/telemeta/static/telemeta/images/logo_only_22_cont.png new file mode 100644 index 00000000..fb002fa3 Binary files /dev/null and b/telemeta/static/telemeta/images/logo_only_22_cont.png differ diff --git a/telemeta/static/telemeta/images/logo_only_22_nb.png b/telemeta/static/telemeta/images/logo_only_22_nb.png new file mode 100644 index 00000000..ff19a2f3 Binary files /dev/null and b/telemeta/static/telemeta/images/logo_only_22_nb.png differ diff --git a/telemeta/static/telemeta/images/logo_only_52.png b/telemeta/static/telemeta/images/logo_only_52.png new file mode 100644 index 00000000..558bcda7 Binary files /dev/null and b/telemeta/static/telemeta/images/logo_only_52.png differ diff --git a/telemeta/static/telemeta/images/logo_telemeta_2.png b/telemeta/static/telemeta/images/logo_telemeta_2.png new file mode 100644 index 00000000..62cec470 Binary files /dev/null and b/telemeta/static/telemeta/images/logo_telemeta_2.png differ diff --git a/telemeta/static/telemeta/images/logout.png b/telemeta/static/telemeta/images/logout.png new file mode 100644 index 00000000..51ed2dcf Binary files /dev/null and b/telemeta/static/telemeta/images/logout.png differ diff --git a/telemeta/static/telemeta/images/map_thumbnail.png b/telemeta/static/telemeta/images/map_thumbnail.png new file mode 100644 index 00000000..38954efa Binary files /dev/null and b/telemeta/static/telemeta/images/map_thumbnail.png differ diff --git a/telemeta/static/telemeta/images/marker_ok_green.png b/telemeta/static/telemeta/images/marker_ok_green.png new file mode 100644 index 00000000..be467ce0 Binary files /dev/null and b/telemeta/static/telemeta/images/marker_ok_green.png differ diff --git a/telemeta/static/telemeta/images/marker_tiny.png b/telemeta/static/telemeta/images/marker_tiny.png new file mode 100644 index 00000000..925ec14c Binary files /dev/null and b/telemeta/static/telemeta/images/marker_tiny.png differ diff --git a/telemeta/static/telemeta/images/maximize.gif b/telemeta/static/telemeta/images/maximize.gif new file mode 100644 index 00000000..524acd01 Binary files /dev/null and b/telemeta/static/telemeta/images/maximize.gif differ diff --git a/telemeta/static/telemeta/images/maximize.png b/telemeta/static/telemeta/images/maximize.png new file mode 100644 index 00000000..ee95226d Binary files /dev/null and b/telemeta/static/telemeta/images/maximize.png differ diff --git a/telemeta/static/telemeta/images/maximize_old.gif b/telemeta/static/telemeta/images/maximize_old.gif new file mode 100644 index 00000000..524acd01 Binary files /dev/null and b/telemeta/static/telemeta/images/maximize_old.gif differ diff --git a/telemeta/static/telemeta/images/maximize_old.png b/telemeta/static/telemeta/images/maximize_old.png new file mode 100644 index 00000000..4cb4d62f Binary files /dev/null and b/telemeta/static/telemeta/images/maximize_old.png differ diff --git a/telemeta/static/telemeta/images/media-record.png b/telemeta/static/telemeta/images/media-record.png new file mode 100644 index 00000000..1dc4efd4 Binary files /dev/null and b/telemeta/static/telemeta/images/media-record.png differ diff --git a/telemeta/static/telemeta/images/minus.png b/telemeta/static/telemeta/images/minus.png new file mode 100644 index 00000000..116a9c9d Binary files /dev/null and b/telemeta/static/telemeta/images/minus.png differ diff --git a/telemeta/static/telemeta/images/module_playlist.png b/telemeta/static/telemeta/images/module_playlist.png new file mode 100644 index 00000000..e92f6141 Binary files /dev/null and b/telemeta/static/telemeta/images/module_playlist.png differ diff --git a/telemeta/static/telemeta/images/module_world.png b/telemeta/static/telemeta/images/module_world.png new file mode 100644 index 00000000..c1c699df Binary files /dev/null and b/telemeta/static/telemeta/images/module_world.png differ diff --git a/telemeta/static/telemeta/images/mp3.png b/telemeta/static/telemeta/images/mp3.png new file mode 100644 index 00000000..f6e95b31 Binary files /dev/null and b/telemeta/static/telemeta/images/mp3.png differ diff --git a/telemeta/static/telemeta/images/next.png b/telemeta/static/telemeta/images/next.png new file mode 100644 index 00000000..e9cbecd0 Binary files /dev/null and b/telemeta/static/telemeta/images/next.png differ diff --git a/telemeta/static/telemeta/images/ogg.png b/telemeta/static/telemeta/images/ogg.png new file mode 100644 index 00000000..b63fcf4c Binary files /dev/null and b/telemeta/static/telemeta/images/ogg.png differ diff --git a/telemeta/static/telemeta/images/ok.png b/telemeta/static/telemeta/images/ok.png new file mode 100644 index 00000000..543710fb Binary files /dev/null and b/telemeta/static/telemeta/images/ok.png differ diff --git a/telemeta/static/telemeta/images/password.png b/telemeta/static/telemeta/images/password.png new file mode 100644 index 00000000..192b6f79 Binary files /dev/null and b/telemeta/static/telemeta/images/password.png differ diff --git a/telemeta/static/telemeta/images/player_controlbg.png b/telemeta/static/telemeta/images/player_controlbg.png new file mode 100755 index 00000000..edaf9fc9 Binary files /dev/null and b/telemeta/static/telemeta/images/player_controlbg.png differ diff --git a/telemeta/static/telemeta/images/playlist.png b/telemeta/static/telemeta/images/playlist.png new file mode 100644 index 00000000..7330bc5b Binary files /dev/null and b/telemeta/static/telemeta/images/playlist.png differ diff --git a/telemeta/static/telemeta/images/playlist_title.png b/telemeta/static/telemeta/images/playlist_title.png new file mode 100644 index 00000000..5e30362d Binary files /dev/null and b/telemeta/static/telemeta/images/playlist_title.png differ diff --git a/telemeta/static/telemeta/images/plots.png b/telemeta/static/telemeta/images/plots.png new file mode 100644 index 00000000..311c95e1 Binary files /dev/null and b/telemeta/static/telemeta/images/plots.png differ diff --git a/telemeta/static/telemeta/images/plus.png b/telemeta/static/telemeta/images/plus.png new file mode 100644 index 00000000..9e8caf4b Binary files /dev/null and b/telemeta/static/telemeta/images/plus.png differ diff --git a/telemeta/static/telemeta/images/previous.png b/telemeta/static/telemeta/images/previous.png new file mode 100644 index 00000000..52fa887f Binary files /dev/null and b/telemeta/static/telemeta/images/previous.png differ diff --git a/telemeta/static/telemeta/images/rss.png b/telemeta/static/telemeta/images/rss.png new file mode 100644 index 00000000..4cd49c39 Binary files /dev/null and b/telemeta/static/telemeta/images/rss.png differ diff --git a/telemeta/static/telemeta/images/rss_red.png b/telemeta/static/telemeta/images/rss_red.png new file mode 100644 index 00000000..5596219f Binary files /dev/null and b/telemeta/static/telemeta/images/rss_red.png differ diff --git a/telemeta/static/telemeta/images/save.png b/telemeta/static/telemeta/images/save.png new file mode 100644 index 00000000..afc8725c Binary files /dev/null and b/telemeta/static/telemeta/images/save.png differ diff --git a/telemeta/static/telemeta/images/save_changes.png b/telemeta/static/telemeta/images/save_changes.png new file mode 100644 index 00000000..9a139b06 Binary files /dev/null and b/telemeta/static/telemeta/images/save_changes.png differ diff --git a/telemeta/static/telemeta/images/search_red.png b/telemeta/static/telemeta/images/search_red.png new file mode 100644 index 00000000..54ab50c3 Binary files /dev/null and b/telemeta/static/telemeta/images/search_red.png differ diff --git a/telemeta/static/telemeta/images/search_wh.png b/telemeta/static/telemeta/images/search_wh.png new file mode 100644 index 00000000..28502399 Binary files /dev/null and b/telemeta/static/telemeta/images/search_wh.png differ diff --git a/telemeta/static/telemeta/images/search_wh2.png b/telemeta/static/telemeta/images/search_wh2.png new file mode 100644 index 00000000..054af8d8 Binary files /dev/null and b/telemeta/static/telemeta/images/search_wh2.png differ diff --git a/telemeta/static/telemeta/images/share.png b/telemeta/static/telemeta/images/share.png new file mode 100644 index 00000000..02838a9d Binary files /dev/null and b/telemeta/static/telemeta/images/share.png differ diff --git a/telemeta/static/telemeta/images/text-speak.png b/telemeta/static/telemeta/images/text-speak.png new file mode 100644 index 00000000..b31ebac2 Binary files /dev/null and b/telemeta/static/telemeta/images/text-speak.png differ diff --git a/telemeta/static/telemeta/images/topbar_gradient.png b/telemeta/static/telemeta/images/topbar_gradient.png new file mode 100644 index 00000000..d0605a3e Binary files /dev/null and b/telemeta/static/telemeta/images/topbar_gradient.png differ diff --git a/telemeta/static/telemeta/images/topbar_gradient2.png b/telemeta/static/telemeta/images/topbar_gradient2.png new file mode 100644 index 00000000..5f7ed4ae Binary files /dev/null and b/telemeta/static/telemeta/images/topbar_gradient2.png differ diff --git a/telemeta/static/telemeta/images/transparent.png b/telemeta/static/telemeta/images/transparent.png new file mode 100644 index 00000000..e1ab124e Binary files /dev/null and b/telemeta/static/telemeta/images/transparent.png differ diff --git a/telemeta/static/telemeta/images/tw_hd.png b/telemeta/static/telemeta/images/tw_hd.png new file mode 100644 index 00000000..788068a9 Binary files /dev/null and b/telemeta/static/telemeta/images/tw_hd.png differ diff --git a/telemeta/static/telemeta/images/tw_hd_bg.png b/telemeta/static/telemeta/images/tw_hd_bg.png new file mode 100644 index 00000000..4ad9e479 Binary files /dev/null and b/telemeta/static/telemeta/images/tw_hd_bg.png differ diff --git a/telemeta/static/telemeta/images/user.png b/telemeta/static/telemeta/images/user.png new file mode 100644 index 00000000..4f0c38ad Binary files /dev/null and b/telemeta/static/telemeta/images/user.png differ diff --git a/telemeta/static/telemeta/images/user_red.png b/telemeta/static/telemeta/images/user_red.png new file mode 100644 index 00000000..48fdc4c7 Binary files /dev/null and b/telemeta/static/telemeta/images/user_red.png differ diff --git a/telemeta/static/telemeta/images/user_tr.png b/telemeta/static/telemeta/images/user_tr.png new file mode 100644 index 00000000..3dad868b Binary files /dev/null and b/telemeta/static/telemeta/images/user_tr.png differ diff --git a/telemeta/static/telemeta/images/visu_icon.png b/telemeta/static/telemeta/images/visu_icon.png new file mode 100644 index 00000000..418b24b2 Binary files /dev/null and b/telemeta/static/telemeta/images/visu_icon.png differ diff --git a/telemeta/static/telemeta/images/vox.png b/telemeta/static/telemeta/images/vox.png new file mode 100644 index 00000000..604e4ce8 Binary files /dev/null and b/telemeta/static/telemeta/images/vox.png differ diff --git a/telemeta/static/telemeta/images/vox_wh.png b/telemeta/static/telemeta/images/vox_wh.png new file mode 100644 index 00000000..e8de2dac Binary files /dev/null and b/telemeta/static/telemeta/images/vox_wh.png differ diff --git a/telemeta/static/telemeta/images/wait.gif b/telemeta/static/telemeta/images/wait.gif new file mode 100644 index 00000000..183fe6fe Binary files /dev/null and b/telemeta/static/telemeta/images/wait.gif differ diff --git a/telemeta/static/telemeta/images/wait_small.gif b/telemeta/static/telemeta/images/wait_small.gif new file mode 100644 index 00000000..155c8a5f Binary files /dev/null and b/telemeta/static/telemeta/images/wait_small.gif differ diff --git a/telemeta/static/telemeta/images/wav.png b/telemeta/static/telemeta/images/wav.png new file mode 100644 index 00000000..757933e3 Binary files /dev/null and b/telemeta/static/telemeta/images/wav.png differ diff --git a/telemeta/static/telemeta/images/waves.png b/telemeta/static/telemeta/images/waves.png new file mode 100644 index 00000000..218b3e32 Binary files /dev/null and b/telemeta/static/telemeta/images/waves.png differ diff --git a/telemeta/static/telemeta/images/webm.png b/telemeta/static/telemeta/images/webm.png new file mode 100644 index 00000000..c9be86f5 Binary files /dev/null and b/telemeta/static/telemeta/images/webm.png differ diff --git a/telemeta/static/telemeta/images/world2.png b/telemeta/static/telemeta/images/world2.png new file mode 100644 index 00000000..39c3171b Binary files /dev/null and b/telemeta/static/telemeta/images/world2.png differ diff --git a/telemeta/static/telemeta/images/world_red.png b/telemeta/static/telemeta/images/world_red.png new file mode 100644 index 00000000..85ba76f6 Binary files /dev/null and b/telemeta/static/telemeta/images/world_red.png differ diff --git a/telemeta/static/telemeta/images/zoom2.png b/telemeta/static/telemeta/images/zoom2.png new file mode 100644 index 00000000..494ffc6b Binary files /dev/null and b/telemeta/static/telemeta/images/zoom2.png differ diff --git a/telemeta/static/telemeta/js/application.js b/telemeta/static/telemeta/js/application.js new file mode 100644 index 00000000..bde5903c --- /dev/null +++ b/telemeta/static/telemeta/js/application.js @@ -0,0 +1,246 @@ +/* + * Copyright (C) 2007-2012 Guillaume Pellerin, Parisson + * Copyright (c) 2011 Riccardo Zaccarelli + * Copyright (c) 2010 Olivier Guilyardi + * + * This file is part of TimeSide. + * + * TimeSide 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. + * + * TimeSide 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 TimeSide. If not, see . + * + * Authors: Riccardo Zaccarelli + * Olivier Guilyardi + */ + +/** + * Class for telemeta global functions. + * Note that the dollar sign is a reserved keyword in some browsers + * (see http://davidwalsh.name/dollar-functions) + * which might be in conflict with jQuery dollar sign. + */ + +//returns the full path of the current url location removing the last slash '/' followed by one or more '#', if any +function urlNormalized(){ + var sPath = window.location.href; + sPath = sPath.replace(/\/#*$/,""); + return sPath; +} +/** + *sets up few stuff when the page is ready (see functions below it) + */ +jQuery(document).ready(function() { + foldInfoBlocks(); + setSelectedMenu(); +}); + +/** + *function inherited from old code, never touched. Guess fixes the click on the left data table, if any + */ +function foldInfoBlocks() { + var $J = jQuery; + var extra = $J('.extraInfos'); + extra.find('.folded dl, .folded table').css('display', 'none'); + extra.find('h4').click(function() { + $J(this).parents('.extraInfos').children().toggleClass('folded').find('dl, table').toggle(100); + //toggle toggles the visibility of elements + return false; + }); +} + +/** + * Global telemeta function which sets the current selected menu according to the current url + */ +function setSelectedMenu(){ + var $J = jQuery; + var menus = $J('#menu a'); + //build collections/items from http:/site/collections/items, + //being http:/site/ = window.location.origin + + //function for normalizing paths (removes last n occurrences of the slash) + var normalize = function(str){ + return str.replace(/\/+#*$/,""); + } + + var host = window.location.host; + var protocol = window.location.protocol + var href = normalize(window.location.href); + + if(!(host) || !(protocol) || !(href)){ + return; + } + + //var pageOrigin = normalize(window.location.origin); //does not exist in FF, so: + var pageOrigin = normalize(protocol+"//"+host); + var pageHref = normalize(href); + + menus.each(function(){ + ///if we are at home, the window location href corresponds to window location origin, + //so we select only links whose link points EXACTLY to the origin (home link) + var linkHref = normalize(this.href); + var elm = $J(this); + + if(linkHref.indexOf("#") != -1){ + var reg = new RegExp("[#]+", "g"); + var baseHref = linkHref.split(reg); + linkHref = pageOrigin + "/" + baseHref[1] + } + + if(pageOrigin===pageHref){ + if(pageHref == linkHref){ + elm.addClass('active'); + }else{ + elm.removeClass('active'); + } + }else{ + //here, on the other hand, we select if a link points to a page or super page + //of the current page + if(linkHref!=pageOrigin && pageHref.match("^"+linkHref+".*")){ + elm.addClass('active'); + }else{ + elm.removeClass('active'); + } + } + + }) +} + + + + +/***************************************************************************** + * json(param, method, onSuccesFcn(data, textStatus, jqXHR), onErrorFcn(jqXHR, textStatus, errorThrown)) + * global function to senbd/retrieve data with the server + * + * param: the data to be sent or retrieved. + * param will be converted to string, escaping quotes newlines and backslashes if necessary. + * param can be a javascript string, boolean, number, dictionary and array. + * If dictionary or array, it must contain only the above mentioned recognized types. + * So, eg, {[" a string"]} is fine, {[/asd/]} not + * + * method: the json method, eg "telemeta.update_marker". See base.py + * + * onSuccesFcn(data, textStatus, jqXHR) OPTIONAL --IF MISSING, NOTHING HAPPENS -- + * A function to be called if the request succeeds with the same syntax of jQuery's ajax onSuccess function. + * The function gets passed three arguments + * The data returned from the server, formatted according to the dataType parameter; + * a string describing the status; + * and the jqXHR (in jQuery 1.4.x, XMLHttpRequest) object + * + * onErrorFcn(jqXHR, textStatus, errorThrown) OPTIONAL. --IF MISSING, THE DEFAULT ERROR DIALOG IS SHOWN-- + * A function to be called if the request fails with the same syntax of jQuery ajax onError function.. + * The function receives three arguments: + * The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, + * a string describing the type of error that occurred and + * an optional exception object, if one occurred. + * Possible values for the second argument (besides null) are "timeout", "error", "abort", and "parsererror". + * ****************************************************************************/ + +var json = function(param,method,onSuccessFcn,onErrorFcn){ + //this function converts a javascript object to a string + var toString_ = function(string){ + if(typeof string == "string"){ + //escapes newlines quotes and backslashes + string = string.replace(/\\/g,"\\\\") + .replace(/\n/g,"\\n") + .replace(/"/g,"\\\""); + } + var array; //used for arrays and objects (see below) + if(typeof string == "boolean" || typeof string== "number" || typeof string == "string"){ + string = '"'+string+'"'; + }else if(string instanceof Array){ + array = []; + for(var i = 0;i + * + * This file is part of TimeSide. + * + * TimeSide 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. + * + * TimeSide 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 TimeSide. If not, see . + * + * Author: Riccardo Zaccarelli + */ + +/** + * Class representing a marker div html element for showing/editing a marker on details. + */ +Timeside.classes.MarkerMapDiv = Timeside.classes.TimesideArray.extend({ + init:function(containerDiv){ + this._super(); + var $J = this.$J; + + var div = containerDiv instanceof $J ? containerDiv : $J(containerDiv); + div = div.length ? div.eq(0) : $J([]); //empty jQuery object + this.div = div + }, + //overridden + add: function(marker, index, isNew){ + + var div = this.createMarkerDiv(index, marker); + if(index==this.length){ + this.div.append(div); + }else{ + this.$J( this.div.children()[index] ).before(div); + } + + this._super(div,index); + if(isNew){ + this.setEditMode(index,true); + } + if(index=this.length){ + return; + } + var div = this._super(index); + div.remove(); + var me = this; + this.each(index,function(i, div){ + me.setIndex.apply(me,[div,i]); + }); + }, + //overridden + makeTimeLabel: function(time){ + return this._super(time,['hh','mm','ss','C']); + }, + //overridden + clear: function(){ + var divs = this._super(); + for(var i=0; i< divs.length; i++){ + divs[i].empty().remove(); + } + return divs; + }, + //if value is missing, toggles edit mode + //if editbutton is not present (marker not editable), this method does nothing + setEditMode: function(index, value){ + + var div = this.toArray()[index]; + var editButton = div.find('.markersdivEdit'); + if(!((editButton) && (editButton.length))){ + return; + } + var visible = editButton.is(':visible'); + + if(arguments.length==1){ //toggle + value = visible; //if edit visible, editmode = true, otherwise false + }else if(value!=visible){ + //value is defined. if true and edit mode is NOT visible, we return cause we are already in edit mode + //same if false (dont edit) and edit mode is visible (not edit mode) + return; + } + var e_okButton = div.find('.markersdivSave'); + var e_descriptionText = div.find('.markersdivDescription'); + var e_titleText = div.find('.markersdivTitle'); + var mas = div.find(".marker_author_span"); + if(value){ + div.css('backgroundColor','#E65911'); + mas.css('color','#6a0307'); + e_descriptionText.removeAttr('readonly').removeClass('markersdivUneditable'); + e_titleText.removeAttr('readonly').removeClass('markersdivUneditable'); + e_okButton.add(e_okButton.parent()).show(); //hiding also the parent div saves space (padding bottom hidden) + e_titleText.select(); + editButton.hide(); + }else{ + e_descriptionText.attr('readonly','readonly').addClass('markersdivUneditable'); + e_titleText.attr('readonly','readonly').addClass('markersdivUneditable'); + e_okButton.add(e_okButton.parent()).hide(); //hiding also the parent div saves space (padding bottom hidden) + editButton.show(); + div.css('backgroundColor',''); + mas.css('color','#999'); //TODO: should be set in one declaration only. Change here and also in marker div creation + } + + this.fire('edit',{'value':value, 'index':index}); + + this.stretch(e_titleText); + }, + + + setIndex: function(div,index){ + div.find('.ts-marker').html(index+1); + var me = this; + var e_indexLabel = div.find('.ts-marker'); + var e_offsetLabel =div.find('.markersdivOffset'); + e_indexLabel.add(e_offsetLabel).unbind('click').click(function(){ + me.fire('focus', { + 'index': index + }); + return false; + }); + div.find('.markersdivEdit').unbind('click').click( function(){ + me.setEditMode(index); + return false; //avoid scrolling of the page on anchor click + }); + }, + /** + * stretches jQueryElm the whole possible width. Note that text nodes are not considered!!!! + */ + stretch: function(jQueryElm){ + var siblings = jQueryElm.siblings(":visible"); + siblings = siblings.add(jQueryElm); + var spaceStretchable = jQueryElm.parent().width(); + var $J = this.$J; + siblings.each(function(i,elm){ + spaceStretchable -= $J(elm).outerWidth(true); + }); + var w = jQueryElm.width() + spaceStretchable; + jQueryElm.css('width', w+'px'); + }, + + setOffset: function(div,offset){ + div.find('.markersdivOffset').html(this.makeTimeLabel(offset)); + }, + createMarkerDiv : function(index, marker){ + //create html content. Use array.join cause it is usually faster than string concatenation: + var html_ = ['
', //whitespace no wrap is really important to keep all content of first div on one line (without it, IE displays it on 2 lines) + '', + '', + '', + '', + 'EDIT', + '', + '
', + '
', + '', + '
'+gettrans('author')+': '+marker.author+'
'].join(""); + var div = this.$J('
').addClass("markerdiv").html(html_); //.attr('tabindex','0') + div.find('a').attr('href','#'); + + var e_okButton = div.find('.markersdivSave'); + var e_editButton = div.find('.markersdivEdit'); + var e_deleteButton = div.find('.markersdivDelete'); + var e_addplaylistButton = div.find('.markersdivAddPlaylist'); + var e_descriptionText = div.find('.markersdivDescription'); + var e_titleText = div.find('.markersdivTitle'); + + //set defualt element values regardeless of the marker state (for debugging, comment it if not needed) + //e_indexLabel.attr('title',marker.toString()); + this.setIndex(div, index); + + this.setOffset(div,marker.offset); + + e_descriptionText.val(marker.desc ? marker.desc : ""); + e_titleText.val(marker.title ? marker.title : ""); + + e_okButton.add(e_okButton.parent()).hide(); //hiding also the parent div saves space (padding bottom hidden) + e_editButton.show(); + e_deleteButton.show(); + e_addplaylistButton.show(); + e_descriptionText.attr('readonly','readonly').addClass('markersdivUneditable').unbind('focus'); + e_titleText.attr('readonly','readonly').addClass('markersdivUneditable').unbind('focus'); + + + e_addplaylistButton.unbind('click').bind('click',function(evtObj_){ + if(!marker.isSavedOnServer){ + return false; + } + //make a request to the server to get the pk (id) + //note that marker.id (client side) is marker.public_id (server side) + json([marker.id],"telemeta.get_marker_id", function(data){ + var id = data.result; + //TODO: we should not call global objects, rather pass them in the construcotr: + playlistUtils.showAddResourceToPlaylist(e_addplaylistButton,'marker',""+id,gettrans('marker added to the selected playlist')); + }); + return false; + }); + + if(!marker.canBeAddedToPlaylist){ + e_addplaylistButton.hide(); + } + + if(!marker.canBeSetEditable){ //marker is editable means that author is superuser or author == getCurrentUserName(). + e_editButton.hide(); + e_deleteButton.hide(); + e_okButton.unbind('click') + e_deleteButton.unbind('click').hide(); + e_editButton.remove(); //so that if edit button is not present, we do not edit (safety reasons) see this.setEditMode + return div; + } + + var me = this; + + e_deleteButton.unbind('click').click( function(){ + if(!(marker.isSavedOnServer) || confirm(gettrans('delete the marker permanently?'))){ + me.fire('remove',{ + 'marker':marker + }); + } + return false; //avoid scrolling of the page on anchor click + }); + + //action for ok button + e_okButton.unbind('click').click( function(){ + //if(marker.desc !== descriptionText.val()){ //strict equality needed. See note below + marker.desc = e_descriptionText.val(); + marker.title = e_titleText.val(); + me.fire('save',{ + 'marker':marker + }); + return false; //avoid scrolling of the page on anchor click + }); + + + e_titleText.keydown(function(event){ + if(e_okButton.is(':visible')){ + if (event.keyCode == '13') { + event.preventDefault(); + e_okButton.trigger('click'); + } + } + }); + + return div; + } + +}); \ No newline at end of file diff --git a/telemeta/static/telemeta/js/jquery.autocomplete.js b/telemeta/static/telemeta/js/jquery.autocomplete.js new file mode 100644 index 00000000..9d12a29f --- /dev/null +++ b/telemeta/static/telemeta/js/jquery.autocomplete.js @@ -0,0 +1,808 @@ +/* + * jQuery Autocomplete plugin 1.1 + * + * Copyright (c) 2009 Jörn Zaefferer + * + * 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: jquery.autocomplete.js 15 2009-08-22 10:30:27Z joern.zaefferer $ + */ + +;(function($) { + +$.fn.extend({ + autocomplete: function(urlOrData, options) { + var isUrl = typeof urlOrData == "string"; + options = $.extend({}, $.Autocompleter.defaults, { + url: isUrl ? urlOrData : null, + data: isUrl ? null : urlOrData, + delay: isUrl ? $.Autocompleter.defaults.delay : 10, + max: options && !options.scroll ? 10 : 150 + }, options); + + // if highlight is set to false, replace it with a do-nothing function + options.highlight = options.highlight || function(value) { return value; }; + + // if the formatMatch option is not specified, then use formatItem for backwards compatibility + options.formatMatch = options.formatMatch || options.formatItem; + + return this.each(function() { + new $.Autocompleter(this, options); + }); + }, + result: function(handler) { + return this.bind("result", handler); + }, + search: function(handler) { + return this.trigger("search", [handler]); + }, + flushCache: function() { + return this.trigger("flushCache"); + }, + setOptions: function(options){ + return this.trigger("setOptions", [options]); + }, + unautocomplete: function() { + return this.trigger("unautocomplete"); + } +}); + +$.Autocompleter = function(input, options) { + + var KEY = { + UP: 38, + DOWN: 40, + DEL: 46, + TAB: 9, + RETURN: 13, + ESC: 27, + COMMA: 188, + PAGEUP: 33, + PAGEDOWN: 34, + BACKSPACE: 8 + }; + + // Create $ object for input element + var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass); + + var timeout; + var previousValue = ""; + var cache = $.Autocompleter.Cache(options); + var hasFocus = 0; + var lastKeyPressCode; + var config = { + mouseDownOnSelect: false + }; + var select = $.Autocompleter.Select(options, input, selectCurrent, config); + + var blockSubmit; + + // prevent form submit in opera when selecting with return key + $.browser.opera && $(input.form).bind("submit.autocomplete", function() { + if (blockSubmit) { + blockSubmit = false; + return false; + } + }); + + // only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all + $input.bind(($.browser.opera ? "keypress" : "keydown") + ".autocomplete", function(event) { + // a keypress means the input has focus + // avoids issue where input had focus before the autocomplete was applied + hasFocus = 1; + // track last key pressed + lastKeyPressCode = event.keyCode; + switch(event.keyCode) { + + case KEY.UP: + event.preventDefault(); + if ( select.visible() ) { + select.prev(); + } else { + onChange(0, true); + } + break; + + case KEY.DOWN: + event.preventDefault(); + if ( select.visible() ) { + select.next(); + } else { + onChange(0, true); + } + break; + + case KEY.PAGEUP: + event.preventDefault(); + if ( select.visible() ) { + select.pageUp(); + } else { + onChange(0, true); + } + break; + + case KEY.PAGEDOWN: + event.preventDefault(); + if ( select.visible() ) { + select.pageDown(); + } else { + onChange(0, true); + } + break; + + // matches also semicolon + case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA: + case KEY.TAB: + case KEY.RETURN: + if( selectCurrent() ) { + // stop default to prevent a form submit, Opera needs special handling + event.preventDefault(); + blockSubmit = true; + return false; + } + break; + + case KEY.ESC: + select.hide(); + break; + + default: + clearTimeout(timeout); + timeout = setTimeout(onChange, options.delay); + break; + } + }).focus(function(){ + // track whether the field has focus, we shouldn't process any + // results if the field no longer has focus + hasFocus++; + }).blur(function() { + hasFocus = 0; + if (!config.mouseDownOnSelect) { + hideResults(); + } + }).click(function() { + // show select when clicking in a focused field + if ( hasFocus++ > 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: ", ", + highlight: function(value, term) { + return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "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"){ + i = s.toLowerCase().search("\\b" + sub.toLowerCase()); + } + 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 = $("