From 33808fd46daccbf075ff886643731ec08bf86543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Fri, 21 Aug 2015 09:52:02 +0800 Subject: [PATCH] fix clicking the entire article for delete --- botanjs/src/Astro/Blog/Components/Notification.js | 2 +- .../src/Astro/Blog/Components/ToggleButton/DeleteArticle.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/botanjs/src/Astro/Blog/Components/Notification.js b/botanjs/src/Astro/Blog/Components/Notification.js index cdd69dd..e829485 100644 --- a/botanjs/src/Astro/Blog/Components/Notification.js +++ b/botanjs/src/Astro/Blog/Components/Notification.js @@ -227,7 +227,7 @@ contextMenu.getItemByKey("Settings").stage.className = "nt_icon_settings"; }; - postData( processor, { action: "get" }, createContextMenu ); + postData( processor, { "action": "get" }, createContextMenu ); }; Bootstrap.regInit( init ); diff --git a/botanjs/src/Astro/Blog/Components/ToggleButton/DeleteArticle.js b/botanjs/src/Astro/Blog/Components/ToggleButton/DeleteArticle.js index 384c4a9..47aae3c 100644 --- a/botanjs/src/Astro/Blog/Components/ToggleButton/DeleteArticle.js +++ b/botanjs/src/Astro/Blog/Components/ToggleButton/DeleteArticle.js @@ -14,8 +14,10 @@ var init = function() { - var stage = Dand.id( "b_entry", true ); - if( !stage ) return; + var stage = Dand.glass( "b_delete", true, Dand.id( "b_entry" ) ); + if( !stage.length ) return; + + stage = stage[0]; var doDelete = function( confirmed ) {