From a6c6de24077c0b6d4bcb03a04e2a7140313ec0c3 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: Mon, 9 May 2016 15:49:02 +0800 Subject: [PATCH] Merge ArticleContent & ArticleReference together --- .../CandidateAction/ArticleContent.js | 25 ------------------- .../CandidateAction/ArticleReference.js | 18 +++++++++++++ 2 files changed, 18 insertions(+), 25 deletions(-) delete mode 100644 botanjs/src/Astro/Blog/AstroEdit/SmartInput/CandidateAction/ArticleContent.js diff --git a/botanjs/src/Astro/Blog/AstroEdit/SmartInput/CandidateAction/ArticleContent.js b/botanjs/src/Astro/Blog/AstroEdit/SmartInput/CandidateAction/ArticleContent.js deleted file mode 100644 index 4b2606f..0000000 --- a/botanjs/src/Astro/Blog/AstroEdit/SmartInput/CandidateAction/ArticleContent.js +++ /dev/null @@ -1,25 +0,0 @@ -(function () -{ - var ns = __namespace( "Astro.Blog.AstroEdit.SmartInput.CandidateAction" ); - - var ArticleRefs = ns[ NS_INVOKE ]( "ArticleReference" ); - - /** @type {Astro.Blog.AstroEdit.SmartInput.ICandidateAction} */ - var ArticleContent = function ( visualizer, key ) - { - ArticleRefs.call( this, visualizer, key ); - }; - - __extends( ArticleContent, ArticleRefs ); - - ArticleContent.prototype.Process = function( key ) - { - var cand = this.__cands[ key ]; - if( !cand ) return false; - - this.visualizer.insertSnippet( "articlecontent", { value: cand.id } ); - return true; - }; - - ns[ NS_EXPORT ]( EX_CLASS, "ArticleContent", ArticleContent ); -})(); diff --git a/botanjs/src/Astro/Blog/AstroEdit/SmartInput/CandidateAction/ArticleReference.js b/botanjs/src/Astro/Blog/AstroEdit/SmartInput/CandidateAction/ArticleReference.js index cf9a22d..7790d42 100644 --- a/botanjs/src/Astro/Blog/AstroEdit/SmartInput/CandidateAction/ArticleReference.js +++ b/botanjs/src/Astro/Blog/AstroEdit/SmartInput/CandidateAction/ArticleReference.js @@ -49,5 +49,23 @@ return sender.value == "" && e.keyCode == 8; // Backspace }; + /** @type {Astro.Blog.AstroEdit.SmartInput.ICandidateAction} */ + var ArticleContent = function ( visualizer, key ) + { + ArticleRefs.call( this, visualizer, key ); + }; + + __extends( ArticleContent, ArticleRefs ); + + ArticleContent.prototype.Process = function( key ) + { + var cand = this.__cands[ key ]; + if( !cand ) return false; + + this.visualizer.insertSnippet( "articlecontent", { value: cand.id } ); + return true; + }; + + ns[ NS_EXPORT ]( EX_CLASS, "ArticleContent", ArticleContent ); ns[ NS_EXPORT ]( EX_CLASS, "ArticleReference", ArticleRefs ); })();