Fixed bug #17520: Pagetree - Locked records are not indicated anymore (Thanks to...
authorsteffenk <steffenk@709f56b5-9817-0410-a4d7-c38de5d9e867>
Wed, 23 Feb 2011 12:46:19 +0000 (12:46 +0000)
committersteffenk <steffenk@709f56b5-9817-0410-a4d7-c38de5d9e867>
Wed, 23 Feb 2011 12:46:19 +0000 (12:46 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@10590 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/js/extjs/components/pagetree/javascript/nodeui.js
t3lib/tree/pagetree/class.t3lib_tree_pagetree_commands.php
typo3/sysext/t3skin/stylesheets/structure/element_pagetree.css

index 3bb4020..7a576ac 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2011-02-23  Steffen Kamper  <steffen@typo3.org>
 
+       * Fixed bug #17520: Pagetree - Locked records are not indicated anymore (Thanks to Stefan Galinski)
        * Fixed bug #17702: Directly open "inline edit" of page title after creating a new page with drag and drop in the pagetree (Thanks to Stefan Galinski)
 
 2011-02-23  Ernesto Baschny  <ernst@cron-it.de>
index 1592d57..7499951 100644 (file)
@@ -136,10 +136,15 @@ TYPO3.Components.PageTree.PageTreeNodeUI = Ext.extend(Ext.tree.TreeNodeUI, {
         */
        getDDHandles: function() {
                var ddHandles = [this.iconNode, this.textNode, this.elNode];
+               var handlesIndex = ddHandles.length;
+               
                var textNode = Ext.get(this.textNode);
                for (var i = 0; i < textNode.dom.childNodes.length; ++i) {
                        if (textNode.dom.childNodes[i].nodeName === 'SPAN') {
-                               ddHandles[3] = textNode.dom.childNodes[i];
+                               ddHandles[handlesIndex++] = textNode.dom.childNodes[i];
+                               if (textNode.dom.childNodes[i].childNodes) {
+                                       ddHandles[handlesIndex++] = textNode.dom.childNodes[i].childNodes[0];
+                               }
                        }
                }
 
index c06ee74..b400767 100644 (file)
@@ -290,9 +290,6 @@ final class t3lib_tree_pagetree_Commands {
                $subNode->setCls($record['_CSSCLASS']);
                $subNode->setType('pages');
 
-               $qtip = t3lib_BEfunc::titleAttribForPages($record, '', FALSE);
-               $subNode->setQTip(str_replace(' - ', '<br />', htmlspecialchars($qtip)));
-
                $subNode->setId($record['uid']);
                $subNode->setMountPoint($mountPoint);
                $subNode->setWorkspaceId(($record['_ORIG_uid'] ? $record['_ORIG_uid'] : $record['uid']));
@@ -317,15 +314,33 @@ final class t3lib_tree_pagetree_Commands {
                        $suffix = ($domain !== '' ? ' [' . $domain . ']' : '');
                }
 
-               $prefix = ($addIdAsPrefix ? '[' . $record['uid'] . '] ' : '');
+               $qtip = str_replace(' - ', '<br />', htmlspecialchars(
+                       t3lib_BEfunc::titleAttribForPages($record, '', FALSE))
+               );
+
+               $prefix = '';
+               $lockInfo = t3lib_BEfunc::isRecordLocked('pages', $record['uid']);
+               if (is_array($lockInfo)) {
+                       $qtip .= '<br />' . htmlspecialchars($lockInfo['msg']);
+                       $prefix .= t3lib_iconWorks::getSpriteIcon(
+                               'status-warning-in-use',
+                               array(
+                                       'class' => 'typo3-pagetree-status'
+                               )
+                       );
+               }
+
+               $prefix .= htmlspecialchars($addIdAsPrefix ? '[' . $record['uid'] . '] ' : '');
                $subNode->setEditableText($text);
                $subNode->setText(
                        htmlspecialchars($visibleText),
                        $field,
-                       htmlspecialchars($prefix),
+                       $prefix,
                        htmlspecialchars($suffix)
                );
 
+               $subNode->setQTip($qtip);
+
                if ($record['uid'] !== 0) {
                        $spriteIconCode = t3lib_iconWorks::getSpriteIconForRecord('pages', $record);
                } else {
index 02682cd..6fb26b9 100644 (file)
@@ -45,6 +45,12 @@ $Id: $
        padding-top: 15px;
 }
 
+.x-tree-node a .typo3-pagetree-status,
+.x-dd-drag-ghost a .typo3-pagetree-status {
+       padding: 0;
+       margin: 0 3px 0 0;
+}
+
 /**
  *
  * section drag and drop