/* Administration application custom JavaScript */
-
-function showAdminSections(e) {
- $('admin-page-menu').style.display = "none";
- rmClass($('admin-page-menu'), "hidden");
- toggleClass($('showsectionswrapper'), "hidden");
- toggleClass($('hidesectionswrapper'), "hidden");
- if (!eltHasClass($('admin-page-menu'), "alreadyMoved")) {
- $('admin-page-menu').parentNode.insertBefore($('admin-page-menu'), $('admin-page-content'));
- addClass($('admin-page-menu'), "alreadyMoved");
- }
- Effect.SlideDown('admin-page-menu', { duration: 0.7 });
- Event.stop(e);
-}
-
-function hideAdminSections(e) {
- toggleClass($('showsectionswrapper'), "hidden");
- toggleClass($('hidesectionswrapper'), "hidden");
- $('admin-page-menu').style.display = "none";
- Event.stop(e);
-}
-
-function goTo(e) {
- var select = $('goto-select');
- var i = select.selectedIndex;
- if (window.location != select.options[i].value) {
- window.location = select.options[i].value;
- }
-}
-
-Event.observe(window, 'load', function() {
- if($('showsections')) { Event.observe($('showsections'), 'click', showAdminSections, false); }
- if($('hidesections')) { Event.observe($('hidesections'), 'click', hideAdminSections, false); }
- if($('goto-select')) { Event.observe($('goto-select'), 'change', goTo, false); }
-});
-/* Override xwiki.js */
-
-.hidden {
- display: none !important;
-}
-
-/* Override userandgroups.css */
-
-.display td, #specialusersandgroups td {
- border: 1px solid #7c7c7c !important;
-}
-
-#userstable td, #groupstable td, #usersandgroupstable td, #alldocstable td {
- border-color: transparent;
-}
-
-#userstable, #groupstable, #usersandgroupstable, #alldocstable {
- border-color: transparent;
-}
-
-/* Additions */
-
-#admin-page-header .submenuitem a, #admin-page-header .submenuitem a:link, #admin-page-header .submenuitem a:visited, #admin-page-header .submenuitem a:active {
- display:block;
- float: none;
- width: 100%;
- font-size:0.8em;
- font-weight: bold;
- text-decoration:none;
- height:auto;
- padding:2px 0 0 0;
- line-height:1.2em;
- border: 0;
- text-align: left;
- color:#FFF;
-}
-
-#admin-page-header .submenuitem a:hover {
- text-decoration: underline;
- background-image: none;
-}
-
-#admin-page-header {
- color: #FFF;
- padding-top: 5px;
- padding-bottom: 5px;
- background-color: #AFAFB5;
-}
-
-.admin-page-header-spacer {
- clear:both;
- height:5px;
-}
-
-h1#admin-header {
- float:left;
- line-height: 46px;
- margin-left: 20px;
- font-size: 2em;
- font-weight: bold;
- margin-top: 0px;
- overflow:hidden;
-}
-
-#change-context {
- float:right;
- margin-right:20px;
- width:300px;
- font-size:12px;
- line-height: 22px;
- text-align:right;
-}
-
-#goto-globaladmin a {
- color: #808085;
- font-weight: bold;
-}
-
-#admin-page-menu {
- clear: both;
- width: 100%;
-}
-
-#admin-icons {
- float: left;
- width: 100%;
- margin: 0px;
-}
-
-#admin-icons li {
- list-style-type: none;
- display: inline-block;
- width: 125px;
- margin: 15px;
- text-align: center;
- vertical-align: top;
-}
-/* For IE6/7, which don't really understand inline-block on block elements */
-* html #admin-icons li {
- display: inline;
-}
-*+html #admin-icons li {
- display: inline;
-}
-
-#admin-icons li a {
- display: block;
- background-position: 50% 0%;
- background-repeat: no-repeat;
- width: 124px;
- font-weight: bold;
- color: #808085;
- text-decoration: none;
-}
-
-#admin-icons li a img {
- display: block;
- height: 85px;
- text-decoration: none;
- border: 0;
-}
-
-#admin-page {
- width: 100%;
-}
-
-#admin-page-content {
- background-color: #F9F9F9;
- margin: 0px auto;
- margin-top: 10px;
- padding: 5px;
- clear: both;
-}
-
-#if($xwiki.getBaseSkin() == "albatross")
-h1#admin-header {
- margin-bottom: 0px;
-}
-
-#showsectionswrapper, #hidesectionswrapper {
- float: right;
- margin: 0px;
-}
-
-.rightmenu .submenu .submenuitem {
- border: 0px;
- margin: 0px;
- padding: 0px;
-}
-
-.rightmenu #tmAdmin a strong {
- padding: 0px !important;
-}
-
-#admin-page .bottombuttons {
- background: transparent !important;
- margin: 0px auto !important;
- margin-bottom: 10 px !important;
-}
-
-.bottombuttons .buttonwrapper {
- display: inline;
-}
-#end
-
-#admin-page-content #xwikieditcontent {
- background-color: transparent;
-}
-
-#admin-page-content fieldset {
- border: 0px;
- border-bottom: 3px solid #FFF;
- margin-bottom: 10px;
-}
-
-#admin-page-content fieldset p {
- width: 80%;
- display: block;
- margin-bottom: 10px;
- padding-left: 10px;
- padding-right: 10px;
-}
-
-#admin-page-content fieldset legend {
- color: #606B72;
- font-size: 1.5em;
- font-weight: bold;
- padding-top: 10px;
- padding-left: 10px;
-}
-
-p.legend {
- width: auto !important;
- padding: 0px;
- margin: 0px;
- color: #606B72;
- font-size: 1.5em;
- font-weight: bold;
- margin-bottom: 10px;
-}
-
-#admin-page-content fieldset p label {
- width: 30% !important;
- float: left;
- color: #4A4A4B;
- font-weight: bold;
- clear: left;
- margin-bottom: 10px;
- padding-left: 10px;
- padding-right: 10px;
-}
-
-#admin-page-content fieldset p input, #admin-page-content fieldset p textarea {
- width: 65%;
- margin-left: 10px;
- margin-bottom: 10px;
-}
-
-/* Checkboxes are centered in some browsers without this. */
-#admin-page-content fieldset p input[type=checkbox] {
- width: auto;
- margin: 0 0 0 10px;
-}
-
-#admin-page-content fieldset p select {
- width: 30%;
- margin-left: 10px;
- margin-bottom: 10px;
-}
-
-#goto-select {
- clear:both;
- width:290px;
-}
-
-#goto-select optgroup {
- margin: 6px;
-}
-
-#usersandgroupstable-filters #name {
- width: 65%;
-}
-document.observe('dom:loaded', function() {
- // Hide headers unless they have error messages under them.
- var elementsInPage = $('admin-page-content').childNodes;
- var errorShown = false;
- for (var i = elementsInPage.length - 1; i > -1; i--) {
- var e = elementsInPage[i];
- if (e.tagName != undefined && e.tagName.toLowerCase() == 'div' && e.getAttribute('class') != undefined && e.getAttribute('class').indexOf('errormessage') != -1)
- {
- errorShown = true;
- } else if (!errorShown
- && e.tagName != undefined
- && e.tagName.toLowerCase() == 'h1'
- && e.getAttribute('id') != undefined
- && e.getAttribute('id').toLowerCase().indexOf('hcustomize') == 0)
- {
- e.parentNode.removeChild(e);
- errorShown = false;
- }
- }
-
- // Hide individual submit buttons.
- var forms = document.getElementsByTagName('form');
- var inputs = document.getElementsByTagName('input');
- for (var i = 0; i < inputs.length; i++) {
- if (inputs[i].getAttribute('type') != undefined && inputs[i].getAttribute('type').toLowerCase() == 'submit') {
- inputs[i].parentNode.removeChild(inputs[i]);
- }
- }
-
- // Add a submit button for saving all sections at once.
- var button = new Element('input', {'type':'submit', 'class':'button', 'value':'$msg.get("admin.save")', 'name':'formactionsac'});
- var wrapper = new Element('span', {'class':'buttonwrapper'});
- var adminButtons = new Element('p', {'class':'admin-buttons'});
- var bottomButtons = new Element('div', {'class':'bottombuttons'});
- $('admin-page-content').appendChild(bottomButtons);
- bottomButtons.appendChild(adminButtons);
- adminButtons.appendChild(wrapper);
- wrapper.appendChild(button);
-
- Event.observe(button, 'click', function() {
- var forms = $('admin-page-content').getElementsByTagName('form');
- for (var i = 0; i < forms.length; i++) {
- Event.fire(document, 'xwiki:actions:save', {'form':forms[i].id, 'continue':true});
- }
- });
-});
-Object.extend(XWiki, {
- userprofile : {
-
- init : function() {
- if ($('avatar')) {
- Event.observe($('avatar'), 'mouseover', function() { XWiki.userprofile.displayChangePhoto('true') });
- Event.observe($('avatar'), 'mouseout', function() { XWiki.userprofile.displayChangePhoto('false') });
- XWiki.userprofile.adjustTabsContainerHeight();
- }
- },
-
- /*
- ** This ugly hack is used as a workaround for IE6 box model (3px jog bug) which prevent from
- ** putting the separating border between tabs and panes on the pane div. We put the border
- ** on the tabs container and adjust its size depending on the size of the right pane.
- ** FIXME: find a better mechanism for tabbed UIs / drop this hack when stopping IE6 support.
- */
- adjustTabsContainerHeight: function() {
- var currentPane;
- $("vertical-panes").select("div.vertical-pane").each(function(pane){
- if(!pane.hasClassName('hidden')) {
- currentPane = pane;
- }
- });
- if (currentPane.getHeight() > $('vertical-tabs').getHeight()) {
- $('vertical-tabs').setStyle({ height: currentPane.getHeight() + 'px' });
- } else {
- $('vertical-tabs').setStyle({ height: '' });
- }
- },
-
- displayChangePhoto : function(display) {
- var changePhoto = $('avatarUpload');
- if (display == true) {
- changePhoto.removeClassName('hidden');
- } else {
- changePhoto.addClassName('hidden');
- }
- },
-
- switchTab : function(tab) {
- $("vertical-panes").select("div.vertical-pane").each(function(pane){
- pane.addClassName('hidden');
- });
- $('vertical-tabs').setStyle({ height: '' });
- $(tab + 'Pane').removeClassName('hidden');
- $("vertical-tabs").select("li.vertical-tab").each(function(tab){
- tab.removeClassName('active');
- });
- $(tab + 'Tab').addClassName('active');
- XWiki.userprofile.adjustTabsContainerHeight();
- }
- }
-});
-
-Event.observe(window, 'load', function() { XWiki.userprofile.init() });
-#template("colorThemeInit.vm")
-#set($tabswidth = "130px")
-
-td.recentChangesLeft, .recentChangesMoreActions {
- display:none;
-}
-
-td.recentChangesRight {
- padding: 0 !important;
-}
-
-#profilePane .column h1 {
- font-weight:bold;
- font-size:115%;
- margin:10px 0;
-}
-
-#profilePane .column h2 {
- font-size: 110%;
-}
-
-div.userInfo, div.userRecentChanges, div.userPreferences, div.passwordManagement, div.watchlistManagement, div.watchlistRss, div.watchlistElements {
- margin: 5px 10px 10px;
- padding: 5px 10px 10px;
-}
-
-div.userInfo, div.userPreferences, div.watchlistManagement {
- background-color: $theme.backgroundSecondaryColor;
-}
-
-.userInfo img {
- max-width: 100%;
-}
-
-div.userInfo input[type="text"], div.userInfo input[type="password"], div.userInfo textarea, div.userInfo select, div.userPreferences select {
- width: 100%;
-}
-
-div.editProfileCategory {
- float:right;
-}
-
-div.editProfileCategory a {
- display:block;
- width: 16px;
- height: 16px;
- background: url($xwiki.getSkinFile('icons/silk/pencil.gif')) no-repeat;
-}
-
-/* Watchlist */
-
-#watchlistRssLink {
- background: url($xwiki.getSkinFile('icons/xwiki/rss-medium.png')) no-repeat;
- padding-left: 18px;
- font-weight: bold;
-}
-
-span.wikiWatchlistType, span.spaceWatchlistType, span.pageWatchlistType {
- width: 16px;
- height: 16px;
- display: block;
-}
-
-span.wikiWatchlistType {
- background: url($xwiki.getSkinFile('icons/silk/world.gif')) no-repeat;
-}
-
-span.spaceWatchlistType {
- background: url($xwiki.getSkinFile('icons/silk/folder.gif')) no-repeat;
-}
-
-span.pageWatchlistType {
- background: url($xwiki.getSkinFile('icons/silk/page_white_text.gif')) no-repeat;
-}
-
-/* Tabs */
-
-div#vertical-panes {
- margin-top: 10px;
-}
-
-span#avatarUpload {
- display:block;
- width:$tabswidth;
- position:absolute;
- font-size: 10px;
- font-weight: bold;
- background-color: white;
-}
-
-#vertical-tabs {
- float:left;
- width:$tabswidth;
- border-right: solid 1px $theme.menuBackgroundColor;
-}
-
-#vertical-tabs ul {
- margin:0;
- margin-top:5px;
- padding:0;
- border-right:0;
- border-bottom:0;
- border-left:0;
-}
-
-#vertical-tabs ul li {
- display: block;
- list-style-type: none;
- list-style-position: outside;
- margin:0;
- border: solid 1px $theme.pageContentBackgroundColor;
- border-right: 0;
-}
-
-#vertical-tabs ul li img {
- float:left;
- margin-right:4px;
- vertical-align:middle;
-}
-
-#vertical-tabs ul li span {
- line-height:1.5em;
-}
-
-#vertical-tabs ul li.active {
- border: solid 1px $theme.menuBackgroundColor;
- border-right: 0px;
-}
-
-#vertical-tabs ul li a {
- padding: 3px 0px 3px 10px;
- text-decoration: none;
- display:block;
- color:$theme.menuBackgroundColor;
-}
-
-#vertical-tabs ul li.active a {
- text-decoration: none;
- position:relative;
- left:1px;
- background:$theme.pageContentBackgroundColor;
- color: $theme.textColor;
- padding-left: 9px;
-}
-
-.vertical-pane {
- margin-left:$tabswidth;
- padding: 10px;
- padding-top: 0;
-}
-
-.vertical-pane .column {
- overflow: hidden;
-}
-