From acf8ac3c1b2cff602c9c22e2825c17766bd63307 Mon Sep 17 00:00:00 2001 From: Frans Korhonen Date: Sun, 21 Jun 2009 17:22:28 +0000 Subject: [PATCH] =?UTF-8?q?Lis=C3=A4sin=20css=20tiedostojen=20mediajaot=20?= =?UTF-8?q?testiservulle=20www=20osoitteeseen=20/kipamedia/=20Oikeasti=20t?= =?UTF-8?q?iedostot=20siaitsevat=20web/media?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/dumpFixture.sh | 2 - web/media/kipa.css | 216 +++++++++++++++++++++++++++++++++++ web/media/tabcontent.css | 60 ++++++++++ web/media/tabcontent.js | 159 ++++++++++++++++++++++++++ web/settings.py | 4 +- web/templates/tupa/base.html | 6 +- web/tupa.db | Bin 176128 -> 176128 bytes web/tupa/views.pyc | Bin 10460 -> 10460 bytes web/urls.py | 14 +-- 9 files changed, 446 insertions(+), 15 deletions(-) delete mode 100755 web/dumpFixture.sh create mode 100644 web/media/kipa.css create mode 100644 web/media/tabcontent.css create mode 100644 web/media/tabcontent.js diff --git a/web/dumpFixture.sh b/web/dumpFixture.sh deleted file mode 100755 index 2b09baf0..00000000 --- a/web/dumpFixture.sh +++ /dev/null @@ -1,2 +0,0 @@ -python manage.py dumpdata tupa --format=xml > tupa/fixtures/initial_data.xml - diff --git a/web/media/kipa.css b/web/media/kipa.css new file mode 100644 index 00000000..ff08741a --- /dev/null +++ b/web/media/kipa.css @@ -0,0 +1,216 @@ +@charset "utf-8"; +/* CSS Document */ + +BODY { + FONT-SIZE: 11px; + LINE-HEIGHT: 120%; + FONT-FAMILY: Tahoma, Verdana, Arial, Helvetica, sans-serif; + BACKGROUND-COLOR: white; + background-image: url("bg-body.gif"); + background-repeat: repeat-x; + background-attachment: scroll; + background-position: 100% 0pt; + margin-top: 15px; + margin-left: 20px; +} +TABLE { + BORDER-RIGHT: 0px; + BORDER-TOP: 0px; + MARGIN-LEFT: 0px; + BORDER-LEFT: 0px; + MARGIN-RIGHT: 0px; + BORDER-BOTTOM: 0px; +} +TD { + FONT-SIZE: 11px; +} +SELECT { + FONT-SIZE: 10px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif +} +INPUT { + FONT-SIZE: 10px; + FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; + text-align: left; +} +TEXTAREA { + FONT-SIZE: 10px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif +} + +h1, h2, h3, h4, h5 { + margin-top: 10pt; + margin-right: 0pt; + margin-bottom: 5pt; + margin-left: 0pt; + text-transform: lowercase; + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-weight: normal; + color: #006ea6; +} + +h1 { + /* tämä on sivuotsikko */ + margin-bottom: 20px; + text-transform: uppercase; + color:#FFF; +} + +h2 { + text-transform:capitalize; + margin-top:20px; +} + +.etusivunOtsikko { + font: 2em / 1.4em Georgia,Helvetica,"Lucida Sans Unicode",Tahoma,Verdana,Arial,Helvetica,sans-serif; + letter-spacing:0; + border:0; + color:#006ea6; + margin:1.3em 0 0 0; +} + +.etusivunLinkit { + padding-left:50px; + letter-spacing:0; + border:0; + color:#006ea6; + margin:1.3em 0 0 0; +} + +.etusivunOtsikko img{ + padding: 10px; + padding-left:40px; + text-align:left; + vertical-align:middle; +} + +#etusivu th { + font-size: 13px; + font-weight: normal; + background-color: #b9c9fe; + background-image: none; + background-repeat: repeat; + background-attachment: scroll; + background-position: 0% 0%; + border-top-width: 4px; + border-top-style: solid; + border-top-color: #aabcfe; + border-bottom-width: 1px; + border-bottom-style: solid; + border-bottom-color: #ffffff; + color: #003399; + padding-top: 8px; + padding-right: 8px; + padding-bottom: 8px; + padding-left: 8px; +} + +#taulukko th { + font-size: 13px; + font-weight: normal; + background-color: #b9c9fe; + background-image: none; + background-repeat: repeat; + background-attachment: scroll; + background-position: 0% 0%; + border-top-width: 4px; + border-top-style: solid; + border-top-color: #aabcfe; + border-bottom-width: 1px; + border-bottom-style: solid; + border-bottom-color: #ffffff; + color: #003399; + padding-top: 8px; + padding-right: 8px; + padding-bottom: 8px; + padding-left: 8px; +} + +#taulukko .odd { + background:#e8edff; +} + +#taulukko .odd:hover, .even:hover { + background:#FFFF99; +} + +.top { + background-image:url(logo-leima.png); + background-position:right; + background-repeat:no-repeat; + padding-left:50px; + padding-top:80px; +} + +#box-table-a tr:hover td { + background-color: #d0dafd; + background-image: none; + background-repeat: repeat; + background-attachment: scroll; + background-position: 0% 0%; + color: #333399; +} +.tauluOtsikko { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: x-small; + font-weight: bold; + color: #000; + background-color: #b9c9fe; + vertical-align: top; +} +.keskeyttanyt { + font-style: italic; + color: #666; + background-color:#CCC; +} + +#tehtava-taulukko { + font-family:"Lucida Sans Unicode", "Lucida Grande", Sans-Serif; + /*font-size:12px;*/ + /*width:480px;*/ + text-align:center; + border-collapse:collapse; + border-top:7px solid #9baff1; + border-bottom:7px solid #9baff1; + margin:20px; +} + +#tehtava-taulukko th { + font-size:13px; + font-weight:normal; + background:#b9c9fe; + border-right:1px solid #9baff1; + border-left:1px solid #9baff1; + color:#039; + padding:8px; + text-transform:capitalize; +} + +#tehtava-taulukko td { + background:#e8edff; + border-right:1px solid #aabcfe; + border-left:1px solid #aabcfe; + color:#669; + padding:3px; + text-align: left; + vertical-align:top; +} + +#tehtava-taulukko a, a:visited { + text-decoration:none; + color:#669; + cursor:pointer; +} + +#tehtava-taulukko a:hover { + text-decoration:underline; +} + +.tehtavan_tila { + background-color: #b9c9fe; + width: 400px; +} + +/* TOOLTIP */ +#tt {position:absolute; display:block; background:url(http://www.isokirahvi.com/tupa/tooltip/images/tt_left.gif) top left no-repeat} +#tttop {display:block; height:5px; margin-left:5px; background:url(http://www.isokirahvi.com/tupa/tooltip/images/tt_top.gif) top right no-repeat; overflow:hidden} +#ttcont {display:block; padding:2px 12px 3px 7px; margin-left:5px; background:#666; color:#FFF} +#ttbot {display:block; height:5px; margin-left:5px; background:url(http://www.isokirahvi.com/tupa/tooltip/images/tt_bottom.gif) top right no-repeat; overflow:hidden} diff --git a/web/media/tabcontent.css b/web/media/tabcontent.css new file mode 100644 index 00000000..e70fc648 --- /dev/null +++ b/web/media/tabcontent.css @@ -0,0 +1,60 @@ +/* ######### CSS for Shade Tabs. Remove if not using ######### */ + +.shadetabs{ +padding: 3px 0; +margin-left: 0; +margin-top: 1px; +margin-bottom: 0; +font: bold 12px Verdana; +list-style-type: none; +text-align: left; /*set to left, center, or right to align the menu as desired*/ +} + +.shadetabs li{ +display: inline; +margin: 0; +} + +.shadetabs li a{ +text-decoration: none; +position: relative; +z-index: 1; +padding: 3px 7px; +margin-right: 3px; +border: 1px solid #778; +color: #2d2b2b; +background: white url(shade.gif) top left repeat-x; +} + +.shadetabs li a:visited{ +color: #2d2b2b; +} + +.shadetabs li a:hover{ +text-decoration: underline; +color: #2d2b2b; +} + +.shadetabs li a.selected{ /*selected main tab style */ +position: relative; +top: 1px; +} + +.shadetabs li a.selected{ /*selected main tab style */ +background-image: url(shadeactive.gif); +border-bottom-color: white; +} + +.shadetabs li a.selected:hover{ /*selected main tab style */ +text-decoration: none; +} + +.tabcontent{ +display:none; +} + +@media print { +.tabcontent { +display:block !important; +} +} diff --git a/web/media/tabcontent.js b/web/media/tabcontent.js new file mode 100644 index 00000000..8e7ed2b0 --- /dev/null +++ b/web/media/tabcontent.js @@ -0,0 +1,159 @@ +//** Tab Content script v2.0- � Dynamic Drive DHTML code library (http://www.dynamicdrive.com) +//** Updated Oct 7th, 07 to version 2.0. Contains numerous improvements: +// -Added Auto Mode: Script auto rotates the tabs based on an interval, until a tab is explicitly selected +// -Ability to expand/contract arbitrary DIVs on the page as the tabbed content is expanded/ contracted +// -Ability to dynamically select a tab either based on its position within its peers, or its ID attribute (give the target tab one 1st) +// -Ability to set where the CSS classname "selected" get assigned- either to the target tab's link ("A"), or its parent container +//** Updated Feb 18th, 08 to version 2.1: Adds a "tabinstance.cycleit(dir)" method to cycle forward or backward between tabs dynamically +//** Updated April 8th, 08 to version 2.2: Adds support for expanding a tab using a URL parameter (ie: http://mysite.com/tabcontent.htm?tabinterfaceid=0) + +////NO NEED TO EDIT BELOW//////////////////////// + +function ddtabcontent(tabinterfaceid){ + this.tabinterfaceid=tabinterfaceid //ID of Tab Menu main container + this.tabs=document.getElementById(tabinterfaceid).getElementsByTagName("a") //Get all tab links within container + this.enabletabpersistence=true + this.hottabspositions=[] //Array to store position of tabs that have a "rel" attr defined, relative to all tab links, within container + this.currentTabIndex=0 //Index of currently selected hot tab (tab with sub content) within hottabspositions[] array + this.subcontentids=[] //Array to store ids of the sub contents ("rel" attr values) + this.revcontentids=[] //Array to store ids of arbitrary contents to expand/contact as well ("rev" attr values) + this.selectedClassTarget="link" //keyword to indicate which target element to assign "selected" CSS class ("linkparent" or "link") +} + +ddtabcontent.getCookie=function(Name){ + var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair + if (document.cookie.match(re)) //if cookie found + return document.cookie.match(re)[0].split("=")[1] //return its value + return "" +} + +ddtabcontent.setCookie=function(name, value){ + document.cookie = name+"="+value+";path=/" //cookie value is domain wide (path=/) +} + +ddtabcontent.prototype={ + + expandit:function(tabid_or_position){ //PUBLIC function to select a tab either by its ID or position(int) within its peers + this.cancelautorun() //stop auto cycling of tabs (if running) + var tabref="" + try{ + if (typeof tabid_or_position=="string" && document.getElementById(tabid_or_position).getAttribute("rel")) //if specified tab contains "rel" attr + tabref=document.getElementById(tabid_or_position) + else if (parseInt(tabid_or_position)!=NaN && this.tabs[tabid_or_position].getAttribute("rel")) //if specified tab contains "rel" attr + tabref=this.tabs[tabid_or_position] + } + catch(err){alert("Invalid Tab ID or position entered!")} + if (tabref!="") //if a valid tab is found based on function parameter + this.expandtab(tabref) //expand this tab + }, + + cycleit:function(dir, autorun){ //PUBLIC function to move foward or backwards through each hot tab (tabinstance.cycleit('foward/back') ) + if (dir=="next"){ + var currentTabIndex=(this.currentTabIndex0)? this.currentTabIndex-1 : this.hottabspositions.length-1 + } + if (typeof autorun=="undefined") //if cycleit() is being called by user, versus autorun() function + this.cancelautorun() //stop auto cycling of tabs (if running) + this.expandtab(this.tabs[this.hottabspositions[currentTabIndex]]) + }, + + setpersist:function(bool){ //PUBLIC function to toggle persistence feature + this.enabletabpersistence=bool + }, + + setselectedClassTarget:function(objstr){ //PUBLIC function to set which target element to assign "selected" CSS class ("linkparent" or "link") + this.selectedClassTarget=objstr || "link" + }, + + getselectedClassTarget:function(tabref){ //Returns target element to assign "selected" CSS class to + return (this.selectedClassTarget==("linkparent".toLowerCase()))? tabref.parentNode : tabref + }, + + urlparamselect:function(tabinterfaceid){ + var result=window.location.search.match(new RegExp(tabinterfaceid+"=(\\d+)", "i")) //check for "?tabinterfaceid=2" in URL + return (result==null)? null : parseInt(RegExp.$1) //returns null or index, where index (int) is the selected tab's index + }, + + expandtab:function(tabref){ + var subcontentid=tabref.getAttribute("rel") //Get id of subcontent to expand + //Get "rev" attr as a string of IDs in the format ",john,george,trey,etc," to easily search through + var associatedrevids=(tabref.getAttribute("rev"))? ","+tabref.getAttribute("rev").replace(/\s+/, "")+"," : "" + this.expandsubcontent(subcontentid) + this.expandrevcontent(associatedrevids) + for (var i=0; i500 && this.hottabspositions.length>1){ + this.autoruntimer=setInterval(function(){tabinstance.autorun()}, this.automodeperiod) + } + } //END int() function + +} //END Prototype assignment \ No newline at end of file diff --git a/web/settings.py b/web/settings.py index 2b3fb91a..0107b9e1 100644 --- a/web/settings.py +++ b/web/settings.py @@ -39,7 +39,9 @@ # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" -MEDIA_ROOT = '' +MEDIA_ROOT = hakemisto + "/media/" + +STATIC_DOC_ROOT = hakemisto + "/media/" # URL that handles the media served from MEDIA_ROOT. # Example: "http://media.lawrence.com" diff --git a/web/templates/tupa/base.html b/web/templates/tupa/base.html index 6ab603f6..6a1ed2c8 100644 --- a/web/templates/tupa/base.html +++ b/web/templates/tupa/base.html @@ -2,10 +2,10 @@ {% block title %} {% endblock %} - - + + -