# HG changeset patch # User Lennard de Rijk # Date 1247046602 -7200 # Node ID 1ad6d986be6d72b2e121b2cd6e1631b74759e0a0 # Parent dac91fecae386efcea96fc31acf2f3bb7dd84487 Renamed several files due to recent changes. diff -r dac91fecae38 -r 1ad6d986be6d app/soc/content/css/soc-090418-ie.css --- a/app/soc/content/css/soc-090418-ie.css Wed Jul 08 10:45:49 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -Copyright 2009 the Melange authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - */ - -/* - * Put IE specific hacks in this file. Which will only be included by IE. - */ - -td.formfieldvalue input { - width: 200px; -} - -td.formfieldvalue textarea { - width: 200px; -} - -td.formfieldvalue select { - width: 200px; -} - -#survey_widget select, -#survey_widget input { - width: auto !important; -} - -#survey_widget textarea { - width: 95%; -} diff -r dac91fecae38 -r 1ad6d986be6d app/soc/content/css/soc-090706.css --- a/app/soc/content/css/soc-090706.css Wed Jul 08 10:45:49 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,877 +0,0 @@ -/* -Copyright 2009 the Melange authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - */ - -/* - * STANDARD HTML TAGS - */ -@import '/soc/content/css/ui.all.css'; -body { - background-color: white; - color: black; - - font-family: Arial, sans-serif; - font-size: medium; - - margin: 8px; - margin-top: 3px; -} - -img { - border: 0; -} - -form { - margin: 0; - padding: 0; -} - -li { - margin-bottom: 0.25em; -} - -/* HEADERS */ -h1 { - font-size: x-large; - margin-top: 0px; -} - -h2 { - font-size: large; -} - -h3 { - font-size: medium; -} - -h4 { - font-size: small; -} - -/* PRE-FORMATTED TEXT */ -pre, code { - color: #007000; - font-family: "bogus font here", monospace; - font-size: 100%; -} - -pre { - border: 1px solid silver; - background-color: #f5f5f5; - padding: 0.5em; - overflow: auto; - margin: 2em; -} - -pre ins { - color: #cc0000; - font-weight: bold; - text-decoration: none; -} - -/* LINKS AND ANCHORS */ -a:link { - color: #0000cc; -} - -a:active { - color: #cc0000; -} - -a:visited { - color: #551a8b; -} - -a.selected, .selected a, .selected { - color: black; - font-weight: bold; - text-decoration: none; -} - -a.novisit { - color: #2a55a3; -} - -a.noul, a.noulv { - color: #4182fa; /* #93b7fa; */ - text-decoration: none; -} - -a:hover.noul { - text-decoration: underline; -} - -a:visited.noul { - color: #a32a91; /* #2a55a3; */ -} - - -/* Styles used by Django Forms */ -ul.errorlist { - color: #FF0000; - font-size: small; -} - - -/* TABLES */ -table { - border-collapse: collapse; -} - -th, td { - /*padding: 0;*/ - padding:2px 5px; - vertical-align: top; - text-align: left; -} - -/* FORM FIELDS */ -td.formfieldrequired { - font-style: italic; - font-size: small; - text-align: center; -} - -td.formfieldhelptext { - font-style: italic; - font-size: small; - padding: 5px; -} - -td.formfielderror { - color: #FF0000; - font-size: small; -} - -td.formfieldheading { - font-weight: bold; - font-size: small; -} - -td.formfieldlabel { - font-weight: bold; - font-size: small; - text-align: right; -} - -td.twolineformfieldlabel { - font-weight: bold; - font-size: small; - text-align: left; -} - -td.twolineformfieldlabel { - font-weight: bold; - font-size: small; -} - -td.twolineformfielderrorlabel { - font-weight: bold; - color: #FF0000; - font-size: small; -} - -td.formfieldvalue { - text-align: left; -} - -td.formfieldvalue input { - width: 100%; -} - -td.formfieldvalue input[type=checkbox] { - width: auto; -} - -td.formfieldvalue input:focus { - background-color: #FFFF99; - font-weight: bold; -} - -td.formfieldvalue textarea { - width: 100%; -} - -/*td.formfieldvalue select { - width: 100%; -}*/ - -td.formfielderrorlabel, td.warning, span.formfielderrorlabel { - font-weight: bold; - color: #FF0000; - font-size: small; - text-align: right; -} - -/* TABLE QUEUES (used with .list) */ -table#queues { - border-collapse: collapse; - width: 100%; -} - -table#queues tr { - border-bottom: thin solid lightgray; -} - -table#queues td { - padding: 2px; -} - -/* TOOLTIPS */ - -#purr-container { - position: fixed; - bottom: 0; - right: 0; -} - -.tooltip { - position: relative; - width: 300px; -} - -.tooltip .close { - position: absolute; - top: 12px; - right: 12px; - display: block; - width: 18px; - height: 17px; - text-indent: -9999px; - background: url('/soc/content/images/purrClose.png') no-repeat 0 10px; -} - -.tooltip-body { - min-height: 50px; - padding: 22px 22px 0 22px; - background: url('/soc/content/images/purrTop.png') no-repeat left top; - color: #f9f9f9; -} - -.tooltip-body img { - width: 50px; - margin: 0 10px 0 0; - float: left; -} - -.tooltip-body h3 { - margin: 0; - font-size: 1.1em; -} - -.tooltip-body p { - margin: 5px 0 0 60px; - font-size: 0.8em; - line-height: 1.4em; -} - -.tooltip-bottom { - height: 22px; - background: url('/soc/content/images/purrBottom.png') no-repeat left top; -} - -/* - * PAGE ELEMENTS - */ - -#title { - border-top: 1px solid #3366cc; - background-color: #e5ecf9; - font-size: large; - font-weight: bold; - margin: 0; - padding: 0; - padding-top: 1px; - padding-bottom: 1px; - margin-top: 5px; - margin-left: 200px; - padding-left: 3px; -} - -#notice { - margin-left: 200px; - padding: 3px; -} - -#logo { - padding-right: 18px; - position: absolute; - left: 0; - top: -5px; -} - -#login { - text-align: right; -} - -#badge { - clear: both; - margin-top: 3.5em; - margin-bottom: 1em; - height: 53px; - font-style: italic; -} - -#body { - border-left: 1px dotted silver; - margin-left: 200px; - margin-right: 25px; - padding-left: 18px; - padding-bottom: 25px; -} - -#body .buttons { - margin-right: 4px; - margin-top: 20px; -} - -#body a.button, input[type^="submit"], input[type^="button"] { - margin: 0; - padding: 2px 5px 2px 5px; - font-family: Arial, Sans-serif; - font-size: 12px; - text-decoration: none; - color: #222; - cursor: default; - background: #ddd url("/soc/content/images/button-background.gif") repeat-x 0 0; - border: 1px solid #aaa; -} - -#body a.button:hover, input[type^="submit"]:hover, input[type^="button"]:hover { - border-color: #9cf #69e #69e #7af; -} - -#header { - height: 50px; - margin-bottom: 11px; - position: relative; -} - -#footer { - clear: both; - text-align: center; - margin-top: 3.5em; - margin-bottom: 1em; - background-image: url("http://www.google.com/images/art.gif"); - height: 53px; - background-repeat: no-repeat; - background-position: left center; - padding-left: 125px; -} - -#footer .text { - padding-top: 20px; -} - -#created { - font-size: x-small; - color:#C0C0C0; - text-align: right; -} - -/* Google Map */ -#role_profile_map { - height: 240px; - width: 320px; -} - -#org_home_extras { - margin:2em 0em 2em; - min-height:500px; -} - -#extras_left { - width: 55%; - left: 0px; - float: left; -} - -#extras_right { - width: 43%; - right: 0px; - float: right; -} - -/* Organization home gmap */ -#org_home_map { - height: 500px; - width: 500px; -} - -/* SIDEBAR MENU */ -#side { - width: 200px; - margin-bottom: 3em; - float: left; - font-size: small; -} - -#menu ul { - margin: 0; - padding: 0; - list-style-type: none; - margin-bottom: 1em; - font-size: 95%; -} - -#menu ul ul { - margin-left: 10px; - margin-bottom: 0; -} - -#menu li { - margin-top: 4px; - list-style-type: none; - list-style-image: none; -} - -#menu img { - margin-right: 4px; -} - -#menu li.leaf { - padding-left: 14px; -} - -#menu h4 { - margin: 0; - padding: 0; - margin-bottom: 1em; -} - -/* */ - -span.unread { - font-weight: bold; - color: #FF0000; -} - -span.edited { - color: #808080; -} - -/* SEARCH FIELD */ -#search { - margin-top: 2em; -} - -#search .header { - font-weight: bold; - font-size: 90%; - margin-bottom: 1px; -} - -#search .button { - margin-top: 1px; -} - -#search .input input { - width: 125px; -} - -/* BLOG FEEDS */ -.blog { - border: 10px solid #e5ecf9; - border-top: 1px solid #3366cc; -} - -.blog h2 { - margin-top: 0.1em; - background-color: #e5ecf9; -} - -.blog h2 a { - text-decoration: none; - color: black; -} - -.blog h2 a:visited { - text-decoration: none; - color: black; -} - - -.blog .entry { - margin-bottom: 1em; -} - -.blog .title { - font-size: medium; -} - -.blog .author { - color: gray; - margin-bottom: 0.5em; -} - -.blog .snippet { - background-color: white; -} - -/* LIST */ -.list { - background-color: #E5ECF9; - border: 1px solid #93b7fa; - border-bottom: 2px solid #93b7fa; - padding: 3px; - -moz-border-radius: 5px 5px 0px 0px; -} - -.list .pagination { - text-align: right; - padding: 3px; -} - -.list table{ - background-color: white; -} - -.list table th { - background-color: #eeeeec; - border-right: 1px solid lightgray; - border-top: 1px solid lightgray; -} - -.list table tr.on { - background-color: #ff9; - cursor: hand; - cursor: pointer; -} - -.list table tr.off { - background-color: #fff; -} - -.list table td.last { - border-right: 1px solid lightgray; -} - -.list table .first { - border-left: 1px solid lightgray; -} - -.list table td.no_hand { - cursor: default; -} - -/* - * STUDENT PROPOSAL REVIEWS - */ -.studentproposalreview { - font-size: small; -} - -.studentproposalreview .title { - background-color: #e5ecf9; -} - -.studentproposalreview .student{ - background: #d0f5a9; -} - -.studentproposalcomment-public, -.studentproposalreview-public .other { - background: #f5f6ce; -} - -.studentproposalcomment-private, -.studentproposalreview-private .other { - background: #D2EDF6; -} - -/* - * CUSTOM CLASSES - */ - -.assignedslot { - background-color: #d0f5a9; -} - -.todo { - color: #cc0000; - font-size: 80%; -} - -.newmark { - color: red; - font-size: 80%; - vertical-align: top; -} - -.error { - color: red; -} - -.notice { - background:#fad163; - font-size: small; - font-weight: bold; -} - -.fieldhelptext { - width: 450px; - background:#fad163; - font-size: small; - border: 1px solid black; -} - -.rounded_ul { background: url(/soc/content/images/ul.gif) no-repeat top left; } -.rounded_ur { background: url(/soc/content/images/ur.gif) no-repeat top right; } -.rounded_ll { background: url(/soc/content/images/ll.gif) no-repeat bottom left; } -.rounded_lr { background: url(/soc/content/images/lr.gif) no-repeat bottom right; } - -/* Disabled text. */ -.disabled { - color: gray; -} - -.plaintext { - background:transparent none repeat scroll 0 0; - border:0 none; - color:black; -} - -/* Surveys */ - - -div #survey_widget { - margin: 20px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - background-color: #FFFEEB; - border: 5px solid #F7CA75; - padding: 15px; - /*max-width: 700px;*/ -} - - -div #survey_widget.survey_admin { -/* TODO(ajaksu) remove if unnecessary */ -} - -div #survey_widget table { - width:95% -} - -div #survey_widget th, -div #survey_widget td { - padding-top: 15px; -} - -/* fields */ - -div #survey_widget textarea.long_answer { - padding: 10px; -} - -div #survey_widget textarea.tooltip_entry { - padding: 10px; - width: 80%; -} - -div #survey_widget textarea { - width: 90% !important; -} - -div #survey_widget td.formfieldlabel { - font-size: medium; -} - -#survey_widget.view input[disabled="disabled"], -#survey_widget.view textarea[disabled="disabled"], -#survey_widget.view select[disabled="disabled"], -#survey_widget.view option { - color: black; -} - -#survey_widget.quant_radio input, -#survey_widget.quant_radio label { - margin: 4px; -} - -/* options */ - -div #survey_options button { - display: block; - margin: 10px 0 0; -} - -div #survey_options { - margin: 20px 0 0 0; -} - -div #survey_widget a.delete { - float:left; - margin:-1px 7px; -} - -div #survey_widget th label { - /*display: block;*/ - max-width: 180px; -} - -div #survey_widget tr.role-specific label { - color: #666666; -} - - -span.formfieldlabel { - font-weight: bold; - font-size: small; -} - -.sortable_li { - border: solid 1px !important; - padding: 5px !important; -} - -.sortable_li, -div #survey_widget fieldset { - -moz-border-radius: 5px; - -webkit-border-radius: 5px; -} - -div #survey_widget select { - display: inline; -} - -div #survey_widget td { -} - -div #survey_widget label { -} - -div #survey_widget fieldset select { -} - -div #survey_widget fieldset textarea, -div #survey_widget fieldset input { - margin: 10px; -} - -div #survey_widget textarea.comment{ - margin-bottom: 30px; -} - -div #survey_widget td > fieldset > label { - font-size: 11px; -} - -.ui-dialog-content { - padding: 0px !important; - margin: 5px !important; -} - -#dialog { - font-size: 62.5%; -} - -#dialog input { - margin: 5px; -} - -#dialog label, #dialog input { - display: block; -} - -#dialog p { - text-align: center; - padding-left: 0; -} - -#dialog input.text { - margin-bottom: 12px; - width: 95%; - padding: .4em; -} - -#dialog fieldset { - padding: 0; - border: 0; - margin-top: 25px; -} - -#dialog h1 { - font-size: 1.2em; - margin: .6em 0; -} - -.ui-button { - outline: 0; - margin: 0; - padding: .4em 1em .5em; - text-decoration: none; - cursor:pointer; - position: relative; - text-align: center; -} - -.ui-dialog .ui-state-highlight, -.ui-dialog .ui-state-error { - padding: .3em; -} - -.pick_multi input, -.quant_radio input { - display: inline; - width: auto !important; -} - -/* NEWS FEED FEEDS */ -.news_feed { - border: 10px solid #e5ecf9; - border-top: 1px solid #3366cc; - float:left; -} - -.news_feed .inner{ - padding:0 20px; -} - -.news_feed h2 { - margin-top: 0.1em; - background-color: #e5ecf9; -} - -.news_feed h2 a { - text-decoration: none; - color: black; -} - -.news_feed h2 a:visited { - text-decoration: none; - color: black; -} - -.news_feed .entry { - margin:1em 0.3em; -} - -.news_feed .title { - font-size: medium; -} - -.news_feed .time { - color: gray; - margin-bottom: 0.5em; -} - -.news_feed .snippet { - background-color: white; -} - -a#feed_icon img{ - margin:-1px 0; -} diff -r dac91fecae38 -r 1ad6d986be6d app/soc/content/css/soc-090708-ie.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/soc/content/css/soc-090708-ie.css Wed Jul 08 11:50:02 2009 +0200 @@ -0,0 +1,40 @@ +/* +Copyright 2009 the Melange authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + */ + +/* + * Put IE specific hacks in this file. Which will only be included by IE. + */ + +td.formfieldvalue input { + width: 200px; +} + +td.formfieldvalue textarea { + width: 200px; +} + +td.formfieldvalue select { + width: 200px; +} + +#survey_widget select, +#survey_widget input { + width: auto !important; +} + +#survey_widget textarea { + width: 95%; +} diff -r dac91fecae38 -r 1ad6d986be6d app/soc/content/css/soc-090708.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/soc/content/css/soc-090708.css Wed Jul 08 11:50:02 2009 +0200 @@ -0,0 +1,877 @@ +/* +Copyright 2009 the Melange authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + */ + +/* + * STANDARD HTML TAGS + */ +@import '/soc/content/css/ui.all.css'; +body { + background-color: white; + color: black; + + font-family: Arial, sans-serif; + font-size: medium; + + margin: 8px; + margin-top: 3px; +} + +img { + border: 0; +} + +form { + margin: 0; + padding: 0; +} + +li { + margin-bottom: 0.25em; +} + +/* HEADERS */ +h1 { + font-size: x-large; + margin-top: 0px; +} + +h2 { + font-size: large; +} + +h3 { + font-size: medium; +} + +h4 { + font-size: small; +} + +/* PRE-FORMATTED TEXT */ +pre, code { + color: #007000; + font-family: "bogus font here", monospace; + font-size: 100%; +} + +pre { + border: 1px solid silver; + background-color: #f5f5f5; + padding: 0.5em; + overflow: auto; + margin: 2em; +} + +pre ins { + color: #cc0000; + font-weight: bold; + text-decoration: none; +} + +/* LINKS AND ANCHORS */ +a:link { + color: #0000cc; +} + +a:active { + color: #cc0000; +} + +a:visited { + color: #551a8b; +} + +a.selected, .selected a, .selected { + color: black; + font-weight: bold; + text-decoration: none; +} + +a.novisit { + color: #2a55a3; +} + +a.noul, a.noulv { + color: #4182fa; /* #93b7fa; */ + text-decoration: none; +} + +a:hover.noul { + text-decoration: underline; +} + +a:visited.noul { + color: #a32a91; /* #2a55a3; */ +} + + +/* Styles used by Django Forms */ +ul.errorlist { + color: #FF0000; + font-size: small; +} + + +/* TABLES */ +table { + border-collapse: collapse; +} + +th, td { + /*padding: 0;*/ + padding:2px 5px; + vertical-align: top; + text-align: left; +} + +/* FORM FIELDS */ +td.formfieldrequired { + font-style: italic; + font-size: small; + text-align: center; +} + +td.formfieldhelptext { + font-style: italic; + font-size: small; + padding: 5px; +} + +td.formfielderror { + color: #FF0000; + font-size: small; +} + +td.formfieldheading { + font-weight: bold; + font-size: small; +} + +td.formfieldlabel { + font-weight: bold; + font-size: small; + text-align: right; +} + +td.twolineformfieldlabel { + font-weight: bold; + font-size: small; + text-align: left; +} + +td.twolineformfieldlabel { + font-weight: bold; + font-size: small; +} + +td.twolineformfielderrorlabel { + font-weight: bold; + color: #FF0000; + font-size: small; +} + +td.formfieldvalue { + text-align: left; +} + +td.formfieldvalue input { + width: 100%; +} + +td.formfieldvalue input[type=checkbox] { + width: auto; +} + +td.formfieldvalue input:focus { + background-color: #FFFF99; + font-weight: bold; +} + +td.formfieldvalue textarea { + width: 100%; +} + +/*td.formfieldvalue select { + width: 100%; +}*/ + +td.formfielderrorlabel, td.warning, span.formfielderrorlabel { + font-weight: bold; + color: #FF0000; + font-size: small; + text-align: right; +} + +/* TABLE QUEUES (used with .list) */ +table#queues { + border-collapse: collapse; + width: 100%; +} + +table#queues tr { + border-bottom: thin solid lightgray; +} + +table#queues td { + padding: 2px; +} + +/* TOOLTIPS */ + +#purr-container { + position: fixed; + bottom: 0; + right: 0; +} + +.tooltip { + position: relative; + width: 300px; +} + +.tooltip .close { + position: absolute; + top: 12px; + right: 12px; + display: block; + width: 18px; + height: 17px; + text-indent: -9999px; + background: url('/soc/content/images/purrClose.png') no-repeat 0 10px; +} + +.tooltip-body { + min-height: 50px; + padding: 22px 22px 0 22px; + background: url('/soc/content/images/purrTop.png') no-repeat left top; + color: #f9f9f9; +} + +.tooltip-body img { + width: 50px; + margin: 0 10px 0 0; + float: left; +} + +.tooltip-body h3 { + margin: 0; + font-size: 1.1em; +} + +.tooltip-body p { + margin: 5px 0 0 60px; + font-size: 0.8em; + line-height: 1.4em; +} + +.tooltip-bottom { + height: 22px; + background: url('/soc/content/images/purrBottom.png') no-repeat left top; +} + +/* + * PAGE ELEMENTS + */ + +#title { + border-top: 1px solid #3366cc; + background-color: #e5ecf9; + font-size: large; + font-weight: bold; + margin: 0; + padding: 0; + padding-top: 1px; + padding-bottom: 1px; + margin-top: 5px; + margin-left: 200px; + padding-left: 3px; +} + +#notice { + margin-left: 200px; + padding: 3px; +} + +#logo { + padding-right: 18px; + position: absolute; + left: 0; + top: -5px; +} + +#login { + text-align: right; +} + +#badge { + clear: both; + margin-top: 3.5em; + margin-bottom: 1em; + height: 53px; + font-style: italic; +} + +#body { + border-left: 1px dotted silver; + margin-left: 200px; + margin-right: 25px; + padding-left: 18px; + padding-bottom: 25px; +} + +#body .buttons { + margin-right: 4px; + margin-top: 20px; +} + +#body a.button, input[type^="submit"], input[type^="button"] { + margin: 0; + padding: 2px 5px 2px 5px; + font-family: Arial, Sans-serif; + font-size: 12px; + text-decoration: none; + color: #222; + cursor: default; + background: #ddd url("/soc/content/images/button-background.gif") repeat-x 0 0; + border: 1px solid #aaa; +} + +#body a.button:hover, input[type^="submit"]:hover, input[type^="button"]:hover { + border-color: #9cf #69e #69e #7af; +} + +#header { + height: 50px; + margin-bottom: 11px; + position: relative; +} + +#footer { + clear: both; + text-align: center; + margin-top: 3.5em; + margin-bottom: 1em; + background-image: url("http://www.google.com/images/art.gif"); + height: 53px; + background-repeat: no-repeat; + background-position: left center; + padding-left: 125px; +} + +#footer .text { + padding-top: 20px; +} + +#created { + font-size: x-small; + color:#C0C0C0; + text-align: right; +} + +/* Google Map */ +#role_profile_map { + height: 240px; + width: 320px; +} + +#org_home_extras { + margin:2em 0em 2em; + min-height:500px; +} + +#extras_left { + width: 55%; + left: 0px; + float: left; +} + +#extras_right { + width: 43%; + right: 0px; + float: right; +} + +/* Organization home gmap */ +#org_home_map { + height: 500px; + width: 500px; +} + +/* SIDEBAR MENU */ +#side { + width: 200px; + margin-bottom: 3em; + float: left; + font-size: small; +} + +#menu ul { + margin: 0; + padding: 0; + list-style-type: none; + margin-bottom: 1em; + font-size: 95%; +} + +#menu ul ul { + margin-left: 10px; + margin-bottom: 0; +} + +#menu li { + margin-top: 4px; + list-style-type: none; + list-style-image: none; +} + +#menu img { + margin-right: 4px; +} + +#menu li.leaf { + padding-left: 14px; +} + +#menu h4 { + margin: 0; + padding: 0; + margin-bottom: 1em; +} + +/* */ + +span.unread { + font-weight: bold; + color: #FF0000; +} + +span.edited { + color: #808080; +} + +/* SEARCH FIELD */ +#search { + margin-top: 2em; +} + +#search .header { + font-weight: bold; + font-size: 90%; + margin-bottom: 1px; +} + +#search .button { + margin-top: 1px; +} + +#search .input input { + width: 125px; +} + +/* BLOG FEEDS */ +.blog { + border: 10px solid #e5ecf9; + border-top: 1px solid #3366cc; +} + +.blog h2 { + margin-top: 0.1em; + background-color: #e5ecf9; +} + +.blog h2 a { + text-decoration: none; + color: black; +} + +.blog h2 a:visited { + text-decoration: none; + color: black; +} + + +.blog .entry { + margin-bottom: 1em; +} + +.blog .title { + font-size: medium; +} + +.blog .author { + color: gray; + margin-bottom: 0.5em; +} + +.blog .snippet { + background-color: white; +} + +/* LIST */ +.list { + background-color: #E5ECF9; + border: 1px solid #93b7fa; + border-bottom: 2px solid #93b7fa; + padding: 3px; + -moz-border-radius: 5px 5px 0px 0px; +} + +.list .pagination { + text-align: right; + padding: 3px; +} + +.list table{ + background-color: white; +} + +.list table th { + background-color: #eeeeec; + border-right: 1px solid lightgray; + border-top: 1px solid lightgray; +} + +.list table tr.on { + background-color: #ff9; + cursor: hand; + cursor: pointer; +} + +.list table tr.off { + background-color: #fff; +} + +.list table td.last { + border-right: 1px solid lightgray; +} + +.list table .first { + border-left: 1px solid lightgray; +} + +.list table td.no_hand { + cursor: default; +} + +/* + * STUDENT PROPOSAL REVIEWS + */ +.studentproposalreview { + font-size: small; +} + +.studentproposalreview .title { + background-color: #e5ecf9; +} + +.studentproposalreview .student{ + background: #d0f5a9; +} + +.studentproposalcomment-public, +.studentproposalreview-public .other { + background: #f5f6ce; +} + +.studentproposalcomment-private, +.studentproposalreview-private .other { + background: #D2EDF6; +} + +/* + * CUSTOM CLASSES + */ + +.assignedslot { + background-color: #d0f5a9; +} + +.todo { + color: #cc0000; + font-size: 80%; +} + +.newmark { + color: red; + font-size: 80%; + vertical-align: top; +} + +.error { + color: red; +} + +.notice { + background:#fad163; + font-size: small; + font-weight: bold; +} + +.fieldhelptext { + width: 450px; + background:#fad163; + font-size: small; + border: 1px solid black; +} + +.rounded_ul { background: url(/soc/content/images/ul.gif) no-repeat top left; } +.rounded_ur { background: url(/soc/content/images/ur.gif) no-repeat top right; } +.rounded_ll { background: url(/soc/content/images/ll.gif) no-repeat bottom left; } +.rounded_lr { background: url(/soc/content/images/lr.gif) no-repeat bottom right; } + +/* Disabled text. */ +.disabled { + color: gray; +} + +.plaintext { + background:transparent none repeat scroll 0 0; + border:0 none; + color:black; +} + +/* Surveys */ + + +div #survey_widget { + margin: 20px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + background-color: #FFFEEB; + border: 5px solid #F7CA75; + padding: 15px; + /*max-width: 700px;*/ +} + + +div #survey_widget.survey_admin { +/* TODO(ajaksu) remove if unnecessary */ +} + +div #survey_widget table { + width:95% +} + +div #survey_widget th, +div #survey_widget td { + padding-top: 15px; +} + +/* fields */ + +div #survey_widget textarea.long_answer { + padding: 10px; +} + +div #survey_widget textarea.tooltip_entry { + padding: 10px; + width: 80%; +} + +div #survey_widget textarea { + width: 90% !important; +} + +div #survey_widget td.formfieldlabel { + font-size: medium; +} + +#survey_widget.view input[disabled="disabled"], +#survey_widget.view textarea[disabled="disabled"], +#survey_widget.view select[disabled="disabled"], +#survey_widget.view option { + color: black; +} + +#survey_widget.quant_radio input, +#survey_widget.quant_radio label { + margin: 4px; +} + +/* options */ + +div #survey_options button { + display: block; + margin: 10px 0 0; +} + +div #survey_options { + margin: 20px 0 0 0; +} + +div #survey_widget a.delete { + float:left; + margin:-1px 7px; +} + +div #survey_widget th label { + /*display: block;*/ + max-width: 180px; +} + +div #survey_widget tr.role-specific label { + color: #666666; +} + + +span.formfieldlabel { + font-weight: bold; + font-size: small; +} + +.sortable_li { + border: solid 1px !important; + padding: 5px !important; +} + +.sortable_li, +div #survey_widget fieldset { + -moz-border-radius: 5px; + -webkit-border-radius: 5px; +} + +div #survey_widget select { + display: inline; +} + +div #survey_widget td { +} + +div #survey_widget label { +} + +div #survey_widget fieldset select { +} + +div #survey_widget fieldset textarea, +div #survey_widget fieldset input { + margin: 10px; +} + +div #survey_widget textarea.comment{ + margin-bottom: 30px; +} + +div #survey_widget td > fieldset > label { + font-size: 11px; +} + +.ui-dialog-content { + padding: 0px !important; + margin: 5px !important; +} + +#dialog { + font-size: 62.5%; +} + +#dialog input { + margin: 5px; +} + +#dialog label, #dialog input { + display: block; +} + +#dialog p { + text-align: center; + padding-left: 0; +} + +#dialog input.text { + margin-bottom: 12px; + width: 95%; + padding: .4em; +} + +#dialog fieldset { + padding: 0; + border: 0; + margin-top: 25px; +} + +#dialog h1 { + font-size: 1.2em; + margin: .6em 0; +} + +.ui-button { + outline: 0; + margin: 0; + padding: .4em 1em .5em; + text-decoration: none; + cursor:pointer; + position: relative; + text-align: center; +} + +.ui-dialog .ui-state-highlight, +.ui-dialog .ui-state-error { + padding: .3em; +} + +.pick_multi input, +.quant_radio input { + display: inline; + width: auto !important; +} + +/* NEWS FEED FEEDS */ +.news_feed { + border: 10px solid #e5ecf9; + border-top: 1px solid #3366cc; + float:left; +} + +.news_feed .inner{ + padding:0 20px; +} + +.news_feed h2 { + margin-top: 0.1em; + background-color: #e5ecf9; +} + +.news_feed h2 a { + text-decoration: none; + color: black; +} + +.news_feed h2 a:visited { + text-decoration: none; + color: black; +} + +.news_feed .entry { + margin:1em 0.3em; +} + +.news_feed .title { + font-size: medium; +} + +.news_feed .time { + color: gray; + margin-bottom: 0.5em; +} + +.news_feed .snippet { + background-color: white; +} + +a#feed_icon img{ + margin:-1px 0; +} diff -r dac91fecae38 -r 1ad6d986be6d app/soc/content/js/survey-edit-090706.js --- a/app/soc/content/js/survey-edit-090706.js Wed Jul 08 10:45:49 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,774 +0,0 @@ - /* Copyright 2009 the Melange authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* -* -* @author Daniel Diniz -* @author James Levy -*/ - -(function ($) { - - var DEFAULT_LONG_ANSWER_TEXT = 'Write a Custom Prompt For This Question...'; - var DEFAULT_SHORT_ANSWER_TEXT = 'Write a Custom Prompt...'; - - $(function () { - /* - * == Set Selectors == - * - */ - var widget = $('div#survey_widget'); - - widget.parents('td.formfieldvalue:first').css({ - 'float': 'left', - 'width': 200 - }); - - /* - * == Setup for existing surveys == - * - */ - - if ($('input#id_title').val() === '' && $('.formfielderror').length < 1) { - widget.find('tr').remove(); - } - - widget.find('table:first').show(); - - /* - * Restore survey content html from editPost - * if POST fails - */ - - var SURVEY_PREFIX = 'survey__'; - var del_el = [""].join(""); - var del_li = [" "]; - - var survey_html = $('form').find("#id_survey_html").attr('value'); - - function renderHTML() { - // render existing survey forms - widget.find('td.twolineformfieldlabel > label').prepend(del_el).end(); - - $('ol').find('li').each( - function () { - $(this).prepend(del_li.join($(this).attr('id'))).end(); - } - ); - widget.find('.short_answer').each( - function () { - $(this).attr('name', SURVEY_PREFIX + $(this).getPosition() + - 'short_answer__' + $(this).attr('name')); - } - ); - - // add index information to choice fields - widget.find('[name=create-option-button]').each( - function () { - $( - '#index_for_' + $(this).attr('value') - ) - .val( - $(this).getPosition() - ); - } - ); - - widget.find('.long_answer').each( - function () { - $(this).attr('name', SURVEY_PREFIX + $(this).getPosition() + - 'long_answer__' + $(this).attr('name')) - .attr('overflow', 'auto'); - // TODO: replace scrollbar with jquery autogrow - } - ); - } - - if (survey_html && survey_html.length > 1) { - widget.html(survey_html); // we don't need to re-render HTML - - widget.find('.long_answer,input').each( - function () { - $(this).val($(this).attr('val')); - } - ); - } - else { - renderHTML(); - } - - var survey = widget.find('tbody:first'); - var options = widget.find('#survey_options'); - - /* - * == Handle Enter key on dialogs == - */ - $('form input, form button, form select').keypress( - function (e) { - if ((e.which && e.which === 13) || (e.keyCode && e.keyCode === 13)) { - $(this).parents('.ui-dialog:first').find(":button:first").click(); - return false; - } - } - ); - - /* - * == Display survey answers inline == - */ - $('a.fetch_answers').click( - function () { - var user = this.id.replace('results_for_', ''); - var path = window.location.pathname; - path = path.replace('/edit/', '/show/').replace('/results/', '/show/'); - - // TODO(ajaksu) add Date().getTime() to query arg if needed - var query = '?read_only=true&user_results=' + user; - var scrollable = ['
'].join(""); - $(scrollable).load(path + query + ' #survey_widget').dialog({ - title: user, - height: 500, - width: 700 - }); - } - ); - - /* - * == Initiation == - * - * Runs on PageLoad and Each Time Field is Added to Survey - * - */ - - survey.bind('init', - function () { - // TODO(jamslevy) unnecessarily redundant - // TODO(jamslevy) This should be refactored as a jQuery function that - // acts on only a single field and it should be merged with renderHTML - // since they have comparable functionality. - - widget.find('input').each( - function () { - if (($(this).val().length < 1 || - $(this).val() === DEFAULT_SHORT_ANSWER_TEXT) && - ($(this).attr('type') !== 'hidden')) { - $(this).preserveDefaultText(DEFAULT_SHORT_ANSWER_TEXT); - } - } - ); - - widget.find('.long_answer, .tooltip_entry').each( - function () { - if ($(this).val().length < 1 || - $(this).val() === DEFAULT_LONG_ANSWER_TEXT) { - $(this).preserveDefaultText(DEFAULT_LONG_ANSWER_TEXT); - } - $(this).growfield(); - } - ); - - widget.find('a.delete img').click( - function () { - // delete a field - var this_field = $(this).parents('tr:first'); - var deleted_id = $(this_field).find('label').attr('for'); - var delete_this = confirm(["Deleting this field will remove all ", - "answers submitted for this field. ", - "Continue?"].join("")); - if (delete_this) { - var edit_form = $('#EditForm'); - var deleted_field = $('#__deleted__'); - if (deleted_field.val()) { - deleted_field.val(deleted_field.val() + ',' + - deleted_id.replace('id_', '')).end(); - } - else { - var deleted_input = $(""); - deleted_input.attr({'id': '__deleted__'}).attr({ - 'name': '__deleted__' - }); - edit_form.append(deleted_input); - } - this_field.next('tr').remove().end() - .remove(); - } - } - ); - - // Add list/choice-field item to survey - $('[name=create-option-button]').each( - function () { - $(this).click( - function () { - var new_option_val = $('#new_item_field_ul_id'); - var new_option_dialog = $("#new_item_dialog"); - - new_option_val.val($(this).parents('fieldset').children('ol') - .attr('id')); - - new_option_dialog.dialog('open').find('input:first').focus(); - } - ) - .hover( - function () { - $(this).addClass("ui-state-hover"); - }, - function () { - $(this).removeClass("ui-state-hover"); - } - ) - .mousedown( - function () { - $(this).addClass("ui-state-active"); - } - ) - .mouseup( - function () { - $(this).removeClass("ui-state-active"); - } - ); - } - ); - - options.find('.AddQuestion').click( - function (e) { - // Choose a field type - $("#new_question_button_id").val($(this).attr('id')); - var question_options_div = $('#question_options_div'); - if ($(this).attr('id') === 'choice') { - question_options_div.show(); - } - else { - question_options_div.hide(); - } - - $("#new_question_dialog").dialog('open').find('input:first') - .focus(); - } - ); - }).trigger('init') - .bind('option_init', - function () { - - // Delete list/choice-field item from survey - widget.find('a.delete_item').click( - function () { - var to_delete = this.id.replace('del_', ''); - $('#delete_item_field').val(to_delete); - $('#delete_item_dialog').dialog('open'); - } - ).end(); - - } - ).trigger('option_init'); - - - /* GSOC ROLE-SPECIFIC FIELD PLUGIN - * Choice between student/mentor renders required GSOC specific fields - */ - - var taking_access_field = $('select#id_taking_access'); - - var addRoleFields = function (role_type) { - // these should ideally be generated with django forms - // TODO: apply info tooltips - var CHOOSE_A_PROJECT_FIELD = [ - '', - ' ' - ].join(""); - - var CHOOSE_A_GRADE_FIELD = [ - '', - '', - '' - ].join(""); - - // flush existing role-specific fields - var role_specific_fields = survey.find('tr.role-specific'); - role_specific_fields.remove(); - - switch (role_type) { - case "mentor evaluation": - survey.prepend(CHOOSE_A_PROJECT_FIELD); - survey.append(CHOOSE_A_GRADE_FIELD); - break; - - case "student evaluation": - survey.prepend(CHOOSE_A_PROJECT_FIELD); - break; - } - }; - - taking_access_field.change( - function () { - var role_type = $(this).val(); - addRoleFields(role_type); - } - ); - - addRoleFields(taking_access_field.val()); - - /* - * == Survey Submission Handler == - */ - // Bind submit - $('form').bind('submit', - function () { - - /* - * get rid of role-specific fields - */ - survey.find('tr.role-specific').remove(); - - /* - * Save survey content html from editPost - * if POST fails - */ - - // save field vals - widget.find('.long_answer,input').each( - function () { - $(this).attr('val', $(this).val()); - } - ); - - $(this).find("#id_survey_html").attr('value', widget.html()); - - // don't save default value - widget.find('input').each( - function () { - if ($(this).val() === DEFAULT_SHORT_ANSWER_TEXT) { - $(this).val(''); - } - } - ); - - // don't save default value - widget.find('.long_answer, .tooltip_entry').each( - function () { - if ($(this).val() === DEFAULT_LONG_ANSWER_TEXT) { - $(this).val(''); - } - } - ); - - // get rid of the options - $('input#id_s_html') - .val( - widget - .find( - 'div#survey_options' - ) - .remove() - .end() - .html() - ); - // only needed for HTML - - // Get option order per field - survey.find('.sortable').each( - function () { - $('#order_for_' + this.id) - .val( - $(this).sortable( - 'serialize' - ) - ); - } - ); - } - ); - }); -}(jQuery)); - - -(function ($) { - /* - * == Utils == - * - */ - jQuery.fn.extend({ - - // get position of survey field - getPosition: function () { - var this_fieldset = $(this).parents('fieldset:first'); - var this_table = this_fieldset.parents('table:first'); - var position = this_table.find('fieldset').index(this_fieldset) + '__'; - return position; - } - }); -}(jQuery)); - - -(function ($) { - /* - * == Sortable options == - */ - $(function () { - $(".sortable").each( - function (i, domEle) { - $(domEle).sortable().disableSelection().end(); - } - ); - }); -}(jQuery)); - - -(function ($) { - /* - * == Editable options == - */ - $(function () { - function onSubmitEditable(content) { - var id_ = $(this).parent().attr('id').replace('-li-', '_'); - id_ = id_ + '__field'; - $('#' + id_).val(content.current); - } - $('.editable_option').editable({ - editBy: 'dblclick', - submit: 'change', - cancel: 'cancel', - onSubmit: onSubmitEditable - }); - }); -}(jQuery)); - - -(function ($) { - $(function () { - var del_li = [" "]; - - // Confirmation dialog for deleting list/choice-field item from survey - $("#delete_item_dialog").dialog({ - autoOpen: false, - bgiframe: true, - resizable: false, - height: 300, - modal: true, - overlay: { - backgroundColor: '#000', - opacity: 0.5 - }, - buttons: { - 'Delete this item': function () { - $('#' + $('#delete_item_field').val()).remove(); - $('#delete_item_field').val(''); - $(this).dialog('close'); - }, - Cancel: function () { - $('#delete_item_field').val(''); - $(this).dialog('close'); - } - } - }); - - - // Dialog for adding list/choice-field item to survey - $("#new_item_dialog").dialog({ - bgiframe: true, - autoOpen: false, - height: 300, - width: 300, - modal: true, - buttons: { - 'Add option': function () { - var ol_id = $('#new_item_field_ul_id').val(); - var ol = $('#' + ol_id); - var name = $('#new_item_name').val(); - var i = ol.find('li').length; - var id_ = 'id_' + ol_id + '_' + i; - var option_html = $([ - '
  • ', - '', - '', name, '', '', '
  • ' - ].join("")); - - ol.append( - option_html - .prepend( - del_li.join( - option_html.attr('id') - ) - ) - ); - ol.sortable().disableSelection(); - $('#new_item_name').val(''); - $('#new_item_field_ol_id').val(''); - $(this).dialog('close'); - }, - Cancel: function () { - $('#new_item_name').val(''); - $('#new_item_field_ul_id').val(''); - $(this).dialog('close'); - } - } - }); - }); -}(jQuery)); - - -(function ($) { - $(function () { - // Dialog for adding new question to survey - var SURVEY_PREFIX = 'survey__'; - var del_el = [""].join(""); - var del_li = [" "]; - - - var widget = $('div#survey_widget'); - var survey = widget.find('tbody:first'); - - $("#new_question_dialog").dialog({ - bgiframe: true, - autoOpen: false, - height: 400, - width: 300, - modal: true, - buttons: { - 'Add question': function () { - var button_id = $("#new_question_button_id").val(); - var survey_table = $('div#survey_widget').find('tbody:first'); - $("#new_question_button_id").val(''); - - var field_template = $([" "].join("")); - - var field_name = $("#new_question_name").val(); - var question_content = $("#new_question_content").val(); - var question_options = $("#new_question_options").val(); - - if (field_name !== '') { - $("#new_question_name").val(''); - $("#new_question_content").val(''); - $("#new_question_options").val(''); - - var new_field = false; - var type = button_id + "__"; - var field_count = survey_table.find('fieldset').length; - var new_field_count = field_count + 1 + '__'; - - var MIN_ROWS = 10; - var MAX_ROWS = MIN_ROWS * 2; - var DEFAULT_OPTION_TEXT = 'Add A New Option...'; - var default_option = [""].join(""); - - // create the HTML for the field - switch (button_id) { - case "short_answer": - new_field = ["
    \n", - '', - '', '', - '', - "", "
    " - ].join(""); - break; - case "long_answer": - field_count = survey_table.find('fieldset').length; - new_field_count = field_count + 1 + '__'; - new_field = ['
    \n', '', - '', '', - '', - "