From: Moritz Bunkus Date: Fri, 25 Jul 2008 15:32:14 +0000 (+0000) Subject: Update des DHTML-Tab-Scripts auf Version 2.2. X-Git-Tag: release-2.6.0beta1~22 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=256c879b9614b9e0c7254e448fda6805da743db8;p=kivitendo-erp.git Update des DHTML-Tab-Scripts auf Version 2.2. --- diff --git a/SL/Form.pm b/SL/Form.pm index a06c363e8..5a2ad9203 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -617,15 +617,15 @@ sub header { - + diff --git a/css/shade.gif b/css/shade.gif deleted file mode 100644 index 72b13c587..000000000 Binary files a/css/shade.gif and /dev/null differ diff --git a/css/shadeactive.gif b/css/shadeactive.gif deleted file mode 100644 index e5c8097e3..000000000 Binary files a/css/shadeactive.gif and /dev/null differ diff --git a/css/tabcontent.css b/css/tabcontent.css index 25226e284..5b614167b 100644 --- a/css/tabcontent.css +++ b/css/tabcontent.css @@ -1,63 +1,176 @@ -.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; -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.selected{ -position: relative; -top: 1px; -} - -.shadetabs li.selected a{ /*selected main tab style */ -background-image: url(shadeactive.gif); -border-bottom-color: white; -} - -.shadetabs li.selected a:hover{ /*selected main tab style */ -text-decoration: none; -} - -.tabcontentstyle{ /*style of tab content oontainer*/ -border: 1px solid gray; -width: 90%; -margin-bottom: 1em; -padding: 10px; -} - -.tabcontent{ -display:none; -} - -@media print { -.tabcontent { -display:block!important; -} +/* ######### 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(../image/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(../image/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; +} +} + +/* ######### CSS for Inverted Modern Bricks II Tabs. Remove if not using ######### */ + +.modernbricksmenu2{ +padding: 0; +width: 362px; +border-top: 5px solid #D25A0B; /*Brown color theme*/ +background: transparent; +voice-family: "\"}\""; +voice-family: inherit; +} + +.modernbricksmenu2 ul{ +margin:0; +margin-left: 10px; /*margin between first menu item and left browser edge*/ +padding: 0; +list-style: none; +} + +.modernbricksmenu2 li{ +display: inline; +margin: 0 2px 0 0; +padding: 0; +text-transform:uppercase; +} + +.modernbricksmenu2 a{ +float: left; +display: block; +font: bold 11px Arial; +color: white; +text-decoration: none; +margin: 0 1px 0 0; /*Margin between each menu item*/ +padding: 5px 10px; +background-color: black; /*Brown color theme*/ +border-top: 1px solid white; +} + +.modernbricksmenu2 a:hover{ +background-color: #D25A0B; /*Brown color theme*/ +color: white; +} + +.modernbricksmenu2 a.selected{ /*currently selected tab*/ +background-color: #D25A0B; /*Brown color theme*/ +color: white; +border-color: #D25A0B; /*Brown color theme*/ +} + +.tabcontent{ +display:none; +} + +@media print { +.tabcontent { +display:block !important; +} +} + +/* ######### CSS for Indented CSS Tabs. Remove if not using ######### */ + + +.indentmenu{ +font: bold 13px Arial; +width: 100%; /*leave this value as is in most cases*/ +} + +.indentmenu ul{ +margin: 0; +padding: 0; +float: left; +/* width: 80%; width of menu*/ +border-top: 1px solid navy; /*navy border*/ +background: black url(../image/indentbg.gif) center center repeat-x; +} + +.indentmenu ul li{ +display: inline; +} + +.indentmenu ul li a{ +float: left; +color: white; /*text color*/ +padding: 5px 11px; +text-decoration: none; +border-right: 1px solid navy; /*navy divider between menu items*/ +} + +.indentmenu ul li a:visited{ +color: white; +} + +.indentmenu ul li a.selected{ +color: white !important; +padding-top: 6px; /*shift text down 1px*/ +padding-bottom: 4px; +background: black url(../image/indentbg2.gif) center center repeat-x; +} + + +.tabcontentstyle{ /*style of tab content oontainer*/ +border: 1px solid gray; +width: 95%; +margin-bottom: 1em; +padding: 10px; +} + +.tabcontent{ +display:none; +} + +@media print { +.tabcontent { +display:block !important; +} } \ No newline at end of file diff --git a/image/indentbg.gif b/image/indentbg.gif new file mode 100644 index 000000000..d78ffd583 Binary files /dev/null and b/image/indentbg.gif differ diff --git a/image/indentbg2.gif b/image/indentbg2.gif new file mode 100644 index 000000000..5c81d8420 Binary files /dev/null and b/image/indentbg2.gif differ diff --git a/image/shade.gif b/image/shade.gif new file mode 100644 index 000000000..72b13c587 Binary files /dev/null and b/image/shade.gif differ diff --git a/image/shadeactive.gif b/image/shadeactive.gif new file mode 100644 index 000000000..e5c8097e3 Binary files /dev/null and b/image/shadeactive.gif differ diff --git a/js/tabcontent.js b/js/tabcontent.js index 243be264b..62f842d07 100644 --- a/js/tabcontent.js +++ b/js/tabcontent.js @@ -1,82 +1,159 @@ -//** Tab Content script- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com) -//** Last updated: June 29th, 06 - -var enabletabpersistence=1 //enable tab persistence via session only cookies, so selected tab is remembered? +//** 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//////////////////////// -var tabcontentIDs=new Object() - -function expandcontent(linkobj){ -var ulid=linkobj.parentNode.parentNode.id //id of UL element -var ullist=document.getElementById(ulid).getElementsByTagName("li") //get list of LIs corresponding to the tab contents -for (var i=0; i0)? 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 -function setCookie(name, value){ -document.cookie = name+"="+value //cookie value is domain wide (path=/) -} \ No newline at end of file +} //END Prototype assignment \ No newline at end of file diff --git a/templates/webpages/ct/form_footer_de.html b/templates/webpages/ct/form_footer_de.html index b8b9aaeaf..12c08e8b7 100644 --- a/templates/webpages/ct/form_footer_de.html +++ b/templates/webpages/ct/form_footer_de.html @@ -33,8 +33,18 @@ diff --git a/templates/webpages/ct/form_footer_master.html b/templates/webpages/ct/form_footer_master.html index e39e4faee..7758a120d 100644 --- a/templates/webpages/ct/form_footer_master.html +++ b/templates/webpages/ct/form_footer_master.html @@ -33,8 +33,18 @@ diff --git a/templates/webpages/ct/form_header_de.html b/templates/webpages/ct/form_header_de.html index 6a3749edc..7cee89487 100644 --- a/templates/webpages/ct/form_header_de.html +++ b/templates/webpages/ct/form_header_de.html @@ -588,14 +588,3 @@ [%- END %] - - diff --git a/templates/webpages/ct/form_header_master.html b/templates/webpages/ct/form_header_master.html index 0ab1afffd..f5b5551cf 100644 --- a/templates/webpages/ct/form_header_master.html +++ b/templates/webpages/ct/form_header_master.html @@ -588,14 +588,3 @@ [%- END %] - -