Index: branches/unlabeled/unlabeled-1.64.2/kernel/units/general/cat_event_handler.php
===================================================================
diff -u -r5590 -r5602
--- branches/unlabeled/unlabeled-1.64.2/kernel/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 5590)
+++ branches/unlabeled/unlabeled-1.64.2/kernel/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 5602)
@@ -56,19 +56,18 @@
$this->Application->StoreVar($event->getPrefixSpecial().'_clipboard', implode(',', $ids));
$this->Application->StoreVar($event->getPrefixSpecial().'_clipboard_mode', 'copy');
- $this->Application->StoreVar('ClipBoard', 'COPY-0.'.$object->TableName.'.ResourceId=0');
+// $this->Application->StoreVar('ClipBoard', 'COPY-0.'.$object->TableName.'.ResourceId=0');
$event->redirect_params = Array('opener' => 's', 'pass_events'=>true); //do not go up - STAY
}
-
+
function OnCut(&$event)
{
$object = $event->getObject();
- $this->StoreSelectedIDs($event);
- $ids = $this->getSelectedIDs($event);
+ $ids = $this->StoreSelectedIDs($event);
$this->Application->StoreVar($event->getPrefixSpecial().'_clipboard', implode(',', $ids));
$this->Application->StoreVar($event->getPrefixSpecial().'_clipboard_mode', 'cut');
- $this->Application->StoreVar('ClipBoard', 'CUT-0.'.$object->TableName.'.ResourceId=0');
+// $this->Application->StoreVar('ClipBoard', 'CUT-0.'.$object->TableName.'.ResourceId=0');
$event->redirect_params = Array('opener' => 's', 'pass_events'=>true); //do not go up - STAY
}
Index: branches/unlabeled/unlabeled-1.28.2/kernel/units/categories/categories_tag_processor.php
===================================================================
diff -u -r5327 -r5602
--- branches/unlabeled/unlabeled-1.28.2/kernel/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 5327)
+++ branches/unlabeled/unlabeled-1.28.2/kernel/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 5602)
@@ -410,6 +410,17 @@
}
return ;
}
+
+ /**
+ * Allows to detect if this prefix has something in clipboard
+ *
+ * @param Array $params
+ * @return bool
+ */
+ function PasteEnabled($params)
+ {
+ return $this->Application->RecallVar($this->getPrefixSpecial().'_clipboard') ? 1 : 0;
+ }
}
Index: branches/unlabeled/unlabeled-1.15.2/kernel/admin_templates/xml/categories_list.tpl
===================================================================
diff -u -r5497 -r5602
--- branches/unlabeled/unlabeled-1.15.2/kernel/admin_templates/xml/categories_list.tpl (.../categories_list.tpl) (revision 5497)
+++ branches/unlabeled/unlabeled-1.15.2/kernel/admin_templates/xml/categories_list.tpl (.../categories_list.tpl) (revision 5602)
@@ -41,6 +41,7 @@
a_toolbar.EnableButton('upcat');
a_toolbar.EnableButton('homecat');
+$Catalog.reflectPasteButton();
#separator#
Index: branches/unlabeled/unlabeled-1.15.2/core/admin_templates/categories/xml/categories_list.tpl
===================================================================
diff -u -r5497 -r5602
--- branches/unlabeled/unlabeled-1.15.2/core/admin_templates/categories/xml/categories_list.tpl (.../categories_list.tpl) (revision 5497)
+++ branches/unlabeled/unlabeled-1.15.2/core/admin_templates/categories/xml/categories_list.tpl (.../categories_list.tpl) (revision 5602)
@@ -41,6 +41,7 @@
a_toolbar.EnableButton('upcat');
a_toolbar.EnableButton('homecat');
+$Catalog.reflectPasteButton();
#separator#
Index: branches/unlabeled/unlabeled-1.64.2/core/units/general/cat_event_handler.php
===================================================================
diff -u -r5590 -r5602
--- branches/unlabeled/unlabeled-1.64.2/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 5590)
+++ branches/unlabeled/unlabeled-1.64.2/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 5602)
@@ -56,19 +56,18 @@
$this->Application->StoreVar($event->getPrefixSpecial().'_clipboard', implode(',', $ids));
$this->Application->StoreVar($event->getPrefixSpecial().'_clipboard_mode', 'copy');
- $this->Application->StoreVar('ClipBoard', 'COPY-0.'.$object->TableName.'.ResourceId=0');
+// $this->Application->StoreVar('ClipBoard', 'COPY-0.'.$object->TableName.'.ResourceId=0');
$event->redirect_params = Array('opener' => 's', 'pass_events'=>true); //do not go up - STAY
}
-
+
function OnCut(&$event)
{
$object = $event->getObject();
- $this->StoreSelectedIDs($event);
- $ids = $this->getSelectedIDs($event);
+ $ids = $this->StoreSelectedIDs($event);
$this->Application->StoreVar($event->getPrefixSpecial().'_clipboard', implode(',', $ids));
$this->Application->StoreVar($event->getPrefixSpecial().'_clipboard_mode', 'cut');
- $this->Application->StoreVar('ClipBoard', 'CUT-0.'.$object->TableName.'.ResourceId=0');
+// $this->Application->StoreVar('ClipBoard', 'CUT-0.'.$object->TableName.'.ResourceId=0');
$event->redirect_params = Array('opener' => 's', 'pass_events'=>true); //do not go up - STAY
}
Index: branches/unlabeled/unlabeled-1.28.2/core/units/categories/categories_tag_processor.php
===================================================================
diff -u -r5327 -r5602
--- branches/unlabeled/unlabeled-1.28.2/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 5327)
+++ branches/unlabeled/unlabeled-1.28.2/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 5602)
@@ -410,6 +410,17 @@
}
return ;
}
+
+ /**
+ * Allows to detect if this prefix has something in clipboard
+ *
+ * @param Array $params
+ * @return bool
+ */
+ function PasteEnabled($params)
+ {
+ return $this->Application->RecallVar($this->getPrefixSpecial().'_clipboard') ? 1 : 0;
+ }
}
Index: branches/unlabeled/unlabeled-1.11.2/kernel/units/general/cat_tag_processor.php
===================================================================
diff -u -r5537 -r5602
--- branches/unlabeled/unlabeled-1.11.2/kernel/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 5537)
+++ branches/unlabeled/unlabeled-1.11.2/kernel/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 5602)
@@ -148,6 +148,17 @@
$review_tag_processor =& $this->Application->recallObject('rev.item_TagProcessor');
return $review_tag_processor->TotalRecords($params);
}
+
+ /**
+ * Allows to detect if this prefix has something in clipboard
+ *
+ * @param Array $params
+ * @return bool
+ */
+ function PasteEnabled($params)
+ {
+ return $this->Application->RecallVar($this->getPrefixSpecial().'_clipboard') ? 1 : 0;
+ }
}
Index: branches/unlabeled/unlabeled-1.11.2/core/units/general/cat_tag_processor.php
===================================================================
diff -u -r5537 -r5602
--- branches/unlabeled/unlabeled-1.11.2/core/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 5537)
+++ branches/unlabeled/unlabeled-1.11.2/core/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 5602)
@@ -148,6 +148,17 @@
$review_tag_processor =& $this->Application->recallObject('rev.item_TagProcessor');
return $review_tag_processor->TotalRecords($params);
}
+
+ /**
+ * Allows to detect if this prefix has something in clipboard
+ *
+ * @param Array $params
+ * @return bool
+ */
+ function PasteEnabled($params)
+ {
+ return $this->Application->RecallVar($this->getPrefixSpecial().'_clipboard') ? 1 : 0;
+ }
}
Index: branches/unlabeled/unlabeled-1.27.2/core/admin_templates/js/catalog.js
===================================================================
diff -u -r5528 -r5602
--- branches/unlabeled/unlabeled-1.27.2/core/admin_templates/js/catalog.js (.../catalog.js) (revision 5528)
+++ branches/unlabeled/unlabeled-1.27.2/core/admin_templates/js/catalog.js (.../catalog.js) (revision 5602)
@@ -6,7 +6,8 @@
this.URLMask = $url_mask;
this.Separator = '#separator#';
this.ParentCategoryID = 0;
-
+ this.EnablePaste = false;
+
this.TabRegistry = new Array();
this.ActivePrefix = getCookie(this.CookiePrefix + 'active_prefix');
this.PreviousPrefix = this.ActivePrefix;
@@ -261,4 +262,9 @@
Catalog.prototype.setViewMenu = function($item_prefix) {
$ViewMenus = isset($item_prefix) ? new Array('c', $item_prefix) : new Array('c');
+}
+
+Catalog.prototype.reflectPasteButton = function($clipboard_status) {
+ this.PasteEnabled = this.PasteEnabled || $clipboard_status;
+ a_toolbar.SetEnabled('paste', this.PasteEnabled);
}
\ No newline at end of file
Index: branches/unlabeled/unlabeled-1.27.2/kernel/admin_templates/incs/catalog.js
===================================================================
diff -u -r5528 -r5602
--- branches/unlabeled/unlabeled-1.27.2/kernel/admin_templates/incs/catalog.js (.../catalog.js) (revision 5528)
+++ branches/unlabeled/unlabeled-1.27.2/kernel/admin_templates/incs/catalog.js (.../catalog.js) (revision 5602)
@@ -6,7 +6,8 @@
this.URLMask = $url_mask;
this.Separator = '#separator#';
this.ParentCategoryID = 0;
-
+ this.EnablePaste = false;
+
this.TabRegistry = new Array();
this.ActivePrefix = getCookie(this.CookiePrefix + 'active_prefix');
this.PreviousPrefix = this.ActivePrefix;
@@ -261,4 +262,9 @@
Catalog.prototype.setViewMenu = function($item_prefix) {
$ViewMenus = isset($item_prefix) ? new Array('c', $item_prefix) : new Array('c');
+}
+
+Catalog.prototype.reflectPasteButton = function($clipboard_status) {
+ this.PasteEnabled = this.PasteEnabled || $clipboard_status;
+ a_toolbar.SetEnabled('paste', this.PasteEnabled);
}
\ No newline at end of file