summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d27a240)
raw | patch | inline | side by side (parent: d27a240)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Sat, 30 Jan 2010 11:15:10 +0000 (11:15 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Sat, 30 Jan 2010 11:15:10 +0000 (11:15 +0000) |
* Removed js based width calculation
* Updated first list template
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15485 594d385d-05f5-0310-b6e9-bd551577e9d8
* Updated first list template
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15485 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/html/include/focus.js | patch | blob | history | |
gosa-core/html/themes/default/style.css | patch | blob | history | |
gosa-core/ihtml/themes/default/baseSelect-filter.tpl | [deleted file] | patch | blob | history |
gosa-core/ihtml/themes/default/baseSelect-filter.xml | [deleted file] | patch | blob | history |
gosa-core/ihtml/themes/default/baseSelect-list.tpl | [deleted file] | patch | blob | history |
gosa-core/ihtml/themes/default/baseSelect-list.xml | [deleted file] | patch | blob | history |
gosa-core/include/class_baseSelectDialog.inc | [deleted file] | patch | blob | history |
gosa-core/include/class_baseSelector.inc | patch | blob | history | |
gosa-core/include/class_listing.inc | patch | blob | history | |
gosa-core/plugins/admin/users/user-list.tpl | patch | blob | history |
index 52bcdcbbc3dd22a2a1445c11c9b858858ef31222..f67f8e616523222fa60128e6bd1d81fcb1e5b878 100644 (file)
}
function adjust (e) {
- adjust_height(e);
- adjust_width(e);
-}
-
-// Automatic resize (height) of divlists
-function adjust_height(e) {
if (!e) e=window.event;
if (document.getElementById("menucell") && document.getElementById("d_scrollbody")) {
var inner_height= window.innerHeight;
return (e.offsetParent)?e.offsetTop+absTop(e.offsetParent) : e.offsetTop;
}
-// Automatic resize (width) of divlists
-function adjust_width(e)
-{
-
- /* Get event ... it seems to be unused here ...*/
- if (!e) {
- e=window.event;
- }
-
- // Known to not work with IE
- if(document.defaultView && document.getElementById("t_scrolltable")) {
-
- // Get current width of divlist
- var div_width = parseInt(document.defaultView.getComputedStyle(document.getElementById("t_scrolltable"),"").getPropertyValue('width'));
-
- // Get window width
- var width= parseInt(window.innerWidth);
-
- // Resize the body cells, 470 represents the info box and the navigation part
- var save= 470;
- if(document.getElementById('d_save')) {
- save= document.getElementById('d_save').value;
- }
- var space= 600;
- if(document.getElementById('d_space')) {
- space= document.getElementById('d_space').value;
- }
- var diff= width - div_width - save;
-
- // window has been upscaled
- if(div_width+diff>=space) {
- if (width - save > space) {
- document.getElementById('d_scrollbody').style.width=div_width+diff+"px";
- if (document.getElementById('t_scrollbody') != null) {
- document.getElementById('t_scrollbody').style.width=(div_width-19)+diff+"px";
- }
-
- // Resize the Header cells (only the relative-width ones)
- if (document.getElementById('t_scrollhead') != null) {
- document.getElementById('t_scrollhead').style.width=div_width+diff+"px";
- }
- } else {
- document.getElementById('d_scrollbody').style.width=div_width+"px";
- if (document.getElementById('t_scrollbody') != null) {
- document.getElementById('t_scrollbody').style.width=(div_width-19)+"px";
- }
-
- // Resize the Header cells (only the relative-width ones)
- if (document.getElementById('t_scrollhead') != null) {
- document.getElementById('t_scrollhead').style.width=div_width+"px";
- }
- }
-
- // window has been downscaled, we must reset the div to 600px
- } else if (width < 1200) {
- // Reset layout (set width to 600px)
- div_width=space;
- document.getElementById('d_scrollbody').style.width=div_width+"px";
- if (document.getElementById('t_scrollbody') != null) {
- document.getElementById('t_scrollbody').style.width=(div_width-19)+"px";
- }
-
- // Resize the Header cells (only the relative-width ones)
- if (document.getElementById('t_scrollhead') != null) {
- document.getElementById('t_scrollhead').style.width=div_width+"px";
- }
- }
- } else if(document.defaultView && document.getElementById("t_scrolltable_onlywidth")){
- // Resize the div
- var div_width=parseInt(document.defaultView.getComputedStyle(document.getElementById("t_scrolltable_onlywidth"),"").getPropertyValue('width'));
- var width= parseInt(window.innerWidth);
-
- // Resize the body cells
- var diff= width-div_width-200;
-
- // window has been upscaled
- if(div_width+diff>=600) {
- if(document.getElementById('d_scrollbody_onlywidth')){
- document.getElementById('d_scrollbody_onlywidth').style.width=div_width+diff+"px";
- }
- document.getElementById('t_scrollbody_onlywidth').style.width=(div_width-19)+diff+"px";
-
- // Resize the Header cells (only the relative-width ones)
- document.getElementById('t_scrollhead_onlywidth').style.width=div_width+diff+"px";
-
- // window has been downscaled, we must reset the div to 600px
- } else if (width < 930) {
- // Reset layout (set width to 600px)
- div_width=600;
- if(document.getElementById('d_scrollbody_onlywidth')){
- document.getElementById('d_scrollbody_onlywidth').style.width=div_width+"px";
- }
- document.getElementById('t_scrollbody_onlywidth').style.width=(div_width-19)+"px";
-
- // Resize the Header cells (only the relative-width ones)
- document.getElementById('t_scrollhead_onlywidth').style.width=div_width+"px";
- }
- } else {
- // IE
-
- }
-}
-
-
/* Set focus to first valid input field
avoid IExplorer warning about hidding or disabled fields
*/
index 1eb0898b0af3fd80a6ca1d26910ae857a7e4abc1..bac115c023fd4b703e401382bd84602a9130d053 100644 (file)
border-bottom-width:0px;
height:26px;
vertical-align:middle;
+ width:100%;
}
p.contentboxh {
border:1px solid #b0b0b0;
border-top-width:0px;
vertical-align:middle;
+ width:100%;
}
p.contentboxb {
max-width:500px;
}
-td.nlistFooter {
+div.nlistFooter {
background-color:#E5E5E5;
border-left:1px solid #C0C0C0;
border-right:1px solid #C0C0C0;
border-bottom:1px solid #C0C0C0;
- padding:3px;
- height:16px;
+ padding:0;
+ width:100%;
}
/* Sortable Lists */
diff --git a/gosa-core/ihtml/themes/default/baseSelect-filter.tpl b/gosa-core/ihtml/themes/default/baseSelect-filter.tpl
+++ /dev/null
@@ -1,34 +0,0 @@
-<div class="contentboxh">
- <p class="contentboxh">
- <img src="images/launch.png" align="right" alt="[F]">{t}Filter{/t}
- </p>
-</div>
-
-<div class="contentboxb">
-
- <div style="border-top:1px solid #AAAAAA"></div>
-
- {$SCOPE}
-
-
- <table summary="" style="width:100%;border-top:1px solid #B0B0B0;">
- <tr>
- <td>
- <label for="NAME">
- <img src="images/lists/search.png" align=middle> Name
- </label>
- </td>
- <td>
- {$NAME}
- </td>
- </tr>
- </table>
-
- <table summary="" width="100%" style="background:#EEEEEE;border-top:1px solid #B0B0B0;">
- <tr>
- <td width="100%" align="right">
- {$APPLY}
- </td>
- </tr>
- </table>
-</div>
diff --git a/gosa-core/ihtml/themes/default/baseSelect-filter.xml b/gosa-core/ihtml/themes/default/baseSelect-filter.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<filterdef>
- <definition>
- <category>departments</category>
- <template>baseSelect-filter.tpl</template>
- <initial>true</initial>
- </definition>
-
- <search>
- <query>
- <backend>BaseSelect</backend>
- <filter>(&(objectClass=gosaDepartment)$NAME)</filter>
- <attribute>dn</attribute>
- <attribute>objectClass</attribute>
- <attribute>ou</attribute>
- <attribute>description</attribute>
- </query>
- <scope>auto</scope>
- </search>
-
- <element>
- <type>textfield</type>
- <tag>NAME</tag>
- <size>18</size>
- <maxlength>60</maxlength>
- <default></default>
- <unset></unset>
- <set>(|(ou=*$*)(dc=*$*)(c=*$*)(l=*$*))</set>
- <alphabet>false</alphabet>
- <autocomplete>
- <backend>BaseSelect</backend>
- <filter>(&(objectClass=gosaDepartment)(|(ou=*$NAME*)(dc=*$NAME*)(l=*$NAME*)(c=*$NAME*)))</filter>
- <attribute>cn</attribute>
- <attribute>dc</attribute>
- <attribute>c</attribute>
- <attribute>l</attribute>
- <frequency>0.5</frequency>
- <characters>3</characters>
- </autocomplete>
- </element>
-
-</filterdef>
diff --git a/gosa-core/ihtml/themes/default/baseSelect-list.tpl b/gosa-core/ihtml/themes/default/baseSelect-list.tpl
+++ /dev/null
@@ -1,30 +0,0 @@
-<input type='image' src='images/empty.png' name='no_action_posted' value='do_nothing' alt='' style='width:2px;height:2px;'>
-
-<table summary="" style="width:100%; vertical-align:top; text-align:left;" cellpadding=2>
- <tr>
- <td style="vertical-align:top; width:50%;">
- <div class="contentboxh">
- <p class="contentboxh"> {$HEADLINE} {$SIZELIMIT}</p>
- </div>
-
- <div class="contentboxb">
- <div style='background:white;padding:3px;'>
- <table><tr>
- <td>{$ROOT} </td><td>{$BACK} </td><td>{$HOME} </td><td>{$RELOAD} </td><td>{$SEPARATOR} </td><td>{t}Base{/t} {$BASE} </td><td>{$SEPARATOR} </td><td><img src='images/rocket.png' alt='' class='center'></td><td> {$ACTIONS}</td>
- </tr></table>
- </div>
- </div>
-
- <div style='height:4px;'>
- </div>
-
- <input type="hidden" id="d_save" value="450">
- {$LIST}
- </td>
- <td style='vertical-align:top'>
- {$FILTER}
- </td>
- </tr>
-</table>
-
-<input type="hidden" name="ignore">
diff --git a/gosa-core/ihtml/themes/default/baseSelect-list.xml b/gosa-core/ihtml/themes/default/baseSelect-list.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<list>
- <definition>
- <departmentBrowser>false</departmentBrowser>
- <departmentRootVisible>false</departmentRootVisible>
- <baseMode>true</baseMode>
- <multiSelect>true</multiSelect>
- <template>baseSelect-list.tpl</template>
- <module>departments</module>
- <label>List of departments</label>
- <defaultSortColumn>1</defaultSortColumn>
-
- <objectType>
- <label>Domain</label>
- <objectClass>domain</objectClass>
- <category>department</category>
- <class>domain</class>
- <image>plugins/departments/images/domain.png</image>
- </objectType>
-
- <objectType>
- <label>Domain component</label>
- <objectClass>dcObject</objectClass>
- <category>department</category>
- <class>dcObject</class>
- <image>plugins/departments/images/dc.png</image>
- </objectType>
-
- <objectType>
- <label>Country</label>
- <objectClass>country</objectClass>
- <category>department</category>
- <class>country</class>
- <image>plugins/departments/images/country.png</image>
- </objectType>
-
- <objectType>
- <label>Locality</label>
- <objectClass>locality</objectClass>
- <category>department</category>
- <class>locality</class>
- <image>plugins/departments/images/locality.png</image>
- </objectType>
-
- <objectType>
- <label>Organization</label>
- <objectClass>department</objectClass>
- <category>department</category>
- <class>organization</class>
- <image>plugins/departments/images/organization.png</image>
- </objectType>
-
- <objectType>
- <label>Department</label>
- <objectClass>organizationalUnit</objectClass>
- <category>department</category>
- <class>department</class>
- <image>images/lists/folder.png</image>
- </objectType>
- </definition>
-
- <table>
- <layout>|20px|||70px;r|</layout>
-
- <column>
- <value>%{filter:objectType(dn,objectClass)}</value>
- </column>
-
- <column>
- <label>Department</label>
- <sortAttribute>ou</sortAttribute>
- <sortType>string</sortType>
- <value>%{filter:depLabel(row,dn,"%s",ou,pid,base)}</value>
- <export>true</export>
- </column>
-
- <column>
- <label>Description</label>
- <sortAttribute>description</sortAttribute>
- <sortType>string</sortType>
- <value>%{filter:depLabel(row,dn,"%s",description,pid,base)}</value>
- <export>true</export>
- </column>
-
- <column>
- <label>Actions</label>
- <value>%{filter:actions(dn,row,objectClass)}</value>
- </column>
-
- </table>
-
- <actionmenu>
-
- </actionmenu>
-
- <actiontriggers snapshot="false" copypaste="false">
-
- <action>
- <name>edit</name>
- <type>entry</type>
- <nospan></nospan>
- <image>images/empty.png</image>
- <label>Edit</label>
- </action>
- <action>
- <name>edit</name>
- <type>entry</type>
- <nospan></nospan>
- <image>images/lists/edit.png</image>
- <label>Edit</label>
- </action>
-
- </actiontriggers>
-
-</list>
diff --git a/gosa-core/include/class_baseSelectDialog.inc b/gosa-core/include/class_baseSelectDialog.inc
+++ /dev/null
@@ -1,157 +0,0 @@
-<?php
-/*
- * This code is part of GOsa (http://www.gosa-project.org)
- * Copyright (C) 2003-2008 GONICUS GmbH
- *
- * ID: $$Id$$
- *
- * This program 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.
- *
- * This program 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 this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-class baseSelectDialog extends management
-{
- // The plugin description
- public $plugname = "Base";
- public $plIcon = "plugins/departments/images/plugin.png";
- public $plDescription = "Choose a base";
- public $plHeadline = "Base";
-
- protected $skipHeader = TRUE;
- protected $allowedBases = array();
-
- // #FIXME - Updated plugins to use a function instead of the public class var.
- public $BaseToUse = "";
- public $dialogClose = FALSE;
-
- function __construct (&$config,$parent,$onlyAllowThisBases = array())
- {
- $this->config = $config;
- $this->ui = get_userinfo();
- $this->allowedBases = $onlyAllowThisBases;
- session::set('filterBaseSelect_WhiteList', $this->allowedBases);
-
-# // Build filter
-# if (session::global_is_set(get_class($this)."_filter")){
-# $filter= session::global_get(get_class($this)."_filter");
-# } else {
- $filter = new filter(get_template_path("baseSelect-filter.xml"));
-# }
- $this->setFilter($filter);
-
- // Build headpage
- $headpage = new listing(get_template_path("baseSelect-list.xml"));
- $headpage->registerElementFilter("depLabel", "baseSelectDialog::filterDepLabel");
- $headpage->setFilter($filter);
- $this->registerAction("open","openEntry");
- $this->registerAction("cancelBaseSelect","cancelBaseSelect");
- parent::__construct($config, $this->ui, "departments", $headpage);
- }
-
-
- // An action handler which enables to switch into deparmtment by clicking the names.
- function openEntry($action,$entry)
- {
- $headpage = $this->getHeadpage();
- $headpage->setBase(array_pop($entry));
- }
-
- function execute()
- {
- $str = management::execute();
- $str.= "<p class='separator'> </p>
- <p style=\"text-align:right\">
- <input type=submit name=\"cancelBaseSelect\" value=\"".msgPool::cancelButton()."\">
- </p>";
- return($str);
- }
-
-
- // A filter which allows to open a department by clicking on the departments name.
- static function filterDepLabel($row,$dn,$params,$ou,$pid,$base)
- {
- $ou = $ou[0];
- if($dn == $base){
- $ou =".";
- }
- $dn= LDAP::fix(func_get_arg(1));
- return("<a href='?plug=".$_GET['plug']."&PID=$pid&act=listing_open_$row' title='$dn'>$ou</a>");
- }
-
-
- function editEntry($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="")
- {
- if(count($target) == 1){
- $this->BaseToUse = array_pop($target);
- }
- }
-
- function save_object()
- {
- // Damn ... , we've to call post detection manually & thus twice ...
- // #FIXME - We should fix the class handling in the plugins to match the class_management style.
- // - save_object isn't needed anymore, just call execute...
- $this->handleActions($this->detectPostActions());
- }
-
-
- function isClosed()
- {
- return($this->dialogClose);
- }
-
- function isSelected()
- {
- return($this->BaseToUse);
- }
-
- function setCurrentBase($base)
- {
- $headpage = $this->getHeadpage();
- $headpage->setBase = $base;
- }
-
- function cancelBaseSelect()
- {
- $this->dialogClose = TRUE;
- }
-
- function detectPostActions()
- {
- $action = management::detectPostActions();
- if(isset($_POST['cancelBaseSelect'])) $action['action'] = "cancelBaseSelect";
- return($action);
- }
-}
-
-class filterBaseSelect extends filterLDAP
-{
- static function query($base, $scope, $filter, $attributes, $category, $objectStorage= "")
- {
- $res= filterLDAP::query($base, $scope, $filter, $attributes, $category, $objectStorage);
- return(filterBaseSelect::filterEntries($res));
- }
-
- static function filterEntries($res)
- {
- if(!session::is_set('filterBaseSelect_WhiteList')) return $res;
- $list = session::get('filterBaseSelect_WhiteList');
- foreach($res as $key => $entry){
- if(!isset($list[$entry['dn']])) unset($res[$key]);
- }
- return(array_values($res));
- }
-}
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
index 81951f440061b17588d81381e0cd5cffdf114db1..a766a4106d9c4c09feb94bf23084bbc67b26f755 100644 (file)
$link= "onclick=\"\$('bs_rebase_".$this->pid."').value='".base64_encode($config->current['BASE'])."'; $('submit_tree_base_".$this->pid."').click();\"";
$this->tree= "<input type='text' size='35' name='bs_input_".$this->pid."' id='bs_input_".$this->pid."' onkeydown=\"\$('bs_".$this->pid."').hide()\" onfocus=\"\$('bs_".$this->pid."').hide()\" onmouseover=\"Element.clonePosition(\$('bs_".$this->pid."'), 'bs_input_".$this->pid."', {setHeight: false, setWidth: false, offsetTop:(Element.getHeight('bs_input_".$this->pid."'))});\$('bs_".$this->pid."').show();\" onmouseout=\"rtimer= Element.hide.delay(0.25, 'bs_".$this->pid."')\" value=\"".preg_replace('/"/', '"',$this->pathMapping[$this->base])."\">";
-
// Autocompleter
$this->tree.= "<div id='autocomplete_".$this->pid."' class='autocomplete'></div>".
"<script type='text/javascript'>".
index 8e5f104c90a413fc618ff76046d457532f28d739..d1a2d3d1361be8ef52ab2c5f1ca849811a8a9329 100644 (file)
$height= $this->height;
}
- $result.= "<table cellpadding='0' cellspacing='0' border='0'><tr><td><div class='listContainer' id='d_scrollbody' style='border-top:1px solid #B0B0B0;border-right:1px solid #B0B0B0;width:700px;min-height:".($height+25)."px;'>\n";
-
- $height= "";
- if ($switch){
- $height= "height:100%;";
- }
- $result.= "<table summary='$this->headline' style='${height}width:100%; table-layout:fixed;' cellspacing='0' cellpadding='0' id='t_scrolltable'>\n";
+ $result.= "<div class='listContainer' id='d_scrollbody' style='border-top:1px solid #B0B0B0;border-right:1px solid #B0B0B0;width:100%;min-height:".($height+25)."px;'>\n";
+ $result.= "<table summary='$this->headline' style='width:100%; table-layout:fixed' cellspacing='0' cellpadding='0' id='t_scrolltable'>\n";
$this->numColumns= count($this->colprops) + ($this->multiSelect?1:0);
// Build list header
}
// Close list body
- $result.= "</tbody></table></div></td></tr>";
+ $result.= "</tbody></table></div>";
// Add the footer if requested
if ($this->showFooter) {
- $result.= "<tr><td class='nlistFooter'>";
+ $result.= "<div class='nlistFooter'><div style='padding:3px'>";
foreach ($this->objectTypes as $objectType) {
if (isset($this->objectTypeCount[$objectType['label']])) {
}
}
- $result.= "</td></tr>";
+ $result.= "</div></div>";
}
// Close list
- $result.= "</table>";
$result.= $switch?"<input type='hidden' id='list_workaround'>":"";
// Add scroll positioner
diff --git a/gosa-core/plugins/admin/users/user-list.tpl b/gosa-core/plugins/admin/users/user-list.tpl
index f3bba3f7a5439a4ad019c767e12df62df7d44c33..d228d32a2233cc8275841e6bbde748913bf75556 100644 (file)
<input type='image' src='images/empty.png' name='no_action_posted' value='do_nothing' alt='' style='width:2px;height:2px;'>
-<table summary="" style="width:100%; vertical-align:top; text-align:left;" cellpadding=2>
+<table summary="" border="0" style="width:100%;height:100%; vertical-align:top; text-align:left;" cellpadding=2>
<tr>
- <td style="vertical-align:top; width:50%;">
+ <td style="vertical-align:top;height:100%">
<div class="contentboxh">
<p class="contentboxh"> {$HEADLINE} {$SIZELIMIT}</p>
</div>
<div class="contentboxb">
- <div style='background:white;padding:3px;'>
+ <div style='background:white;padding:3px'>
<table><tr>
<td>{$ROOT} </td><td>{$BACK} </td><td>{$HOME} </td><td>{$RELOAD} </td><td>{$SEPARATOR} </td><td>{t}Base{/t} {$BASE} </td><td>{$SEPARATOR} </td><td><img src='images/rocket.png' alt='' class='center'></td><td> {$ACTIONS}</td>
</tr></table>
<div style='height:4px;'>
</div>
-
- <input type="hidden" id="d_save" value="450">
- <input type="hidden" id="d_space" value="760">
{$LIST}
</td>
- <td style='vertical-align:top'>
+ <td style='vertical-align:top;min-width:200px;max-width:220px'>
{$FILTER}
</td>
</tr>