Mglaser has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365507 )

Change subject: BlueSpiceCategoryManager: removed link from treepanel and added 
it to action column.
......................................................................

BlueSpiceCategoryManager: removed link from treepanel and added it to action 
column.

Drag'n'drop didn't work an the link in tree panel.

Added loader gif

Fixed an issue from ERM#6654

Change-Id: Ia8d3f4d874d0d6667687d587adeaf5ba9dcf0d4a
---
M extension.json
M i18n/de.json
M i18n/en.json
M i18n/qqq.json
M includes/specials/SpecialBlueSpiceCategoryManager.php
M resources/BS.BlueSpiceCategoryManager/Model.js
M resources/BS.BlueSpiceCategoryManager/TreePanel.js
M resources/bluespice.categorymanager.css
8 files changed, 27 insertions(+), 11 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceCategoryManager 
refs/changes/07/365507/1

diff --git a/extension.json b/extension.json
index a76e1bd..96dfc4f 100644
--- a/extension.json
+++ b/extension.json
@@ -50,7 +50,8 @@
                                "bs-categorymanager-dlg-new-title",
                                "bs-categorymanager-removecategoryconfirm-text",
                                
"bs-categorymanager-removecategoryconfirm-title",
-                               
"bs-categorymanager-addcategory-dialog-error-title"
+                               
"bs-categorymanager-addcategory-dialog-error-title",
+                               "bs-categorymanager-action-show-category"
                        ]
                }
        },
diff --git a/i18n/de.json b/i18n/de.json
index a969496..998ab6a 100644
--- a/i18n/de.json
+++ b/i18n/de.json
@@ -15,5 +15,6 @@
        "bs-categorymanager-dlg-new-prompt": "Bitte gib den Namen ein:",
        "bs-categorymanager-removecategoryconfirm-text": "Bist du sicher, dass 
du diese Kategorie löschen willst?",
        "bs-categorymanager-removecategoryconfirm-title": "Kategorie löschen",
-       "bs-categorymanager-addcategory-dialog-error-title": "Die Erstellung 
der Kategorie ist fehlgeschlagen"
+       "bs-categorymanager-addcategory-dialog-error-title": "Die Erstellung 
der Kategorie ist fehlgeschlagen",
+       "bs-categorymanager-action-show-category": "Kategorie anzeigen"
 }
diff --git a/i18n/en.json b/i18n/en.json
index 8c9d5f5..db117e6 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -14,5 +14,6 @@
        "bs-categorymanager-dlg-new-prompt": "Please enter the name:",
        "bs-categorymanager-removecategoryconfirm-text": "Are you sure you want 
to delete this category?",
        "bs-categorymanager-removecategoryconfirm-title": "Remove category",
-       "bs-categorymanager-addcategory-dialog-error-title": "Creation of 
category failed"
+       "bs-categorymanager-addcategory-dialog-error-title": "Creation of 
category failed",
+       "bs-categorymanager-action-show-category": "Show category"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 3c87b73..b05ecec 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -15,5 +15,6 @@
        "bs-categorymanager-dlg-new-prompt": "Label of the input field for the 
new category name",
        "bs-categorymanager-removecategoryconfirm-text": "Prompt message in 
case a user tries to delete a category",
        "bs-categorymanager-removecategoryconfirm-title": "Title of the prompt 
that is shown to the user before a category gets deleted",
-       "bs-categorymanager-addcategory-dialog-error-title": "Title of the 
error dialog if something went wrong at new categorie"
+       "bs-categorymanager-addcategory-dialog-error-title": "Title of the 
error dialog if something went wrong at new categorie",
+       "bs-categorymanager-action-show-category": "The action in the action 
column to open this category in a new tab/window."
 }
diff --git a/includes/specials/SpecialBlueSpiceCategoryManager.php 
b/includes/specials/SpecialBlueSpiceCategoryManager.php
index e7d11f8..99f5089 100644
--- a/includes/specials/SpecialBlueSpiceCategoryManager.php
+++ b/includes/specials/SpecialBlueSpiceCategoryManager.php
@@ -10,7 +10,7 @@
                parent::execute( $sParameter );
 
                $this->getOutput()->addModules("ext.bluespice.categorymanager");
-               $this->getOutput()->addHTML( '<div 
id="bs-categorymanager-grid"/></div>' );
+               $this->getOutput()->addHTML( '<div id="bs-categorymanager-grid" 
class="bs-manager-container"/></div>' );
 
                return true;
        }
diff --git a/resources/BS.BlueSpiceCategoryManager/Model.js 
b/resources/BS.BlueSpiceCategoryManager/Model.js
index 42a0a31..81a0c14 100644
--- a/resources/BS.BlueSpiceCategoryManager/Model.js
+++ b/resources/BS.BlueSpiceCategoryManager/Model.js
@@ -3,15 +3,18 @@
        fields: [
                {
                        name: 'text', type: 'string', convert: function ( 
value, record ) {
-                               return mw.html.element( 'a' , {
-                                       'href': mw.Title.makeTitle( 
bs.ns.NS_CATEGORY, record.raw.text ).getUrl(),
-                                       'class': (record.raw.leaf ? 
'bs-icon-tag' : 'bs-icon-tags' ),
-                                       'target': '_blank'
+                               return mw.html.element( 'span', {
+                                       'class': (record.raw.leaf ? 
'bs-icon-tag' : 'bs-icon-tags' )
                                },
                                value );
                        }
                },
                {
+                       name: 'link', type: 'string', convert: function ( 
value, record ) {
+                               return mw.Title.makeTitle( bs.ns.NS_CATEGORY, 
record.raw.text ).getUrl();
+                       }
+               },
+               {
                        name: 'categoryName', type: 'string', convert: function 
( value, record ) {
                                return record.raw.text;
                        }
diff --git a/resources/BS.BlueSpiceCategoryManager/TreePanel.js 
b/resources/BS.BlueSpiceCategoryManager/TreePanel.js
index 2ad4ef0..86b45f1 100644
--- a/resources/BS.BlueSpiceCategoryManager/TreePanel.js
+++ b/resources/BS.BlueSpiceCategoryManager/TreePanel.js
@@ -70,6 +70,15 @@
                                                handler: function() {
                                                        me.onBtnRemoveClick( 
me.btnRemove, null);
                                                }
+                                       },
+                                       {
+                                               tooltip: 
mw.message('bs-categorymanager-action-show-category').plain(),
+                                               iconCls: 
'bs-extjs-actioncolumn-icon bs-icon-eye',
+                                               dataIndex: 'link',
+                                               glyph: true,
+                                               handler: function( onject, 
index, col, object2, object3, store) {
+                                                       window.open( 
store.data.link, '_blank' );
+                                               }
                                        }
                                ],
                                menuDisabled: true,
diff --git a/resources/bluespice.categorymanager.css 
b/resources/bluespice.categorymanager.css
index 483b52a..21aaedf 100644
--- a/resources/bluespice.categorymanager.css
+++ b/resources/bluespice.categorymanager.css
@@ -9,14 +9,14 @@
        display: none;
 }
 
-#bs-categorymanager-grid .x-tree-node-text > a.bs-icon-tags:before {
+#bs-categorymanager-grid .x-tree-node-text > span.bs-icon-tags:before {
        content: "\f02c";
        font-family: "fontawesome" !important;
        color: #AFAFAF;
        padding-right: 0.5em;
 }
 
-#bs-categorymanager-grid .x-tree-node-text > a.bs-icon-tag::before {
+#bs-categorymanager-grid .x-tree-node-text > span.bs-icon-tag::before {
        color: #AFAFAF;
        padding-right: 0.5em;
 }
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/365507
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia8d3f4d874d0d6667687d587adeaf5ba9dcf0d4a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceCategoryManager
Gerrit-Branch: REL1_27
Gerrit-Owner: Mglaser <[email protected]>
Gerrit-Reviewer: Nasty <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to