Gusets Comment Reply impl

This commit is contained in:
2016-10-25 19:31:01 +08:00
parent fa50c2e90a
commit 8ef1df3c94
5 changed files with 76 additions and 8 deletions

View File

@@ -0,0 +1,14 @@
.ban-btn { color: red; }
.subs-type { margin: 1em; }
.subs-item {
position: relative;
margin: .5em 2.5em .5em .5em;
border-left: 0.5em solid royalblue;
background-color: white;
}
.subs-item > p a {
color: orangered;
margin: 0.5em;
}

View File

@@ -0,0 +1,35 @@
(function(){
var ns = __namespace( "Astro.Blog.Layout.Subs.Manage" );
/** @type {Components.MessageBox} */
var MessageBox = __import( "Components.MessageBox" );
/** @type {Dandelion} */
var Dand = __import( "Dandelion" );
/** @type {Astro.Bootstrap} */
var Bootstrap = __import( "Astro.Bootstrap" );
/** @type {Dandelion.IDOMElement} */
var IDOMElement = __import( "Dandelion.IDOMElement" );
var init = function ()
{
/** @type {Dandelion.IDOMElement} */
var banbtn = Dand.id( "action-ban", true );
if( banbtn )
{
banbtn.addEventListener( "Click", function( e ) {
e.preventDefault();
var msgBox = new MessageBox(
"Ban this address"
, "This action cannot be undone, confirm?"
, "Yes", "No"
, function( _confirm ) {
if( !_confirm ) return;
window.location = banbtn.getDAttribute( "href" );
} ).show();
} );
}
};
Bootstrap.regInit( init );
})();

View File

@@ -0,0 +1,3 @@
(function(){
var ns = __namespace( "Astro.Blog.Layout.Subs" );
})();