forked from Botanical/BotanJS
Migrate old externs 7/x
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
var Cycle = __import( "System.Cycle" );
|
||||
/** @type {System.utils} */
|
||||
var utils = __import( "System.utils" );
|
||||
/** @type {System.utils.EventKey} */
|
||||
/** @type {typeof System.utils.EventKey} */
|
||||
var EventKey = __import( "System.utils.EventKey" );
|
||||
/** @type {System.Debug} */
|
||||
var debug = __import( "System.Debug" );
|
||||
@@ -13,7 +13,7 @@
|
||||
var MessageBox = __import( "Components.MessageBox" );
|
||||
/** @type {typeof Dandelion} */
|
||||
var Dand = __import( "Dandelion" );
|
||||
/** @type {Dandelion.IDOMObject} */
|
||||
/** @type {typeof Dandelion.IDOMObject} */
|
||||
var IDOMObject = __import( "Dandelion.IDOMObject" );
|
||||
/** @type {function(...?): Dandelion.IDOMElement} */
|
||||
var IDOMElement = __import( "Dandelion.IDOMElement" );
|
||||
|
||||
@@ -11,15 +11,15 @@
|
||||
var IKey = __import( "System.utils.IKey" );
|
||||
/** @type {typeof System.utils.DataKey} */
|
||||
var DataKey = __import( "System.utils.DataKey" );
|
||||
/** @type {System.utils.EventKey} */
|
||||
/** @type {typeof System.utils.EventKey} */
|
||||
var EventKey = __import( "System.utils.EventKey" );
|
||||
/** @type {typeof Components.MessageBox} */
|
||||
var MessageBox = __import( "Components.MessageBox" );
|
||||
/** @type {Components.Mouse.ContextMenu} */
|
||||
/** @type {typeof Components.Mouse.ContextMenu} */
|
||||
var ContextMenu = __import( "Components.Mouse.ContextMenu" );
|
||||
/** @type {typeof Dandelion} */
|
||||
var Dand = __import( "Dandelion" );
|
||||
/** @type {Dandelion.IDOMObject} */
|
||||
/** @type {typeof Dandelion.IDOMObject} */
|
||||
var IDOMObject = __import( "Dandelion.IDOMObject" );
|
||||
/** @type {function(...?): Dandelion.IDOMElement} */
|
||||
var IDOMElement = __import( "Dandelion.IDOMElement" );
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
var Dand = __import( "Dandelion" );
|
||||
/** @type {function(...?): Dandelion.IDOMElement} */
|
||||
var IDOMElement = __import( "Dandelion.IDOMElement" );
|
||||
/** @type {Dandelion.IDOMObject} */
|
||||
/** @type {typeof Dandelion.IDOMObject} */
|
||||
var IDOMObject = __import( "Dandelion.IDOMObject" );
|
||||
/** @type {System.Cycle} */
|
||||
var Cycle = __import( "System.Cycle" );
|
||||
@@ -515,7 +515,7 @@
|
||||
}
|
||||
};
|
||||
|
||||
IDOMObject( document ).addEventListener( "KeyDown", KeyHandler( document, BackQuoteBinding ), false );
|
||||
new IDOMObject( document ).addEventListener( "KeyDown", KeyHandler( document, BackQuoteBinding ), false );
|
||||
};
|
||||
|
||||
ns[ NS_EXPORT ]( EX_CLASS, "SmartInput", MasterInput );
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
var Cycle = __import( "System.Cycle" );
|
||||
/** @type {System.Debug} */
|
||||
var debug = __import( "System.Debug" );
|
||||
/** @type {System.utils.EventKey} */
|
||||
/** @type {typeof System.utils.EventKey} */
|
||||
var EventKey = __import( "System.utils.EventKey" );
|
||||
/** @type {Components.Mouse.ContextMenu} */
|
||||
/** @type {typeof Components.Mouse.ContextMenu} */
|
||||
var ContextMenu = __import( "Components.Mouse.ContextMenu" );
|
||||
/** @type {typeof Components.MessageBox} */
|
||||
var MessageBox = __import( "Components.MessageBox" );
|
||||
/** @type {typeof Dandelion} */
|
||||
var Dand = __import( "Dandelion" );
|
||||
/** @type {Dandelion.IDOMObject} */
|
||||
/** @type {typeof Dandelion.IDOMObject} */
|
||||
var IDOMObject = __import( "Dandelion.IDOMObject" );
|
||||
/** @type {Astro.Blog.Config} */
|
||||
var Conf = __import( "Astro.Blog.Config" );
|
||||
@@ -149,7 +149,7 @@
|
||||
fileList.style.paddingTop = String(p_status.clientHeight) + "px";
|
||||
|
||||
|
||||
var docDom = IDOMObject( document );
|
||||
var docDom = new IDOMObject( document );
|
||||
// Drag/drop handlers
|
||||
docDom.addEventListener( "DragOver", function ( e )
|
||||
{
|
||||
|
||||
@@ -145,10 +145,10 @@
|
||||
);
|
||||
|
||||
// ad handlers to handles size change event
|
||||
IDOMElement(s).element.addEventListener("Change", selectionChanged.bind({size: "small"}));
|
||||
IDOMElement(m).element.addEventListener("Change", selectionChanged.bind({size: "medium"}));
|
||||
IDOMElement(l).element.addEventListener("Change", selectionChanged.bind({size: "large"}));
|
||||
IDOMElement(o).element.addEventListener("Change", selectionChanged.bind({size: "original"}));
|
||||
IDOMElement(s).addEventListener("Change", selectionChanged.bind({size: "small"}));
|
||||
IDOMElement(m).addEventListener("Change", selectionChanged.bind({size: "medium"}));
|
||||
IDOMElement(l).addEventListener("Change", selectionChanged.bind({size: "large"}));
|
||||
IDOMElement(o).addEventListener("Change", selectionChanged.bind({size: "original"}));
|
||||
|
||||
var hasValue = _stage.getDAttribute( "size" );
|
||||
if( hasValue )
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
var Perf = __import( "System.utils.Perf" );
|
||||
/** @type {typeof System.utils.DataKey} */
|
||||
var DataKey = __import( "System.utils.DataKey" );
|
||||
/** @type {System.utils.EventKey} */
|
||||
/** @type {typeof System.utils.EventKey} */
|
||||
var EventKey = __import( "System.utils.EventKey" );
|
||||
/** @type {typeof System.utils.IKey} */
|
||||
var IKey = __import( "System.utils.IKey" );
|
||||
@@ -21,7 +21,7 @@
|
||||
var Loader = __import( "System.Net.ClassLoader" );
|
||||
/** @type {typeof Components.MessageBox} */
|
||||
var MessageBox = __import( "Components.MessageBox" );
|
||||
/** @type {Components.Mouse.ContextMenu} */
|
||||
/** @type {typeof Components.Mouse.ContextMenu} */
|
||||
var ContextMenu = __import( "Components.Mouse.ContextMenu" );
|
||||
/** @type {Astro.Blog.Config} */
|
||||
var Config = __import( "Astro.Blog.Config" );
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
/** @type {System.Cycle} */
|
||||
var Cycle = __import( "System.Cycle" );
|
||||
/** @type {System.utils.EventKey} */
|
||||
/** @type {typeof System.utils.EventKey} */
|
||||
var EventKey = __import( "System.utils.EventKey" );
|
||||
/** @type {typeof Dandelion} */
|
||||
var Dand = __import( "Dandelion" );
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
var Trigger = __import( "System.Cycle.Trigger" );
|
||||
/** @type {typeof System.utils.IKey} */
|
||||
var IKey = __import( "System.utils.IKey" );
|
||||
/** @type {System.utils.EventKey} */
|
||||
/** @type {typeof System.utils.EventKey} */
|
||||
var EventKey = __import( "System.utils.EventKey" );
|
||||
/** @type {typeof System.utils.DataKey} */
|
||||
var DataKey = __import( "System.utils.DataKey" );
|
||||
@@ -76,7 +76,7 @@
|
||||
, cHeight = 0
|
||||
, elmH = "1.2em"
|
||||
|
||||
, cp = Dand.id( "c_input_panel" )
|
||||
, cp = /** @type {HTMLElement} */ (Dand.id( "c_input_panel" ))
|
||||
, contentField = Dand.id( "content_field" )
|
||||
, nameField = Dand.id( "name_field" )
|
||||
, c_body = Dand.id( "comment_body" )
|
||||
@@ -274,9 +274,9 @@
|
||||
|
||||
Trigger.transition(cp.style, "", function()
|
||||
{
|
||||
cp.style.padding = "0";
|
||||
cp.style.height = "0";
|
||||
});
|
||||
this.style.padding = "0";
|
||||
this.style.height = "0";
|
||||
}.bind(cp));
|
||||
|
||||
// After transition finished, remove input panel
|
||||
Cycle.delay(function()
|
||||
@@ -432,11 +432,12 @@
|
||||
// Close Input panel
|
||||
closeInputPanel( null );
|
||||
|
||||
var el;
|
||||
// Remove false_fields
|
||||
for(var i = 0, l = fields.length; i < l; i ++)
|
||||
{
|
||||
i = Dand.id("false_" + fields[i]);
|
||||
i.parentNode.removeChild(i);
|
||||
el = /** @type {HTMLElement} */ (Dand.id("false_" + fields[i]));
|
||||
el.parentNode.removeChild(el);
|
||||
}
|
||||
c_stack.style.opacity = 0;
|
||||
cp.parentNode.insertBefore( c_stack, cp );
|
||||
@@ -444,12 +445,12 @@
|
||||
c_stack.style.marginTop = ( -c_stack.clientHeight ) + "px";
|
||||
|
||||
// if nocomment notice exist, remove it
|
||||
if( i = Dand.id("nocomment") )
|
||||
if( el = /** @type {HTMLElement} */ (Dand.id("nocomment")) )
|
||||
{
|
||||
i.style.transition = "all 0s";
|
||||
i.style.width = "658px";
|
||||
i.style.height = "22px";
|
||||
i.style.overflow = "hidden";
|
||||
el.style.transition = "all 0s";
|
||||
el.style.width = "658px";
|
||||
el.style.height = "22px";
|
||||
el.style.overflow = "hidden";
|
||||
// transition
|
||||
Cycle.next(function()
|
||||
{
|
||||
@@ -458,7 +459,7 @@
|
||||
this.style.width = "0";
|
||||
this.style.padding = "0";
|
||||
this.style.height = "0";
|
||||
}.bind(i));
|
||||
}.bind(el));
|
||||
// Pending remove
|
||||
Trigger.height(i, 0, function(){ this.parentNode.removeChild(this); }.bind(i));
|
||||
}
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
var IKey = __import( "System.utils.IKey" );
|
||||
/** @type {typeof System.utils.DataKey} */
|
||||
var DataKey = __import( "System.utils.DataKey" );
|
||||
/** @type {System.utils.EventKey} */
|
||||
/** @type {typeof System.utils.EventKey} */
|
||||
var EventKey = __import( "System.utils.EventKey" );
|
||||
/** @type {typeof Dandelion} */
|
||||
var Dand = __import( "Dandelion" );
|
||||
/** @type {typeof Components.MessageBox} */
|
||||
var MessageBox = __import( "Components.MessageBox" );
|
||||
/** @type {Components.Mouse.ContextMenu} */
|
||||
/** @type {typeof Components.Mouse.ContextMenu} */
|
||||
var ContextMenu = __import( "Components.Mouse.ContextMenu" );
|
||||
/** @type {Astro.Bootstrap} */
|
||||
var Bootstrap = __import( "Astro.Bootstrap" );
|
||||
@@ -32,7 +32,7 @@
|
||||
var init = function ()
|
||||
{
|
||||
var stage = Dand.id( "notifications" );
|
||||
var nt_body = Dand.id( "nt_body" );
|
||||
var nt_body = /** @type HTMLElement */ (Dand.id( "nt_body" ));
|
||||
var bodyStyle = nt_body.style;
|
||||
|
||||
/** @type {_AstConf_.Notification} */
|
||||
@@ -156,10 +156,12 @@
|
||||
var items = [], menuShow = false;
|
||||
var hasNotis = 0 < e.data.length;
|
||||
|
||||
/** @type {_AstJson_.AJaxGetNotis} */
|
||||
var data;
|
||||
|
||||
for( var n in e.data )
|
||||
{
|
||||
/** @type {_AstJson_.AJaxGetNotis} */
|
||||
var data = e.data[n];
|
||||
data = e.data[n];
|
||||
// Create items
|
||||
items[ items.length ] = new IKey(
|
||||
data.mesg
|
||||
@@ -173,7 +175,7 @@
|
||||
Dand.glass( "nt_icon_settings", true )[0].addEventListener( "Click", popupSettings );
|
||||
|
||||
contextMenu = new ContextMenu(
|
||||
Dand.id( "nt_open_menu" )
|
||||
/** @type HTMLElement */ (Dand.id( "nt_open_menu" ))
|
||||
, items
|
||||
, "LMB"
|
||||
, nt_body
|
||||
@@ -220,8 +222,7 @@
|
||||
|
||||
for( n in e.data )
|
||||
{
|
||||
/** @type {_AstJson_.AJaxGetNotis} */
|
||||
var data = e.data[n];
|
||||
data = e.data[n];
|
||||
|
||||
var li = contextMenu.getItemByKey( "m_" + data.id ).stage;
|
||||
li.appendChild(
|
||||
|
||||
@@ -12,9 +12,10 @@
|
||||
/** @type {Astro.Blog.Config} */
|
||||
var Conf = __import( "Astro.Blog.Config" );
|
||||
|
||||
/** @type {_AstConf_.CommentToggle} */
|
||||
/** @type {Array<string|Object<string,*>>} */
|
||||
var settings = Conf.get( "CommentToggle" );
|
||||
|
||||
/** @constructor */
|
||||
var CommentToggle = function( id, processor, object )
|
||||
{
|
||||
ToggleButton.call( this, id, processor, object );
|
||||
@@ -24,7 +25,7 @@
|
||||
|
||||
var init = function()
|
||||
{
|
||||
for( var i in settings )
|
||||
for( var i = 0, l = settings.length; i < l; i ++ )
|
||||
{
|
||||
var button = settings[i];
|
||||
new CommentToggle( button[0], button[1], button[2] );
|
||||
|
||||
@@ -7,13 +7,14 @@
|
||||
var IDOMElement = __import( "Dandelion.IDOMElement" );
|
||||
/** @type {Astro.Bootstrap} */
|
||||
var Bootstrap = __import( "Astro.Bootstrap" );
|
||||
/** @type {Astro.Blog} */
|
||||
/** @type {Astro.Blog.Config} */
|
||||
var config = __import( "Astro.Blog.Config" );
|
||||
/** @type {typeof System.utils.DataKey} */
|
||||
var DataKey = __import( "System.utils.DataKey" );
|
||||
|
||||
var postData = __import( "System.Net.postData" );
|
||||
|
||||
/** @constructor */
|
||||
var ToggleButton = function ( elem, processor, obj )
|
||||
{
|
||||
var stage = Dand.id( elem, true );
|
||||
@@ -52,7 +53,7 @@
|
||||
var init = function()
|
||||
{
|
||||
var toggles = config.get( "ToggleButtons" );
|
||||
for( var i in toggles )
|
||||
for( var i = 0, l = toggles.length; i < l; i ++ )
|
||||
{
|
||||
new ToggleButton( toggles[ i ][0], toggles[ i ][1], toggles[ i ][2] );
|
||||
}
|
||||
|
||||
@@ -39,10 +39,8 @@
|
||||
var getData = __import( "System.Net.getData" );
|
||||
var mobile = __import( "System.Global.MOBILE" );
|
||||
|
||||
/** @const {number} */
|
||||
var ELEMENT_NODE = Node.ELEMENT_NODE;
|
||||
/** @const {number} */
|
||||
var COMMENT_NODE = Node.COMMENT_NODE;
|
||||
var ELEMENT_NODE = 1;
|
||||
var COMMENT_NODE = 8;
|
||||
|
||||
var header;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
var Cycle = __import( "System.Cycle" );
|
||||
/** @type {typeof Dandelion} */
|
||||
var Dand = __import( "Dandelion" );
|
||||
/** @type {Dandelion.IDOMObject} */
|
||||
/** @type {typeof Dandelion.IDOMObject} */
|
||||
var IDOMObject = __import( "Dandelion.IDOMObject" );
|
||||
|
||||
var Parallax = {
|
||||
@@ -111,7 +111,7 @@
|
||||
EnterFrame( animate );
|
||||
};
|
||||
|
||||
IDOMObject( eDispatcher ).addEventListener( "Scroll", dispatchAnima );
|
||||
new IDOMObject( eDispatcher ).addEventListener( "Scroll", dispatchAnima );
|
||||
};
|
||||
|
||||
ns[ NS_EXPORT ]( EX_FUNC, "cssSlide", cssSlide );
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var DataKey = __import( "System.utils.DataKey" );
|
||||
/** @type {typeof Dandelion} */
|
||||
var Dand = __import( "Dandelion" );
|
||||
/** @type {Dandelion.IDOMObject} */
|
||||
/** @type {typeof Dandelion.IDOMObject} */
|
||||
var IDOMObject = __import( "Dandelion.IDOMObject" );
|
||||
/** @type {function(...?): Dandelion.IDOMElement} */
|
||||
var IDOMElement = __import( "Dandelion.IDOMElement" );
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
/** @type {typeof Dandelion} */
|
||||
var Dand = __import( "Dandelion" );
|
||||
/** @type {Dandelion.IDOMObject} */
|
||||
/** @type {typeof Dandelion.IDOMObject} */
|
||||
var IDOMObject = __import( "Dandelion.IDOMObject" );
|
||||
/** @type {Dandelion.Window} */
|
||||
var wsupp = __import( "Dandelion.Window" );
|
||||
|
||||
Reference in New Issue
Block a user