mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8509 201d5d3c-b55e-5fd7-737f-ddc643e51545
5 lines
843 B
JavaScript
5 lines
843 B
JavaScript
/**
|
|
* Gallery App
|
|
*/
|
|
(function(f){var g=xe.createApp("Gallery",{_imgs:{},_styles:{},init:function(){this._imgs={}},API_ADD_IMAGE:function(b,a){var c=a[1],d="@"+a[0];/^files/.test(c)&&(c=request_uri+c);is_def(this._imgs[d])||(this._imgs[d]=[]);this._imgs[d].push({path:c,loaded:!1})},API_ONREADY:function(){var b,a,c,d,e=this._imgs;for(c in e)if(e.hasOwnProperty(c)){b=0;for(a=e[c].length;b<a;b++)d=e[c][b],d.$obj=f("<img />").attr("src",d.path),d.$obj.load({img:d},function(a){a=a.data.img;a.loaded=!0;a.$obj.unbind("load")})}},
|
|
API_GET_IMAGES:function(b,a){return this._imgs["@"+a[0]]||[]},API_SET_STYLE:function(b,a){this._styles["@"+a[0]]=a[1]},API_ONLOAD:function(){var b,a;for(b in this._imgs)this._imgs.hasOwnProperty(b)&&(a=this._styles[b]||"list",this.cast("SHOW_"+a.toUpperCase(),[b.substr(1)]))}});xe.registerApp(new g)})(jQuery);
|