Simple css reference name needed
Posted:
Fri Sep 02, 2011 8:50 am
by rlevin
I want to expand the default input box a bit wider. I notice "input" in plone.css, but giving it a width parameter changes all fields such as the calendar widget input box. What id or class name should I be looking at to adjust the default input box for varchar type data?
Re: Simple css reference name needed
Posted:
Sun Sep 04, 2011 9:49 pm
by shannah
Ah.. This change has been made in SVN (so that cells now include a CSS class indicating the field type). Unfortunately the plan is to freeze features on 1.x. This will be released with 2.0 but there is still a long ways to go before that will be released. Here is the SVN log entry for this particular change:
- Code: Select all
r2217 | shannah | 2011-04-24 12:29:43 -0700 (Sun, 24 Apr 2011) | 16 lines
Added css classes to result list and related list to make it easier to target them.
This includes the following classes:
For result list <table> tag:
1. resultList
2. resultList--<tablename>
For result list <td> tag:
1. resultListCell--<fieldname>
2. resultListCell
For related list <table> tag:
1. relatedList
2. relatedList--<base table name>
3. relatedList--<base table name>--<relationship name>
For related list <td> tag:
1. resultListCell--<fieldname>
2. resultListCell
And the diff:
- Code: Select all
mini:~ shannah$ svn diff -r 2216:2217 http://weblite.ca/svn/dataface/core/trunk
Index: Dataface/ResultList.php
===================================================================
--- Dataface/ResultList.php (revision 2216)
+++ Dataface/ResultList.php (revision 2217)
@@ -236,7 +236,7 @@
<script>if ( typeof(xataface) == "undefined" ){xataface = {};} xataface.query = '.$sq.';</script>
<script>if ( typeof(jQuery)=="undefined") document.writeln("<"+"script src=\"'.DATAFACE_URL.'/js/jquery.packed.js\"><"+"/script>");</script>
<script src="'.DATAFACE_URL.'/js/list.js"></script>
- <table id="result_list" class="listing">
+ <table id="result_list" class="listing resultList resultList--'.$this->_tablename.'">
<thead>
<tr>';
if ( $canSelect){
@@ -346,11 +346,11 @@
$recordid = $record->getId();
echo "<tr class=\"listing $rowClass\">";
if ( $canSelect ) {
- echo '<td><input class="rowSelectorCheckbox" id="rowSelectorCheckbox:'.$record->getId().'" type="checkbox"></td>';
+ echo '<td class="checkbox-cell"><input class="rowSelectorCheckbox" id="rowSelectorCheckbox:'.$record->getId().'" type="checkbox"></td>';
}
if ( !@$app->prefs['disable_ajax_record_details'] ){
- echo '<td>';
+ echo '<td class="ajax-record-details-cell">';
echo '<script language="javascript" type="text/javascript"><!--
registerRecord(\''.addslashes($recordid).'\', '.$record->toJS(array()).');
//--></script>
@@ -400,7 +400,9 @@
if ( @$thisField['noEditInListView'] ) $editable_class='';
- echo "<td id=\"td-".rand()."\" class=\"$rowClass $editable_class\"> $val</td>";
+
+ $cellClass = 'resultListCell resultListCell--'.$key;
+ echo "<td id=\"td-".rand()."\" class=\"$cellClass $rowClass $editable_class\"> $val</td>";
unset($thisField);
}
}
Index: Dataface/RelatedList.php
===================================================================
--- Dataface/RelatedList.php (revision 2216)
+++ Dataface/RelatedList.php (revision 2217)
@@ -348,7 +348,7 @@
echo '<div style="display:none" id="related_find_wrapper"></div>';
if ( count($records) > 0 ){
echo '
- <table class="listing" id="relatedList">
+ <table class="listing relatedList relatedList--'.$this->_tablename.' relatedList--'.$this->_tablename.'--'.$this->_relationship_name.'" id="relatedList">
<thead>
<tr>';
@@ -536,11 +536,11 @@
$accessClass = '';
}
-
+ $cellClass = 'resultListCell resultListCell--'.$key;
$renderVal = $this->renderCell($srcRecord, $field['Field']);
if ( isset($renderVal) ) $val = $renderVal;
else if ( $link and !@$field['noLinkFromListView'] ) $val = "<a href=\"$link\" title=\"". htmlspecialchars($title)."\">".$val."</a>";
- echo "<td class=\"$rowClass $accessClass\">$val</td>\n";
+ echo "<td class=\"$cellClass $rowClass $accessClass\">$val</td>\n";
unset($srcRecord);
}
Re: Simple css reference name needed
Posted:
Sun Sep 04, 2011 9:50 pm
by shannah
Whoops... that was the wrong change. That was one that allows you to target columns by name - not type.... hold on.. I'll post the right change in a sec.