[wp-cvs] wordpress/wp-admin admin-header.php, 1.35,
1.36 link-manager.php, 1.40, 1.41
Matthew Mullenweg
saxmatt at users.sourceforge.net
Mon Nov 15 20:52:37 UTC 2004
- Previous message: [wp-cvs]
wordpress wp-comments-popup.php, 1.17, 1.18 wp-comments.php,
1.26, 1.27
- Next message: [wp-cvs] wordpress/wp-admin page-new.php, NONE,
1.1 edit-page-form.php, 1.8, 1.9 edit-pages.php, 1.6,
1.7 menu.php, 1.30, 1.31 post.php, 1.107, 1.108
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/cafelog/wordpress/wp-admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25051/wp-admin
Modified Files:
admin-header.php link-manager.php
Log Message:
Final XFN 1.1 fixes
Index: link-manager.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/link-manager.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** link-manager.php 19 Oct 2004 03:03:04 -0000 1.40
--- link-manager.php 15 Nov 2004 20:52:34 -0000 1.41
***************
*** 10,21 ****
function xfn_check($class, $value = '', $type = 'check') {
global $link_rel;
! if ('' != $value && strstr($link_rel, $value)) {
echo ' checked="checked"';
}
if ('' == $value) {
if ('family' == $class && !strstr($link_rel, 'child') && !strstr($link_rel, 'parent') && !strstr($link_rel, 'sibling') && !strstr($link_rel, 'spouse') && !strstr($link_rel, 'kin')) echo ' checked="checked"';
if ('friendship' == $class && !strstr($link_rel, 'friend') && !strstr($link_rel, 'acquaintance') && !strstr($link_rel, 'contact') ) echo ' checked="checked"';
if ('geographical' == $class && !strstr($link_rel, 'co-resident') && !strstr($link_rel, 'neighbor') ) echo ' checked="checked"';
! if ('identity' == $class && !strstr($link_rel, 'me') ) echo ' checked="checked"';
}
}
--- 10,24 ----
function xfn_check($class, $value = '', $type = 'check') {
global $link_rel;
! $rels = preg_split('/\s+/', $link_rel);
!
! if ('' != $value && in_array($value, $rels) ) {
echo ' checked="checked"';
}
+
if ('' == $value) {
if ('family' == $class && !strstr($link_rel, 'child') && !strstr($link_rel, 'parent') && !strstr($link_rel, 'sibling') && !strstr($link_rel, 'spouse') && !strstr($link_rel, 'kin')) echo ' checked="checked"';
if ('friendship' == $class && !strstr($link_rel, 'friend') && !strstr($link_rel, 'acquaintance') && !strstr($link_rel, 'contact') ) echo ' checked="checked"';
if ('geographical' == $class && !strstr($link_rel, 'co-resident') && !strstr($link_rel, 'neighbor') ) echo ' checked="checked"';
! if ('identity' == $class && in_array('me', $rels) ) echo ' checked="checked"';
}
}
***************
*** 332,336 ****
<tr>
<th scope="row"><?php _e('<a href="http://gmpg.org/xfn/">XFN</a> Creator:') ?></th>
! <td><table cellpadding="3" cellspacing="5">
<tr>
<th scope="row"> <?php _e('friendship') ?> </th>
--- 335,348 ----
<tr>
<th scope="row"><?php _e('<a href="http://gmpg.org/xfn/">XFN</a> Creator:') ?></th>
! <td>
! <table cellpadding="3" cellspacing="5">
! <tr>
! <th scope="row"> <?php _e('identity') ?> </th>
! <td>
! <label for="me">
! <input type="checkbox" name="identity" value="me" id="me" <?php xfn_check('identity', 'me'); ?> />
! <?php _e('another web address of mine') ?></label>
! </td>
! </tr>
<tr>
<th scope="row"> <?php _e('friendship') ?> </th>
***************
*** 419,431 ****
</td>
</tr>
! <tr>
! <th scope="row"> <?php _e('identity') ?> </th>
! <td>
! <label for="label60">
! <input class="valinp" type="checkbox" name="identity" value="me" id="label60" <?php xfn_check('identity', 'me'); ?> />
! <?php _e('me') ?></label>
! </td>
! </tr>
! </table></td>
</tr>
</table>
--- 431,436 ----
</td>
</tr>
! </table>
! </td>
</tr>
</table>
Index: admin-header.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/admin-header.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** admin-header.php 28 Oct 2004 04:03:56 -0000 1.35
--- admin-header.php 15 Nov 2004 20:52:34 -0000 1.36
***************
*** 9,63 ****
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" />
! <?php if (isset($xfn)) : ?>
<script type="text/javascript">
//<![CDATA[
-
function GetElementsWithClassName(elementName, className) {
var allElements = document.getElementsByTagName(elementName);
var elemColl = new Array();
for (i = 0; i < allElements.length; i++) {
! if (allElements[i].className == className) {
! elemColl[elemColl.length] = allElements[i];
! }
}
return elemColl;
}
function blurry() {
if (!document.getElementById) return;
!
var aInputs = document.getElementsByTagName('input');
!
! for (var i = 0; i < aInputs.length; i++) {
! aInputs[i].onclick = function() {
! var inputColl = GetElementsWithClassName('input','valinp');
! var rel = document.getElementById('rel');
! var inputs = '';
! for (i = 0; i < inputColl.length; i++) {
! if (inputColl[i].checked) {
! if (inputColl[i].value != '') inputs += inputColl[i].value + ' ';
! }
! }
! inputs = inputs.substr(0,inputs.length - 1);
! if (rel != null) {
! rel.value = inputs;
! }
! }
!
! aInputs[i].onkeyup = function() {
! var inputColl = GetElementsWithClassName('input','valinp');
! var rel = document.getElementById('rel');
! var inputs = '';
! for (i = 0; i < inputColl.length; i++) {
! if (inputColl[i].checked) {
! inputs += inputColl[i].value + ' ';
! }
! }
! inputs = inputs.substr(0,inputs.length - 1);
! if (rel != null) {
! rel.value = inputs;
! }
! }
!
}
}
--- 9,57 ----
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" />
! <?php if ( isset($xfn) ) : ?>
<script type="text/javascript">
//<![CDATA[
function GetElementsWithClassName(elementName, className) {
var allElements = document.getElementsByTagName(elementName);
var elemColl = new Array();
for (i = 0; i < allElements.length; i++) {
! if (allElements[i].className == className) {
! elemColl[elemColl.length] = allElements[i];
! }
}
return elemColl;
}
+ function meChecked() {
+ var undefined;
+ var eMe = document.getElementById('me');
+ if (eMe == undefined) return false;
+ else return eMe.checked;
+ }
+
+ function upit() {
+ var isMe = meChecked(); //document.getElementById('me').checked;
+ var inputColl = GetElementsWithClassName('input', 'valinp');
+ var results = document.getElementById('rel');
+ var linkText, linkUrl, inputs = '';
+ for (i = 0; i < inputColl.length; i++) {
+ inputColl[i].disabled = isMe;
+ inputColl[i].parentNode.className = isMe ? 'disabled' : '';
+ if (!isMe && inputColl[i].checked && inputColl[i].value != '') {
+ inputs += inputColl[i].value + ' ';
+ }
+ }
+ inputs = inputs.substr(0,inputs.length - 1);
+ if (isMe) inputs='me';
+ results.value = inputs;
+ }
+
function blurry() {
if (!document.getElementById) return;
!
var aInputs = document.getElementsByTagName('input');
!
! for (var i = 0; i < aInputs.length; i++) {
! aInputs[i].onclick = aInputs[i].onkeyup = upit;
}
}
- Previous message: [wp-cvs]
wordpress wp-comments-popup.php, 1.17, 1.18 wp-comments.php,
1.26, 1.27
- Next message: [wp-cvs] wordpress/wp-admin page-new.php, NONE,
1.1 edit-page-form.php, 1.8, 1.9 edit-pages.php, 1.6,
1.7 menu.php, 1.30, 1.31 post.php, 1.107, 1.108
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cvs
mailing list