Moved SiteFiles.files to SFObjects

This commit is contained in:
斟酌 鵬兄 2019-04-02 00:52:14 +08:00
parent 6f326d5b80
commit 9ac3479008
4 changed files with 14 additions and 12 deletions

View File

@ -29,10 +29,9 @@
var postData = __import( "System.Net.postData" ); var postData = __import( "System.Net.postData" );
var prettyDate = __import( "Astro.utils.Date.pretty" ); var prettyDate = __import( "Astro.utils.Date.pretty" );
var SiteLibrary = function ( basePath, processorGet, processorSet ) { var SiteLibrary = function ( basePath, processorGet, processorSet )
var {
var view_index = []
view_index = []
, currentView , currentView
, inCollection = 0 , inCollection = 0
, indexingItem , indexingItem

View File

@ -86,9 +86,10 @@
config = Conf.get( "SiteFile" ); config = Conf.get( "SiteFile" );
if( config ) if( config )
{ {
for( var i in config.files ) var SFOs = Conf.get( "SFObjects" );
for( var i in SFOs )
{ {
var f = config.files[i]; var f = SFOs[i];
new Album( f[0], f[1] ); new Album( f[0], f[1] );
} }
} }

View File

@ -61,9 +61,10 @@
throw new Error( obj ); throw new Error( obj );
}; };
for( var i in config.files ) var SFOs = Conf.get( "SFObjects" );
for( var i in SFOs )
{ {
var f = config.files[i]; var f = SFOs[i];
var id = f[0]; var id = f[0];
if( id == bId ) if( id == bId )
{ {

View File

@ -45,8 +45,8 @@
/** @type {_AstJson_.SiteFile} */ /** @type {_AstJson_.SiteFile} */
var finfo = JSON.parse( obj ).file; var finfo = JSON.parse( obj ).file;
switch( finfo.type ) { switch( finfo.type )
{
case "image": case "image":
var node = Dand.wrap('img'); var node = Dand.wrap('img');
var k = new IKey( "src", null ); var k = new IKey( "src", null );
@ -151,9 +151,10 @@
config = Conf.get( "SiteFile" ); config = Conf.get( "SiteFile" );
if( config ) if( config )
{ {
for( var i in config.files ) var SFOs = Conf.get( "SFObjects" );
for( var i in SFOs )
{ {
var f = config.files[i]; var f = SFOs[i];
new SiteFile( f[0], f[1] ); new SiteFile( f[0], f[1] );
} }
} }