commit a6c6de24077c0b6d4bcb03a04e2a7140313ec0c3
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2016-05-09T07:49:02Z |
| subject | Merge ArticleContent & ArticleReference together |
commit a6c6de24077c0b6d4bcb03a04e2a7140313ec0c3
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2016-05-09T07:49:02Z
Merge ArticleContent & ArticleReference together
---
.../SmartInput/CandidateAction/ArticleContent.js | 25 ----------------------
.../SmartInput/CandidateAction/ArticleReference.js | 18 ++++++++++++++++
2 files changed, 18 insertions(+), 25 deletions(-)
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 );
})();