botanjs/src/Astro/Blog/Components/ToggleButton/CommentToggle.js
raw ยท 1746 bytes
(function(){
var ns = __namespace( "Astro.Blog.Components.ToggleButton.CommentToggle" );
var ToggleButton = __import( "Astro.Blog.Components.ToggleButton" );
/** @type {Dandelion} */
var Dand = __import( "Dandelion" );
/** @type {Dandelion.IDOMElement} */
var IDOMElement = __import( "Dandelion.IDOMElement" );
/** @type {Astro.Bootstrap} */
var Bootstrap = __import( "Astro.Bootstrap" );
/** @type {Astro.Blog.Config} */
var Conf = __import( "Astro.Blog.Config" );
/** @type {_AstConf_.CommentToggle} */
var settings = Conf.get( "CommentToggle" );
var CommentToggle = function( id, processor, object )
{
ToggleButton.call( this, id, processor, object );
};
__extends( CommentToggle, ToggleButton );
var init = function()
{
for( var i in settings )
{
var button = settings[i];
new CommentToggle( button[0], button[1], button[2] );
}
/*
new ToggleButton("toggle_follow", "/ajax/get-notis", {
"enable": { "action": "enable", "tid": 4, "cid": aid },
"disable": { "action": "disable", "tid": 4, "cid": aid }
});
*/
/*
new ToggleButton("uc_ntoggle", nProcessor, {
enable: { action: "enable", tid: 1, cid: 1645 },
disable: { action: "disable", tid: 1, cid: 1645 }
});
new ToggleButton("toggle_publish", "../../../user/ajax-set_article", {
enable: { draft: 0, article_id: 1645 },
disable: { draft: 1, article_id: 1645 }
});
for(var i in commList) {
new ToggleButton("cr_ntoggle_" + commList[i], nProcessor, {
enable: { action: "enable", tid: 2, cid: commList[i] },
disable: { action: "disable", tid: 2, cid: commList[i] }
});
*/
}
Bootstrap.regInit( init );
})();