forked from Botanical/BotanJS
Gusets Comment Reply impl
This commit is contained in:
14
botanjs/src/Astro/Blog/Layout/Subs/Manage.css
Normal file
14
botanjs/src/Astro/Blog/Layout/Subs/Manage.css
Normal 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;
|
||||
}
|
35
botanjs/src/Astro/Blog/Layout/Subs/Manage.js
Normal file
35
botanjs/src/Astro/Blog/Layout/Subs/Manage.js
Normal 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 );
|
||||
})();
|
3
botanjs/src/Astro/Blog/Layout/Subs/_this.js
Normal file
3
botanjs/src/Astro/Blog/Layout/Subs/_this.js
Normal file
@@ -0,0 +1,3 @@
|
||||
(function(){
|
||||
var ns = __namespace( "Astro.Blog.Layout.Subs" );
|
||||
})();
|
Reference in New Issue
Block a user